[qo-modules-dev] [32] ext 3 update |
[ Thread Index | Date Index | More lists.tuxfamily.org/qo-modules-dev Archives ]
Revision: 32 Author: mjlecomte Date: 2008-12-01 21:55:57 +0100 (Mon, 01 Dec 2008) Log Message: ----------- ext 3 update Modified Paths: -------------- mickael/trunk/ext/v3.0.0-a1/adapter/ext/ext-base.js mickael/trunk/ext/v3.0.0-a1/adapter/jquery/ext-jquery-adapter.js mickael/trunk/ext/v3.0.0-a1/adapter/prototype/ext-prototype-adapter.js mickael/trunk/ext/v3.0.0-a1/adapter/yui/ext-yui-adapter.js mickael/trunk/ext/v3.0.0-a1/build/core/Element-min.js mickael/trunk/ext/v3.0.0-a1/build/core/Element.insertion-min.js mickael/trunk/ext/v3.0.0-a1/build/core/Element.scroll-min.js mickael/trunk/ext/v3.0.0-a1/build/core/EventManager-min.js mickael/trunk/ext/v3.0.0-a1/build/core/Ext-min.js mickael/trunk/ext/v3.0.0-a1/build/core/Fx-min.js mickael/trunk/ext/v3.0.0-a1/build/data/ArrayReader-min.js mickael/trunk/ext/v3.0.0-a1/build/data/DirectProxy-min.js mickael/trunk/ext/v3.0.0-a1/build/data/JsonStore-min.js mickael/trunk/ext/v3.0.0-a1/build/data/SimpleStore-min.js mickael/trunk/ext/v3.0.0-a1/build/data/Store-min.js mickael/trunk/ext/v3.0.0-a1/build/data/StoreMgr-min.js mickael/trunk/ext/v3.0.0-a1/build/data/XmlReader-min.js mickael/trunk/ext/v3.0.0-a1/build/dd/DDCore-min.js mickael/trunk/ext/v3.0.0-a1/build/dd/DragTracker-min.js mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-fr-min.js mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-tr-min.js mickael/trunk/ext/v3.0.0-a1/build/util/ClickRepeater-min.js mickael/trunk/ext/v3.0.0-a1/build/util/Date-min.js mickael/trunk/ext/v3.0.0-a1/build/util/Format-min.js mickael/trunk/ext/v3.0.0-a1/build/util/History-min.js mickael/trunk/ext/v3.0.0-a1/build/util/Observable-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Action-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Button-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/ColorPalette-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Component-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/ComponentMgr-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Container-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/DatePicker-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Editor-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/PagingToolbar-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Panel-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Resizable-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/SplitBar-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/TabPanel-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Toolbar-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/Window-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Combo-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DateField-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Field-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/FieldSet-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Form-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/HtmlEditor-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/TextField-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/Column-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/ColumnModel-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/EditorGrid-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridPanel-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridView-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AbsoluteLayout-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AccordionLayout-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/BorderLayout-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/FormLayout-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/BaseItem-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/Menu-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/tips/Tip-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeEventModel-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeNode-min.js mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.html mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.js mickael/trunk/ext/v3.0.0-a1/examples/layout/column.html mickael/trunk/ext/v3.0.0-a1/ext-all-debug.js mickael/trunk/ext/v3.0.0-a1/ext-all-detail.js mickael/trunk/ext/v3.0.0-a1/ext-all.js mickael/trunk/ext/v3.0.0-a1/ext-core-debug.js mickael/trunk/ext/v3.0.0-a1/ext-core.js mickael/trunk/ext/v3.0.0-a1/package/button/button-debug.js mickael/trunk/ext/v3.0.0-a1/package/button/button.js mickael/trunk/ext/v3.0.0-a1/package/color-palette.js mickael/trunk/ext/v3.0.0-a1/package/data/data.js mickael/trunk/ext/v3.0.0-a1/package/date.js mickael/trunk/ext/v3.0.0-a1/package/datepicker/datepicker.js mickael/trunk/ext/v3.0.0-a1/package/dialog/dialogs-debug.js mickael/trunk/ext/v3.0.0-a1/package/dragdrop/dragdrop.js mickael/trunk/ext/v3.0.0-a1/package/form/form-debug.js mickael/trunk/ext/v3.0.0-a1/package/form/form.js mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid-debug.js mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid.js mickael/trunk/ext/v3.0.0-a1/package/grid/grid.js mickael/trunk/ext/v3.0.0-a1/package/menu/menus.js mickael/trunk/ext/v3.0.0-a1/package/qtips/qtips.js mickael/trunk/ext/v3.0.0-a1/package/resizable.js mickael/trunk/ext/v3.0.0-a1/package/splitbar.js mickael/trunk/ext/v3.0.0-a1/package/tabs/tabs.js mickael/trunk/ext/v3.0.0-a1/package/toolbar/toolbar.js mickael/trunk/ext/v3.0.0-a1/package/tree/tree.js mickael/trunk/ext/v3.0.0-a1/package/util.js mickael/trunk/ext/v3.0.0-a1/package/widget-core.js mickael/trunk/ext/v3.0.0-a1/resources/css/combo.css mickael/trunk/ext/v3.0.0-a1/resources/css/core.css mickael/trunk/ext/v3.0.0-a1/resources/css/ext-all.css mickael/trunk/ext/v3.0.0-a1/resources/css/form.css mickael/trunk/ext/v3.0.0-a1/resources/css/menu.css mickael/trunk/ext/v3.0.0-a1/resources/resources.jsb mickael/trunk/ext/v3.0.0-a1/source/adapter/ext-base.js mickael/trunk/ext/v3.0.0-a1/source/adapter/jquery-bridge.js mickael/trunk/ext/v3.0.0-a1/source/adapter/prototype-bridge.js mickael/trunk/ext/v3.0.0-a1/source/adapter/yui-bridge.js mickael/trunk/ext/v3.0.0-a1/source/core/CompositeElement.js mickael/trunk/ext/v3.0.0-a1/source/core/DomHelper.js mickael/trunk/ext/v3.0.0-a1/source/core/DomQuery.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.alignment.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.dd.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.insertion.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.keys.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.legacy.js mickael/trunk/ext/v3.0.0-a1/source/core/Element.scroll.js mickael/trunk/ext/v3.0.0-a1/source/core/EventManager.js mickael/trunk/ext/v3.0.0-a1/source/core/Ext.js mickael/trunk/ext/v3.0.0-a1/source/core/Fx.js mickael/trunk/ext/v3.0.0-a1/source/core/Template.js mickael/trunk/ext/v3.0.0-a1/source/core/UpdateManager.js mickael/trunk/ext/v3.0.0-a1/source/data/ArrayReader.js mickael/trunk/ext/v3.0.0-a1/source/data/Connection.js mickael/trunk/ext/v3.0.0-a1/source/data/DataField.js mickael/trunk/ext/v3.0.0-a1/source/data/DataProxy.js mickael/trunk/ext/v3.0.0-a1/source/data/DataReader.js mickael/trunk/ext/v3.0.0-a1/source/data/DirectProxy.js mickael/trunk/ext/v3.0.0-a1/source/data/DirectStore.js mickael/trunk/ext/v3.0.0-a1/source/data/GroupingStore.js mickael/trunk/ext/v3.0.0-a1/source/data/HttpProxy.js mickael/trunk/ext/v3.0.0-a1/source/data/JsonReader.js mickael/trunk/ext/v3.0.0-a1/source/data/JsonStore.js mickael/trunk/ext/v3.0.0-a1/source/data/MemoryProxy.js mickael/trunk/ext/v3.0.0-a1/source/data/Record.js mickael/trunk/ext/v3.0.0-a1/source/data/ScriptTagProxy.js mickael/trunk/ext/v3.0.0-a1/source/data/SimpleStore.js mickael/trunk/ext/v3.0.0-a1/source/data/SortTypes.js mickael/trunk/ext/v3.0.0-a1/source/data/Store.js mickael/trunk/ext/v3.0.0-a1/source/data/StoreMgr.js mickael/trunk/ext/v3.0.0-a1/source/data/Tree.js mickael/trunk/ext/v3.0.0-a1/source/data/XmlReader.js mickael/trunk/ext/v3.0.0-a1/source/dd/DDCore.js mickael/trunk/ext/v3.0.0-a1/source/dd/DragSource.js mickael/trunk/ext/v3.0.0-a1/source/dd/DragTracker.js mickael/trunk/ext/v3.0.0-a1/source/dd/DragZone.js mickael/trunk/ext/v3.0.0-a1/source/dd/DropTarget.js mickael/trunk/ext/v3.0.0-a1/source/dd/DropZone.js mickael/trunk/ext/v3.0.0-a1/source/dd/Registry.js mickael/trunk/ext/v3.0.0-a1/source/dd/ScrollManager.js mickael/trunk/ext/v3.0.0-a1/source/dd/StatusProxy.js mickael/trunk/ext/v3.0.0-a1/source/debug.js mickael/trunk/ext/v3.0.0-a1/source/ext.jsb mickael/trunk/ext/v3.0.0-a1/source/license.txt mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-af.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-bg.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ca.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-cs.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-da.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-de.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-el_GR.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-en.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-es.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fa.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr_CA.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-gr.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-he.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hr.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hu.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-id.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-it.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ja.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ko.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lt.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lv.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-mk.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-nl.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NB.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NN.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pl.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt_BR.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ro.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ru.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sk.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sl.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr_RS.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sv_SE.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-th.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-tr.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ukr.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-vn.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_CN.js mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_TW.js mickael/trunk/ext/v3.0.0-a1/source/state/CookieProvider.js mickael/trunk/ext/v3.0.0-a1/source/state/Provider.js mickael/trunk/ext/v3.0.0-a1/source/state/StateManager.js mickael/trunk/ext/v3.0.0-a1/source/util/CSS.js mickael/trunk/ext/v3.0.0-a1/source/util/ClickRepeater.js mickael/trunk/ext/v3.0.0-a1/source/util/Cookies.js mickael/trunk/ext/v3.0.0-a1/source/util/Date.js mickael/trunk/ext/v3.0.0-a1/source/util/DelayedTask.js mickael/trunk/ext/v3.0.0-a1/source/util/Format.js mickael/trunk/ext/v3.0.0-a1/source/util/History.js mickael/trunk/ext/v3.0.0-a1/source/util/JSON.js mickael/trunk/ext/v3.0.0-a1/source/util/KeyMap.js mickael/trunk/ext/v3.0.0-a1/source/util/KeyNav.js mickael/trunk/ext/v3.0.0-a1/source/util/MixedCollection.js mickael/trunk/ext/v3.0.0-a1/source/util/Observable.js mickael/trunk/ext/v3.0.0-a1/source/util/TaskMgr.js mickael/trunk/ext/v3.0.0-a1/source/util/TextMetrics.js mickael/trunk/ext/v3.0.0-a1/source/util/XTemplate.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Action.js mickael/trunk/ext/v3.0.0-a1/source/widgets/BoxComponent.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Button.js mickael/trunk/ext/v3.0.0-a1/source/widgets/ColorPalette.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Component.js mickael/trunk/ext/v3.0.0-a1/source/widgets/ComponentMgr.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Container.js mickael/trunk/ext/v3.0.0-a1/source/widgets/CycleButton.js mickael/trunk/ext/v3.0.0-a1/source/widgets/DataView.js mickael/trunk/ext/v3.0.0-a1/source/widgets/DatePicker.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Editor.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Layer.js mickael/trunk/ext/v3.0.0-a1/source/widgets/LoadMask.js mickael/trunk/ext/v3.0.0-a1/source/widgets/MessageBox.js mickael/trunk/ext/v3.0.0-a1/source/widgets/PagingToolbar.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Panel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/PanelDD.js mickael/trunk/ext/v3.0.0-a1/source/widgets/ProgressBar.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Resizable.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Shadow.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Slider.js mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitBar.js mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitButton.js mickael/trunk/ext/v3.0.0-a1/source/widgets/TabPanel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Toolbar.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Viewport.js mickael/trunk/ext/v3.0.0-a1/source/widgets/Window.js mickael/trunk/ext/v3.0.0-a1/source/widgets/WindowManager.js mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/Chart.js mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/EventProxy.js mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/FlashComponent.js mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/swfobject.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Action.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/BasicForm.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Checkbox.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/CheckboxGroup.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Combo.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DateField.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Field.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/FieldSet.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Form.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Hidden.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/HtmlEditor.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Label.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/NumberField.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Radio.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/RadioGroup.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextArea.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextField.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TimeField.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TriggerField.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/VTypes.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/AbstractSelectionModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CellSelectionModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CheckboxSelectionModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/Column.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnDD.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnSplitDD.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/EditorGrid.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridDD.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridEditor.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridPanel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridView.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GroupingView.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/PropertyGrid.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowNumberer.js mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowSelectionModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AbsoluteLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AccordionLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AnchorLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/BorderLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/CardLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ColumnLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ContainerLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FitLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FormLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/TableLayout.js mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ColumnResizer.js mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ListView.js mickael/trunk/ext/v3.0.0-a1/source/widgets/list/Sorter.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Adapter.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/BaseItem.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/CheckItem.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorItem.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorMenu.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateItem.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateMenu.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Item.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Menu.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/MenuMgr.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Separator.js mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/TextItem.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTip.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTips.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/Tip.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/ToolTip.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/AsyncTreeNode.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDragZone.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDropZone.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEditor.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEventModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeFilter.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeLoader.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNode.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNodeUI.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreePanel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSelectionModel.js mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSorter.js Added Paths: ----------- mickael/trunk/ext/v3.0.0-a1/air/ mickael/trunk/ext/v3.0.0-a1/air/README.txt mickael/trunk/ext/v3.0.0-a1/air/air.jsb mickael/trunk/ext/v3.0.0-a1/air/resources/ mickael/trunk/ext/v3.0.0-a1/air/resources/air-resources.jsb mickael/trunk/ext/v3.0.0-a1/air/resources/ext-air.css mickael/trunk/ext/v3.0.0-a1/air/resources/icons/ mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo128.png mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo16.png mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo32.png mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo48.png mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo64.png mickael/trunk/ext/v3.0.0-a1/air/resources/images/ mickael/trunk/ext/v3.0.0-a1/air/resources/images/left-corners.png mickael/trunk/ext/v3.0.0-a1/air/resources/images/left-right.png mickael/trunk/ext/v3.0.0-a1/air/resources/images/right-corners.png mickael/trunk/ext/v3.0.0-a1/air/resources/images/top-bottom.png mickael/trunk/ext/v3.0.0-a1/air/samples/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/.project mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/LICENSE.TXT mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/STasks2.air mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/about.html mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRAliases.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRIntrospector.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/application.xml mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/beep.mp3 mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/adapter/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/adapter/ext/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/adapter/ext/ext-base.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/ext-all.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/ext-all.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/xtheme-gray.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/corners-blue.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/corners.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/l-blue.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/l.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/r-blue.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/r.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/tb-blue.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/tb.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/btn-arrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/btn-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-add.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-no.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-yes.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/editor/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/editor/tb-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/clear-trigger.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/clear-trigger.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/date-trigger.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/date-trigger.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/error-tip-corners.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/exclamation.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/search-trigger.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/search-trigger.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/text-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger-tpl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/gradient-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/Thumbs.db mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/arrow-left-white.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/arrow-right-white.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/col-move-bottom.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/col-move-top.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/columns.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/dirty.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/done.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/drop-no.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/drop-yes.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/footer-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-blue-hd.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-blue-split.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-hrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-loading.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-split.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-vista-hd.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hd-btn.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hrow-over.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-special-col-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-special-col-sel-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/group-by.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/group-expand-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hd-pop.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-asc.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-desc.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-lock.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-lock.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-unlock.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-unlock.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/invalid_line.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/loading.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/mso-hd.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/nowait.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-first-disabled.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-first.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-last-disabled.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-last.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-next-disabled.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-next.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-prev-disabled.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-prev.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/pick-button.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/refresh.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-check-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-expand-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-over.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-sel.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/sort_asc.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/sort_desc.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/wait.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/collapse.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/expand.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/gradient-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-bottom.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-left.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-top.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ns-collapse.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ns-expand.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-close.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-title-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-title-light-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/stick.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/stuck.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/tab-close-on.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/tab-close.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/checked.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/group-checked.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/item-over.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/menu-parent.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/menu.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/unchecked.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/corners-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/left-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/light-hd.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tool-sprite-tpl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tool-sprites.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tools-sprites-trans.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/top-bottom.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/top-bottom.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-corners-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-left-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-top-bottom.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/progress/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/progress/progress-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/close.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/tip-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/s.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow-c.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow-lr.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/blue-loading.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/calendar.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/glass-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/hd-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/large-loading.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/left-btn.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/loading-balls.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/right-btn.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/warning.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/e-handle-dark.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/e-handle.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ne-handle-dark.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ne-handle.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/nw-handle-dark.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/nw-handle.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/s-handle-dark.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/s-handle.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/se-handle-dark.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/se-handle.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/square.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/sw-handle-dark.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/sw-handle.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroll-left.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroll-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroller-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-inactive-left-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-inactive-right-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-left-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-right-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-close.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-bg.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-btm-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tabs-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-arrow-light.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-arrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-over-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/gray-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/tb-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/tb-btn-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/arrows.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-add.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-between.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-no.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-over.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-under.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-yes.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-minus-nl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-minus.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-plus-nl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-plus.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-line.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-minus-nl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-minus.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-plus-nl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-plus.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/folder-open.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/folder.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/leaf.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/loading.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/s.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-error.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-info.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-question.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-warning.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-corners.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-corners.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-right.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-right.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/right-corners.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/right-corners.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/top-bottom.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/top-bottom.psd mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/btn-arrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/btn-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/gradient-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/corners-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/left-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/light-hd.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tool-sprite-tpl.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tool-sprites.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tools-sprites-trans.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/top-bottom.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/top-bottom.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-corners-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-left-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-top-bottom.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/close.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/tip-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/s.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroll-left.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroll-right.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroller-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-left-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-right-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-close.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-bg.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-btm-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tabs-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-arrow-light.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-arrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-over-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/gray-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/tb-bg.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/tb-btn-sprite.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-error.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-info.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-question.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-warning.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-corners.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-corners.pspimage mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-right.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/right-corners.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/top-bottom.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/license.txt mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air-debug.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/air-resources.jsb mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/ext-air.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo128.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo16.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo32.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo48.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo64.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/left-corners.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/left-right.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/right-corners.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/top-bottom.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/bell.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/check.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/delete.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/edit.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/hd-check.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/hrow.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-active.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-all.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-by-category.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-by-date.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-complete.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-delete-task.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-filter.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder-delete.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder-new.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list-delete.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list-new.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-mark-active.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-mark-complete.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-multi-list.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-no-group.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-paste-new.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-active.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-all.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-complete.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/my-lists.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/panel-header.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/rbtn.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/reminder-hd.png mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/s.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/save.gif mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/DateTimeField.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Exporter.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Importer.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListLoader.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListSelector.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListStore.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListTree.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Reminder.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SelectBox.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SwitchButton.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskGrid.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskStore.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskWindow.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Templates.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TextDate.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TreeSelector.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/columns.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/data.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ext-config.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.html mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/mimetype mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.html mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.html mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.css mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.html mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.js mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/tasks.db mickael/trunk/ext/v3.0.0-a1/air/src/ mickael/trunk/ext/v3.0.0-a1/air/src/FileProvider.js mickael/trunk/ext/v3.0.0-a1/air/src/NativeDD.js mickael/trunk/ext/v3.0.0-a1/air/src/NativeObservable.js mickael/trunk/ext/v3.0.0-a1/air/src/NativeWindow.js mickael/trunk/ext/v3.0.0-a1/air/src/Sound.js mickael/trunk/ext/v3.0.0-a1/air/src/SystemMenu.js mickael/trunk/ext/v3.0.0-a1/air/src/SystemTray.js mickael/trunk/ext/v3.0.0-a1/air/src/air.jsb mickael/trunk/ext/v3.0.0-a1/air/src/ext-air-adapter.js mickael/trunk/ext/v3.0.0-a1/air/src/sql/ mickael/trunk/ext/v3.0.0-a1/air/src/sql/AirConnection.js mickael/trunk/ext/v3.0.0-a1/air/src/sql/Connection.js mickael/trunk/ext/v3.0.0-a1/air/src/sql/Proxy.js mickael/trunk/ext/v3.0.0-a1/air/src/sql/Table.js mickael/trunk/ext/v3.0.0-a1/build/css/ mickael/trunk/ext/v3.0.0-a1/build/css/borders-min.css mickael/trunk/ext/v3.0.0-a1/build/css/box-min.css mickael/trunk/ext/v3.0.0-a1/build/css/button-min.css mickael/trunk/ext/v3.0.0-a1/build/css/combo-min.css mickael/trunk/ext/v3.0.0-a1/build/css/core-min.css mickael/trunk/ext/v3.0.0-a1/build/css/date-picker-min.css mickael/trunk/ext/v3.0.0-a1/build/css/dd-min.css mickael/trunk/ext/v3.0.0-a1/build/css/debug-min.css mickael/trunk/ext/v3.0.0-a1/build/css/dialog-min.css mickael/trunk/ext/v3.0.0-a1/build/css/editor-min.css mickael/trunk/ext/v3.0.0-a1/build/css/form-min.css mickael/trunk/ext/v3.0.0-a1/build/css/grid-min.css mickael/trunk/ext/v3.0.0-a1/build/css/layout-min.css mickael/trunk/ext/v3.0.0-a1/build/css/list-view-min.css mickael/trunk/ext/v3.0.0-a1/build/css/menu-min.css mickael/trunk/ext/v3.0.0-a1/build/css/panel-min.css mickael/trunk/ext/v3.0.0-a1/build/css/progress-min.css mickael/trunk/ext/v3.0.0-a1/build/css/qtips-min.css mickael/trunk/ext/v3.0.0-a1/build/css/reset-min-min.css mickael/trunk/ext/v3.0.0-a1/build/css/reset-min.css mickael/trunk/ext/v3.0.0-a1/build/css/resizable-min.css mickael/trunk/ext/v3.0.0-a1/build/css/slider-min.css mickael/trunk/ext/v3.0.0-a1/build/css/tabs-min.css mickael/trunk/ext/v3.0.0-a1/build/css/toolbar-min.css mickael/trunk/ext/v3.0.0-a1/build/css/tree-min.css mickael/trunk/ext/v3.0.0-a1/build/css/window-min.css mickael/trunk/ext/v3.0.0-a1/build/css/xtheme-gray-min.css mickael/trunk/ext/v3.0.0-a1/build/direct/ mickael/trunk/ext/v3.0.0-a1/build/direct/Direct-min.js mickael/trunk/ext/v3.0.0-a1/build/direct/Event-min.js mickael/trunk/ext/v3.0.0-a1/build/direct/JsonProvider-min.js mickael/trunk/ext/v3.0.0-a1/build/direct/PollingProvider-min.js mickael/trunk/ext/v3.0.0-a1/build/direct/Provider-min.js mickael/trunk/ext/v3.0.0-a1/build/direct/RemotingProvider-min.js mickael/trunk/ext/v3.0.0-a1/build/direct/Transaction-min.js mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DisplayField-min.js mickael/trunk/ext/v3.0.0-a1/css/ mickael/trunk/ext/v3.0.0-a1/css/ext-all.css mickael/trunk/ext/v3.0.0-a1/dep-tree.json mickael/trunk/ext/v3.0.0-a1/examples/direct/ mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.js mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.php mickael/trunk/ext/v3.0.0-a1/examples/direct/php/ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/api.php mickael/trunk/ext/v3.0.0-a1/examples/direct/php/classes/ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/classes/TestAction.php mickael/trunk/ext/v3.0.0-a1/examples/direct/php/config.php mickael/trunk/ext/v3.0.0-a1/examples/direct/php/poll.php mickael/trunk/ext/v3.0.0-a1/examples/direct/php/router.php mickael/trunk/ext/v3.0.0-a1/examples/samples.css mickael/trunk/ext/v3.0.0-a1/examples/samples.html mickael/trunk/ext/v3.0.0-a1/examples/shared/code-display.js mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.css mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.js mickael/trunk/ext/v3.0.0-a1/examples/shared/info-bg.gif mickael/trunk/ext/v3.0.0-a1/examples/shared/lib-bar.png mickael/trunk/ext/v3.0.0-a1/examples/shared/lib.css mickael/trunk/ext/v3.0.0-a1/learn/buttons/ mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.css mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.html mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.js mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/ mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add.gif mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add16.gif mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add24.gif mickael/trunk/ext/v3.0.0-a1/license.txt mickael/trunk/ext/v3.0.0-a1/prerelease-license.txt mickael/trunk/ext/v3.0.0-a1/resources/build/ mickael/trunk/ext/v3.0.0-a1/resources/build/css/ mickael/trunk/ext/v3.0.0-a1/resources/build/css/borders-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/box-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/button-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/combo-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/core-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/date-picker-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/dd-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/debug-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/dialog-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/editor-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/form-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/grid-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/layout-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/list-view-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/menu-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/panel-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/progress-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/qtips-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/resizable-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/slider-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/tabs-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/toolbar-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/tree-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/window-min.css mickael/trunk/ext/v3.0.0-a1/resources/build/css/xtheme-gray-min.css mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/btn.gif mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/group-lr.gif mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/group-tb.gif mickael/trunk/ext/v3.0.0-a1/resources/images/vista/dd/ mickael/trunk/ext/v3.0.0-a1/resources/images/vista/tree/ mickael/trunk/ext/v3.0.0-a1/source/direct/ mickael/trunk/ext/v3.0.0-a1/source/direct/Direct.js mickael/trunk/ext/v3.0.0-a1/source/direct/Event.js mickael/trunk/ext/v3.0.0-a1/source/direct/JsonProvider.js mickael/trunk/ext/v3.0.0-a1/source/direct/PollingProvider.js mickael/trunk/ext/v3.0.0-a1/source/direct/Provider.js mickael/trunk/ext/v3.0.0-a1/source/direct/RemotingProvider.js mickael/trunk/ext/v3.0.0-a1/source/direct/Transaction.js mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DisplayField.js mickael/trunk/ext/v3.0.0-a1/src/ mickael/trunk/ext/v3.0.0-a1/src/adapter/ mickael/trunk/ext/v3.0.0-a1/src/adapter/ext-base.js mickael/trunk/ext/v3.0.0-a1/src/adapter/jquery-bridge.js mickael/trunk/ext/v3.0.0-a1/src/adapter/prototype-bridge.js mickael/trunk/ext/v3.0.0-a1/src/adapter/yui-bridge.js mickael/trunk/ext/v3.0.0-a1/src/core/ mickael/trunk/ext/v3.0.0-a1/src/core/CompositeElement.js mickael/trunk/ext/v3.0.0-a1/src/core/DomHelper.js mickael/trunk/ext/v3.0.0-a1/src/core/DomQuery.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.alignment.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.dd.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.insertion.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.keys.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.legacy.js mickael/trunk/ext/v3.0.0-a1/src/core/Element.scroll.js mickael/trunk/ext/v3.0.0-a1/src/core/EventManager.js mickael/trunk/ext/v3.0.0-a1/src/core/Ext.js mickael/trunk/ext/v3.0.0-a1/src/core/Fx.js mickael/trunk/ext/v3.0.0-a1/src/core/Template.js mickael/trunk/ext/v3.0.0-a1/src/core/UpdateManager.js mickael/trunk/ext/v3.0.0-a1/src/data/ mickael/trunk/ext/v3.0.0-a1/src/data/ArrayReader.js mickael/trunk/ext/v3.0.0-a1/src/data/Connection.js mickael/trunk/ext/v3.0.0-a1/src/data/DataField.js mickael/trunk/ext/v3.0.0-a1/src/data/DataProxy.js mickael/trunk/ext/v3.0.0-a1/src/data/DataReader.js mickael/trunk/ext/v3.0.0-a1/src/data/DirectProxy.js mickael/trunk/ext/v3.0.0-a1/src/data/DirectStore.js mickael/trunk/ext/v3.0.0-a1/src/data/GroupingStore.js mickael/trunk/ext/v3.0.0-a1/src/data/HttpProxy.js mickael/trunk/ext/v3.0.0-a1/src/data/JsonReader.js mickael/trunk/ext/v3.0.0-a1/src/data/JsonStore.js mickael/trunk/ext/v3.0.0-a1/src/data/MemoryProxy.js mickael/trunk/ext/v3.0.0-a1/src/data/Record.js mickael/trunk/ext/v3.0.0-a1/src/data/ScriptTagProxy.js mickael/trunk/ext/v3.0.0-a1/src/data/SimpleStore.js mickael/trunk/ext/v3.0.0-a1/src/data/SortTypes.js mickael/trunk/ext/v3.0.0-a1/src/data/Store.js mickael/trunk/ext/v3.0.0-a1/src/data/StoreMgr.js mickael/trunk/ext/v3.0.0-a1/src/data/Tree.js mickael/trunk/ext/v3.0.0-a1/src/data/XmlReader.js mickael/trunk/ext/v3.0.0-a1/src/data/XmlStore.js mickael/trunk/ext/v3.0.0-a1/src/dd/ mickael/trunk/ext/v3.0.0-a1/src/dd/DDCore.js mickael/trunk/ext/v3.0.0-a1/src/dd/DragSource.js mickael/trunk/ext/v3.0.0-a1/src/dd/DragTracker.js mickael/trunk/ext/v3.0.0-a1/src/dd/DragZone.js mickael/trunk/ext/v3.0.0-a1/src/dd/DropTarget.js mickael/trunk/ext/v3.0.0-a1/src/dd/DropZone.js mickael/trunk/ext/v3.0.0-a1/src/dd/Registry.js mickael/trunk/ext/v3.0.0-a1/src/dd/ScrollManager.js mickael/trunk/ext/v3.0.0-a1/src/dd/StatusProxy.js mickael/trunk/ext/v3.0.0-a1/src/debug.js mickael/trunk/ext/v3.0.0-a1/src/direct/ mickael/trunk/ext/v3.0.0-a1/src/direct/Direct.js mickael/trunk/ext/v3.0.0-a1/src/direct/Event.js mickael/trunk/ext/v3.0.0-a1/src/direct/JsonProvider.js mickael/trunk/ext/v3.0.0-a1/src/direct/PollingProvider.js mickael/trunk/ext/v3.0.0-a1/src/direct/Provider.js mickael/trunk/ext/v3.0.0-a1/src/direct/RemotingProvider.js mickael/trunk/ext/v3.0.0-a1/src/direct/Transaction.js mickael/trunk/ext/v3.0.0-a1/src/ext.jsb mickael/trunk/ext/v3.0.0-a1/src/license.txt mickael/trunk/ext/v3.0.0-a1/src/locale/ mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-af.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-bg.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-ca.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-cs.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-da.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-de.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-el_GR.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-en.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-en_GB.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-es.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-fa.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-fi.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-fr.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-fr_CA.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-gr.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-he.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-hr.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-hu.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-id.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-it.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-ja.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-ko.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-lt.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-lv.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-mk.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-nl.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-no_NB.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-no_NN.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-pl.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-pt.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-pt_BR.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-pt_PT.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-ro.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-ru.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-sk.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-sl.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-sr.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-sr_RS.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-sv_SE.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-th.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-tr.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-ukr.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-vn.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-zh_CN.js mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-zh_TW.js mickael/trunk/ext/v3.0.0-a1/src/state/ mickael/trunk/ext/v3.0.0-a1/src/state/CookieProvider.js mickael/trunk/ext/v3.0.0-a1/src/state/Provider.js mickael/trunk/ext/v3.0.0-a1/src/state/StateManager.js mickael/trunk/ext/v3.0.0-a1/src/util/ mickael/trunk/ext/v3.0.0-a1/src/util/CSS.js mickael/trunk/ext/v3.0.0-a1/src/util/ClickRepeater.js mickael/trunk/ext/v3.0.0-a1/src/util/Cookies.js mickael/trunk/ext/v3.0.0-a1/src/util/Date.js mickael/trunk/ext/v3.0.0-a1/src/util/DelayedTask.js mickael/trunk/ext/v3.0.0-a1/src/util/Format.js mickael/trunk/ext/v3.0.0-a1/src/util/History.js mickael/trunk/ext/v3.0.0-a1/src/util/JSON.js mickael/trunk/ext/v3.0.0-a1/src/util/KeyMap.js mickael/trunk/ext/v3.0.0-a1/src/util/KeyNav.js mickael/trunk/ext/v3.0.0-a1/src/util/MixedCollection.js mickael/trunk/ext/v3.0.0-a1/src/util/Observable.js mickael/trunk/ext/v3.0.0-a1/src/util/TaskMgr.js mickael/trunk/ext/v3.0.0-a1/src/util/TextMetrics.js mickael/trunk/ext/v3.0.0-a1/src/util/XTemplate.js mickael/trunk/ext/v3.0.0-a1/src/widgets/ mickael/trunk/ext/v3.0.0-a1/src/widgets/Action.js mickael/trunk/ext/v3.0.0-a1/src/widgets/BoxComponent.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Button.js mickael/trunk/ext/v3.0.0-a1/src/widgets/ColorPalette.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Component.js mickael/trunk/ext/v3.0.0-a1/src/widgets/ComponentMgr.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Container.js mickael/trunk/ext/v3.0.0-a1/src/widgets/CycleButton.js mickael/trunk/ext/v3.0.0-a1/src/widgets/DataView.js mickael/trunk/ext/v3.0.0-a1/src/widgets/DatePicker.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Editor.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Layer.js mickael/trunk/ext/v3.0.0-a1/src/widgets/LoadMask.js mickael/trunk/ext/v3.0.0-a1/src/widgets/MessageBox.js mickael/trunk/ext/v3.0.0-a1/src/widgets/PagingToolbar.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Panel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/PanelDD.js mickael/trunk/ext/v3.0.0-a1/src/widgets/ProgressBar.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Resizable.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Shadow.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Slider.js mickael/trunk/ext/v3.0.0-a1/src/widgets/SplitBar.js mickael/trunk/ext/v3.0.0-a1/src/widgets/SplitButton.js mickael/trunk/ext/v3.0.0-a1/src/widgets/TabPanel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Toolbar.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Viewport.js mickael/trunk/ext/v3.0.0-a1/src/widgets/Window.js mickael/trunk/ext/v3.0.0-a1/src/widgets/WindowManager.js mickael/trunk/ext/v3.0.0-a1/src/widgets/chart/ mickael/trunk/ext/v3.0.0-a1/src/widgets/chart/Chart.js mickael/trunk/ext/v3.0.0-a1/src/widgets/chart/EventProxy.js mickael/trunk/ext/v3.0.0-a1/src/widgets/chart/FlashComponent.js mickael/trunk/ext/v3.0.0-a1/src/widgets/chart/swfobject.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/ mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Action.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/BasicForm.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Checkbox.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/CheckboxGroup.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Combo.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/DateField.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/DisplayField.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Field.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/FieldSet.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Form.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Hidden.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/HtmlEditor.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Label.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/NumberField.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/Radio.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/RadioGroup.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/TextArea.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/TextField.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/TimeField.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/TriggerField.js mickael/trunk/ext/v3.0.0-a1/src/widgets/form/VTypes.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/ mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/AbstractSelectionModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/CellSelectionModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/CheckboxSelectionModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/Column.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/ColumnDD.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/ColumnModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/ColumnSplitDD.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/EditorGrid.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/GridDD.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/GridEditor.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/GridPanel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/GridView.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/GroupingView.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/PropertyGrid.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/RowNumberer.js mickael/trunk/ext/v3.0.0-a1/src/widgets/grid/RowSelectionModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/ mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/AbsoluteLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/AccordionLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/AnchorLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/BorderLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/BoxLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/CardLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/ColumnLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/ContainerLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/FitLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/FormLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/layout/TableLayout.js mickael/trunk/ext/v3.0.0-a1/src/widgets/list/ mickael/trunk/ext/v3.0.0-a1/src/widgets/list/ColumnResizer.js mickael/trunk/ext/v3.0.0-a1/src/widgets/list/ListView.js mickael/trunk/ext/v3.0.0-a1/src/widgets/list/Sorter.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/ mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/Adapter.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/BaseItem.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/CheckItem.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/ColorItem.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/ColorMenu.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/DateItem.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/DateMenu.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/Item.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/Menu.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/MenuMgr.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/Separator.js mickael/trunk/ext/v3.0.0-a1/src/widgets/menu/TextItem.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tips/ mickael/trunk/ext/v3.0.0-a1/src/widgets/tips/QuickTip.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tips/QuickTips.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tips/Tip.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tips/ToolTip.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/ mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/AsyncTreeNode.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeDragZone.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeDropZone.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeEditor.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeEventModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeFilter.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeLoader.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeNode.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeNodeUI.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreePanel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeSelectionModel.js mickael/trunk/ext/v3.0.0-a1/src/widgets/tree/TreeSorter.js
Modified: mickael/trunk/ext/v3.0.0-a1/adapter/ext/ext-base.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/adapter/ext/ext-base.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/adapter/ext/ext-base.js 2008-12-01 20:55:57 UTC (rev 32) @@ -2,231 +2,2148 @@ * Ext JS Library 3.0 Pre-alpha * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@xxxxxxxxx - * + * * http://extjs.com/license */ +Ext = { + version: '3.0' +}; +window["undefined"] = window["undefined"]; +Ext.apply = function(o, c, defaults){ + if (defaults) { + 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), isSafari3 = isSafari && ua.indexOf('webkit/5') != -1, isIE = !isOpera && ua.indexOf("msie") > -1, isIE7 = !isOpera && ua.indexOf("msie 7") > -1, isGecko = !isSafari && ua.indexOf("gecko") > -1, isGecko3 = !isSafari && ua.indexOf("rv:1.9") > -1, isBorderBox = isIE && !isStrict, isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1), isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1), isAir = (ua.indexOf("adobeair") != -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]; + } + }; + var oc = Object.prototype.constructor; + return function(sb, sp, overrides){ + if (typeof sp == 'object') { + overrides = sp; + sp = sb; + sb = overrides.constructor != oc ? overrides.constructor : 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 == oc) { + spp.constructor = sp; + } + sb.override = function(o){ + Ext.override(sb, o); + }; + sbp.override = io; + Ext.override(sb, overrides); + sb.extend = function(o){ + Ext.extend(sb, o); + }; + 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 < a.length; ++i) { + d = a[i].split("."); + rt = d[0]; + eval('if (typeof ' + rt + ' == "undefined"){' + rt + ' = {};} o = ' + rt + ';'); + for (j = 1; j < d.length; ++j) { + o[d[j]] = o[d[j]] || + {}; + o = o[d[j]]; + } + } + }, + urlEncode: function(o){ + if (!o) { + return ""; + } + var buf = []; + for (var key in o) { + var ov = o[key], k = encodeURIComponent(key); + var type = typeof ov; + if (type == 'undefined') { + buf.push(k, "=&"); + } + else + if (type != "function" && type != "object") { + buf.push(k, "=", encodeURIComponent(ov), "&"); + } + else + if (Ext.isArray(ov)) { + if (ov.length) { + for (var i = 0, len = ov.length; i < len; i++) { + buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&"); + } + } + else { + buf.push(k, "=&"); + } + } + } + buf.pop(); + return buf.join(""); + }, + urlDecode: function(string, overwrite){ + if (!string || !string.length) { + return {}; + } + var obj = {}; + var pairs = string.split('&'); + var pair, name, value; + for (var i = 0, len = pairs.length; i < len; i++) { + pair = pairs[i].split('='); + name = decodeURIComponent(pair[0]); + value = decodeURIComponent(pair[1]); + if (overwrite !== true) { + if (typeof obj[name] == "undefined") { + obj[name] = value; + } + else + if (typeof obj[name] == "string") { + obj[name] = [obj[name]]; + obj[name].push(value); + } + else { + obj[name].push(value); + } + } + else { + obj[name] = value; + } + } + return obj; + }, + each: function(array, fn, scope){ + if (typeof array.length == "undefined" || typeof array == "string") { + array = [array]; + } + for (var i = 0, len = array.length; i < len; i++) { + if (fn.call(scope || array[i], array[i], i, array) === false) { + return i; + }; + } + }, + combine: function(){ + var as = arguments, l = as.length, r = []; + for (var i = 0; i < l; i++) { + var a = as[i]; + if (Ext.isArray(a)) { + r = r.concat(a); + } + else + if (a.length !== undefined && !a.substr) { + r = r.concat(Array.prototype.slice.call(a, 0)); + } + else { + r.push(a); + } + } + return r; + }, + escapeRe: function(s){ + return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); + }, + callback: function(cb, scope, args, delay){ + if (typeof cb == "function") { + if (delay) { + cb.defer(delay, scope, args || []); + } + else { + cb.apply(scope, args || []); + } + } + }, + getDom: function(el){ + if (!el || !document) { + return null; + } + return el.dom ? el.dom : (typeof el == 'string' ? document.getElementById(el) : el); + }, + getDoc: function(){ + return Ext.get(document); + }, + getBody: function(){ + return Ext.get(document.body || document.documentElement); + }, + getCmp: function(id){ + return Ext.ComponentMgr.get(id); + }, + num: function(v, defaultValue){ + if (typeof v != 'number') { + return defaultValue; + } + return v; + }, + destroy: function(){ + for (var i = 0, a = arguments, len = a.length; i < len; i++) { + var as = a[i]; + if (as) { + if (typeof as.destroy == 'function') { + as.destroy(); + } + else + if (as.dom) { + as.removeAllListeners(); + as.remove(); + } + } + } + }, + destroyMembers: function(o, arg1, arg2, etc){ + for (var i = 1, a = arguments, len = a.length; i < len; i++) { + Ext.destroy(o[a[i]]); + delete o[a[i]]; + } + }, + removeNode: isIE ? function(){ + var d; + return function(n){ + if (n && n.tagName != 'BODY') { + d = d || document.createElement('div'); + d.appendChild(n); + d.innerHTML = ''; + } + } + }() : function(n){ + if (n && n.parentNode && n.tagName != 'BODY') { + n.parentNode.removeChild(n); + } + }, + 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; + }, + isEmpty: function(v, allowBlank){ + return v === null || v === undefined || (!allowBlank ? v === '' : false); + }, + value: function(v, defaultValue, allowBlank){ + return Ext.isEmpty(v, allowBlank) ? defaultValue : v; + }, + isArray: function(v){ + return v && typeof v.length == 'number' && typeof v.splice == 'function'; + }, + isDate: function(v){ + return v && typeof v.getFullYear == 'function'; + }, + copyTo: function(dest, source, names){ + if (typeof names == 'string') { + names = names.split(/[,;\s]/); + } + for (var i = 0, len = names.length; i < len; i++) { + var n = names[i]; + if (source.hasOwnProperty(n)) { + dest[n] = source[n]; + } + } + return dest; + }, + isOpera: isOpera, + isSafari: isSafari, + isSafari3: isSafari3, + isSafari2: isSafari && !isSafari3, + isIE: isIE, + isIE6: isIE && !isIE7, + isIE7: isIE7, + isGecko: isGecko, + isGecko2: isGecko && !isGecko3, + isGecko3: isGecko3, + isBorderBox: isBorderBox, + isLinux: isLinux, + isWindows: isWindows, + isMac: isMac, + isAir: isAir, + useShims: ((isIE && !isIE7) || (isMac && isGecko && !isGecko3)) + }); + 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", "Ext.chart"); +Ext.apply(Function.prototype, { + createCallback: function(){ + var args = arguments; + var method = this; + return function(){ + return method.apply(window, args); + }; + }, + 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); + var applyArgs = [appendArgs, 0].concat(args); + Array.prototype.splice.apply(callArgs, applyArgs); + } + return method.apply(obj || window, callArgs); + }; + }, + defer: function(millis, obj, args, appendArgs){ + var fn = this.createDelegate(obj, args, appendArgs); + if (millis) { + return setTimeout(fn, millis); + } + fn(); + return 0; + }, + 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; + }; + }, + 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); + }; + } +}); +Ext.applyIf(String, { + escape: function(string){ + return string.replace(/('|\\)/g, "\\$1"); + }, + leftPad: function(val, size, ch){ + var result = new String(val); + if (!ch) { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result.toString(); + }, + format: function(format){ + var args = Array.prototype.slice.call(arguments, 1); + return format.replace(/\{(\d+)\}/g, function(m, i){ + return args[i]; + }); + } +}); +String.prototype.toggle = function(value, other){ + return this == value ? other : value; +}; +String.prototype.trim = function(){ + var re = /^\s+|\s+$/g; + return function(){ + return this.replace(re, ""); + }; +}(); +Ext.applyIf(Number.prototype, { + constrain: function(min, max){ + return Math.min(Math.max(this, min), max); + } +}); +Ext.applyIf(Array.prototype, { + indexOf: function(o){ + for (var i = 0, len = this.length; i < len; i++) { + if (this[i] == o) + return i; + } + return -1; + }, + remove: function(o){ + var index = this.indexOf(o); + if (index != -1) { + this.splice(index, 1); + } + return this; + } +}); +Date.prototype.getElapsed = function(date){ + return Math.abs((date || new Date()).getTime() - this.getTime()); +}; - -Ext={version:'3.0'};window["undefined"]=window["undefined"];Ext.apply=function(o,c,defaults){if(defaults){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,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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];}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor: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==oc){spp.constructor=sp;} -sb.override=function(o){Ext.override(sb,o);};sbp.superclass=sbp.supr=(function(){return spp;});sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};return sb;};}(),extendX:function(supr,fn){return Ext.extend(supr,fn(supr.prototype));},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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} -var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=='undefined'){buf.push(k,"=&");}else if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&");}else if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else{buf.push(k,"=&");}}} -buf.pop();return buf.join("");},urlDecode:function(string,overwrite){if(!string||!string.length){return{};} -var obj={};var pairs=string.split('&');var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split('=');name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value;}else if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value);}else{obj[name].push(value);}}else{obj[name]=value;}} -return obj;},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array];} -for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else{r.push(a);}} -return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[]);}else{cb.apply(scope,args||[]);}}},getDom:function(el){if(!el||!document){return null;} -return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'||isNaN(v)){return defaultValue;} -return v;},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=='function'){as.destroy();} -else if(as.dom){as.removeAllListeners();as.remove();}}}},destroyMembers:function(o,arg1,arg2,etc){for(var i=1,a=arguments,len=a.length;i<len;i++){Ext.destroy(o[a[i]]);delete o[a[i]];}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!='BODY'){d=d||document.createElement('div');d.appendChild(n);d.innerHTML='';}}}():function(n){if(n&&n.parentNode&&n.tagName!='BODY'){n.parentNode.removeChild(n);}},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;},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==='':false);},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v;},isArray:function(v){return v&&typeof v.length=='number'&&typeof v.splice=='function';},isDate:function(v){return v&&typeof v.getFullYear=='function';},copyTo:function(dest,source,names){if(typeof names=='string'){names=names.split(/[,;\s]/);} -for(var i=0,len=names.length;i<len;i++){var n=names[i];if(source.hasOwnProperty(n)){dest[n]=source[n];}} -return dest;},intercept:function(o,name,fn,scope){o[name]=o[name].createInterceptor(fn,scope);},sequence:function(o,name,fn,scope){o[name]=o[name].createSequence(fn,scope);},isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart","Ext.direct");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} -return method.apply(obj||window,callArgs);};},defer:function(millis,obj,args,appendArgs){var fn=this.createDelegate(obj,args,appendArgs);if(millis){return setTimeout(fn,millis);} -fn();return 0;},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;};},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);};}});Ext.applyIf(String,{escape:function(string){return string.replace(/('|\\)/g,"\\$1");},leftPad:function(val,size,ch){var result=new String(val);if(!ch){ch=" ";} -while(result.length<size){result=ch+result;} -return result.toString();},format:function(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(/\{(\d+)\}/g,function(m,i){return args[i];});}});String.prototype.toggle=function(value,other){return this==value?other:value;};String.prototype.trim=function(){var re=/^\s+|\s+$/g;return function(){return this.replace(re,"");};}();Ext.applyIf(Number.prototype,{constrain:function(min,max){return Math.min(Math.max(this,min),max);}});Ext.applyIf(Array.prototype,{indexOf:function(o){for(var i=0,len=this.length;i<len;i++){if(this[i]==o)return i;} -return-1;},remove:function(o){var index=this.indexOf(o);if(index!=-1){this.splice(index,1);} -return this;}});Date.prototype.getElapsed=function(date){return Math.abs((date||new Date()).getTime()-this.getTime());}; - -(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.isStrict&&!Ext.isOpera){return document.body.clientWidth;} -else if(Ext.isIE){return document.documentElement.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]);}};Ext.lib.Event=function(){var loadComplete=false;var listeners=[];var unloadListeners=[];var retryCount=0;var onAvailStack=[];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;} -var li=[el,eventName,fn,fn];var index=listeners.length;listeners[index]=li;this.doAdd(el,eventName,fn,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){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){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){if(!hs||!hs['Content-Type']){this.initHeader('Content-Type','text/xml',false);} -method=(method?method:(options.method?options.method:'POST'));data=options.xmlData;}else if(options.jsonData){if(!hs||!hs['Content-Type']){this.initHeader('Content-Type','application/json',false);} -method=(method?method:(options.method?options.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){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; charset=UTF-8',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.hasHeaders||!this.headers['Content-Type'])){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&®ion.right<=this.right&®ion.top>=this.top&®ion.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(Ext.isArray(x)){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){return this.run(el,args,duration,easing,cb,scope,Ext.lib.Scroll);},motion:function(el,args,duration,easing,cb,scope){return this.run(el,args,duration,easing,cb,scope,Ext.lib.Motion);},color:function(el,args,duration,easing,cb,scope){return 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&&!Ext.isArray(control[0])){control=[control];}else{var tmp=[];for(i=0,len=control.length;i<len;++i){tmp[i]=control[i];} -control=tmp;} -Ext.fly(el,'_anim').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);}};})();})(); +(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.isStrict && !Ext.isOpera) { + return document.body.clientWidth; + } + else + if (Ext.isIE) { + return document.documentElement.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]); + } + }; + Ext.lib.Event = function(){ + var loadComplete = false; + var listeners = []; + var unloadListeners = []; + var retryCount = 0; + var onAvailStack = []; + 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; + } + var li = [el, eventName, fn, fn]; + var index = listeners.length; + listeners[index] = li; + this.doAdd(el, eventName, fn, 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){ + 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) { + 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) { + if (!hs || !hs['Content-Type']) { + this.initHeader('Content-Type', 'text/xml', false); + } + method = (method ? method : (options.method ? options.method : 'POST')); + data = options.xmlData; + } + else + if (options.jsonData) { + if (!hs || !hs['Content-Type']) { + this.initHeader('Content-Type', 'application/json', false); + } + method = (method ? method : (options.method ? options.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) { + 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; charset=UTF-8', + 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.hasHeaders || !this.headers['Content-Type'])) { + 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 (Ext.isArray(x)) { + 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){ + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Scroll); + }, + motion: function(el, args, duration, easing, cb, scope){ + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); + }, + color: function(el, args, duration, easing, cb, scope){ + return 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 && !Ext.isArray(control[0])) { + control = [control]; + } + else { + var tmp = []; + for (i = 0, len = control.length; i < len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + Ext.fly(el, '_anim').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); + } + }; + })(); +})(); Modified: mickael/trunk/ext/v3.0.0-a1/adapter/jquery/ext-jquery-adapter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/adapter/jquery/ext-jquery-adapter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/adapter/jquery/ext-jquery-adapter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,21 +9,21 @@ Ext={version:'3.0'};window["undefined"]=window["undefined"];Ext.apply=function(o,c,defaults){if(defaults){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,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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){}} +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),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isGecko3=!isSafari&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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];}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor: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==oc){spp.constructor=sp;} -sb.override=function(o){Ext.override(sb,o);};sbp.superclass=sbp.supr=(function(){return spp;});sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};return sb;};}(),extendX:function(supr,fn){return Ext.extend(supr,fn(supr.prototype));},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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} +sb.override=function(o){Ext.override(sb,o);};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=='undefined'){buf.push(k,"=&");}else if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&");}else if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else{buf.push(k,"=&");}}} buf.pop();return buf.join("");},urlDecode:function(string,overwrite){if(!string||!string.length){return{};} var obj={};var pairs=string.split('&');var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split('=');name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value;}else if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value);}else{obj[name].push(value);}}else{obj[name]=value;}} return obj;},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array];} for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else{r.push(a);}} return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[]);}else{cb.apply(scope,args||[]);}}},getDom:function(el){if(!el||!document){return null;} -return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'||isNaN(v)){return defaultValue;} +return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'){return defaultValue;} return v;},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=='function'){as.destroy();} else if(as.dom){as.removeAllListeners();as.remove();}}}},destroyMembers:function(o,arg1,arg2,etc){for(var i=1,a=arguments,len=a.length;i<len;i++){Ext.destroy(o[a[i]]);delete o[a[i]];}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!='BODY'){d=d||document.createElement('div');d.appendChild(n);d.innerHTML='';}}}():function(n){if(n&&n.parentNode&&n.tagName!='BODY'){n.parentNode.removeChild(n);}},type:function(o){if(o===undefined||o===null){return false;} if(o.htmlElement){return'element';} @@ -32,7 +32,7 @@ if(typeof o.length=='number'&&typeof o.item=='function'){return'nodelist';}} return t;},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==='':false);},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v;},isArray:function(v){return v&&typeof v.length=='number'&&typeof v.splice=='function';},isDate:function(v){return v&&typeof v.getFullYear=='function';},copyTo:function(dest,source,names){if(typeof names=='string'){names=names.split(/[,;\s]/);} for(var i=0,len=names.length;i<len;i++){var n=names[i];if(source.hasOwnProperty(n)){dest[n]=source[n];}} -return dest;},intercept:function(o,name,fn,scope){o[name]=o[name].createInterceptor(fn,scope);},sequence:function(o,name,fn,scope){o[name]=o[name].createSequence(fn,scope);},isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart","Ext.direct");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} +return dest;},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} return method.apply(obj||window,callArgs);};},defer:function(millis,obj,args,appendArgs){var fn=this.createDelegate(obj,args,appendArgs);if(millis){return setTimeout(fn,millis);} fn();return 0;},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;};},createInterceptor:function(fcn,scope){if(typeof fcn!="function"){return this;} Modified: mickael/trunk/ext/v3.0.0-a1/adapter/prototype/ext-prototype-adapter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/adapter/prototype/ext-prototype-adapter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/adapter/prototype/ext-prototype-adapter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,21 +9,21 @@ Ext={version:'3.0'};window["undefined"]=window["undefined"];Ext.apply=function(o,c,defaults){if(defaults){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,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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){}} +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),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isGecko3=!isSafari&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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];}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor: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==oc){spp.constructor=sp;} -sb.override=function(o){Ext.override(sb,o);};sbp.superclass=sbp.supr=(function(){return spp;});sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};return sb;};}(),extendX:function(supr,fn){return Ext.extend(supr,fn(supr.prototype));},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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} +sb.override=function(o){Ext.override(sb,o);};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=='undefined'){buf.push(k,"=&");}else if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&");}else if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else{buf.push(k,"=&");}}} buf.pop();return buf.join("");},urlDecode:function(string,overwrite){if(!string||!string.length){return{};} var obj={};var pairs=string.split('&');var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split('=');name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value;}else if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value);}else{obj[name].push(value);}}else{obj[name]=value;}} return obj;},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array];} for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else{r.push(a);}} return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[]);}else{cb.apply(scope,args||[]);}}},getDom:function(el){if(!el||!document){return null;} -return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'||isNaN(v)){return defaultValue;} +return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'){return defaultValue;} return v;},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=='function'){as.destroy();} else if(as.dom){as.removeAllListeners();as.remove();}}}},destroyMembers:function(o,arg1,arg2,etc){for(var i=1,a=arguments,len=a.length;i<len;i++){Ext.destroy(o[a[i]]);delete o[a[i]];}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!='BODY'){d=d||document.createElement('div');d.appendChild(n);d.innerHTML='';}}}():function(n){if(n&&n.parentNode&&n.tagName!='BODY'){n.parentNode.removeChild(n);}},type:function(o){if(o===undefined||o===null){return false;} if(o.htmlElement){return'element';} @@ -32,7 +32,7 @@ if(typeof o.length=='number'&&typeof o.item=='function'){return'nodelist';}} return t;},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==='':false);},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v;},isArray:function(v){return v&&typeof v.length=='number'&&typeof v.splice=='function';},isDate:function(v){return v&&typeof v.getFullYear=='function';},copyTo:function(dest,source,names){if(typeof names=='string'){names=names.split(/[,;\s]/);} for(var i=0,len=names.length;i<len;i++){var n=names[i];if(source.hasOwnProperty(n)){dest[n]=source[n];}} -return dest;},intercept:function(o,name,fn,scope){o[name]=o[name].createInterceptor(fn,scope);},sequence:function(o,name,fn,scope){o[name]=o[name].createSequence(fn,scope);},isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart","Ext.direct");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} +return dest;},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} return method.apply(obj||window,callArgs);};},defer:function(millis,obj,args,appendArgs){var fn=this.createDelegate(obj,args,appendArgs);if(millis){return setTimeout(fn,millis);} fn();return 0;},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;};},createInterceptor:function(fcn,scope){if(typeof fcn!="function"){return this;} Modified: mickael/trunk/ext/v3.0.0-a1/adapter/yui/ext-yui-adapter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/adapter/yui/ext-yui-adapter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/adapter/yui/ext-yui-adapter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,21 +9,21 @@ Ext={version:'3.0'};window["undefined"]=window["undefined"];Ext.apply=function(o,c,defaults){if(defaults){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,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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){}} +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),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isGecko3=!isSafari&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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];}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor: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==oc){spp.constructor=sp;} -sb.override=function(o){Ext.override(sb,o);};sbp.superclass=sbp.supr=(function(){return spp;});sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};return sb;};}(),extendX:function(supr,fn){return Ext.extend(supr,fn(supr.prototype));},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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} +sb.override=function(o){Ext.override(sb,o);};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=='undefined'){buf.push(k,"=&");}else if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&");}else if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else{buf.push(k,"=&");}}} buf.pop();return buf.join("");},urlDecode:function(string,overwrite){if(!string||!string.length){return{};} var obj={};var pairs=string.split('&');var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split('=');name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value;}else if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value);}else{obj[name].push(value);}}else{obj[name]=value;}} return obj;},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array];} for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else{r.push(a);}} return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[]);}else{cb.apply(scope,args||[]);}}},getDom:function(el){if(!el||!document){return null;} -return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'||isNaN(v)){return defaultValue;} +return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'){return defaultValue;} return v;},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=='function'){as.destroy();} else if(as.dom){as.removeAllListeners();as.remove();}}}},destroyMembers:function(o,arg1,arg2,etc){for(var i=1,a=arguments,len=a.length;i<len;i++){Ext.destroy(o[a[i]]);delete o[a[i]];}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!='BODY'){d=d||document.createElement('div');d.appendChild(n);d.innerHTML='';}}}():function(n){if(n&&n.parentNode&&n.tagName!='BODY'){n.parentNode.removeChild(n);}},type:function(o){if(o===undefined||o===null){return false;} if(o.htmlElement){return'element';} @@ -32,7 +32,7 @@ if(typeof o.length=='number'&&typeof o.item=='function'){return'nodelist';}} return t;},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==='':false);},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v;},isArray:function(v){return v&&typeof v.length=='number'&&typeof v.splice=='function';},isDate:function(v){return v&&typeof v.getFullYear=='function';},copyTo:function(dest,source,names){if(typeof names=='string'){names=names.split(/[,;\s]/);} for(var i=0,len=names.length;i<len;i++){var n=names[i];if(source.hasOwnProperty(n)){dest[n]=source[n];}} -return dest;},intercept:function(o,name,fn,scope){o[name]=o[name].createInterceptor(fn,scope);},sequence:function(o,name,fn,scope){o[name]=o[name].createSequence(fn,scope);},isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart","Ext.direct");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} +return dest;},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} return method.apply(obj||window,callArgs);};},defer:function(millis,obj,args,appendArgs){var fn=this.createDelegate(obj,args,appendArgs);if(millis){return setTimeout(fn,millis);} fn();return 0;},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;};},createInterceptor:function(fcn,scope){if(typeof fcn!="function"){return this;} Added: mickael/trunk/ext/v3.0.0-a1/air/README.txt =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/README.txt (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/README.txt 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,8 @@ +The ext-air.js file should be included AFTER ext-all.js. + +The resources/ext-air.css file should be included AFTER ext-all.css. + +XTemplates must be loaded inline while the js file loads (not in an onready block) when used in the application sandbox. Take a look at samples/tasks/js/Templates.js for an example. + +For additional date formats other than the ones defined in src/ext-air-adapter.js, you will need to specify them inline similar to XTemplates using Date.precompileFormats(). For multiple formats, separate them with the | character. + Added: mickael/trunk/ext/v3.0.0-a1/air/air.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/air.jsb (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/air.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,379 @@ +<?xml version="1.0" encoding="utf-8"?> +<project path="" name="Ext AIR Support Library" author="Ext JS, LLC" version="0.20" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="C:\apps\www\deploy\ext-2.0.2\air\" source="True" source-dir="$output" minify="False" min-dir="$output\build" doc="False" doc-dir="$output\docs" master="true" master-file="$output\yui-ext.js" zip="true" zip-file="$output\yuo-ext.$version.zip"> + <directory name="" /> + <file name="resources\icons\extlogo128.png" path="resources\icons" /> + <file name="resources\icons\extlogo16.png" path="resources\icons" /> + <file name="resources\icons\extlogo32.png" path="resources\icons" /> + <file name="resources\icons\extlogo48.png" path="resources\icons" /> + <file name="resources\icons\extlogo64.png" path="resources\icons" /> + <file name="resources\images\left-corners.png" path="resources\images" /> + <file name="resources\images\left-right.png" path="resources\images" /> + <file name="resources\images\right-corners.png" path="resources\images" /> + <file name="resources\images\top-bottom.png" path="resources\images" /> + <file name="resources\air-resources.jsb" path="resources" /> + <file name="resources\ext-air.css" path="resources" /> + <file name="samples\tasks\ext-2.0\resources\css\ext-all.css" path="samples\tasks\ext-2.0\resources\css" /> + <file name="samples\tasks\ext-2.0\resources\css\xtheme-gray.css" path="samples\tasks\ext-2.0\resources\css" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\corners-blue.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\corners.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\l-blue.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\l.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\r-blue.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\r.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\tb-blue.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\box\tb.gif" path="samples\tasks\ext-2.0\resources\images\default\box" /> + <file name="samples\tasks\ext-2.0\resources\images\default\button\btn-arrow.gif" path="samples\tasks\ext-2.0\resources\images\default\button" /> + <file name="samples\tasks\ext-2.0\resources\images\default\button\btn-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\button" /> + <file name="samples\tasks\ext-2.0\resources\images\default\dd\drop-add.gif" path="samples\tasks\ext-2.0\resources\images\default\dd" /> + <file name="samples\tasks\ext-2.0\resources\images\default\dd\drop-no.gif" path="samples\tasks\ext-2.0\resources\images\default\dd" /> + <file name="samples\tasks\ext-2.0\resources\images\default\dd\drop-yes.gif" path="samples\tasks\ext-2.0\resources\images\default\dd" /> + <file name="samples\tasks\ext-2.0\resources\images\default\editor\tb-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\editor" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\clear-trigger.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\clear-trigger.psd" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\date-trigger.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\date-trigger.psd" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\error-tip-corners.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\exclamation.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\search-trigger.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\search-trigger.psd" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\text-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\trigger-tpl.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\trigger.gif" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\form\trigger.psd" path="samples\tasks\ext-2.0\resources\images\default\form" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\arrow-left-white.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\arrow-right-white.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\col-move-bottom.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\col-move-top.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\columns.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\dirty.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\done.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\drop-no.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\drop-yes.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\footer-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid-blue-hd.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid-blue-split.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid-hrow.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid-loading.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid-split.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid-vista-hd.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid3-hd-btn.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid3-hrow-over.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid3-hrow.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid3-special-col-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\grid3-special-col-sel-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\group-by.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\group-expand-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hd-pop.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hmenu-asc.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hmenu-desc.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hmenu-lock.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hmenu-lock.png" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hmenu-unlock.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\hmenu-unlock.png" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\invalid_line.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\loading.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\mso-hd.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\nowait.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-first-disabled.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-first.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-last-disabled.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-last.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-next-disabled.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-next.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-prev-disabled.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\page-prev.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\pick-button.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\refresh.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\row-check-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\row-expand-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\row-over.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\row-sel.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\sort_asc.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\sort_desc.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\Thumbs.db" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\grid\wait.gif" path="samples\tasks\ext-2.0\resources\images\default\grid" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\collapse.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\expand.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\gradient-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\mini-bottom.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\mini-left.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\mini-right.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\mini-top.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\ns-collapse.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\ns-expand.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\panel-close.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\panel-title-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\panel-title-light-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\stick.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\stuck.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\tab-close-on.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\layout\tab-close.gif" path="samples\tasks\ext-2.0\resources\images\default\layout" /> + <file name="samples\tasks\ext-2.0\resources\images\default\menu\checked.gif" path="samples\tasks\ext-2.0\resources\images\default\menu" /> + <file name="samples\tasks\ext-2.0\resources\images\default\menu\group-checked.gif" path="samples\tasks\ext-2.0\resources\images\default\menu" /> + <file name="samples\tasks\ext-2.0\resources\images\default\menu\item-over.gif" path="samples\tasks\ext-2.0\resources\images\default\menu" /> + <file name="samples\tasks\ext-2.0\resources\images\default\menu\menu-parent.gif" path="samples\tasks\ext-2.0\resources\images\default\menu" /> + <file name="samples\tasks\ext-2.0\resources\images\default\menu\menu.gif" path="samples\tasks\ext-2.0\resources\images\default\menu" /> + <file name="samples\tasks\ext-2.0\resources\images\default\menu\unchecked.gif" path="samples\tasks\ext-2.0\resources\images\default\menu" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\corners-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\left-right.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\light-hd.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\tool-sprite-tpl.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\tool-sprites.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\tools-sprites-trans.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\top-bottom.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\top-bottom.png" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\white-corners-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\white-left-right.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\panel\white-top-bottom.gif" path="samples\tasks\ext-2.0\resources\images\default\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\default\progress\progress-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\progress" /> + <file name="samples\tasks\ext-2.0\resources\images\default\qtip\bg.gif" path="samples\tasks\ext-2.0\resources\images\default\qtip" /> + <file name="samples\tasks\ext-2.0\resources\images\default\qtip\close.gif" path="samples\tasks\ext-2.0\resources\images\default\qtip" /> + <file name="samples\tasks\ext-2.0\resources\images\default\qtip\tip-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\qtip" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\blue-loading.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\calendar.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\glass-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\hd-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\large-loading.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\left-btn.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\loading-balls.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\right-btn.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shared\warning.gif" path="samples\tasks\ext-2.0\resources\images\default\shared" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\e-handle-dark.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\e-handle.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\ne-handle-dark.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\ne-handle.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\nw-handle-dark.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\nw-handle.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\s-handle-dark.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\s-handle.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\se-handle-dark.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\se-handle.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\square.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\sw-handle-dark.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\sizer\sw-handle.gif" path="samples\tasks\ext-2.0\resources\images\default\sizer" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\scroll-left.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\scroll-right.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\scroller-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-btm-inactive-left-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-btm-inactive-right-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-btm-left-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-btm-right-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-close.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-strip-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-strip-bg.png" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tab-strip-btm-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tabs\tabs-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\bg.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\btn-arrow-light.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\btn-arrow.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\btn-over-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\gray-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\tb-bg.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\toolbar\tb-btn-sprite.gif" path="samples\tasks\ext-2.0\resources\images\default\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\arrows.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\drop-add.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\drop-between.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\drop-no.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\drop-over.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\drop-under.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\drop-yes.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-end-minus-nl.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-end-minus.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-end-plus-nl.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-end-plus.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-end.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-line.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-minus-nl.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-minus.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-plus-nl.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow-plus.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\elbow.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\folder-open.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\folder.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\leaf.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\loading.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\tree\s.gif" path="samples\tasks\ext-2.0\resources\images\default\tree" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\icon-error.gif" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\icon-info.gif" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\icon-question.gif" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\icon-warning.gif" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\left-corners.png" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\left-corners.psd" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\left-right.png" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\left-right.psd" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\right-corners.png" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\right-corners.psd" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\top-bottom.png" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\window\top-bottom.psd" path="samples\tasks\ext-2.0\resources\images\default\window" /> + <file name="samples\tasks\ext-2.0\resources\images\default\gradient-bg.gif" path="samples\tasks\ext-2.0\resources\images\default" /> + <file name="samples\tasks\ext-2.0\resources\images\default\s.gif" path="samples\tasks\ext-2.0\resources\images\default" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shadow-c.png" path="samples\tasks\ext-2.0\resources\images\default" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shadow-lr.png" path="samples\tasks\ext-2.0\resources\images\default" /> + <file name="samples\tasks\ext-2.0\resources\images\default\shadow.png" path="samples\tasks\ext-2.0\resources\images\default" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\button\btn-arrow.gif" path="samples\tasks\ext-2.0\resources\images\gray\button" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\button\btn-sprite.gif" path="samples\tasks\ext-2.0\resources\images\gray\button" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\corners-sprite.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\left-right.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\light-hd.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\tool-sprite-tpl.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\tool-sprites.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\tools-sprites-trans.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\top-bottom.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\top-bottom.png" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\white-corners-sprite.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\white-left-right.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\panel\white-top-bottom.gif" path="samples\tasks\ext-2.0\resources\images\gray\panel" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\qtip\bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\qtip" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\qtip\close.gif" path="samples\tasks\ext-2.0\resources\images\gray\qtip" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\qtip\tip-sprite.gif" path="samples\tasks\ext-2.0\resources\images\gray\qtip" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\scroll-left.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\scroll-right.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\scroller-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-btm-inactive-left-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-btm-inactive-right-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-btm-left-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-btm-right-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-close.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-strip-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-strip-bg.png" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tab-strip-btm-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\tabs\tabs-sprite.gif" path="samples\tasks\ext-2.0\resources\images\gray\tabs" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\btn-arrow-light.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\btn-arrow.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\btn-over-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\gray-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\tb-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\toolbar\tb-btn-sprite.gif" path="samples\tasks\ext-2.0\resources\images\gray\toolbar" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\icon-error.gif" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\icon-info.gif" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\icon-question.gif" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\icon-warning.gif" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\left-corners.png" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\left-corners.pspimage" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\left-right.png" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\right-corners.png" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\window\top-bottom.png" path="samples\tasks\ext-2.0\resources\images\gray\window" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\gradient-bg.gif" path="samples\tasks\ext-2.0\resources\images\gray" /> + <file name="samples\tasks\ext-2.0\resources\images\gray\s.gif" path="samples\tasks\ext-2.0\resources\images\gray" /> + <file name="samples\tasks\ext-2.0\resources\license.txt" path="samples\tasks\ext-2.0\resources" /> + <file name="samples\tasks\ext-air\resources\icons\extlogo128.png" path="samples\tasks\ext-air\resources\icons" /> + <file name="samples\tasks\ext-air\resources\icons\extlogo16.png" path="samples\tasks\ext-air\resources\icons" /> + <file name="samples\tasks\ext-air\resources\icons\extlogo32.png" path="samples\tasks\ext-air\resources\icons" /> + <file name="samples\tasks\ext-air\resources\icons\extlogo48.png" path="samples\tasks\ext-air\resources\icons" /> + <file name="samples\tasks\ext-air\resources\icons\extlogo64.png" path="samples\tasks\ext-air\resources\icons" /> + <file name="samples\tasks\ext-air\resources\images\left-corners.png" path="samples\tasks\ext-air\resources\images" /> + <file name="samples\tasks\ext-air\resources\images\left-right.png" path="samples\tasks\ext-air\resources\images" /> + <file name="samples\tasks\ext-air\resources\images\right-corners.png" path="samples\tasks\ext-air\resources\images" /> + <file name="samples\tasks\ext-air\resources\images\top-bottom.png" path="samples\tasks\ext-air\resources\images" /> + <file name="samples\tasks\ext-air\resources\air-resources.jsb" path="samples\tasks\ext-air\resources" /> + <file name="samples\tasks\ext-air\resources\ext-air.css" path="samples\tasks\ext-air\resources" /> + <file name="samples\tasks\images\bell.png" path="samples\tasks\images" /> + <file name="samples\tasks\images\check.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\delete.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\edit.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\hd-check.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\hrow.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-active.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-all.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-by-category.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-by-date.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-complete.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-delete-task.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-filter.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-folder-delete.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-folder-new.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-folder.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-list-delete.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-list-new.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-list.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-mark-active.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-mark-complete.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-multi-list.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-no-group.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-paste-new.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-show-active.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-show-all.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\icon-show-complete.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\my-lists.png" path="samples\tasks\images" /> + <file name="samples\tasks\images\panel-header.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\rbtn.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\reminder-hd.png" path="samples\tasks\images" /> + <file name="samples\tasks\images\s.gif" path="samples\tasks\images" /> + <file name="samples\tasks\images\save.gif" path="samples\tasks\images" /> + <file name="samples\tasks\.project" path="samples\tasks" /> + <file name="samples\tasks\about.html" path="samples\tasks" /> + <file name="samples\tasks\application.xml" path="samples\tasks" /> + <file name="samples\tasks\beep.mp3" path="samples\tasks" /> + <file name="samples\tasks\LICENSE.TXT" path="samples\tasks" /> + <file name="samples\tasks\main.css" path="samples\tasks" /> + <file name="samples\tasks\main.html" path="samples\tasks" /> + <file name="samples\tasks\mimetype" path="samples\tasks" /> + <file name="samples\tasks\preferences.css" path="samples\tasks" /> + <file name="samples\tasks\preferences.html" path="samples\tasks" /> + <file name="samples\tasks\reminder.css" path="samples\tasks" /> + <file name="samples\tasks\reminder.html" path="samples\tasks" /> + <file name="samples\tasks\STasks2.air" path="samples\tasks" /> + <file name="samples\tasks\task.css" path="samples\tasks" /> + <file name="samples\tasks\task.html" path="samples\tasks" /> + <file name="samples\tasks\tasks.db" path="samples\tasks" /> + <file name="src\air.jsb" path="src" /> + <file name="air.jsb" path="" /> + <file name="README.txt" path="" /> + <target name="ext-air" file="$output\ext-air.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="src\ext-air-adapter.js" /> + <include name="src\FileProvider.js" /> + <include name="src\MainWindow.js" /> + <include name="src\NativeObservable.js" /> + <include name="src\NativeWindow.js" /> + <include name="src\sql\Connection.js" /> + <include name="src\sql\Table.js" /> + <include name="src\sql\Proxy.js" /> + <include name="src\sql\AirConnection.js" /> + <include name="src\SystemTray.js" /> + <include name="src\NativeDD.js" /> + <include name="src\Sound.js" /> + <include name="src\SystemMenu.js" /> + </target> + <file name="samples\tasks\adobe\AIRAliases.js" path="samples\tasks\adobe" /> + <file name="samples\tasks\adobe\AIRIntrospector.js" path="samples\tasks\adobe" /> + <file name="samples\tasks\ext-2.0\adapter\ext\ext-base.js" path="samples\tasks\ext-2.0\adapter\ext" /> + <file name="samples\tasks\ext-2.0\ext-all.js" path="samples\tasks\ext-2.0" /> + <file name="samples\tasks\ext-air\ext-air-debug.js" path="samples\tasks\ext-air" /> + <file name="samples\tasks\ext-air\ext-air.js" path="samples\tasks\ext-air" /> + <file name="samples\tasks\js\columns.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\data.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\DateTimeField.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\Exporter.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\ext-config.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\Importer.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\ListLoader.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\ListSelector.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\ListStore.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\ListTree.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\Reminder.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\SelectBox.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\SwitchButton.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\TaskGrid.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\TaskStore.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\TaskWindow.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\Templates.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\TextDate.js" path="samples\tasks\js" /> + <file name="samples\tasks\js\TreeSelector.js" path="samples\tasks\js" /> + <file name="samples\tasks\main.js" path="samples\tasks" /> + <file name="samples\tasks\preferences.js" path="samples\tasks" /> + <file name="samples\tasks\reminder.js" path="samples\tasks" /> + <file name="samples\tasks\task.js" path="samples\tasks" /> + <file name="src\sql\AirConnection.js" path="src\sql" /> + <file name="src\sql\Connection.js" path="src\sql" /> + <file name="src\sql\Proxy.js" path="src\sql" /> + <file name="src\sql\Table.js" path="src\sql" /> + <file name="src\ext-air-adapter.js" path="src" /> + <file name="src\FileProvider.js" path="src" /> + <file name="src\NativeDD.js" path="src" /> + <file name="src\NativeObservable.js" path="src" /> + <file name="src\NativeWindow.js" path="src" /> + <file name="src\Sound.js" path="src" /> + <file name="src\SystemMenu.js" path="src" /> + <file name="src\SystemTray.js" path="src" /> +</project> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/resources/air-resources.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/resources/air-resources.jsb (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/resources/air-resources.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="utf-8"?> +<project path="" name="Ext - JS Lib" author="Ext JS, LLC" version="2.0.2" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="$project\..\samples\tasks\ext-air\resources\" source="true" source-dir="$output" minify="False" min-dir="$output\build" doc="False" doc-dir="$output\docs" master="true" master-file="$output\yui-ext.js" zip="true" zip-file="$output\yuo-ext.$version.zip"> + <directory name="" /> + <file name="icons\extlogo128.png" path="icons" /> + <file name="icons\extlogo16.png" path="icons" /> + <file name="icons\extlogo32.png" path="icons" /> + <file name="icons\extlogo64.png" path="icons" /> + <file name="images\left-corners.png" path="images" /> + <file name="images\left-right.png" path="images" /> + <file name="images\right-corners.png" path="images" /> + <file name="images\top-bottom.png" path="images" /> + <file name="air-resources.jsb" path="" /> + <file name="ext-air.css" path="" /> + <file name="icons\extlogo48.png" path="icons" /> +</project> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/resources/ext-air.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/resources/ext-air.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/resources/ext-air.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,93 @@ +body.x-air-window { + background:transparent !important; + height:100%; +} + +.x-air.x-window-tc { + background: transparent url(images/top-bottom.png) repeat-x 0 0; + padding-top:11px; +} +.x-air.x-window-bc .x-air.x-window-footer { + background: transparent url(images/top-bottom.png) repeat-x 0 bottom; + padding-bottom:15px; +} +.x-panel-nofooter .x-air.x-window-bc { + background: transparent url(images/top-bottom.png) repeat-x 0 bottom; + height:15px; +} +.x-air.x-window-tr { + background: transparent url(images/right-corners.png) no-repeat right 0; + padding-right:15px; +} +.x-air.x-window-br { + background: transparent url(images/right-corners.png) no-repeat right bottom; + padding-right:15px; +} + +.x-air.x-window-tl { + background: transparent url(images/left-corners.png) no-repeat 0 0; + padding-left:15px; +} +.x-air.x-window-bl { + background: transparent url(images/left-corners.png) no-repeat 0 bottom; + padding-left:15px; +} + +.x-air.x-window-mr { + background: transparent url(images/left-right.png) repeat-y right 0; + padding-right:15px; +} + +.x-air.x-window-ml { + background: transparent url(images/left-right.png) repeat-y 0 0; + padding-left:15px; +} +.x-air.x-resizable-handle{ + margin:7px; +} + +.x-air.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-air.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; +} + + +.ext-safari .x-small-editor .x-form-field { + /* safari text field will not size so needs bigger font */ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-menu-sep { + overflow:hidden; + height:1px; + margin: 1px 3px; +} + +.x-layout-split, .x-splitbar-h, .x-splitbar-v, .x-layout-split-north, .x-layout-split-east, .x-layout-split-west, .x-layout-split-south { + cursor:move !important; +} + +.x-grid3:not(input) { + -khtml-user-select: none; +} +.x-tree:not(input) { + -khtml-user-select: none; +} +.x-panel:not(input) { + -khtml-user-select: none; +} +.x-panel .x-panel-body textarea { + -khtml-user-select: normal; +} + Added: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo128.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo128.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo16.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo32.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo48.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo48.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo64.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/icons/extlogo64.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/images/left-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/images/left-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/images/left-right.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/images/left-right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/images/right-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/images/right-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/resources/images/top-bottom.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/resources/images/top-bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/.project =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/.project (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/.project 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<projectDescription> + <name>Simple Tasks v2</name> + <comment></comment> + <projects> + </projects> + <buildSpec> + </buildSpec> + <natures> + <nature>com.aptana.ide.apollo.apollonature</nature> + </natures> +</projectDescription> Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/LICENSE.TXT =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/LICENSE.TXT (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/LICENSE.TXT 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,6 @@ +Simple Tasks v2 +Copyright 2008 - Ext JS, LLC + +Distributed under the terms of the GNU GPL v3. +http://www.gnu.org/licenses/gpl-3.0.html + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/STasks2.air =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/STasks2.air ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/about.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/about.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/about.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,21 @@ +<html> +<head> + <title>About Simple Tasks</title> +</head> +<body style="background-color:#DFE8F6;font-size:11px;font-family:helvetica,arial,tahoma,sans-serif;"> + +<div style="float:left;width:128px;padding:20px;"> + <img src="ext-air/resources/icons/extlogo128.png"/> +</div> +<div style="float:left;width:150px;padding-top:40px;"> + <span style="font-size:16px;">Simple Tasks v2</span><br/><br/> + Copyright © 2008 - Ext JS, LLC<br/> + <a href="http://extjs.com/" target="_blank">http://extjs.com/</a><br/><br/> +</div> +<div style="clear:left;padding:0 20px 20px;"> + Simple Tasks and associated source code is licensed under the GNU General Public License version 3 (GPL v3).<br/> + <a href="http://www.gnu.org/copyleft/gpl.html" target="_blank">http://www.gnu.org/copyleft/gpl.html</a> +</div> +<button onclick="window.nativeWindow.close();" style="font-weight:normal;width:70px;float:right;margin-right:15px;">OK</button> +</body> +</html> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRAliases.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRAliases.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRAliases.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,196 @@ +/* AIRAliases.js - Revision: 0.15 */ + +// Copyright (c) 2007. Adobe Systems Incorporated. +// 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 Adobe Systems Incorporated nor the names of its +// 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. + + +var air; +if (window.runtime) +{ + if (!air) air = {}; + // functions + air.trace = window.runtime.trace; + air.navigateToURL = window.runtime.flash.net.navigateToURL; + air.sendToURL = window.runtime.flash.net.sendToURL; + + + // file + air.File = window.runtime.flash.filesystem.File; + air.FileStream = window.runtime.flash.filesystem.FileStream; + air.FileMode = window.runtime.flash.filesystem.FileMode; + + // events + air.AsyncErrorEvent = window.runtime.flash.events.AsyncErrorEvent; + air.DataEvent = window.runtime.flash.events.DataEvent; + air.DRMAuthenticateEvent = window.runtime.flash.events.DRMAuthenticateEvent; + air.DRMStatusEvent = window.runtime.flash.events.DRMStatusEvent; + air.Event = window.runtime.flash.events.Event; + air.EventDispatcher = window.runtime.flash.events.EventDispatcher; + air.FileListEvent = window.runtime.flash.events.FileListEvent; + air.HTTPStatusEvent = window.runtime.flash.events.HTTPStatusEvent; + air.IOErrorEvent = window.runtime.flash.events.IOErrorEvent; + air.InvokeEvent = window.runtime.flash.events.InvokeEvent; + air.NetStatusEvent = window.runtime.flash.events.NetStatusEvent; + air.OutputProgressEvent = window.runtime.flash.events.OutputProgressEvent; + air.ProgressEvent = window.runtime.flash.events.ProgressEvent; + air.SecurityErrorEvent = window.runtime.flash.events.SecurityErrorEvent; + air.StatusEvent = window.runtime.flash.events.StatusEvent; + air.TimerEvent = window.runtime.flash.events.TimerEvent; + air.NativeDragEvent = window.runtime.flash.events.NativeDragEvent; + air.ActivityEvent = window.runtime.flash.events.ActivityEvent; + air.KeyboardEvent = window.runtime.flash.events.KeyboardEvent; + air.MouseEvent = window.runtime.flash.events.MouseEvent; + + // native window + air.NativeWindow = window.runtime.flash.display.NativeWindow; + air.NativeWindowDisplayState = window.runtime.flash.display.NativeWindowDisplayState; + air.NativeWindowInitOptions = window.runtime.flash.display.NativeWindowInitOptions; + air.NativeWindowSystemChrome = window.runtime.flash.display.NativeWindowSystemChrome; + air.NativeWindowResize = window.runtime.flash.display.NativeWindowResize; + air.NativeWindowType = window.runtime.flash.display.NativeWindowType; + + air.NativeWindowBoundsEvent = window.runtime.flash.events.NativeWindowBoundsEvent; + air.NativeWindowDisplayStateEvent = window.runtime.flash.events.NativeWindowDisplayStateEvent; + + // geom + air.Point = window.runtime.flash.geom.Point; + air.Rectangle = window.runtime.flash.geom.Rectangle; + air.Matrix = window.runtime.flash.geom.Matrix; + + // net + air.FileFilter = window.runtime.flash.net.FileFilter; + + air.LocalConnection = window.runtime.flash.net.LocalConnection; + air.NetConnection = window.runtime.flash.net.NetConnection; + + air.URLLoader = window.runtime.flash.net.URLLoader; + air.URLLoaderDataFormat = window.runtime.flash.net.URLLoaderDataFormat; + air.URLRequest = window.runtime.flash.net.URLRequest; + air.URLRequestDefaults = window.runtime.flash.net.URLRequestDefaults; + air.URLRequestHeader = window.runtime.flash.net.URLRequestHeader; + air.URLRequestMethod = window.runtime.flash.net.URLRequestMethod; + air.URLStream = window.runtime.flash.net.URLStream; + air.URLVariables = window.runtime.flash.net.URLVariables; + air.Socket = window.runtime.flash.net.Socket; + air.XMLSocket = window.runtime.flash.net.XMLSocket; + + air.Responder = window.runtime.flash.net.Responder; + air.ObjectEncoding = window.runtime.flash.net.ObjectEncoding; + + air.NetStream = window.runtime.flash.net.NetStream; + air.SharedObject = window.runtime.flash.net.SharedObject; + air.SharedObjectFlushStatus = window.runtime.flash.net.SharedObjectFlushStatus; + + // system + air.Capabilities = window.runtime.flash.system.Capabilities; + air.System = window.runtime.flash.system.System; + air.Security = window.runtime.flash.system.Security; + air.Updater = window.runtime.flash.desktop.Updater; + + air.LoaderContext = window.runtime.flash.system.LoaderContext; + air.ApplicationDomain = window.runtime.flash.system.ApplicationDomain; + + + // desktop + air.Clipboard = window.runtime.flash.desktop.Clipboard; + air.ClipboardFormats = window.runtime.flash.desktop.ClipboardFormats; + air.ClipboardTransferMode = window.runtime.flash.desktop.ClipboardTransferMode; + + air.NativeDragManager = window.runtime.flash.desktop.NativeDragManager; + air.NativeDragOptions = window.runtime.flash.desktop.NativeDragOptions; + air.NativeDragActions = window.runtime.flash.desktop.NativeDragActions; + + air.Icon = window.runtime.flash.desktop.Icon; + air.DockIcon = window.runtime.flash.desktop.DockIcon; + air.InteractiveIcon = window.runtime.flash.desktop.InteractiveIcon; + air.NotificationType = window.runtime.flash.desktop.NotificationType; + air.SystemTrayIcon = window.runtime.flash.desktop.SystemTrayIcon; + + air.NativeApplication = window.runtime.flash.desktop.NativeApplication; + + // display + air.NativeMenu = window.runtime.flash.display.NativeMenu; + air.NativeMenuItem = window.runtime.flash.display.NativeMenuItem; + air.Screen = window.runtime.flash.display.Screen; + + air.Loader = window.runtime.flash.display.Loader; + air.Bitmap = window.runtime.flash.display.Bitmap; + air.BitmapData = window.runtime.flash.display.BitmapData; + + // ui + air.Keyboard = window.runtime.flash.ui.Keyboard; + air.KeyEquivalent = window.runtime.flash.ui.KeyEquivalent; + air.Mouse = window.runtime.flash.ui.Mouse; + + + // utils + air.ByteArray = window.runtime.flash.utils.ByteArray; + air.CompressionAlgorithm = window.runtime.flash.utils.CompressionAlgorithm; + air.Endian = window.runtime.flash.utils.Endian; + air.Timer = window.runtime.flash.utils.Timer; + air.XMLSignatureValidator = window.runtime.flash.security.XMLSignatureValidator; + + air.HTMLLoader = window.runtime.flash.html.HTMLLoader; + + // media + air.ID3Info = window.runtime.flash.media.ID3Info; + air.Sound = window.runtime.flash.media.Sound; + air.SoundChannel = window.runtime.flash.media.SoundChannel; + air.SoundLoaderContext = window.runtime.flash.media.SoundLoaderContext; + air.SoundMixer = window.runtime.flash.media.SoundMixer; + air.SoundTransform = window.runtime.flash.media.SoundTransform; + air.Microphone = window.runtime.flash.media.Microphone; + air.Video = window.runtime.flash.media.Video; + air.Camera = window.runtime.flash.media.Camera; + + // data + air.EncryptedLocalStore = window.runtime.flash.data.EncryptedLocalStore; + air.SQLCollationType = window.runtime.flash.data.SQLCollationType; + air.SQLColumnNameStyle = window.runtime.flash.data.SQLColumnNameStyle; + air.SQLColumnSchema = window.runtime.flash.data.SQLColumnSchema; + air.SQLConnection = window.runtime.flash.data.SQLConnection; + air.SQLError = window.runtime.flash.errors.SQLError; + air.SQLErrorEvent = window.runtime.flash.events.SQLErrorEvent; + air.SQLErrorOperation = window.runtime.flash.errors.SQLErrorOperation; + air.SQLEvent = window.runtime.flash.events.SQLEvent; + air.SQLIndexSchema = window.runtime.flash.data.SQLIndexSchema; + air.SQLMode = window.runtime.flash.data.SQLMode; + air.SQLResult = window.runtime.flash.data.SQLResult; + air.SQLSchema = window.runtime.flash.data.SQLSchema; + air.SQLSchemaResult = window.runtime.flash.data.SQLSchemaResult; + air.SQLStatement = window.runtime.flash.data.SQLStatement; + air.SQLTableSchema = window.runtime.flash.data.SQLTableSchema; + air.SQLTransactionLockType = window.runtime.flash.data.SQLTransactionLockType; + air.SQLTriggerSchema = window.runtime.flash.data.SQLTriggerSchema; + air.SQLUpdateEvent = window.runtime.flash.events.SQLUpdateEvent; + air.SQLViewSchema = window.runtime.flash.data.SQLViewSchema; + + // service monitoring framework + air.__defineGetter__("ServiceMonitor", function() { return window.runtime.air.net.ServiceMonitor; }) + air.__defineGetter__("SocketMonitor", function() { return window.runtime.air.net.SocketMonitor; }) + air.__defineGetter__("URLMonitor", function() { return window.runtime.air.net.URLMonitor; }) +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRIntrospector.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRIntrospector.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/adobe/AIRIntrospector.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,1940 @@ +/* AIRIntrospector.js - Revision: 0.15.88 */ + +// Copyright 2007-2008. Adobe Systems Incorporated. +// 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 Adobe Systems Incorporated nor the names of its +// 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. + +var air; + +(function(){ + +if(typeof air=='undefined') air = {}; +air.Introspector = {}; + + +// Check the runtime. +if(typeof window.runtime!='undefined' && typeof window.nativeWindow!='undefined') + var isAppSandbox = true; +else + var isAppSandbox = false; + +//======================================================================================================================================================= +//Introspector.js +//======================================================================================================================================================= + + + + +//---------------------------------------------------------------------------------------------------- +/** +* @API air.Introspector.Console +* @description Exposes log, warn, info, error, dump to the user +* THIS IS THE ONLY SUPPORTED APIs +*/ + +air.Introspector.Console = { + log: function(){ + air.Introspector.logArguments(arguments, + {htmlLoader:isAppSandbox?window.htmlLoader:null}); + }, + + warn : function(){ + air.Introspector.logArguments(arguments, + {htmlLoader:isAppSandbox?window.htmlLoader:null, type:'warn'}); + }, + + info : function(){ + air.Introspector.logArguments(arguments, + {htmlLoader:isAppSandbox?window.htmlLoader:null, type:'info'}); + }, + + error : function(){ + air.Introspector.logArguments(arguments, + {htmlLoader:isAppSandbox?window.htmlLoader:null, type:'error'}); + }, + dump : function(obj, level){ + air.Introspector.logArguments(air.Introspector.dump(obj, level), + {htmlLoader: isAppSandbox?window.htmlLoader:null, usePre:true}); + } +}; + +//---------------------------------------------------------------------------------------------------- + +air.Introspector.config = { + showTimestamp: true, //Make the console show time stamps before each line + showSender: true, //Make the console show time stamps + wrapColumns: 2000, //Source files are soft-wrapped at around 2000 columns by default + flashTabLabels: true, //Console and xhr columns can flash whenever something happend to them (eg. logged something). You can turn it off + //by setting this to false + closeIntrospectorOnExit: true, //Makes the inspector window close when the last window closed + debugRuntimeObjects: true, //Also expand ActionScript objects + introspectorKey:122, //Inspect key - by default it is F11 (122) + debuggerKey:123, //Toggle inspectors visibility - by default it is F12 (123) + useAirDebugHtml: false, //Internal only +}; + + +/** +* @module air.Introspector +*/ + +air.Introspector.extend = function(dst, src){ + //Take every property from src and put it in dst + for(var i in src){ + dst[i]=src[i]; + } +}; + +// Checking if the user has configured Introspector using global AIRIntrospectorConfig variable +if(typeof AIRIntrospectorConfig!='undefined'){ + air.Introspector.extend(air.Introspector.config, AIRIntrospectorConfig); +} + +var eventListeners = []; + +// Can not expand ActionScript objects from remote sandbox - we can not even access ActionScript from there +// just disabled this feature +if(!isAppSandbox) air.Introspector.config.debugRuntimeObjects = false; + +// Made this use g/setters in order to make it easy to send its value over the bridge +air.Introspector.__defineGetter__('inspect', function(){ + return air.Introspector._inspect; +}); + +air.Introspector.__defineSetter__('inspect', function(value){ + air.Introspector._inspect=value; + if(!isAppSandbox){ + setTimeout(function(){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_setInspect(value); + }); + }, 0); + }else{ + if(!value){ + air.Introspector.hideHighlight(); + } + } +}); + +air.Introspector.extend(air.Introspector, { + + /** + * Makes it easier to acces runtime packages + * it makes sense only in the application sandbox + */ + runtime: isAppSandbox?{ + HTMLLoader : window.runtime.flash.html.HTMLLoader, + Event : window.runtime.flash.events.Event, + IOErrorEvent: window.runtime.flash.events.IOErrorEvent, + NativeApplication: window.runtime.flash.desktop.NativeApplication, + URLLoader : window.runtime.flash.net.URLLoader, + URLRequest : window.runtime.flash.net.URLRequest, + NativeWindowInitOptions : window.runtime.flash.display.NativeWindowInitOptions, + Capabilities: window.runtime.flash.system.Capabilities, + trace : window.runtime.trace, + }:null, + + _inspect: false, + remoteInspect: false, + canClick: false, + + bridgeCallbacks: [], + + + /** + * Different coloring styles for tag names, by default 'default' is used + * Undocumented feature + * - you can change the color of elements while inspecting by tag name, check bellow the body: 0x00CC00 line, + * uncomment that line, duplicate and change it with your own colors + */ + highlightBgColors: { + 'default': 0xFFCC00, + //body: 0x00CC00, + + }, + + /** + * @function trimRegExp + * @description Trims spaces from a string + * @private + */ + trimRegExp: /^[\s\r\n]*([\s\S]*?)[\s\r\n]*$/g, + trim:function(str){ + return str.replace(air.Introspector.trimRegExp, '$1'); + }, + + /** + * @function blockWrap + * @description Wraps a string by air.Introspector.config.wrapColumns columns + */ + blockWrap: function(str){ + //used for spliting large lines in <pre> + var cols = air.Introspector.config.wrapColumns; + var lines = str.split(/\n/); + var buffer = []; + var l = lines.length; + var lineNumbers = []; + for(var i=0;i<l;i++){ + lineNumbers.push(i+1); + var line = lines[i]; + while(line.length>cols){ + buffer.push(line.substr(0, cols)); + line = line.substr(cols); + lineNumbers.push(''); + } + buffer.push(line); + } + lineNumbers.push('EOF'); + return [buffer.join('\n'), lineNumbers.join('\n')]; + }, + + /** + * @function getTextFormat + * @description Returns a new flash TextField + */ + createTextField: function(parentSprite, fontSize, fontBold) { + if(isAppSandbox){ + var tf = new runtime.flash.text.TextField(); + tf.embedFonts = false; + tf.autoSize = runtime.flash.text.TextFieldAutoSize.LEFT; + tf.antiAliasType = runtime.flash.text.AntiAliasType.ADVANCED; + tf.defaultTextFormat = air.Introspector.getTextFormat(fontSize, fontBold); + tf.selectable = false; + tf.mouseEnabled = true; + tf.x = 4; + tf.text = ""; + if(parentSprite.numChildren > 0) { + var sibling = parentSprite.getChildAt(parentSprite.numChildren - 1); + tf.y = sibling.y + sibling.height + 15; + } + parentSprite.addChild(tf); + return tf; + }else{ + //should not get here + return null; + } + }, + /** + * @function getTextFormat + * Returns a new flash TextFormat + * see createTextField + */ + getTextFormat: function(fontSize, fontBold){ + if(isAppSandbox){ + var format = new runtime.flash.text.TextFormat(); + format.size = fontSize; + format.font = "Tahoma"; + format.bold = fontBold; + format.color = 0x330066; + return format; + }else{ + //should not get here + return null; + } + }, + + /** + * @function extendRect + * @description Initializes the sprite with values from the rectangle + */ + extendRect: function(sprite, rect){ + sprite.x = rect.x; + sprite.y = rect.y; + sprite.width = rect.width; + sprite.height = rect.height; + sprite.scaleX = rect.scaleX; + sprite.scaleY = rect.scaleY; + }, + + + /** + * @function showHighlight + * @description Shows a highlighting flash sprite using coordinates from rectangle + */ + showHighlight: function(rect){ + if(isAppSandbox){ + //dehilight everyone else + var ownedWindows = air.Introspector.getHtmlWindows(); + for(var i=ownedWindows.length-1;i>=0;i--){ + try{ + ownedWindows[i].htmlLoader.window.air.Introspector.hideHighlight(); + }catch(e){ + //no air.Introspector + } + } + air.Introspector.extendRect(air.Introspector.highlightSprite, rect); + }else{ + setTimeout(function(){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_showHighlight(rect); + }); + + }, 0); + + + } + }, + + /** + * @function hideHighlight + * @description Make the higlight box go away + */ + hideHighlight: function(){ + if(isAppSandbox){ + air.Introspector.extendRect(air.Introspector.highlightSprite, {x:0, y:0, width:0, height:0, scaleX:0, scaleY:0}); + air.Introspector.highlightText.visible = false; + }else{ + setTimeout(function(){ + try{ + parentSandboxBridge.air_Introspector_hideHighlight(); + }catch(e){ + // no bridge yet + } + }, 0); + } + }, + + /** + * @function remoteClick + * @description Make the remote sandbox know that the inspection finished + */ + remoteClick: function(){ + air.Introspector.debugWindow.finishInspect(false); + air.Introspector.hideHighlight(); + }, + + + /** + * @function createHighlight + * @description Creates a flash sprite used to higlight elements + * By using this method we are sure that no dom manipulation is done and + * no style is changed in HTML. + */ + createHighlight: function(){ + if(isAppSandbox){ + var sprite = new runtime.flash.display.Sprite(); + sprite.mouseEnabled = false; + sprite.width = 0; + sprite.height = 0; + sprite.buttonMode = true; + var prevent = function(element, event, isClick){ + air.Introspector.addEventListener(element, event, function(e){ + if((air.Introspector.inspect||air.Introspector.remoteInspect) &&sprite.hitTestPoint(e.stageX, e.stageY)){ + e.preventDefault(); + e.stopPropagation(); + e.stopImmediatePropagation(); + if(isClick&&air.Introspector.canClick){ + if(air.Introspector.remoteInspect){ + try{ + air.Introspector.inspectFrame.contentWindow.childSandboxBridge.air_Introspector_remoteClick(); + }catch(e){ air.Introspector.noChildBridge(air.Introspector.inspectFrame); } + }else{ + air.Introspector.debugWindow.finishInspect(false); + air.Introspector.hideHighlight(); + } + } + } + + }, true, 2000000); + }; + var check = function(element, event){ + air.Introspector.addEventListener(element, event, function(e){ + if((air.Introspector.inspect||air.Introspector.remoteInspect)&&nativeWindow.active){ + setTimeout(function(){ + air.Introspector.canClick = true; + }, 100); + } + }, true, 200000); + } + + var labelMover = function(element, event){ + air.Introspector.addEventListener(element, event, function(e){ + if((air.Introspector.inspect||air.Introspector.remoteInspect)){ + air.Introspector.highlightText.x = e.stageX+15; + air.Introspector.highlightText.y = e.stageY+15; +// air.Introspector.highlightText.visible = true; + }else{ + + air.Introspector.highlightText.visible = false; + } + }, true, 200000); + } + prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.CLICK, true); + prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_DOWN); + prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_UP); + prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.DOUBLE_CLICK); + check(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_MOVE); + check(nativeWindow, runtime.flash.events.Event.ACTIVATE); + labelMover(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_MOVE); + window.htmlLoader.stage.addChild(sprite); + air.Introspector.highlightSprite = sprite; + + air.Introspector.highlightText = new runtime.flash.display.Sprite(); + window.htmlLoader.stage.addChild(air.Introspector.highlightText); + + air.Introspector.highlightText.graphics.beginFill(0xeeeeee, 0.8); + air.Introspector.highlightText.graphics.lineStyle(1, 0xeeeeee, 0.9, false); + air.Introspector.highlightText.graphics.drawRect(0, 0, 250, 40); + air.Introspector.highlightText.visible = false; + air.Introspector.highlightLine1 = air.Introspector.createTextField(air.Introspector.highlightText, 16, true); + air.Introspector.highlightLine2 = air.Introspector.createTextField(air.Introspector.highlightText, 10, false); + }else{ + //should not be here + } + }, + + /** + * @function addEventListener + * @description Add a listener and stores it for future cleanup + */ + addEventListener: function(obj, eventName, listener, capture, priority){ + eventListeners.push([obj, eventName, listener, capture]); + obj.addEventListener(eventName, listener, capture, priority); + }, + + /** + * @function removeEventListener + * @description Removes listener + */ + removeEventListener: function(obj, eventName, listener, capture){ + for(var i=eventListeners.length-1;i>=0;i--){ + var l = eventListeners[i]; + if(l[0]==obj && l[1]==eventName && l[2]==listener && l[3]==capture) + { + eventListeners.splice(i, 1); + break; + } + } + obj.removeEventListener(eventName, listener, capture); + }, + + /** + * @function drawRect + * @description Draw a rectangle using ActionScript, also use tagName to find out which color to use + * @see air.Introspector.highlightBgColors + */ + drawRect: function (rect, tagName){ + var htmlLoaderBounds = htmlLoader.getBounds(htmlLoader.stage); + rect.x += htmlLoaderBounds.x; + rect.y += htmlLoaderBounds.y; + rect.scaleX = 1; + rect.scaleY = 1; + air.Introspector.showHighlight(rect); + air.Introspector.highlightSprite.graphics.clear(); + var bgColor = air.Introspector.highlightBgColors[tagName.toLowerCase()]; + if(typeof bgColor=='undefined') + bgColor = air.Introspector.highlightBgColors['default']; + air.Introspector.highlightSprite.graphics.beginFill(bgColor, 0.2); + air.Introspector.highlightSprite.graphics.lineStyle(3, bgColor, 0.9, false); + air.Introspector.highlightSprite.graphics.drawRect(0, 0, rect.width, rect.height); + }, + + /** + * @function highlightElement + * @description Highlight element e. Get its bounding box and send it directly or over the bridge to air.Introspector.drawRect + * @also air.Introspector.drawRect + */ + highlightElement: function(e, callback){ + var rect = air.Introspector.getBorderBox(e); + if(rect==false) + return; + + if(isAppSandbox){ + air.Introspector.drawRect(rect, e.tagName); + }else{ + setTimeout(function(){ + try{ + if(!isNaN(rect.width)&&!isNaN(rect.x)){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_drawRect(rect, e.tagName); + }); + } + }catch(e){ + air.Introspector.Console.error(e); + } + if(typeof callback!='undefined') callback(); + }, 0); + } + }, + + /** + * @function addKeyboardEvents + * @description Registers events on every window that includes AIRDebug.js. + * + * By default F11 enables the inspect tool + * F12 pops up the debug tool + */ + addKeyboardEvents: function(sprite){ + air.Introspector.addEventListener(sprite, runtime.flash.events.KeyboardEvent.KEY_DOWN, function(e){ + if(e.keyCode==air.Introspector.config.introspectorKey){ //F11 key pressed + if(typeof air.Introspector.lastElement!='undefined'&&(air.Introspector.lastElement.nodeName=='IFRAME'||air.Introspector.lastElement.nodeName=='FRAME')){ + try{ + var contentWindow = air.Introspector.lastElement.contentWindow; + if(typeof contentWindow.childSandboxBridge!='undefined'&& + typeof contentWindow.childSandboxBridge.air_Introspector_isDebugOpen!='undefined'&& + typeof contentWindow.childSandboxBridge.air_Introspector_toggleInspect!='undefined') + { + if(contentWindow.childSandboxBridge.air_Introspector_isDebugOpen()){ + contentWindow.childSandboxBridge.air_Introspector_toggleInspect(); + e.preventDefault(); + e.stopPropagation(); + return; + } + } + }catch(e){ + //it looks like no debugger in that iframe. go ahead with app sandbox debugger + } + } + air.Introspector.init(false, true, function(){ + air.Introspector.debugWindow.toggleInspect(); + }); + + e.preventDefault(); + e.stopPropagation(); + }else if(e.keyCode==air.Introspector.config.debuggerKey){ //F12 key pressed + air.Introspector.toggleWindow(); + e.preventDefault(); + e.stopPropagation(); + }else if(e.keyCode==27&&air.Introspector.inspect){ + air.Introspector.debugWindow.finishInspect(); + air.Introspector.hideHighlight(); + e.preventDefault(); + e.stopPropagation(); + }else if(e.ctrlKey==true&&e.altKey==false){ + var tab = null; + switch(e.keyCode){ + case runtime.flash.ui.Keyboard.NUMBER_1: + tab = 0; + break; + case runtime.flash.ui.Keyboard.NUMBER_2: + tab = 1; + break; + case runtime.flash.ui.Keyboard.NUMBER_3: + tab = 2; + break; + case runtime.flash.ui.Keyboard.NUMBER_4: + tab = 3; + break; + case runtime.flash.ui.Keyboard.NUMBER_5: + tab = 4; + break; + case runtime.flash.ui.Keyboard.NUMBER_6: + tab = 5; + break; + } + if(tab!=null){ + air.Introspector.init(false, true, function(){ + air.Introspector.debugWindow.setTab(tab); + }); + e.preventDefault(); + e.stopPropagation(); + } + } + }, true, 1000000); + }, + + /** + * @function showHighlightLabels + * @description Make the tooltip labels near the highlighting box appear and tell the id/tag name/outer HTML + */ + showHighlightLabels: function(id, nodeName, outerHTML){ + if(typeof id!='undefined'&&id.length!=0){ + air.Introspector.highlightLine1.text = nodeName+' - '+id; + }else{ + air.Introspector.highlightLine1.text = nodeName; + } + if(air.Introspector.canClick){ + air.Introspector.highlightLine2.text = outerHTML.substr(0, 40).replace(/\n/g, '\\n')+'...'; + }else{ + air.Introspector.highlightLine2.text = 'Click to activate window'; + window.clearTimeout(air.Introspector.clickToActivateTimeout); + air.Introspector.clickToActivateTimeout = setTimeout(function(){ + air.Introspector.highlightLine2.text = outerHTML.substr(0, 40).replace(/\n/g, '\\n')+'...'; + }, 400) + } + air.Introspector.highlightText.visible = true; + }, + + + /** + * @function registerUncaughtExceptionListener + * @description Catches all uncaught exceptions from javascript and shows them in the console + */ + registerUncaughtExceptionListener: function(){ + + air.Introspector.addEventListener(window.htmlLoader, + runtime.flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION , + function(e){ + if(e.exceptionValue && + e.exceptionValue.air_Introspector_setParentSandboxBridge == true && + e.exceptionValue.air_Introspector_version == air.Introspector.version) + { + air.Introspector.registerFramesParentSandboxBridge(); + e.preventDefault(); + return; + } + + air.Introspector.logError(e.exceptionValue, {htmlLoader:window.htmlLoader}); + // e.preventDefault(); + }); + + + }, + + + /** + * @function registerCloseEventListener + * @description + */ + registerCloseEventListener: function(){ + air.Introspector.addEventListener(window.nativeWindow, air.Introspector.runtime.Event.CLOSE, function(){ + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null){ + debugWindow.closedWindow(window.htmlLoader); + } + + }); + + + }, + + /** + * @function registerCompleteEventLisener + * @description Make the Introspector window knwo that we are complete. Register parentSandboxBridge on every frame + */ + registerCompleteEventListener: function(){ + air.Introspector.addEventListener(window.htmlLoader, air.Introspector.runtime.Event.COMPLETE, function(){ + air.Introspector.removeEventListener(window.htmlLoader, air.Introspector.runtime.Event.COMPLETE, arguments.callee); + try{ + //announce the debugWindow to refresh DOM and assets + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null){ + if(debugWindow.isLoaded){ + debugWindow.completeWindow(window.htmlLoader); + } + } + + air.Introspector.registerFramesParentSandboxBridge(); + }catch(e){ + runtime.trace(e); + runtime.trace(e.line); + air.Introspector.Console.log(e); + } + }); + }, + + /** + * @function registerFramesParentSandboxBridge + * @description All frames should know about us - registering parentSandboxBridge + */ + + registerFramesParentSandboxBridge: function(){ + //var modified = false; + var iframes = document.getElementsByTagName('iframe'); + for(var i=iframes.length-1;i>=0;i--){ + air.Introspector.registerFrame(iframes[i]); + } + + var frames = document.getElementsByTagName('frame'); + for(var i=frames.length-1;i>=0;i--){ + air.Introspector.registerFrame(frames[i]); + } + //return modified; + }, + + /** + * @function registerDeactivateEventLisener + * @description Hides the highlighting rectangle and deactivates inspect-clicking for this window + */ + registerDeactivateEventListener: function(){ + air.Introspector.addEventListener(window.nativeWindow, air.Introspector.runtime.Event.DEACTIVATE, function(){ air.Introspector.hideHighlight(); air.Introspector.canClick =false; }); + }, + + /** + * @function registerChildSandboxBridge + * @description Register childSandboxBridge for current iframe + */ + registerChildSandboxBridge: function(){ + + if(typeof childSandboxBridge=='undefined') + childSandboxBridge={}; + try{ + childSandboxBridge.air_Introspector_remoteClick = function (){ + try{ + air.Introspector.remoteClick(); + }catch(e){ alert(e+' '+e.line); } + } + + childSandboxBridge.air_Introspector_isDebugOpen = function(){ + return typeof air.Introspector.debugWindow!='undefined'; + } + + childSandboxBridge.air_Introspector_toggleInspect = function (){ + air.Introspector.init(false, true, function() + { + air.Introspector.debugWindow.toggleInspect(); + }); + } + + childSandboxBridge.air_Introspector_bridgeLoaded = function(){ + var l = air.Introspector.bridgeCallbacks; + for(var i=0;i<l;i++){ + try{ + air.Introspector.bridgeCallbacks[i](); + }catch(e){ + air.Introspector.logError(e); + } + } + air.Introspector.bridgeCallbacks = []; + } + } + catch(e){} + }, + + /** + * @function createOpenConsoleButton + * @description Creates a button on the top-right corent of the iframe that will open the introspector + */ + createOpenConsoleButton: function(){ + var consoleButton = document.createElement('input'); + consoleButton.onclick = function(){ + air.Introspector.init(true, true, function(){ }); + } + consoleButton.style.zIndex = 1000000; + consoleButton.style.position = 'fixed'; + consoleButton.style.right = '10px'; + consoleButton.style.top = '10px'; + consoleButton.type = 'button'; + consoleButton.value = 'Open Introspector'; + document.body.appendChild(consoleButton); + }, + + /** + * @function registerDOMEventListeners + * @description Registers DOMSubtreeModified, DOMCharacterDataModified, mouseover + */ + registerDOMEventListeners: function(){ + var hoverTimeout = null; + //debugWindow should know about any dom change + document.addEventListener('DOMSubtreeModified', function(e){ + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null&&debugWindow.isLoaded){ + debugWindow.dom3Event(e); + } + }); + document.addEventListener('DOMCharacterDataModified', function(e){ + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null&&debugWindow.isLoaded){ + debugWindow.dom3Event(e); + } + }); + + + document.body.addEventListener('mouseover', function(e){ + if(air.Introspector.inspect){ + setTimeout(function(){ + if(isAppSandbox){ + if(!nativeWindow.active) + nativeWindow.activate(); + } + if(e.srcElement){ + if(isAppSandbox){ + air.Introspector.highlightElement(e.srcElement); + air.Introspector.showHighlightLabels(e.srcElement.id, e.srcElement.nodeName, e.srcElement.outerHTML); + }else{ + air.Introspector.highlightElement(e.srcElement, function(){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_showHighlightLabels(e.srcElement.id, e.srcElement.nodeName, e.srcElement.outerHTML); + }); + }); + } + if(hoverTimeout) clearTimeout(hoverTimeout); + hoverTimeout = setTimeout(function(){ + air.Introspector.init(false, true, function (){ + air.Introspector.debugWindow.setInspectElement(e.srcElement); + }); + }, 100); + }else{ + air.Introspector.hideHighlight(); + } + }, 0); + }else if(isAppSandbox){ + air.Introspector.lastElement = e.srcElement; + } + + }, true); + + //document.body.addEventListener('mouseout', function(e){ + // air.Introspector.hideHighlight(); + //}); + }, + + /** + * @function cleanup + * @description Cleans up the html loader + * + */ + cleanup: function(){ + for(var i=eventListeners.length-1;i>=0;i--){ + var l = eventListeners[i]; + try{ + l[0].removeEventListener(l[1], l[2], l[3]); + }catch(e){} + } + eventListeners = []; + try{ + window.htmlLoader.stage.removeChild(air.Introspector.highlightText); + }catch(e){} + }, + + /** + * @function register + * @description Registers current window in debugger + * + * Captures every XHR object created and any uncaught exception + * and sends it to the debugger + */ + register: function(){ + + if (window.XMLHttpRequest && window.XMLHttpRequest.prototype){ + window.XMLHttpRequest.prototype.debugopen = window.XMLHttpRequest.prototype.open; + window.XMLHttpRequest.prototype.debugsend = window.XMLHttpRequest.prototype.send; + window.XMLHttpRequest.prototype.open = function(method, url, asyncFlag, username, password){ + if(typeof this.doNotDebug=='undefined'){ + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null){ + debugWindow.logNet(this, method, url, asyncFlag); + } + } + return this.debugopen(method, url, asyncFlag, username, password); + }; + window.XMLHttpRequest.prototype.send = function(obj){ + if(typeof this.doNotDebug=='undefined'){ + var self = this; + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null){ + var a = this.onreadystatechange; + this.onreadystatechange = function(){ + if (typeof a == 'function')a.call(self); + debugWindow.logNet(self, 'unknown', '', false); + }; + if(typeof self.doNotDebug=='undefined') + debugWindow.logNetSend(this, obj); + } + var ret = this.debugsend(obj); + if(debugWindow!=null){ + debugWindow.logNetSend(this, obj); + } + return ret; + }else{ + return this.debugsend(obj); + } + + } + } + + if(isAppSandbox){ + air.Introspector.addKeyboardEvents(window.htmlLoader.stage); + air.Introspector.registerUncaughtExceptionListener(); + air.Introspector.registerCloseEventListener(); + air.Introspector.registerCompleteEventListener(); + air.Introspector.registerDeactivateEventListener(); + air.Introspector.createHighlight(); + }else{ + air.Introspector.registerChildSandboxBridge(); + } + air.Introspector.waitForBody(document, function(){ + try{ + if(!isAppSandbox){ air.Introspector.createOpenConsoleButton(); } + air.Introspector.registerDOMEventListeners(); + window.addEventListener('unload', function(){ + try{ + air.Introspector.cleanup(); + if(!isAppSandbox){ + //our debugger can NOT live without it's parent + air.Introspector.debugWindow.window.close(); + } + }catch(e){ } + }); + }catch(e){ + if(isAppSandbox){ + runtime.trace(e); + runtime.trace(e.line); + } + air.Introspector.Console.log(e); + } + }); + + + }, + + + /** + * @function registerFrame + * @description Makes the parentSandboxBridge available to frame + */ + registerFrame: function(frame){ + if(typeof frame.contentWindow.parentSandboxBridge=='undefined') + frame.contentWindow.parentSandboxBridge = {}; + + /*frame.contentWindow.parentSandboxBridge.trace = function(a){ + runtime.trace(a); + };*/ + //checking that the bridge is not already there + /*var modified = typeof frame.contentWindow.parentSandboxBridge.air_Introspector_hideHighlight=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_showHighlight=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_drawRect=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_setInspect=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_getWindowTitle=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_checkNativeWindow=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToClipboard=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToFile=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_writeConfigFile=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_readConfigFile=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_showHighlightLabels=='undefined' + || typeof frame.contentWindow.parentSandboxBridge.air_Introspector_getFrameId=='undefined';*/ + + frame.contentWindow.parentSandboxBridge.air_Introspector_hideHighlight = function(){ + air.Introspector.hideHighlight(); + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_showHighlight = function(rect){ + air.Introspector.showHighlight(rect); + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_drawRect = function(rect, tagName){ + var frameRect = air.Introspector.getBorderBox(frame); + var blw = air.Introspector.getIntProp(frame, "border-left-width"); + var btw = air.Introspector.getIntProp(frame, "border-top-width"); + if(frameRect==null) return; + rect.x+=frameRect.x+2*blw; + rect.y+=frameRect.y+2*btw; + air.Introspector.drawRect(rect, tagName); + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_setInspect = function(enabled){ + air.Introspector.inspectFrame = enabled?frame:null; + air.Introspector.remoteInspect = enabled; + if(!enabled){ + air.Introspector.hideHighlight(); + } + }; + frame.contentWindow.parentSandboxBridge.air_Introspector_getWindowTitle = function(){ + return document.title; + }; + frame.contentWindow.parentSandboxBridge.air_Introspector_checkNativeWindow = function(title){ + var htmlWindows = air.Introspector.runtime.NativeApplication.nativeApplication.openedWindows; + for(var i=htmlWindows.length-1;i>=0;i--){ + if(htmlWindows[i].title==title){ + return true; + } + } + return false; + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToClipboard = function(str){ + air.Introspector.writeConsoleToClipboard(str); + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToFile = function(str){ + air.Introspector.writeConsoleToFile(str); + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_writeConfigFile = function(config){ + return air.Introspector.writeConfigFile(config, true); + } + + frame.contentWindow.parentSandboxBridge.air_Introspector_readConfigFile = function(){ + return air.Introspector.readConfigFile(true); + } + + frame.contentWindow.parentSandboxBridge.air_Introspector_showHighlightLabels = function(id, nodeName, outerHTML){ + air.Introspector.showHighlightLabels(id, nodeName, outerHTML); + }; + + frame.contentWindow.parentSandboxBridge.air_Introspector_getFrameId = function(){ + return frame.id; + } + + if(typeof frame.contentWindow.childSandboxBridge!='undefined' + && typeof frame.contentWindow.childSandboxBridge.air_Introspector_bridgeLoaded!='undefined'){ + frame.contentWindow.childSandboxBridge.air_Introspector_bridgeLoaded(); + } + + + //return modified; + }, + + /** + * @function waitForBody + * @description Wait until document.body is available + */ + waitForBody: function(document, callback){ + if(document.body){ + callback(); + }else{ + setTimeout(air.Introspector.waitForBody, 10, document, callback); + } + }, + + /** + * @function toggleWindow + * @description Shows/Hides the debug tool + */ + toggleWindow:function(){ + air.Introspector.init(true, false, function(justCreated){ + if(!justCreated) + air.Introspector.debugWindow.nativeWindow.visible ^= true; + }); + + }, + + + /** + * @function init + * @description Makes sure the debug tool is enabled + */ + init: function(showLoader, toggle, callback){ + if(!air.Introspector.canInit()) + return; + + if(typeof showLoader=='undefined') showLoader = false; + if(typeof toggle=='undefined') toggle = true; + + if(isAppSandbox){ + + if(typeof air.Introspector.debugWindow=='undefined' || air.Introspector.debugWindow.nativeWindow.closed){ + delete air.Introspector.debugWindow; + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow!=null && !debugWindow.nativeWindow.closed){ + air.Introspector.debugWindow = debugWindow; + if(toggle){ + air.Introspector.debugWindow.nativeWindow.visible = true; + if(!showLoader){ + nativeWindow.activate(); + } + } + callback(false); + }else{ + air.Introspector.loadDebugger(function(debugWindow){ + air.Introspector.debugWindow = debugWindow; + callback(true); + }, showLoader); + } + }else{ + if(toggle){ + if(showLoader){ + air.Introspector.debugWindow.nativeWindow.activate(); + } + } + callback(false); + } + }else{ + if(typeof activeWindow=='undefined'){ + air.Introspector.registerChildSandboxBridge(); + } + + if(typeof air.Introspector.debugWindow=='undefined'|| + typeof air.Introspector.debugWindow.window.air=='undefined'){ +/* (air.Introspector.debugWindow.isWindowCreated + &&air.Introspector.debugWindow.isLoaded + &&air.Introspector.debugWindow.window + &&!parentSandboxBridge.air_Introspector_checkNativeWindow(air.Introspector.parentWindowTitle + ': '+air.Introspector.debugWindow.window.document.title))){*/ + delete air.Introspector.debugWindow; + + + air.Introspector.loadDebugger(function(debugWindow){ + air.Introspector.debugWindow = debugWindow; + callback(true); + }); +// air.Introspector.debugWindow = new air.Introspector.DebugWindow ({activateDebug: showLoader, activeWindow: window}); + }else if(!air.Introspector.debugWindow.isWindowCreated){ + return; + }else{ + callback(false); + } + } + }, + times:0, //make the window.open page name unique - this is the number of opened and closed introspector windows + /** + * @function tryCreateWindow + * @description window.Open in browser/remote sandbox is not allowed if the action is not iniated by the user (eg. user gesture, mouse click) + * We can only wait for that moment. Until that happends we record all the callbacks and run them when the Introspector is laoded + * @runs in remote sandbox only + */ + tryCreateWindow: function(callbacks){ +// try{ + var self = this; + var w; + var iframeId; + +/* if(typeof parentSandboxBridge=='undefined'){ + air.Introspector.noBridge(function(){ + air.Introspector.tryCreateWindow(callbacks); + }); + return; + }*/ + + air.Introspector.parentWindowTitle = parentSandboxBridge.air_Introspector_getWindowTitle(); + + if(typeof parentSandboxBridge!='undefined'&&typeof parentSandboxBridge.air_Introspector_getFrameId!='undefined') + iframeId = parentSandboxBridge.air_Introspector_getFrameId(); + + air.Introspector.times++; + + if(typeof air.Introspector.config.useAirDebugHtml=='undefined'||air.Introspector.config.useAirDebugHtml==false){ + w = window.open('about:blank', 'debugger'+air.Introspector.times, 'width=640,height=480,resizable=1'); + if(w&&w.document){ + w.isAppSandbox = isAppSandbox; + w.opener = window; + w.iframeId = iframeId; + w.initCallbacks = callbacks; + w.activeWindow = window; + w.isLoaded = false; + w.config = air.Introspector.config; + w.document.write(air.Introspector.contentString); + w.document.close(); + } + }else{ + w = window.open('DebugUI.html', 'debugger'+air.Introspector.times, 'width=640,height=480,resizable=1'); + + if(w&&w.document){ + w.opener = window; + w.iframeId = iframeId; + w.activeWindow = window; + w.config = air.Introspector.config; + w.initCallbacks = callbacks; + w.isLoaded = false; + w.isAppSandbox = isAppSandbox; + } + } + return w; +// }catch(e){ +// alert(e+' '+e.line); +// } + }, + + /** + * @function loadDebugger + * @description Loads the debugger window, register callbacks until it is ready + * @runs in application sandbox only + */ + loadDebugger: function(callback, activateDebug){ + var htmlLoader; + var loadDebugger = arguments.callee; + if(loadDebugger.htmlLoader && typeof loadDebugger.htmlLoader.window.isLoaded != 'undefined'){ + if(loadDebugger.htmlLoader.window.isLoaded){ + callback(loadDebugger.htmlLoader.window.debugWindow); + }else{ + if(loadDebugger.htmlLoader.window.initCallbacks){ + loadDebugger.htmlLoader.window.initCallbacks.push(callback); + }else{ + loadDebugger.initCallbacks.push(callback); + } + } + return; + } + if(typeof loadDebugger.initCallbacks=='undefined'){ + loadDebugger.initCallbacks = [function(){ + delete loadDebugger.initCallbacks; + }, callback]; + }else{ + loadDebugger.initCallbacks.push(callback); + } + if(isAppSandbox){ + htmlLoader = air.Introspector.runtime.HTMLLoader.createRootWindow(false); + air.Introspector.addEventListener(htmlLoader, air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, function(){ + try{ + air.Introspector.removeEventListener(htmlLoader, air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, arguments.callee); + htmlLoader.window.initCallbacks = loadDebugger.initCallbacks; + htmlLoader.window.isLoaded = false; + htmlLoader.window.config = air.Introspector.config; + htmlLoader.window.activateDebug = activateDebug; + htmlLoader.window.isAppSandbox = isAppSandbox; + }catch(e){ + air.Introspector.runtime.trace(e); + air.Introspector.runtime.trace(e.line); + } + }); + htmlLoader.window.isLoaded = false; + + var nativeWindow = htmlLoader.stage.nativeWindow; + nativeWindow.width = 640; + nativeWindow.height = 480; + air.Introspector.addEventListener(htmlLoader, runtime.flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION, function(e){ + air.Introspector.logError(e.exceptionValue, {htmlLoader: self.htmlLoader}); + e.preventDefault(); + }); + if(typeof air.Introspector.config.useAirDebugHtml=='undefined'||air.Introspector.config.useAirDebugHtml==false){ + htmlLoader.loadString(air.Introspector.contentString); + }else{ + htmlLoader.load(new air.Introspector.runtime.URLRequest('app:/DebugUI.html')); + } + }else{ + air.Introspector.noBridge(function(){ + var w = air.Introspector.tryCreateWindow(loadDebugger.initCallbacks); + if(w){ + var htmlLoader = {window: w}; + loadDebugger.htmlLoader = htmlLoader; + } + }); + } + loadDebugger.htmlLoader = htmlLoader; + }, + + /** + * @function findDebugWindow + * @description Look up the Introspector in other windows. Maybe somebody else just opened it before us. + */ + findDebugWindow: function(){ + if(isAppSandbox){ + try{ + if(air.Introspector.debugWindow&&air.Introspector.debugWindow.nativeWindow.closed==false) + return air.Introspector.debugWindow; + }catch(e){ + } + try{ + var htmlWindows = air.Introspector.getHtmlWindows(true); + for(var i=htmlWindows.length-1;i>=0;i--){ + try{ + if(typeof htmlWindows[i].htmlLoader.window.air!='undefined' + && typeof htmlWindows[i].htmlLoader.window.air.Introspector!='undefined' + && typeof htmlWindows[i].htmlLoader.window.air.Introspector.debugWindow!='undefined' + && htmlWindows[i].htmlLoader.window.air.Introspector.debugWindow.nativeWindow.closed==false + && htmlWindows[i].htmlLoader.window.isAppSandbox ) + { + return htmlWindows[i].htmlLoader.window.air.Introspector.debugWindow; + } + }catch(e){ + //this window is not initialized yet + //just get next window + } + } + }catch(e){} + }else{ + return air.Introspector.debugWindow; + } + return null; + }, + + //application browser formats + // 0 - text + // 1 - images + // 2 - xml (you may want to add your own xml type here) + formats : { 'png':1, 'gif':1, 'zip':1, 'air':1, 'jpg':1, 'jpeg':1, + 'txt':0, 'html':0, 'js':0, 'xml':2, 'opml':2, 'css':0, 'htm':0, '':0 }, + + + /** + * @function canInit + * @description Check if we got parentSandboxBridge available + * @disabled + */ + canInit: function(){ +/* if(!isAppSandbox&&typeof parentSandboxBridge=='undefined'){ + alert('You need to include AIRIntrospector.js in application sandbox too!'); + return false; + }*/ + return true; + }, + + /** + * @function logArguments + * @description + */ + logArguments: function(args, config){ + if(!air.Introspector.canInit()) return; + config.timestamp = new Date(); + air.Introspector.init(config.type=='error', true, function(){ + air.Introspector.debugWindow.logArguments(args, config); + }); + + }, + /** + * @function logError + * @description + */ + logError: function(error, config){ + air.Introspector.init(false, true, function(){ + air.Introspector.debugWindow.logError(error, config); + }); + }, + + /** + * @function showCssElement + * @description + */ + showCssElement: function(element){ + var debugWindow = air.Introspector.findDebugWindow(); + if(debugWindow){ + debugWindow.showCssElement(element); + } + }, + + /** + * @function findLoader + * @description Finds the first HTMLLoader in flash display object list + */ + findLoader: function (stage){ + try{ + for(var i=stage.numChildren-1;i>=0;i--){ + var child = stage.getChildAt(i); + var str=child.toString(); + if(str=='[object HTMLLoader]'||child.name=="FlexHTMLLoader7"){ + return child; + } + } + for(var i=stage.numChildren-1;i>=0;i--){ + var child = stage.getChildAt(i); + var loader = air.Introspector.findLoader(child); + if(loader!=null) + return loader; + } + }catch(e){ + } + return null; + }, + + /** + * @function getHtmlWindows + * @description Returns an array of all HTML windows + */ + getHtmlWindows: function(includeInspectors){ + if(isAppSandbox){ + var windowNodes = []; + var windows = air.Introspector.runtime.NativeApplication.nativeApplication.openedWindows; + for(var i=windows.length-1;i>=0;i--){ + var loader = air.Introspector.findLoader(windows[i].stage); + if(loader!=null){ + if(typeof includeInspectors=='undefined' && typeof loader.window!='undefined' && typeof loader.window.air!='undefined' && typeof loader.window.air.Introspector!='undefined' && + typeof loader.window.air.Introspector.localIframeDebug != 'undefined' ) + continue; + windowNodes.push({ + nativeWindow: windows[i], + stage: windows[i].stage, + htmlLoader : loader + }); + } + } + return windowNodes; + }else{ + //should not be here + return []; + } + }, + + /** + * @function twoDigits + * @description int 2 string with two digits + */ + twoDigits: function(val){ + if(val<10) return '0'+val; + return val+''; + }, + + /** + * @function escapeHtml + * @description Escapes html in order to display it in html + */ + escapeHtml: function(html){ + return (html+'').replace(/&/g, '&').replace(/"/g, """).replace(/</g, '<').replace(/>/g, '>'); + }, + + tree: { }, + + + /** + * @function isNumberObject + * @description + */ + isNumberObject: function(obj){ + try{ + //can we catch isNaN only for NaN + return (obj+0==obj&&!isNaN(obj)); + }catch(e){ + } + return false; + }, + + /** + * @function isStringObject + * @description + */ + isStringObject: function(obj){ + try{ + return (typeof(obj.match) != "undefined" && obj.match.toString().indexOf("[native code]")>0); + }catch(e){ + } + return false; + }, + + /** + * @function isDateObject + * @description + */ + isDateObject: function(obj){ + try{ + return (typeof(obj.getDate) != "undefined" && obj.getDate.toString().indexOf("[native code]")>0); + }catch(e){ + } + return false; + }, + + /** + * @function isArgumentsObject + * @description + */ + isArgumentsObject: function(obj){ + try{ + return obj.toString()=='[object Arguments]'; + }catch(e){ + } + return false; + }, + + /** + * @function isXMLObject + * @description + */ + isXMLObject: function(obj){ + try{ + if(obj.xmlVersion&&obj.firstChild!=null) + return obj.xmlVersion!=''; + }catch(e){ + } + return false; + }, + + /** + * @function isArrayObject + * @description + */ + isArrayObject: function(obj){ + try{ + return (typeof(obj.push) != "undefined" && obj.push.toString().indexOf("[native code]")>0); + }catch(e){ + } + return false; + }, + + /** + * @function isItemNative + * @description + */ + isItemNative: function(obj){ + try{ + return (typeof(obj.item) != "undefined" && obj.item.toString().indexOf("[native code]")>0); + }catch(e){ + } + return false; + }, + + + /** + * @function dump + * @description + */ + + dump: function (obj, levels, level){ + if(air.Introspector.isArgumentsObject(obj)&&obj.length==1) + return air.Introspector.dump(obj[0]); + if(typeof levels=='undefined') { levels=1; } + if(typeof level=='undefined') { level=0; } + try{ + if(typeof obj=='undefined'){ return '[undefined]'; } + if(obj==null){ return '[null]'; } + var list = []; +// if(air.Introspector.isXMLObject(obj)){ +// disable for the moment +// return; +// } + if(air.Introspector.isStringObject(obj) + ||air.Introspector.isNumberObject(obj) + ||air.Introspector.isDateObject(obj)){ + if(level==0){ + try{ + return obj+''; + }catch(e){ + return e+''; + }; + } + return''; + } + var isItemNative = air.Introspector.isItemNative(obj); + var parseArray = air.Introspector.isArrayObject(obj)||air.Introspector.isArgumentsObject(obj)||isItemNative; + var parseHash = !parseArray || isItemNative; + if (parseArray){ + var l = obj.length; + for(var i=0;i<l;i++){ + var value; + try{ + value = obj[i]; + if(typeof value=='undefined') {value = '[undefined]'}; + }catch(e){ + value = e+''; + } + list.push([i,value]); + } + } + if(parseHash) { + for(var i in obj){ + var value; + try{ + value = obj[i]; + if(typeof value=='undefined') {value = '[undefined]'}; + }catch(e){ + value = e+''; + } + list.push([i,value]); + } + } + + if(air.Introspector.config.debugRuntimeObjects){ + try{ + var typeDescription = runtime.flash.utils.describeType(obj); + if(!this.domParser) this.domParser = new DOMParser(); + var typeXml = this.domParser.parseFromString(typeDescription, "text/xml"); + var child = typeXml.firstChild.firstChild; + while(child){ + if(child.nodeName=='accessor'||child.nodeName=='constant'||child.nodeName=='method'||child.nodeName=='variable'){ + var name = child.getAttribute('name'); + if(name!=null && name!='prototype'){ + try{ + list.push([name,obj[name]]); + }catch(e){ + list.push([name,'']+''); + } + } + } + child = child.nextSibling; + } + }catch(e){ + //just hide the error + } + } + list.sort(function(node1, node2){ + var isNode1Number = parseInt(node1[0])==node1[0]; + var isNode2Number = parseInt(node2[0])==node2[0]; + if(isNode1Number&&isNode2Number){ + return parseInt(node1[0])-parseInt(node2[0]); + } + if(isNode1Number){ + return -1; + } + if(isNode2Number){ + return 1; + } + if(node1[0].toLowerCase()==node2[0].toLowerCase()) + return 0; + if(node1[0].toLowerCase()<node2[0].toLowerCase()) + return -1; + return 1; + }); + if(list.length){ + var prefix = ''; + for(var i=level;i>0;i--) prefix+=' '; + var l = list.length; + var strList = []; + if(parseArray) strList.push(prefix+'[\n'); + else strList.push(prefix+'{\n'); + for(var i=0;i<l;i++){ + try{ + var zl = (list[i][0]+'').length+1; + var miniPrefix = ''; + for(var j=0;j<zl;j++) miniPrefix+=' '; + if(typeof list[i][1]=='function'){ + strList.push(prefix+' '+list[i][0]+'=[function],\n'); + }else if(air.Introspector.isDateObject(list[i][1])){ + strList.push(prefix+' '+list[i][0]+'='+(new Date(list[i][1])+'').replace(/\n/g, '\n'+prefix+miniPrefix)+',\n'); + }else{ + strList.push(prefix+' '+list[i][0]+'='+(list[i][1]+'').replace(/\n/g, '\n'+prefix+miniPrefix)+',\n'); + } + }catch(e){ + strList.push(prefix+' '+list[i][0]+'='+e+',\n'); + } + if(level<levels){ + strList.push(air.Introspector.dump(list[i][1], levels, level+1)); + } + } + if(parseArray) strList.push(prefix+']\n'); + else strList.push(prefix+'}\n'); + if(level){ + return strList.join(''); + }else{ + return (strList.join('')); + } + } + }catch(e){ + air.Introspector.Console.error(e); + } + return ''; + }, + + + + + /** + * --------------------------------------------------------------------------------------- + * @extracted This is extracted from spry framework and removed support for other browsers. + * @description Finds the precise position of the dom element node + */ + + /** + * @function camelize + * @description + */ + + camelize : function(stringToCamelize) + { + if (stringToCamelize.indexOf('-') == -1){ + return stringToCamelize; + } + var oStringList = stringToCamelize.split('-'); + var isFirstEntry = true; + var camelizedString = ''; + + for(var i=0; i < oStringList.length; i++) + { + if(oStringList[i].length>0) + { + if(isFirstEntry) + { + camelizedString = oStringList[i]; + isFirstEntry = false; + } + else + { + var s = oStringList[i]; + camelizedString += s.charAt(0).toUpperCase() + s.substring(1); + } + } + } + + return camelizedString; + }, + + /** + * @function getStyleProp + * @description + */ + getStyleProp : function(element, prop) + { + var value; + try + { + if (element.style) + value = element.style[air.Introspector.camelize(prop)]; + + if (!value) + { + if (document.defaultView && document.defaultView.getComputedStyle) + { + var css = document.defaultView.getComputedStyle(element, null); + value = css ? css.getPropertyValue(prop) : null; + } + else if (element.currentStyle) + { + value = element.currentStyle[air.Introspector.camelize(prop)]; + } + } + } + catch (e) {} + + return value == 'auto' ? null : value; + }, + + + /** + * @function getIntProp + * @description + */ + getIntProp : function(element, prop){ + var a = parseInt(air.Introspector.getStyleProp(element, prop),10); + if (isNaN(a)) + return 0; + return a; + }, + + + /** + * @function getBorderBox + * @description + */ + getBorderBox : function (el, doc) { + doc = doc || document; + if (typeof(el) == 'string') { + el = doc.getElementById(el); + } + + if (!el) { + return false; + } + + if (el.parentNode === null || air.Introspector.getStyleProp(el, 'display') == 'none') { + //element must be visible to have a box + return false; + } + + var ret = {x:0, y:0, width:0, height:0}; + var parent = null; + var box; + + var str = el.nodeName; + + ret.x = el.offsetLeft; + ret.y = el.offsetTop; + ret.width = el.offsetWidth; + ret.height = el.offsetHeight; + + parent = el.offsetParent; + + if (parent != el) { + while (parent) { + ret.x += parent.offsetLeft; + ret.y += parent.offsetTop; + str+=':'+parent.nodeName; + parent = parent.offsetParent; + } + } + + + var blw = air.Introspector.getIntProp(el, "border-left-width"); + var btw = air.Introspector.getIntProp(el, "border-top-width"); + ret.x -= blw; + ret.y -= btw; + // opera & (safari absolute) incorrectly account for body offsetTop + switch (air.Introspector.getStyleProp(el, 'position')){ + case 'absolute': + ret.y -= doc.body.offsetTop; + break; + case 'fixed': + ret.y += doc.body.scrollTop; + ret.x += doc.body.scrollLeft; + break; + }; + + if (el.parentNode) + parent = el.parentNode; + else + parent = null; + + if (parent!=null&&parent.nodeName){ + var cas = parent.nodeName.toUpperCase(); + while (parent && cas != 'HTML') { + cas = parent.nodeName.toUpperCase(); + ret.x -= parent.scrollLeft; + ret.y -= parent.scrollTop; + if (parent.parentNode) + parent = parent.parentNode; + else + parent = null; + } + } + +/* ret.y -= el.ownerDocument.body.scrollTop; + ret.x -= el.ownerDocument.body.scrollLeft; +*/ + // adjust the margin + var gi = air.Introspector.getIntProp; + var btw = gi(el, "margin-top"); + var blw = gi(el, "margin-left"); + var bbw = gi(el, "margin-bottom"); + var brw = gi(el, "margin-right"); + ret.x -= blw; + ret.y -= btw; + ret.height += btw + bbw; + ret.width += blw + brw; + + // air.Introspector.Console.log(ret); + return ret; + }, + + /** + * --------------------------------------------------------------------------------------- + */ + + /** + * @function writeConfigFile + * @description + */ + writeConfigFile: function(config, fromRemoteSandbox){ + if(isAppSandbox){ + var file = runtime.flash.filesystem.File.applicationStorageDirectory.resolvePath('AIRIntrospector'+(fromRemoteSandbox?'Remote':'')+'.cfg'); + var fs = new runtime.flash.filesystem.FileStream(); + fs.open(file, runtime.flash.filesystem.FileMode.WRITE); + fs.writeObject(config); + fs.close(); + }else{ + if(typeof activeWindow=='undefined'){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_writeConfigFile(config); + }); + }else{ + activeWindow.setTimeout(function(){ + activeWindow.air.Introspector.writeConfigFile(config); + }, 0); + } + } + }, + + + + /** + * @function readConfigFile + * @description + */ + readConfigFile: function (fromRemoteSandbox, callback){ + if(isAppSandbox){ + var file = runtime.flash.filesystem.File.applicationStorageDirectory.resolvePath('AIRIntrospector'+(fromRemoteSandbox?'Remote':'')+'.cfg'); + if(file.exists){ + var fs = new runtime.flash.filesystem.FileStream(); + fs.open(file, runtime.flash.filesystem.FileMode.READ); + var config = fs.readObject(); + fs.close(); + return config; + } + }else{ + if(typeof activeWindow=='undefined'){ + air.Introspector.noBridge(function(){ + var config = parentSandboxBridge.air_Introspector_readConfigFile(); + callback(config); + }); + }else{ + activeWindow.setTimeout(function(){ + if(typeof activeWindow!='undefined'){ + var config = activeWindow.air.Introspector.readConfigFile(true, function(config){ + setTimeout(function(){ callback(config); }); + }); + } + }); + } + } + return {}; + }, + + + + /** + * @function writeConsoleToClipboard + * @description + */ + + writeConsoleToClipboard: function(str){ + if(isAppSandbox){ + runtime.flash.desktop.Clipboard.generalClipboard.clear(); + runtime.flash.desktop.Clipboard.generalClipboard.setData(runtime.flash.desktop.ClipboardFormats.TEXT_FORMAT, + str, false); + }else{ + if(typeof activeWindow=='undefined'){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_writeConsoleToClipboard(str); + }); + }else{ + activeWindow.setTimeout(function(){ + activeWindow.air.Introspector.writeConsoleToClipboard(str); + }); + } + } + }, + + + /** + * @function writeConsoleToFile + * @description + */ + writeConsoleToFile: function(str){ + if(isAppSandbox){ + var file = runtime.flash.filesystem.File.desktopDirectory; + var self = this; + file.addEventListener(runtime.flash.events.Event.SELECT, function(evt){ + var newFile = evt.target; + var stream = new runtime.flash.filesystem.FileStream(); + stream.open(newFile, runtime.flash.filesystem.FileMode.WRITE); + stream.writeUTFBytes(str); + stream.close(); + }); + file.browseForSave('Console dump file...'); + }else{ + if(typeof activeWindow=='undefined'){ + air.Introspector.noBridge(function(){ + parentSandboxBridge.air_Introspector_writeConsoleToFile(str); + }); + }else{ + activeWindow.setTimeout(function(){ + activeWindow.air.Introspector.writeConsoleToFile(str); + }); + } + } + }, + + + + + /** + * @function noBridge + * @description Alerts the user that no parent sandbox bridge is installed + */ + noBridge: function(callback){ + try{ + callback(); + return; + }catch(e){ + air.Introspector.bridgeCallbacks.push(callback); + air.Introspector.registerChildSandboxBridge(); + setTimeout(function(){ + throw { air_Introspector_setParentSandboxBridge: true, air_Introspector_version: air.Introspector.version , toString: function(){ return 'You need to include AIRIntrospector.js in your application sandbox.'; } }; + }, 0); + } + + }, + + /** + * @function noChildBridge + * @description Alerts the user that no child sandbox bridge is installed + */ + noChildBridge: function(iframe){ + if(!air.Introspector.secondBridgeTry){ + var iframeStr = ''; + if(typeof iframe!='undefined'){ + iframeStr = " Check the following iframe [id: "+iframe.id+"]"; + } + alert('Child sandbox bridge is not defined or has been rewritten. You need to include AIRIntrospector.js in child sandbox.'+iframeStr); + air.Introspector.secondBridgeTry = true; + } + }, + + +});//------------------------------------------------------------------------------------------------------------------------------------------------------- +air.Introspector.version = '0.15.88'; +})(); + + + + +air.Introspector.contentString = '<!DOCTYPE html PUBLIC \"-\/\/W3C\/\/DTD XHTML 1.0 Transitional\/\/EN\" \"http:\/\/www.w3.org\/TR\/xhtml1\/DTD\/xhtml1-transitional.dtd\">\n<html xmlns=\"http:\/\/www.w3.org\/1999\/xhtml\">\n<head>\n<meta http-equiv=\"Content-Type\" content=\"text\/html; charset=UTF-8\" \/>\n<title>ADOBE AIR HTML\/JS Application Introspector<\/title>\n<style>\n\tbody{\n\t\toverflow:hidden;\n\t\t-khtml-user-select:none;\n\t}\n\t\n\t*{ -khtml-user-drag:none; }\n\n\ta:focus{outline:none;}\n\n\t#tabPages{\n\tposition:absolute;\n\tleft:0px;\n\ttop:80px;\n\tright:0px;\n\tbottom:0px;\n\tborder-top:1px solid #999999;\n\t}\n\t\n\t#preventClickingTabLabels{\n\t\t position:absolute;\n\t\t left:0px;\n\t\t top:60px;\n\t\t height:10px;\n\t\t right:0px;\n\t\t background:#666666;\n\t}\n\t\n\t#tabPages>div{\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\ttop:0px;\n\t\tbottom:0px;\n\t\tright:0px;\n\t\tvisibility:hidden;\n\t\toverflow:auto;\n\t}\n\t\n\t#tabPages>div.selected{\n\t\tvisibility:visible;\n\t}\n\t\n\t#windowSelector{\n\tposition:absolute;\n\ttop:0px;\n\tright:0px;\n\ttext-align:right;\n\tbackground:#4F4F4F;\n\tleft:300px;\n\tpadding: 10px;\n\tvertical-align: middle;\n\theight: 30px;\n\t\n\t}\n\t\n\t#domTab{\n\t\toverflow:auto;\n\t}\n\t\n\t#console {\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\ttop:0px;\n\t\tbottom:30px;\n\t\tright:0px;\n\t\tmargin:0px;\n\t\tpadding:0px;\n\t\tlist-style-image:none;\n\t\tlist-style-type:none;\n\t\toverflow:auto;\n\t}\n\t\n\t\n\t#console > li{\n\t\tborder-bottom:1px solid #CCCCCC;\n\t\tposition:relative;\n\t}\n\n\t\n\t.typeBox{\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\ttop:0px;\n\t\twidth:10px;\n\t\tmargin-left:0px !important;\n\t\theight:13px;\n\t\ttext-align:center;\n\t\tpadding:3px;\n\t\tpadding-top:0px;\n\t\tfont-family:Verdana;\n\t\tborder:1px solid #000000;\n\t\t-webkit-border-top-left-radius:9px;\n\t\t-webkit-border-top-right-radius:9px;\t\t\n\t\t-webkit-border-bottom-left-radius:9px;\t\t\n\t\t-webkit-border-bottom-right-radius:9px;\t\t\n\t}\n\t\n\t#console > li > *{\n\t\tmargin-left:10px;\n\t}\n\t\n\t.consoleFrom, .consoleTimestamp{\n\t\tcolor:#999999;\n\t}\n\t.consoleItemText{\n\t\tcolor:#003366;\n\t \/*font-weight:bold;*\/\n\t\tmargin-left:2px ! important;\n\t\tpadding:3px;\n\t\t-khtml-user-select:auto;\n\t}\n\t\n\t.error .consoleItemText{\n background:#FFFFE0;\n color:#FF3030;\n }\n \n .warn .consoleItemText{\n background:#00FFFF;\n color: #000000;\n }\n\n\t.warn .typeBox{\n\t\tborder:1px solid #8db047;\n\t\tcolor:#000000;\n\t\tbackground:#ffff00;\n\t}\n\t.error .typeBox{\n\t\tborder:1px solid #c00504;\n\t\tcolor:#ffffff;\n\t\tfont-weight:bold;\n\t\tbackground:#fe0000;\n\t}\n\t.info .typeBox{\n\t\tborder:1px solid #113c9f;\n\t\tcolor:#ffffff;\n\t\tfont-style:italic;\n\t\tbackground:#0053fe;\n\t}\n\t.warn .consoleItemText, .info .consoleItemText, .error .consoleItemText{\n\t\tmargin-left:20px ! important;\n\t}\n\t\n\t#evalConsole{\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\tbottom:0px;\n\t\theight:30px;\n\t\tright:0px;\n\t\tborder-top:1px solid #999999;\n\t}\n\t#evalConsoleText{\n\t\tposition:absolute;\n\t\tleft:30px;bottom:0px;\n\t\ttop:0px;right:0px;\n\t\tborder:none;\n\t}\n\t#evalConsoleLabel{\n\t\tposition:absolute;\n\t\tleft:0px;bottom:0px;\n\t\ttop:0px;\n\t\tpadding-top:5px;\n\t\tborder:none;\n\t}\n\t#tabLabels{\n\t\toverflow:hidden;\n\tmargin:0px;\n\tlist-style-image:none;\n\tlist-style-type:none;\n\tposition:absolute;\n\ttop:50px;\n\tleft:70px;\n\tright:0px;\n\theight:30px;\n\tpadding-left:5px;\n\tborder-top-width: 0px;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;\n\tbackground-color: #BBBBBB;\n\tborder-left-width: 2px;\n\tborder-left-style: solid;\n\tborder-left-color: #4F4F4F;\n\tpadding-top: 0px;\n\tpadding-right: 0px;\n\tpadding-bottom: 0px;\n\t}\n\t#tabLabels>li, #tabLabels>li.bounceOff{\n\tdisplay:block;\n\tpadding:5px;\n\tcursor:pointer;\n\tfloat:left;\n\theight:12px;\n\t-webkit-border-top-left-radius:5px;\n\t-webkit-border-top-right-radius:5px;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tfont-size: 11px;\n\tfont-style: normal;\n\tfont-weight: 600;\n\tcolor: #5A6F7F;\n\tline-height: normal;\n\tmargin-top: 5px;\n\tmargin-right: 2px;\n\tmargin-bottom: 2px;\n\tmargin-left: 2px;\n\ttext-transform: uppercase;\n\t}\n\t\n\t\n\t#tabLabels>li.bounceOn{\n\t\tbackground:#BDB0FF;\n\t\tborder-bottom:none;\n\t\txcolor:#ffffff;\n\t}\n\t\n\t#tabLabels>li.selected{\n\t\tbackground:#DADADA;\n\t\tcolor:#0066CC;\n\t}\n\t\n\t#tabLabels>li:hover{\n\tbackground-color: #DADADA;\n\tcolor: #0066CC;\n\t}\n\t\n\t\n\t#toolToggle{\n\tmargin:0px;\n\tlist-style-image:none;\n\tlist-style-type:none;\n\tposition:absolute;\n\ttop:50px;\n\tleft:-2px;\n\tright:0px;\n\theight:30px;\n\tpadding-left:5px;\n\tborder-top-width: 0px;\n\tborder-top-style: solid;\n\tborder-top-color: #999999;\n\tbackground-color: #BBBBBB;\n\tborder-left-width: 2px;\n\tborder-left-style: solid;\n\tborder-left-color: #4F4F4F;\n\tpadding-top: 0px;\n\tpadding-right: 0px;\n\tpadding-bottom: 0px;\n\twidth: 95px;\n\t}\n\t\n\t#toolToggle>li, #tabLabels>li.bounceOff{\n\tdisplay:block;\n\tpadding:5px;\n\tcursor:pointer;\n\tfloat:left;\n\theight:12px;\n\t-webkit-border-top-left-radius:5px;\n\t-webkit-border-top-right-radius:5px;\n\tfont-family: Arial, Helvetica, sans-serif;\n\tfont-size: 11px;\n\tfont-style: normal;\n\tfont-weight: bold;\n\tcolor: #4F4F4F;\n\tline-height: normal;\n\tmargin-top: 5px;\n\tmargin-right: 2px;\n\tmargin-bottom: 2px;\n\tmargin-left: 2px;\n\ttext-transform: uppercase;\n\t}\n\t\n\t#toolToggle>li.selected{\n\t\tbackground:#DADADA;\n\t\tcolor:#333333;\n\t}\n\t\n\t#toolToggle>li:hover{\n\tbackground-color: #DADADA;\n\tcolor: #333333;\n\t}\n\t\n\t.selected2Tree > .treeLabel{\n\t\tfont-weight:bold;\n\t}\n\t.selected2Tree {\n\t\tborder:1px solid #eeeeee;\n\t\tmargin:-1px;\n\t}\n\t\n\t\n\t#toolsLabels{\n\tmargin:0px;\n\tlist-style-image:none;\n\tlist-style-type:none;\n\tposition:absolute;\n\ttop:0px;\n\tleft:0px;\n\tpadding-left:10px;\n\twidth:320px;\n\theight:40px;\n\tbackground:#4F4F4F;\n\tpadding-top: 10px;\n\tpadding-right: 10px;\n\tpadding-bottom: 5px;\n\tcolor:#FFFFFF;\n\tfont-size:14px;\n\tfont-family:Verdana, Arial, Helvetica, sans-serif;\n\tfont-weight:bold;\n\ttext-shadow:2px 2px 2px black;\n\t}\n\t#toolsLabels span{\n\t\t\tposition:relative;\n\t\t\ttop:-3px;\n\t\t\tleft:1px;\n\t\t\tfont-size:10px;\n\t\t\tfont-weight:normal;\n\t\t}\n\t\n\t#toolsLabels>li{\n\tpadding:5px;\n\tmargin:3px;\n\tmargin-right:0px;\n\tfloat:left;\n\theight:12px;\n\tbackground-color: #3C3C3C;\n\t}\n\t\n\t#toolsLabels>li.selected{\n\t\tbackground:#666666;\n\t\tcolor:#FFFFFF;\n\t}\n\t\n\t#toolsLabels>li:hover{\n\t\ttext-decoration:underline;\n\t}\n\t\n\t\n\t.treeNode{\n\t\tdisplay:block;\n\t\tposition:relative;\n\t\tpadding-top:20px;\n\t\ttext-decoration:none;\n\t\tcolor:#000000;\n\t}\n\t\n\t.selected3Tree > .treeLabel{\n\t\tfont-weight: normal !important;\n\t\tbackground: #FFCC00 !important;\n\t}\n\t\n\n\t.hover > .treeLabel, .hover >.treeLabel2{\n\t\tbackground:#FFFFCC;\n\t\t-khtml-user-select:text;\n\t}\n\t\n\t.treeLabel{\n\t\tposition:absolute;\n\t\ttop:0px;\n\t\tleft:20px;\n\t\twidth:200px;\n\t\toverflow:hidden;\n\t\tcursor:pointer;\n\t\twhite-space:nowrap;\n\t}\n\t\n\t.noLabel2 > .treeLabel{\n\t\twidth:auto !important;\n\t\toverflow:auto !important;\n\t}\n\t\n\t.treeLabel2, .treeEdit{\n\t\tposition:absolute;\n\t\ttop:0px;\n\t\tleft:220px;\n\t\tpadding-left:2px;\n\t\tcursor:pointer;\n\t\twhite-space:nowrap;\n\t}\t\n\t\n\n\t.editing > .treeEdit{\n\t\tdisplay:block !important;\n\t\twidth:400px;\n\t\tleft:220px;\n\t\tright:0px;\n\t}\n\t\n\t.treeNode > .treeEdit{\n\t\tdisplay:none;\n\t}\n\t\n\t.tagDomNodeName{\n\t\tcolor:#ee00ee;\n\t}\n\t\n\t.domTreeNode .treeLabel{\n\t\twidth:auto;\n\t}\n\t\n\t.tagDomNodeAttribute{\n color:#0000ee;\n }\n\t\n\t.editing > .treeLabel2{\n\t\tdisplay:none !important;\n\t}\n\t.treeNode > .treeLabel2{\n\t\tdisplay:block;\n\t}\n\t\t\n\t.treeAnchorMac{\n\t\tposition:absolute;\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tmargin:1px;\n\t\twidth:12px;\n\t\theight:12px;\n\t\tcursor:pointer;\n\t\tfont-size:13px;\n\t\toverflow:hidden;\n\t\tcolor:#ffffff;\n\t\tbackground:#cccccc;\n\t\t-webkit-border-radius:6px;\n\t}\n\t.treeAnchorMac div{\n\t\tmargin-top: -3px;\n\t\twidth:25px;\n\t\tmargin-left: -6px;\n\t\tmargin-right: -2px;\n\t\ttext-align:center;\n\t}\n\t.treeNodeEmpty{\n\t\tdisplay:none;\n\t}\n\t.treeAnchorWin{\n\t\tposition:absolute;\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tmargin:1px;\n\/*\t\tborder:1px solid #999999;\n\t\tborder-left:1px solid #eeeeee;\n\t\tborder-top:1px solid #eeeeee;*\/\n\t\twidth:12px;\n\t\theight:12px;\n\t\tcursor:pointer;\n\t\tfont-size:15px;\n\t\toverflow:hidden;\n\t\tcolor:#ffffff;\n\t\tbackground:#cccccc;\n\t\t-webkit-border-radius:6px;\n\t}\n\t.treeAnchorWin div{\n\t\tmargin-top: -4px;\n\t\twidth:25px;\n\t\tmargin-left: -6px;\n\t\tmargin-right: -3px;\n\t\ttext-align:center;\n\t}\n\t\n\t.treeChildren{\n\t\tmargin-left:20px;\n\t}\n\t\n\t.nodeEndLabelDiv, .nodeEndLabelDiv *{\n\t display:none;\t\n\t}\n\t\n\t.nodeEndLabelDivVisible{\n margin-left:20px;\n\t padding-bottom:5px; \n\t white-space:nowrap;\n }\n\t\n\t.treeText{\n\t\tposition:relative;\n\t\tmargin:0px;\n\t\ttext-decoration:none;\n\t\tcolor:#000000;\n\t\tpadding:0px;\n\t\n\t\t\n\t}\n\t.treePreLine{\n\t\tposition:absolute;\n\t\ttop:0px;\n\t\ttext-align:right;\n\t\twidth:45px;\n\t\tpadding-right:3px;\n\t\tpadding:0px;\n\t\tbackground:#eeeeee;\n\t}\n\t\n\t.selected3Tree > .treePreLine{\n\t\tbackground:#cccccc;\n\t\tcolor:blue;\n\t}\n\t\n\t.selected3Tree > img{\n\t\toutline: 1px solid blue;\n\t}\n\t.treePreText{\n\t\tmargin-left:49px;\n\t\tpadding-left:4px;\n\t\t-khtml-user-select:auto;\n border: 1px solid #ffffff;\n\t}\n\t\n\t.inPlaceEditor{\n cursor:pointer;\n display:inline;\n position:relative;\n }\n\t\n\t\/* TREE CLASSES\n\t*\/\n\t#html2Tab{\n\t\toverflow:hidden !important;\n\t}\n\t#html2Div{\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\ttop:0px;\n\t\tbottom:0px;\n\t\toverflow:auto;\n\t}\n\t#html2Split{\n\t\tposition:absolute;\n\t\twidth:5px;\n\t\ttop:0px;\n\t\tbottom:0px;\n\t\tbackground:#cccccc;\n\t\tcursor:pointer;\n\t}\n\t#css2Div{\n\t\tposition:absolute;\n\t\ttop:0px;\n\t\tbottom:0px;\n\t\tright:0px;\n\t}\n\t#css2TabLabels{\n\t\tmargin:0px;\n\t\tpadding:0px;\n\t\tbackground:#cccccc;\n\t\tlist-style-image:none;\n\t\tlist-style-type:none;\n\t\tposition:absolute;\n\t\tborder-bottom:5px solid #666666;\n\t\ttop:0px;\n\t\tleft:0px;\n\t\tright:0px;\n\t\theight:20px;\n\t\tpadding-left:0px;\n\t}\n\t#css2TabLabels>li{\n\t\tdisplay:block;\n\t\tpadding:3px;\n\t\tpadding-bottom:0px;\n\t\tmargin:2px;\n\t\tmargin-left:0px;\n\t\tmargin-bottom:0px;\n\t\tfloat:left;\n\t\theight:15px;\n\t\tbackground:#ffffff;\n\t\t-webkit-border-top-left-radius:5px;\n\t\t-webkit-border-top-right-radius:5px;\t\t\n\t\t\tcursor:pointer;\n\t}\n\t\n\t#css2TabLabels>li.selected{\n\t\tbackground:#666666;\n\t\tcolor:#FFFFFF;\n\t}\n\t\n\t\n\t#css2TabPages{\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\ttop:24px;\n\t\tright:0px;\n\t\tbottom:0px;\n\t\tborder-top:1px solid #999999;\n\t}\n\n\t#css2TabPages>div{\n\t\tposition:absolute;\n\t\tleft:0px;\n\t\ttop:0px;\n\t\tbottom:0px;\n\t\tright:0px;\n\t\tvisibility:hidden;\n\t\toverflow:auto;\n\t}\n\t\n\t#tabPages>div.selected #css2TabPages>div.selected{\n\t\tvisibility:visible;\n\t}\n\t\n\t#windowList{\n\t\twidth:100px;\n\t\t\n\t}\n\t.menu {\n\t\tposition:absolute;\n\t\tdisplay:none;\n\t\tbackground:white;\n\t\tborder-bottom:1px solid #cccccc;\n\t\tborder-right:1px solid #cccccc;\t\t\n\t\tfont-size:12px;\n\t\tbackground:#eeeeee;\n\t\twidth:170px;\n\t}\n\t.menu ul{\n\t\tmargin:0px;\n\t\tpadding:0px;\n\t\tlist-style-image:none;\n\t\tlist-style-type:none;\n\t}\n\t.menu li a{\n\t\tdisplay:block;\n\t\tpadding:5px;\n\t\tcolor:#333333;\n\t\tborder-bottom:1px solid #eeeeee;\n\t\ttext-decoration:none;\n\t}\n\t.menu li a:hover{\n\t\tbackground:blue;\n\t\tcolor:white;\n\t}\n\t\n\t#searchTextBox{\n\t\tposition:absolute;\n\t\tright:20px;\n\t\tbottom:40px;\n\t\tdisplay:none;\n\t\tbackground:white;\n\t\tborder:1px solid #cccccc;\n\t\tpadding:5px;\n\t\t-webkit-border-radius:5px;\t\t\n\t}\n\t.searchselect{\n\t\toutline: 1px solid #333333 !important;\n\t\tbackground:#FFFF99;\n\t}\n\tpre{\n\t\tmargin:0px;\n\t\tpadding:0px;\n\t}\n<\/style>\n<script>\n\/\/<![CDATA[\n\t\n\tvar air;\n\t\nfunction cloneConfig()\n{\n\tif(typeof config==\'undefined\') return;\n\tfor(var i in config){\n\t\tair.Introspector.config[i]=config[i];\n\t}\n}\n\nfunction doLoad(){\n\n\/*\tif(typeof runtime==\'undefined\'&&opener){\n\t\tvar air = opener.air;\n\t}else{\n\t\tloadMyAir();\n\t}*\/\n\tcloneConfig();\n\tdebugWindow = new air.Introspector.DebugWindow();\n\tair.Introspector.debugWindow = debugWindow;\n\ttry{\n\t\tdebugWindow.init(window);\n\t}catch(e) { alert(e+\' \'+e.line); }\t\n\t\n\ttry{\n\t\tvar l =initCallbacks.length;\n\t\tfor(var i=0;i<l;i++){\n\t\t\tinitCallbacks[i](debugWindow);\n\t\t}\n\t}catch(e){alert(e+\' \'+e.line);}\n\tisLoaded = true;\n\n\t\t\n}\n\nfunction doUnload(){\n\tdebugWindow.dispose();\n}\n\n\nif(typeof air==\'undefined\') air = {};\nair.Introspector = { localIframeDebug: true };\n\n\n(function(){\n\t\n\n\n\t\n\n\n\n\/\/----------------------------------------------------------------------------------------------------\n\/**\n*\t@API air.Introspector.Console\n*\t@description Exposes log, warn, info, error, dump to the user\n*\tTHIS IS THE ONLY SUPPORTED APIs \n*\/\n\nair.Introspector.Console = {\n\t\t log: function(){\n\t\t \tair.Introspector.logArguments(arguments,\n\t\t\t \t\t{htmlLoader:isAppSandbox?window.htmlLoader:null});\n\t\t },\n\n\t\t warn : function(){\n\t\t air.Introspector.logArguments(arguments,\n\t\t\t \t\t\t{htmlLoader:isAppSandbox?window.htmlLoader:null, type:\'warn\'}); \n\t\t },\n\n\t\t info : function(){\n\t\t air.Introspector.logArguments(arguments,\n\t\t\t \t\t\t{htmlLoader:isAppSandbox?window.htmlLoader:null, type:\'info\'}); \n\t\t },\n \n\t\t error : function(){\n\t\t air.Introspector.logArguments(arguments,\n\t\t\t \t\t\t{htmlLoader:isAppSandbox?window.htmlLoader:null, type:\'error\'}); \n\t\t }, \n\t\t dump : function(obj, level){\n\t\t\tair.Introspector.logArguments(air.Introspector.dump(obj, level),\n\t\t\t \t\t{htmlLoader: isAppSandbox?window.htmlLoader:null, usePre:true});\n\t\t }\n};\n\n\/\/----------------------------------------------------------------------------------------------------\n\nair.Introspector.config = {\n showTimestamp: true,\t\t\t\t\t\t\/\/Make the console show time stamps before each line\n showSender: true,\t\t\t\t\t\t\t\/\/Make the console show time stamps\n wrapColumns: 2000,\t\t\t\t\t\t\t\/\/Source files are soft-wrapped at around 2000 columns by default \n\tflashTabLabels: true,\t\t\t\t\t\t\/\/Console and xhr columns can flash whenever something happend to them (eg. logged something). You can turn it off\n\t\t\t\t\t\t\t\t\t\t\t\t\/\/by setting this to false\n\tcloseIntrospectorOnExit: true,\t\t\t\t\/\/Makes the inspector window close when the last window closed\n\tdebugRuntimeObjects: true,\t\t\t\t\t\/\/Also expand ActionScript objects\n\tintrospectorKey:122,\t\t\t\t\t\t\/\/Inspect key - by default it is F11 (122)\n\tdebuggerKey:123, \t\t\t\t\t\t\t\/\/Toggle inspectors visibility - by default it is F12 (123)\n useAirDebugHtml: false,\t\t\t\t\t\t\/\/Internal only\n};\n\n\n\/**\n*\t@module air.Introspector\n*\/\n\nair.Introspector.extend = function(dst, src){\n\t\/\/Take every property from src and put it in dst\n for(var i in src){\n dst[i]=src[i];\n }\n};\n\n\/\/\tChecking if the user has configured Introspector using global AIRIntrospectorConfig variable\nif(typeof AIRIntrospectorConfig!=\'undefined\'){\n\tair.Introspector.extend(air.Introspector.config, AIRIntrospectorConfig);\n}\n\nvar eventListeners = [];\n\n\/\/\tCan not expand ActionScript objects from remote sandbox - we can not even access ActionScript from there \n\/\/\tjust disabled this feature\nif(!isAppSandbox) air.Introspector.config.debugRuntimeObjects = false;\n\n\/\/\tMade this use g\/setters in order to make it easy to send its value over the bridge\nair.Introspector.__defineGetter__(\'inspect\', function(){\n return air.Introspector._inspect;\n});\n\nair.Introspector.__defineSetter__(\'inspect\', function(value){\n air.Introspector._inspect=value;\n if(!isAppSandbox){\n setTimeout(function(){\n\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\tparentSandboxBridge.air_Introspector_setInspect(value);\n\t\t\t});\n }, 0);\n }else{\n\t\tif(!value){\n\t\t\tair.Introspector.hideHighlight();\n\t\t}\n\t}\n});\n\t\nair.Introspector.extend(air.Introspector, { \n\n\t\/**\n\t*\tMakes it easier to acces runtime packages\n\t*\tit makes sense only in the application sandbox\n\t*\/\n\truntime: isAppSandbox?{ \n\t\tHTMLLoader : window.runtime.flash.html.HTMLLoader,\n\t\tEvent : window.runtime.flash.events.Event,\n\t\tIOErrorEvent: window.runtime.flash.events.IOErrorEvent,\n\t\tNativeApplication: window.runtime.flash.desktop.NativeApplication,\n\t\tURLLoader : window.runtime.flash.net.URLLoader,\n\t\tURLRequest : window.runtime.flash.net.URLRequest,\n\t\tNativeWindowInitOptions : window.runtime.flash.display.NativeWindowInitOptions,\n\t\tCapabilities: window.runtime.flash.system.Capabilities,\n\t\ttrace : window.runtime.trace,\n\t}:null,\n\t\n\t_inspect: false,\n\tremoteInspect: false,\n canClick: false,\n\n\tbridgeCallbacks: [],\n\t\n\t\n\t\/**\n\t*\tDifferent coloring styles for tag names, by default \'default\' is used\n\t*\tUndocumented feature\n\t*\t\t- you can change the color of elements while inspecting by tag name, check bellow the body: 0x00CC00 line,\n\t*\t\t uncomment that line, duplicate and change it with your own colors\n\t*\/\n highlightBgColors: {\n \'default\': 0xFFCC00,\n \/\/body: 0x00CC00,\n \n },\n\n\t\/**\n\t*\t@function trimRegExp\n\t*\t@description Trims spaces from a string\n\t*\t@private\n\t*\/\n trimRegExp: \/^[\\s\\r\\n]*([\\s\\S]*?)[\\s\\r\\n]*$\/g,\n trim:function(str){\n \treturn str.replace(air.Introspector.trimRegExp, \'$1\');\n },\n\n\t\/**\n\t*\t@function blockWrap\n\t*\t@description Wraps a string by air.Introspector.config.wrapColumns columns\n\t*\/\n blockWrap: function(str){\n \t\/\/used for spliting large lines in <pre>\n \tvar cols = air.Introspector.config.wrapColumns;\n \tvar lines = str.split(\/\\n\/);\n \tvar buffer = [];\n \tvar l = lines.length;\n \tvar lineNumbers = [];\n \tfor(var i=0;i<l;i++){\n \t\tlineNumbers.push(i+1);\n \t\tvar line = lines[i];\n \t\twhile(line.length>cols){\n \t\t\tbuffer.push(line.substr(0, cols));\n \t\t\tline = line.substr(cols);\n \t\t\tlineNumbers.push(\'\');\n \t\t}\n \t\tbuffer.push(line);\n \t}\n \tlineNumbers.push(\'EOF\');\n \treturn [buffer.join(\'\\n\'), lineNumbers.join(\'\\n\')];\n },\n\t\n\t\/**\n\t*\t@function getTextFormat\n\t*\t@description Returns a new flash TextField\n\t*\/\n createTextField: function(parentSprite, fontSize, fontBold) {\n\t\tif(isAppSandbox){\n \t\tvar tf = new runtime.flash.text.TextField();\n\t tf.embedFonts = false;\n\t tf.autoSize = runtime.flash.text.TextFieldAutoSize.LEFT;\n\t tf.antiAliasType = runtime.flash.text.AntiAliasType.ADVANCED;\n\t tf.defaultTextFormat = air.Introspector.getTextFormat(fontSize, fontBold);\n\t tf.selectable = false;\n\t tf.mouseEnabled = true;\n\t tf.x = 4;\n\t tf.text = \"\";\n\t if(parentSprite.numChildren > 0) {\n\t var sibling = parentSprite.getChildAt(parentSprite.numChildren - 1);\n\t tf.y = sibling.y + sibling.height + 15;\n\t }\n\t parentSprite.addChild(tf);\n\t return tf;\n\t\t}else{\n\t\t\t\/\/should not get here\n\t\t\treturn null;\n\t\t}\n },\n \/**\n\t*\t@function getTextFormat\n\t*\tReturns a new flash TextFormat\n\t*\tsee createTextField\n\t*\/\n getTextFormat: function(fontSize, fontBold){\n\t\tif(isAppSandbox){\n \tvar format = new runtime.flash.text.TextFormat();\n\t format.size = fontSize;\n\t format.font = \"Tahoma\";\n\t format.bold = fontBold;\n\t format.color = 0x330066;\n \treturn format;\n\t\t}else{\n\t\t\t\/\/should not get here\n\t\t\treturn null;\n\t\t}\n },\n \n\t\/**\n\t*\t@function extendRect \n\t*\t@description Initializes the sprite with values from the rectangle\n\t*\/\n\textendRect: function(sprite, rect){\n\t\tsprite.x = rect.x;\n\t\tsprite.y = rect.y;\n\t\tsprite.width = rect.width;\n\t\tsprite.height = rect.height;\n\t\tsprite.scaleX = rect.scaleX;\n\t\tsprite.scaleY = rect.scaleY;\t\t\t\n\t},\n\t\n\t\n\t\/**\n\t*\t@function showHighlight\n\t*\t@description Shows a highlighting flash sprite using coordinates from rectangle\n\t*\/\n showHighlight: function(rect){\n\t\tif(isAppSandbox){\n\t \/\/dehilight everyone else\n\t var ownedWindows = air.Introspector.getHtmlWindows();\n\t for(var i=ownedWindows.length-1;i>=0;i--){\n\t try{\n\t ownedWindows[i].htmlLoader.window.air.Introspector.hideHighlight();\n\t }catch(e){\n\t \/\/no air.Introspector\n\t }\n\t }\n\t air.Introspector.extendRect(air.Introspector.highlightSprite, rect);\n\t\t}else{\n\t\t\tsetTimeout(function(){\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tparentSandboxBridge.air_Introspector_showHighlight(rect);\t\t\t\t\n\t\t\t\t});\n\t\t\t\t\n\t\t\t}, 0);\n\t\t\t\n\t\t\t\n\t\t}\n },\n\n\t\/**\n\t*\t@function hideHighlight\n\t*\t@description Make the higlight box go away\n\t*\/\n hideHighlight: function(){\n\t\tif(isAppSandbox){\n \tair.Introspector.extendRect(air.Introspector.highlightSprite, {x:0, y:0, width:0, height:0, scaleX:0, scaleY:0});\n\t air.Introspector.highlightText.visible = false;\n\t\t}else{\n\t\t\tsetTimeout(function(){\n\t\t\t\ttry{\n\t\t\t\t\tparentSandboxBridge.air_Introspector_hideHighlight();\n\t\t\t\t}catch(e){ \n\t\t\t\t\t\t\/\/ no bridge yet\n\t\t\t\t\t}\n\t\t\t}, 0);\n\t\t}\n },\n\n\t\/**\n\t*\t@function remoteClick\n\t*\t@description Make the remote sandbox know that the inspection finished\n\t*\/\n\tremoteClick: function(){\n\t\tair.Introspector.debugWindow.finishInspect(false);\n air.Introspector.hideHighlight();\n\t},\n\t\n\t\n\t\/**\n\t*\t@function createHighlight\n\t*\t@description \tCreates a flash sprite used to higlight elements\n\t*\t\t\t\t By using this method we are sure that no dom manipulation is done and \n\t*\t\t\t\t no style is changed in HTML.\n\t*\/\n createHighlight: function(){\n\t\tif(isAppSandbox){\n\t var sprite = new runtime.flash.display.Sprite();\n\t sprite.mouseEnabled = false;\n\t sprite.width = 0;\n\t sprite.height = 0;\n\t sprite.buttonMode = true;\n\t var prevent = function(element, event, isClick){\n\t air.Introspector.addEventListener(element, event, function(e){\n\t if((air.Introspector.inspect||air.Introspector.remoteInspect) &&sprite.hitTestPoint(e.stageX, e.stageY)){\n\t e.preventDefault();\n\t e.stopPropagation();\n\t e.stopImmediatePropagation();\n\t \tif(isClick&&air.Introspector.canClick){\n\t\t\t\t\t\t\tif(air.Introspector.remoteInspect){\n\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\tair.Introspector.inspectFrame.contentWindow.childSandboxBridge.air_Introspector_remoteClick();\n\t\t\t\t\t\t\t\t}catch(e){ air.Introspector.noChildBridge(air.Introspector.inspectFrame); }\n\t\t\t\t\t\t\t}else{\n\t \tair.Introspector.debugWindow.finishInspect(false);\n\t\t air.Introspector.hideHighlight();\n\t\t\t\t\t\t\t}\n\t }\n\t }\n\n\t }, true, 2000000);\n\t };\n\t var check = function(element, event){\n\t air.Introspector.addEventListener(element, event, function(e){\n\t if((air.Introspector.inspect||air.Introspector.remoteInspect)&&nativeWindow.active){\n\t setTimeout(function(){\n\t air.Introspector.canClick = true;\n\t }, 100);\n\t }\n\t }, true, 200000);\n\t }\n \n\t var labelMover = function(element, event){\n\t \tair.Introspector.addEventListener(element, event, function(e){\n\t\t if((air.Introspector.inspect||air.Introspector.remoteInspect)){\n\t air.Introspector.highlightText.x = e.stageX+15;\n\t air.Introspector.highlightText.y = e.stageY+15;\n\/\/\t\t\t\t\t air.Introspector.highlightText.visible = true;\n\t }else{\n\n\t air.Introspector.highlightText.visible = false;\n\t }\n\t \t}, true, 200000);\n\t }\n\t prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.CLICK, true);\n\t prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_DOWN);\n\t prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_UP);\n\t prevent(htmlLoader.stage, runtime.flash.events.MouseEvent.DOUBLE_CLICK);\n\t check(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_MOVE);\n\t check(nativeWindow, runtime.flash.events.Event.ACTIVATE);\n\t labelMover(htmlLoader.stage, runtime.flash.events.MouseEvent.MOUSE_MOVE);\n\t window.htmlLoader.stage.addChild(sprite); \n\t air.Introspector.highlightSprite = sprite;\n\n\t air.Introspector.highlightText = new runtime.flash.display.Sprite();\n\t window.htmlLoader.stage.addChild(air.Introspector.highlightText); \n\n\t air.Introspector.highlightText.graphics.beginFill(0xeeeeee, 0.8);\n\t air.Introspector.highlightText.graphics.lineStyle(1, 0xeeeeee, 0.9, false);\n\t air.Introspector.highlightText.graphics.drawRect(0, 0, 250, 40);\n\t air.Introspector.highlightText.visible = false;\n\t air.Introspector.highlightLine1 = air.Introspector.createTextField(air.Introspector.highlightText, 16, true);\n\t air.Introspector.highlightLine2 = air.Introspector.createTextField(air.Introspector.highlightText, 10, false);\n }else{\n\t\t\t\/\/should not be here\n\t }\n },\n \n\t\/**\n\t*\t@function addEventListener\n\t*\t@description Add a listener and stores it for future cleanup\n\t*\/\n\taddEventListener: function(obj, eventName, listener, capture, priority){\n\t\teventListeners.push([obj, eventName, listener, capture]);\n\t\tobj.addEventListener(eventName, listener, capture, priority);\n\t},\n\t\n\t\/**\n\t*\t@function removeEventListener\n\t*\t@description Removes listener\n\t*\/\n\tremoveEventListener: function(obj, eventName, listener, capture){\n\t\tfor(var i=eventListeners.length-1;i>=0;i--){\n\t\t\tvar l = eventListeners[i];\n\t\t\tif(l[0]==obj && l[1]==eventName && l[2]==listener && l[3]==capture)\n\t\t\t\t{\n\t\t\t\t\teventListeners.splice(i, 1);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t}\n\t\tobj.removeEventListener(eventName, listener, capture);\n\t},\t\n\t\n\t\/**\n\t*\t@function drawRect\n\t*\t@description Draw a rectangle using ActionScript, also use tagName to find out which color to use \n\t*\t@see air.Introspector.highlightBgColors\n\t*\/\n\tdrawRect: function (rect, tagName){\n\t\t\tvar htmlLoaderBounds = htmlLoader.getBounds(htmlLoader.stage);\n\t \trect.x += htmlLoaderBounds.x;\n\t\t rect.y += htmlLoaderBounds.y;\n\t\t\trect.scaleX = 1;\n\t\t rect.scaleY = 1;\n\t\t air.Introspector.showHighlight(rect);\n\t\t air.Introspector.highlightSprite.graphics.clear();\n\t\t var bgColor = air.Introspector.highlightBgColors[tagName.toLowerCase()];\n\t\t if(typeof bgColor==\'undefined\')\n\t\t bgColor = air.Introspector.highlightBgColors[\'default\'];\n\t\t air.Introspector.highlightSprite.graphics.beginFill(bgColor, 0.2);\n\t\t air.Introspector.highlightSprite.graphics.lineStyle(3, bgColor, 0.9, false);\n\t\t air.Introspector.highlightSprite.graphics.drawRect(0, 0, rect.width, rect.height);\n\t},\n\t\n\t\/**\n\t*\t@function highlightElement\n\t*\t@description Highlight element e. Get its bounding box and send it directly or over the bridge to air.Introspector.drawRect\n\t*\t@also air.Introspector.drawRect\n\t*\/\n highlightElement: function(e, callback){\n\t\tvar rect = air.Introspector.getBorderBox(e);\n\t \tif(rect==false)\n\t\t\treturn;\n\t\n\t\tif(isAppSandbox){\t\t\t\n\t\t\tair.Introspector.drawRect(rect, e.tagName);\n\t\t}else{\n\t\t\tsetTimeout(function(){\n\t\t\t\ttry{\n\t\t\t\t\tif(!isNaN(rect.width)&&!isNaN(rect.x)){\n\t\t\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\t\t\tparentSandboxBridge.air_Introspector_drawRect(rect, e.tagName);\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t}catch(e){\n\t\t\t\t\tair.Introspector.Console.error(e);\n\t\t\t\t}\n\t\t\t\tif(typeof callback!=\'undefined\') callback();\n\t\t\t}, 0);\n\t\t}\n },\n \n\t\/**\n\t*\t@function addKeyboardEvents\n\t*\t@description \tRegisters events on every window that includes AIRDebug.js.\n\t*\n\t*\tBy default F11 enables the inspect tool\n\t*\t\t\t F12 pops up the debug tool\n\t*\/\n\taddKeyboardEvents: function(sprite){\n\t\tair.Introspector.addEventListener(sprite, runtime.flash.events.KeyboardEvent.KEY_DOWN, function(e){\n if(e.keyCode==air.Introspector.config.introspectorKey){ \/\/F11 key pressed\n\t\t\t\tif(typeof air.Introspector.lastElement!=\'undefined\'&&(air.Introspector.lastElement.nodeName==\'IFRAME\'||air.Introspector.lastElement.nodeName==\'FRAME\')){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tvar contentWindow = air.Introspector.lastElement.contentWindow;\n\t\t\t\t\t\tif(typeof contentWindow.childSandboxBridge!=\'undefined\'&&\n\t\t\t\t\t\t\ttypeof contentWindow.childSandboxBridge.air_Introspector_isDebugOpen!=\'undefined\'&&\n\t\t\t\t\t\t\ttypeof contentWindow.childSandboxBridge.air_Introspector_toggleInspect!=\'undefined\')\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tif(contentWindow.childSandboxBridge.air_Introspector_isDebugOpen()){\n\t\t\t\t\t\t\t\tcontentWindow.childSandboxBridge.air_Introspector_toggleInspect();\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t\t\t\t\treturn;\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(e){\n\t\t\t\t\t\t\/\/it looks like no debugger in that iframe. go ahead with app sandbox debugger\n\t\t\t\t\t}\n\t\t\t\t}\n air.Introspector.init(false, true, function(){\n \tair.Introspector.debugWindow.toggleInspect();\t\t\t\t\t\n\t\t\t\t});\n\n e.preventDefault();\n\t\t\t\te.stopPropagation();\n }else if(e.keyCode==air.Introspector.config.debuggerKey){ \/\/F12 key pressed\n air.Introspector.toggleWindow();\n e.preventDefault();\n\t\t\t\te.stopPropagation();\n }else if(e.keyCode==27&&air.Introspector.inspect){\n air.Introspector.debugWindow.finishInspect();\n air.Introspector.hideHighlight();\n e.preventDefault();\n\t\t\t\t\t\te.stopPropagation();\n }else if(e.ctrlKey==true&&e.altKey==false){\n\t\t\t\tvar tab = null;\n\t\t\t\tswitch(e.keyCode){\n\t\t\t\t\tcase runtime.flash.ui.Keyboard.NUMBER_1:\n\t\t\t\t\t\ttab = 0;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase runtime.flash.ui.Keyboard.NUMBER_2:\n\t\t\t\t\t\ttab = 1;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase runtime.flash.ui.Keyboard.NUMBER_3:\n\t\t\t\t\t\ttab = 2;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase runtime.flash.ui.Keyboard.NUMBER_4:\n\t\t\t\t\t\ttab = 3;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase runtime.flash.ui.Keyboard.NUMBER_5:\n\t\t\t\t\t\ttab = 4;\n\t\t\t\t\tbreak;\n\t\t\t\t\tcase runtime.flash.ui.Keyboard.NUMBER_6:\n\t\t\t\t\t\ttab = 5;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tif(tab!=null){\n\t\t\t\t\t\tair.Introspector.init(false, true, function(){\n\t\t\t\t\t\t\tair.Introspector.debugWindow.setTab(tab);\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\te.stopPropagation();\n\t\t\t\t}\n\t\t\t}\n }, true, 1000000);\n\t},\n\t\n\t\/**\n\t*\t@function showHighlightLabels\n\t*\t@description Make the tooltip labels near the highlighting box appear and tell the id\/tag name\/outer HTML\n\t*\/\n\tshowHighlightLabels: function(id, nodeName, outerHTML){\n\t\t\tif(typeof id!=\'undefined\'&&id.length!=0){\n air.Introspector.highlightLine1.text = nodeName+\' - \'+id;\n }else{\n air.Introspector.highlightLine1.text = nodeName; \n }\n if(air.Introspector.canClick){\n air.Introspector.highlightLine2.text = outerHTML.substr(0, 40).replace(\/\\n\/g, \'\\\\n\')+\'...\';\n }else{\n air.Introspector.highlightLine2.text = \'Click to activate window\';\n window.clearTimeout(air.Introspector.clickToActivateTimeout);\n air.Introspector.clickToActivateTimeout = setTimeout(function(){\n air.Introspector.highlightLine2.text = outerHTML.substr(0, 40).replace(\/\\n\/g, \'\\\\n\')+\'...\';\n }, 400)\n }\n \tair.Introspector.highlightText.visible = true;\t\n\t},\n\t\n\t\n\t\/**\n\t*\t@function registerUncaughtExceptionListener\n\t*\t@description Catches all uncaught exceptions from javascript and shows them in the console\n\t*\/\n\tregisterUncaughtExceptionListener: function(){\n\t\t\n\t\t\tair.Introspector.addEventListener(window.htmlLoader,\n\t\t\t\t\truntime.flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION , \n\t\t\t\t\tfunction(e){\n\t\t\t\t\t\tif(e.exceptionValue && \n\t\t\t\t\t\t\t\te.exceptionValue.air_Introspector_setParentSandboxBridge == true &&\n\t\t\t\t\t\t\t\te.exceptionValue.air_Introspector_version == air.Introspector.version)\n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tair.Introspector.registerFramesParentSandboxBridge();\n\t\t\t\t\t\t\t\te.preventDefault();\n\t\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tair.Introspector.logError(e.exceptionValue, {htmlLoader:window.htmlLoader});\n\t\t\t\t\t\t\/\/\te.preventDefault();\n\t\t \t});\n\t\t\n\t\t\n\t},\n\n\n\t\/**\n\t*\t@function registerCloseEventListener\n\t*\t@description \n\t*\/\n\tregisterCloseEventListener: function(){\n\t\tair.Introspector.addEventListener(window.nativeWindow, air.Introspector.runtime.Event.CLOSE, function(){\n\t var debugWindow = air.Introspector.findDebugWindow();\n\t if(debugWindow!=null){\n\t debugWindow.closedWindow(window.htmlLoader);\n\t }\n\t\n\t });\n\t\t\t\n\t\t\n\t},\n\n\t\/**\n\t*\t@function registerCompleteEventLisener\n\t*\t@description Make the Introspector window knwo that we are complete. Register parentSandboxBridge on every frame\n\t*\/\n\tregisterCompleteEventListener: function(){\n\t\tair.Introspector.addEventListener(window.htmlLoader, air.Introspector.runtime.Event.COMPLETE, function(){\n\t\t\t\t\tair.Introspector.removeEventListener(window.htmlLoader, air.Introspector.runtime.Event.COMPLETE, arguments.callee);\n\t\t\t\t\ttry{\n\t\t \t \/\/announce the debugWindow to refresh DOM and assets\n\t\t\t var debugWindow = air.Introspector.findDebugWindow();\n\t\t\t if(debugWindow!=null){\n\t\t\t \tif(debugWindow.isLoaded){\n\t\t\t debugWindow.completeWindow(window.htmlLoader);\n\t\t\t \t}\n\t\t\t }\n\t\t\t\t\t\n\t\t\t\t\t\tair.Introspector.registerFramesParentSandboxBridge();\n\t\t\t\t\t}catch(e){\n\t\t\t\t\t\truntime.trace(e);\n\t\t\t runtime.trace(e.line);\n\t\t\t\t\t\tair.Introspector.Console.log(e);\n\t\t\t\t\t}\n\t\t\t});\n\t},\n\n\t\/**\n\t*\t@function registerFramesParentSandboxBridge\n\t*\t@description All frames should know about us - registering parentSandboxBridge\n\t*\/\n\t\n\tregisterFramesParentSandboxBridge: function(){\n\t\t\t\/\/var modified = false;\n\t\t\tvar iframes = document.getElementsByTagName(\'iframe\');\n\t\t\tfor(var i=iframes.length-1;i>=0;i--){\n\t\t\t\tair.Introspector.registerFrame(iframes[i]);\n\t\t\t}\n\n\t\t\tvar frames = document.getElementsByTagName(\'frame\');\n\t\t\tfor(var i=frames.length-1;i>=0;i--){\n\t\t\t\tair.Introspector.registerFrame(frames[i]);\t\t\t\t\n\t\t\t}\n\t\t\t\/\/return modified;\n\t},\n\t\n\t\/**\n\t*\t@function registerDeactivateEventLisener\n\t*\t@description Hides the highlighting rectangle and deactivates inspect-clicking for this window\n\t*\/\n\tregisterDeactivateEventListener: function(){\n\t\t\tair.Introspector.addEventListener(window.nativeWindow, air.Introspector.runtime.Event.DEACTIVATE, function(){ air.Introspector.hideHighlight(); air.Introspector.canClick =false; });\n\t},\n\t\n\t\/**\n\t*\t@function registerChildSandboxBridge\n\t*\t@description Register childSandboxBridge for current iframe\n\t*\/\n\tregisterChildSandboxBridge: function(){\n\t\t\n\t\tif(typeof childSandboxBridge==\'undefined\')\n\t\t\tchildSandboxBridge={};\n\t\t\ttry{\n\t\tchildSandboxBridge.air_Introspector_remoteClick = function (){\n\t\t\ttry{\n\t\t\t\tair.Introspector.remoteClick();\n\t\t\t}catch(e){ alert(e+\' \'+e.line); }\n\t\t}\n\t\t\n\t\tchildSandboxBridge.air_Introspector_isDebugOpen = function(){\n\t\t\treturn typeof air.Introspector.debugWindow!=\'undefined\';\n\t\t}\n\t\t\n\t\tchildSandboxBridge.air_Introspector_toggleInspect = function (){\n\t\t\tair.Introspector.init(false, true, function()\n\t\t\t{\n \tair.Introspector.debugWindow.toggleInspect();\t\t\t\t\t\t\t\n\t\t\t});\n\t\t}\n\t\t\n\t\tchildSandboxBridge.air_Introspector_bridgeLoaded = function(){\n\t\t\tvar l = air.Introspector.bridgeCallbacks;\n\t\t\tfor(var i=0;i<l;i++){\n\t\t\t\ttry{\n\t\t\t\t\tair.Introspector.bridgeCallbacks[i]();\n\t\t\t\t}catch(e){\n\t\t\t\t\tair.Introspector.logError(e);\n\t\t\t\t}\n\t\t\t}\n\t\t\tair.Introspector.bridgeCallbacks = [];\n\t\t}\n\t\t\t}\n\t\t\tcatch(e){}\n\t},\n\t\n\t\/**\n\t*\t@function createOpenConsoleButton\n\t*\t@description Creates a button on the top-right corent of the iframe that will open the introspector\n\t*\/\n\tcreateOpenConsoleButton: function(){\n\t\tvar consoleButton = document.createElement(\'input\');\n\t\tconsoleButton.onclick = function(){\n\t\t\tair.Introspector.init(true, true, function(){ });\n\t\t}\n\t\tconsoleButton.style.zIndex = 1000000;\n\t\tconsoleButton.style.position = \'fixed\';\n\t\tconsoleButton.style.right = \'10px\';\n\t\tconsoleButton.style.top = \'10px\';\n\t\tconsoleButton.type = \'button\';\n\t\tconsoleButton.value = \'Open Introspector\';\n\t\tdocument.body.appendChild(consoleButton);\t\t\t\t\t\t\t\t\n\t},\n\t\n\t\/**\n\t*\t@function registerDOMEventListeners\n\t*\t@description Registers DOMSubtreeModified, DOMCharacterDataModified, mouseover\n\t*\/\n\tregisterDOMEventListeners: function(){\n\t\tvar hoverTimeout = null;\n\t\t\/\/debugWindow should know about any dom change\n\t\tdocument.addEventListener(\'DOMSubtreeModified\', function(e){\n var debugWindow = air.Introspector.findDebugWindow();\n if(debugWindow!=null&&debugWindow.isLoaded){\n\t\t\t\tdebugWindow.dom3Event(e);\n }\n\t\t});\n\t\tdocument.addEventListener(\'DOMCharacterDataModified\', function(e){\n var debugWindow = air.Introspector.findDebugWindow();\n if(debugWindow!=null&&debugWindow.isLoaded){\n\t\t\t\tdebugWindow.dom3Event(e);\n }\n\t\t});\n\t\t\n\n document.body.addEventListener(\'mouseover\', function(e){\n if(air.Introspector.inspect){\n\t\t\t\tsetTimeout(function(){\n\t\t\t\t\tif(isAppSandbox){\n\t\t\t\t\t\t\tif(!nativeWindow.active)\n\t\t\t\t\t\t\t\tnativeWindow.activate();\n\t\t\t\t\t}\n if(e.srcElement){\n\t\t\t\t\t\tif(isAppSandbox){\n \tair.Introspector.highlightElement(e.srcElement);\n\t\t\t\t\t\t\tair.Introspector.showHighlightLabels(e.srcElement.id, e.srcElement.nodeName, e.srcElement.outerHTML);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tair.Introspector.highlightElement(e.srcElement, function(){\n\t\t\t\t\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\t\t\t\t\tparentSandboxBridge.air_Introspector_showHighlightLabels(e.srcElement.id, e.srcElement.nodeName, e.srcElement.outerHTML);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t});\t\t\t\t\t\t\t\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(hoverTimeout) clearTimeout(hoverTimeout);\n\t\t\t\t\t\thoverTimeout = setTimeout(function(){\n\t air.Introspector.init(false, true, function (){\n\t\t\t\t\t\t\t\tair.Introspector.debugWindow.setInspectElement(e.srcElement);\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t}, 100); \n }else{\n air.Introspector.hideHighlight();\n }\n\t\t\t\t}, 0);\n }else if(isAppSandbox){\n\t\t\t\t\t\tair.Introspector.lastElement = e.srcElement;\n\t\t\t }\n\n }, true);\n\n\t\t\/\/document.body.addEventListener(\'mouseout\', function(e){\n\t\t\/\/\t\tair.Introspector.hideHighlight();\n \/\/});\n\t},\n\t\n\t\/**\n\t*\t@function cleanup\n\t*\t@description Cleans up the html loader\n\t*\n\t*\/\n cleanup: function(){\n\t\t\tfor(var i=eventListeners.length-1;i>=0;i--){\n\t\t\t\tvar l = eventListeners[i];\n\t\t\t\ttry{\n\t\t\t\t\tl[0].removeEventListener(l[1], l[2], l[3]);\t\n\t\t\t\t}catch(e){}\n\t\t\t}\n\t\t\teventListeners = [];\n\t\t\ttry{\n\t\t \twindow.htmlLoader.stage.removeChild(air.Introspector.highlightText); \n\t\t\t}catch(e){}\t \n\t},\n\t\n\t\/**\n\t*\t@function register\n\t*\t@description Registers current window in debugger\n\t*\n\t*\tCaptures every XHR object created and any uncaught exception \n\t*\tand sends it to the debugger\n\t*\/\n register: function(){\n \t\n \tif (window.XMLHttpRequest && window.XMLHttpRequest.prototype){\n window.XMLHttpRequest.prototype.debugopen = window.XMLHttpRequest.prototype.open;\n\t\t\t\t\twindow.XMLHttpRequest.prototype.debugsend = window.XMLHttpRequest.prototype.send;\n window.XMLHttpRequest.prototype.open = function(method, url, asyncFlag, username, password){\n\t\t\t\t\t\tif(typeof this.doNotDebug==\'undefined\'){\n\t \t var debugWindow = air.Introspector.findDebugWindow();\n\t\t\t if(debugWindow!=null){\n\t\t\t\t\t\t\t\tdebugWindow.logNet(this, method, url, asyncFlag);\n\t\t\t }\n\t\t\t\t\t\t}\n return this.debugopen(method, url, asyncFlag, username, password);\n };\n\t\t\t\t\twindow.XMLHttpRequest.prototype.send = function(obj){\n\t\t\t\t\t\tif(typeof this.doNotDebug==\'undefined\'){\n\t \t var self = this;\n\t\t\t\t\t\t\tvar debugWindow = air.Introspector.findDebugWindow();\n\t\t\t\t if(debugWindow!=null){\n\t\t\t\t\t\t \tvar a = this.onreadystatechange;\n\t\t this.onreadystatechange = function(){\n\t\t \t if (typeof a == \'function\')a.call(self);\n\t\t \t \tdebugWindow.logNet(self, \'unknown\', \'\', false);\n\t\t\t\t };\n\t\t\t\t\t\t\t\tif(typeof self.doNotDebug==\'undefined\')\n\t\t \t debugWindow.logNetSend(this, obj);\n\t\t\t }\n\t var ret = this.debugsend(obj);\n\t\t\t\t\t\t\tif(debugWindow!=null){\n\t\t\t\t\t\t\t\t\tdebugWindow.logNetSend(this, obj);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\treturn ret;\n\t\t\t\t\t\t}else{\n\t return this.debugsend(obj);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t}\n }\n\n\t\tif(isAppSandbox){ \n\t\t\t\tair.Introspector.addKeyboardEvents(window.htmlLoader.stage);\n\t\t\t\tair.Introspector.registerUncaughtExceptionListener();\n\t\t\t\tair.Introspector.registerCloseEventListener();\n\t\t\t\tair.Introspector.registerCompleteEventListener();\n\t \tair.Introspector.registerDeactivateEventListener();\n\t \t\t air.Introspector.createHighlight();\n\t\t\t}else{\n\t\t\t\tair.Introspector.registerChildSandboxBridge();\n\t\t\t}\n\t\t\tair.Introspector.waitForBody(document, function(){\n\t\t try{\n\t\t\t\t\tif(!isAppSandbox){ air.Introspector.createOpenConsoleButton(); }\n\t\t\t\t\tair.Introspector.registerDOMEventListeners();\n\t\t\t\t\twindow.addEventListener(\'unload\', function(){\n\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\tair.Introspector.cleanup();\n\t\t\t\t\t\t\tif(!isAppSandbox){\n\t\t\t\t\t\t\t\t\/\/our debugger can NOT live without it\'s parent\n\t\t\t\t\t\t\t\tair.Introspector.debugWindow.window.close();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}catch(e){ }\n\t\t\t\t\t});\n\t\t\t\t}catch(e){\n\t\t\t\t\tif(isAppSandbox){ \n\t\t\t\t\t\truntime.trace(e);\n\t\t \truntime.trace(e.line);\n\t\t\t\t\t}\n\t\t\t\t\tair.Introspector.Console.log(e);\n \t}\n\t });\n\n\t\n },\n\n\n\t\/**\n\t*\t@function registerFrame\n\t*\t@description Makes the parentSandboxBridge available to frame \n\t*\/\n\tregisterFrame: function(frame){\n\t\tif(typeof frame.contentWindow.parentSandboxBridge==\'undefined\')\n\t\t\tframe.contentWindow.parentSandboxBridge = {};\n\t\t\t\n\t\t\/*frame.contentWindow.parentSandboxBridge.trace = function(a){\n\t\t\truntime.trace(a);\n\t\t};*\/\n\t\t\/\/checking that the bridge is not already there\n\t\t\/*var modified = typeof frame.contentWindow.parentSandboxBridge.air_Introspector_hideHighlight==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_showHighlight==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_drawRect==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_setInspect==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_getWindowTitle==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_checkNativeWindow==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToClipboard==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToFile==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_writeConfigFile==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_readConfigFile==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_showHighlightLabels==\'undefined\'\n\t\t\t|| typeof frame.contentWindow.parentSandboxBridge.air_Introspector_getFrameId==\'undefined\';*\/\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_hideHighlight = function(){\n\t\t\t\tair.Introspector.hideHighlight();\n\t\t};\n\t\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_showHighlight = function(rect){\n\t\t\t\tair.Introspector.showHighlight(rect);\n\t\t};\n\t\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_drawRect = function(rect, tagName){\n\t\t\t\tvar frameRect = air.Introspector.getBorderBox(frame);\n\t\t\t\tvar blw = air.Introspector.getIntProp(frame, \"border-left-width\");\n var btw = air.Introspector.getIntProp(frame, \"border-top-width\");\n\t\t\t\tif(frameRect==null) return;\n\t\t\t\trect.x+=frameRect.x+2*blw;\n\t\t\t\trect.y+=frameRect.y+2*btw;\n\t\t\t\tair.Introspector.drawRect(rect, tagName);\n\t\t};\n\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_setInspect = function(enabled){\n\t\t\t\tair.Introspector.inspectFrame = enabled?frame:null;\n\t\t\t\tair.Introspector.remoteInspect = enabled;\n\t\t\t\tif(!enabled){\n\t\t\t\t\tair.Introspector.hideHighlight();\n\t\t\t\t}\n\t\t};\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_getWindowTitle = function(){\n\t\t\treturn document.title;\n\t\t};\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_checkNativeWindow = function(title){\n\t\t\tvar htmlWindows = air.Introspector.runtime.NativeApplication.nativeApplication.openedWindows;\n\t\t\tfor(var i=htmlWindows.length-1;i>=0;i--){\n\t\t\t\tif(htmlWindows[i].title==title){\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn false;\n\t\t};\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToClipboard = function(str){\n\t\t\tair.Introspector.writeConsoleToClipboard(str);\n\t\t};\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_writeConsoleToFile = function(str){\n\t\t\tair.Introspector.writeConsoleToFile(str);\n\t\t};\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_writeConfigFile = function(config){\n\t\t\treturn air.Introspector.writeConfigFile(config, true);\t\t\t\n\t\t}\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_readConfigFile = function(){\n\t\t\treturn air.Introspector.readConfigFile(true);\n\t\t}\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_showHighlightLabels = function(id, nodeName, outerHTML){\n\t\t\tair.Introspector.showHighlightLabels(id, nodeName, outerHTML);\n\t\t};\n\t\t\n\t\tframe.contentWindow.parentSandboxBridge.air_Introspector_getFrameId = function(){\n\t\t\treturn frame.id;\n\t\t}\n\t\t\n\t\tif(typeof frame.contentWindow.childSandboxBridge!=\'undefined\'\n\t\t\t\t&& typeof frame.contentWindow.childSandboxBridge.air_Introspector_bridgeLoaded!=\'undefined\'){\n\t\t\tframe.contentWindow.childSandboxBridge.air_Introspector_bridgeLoaded();\n\t\t}\n\t\t\n\t\t\n\t\t\/\/return modified;\n\t},\n\t\n\t\/**\n\t*\t@function waitForBody\n\t*\t@description Wait until document.body is available\n\t*\/\n\twaitForBody: function(document, callback){\n\t\tif(document.body){\n\t\t\tcallback();\n\t\t}else{\n\t\t\tsetTimeout(air.Introspector.waitForBody, 10, document, callback);\n\t\t}\n\t},\n \n\t\/**\n\t*\t@function toggleWindow\n\t*\t@description Shows\/Hides the debug tool\n\t*\/\n toggleWindow:function(){\n air.Introspector.init(true, false, function(justCreated){\n\t\t\tif(!justCreated)\n\t\t\t\tair.Introspector.debugWindow.nativeWindow.visible ^= true;\n\t\t});\n \n },\n\t\n\t\n\t\/**\n\t*\t@function init\n\t*\t@description Makes sure the debug tool is enabled\n\t*\/\n init: function(showLoader, toggle, callback){\n\t\tif(!air.Introspector.canInit())\n\t\t\treturn;\n\t\n\t\tif(typeof showLoader==\'undefined\') showLoader = false;\n\t\tif(typeof toggle==\'undefined\') toggle = true;\n\t\n\t\tif(isAppSandbox){\n\t\t\t\n\t\t\tif(typeof air.Introspector.debugWindow==\'undefined\' || air.Introspector.debugWindow.nativeWindow.closed){\n\t\t\t\tdelete air.Introspector.debugWindow;\n\t var debugWindow = air.Introspector.findDebugWindow();\n\t if(debugWindow!=null && !debugWindow.nativeWindow.closed){\n\t air.Introspector.debugWindow = debugWindow;\n\t\t\t\tif(toggle){\n\t\t\t\t\tair.Introspector.debugWindow.nativeWindow.visible = true;\t\t\t \n\t\t\t\t\tif(!showLoader){\n\t\t\t\t\t\tnativeWindow.activate();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcallback(false);\n\t }else{\n\t\t\t\t air.Introspector.loadDebugger(function(debugWindow){\n\t\t\t\t\t\tair.Introspector.debugWindow = debugWindow;\n\t\t\t\t\t\tcallback(true);\n\t\t\t\t }, showLoader);\n\t }\n\t }else{\n\t\t\t\tif(toggle){\n\t\t\t\t\tif(showLoader){\n\t\t\t\t\t\tair.Introspector.debugWindow.nativeWindow.activate(); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcallback(false);\n\t\t\t}\n\t\t}else{\n\t\t\tif(typeof activeWindow==\'undefined\'){\n\t\t\t\tair.Introspector.registerChildSandboxBridge();\n\t\t\t}\n\t\t\t\n\t\t\tif(typeof air.Introspector.debugWindow==\'undefined\'||\n\t\t\t\ttypeof air.Introspector.debugWindow.window.air==\'undefined\'){ \n\/*\t\t\t\t(air.Introspector.debugWindow.isWindowCreated\n\t\t\t\t\t&&air.Introspector.debugWindow.isLoaded \n\t\t\t\t\t &&air.Introspector.debugWindow.window \n\t\t\t\t\t\t&&!parentSandboxBridge.air_Introspector_checkNativeWindow(air.Introspector.parentWindowTitle + \': \'+air.Introspector.debugWindow.window.document.title))){*\/\n\t\t\t\tdelete air.Introspector.debugWindow;\n\n\n\t\t\t\tair.Introspector.loadDebugger(function(debugWindow){\n\t\t\t\t\t\tair.Introspector.debugWindow = debugWindow;\n\t\t\t\t\t\tcallback(true);\n\t\t\t\t });\n\/\/\t\t\t\tair.Introspector.debugWindow = new air.Introspector.DebugWindow ({activateDebug: showLoader, activeWindow: window});\n\t\t\t}else if(!air.Introspector.debugWindow.isWindowCreated){\n\t\t\t\treturn;\n\t\t\t}else{\n\t\t\t\tcallback(false);\n\t\t\t}\n\t\t}\n },\n times:0,\t\/\/make the window.open page name unique - this is the number of opened and closed introspector windows\n\t\/**\n\t*\t@function tryCreateWindow\n\t*\t@description window.Open in browser\/remote sandbox is not allowed if the action is not iniated by the user (eg. user gesture, mouse click)\n\t*\t\t\t\t We can only wait for that moment. Until that happends we record all the callbacks and run them when the Introspector is laoded \n\t*\t@runs in remote sandbox only\n\t*\/\n\ttryCreateWindow: function(callbacks){\n\/\/\t\ttry{\n\t\t\tvar self = this;\n\t\t\tvar w;\n\t\t\tvar iframeId;\n\t\t\t\n\/*\t\t\tif(typeof parentSandboxBridge==\'undefined\'){\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tair.Introspector.tryCreateWindow(callbacks);\t\t\t\t\t\n\t\t\t\t});\n\t\t\t\treturn;\n\t\t\t}*\/\n\n\t\t\tair.Introspector.parentWindowTitle = parentSandboxBridge.air_Introspector_getWindowTitle();\n\n\t\t\tif(typeof parentSandboxBridge!=\'undefined\'&&typeof parentSandboxBridge.air_Introspector_getFrameId!=\'undefined\')\n\t\t\t\tiframeId = parentSandboxBridge.air_Introspector_getFrameId();\n\t\t\t\n\t\t\tair.Introspector.times++;\n\t\t\t\n\t\t\tif(typeof air.Introspector.config.useAirDebugHtml==\'undefined\'||air.Introspector.config.useAirDebugHtml==false){\n\t\t\t\tw = window.open(\'about:blank\', \'debugger\'+air.Introspector.times, \'width=640,height=480,resizable=1\');\n\t\t\t\tif(w&&w.document){\n\t\t\t\t\tw.isAppSandbox = isAppSandbox;\n\t\t\t\t\tw.opener = window;\n\t\t\t\t\tw.iframeId = iframeId;\n\t\t\t\t\tw.initCallbacks = callbacks;\t\n\t\t\t\t\tw.activeWindow = window;\n\t\t\t\t\tw.isLoaded = false;\n\t\t\t\t\tw.config = air.Introspector.config;\n\t\t\t\t\tw.document.write(air.Introspector.contentString);\n\t\t\t\t\tw.document.close();\n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\tw = window.open(\'DebugUI.html\', \'debugger\'+air.Introspector.times, \'width=640,height=480,resizable=1\');\n\t\t\t\t\n\t\t\t\tif(w&&w.document){\n\t\t\t\t\tw.opener = window;\n\t\t\t\t\tw.iframeId = iframeId;\n\t\t\t\t\tw.activeWindow = window;\t\t\t\t\n\t\t\t\t\tw.config = air.Introspector.config;\n\t\t\t\t\tw.initCallbacks = callbacks;\t\t\t\t\n\t\t\t\t\tw.isLoaded = false;\n\t\t\t\t\tw.isAppSandbox = isAppSandbox;\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn w;\n\/\/\t\t}catch(e){\n\/\/\t\t\talert(e+\' \'+e.line);\n\/\/\t\t}\n\t},\n\t\n\t\/**\n\t*\t@function loadDebugger\n\t*\t@description Loads the debugger window, register callbacks until it is ready\n\t*\t@runs in application sandbox only\n\t*\/\n\tloadDebugger: function(callback, activateDebug){\n\t\t\tvar htmlLoader;\n\t\t\tvar loadDebugger = arguments.callee;\n\t\t\tif(loadDebugger.htmlLoader && typeof loadDebugger.htmlLoader.window.isLoaded != \'undefined\'){\n\t\t\t\tif(loadDebugger.htmlLoader.window.isLoaded){\n\t\t\t\t\tcallback(loadDebugger.htmlLoader.window.debugWindow);\n\t\t\t\t}else{\n\t\t\t\t\tif(loadDebugger.htmlLoader.window.initCallbacks){\n\t\t\t\t\t\tloadDebugger.htmlLoader.window.initCallbacks.push(callback); \n\t\t\t\t\t}else{\n\t\t\t\t\t\tloadDebugger.initCallbacks.push(callback); \t\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tif(typeof loadDebugger.initCallbacks==\'undefined\'){\n\t\t\t\tloadDebugger.initCallbacks = [function(){\n\t\t\t\t\tdelete loadDebugger.initCallbacks;\n\t\t\t\t}, callback];\n\t\t\t}else{\n\t\t\t\tloadDebugger.initCallbacks.push(callback);\n\t\t\t}\n\t\t\tif(isAppSandbox){\n\t\t\t htmlLoader = air.Introspector.runtime.HTMLLoader.createRootWindow(false);\n\t\t\t air.Introspector.addEventListener(htmlLoader, air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, function(){\n\t\t\t\t\ttry{ \n\t\t\t\t\t\tair.Introspector.removeEventListener(htmlLoader, air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, arguments.callee);\n\t\t\t\t\t\thtmlLoader.window.initCallbacks = loadDebugger.initCallbacks;\n\t\t\t\t\t\thtmlLoader.window.isLoaded = false;\n\t\t\t\t\t\thtmlLoader.window.config = air.Introspector.config;\n\t\t\t\t\t\thtmlLoader.window.activateDebug = activateDebug;\n\t\t\t\t\t\thtmlLoader.window.isAppSandbox = isAppSandbox;\n\t\t\t\t\t}catch(e){ \n\t\t\t\t\t\tair.Introspector.runtime.trace(e); \n\t\t\t\t\t\tair.Introspector.runtime.trace(e.line); \n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t\thtmlLoader.window.isLoaded = false;\n\n\t\t\t var nativeWindow = htmlLoader.stage.nativeWindow;\n\t\t\t\tnativeWindow.width = 640;\n\t\t\t\tnativeWindow.height = 480;\n\t\t\t air.Introspector.addEventListener(htmlLoader, runtime.flash.events.HTMLUncaughtScriptExceptionEvent.UNCAUGHT_SCRIPT_EXCEPTION, function(e){\n\t\t\t air.Introspector.logError(e.exceptionValue, {htmlLoader: self.htmlLoader});\n\t\t\t e.preventDefault();\n\t\t\t });\n\t\t\t if(typeof air.Introspector.config.useAirDebugHtml==\'undefined\'||air.Introspector.config.useAirDebugHtml==false){\n\t\t\t htmlLoader.loadString(air.Introspector.contentString);\n\t\t\t }else{\n\t\t\t htmlLoader.load(new air.Introspector.runtime.URLRequest(\'app:\/DebugUI.html\'));\n\t\t\t }\n\t\t\t}else{\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tvar w = air.Introspector.tryCreateWindow(loadDebugger.initCallbacks);\n\t\t\t\t\tif(w){\n\t\t\t\t\t\tvar htmlLoader = {window: w};\t\n\t\t\t\t\t\tloadDebugger.htmlLoader = htmlLoader;\t\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\t\n\t\t\tloadDebugger.htmlLoader = htmlLoader;\t\t\n\t},\n\n\t\/**\n\t*\t@function findDebugWindow\n\t*\t@description Look up the Introspector in other windows. Maybe somebody else just opened it before us. \n\t*\/\n findDebugWindow: function(){\n\t\tif(isAppSandbox){\n\t\t\ttry{\n\t \t\tif(air.Introspector.debugWindow&&air.Introspector.debugWindow.nativeWindow.closed==false)\n\t\t \t return air.Introspector.debugWindow;\n\t\t\t}catch(e){\n\t\t\t}\n\t\t\ttry{\n\t\t var htmlWindows = air.Introspector.getHtmlWindows(true);\n\t\t for(var i=htmlWindows.length-1;i>=0;i--){\n\t\t try{\n\t\t if(typeof htmlWindows[i].htmlLoader.window.air!=\'undefined\'\n\t\t && typeof htmlWindows[i].htmlLoader.window.air.Introspector!=\'undefined\'\n\t\t && typeof htmlWindows[i].htmlLoader.window.air.Introspector.debugWindow!=\'undefined\'\n\t\t\t\t\t\t\t\t&& htmlWindows[i].htmlLoader.window.air.Introspector.debugWindow.nativeWindow.closed==false \n\t\t\t\t\t\t\t\t\t&& htmlWindows[i].htmlLoader.window.isAppSandbox )\n\t\t {\n\t\t return htmlWindows[i].htmlLoader.window.air.Introspector.debugWindow;\n\t\t }\n\t\t }catch(e){\n\t\t \/\/this window is not initialized yet\n\t\t \/\/just get next window\n\t\t }\n\t\t }\n\t\t\t}catch(e){}\n\t\t}else{\n\t\t\treturn air.Introspector.debugWindow;\n\t\t}\n return null;\n },\n\n\t\/\/application browser formats\n\t\/\/\t\t0 - text\n\t\/\/\t\t1 - images\n\t\/\/\t\t2 - xml (you may want to add your own xml type here)\n formats : { \'png\':1, \'gif\':1, \'zip\':1, \'air\':1, \'jpg\':1, \'jpeg\':1,\n \'txt\':0, \'html\':0, \'js\':0, \'xml\':2, \'opml\':2, \'css\':0, \'htm\':0, \'\':0 },\n \n\n\t\/**\n\t*\t@function canInit\n\t*\t@description Check if we got parentSandboxBridge available\n\t*\t@disabled \n\t*\/\n\tcanInit: function(){\n\/*\t\tif(!isAppSandbox&&typeof parentSandboxBridge==\'undefined\'){\n\t\t\talert(\'You need to include AIRIntrospector.js in application sandbox too!\');\n\t\t\treturn false;\n\t\t}*\/\n\t\treturn true;\n\t},\n\n\t\/**\n\t*\t@function logArguments\n\t*\t@description \n\t*\/\n\tlogArguments: function(args, config){\n\t\tif(!air.Introspector.canInit()) return;\n\t\tconfig.timestamp = new Date();\n \tair.Introspector.init(config.type==\'error\', true, function(){\n\t\t\tair.Introspector.debugWindow.logArguments(args, config);\n\t\t});\n \n },\n \/**\n\t*\t@function logError\n\t*\t@description \n\t*\/\n logError: function(error, config){\n air.Introspector.init(false, true, function(){\n\t\t\tair.Introspector.debugWindow.logError(error, config);\n\t\t});\n },\n \n\t\/**\n\t*\t@function showCssElement\n\t*\t@description \n\t*\/\n\tshowCssElement: function(element){\n\t\tvar debugWindow = air.Introspector.findDebugWindow();\n\t\tif(debugWindow){\n\t\t\tdebugWindow.showCssElement(element);\n\t\t}\n\t},\n\n\t\/**\n\t*\t@function findLoader\n\t*\t@description Finds the first HTMLLoader in flash display object list\n\t*\/\n findLoader: function (stage){\n\t\ttry{\n\t for(var i=stage.numChildren-1;i>=0;i--){\n\t var child = stage.getChildAt(i);\n\t\t\t\tvar str=child.toString();\n\t if(str==\'[object HTMLLoader]\'||child.name==\"FlexHTMLLoader7\"){\n\t return child;\n\t }\n\t }\n\t for(var i=stage.numChildren-1;i>=0;i--){\n\t var child = stage.getChildAt(i);\n\t\t\t\tvar loader = air.Introspector.findLoader(child);\n\t\t\t\tif(loader!=null)\n\t\t\t\t\treturn loader;\n\t\t\t}\n\t\t}catch(e){\n\t\t}\n return null;\n }, \n \n\t\/**\n\t*\t@function getHtmlWindows\n\t*\t@description Returns an array of all HTML windows\n\t*\/\n getHtmlWindows: function(includeInspectors){\n\t\tif(isAppSandbox){\n \t var windowNodes = [];\n\t var windows = air.Introspector.runtime.NativeApplication.nativeApplication.openedWindows;\n\t for(var i=windows.length-1;i>=0;i--){\n\t var loader = air.Introspector.findLoader(windows[i].stage);\n\t if(loader!=null){\n\t\t\t\t\tif(typeof includeInspectors==\'undefined\' && typeof loader.window!=\'undefined\' && typeof loader.window.air!=\'undefined\' && typeof loader.window.air.Introspector!=\'undefined\' &&\n\t\t\t\t\t\ttypeof loader.window.air.Introspector.localIframeDebug != \'undefined\' )\n\t\t\t\t\t\t\tcontinue;\n\t windowNodes.push({\n\t nativeWindow: windows[i],\n\t stage: windows[i].stage,\n\t htmlLoader : loader\n\t });\n\t }\n\t }\n\t return windowNodes;\n\t\t}else{\n\t\t\t\/\/should not be here\n\t\t\treturn [];\n\t\t}\n },\n \n\t\/**\n\t*\t@function twoDigits\n\t*\t@description int 2 string with two digits\n\t*\/\n\ttwoDigits: function(val){\n\t if(val<10) return \'0\'+val;\n\t return val+\'\';\n\t},\n\n\t\/**\n\t*\t@function escapeHtml\n\t*\t@description Escapes html in order to display it in html\n\t*\/\n\tescapeHtml: function(html){ \n\t return (html+\'\').replace(\/&\/g, \'&\').replace(\/\"\/g, \""\").replace(\/<\/g, \'<\').replace(\/>\/g, \'>\');\n\t},\n\n \ttree: { },\n\n\n\t\/**\n\t*\t@function isNumberObject\n\t*\t@description \n\t*\/\n\tisNumberObject: function(obj){\n\t try{\n\t \/\/can we catch isNaN only for NaN\n\t return (obj+0==obj&&!isNaN(obj));\n\t }catch(e){\n\t }\n\t return false;\n\t },\n\n\t\/**\n\t*\t@function isStringObject\n\t*\t@description \n\t*\/\n\tisStringObject: function(obj){\n\t try{\n\t return (typeof(obj.match) != \"undefined\" && obj.match.toString().indexOf(\"[native code]\")>0);\n\t }catch(e){\n\t }\n\t return false;\n\t},\n\n\t\/**\n\t*\t@function isDateObject\n\t*\t@description \n\t*\/\n\tisDateObject: function(obj){\n\t try{\n\t return (typeof(obj.getDate) != \"undefined\" && obj.getDate.toString().indexOf(\"[native code]\")>0);\n\t }catch(e){\n\t }\n\t return false;\n\t},\n\n\t\/**\n\t*\t@function isArgumentsObject\n\t*\t@description \n\t*\/\n isArgumentsObject: function(obj){\n try{\n return obj.toString()==\'[object Arguments]\';\n }catch(e){\n }\n return false;\n },\n\n\t\/**\n\t*\t@function isXMLObject\n\t*\t@description \n\t*\/\n\tisXMLObject: function(obj){\n\t\ttry{\n\t\t\tif(obj.xmlVersion&&obj.firstChild!=null)\n\t \treturn obj.xmlVersion!=\'\';\n\t }catch(e){\n\t }\n\t return false;\n\t},\n\n\t\/**\n\t*\t@function isArrayObject\n\t*\t@description \n\t*\/\n\tisArrayObject: function(obj){\n try{\n return (typeof(obj.push) != \"undefined\" && obj.push.toString().indexOf(\"[native code]\")>0);\n }catch(e){\n }\n return false;\n\t},\n\n\t\/**\n\t*\t@function isItemNative\n\t*\t@description \n\t*\/\n\tisItemNative: function(obj){\n try{\n return (typeof(obj.item) != \"undefined\" && obj.item.toString().indexOf(\"[native code]\")>0);\n }catch(e){\n }\n return false;\n\t},\n \n\n\t\/**\n\t*\t@function dump\n\t*\t@description \n\t*\/\n\n\tdump: function (obj, levels, level){\n\t\tif(air.Introspector.isArgumentsObject(obj)&&obj.length==1)\n\t\t\treturn air.Introspector.dump(obj[0]);\n\t\tif(typeof levels==\'undefined\') { levels=1; }\n\t\tif(typeof level==\'undefined\') { level=0; }\t\t\n try{\n if(typeof obj==\'undefined\'){ return \'[undefined]\'; }\n\t\t\tif(obj==null){\treturn \'[null]\'; }\n\t\t\tvar list = [];\n\/\/ if(air.Introspector.isXMLObject(obj)){\n\/\/\t\tdisable for the moment\n\/\/ \treturn;\n\/\/ } \n\t\t\tif(air.Introspector.isStringObject(obj)\n\t\t\t\t||air.Introspector.isNumberObject(obj)\n\t\t\t\t\t||air.Introspector.isDateObject(obj)){\n\t\t\t\tif(level==0){\n\t\t\t\t\ttry{\n\t\t\t\t\t\treturn obj+\'\';\n\t\t\t\t\t}catch(e){ \n\t\t\t\t\t\treturn e+\'\'; \n\t\t\t\t\t};\n\t\t\t\t}\n\t\t\t\treturn\'\';\n\t\t\t}\n var isItemNative = air.Introspector.isItemNative(obj);\n var parseArray = air.Introspector.isArrayObject(obj)||air.Introspector.isArgumentsObject(obj)||isItemNative;\n var parseHash = !parseArray || isItemNative;\n if (parseArray){\n\t\t\t\tvar l = obj.length;\n \tfor(var i=0;i<l;i++){\n var value;\n try{\n value = obj[i];\n\t\t\t\t\t\tif(typeof value==\'undefined\') {value = \'[undefined]\'};\n }catch(e){\n value = e+\'\';\n }\n\t\t\t\t\tlist.push([i,value]);\n }\n } \n if(parseHash) {\n for(var i in obj){\n var value;\n try{\n value = obj[i];\n\t\t\t\t\t\tif(typeof value==\'undefined\') {value = \'[undefined]\'};\n }catch(e){\n value = e+\'\';\n }\n\t\t\t\t\tlist.push([i,value]);\n }\n }\n\n\t\t\tif(air.Introspector.config.debugRuntimeObjects){\n\t\t\t\ttry{\n\t\t\t\t\tvar typeDescription = runtime.flash.utils.describeType(obj);\n\t\t\t\t\tif(!this.domParser) this.domParser = new DOMParser();\n\t\t\t\t\tvar typeXml = this.domParser.parseFromString(typeDescription, \"text\/xml\");\n\t\t\t\t\tvar child = typeXml.firstChild.firstChild;\n\t\t\t\t\twhile(child){\n\t\t\t\t\t\tif(child.nodeName==\'accessor\'||child.nodeName==\'constant\'||child.nodeName==\'method\'||child.nodeName==\'variable\'){\n\t\t\t\t\t\t\tvar name = child.getAttribute(\'name\');\n\t\t\t\t\t\t\tif(name!=null && name!=\'prototype\'){\n\t\t\t try{\n\t\t\t\t\t\t\t\t\tlist.push([name,obj[name]]);\n\t\t\t }catch(e){\n\t\t\t\t\t\t\t\t\tlist.push([name,\'\']+\'\');\n\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}catch(e){\n\t\t\t\t\t\/\/just hide the error\n\t\t\t\t}\n }\n list.sort(function(node1, node2){\n \tvar isNode1Number = parseInt(node1[0])==node1[0];\n \tvar isNode2Number = parseInt(node2[0])==node2[0];\n \tif(isNode1Number&&isNode2Number){\n \t\treturn parseInt(node1[0])-parseInt(node2[0]);\n \t} \n \tif(isNode1Number){\n \t\treturn -1;\n \t}\n \tif(isNode2Number){\n \t\treturn 1;\n \t}\n \tif(node1[0].toLowerCase()==node2[0].toLowerCase())\n return 0;\n if(node1[0].toLowerCase()<node2[0].toLowerCase())\n return -1;\n return 1;\n });\n\t\t\tif(list.length){\n\t\t\t\tvar prefix = \'\';\n\t\t\t\tfor(var i=level;i>0;i--) prefix+=\' \';\n\t\t\t\tvar l = list.length;\n\t\t\t\tvar strList = [];\n\t\t\t\tif(parseArray)\tstrList.push(prefix+\'[\\n\');\n\t\t\t\telse\t\t\tstrList.push(prefix+\'{\\n\');\n\t\t\t\tfor(var i=0;i<l;i++){\n\t\t\t\t\ttry{\n\t\t\t\t\t\tvar zl = (list[i][0]+\'\').length+1;\n\t\t\t\t\t\tvar miniPrefix = \'\';\n\t\t\t\t\t\tfor(var j=0;j<zl;j++) miniPrefix+=\' \';\n\t\t\t\t\t\tif(typeof list[i][1]==\'function\'){\n\t\t\t\t\t\t\tstrList.push(prefix+\' \'+list[i][0]+\'=[function],\\n\');\n\t\t\t\t\t\t}else if(air.Introspector.isDateObject(list[i][1])){\n\t\t\t\t\t\t\tstrList.push(prefix+\' \'+list[i][0]+\'=\'+(new Date(list[i][1])+\'\').replace(\/\\n\/g, \'\\n\'+prefix+miniPrefix)+\',\\n\');\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tstrList.push(prefix+\' \'+list[i][0]+\'=\'+(list[i][1]+\'\').replace(\/\\n\/g, \'\\n\'+prefix+miniPrefix)+\',\\n\');\n\t\t\t\t\t\t}\n\t\t\t\t\t}catch(e){\n\t\t\t\t\t\tstrList.push(prefix+\' \'+list[i][0]+\'=\'+e+\',\\n\');\n\t\t\t\t\t}\n\t\t\t\t\tif(level<levels){\n\t\t\t\t\t\tstrList.push(air.Introspector.dump(list[i][1], levels, level+1));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tif(parseArray)\tstrList.push(prefix+\']\\n\');\n\t\t\t\telse\t\t\tstrList.push(prefix+\'}\\n\');\n\t\t\t\tif(level){\n\t\t\t\t\treturn strList.join(\'\');\n\t\t\t\t}else{\n\t\t\t\t\treturn (strList.join(\'\'));\n\t\t\t\t}\n\t\t\t}\n }catch(e){\n air.Introspector.Console.error(e);\n } \n\t\treturn \'\';\n\t},\n\n\n\n\n \/**\n\t*\t---------------------------------------------------------------------------------------\n\t*\t@extracted This is extracted from spry framework and removed support for other browsers.\n\t*\t@description Finds the precise position of the dom element node\n\t*\/ \n\t\n\t\/**\n\t*\t@function camelize\n\t*\t@description \n\t*\/\n\t\n\tcamelize : function(stringToCamelize)\n {\n if (stringToCamelize.indexOf(\'-\') == -1){\n return stringToCamelize; \n }\n var oStringList = stringToCamelize.split(\'-\');\n var isFirstEntry = true;\n var camelizedString = \'\';\n \n for(var i=0; i < oStringList.length; i++)\n {\n if(oStringList[i].length>0)\n {\n if(isFirstEntry)\n {\n camelizedString = oStringList[i];\n isFirstEntry = false;\n }\n else\n {\n var s = oStringList[i];\n camelizedString += s.charAt(0).toUpperCase() + s.substring(1);\n }\n }\n }\n \n return camelizedString;\n },\n\n\t\/**\n\t*\t@function getStyleProp\n\t*\t@description \n\t*\/\n\tgetStyleProp : function(element, prop)\n {\n var value;\n try\n {\n if (element.style)\n value = element.style[air.Introspector.camelize(prop)];\n \n if (!value)\n {\n if (document.defaultView && document.defaultView.getComputedStyle)\n {\n var css = document.defaultView.getComputedStyle(element, null);\n value = css ? css.getPropertyValue(prop) : null;\n }\n else if (element.currentStyle) \n {\n value = element.currentStyle[air.Introspector.camelize(prop)];\n }\n }\n }\n catch (e) {}\n \n return value == \'auto\' ? null : value;\n },\n \n\n\t\/**\n\t*\t@function getIntProp\n\t*\t@description \n\t*\/\n\tgetIntProp : function(element, prop){\n var a = parseInt(air.Introspector.getStyleProp(element, prop),10);\n if (isNaN(a))\n return 0;\n return a;\n },\n\n\n\t\/**\n\t*\t@function getBorderBox\n\t*\t@description \n\t*\/\n\tgetBorderBox : function (el, doc) {\n doc = doc || document;\n if (typeof(el) == \'string\') {\n el = doc.getElementById(el);\n }\n \n if (!el) {\n return false;\n }\n \n if (el.parentNode === null || air.Introspector.getStyleProp(el, \'display\') == \'none\') {\n \/\/element must be visible to have a box\n return false;\n }\n \n var ret = {x:0, y:0, width:0, height:0};\n var parent = null;\n var box;\n\n \tvar str = el.nodeName;\n\t\t\t\n ret.x = el.offsetLeft;\n ret.y = el.offsetTop;\n ret.width = el.offsetWidth;\n ret.height = el.offsetHeight;\n\n\t\t\t\tparent = el.offsetParent;\n\n if (parent != el) {\n while (parent) {\n ret.x += parent.offsetLeft;\n ret.y += parent.offsetTop;\n\t\t\t\t\t\tstr+=\':\'+parent.nodeName;\n parent = parent.offsetParent;\n }\n }\n\n\n var blw = air.Introspector.getIntProp(el, \"border-left-width\");\n var btw = air.Introspector.getIntProp(el, \"border-top-width\");\n ret.x -= blw;\n ret.y -= btw;\n \/\/ opera & (safari absolute) incorrectly account for body offsetTop\n switch (air.Introspector.getStyleProp(el, \'position\')){\n \t\t\t\t\tcase \'absolute\':\n \tret.y -= doc.body.offsetTop;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase \'fixed\':\n\t ret.y += doc.body.scrollTop;\n\t ret.x += doc.body.scrollLeft;\n\t\t\t\t\t\tbreak;\n\t\t\t\t};\n \n if (el.parentNode)\n parent = el.parentNode;\n else\n parent = null;\n \n\t\t\t\tif (parent!=null&&parent.nodeName){\n var cas = parent.nodeName.toUpperCase();\n while (parent && cas != \'HTML\') {\n cas = parent.nodeName.toUpperCase();\n ret.x -= parent.scrollLeft;\n ret.y -= parent.scrollTop;\n if (parent.parentNode)\n parent = parent.parentNode;\n else\n parent = null;\n }\n }\n\n\/*\t\t\t\tret.y -= el.ownerDocument.body.scrollTop;\n\t\t\t\tret.x -= el.ownerDocument.body.scrollLeft;\t\t\t\t\n*\/\n \/\/ adjust the margin\n var gi = air.Introspector.getIntProp;\n var btw = gi(el, \"margin-top\");\n var blw = gi(el, \"margin-left\");\n var bbw = gi(el, \"margin-bottom\");\n var brw = gi(el, \"margin-right\");\n ret.x -= blw;\n ret.y -= btw;\n ret.height += btw + bbw;\n ret.width += blw + brw;\n\n\t\t\t\/\/\tair.Introspector.Console.log(ret);\n return ret;\n },\n\n\t\/**\n\t*\t---------------------------------------------------------------------------------------\n\t*\/\n\n\t\/**\n\t*\t@function writeConfigFile\n\t*\t@description \n\t*\/\n\twriteConfigFile: function(config, fromRemoteSandbox){\n\t\tif(isAppSandbox){\n\t\t\tvar file = runtime.flash.filesystem.File.applicationStorageDirectory.resolvePath(\'AIRIntrospector\'+(fromRemoteSandbox?\'Remote\':\'\')+\'.cfg\');\n\t\t\tvar fs = new runtime.flash.filesystem.FileStream();\n\t\t\tfs.open(file, runtime.flash.filesystem.FileMode.WRITE);\n\t\t\tfs.writeObject(config);\n\t\t\tfs.close();\n\t\t}else{\n\t\t\tif(typeof activeWindow==\'undefined\'){\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tparentSandboxBridge.air_Introspector_writeConfigFile(config);\n\t\t\t\t});\n\t\t\t}else{\n\t\t\t\tactiveWindow.setTimeout(function(){\n\t\t\t\t\tactiveWindow.air.Introspector.writeConfigFile(config);\t\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t}\n\t},\n\n\n\n\t\/**\n\t*\t@function readConfigFile\n\t*\t@description \n\t*\/\n\treadConfigFile: function (fromRemoteSandbox, callback){\n\t\tif(isAppSandbox){\n\t\t\tvar file = runtime.flash.filesystem.File.applicationStorageDirectory.resolvePath(\'AIRIntrospector\'+(fromRemoteSandbox?\'Remote\':\'\')+\'.cfg\');\n\t\t\tif(file.exists){\n\t\t\t\tvar fs = new runtime.flash.filesystem.FileStream();\n\t\t\t\tfs.open(file, runtime.flash.filesystem.FileMode.READ);\n\t\t\t\tvar config = fs.readObject();\n\t\t\t\tfs.close();\n\t\t\t\treturn config;\n\t\t\t}\n\t\t}else{\n\t\t\tif(typeof activeWindow==\'undefined\'){\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tvar config = parentSandboxBridge.air_Introspector_readConfigFile();\n\t\t\t\t\tcallback(config);\n\t\t\t\t});\t\t\t\t\n\t\t\t}else{\n\t\t\t\tactiveWindow.setTimeout(function(){\n\t\t\t\t\tif(typeof activeWindow!=\'undefined\'){\n\t\t\t\t\t\tvar config = activeWindow.air.Introspector.readConfigFile(true, function(config){\n\t\t\t\t\t\t\tsetTimeout(function(){ callback(config); });\t\t\t\t\t\t\t\n\t\t\t\t\t\t});\n\t\t\t\t\t}\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t\treturn {};\n\t},\n\t\n\t\n\t\n\t\/**\n\t*\t@function writeConsoleToClipboard\n\t*\t@description \n\t*\/\n\n\twriteConsoleToClipboard: function(str){\n\t\tif(isAppSandbox){\t\t\n\t\t\truntime.flash.desktop.Clipboard.generalClipboard.clear();\n\t\t\truntime.flash.desktop.Clipboard.generalClipboard.setData(runtime.flash.desktop.ClipboardFormats.TEXT_FORMAT, \n\t\t\t\t\tstr, false);\t\t\n\t\t}else{\n\t\t\tif(typeof activeWindow==\'undefined\'){\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tparentSandboxBridge.air_Introspector_writeConsoleToClipboard(str);\n\t\t\t\t});\t\t\t\t\n\t\t\t}else{\n\t\t\t\tactiveWindow.setTimeout(function(){\n\t\t\t\t\tactiveWindow.air.Introspector.writeConsoleToClipboard(str);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\t\n\n\n\t\/**\n\t*\t@function writeConsoleToFile\n\t*\t@description \n\t*\/\n\twriteConsoleToFile: function(str){\n\t\tif(isAppSandbox){\t\t\n\t\t\tvar file = runtime.flash.filesystem.File.desktopDirectory;\n\t\t\tvar self = this;\n\t\t\tfile.addEventListener(runtime.flash.events.Event.SELECT, function(evt){ \n\t\t\t\tvar newFile = evt.target;\n \t\t\t var stream = new runtime.flash.filesystem.FileStream();\n\t\t\t stream.open(newFile, runtime.flash.filesystem.FileMode.WRITE);\n\t\t\t stream.writeUTFBytes(str);\n\t\t\t stream.close();\n\t\t\t\t});\n\t\t\tfile.browseForSave(\'Console dump file...\');\n\t\t}else{\n\t\t\tif(typeof activeWindow==\'undefined\'){\n\t\t\t\tair.Introspector.noBridge(function(){\n\t\t\t\t\tparentSandboxBridge.air_Introspector_writeConsoleToFile(str);\n\t\t\t\t});\t\t\t\t\n\t\t\t}else{\n\t\t\t\tactiveWindow.setTimeout(function(){\n\t\t\t\t\tactiveWindow.air.Introspector.writeConsoleToFile(str);\n\t\t\t\t});\n\t\t\t}\n\t\t}\n\t},\n\t\n\t\n\t\n\t\n\t\/**\n\t*\t@function noBridge\n\t*\t@description Alerts the user that no parent sandbox bridge is installed \n\t*\/\n\tnoBridge: function(callback){\n\t\ttry{\n\t\t\tcallback();\n\t\t\treturn;\n\t\t}catch(e){\n\t\t\tair.Introspector.bridgeCallbacks.push(callback);\n\t\t\tair.Introspector.registerChildSandboxBridge();\n\t\t\tsetTimeout(function(){\n\t\t\t\tthrow { air_Introspector_setParentSandboxBridge: true, air_Introspector_version: air.Introspector.version , toString: function(){ return \'You need to include AIRIntrospector.js in your application sandbox.\'; } };\n\t\t\t}, 0);\t\t\t\t\n\t\t}\n\t\t\n\t},\n\t\n\t\/**\n\t*\t@function noChildBridge\n\t*\t@description Alerts the user that no child sandbox bridge is installed \n\t*\/\n\tnoChildBridge: function(iframe){\n\t\tif(!air.Introspector.secondBridgeTry){\n\t\t\tvar iframeStr = \'\';\n\t\t\tif(typeof iframe!=\'undefined\'){\n\t\t\t\tiframeStr = \" Check the following iframe [id: \"+iframe.id+\"]\";\n\t\t\t}\n\t\t\talert(\'Child sandbox bridge is not defined or has been rewritten. You need to include AIRIntrospector.js in child sandbox.\'+iframeStr);\t\t\t\n\t\t\tair.Introspector.secondBridgeTry = true;\n\t\t}\n\t},\n\t\n\n});air.Introspector.tree.node = function(nodeLabel, config){\n this.nodeLabel = nodeLabel;\n this.openable = true;\n this.nodeLabel2 = \'\';\n this.items = [];\n this.editable = false;\n \n if(typeof config!=\'undefined\')\n air.Introspector.extend(this, config);\n this.unselectOnBlur = true;\n this.created = false;\n this.opened = false;\n this.shouldOpenFlag = false;\n this.shouldSelectFlag = false;\n \n};\n\nair.Introspector.tree.node.openedTagMac = \'<div>><\/div>\';\/\/\'→\';\nair.Introspector.tree.node.closedTagMac = \'<div>∨<\/div>\';\/\/\'↓\';\n\nair.Introspector.tree.node.openedTagWin = \'<div>+<\/div>\';\/\/\'→\';\nair.Introspector.tree.node.closedTagWin = \'<div>-<\/div>\';\/\/\'↓\';\n\n\nair.Introspector.tree.node.putDisposeInPrototype = function(e){\n\te.prototype.dispose = air.Introspector.tree.node.prototype.dispose;\n\te.prototype.clearItems = air.Introspector.tree.node.prototype.clearItems;\n\te.prototype.clearListeners = air.Introspector.tree.node.prototype.clearListeners;\t\n\te.prototype.registerListener = air.Introspector.tree.node.prototype.registerListener;\n\te.prototype.registerEvents = air.Introspector.tree.node.prototype.registerEvents;\n\te.prototype.select = air.Introspector.tree.node.prototype.select;\n\te.prototype.unselect = air.Introspector.tree.node.prototype.unselect;\n}\n\nair.Introspector.tree.node.prototype={\n onshow: function(){\n \/\/dummy function overriden by config\n },\n \n onclick: function(){\n \/\/dummy function overriden by config\n },\n \n onhide: function(){\n \/\/dummy function overriden by config\n },\n\n\tonselect: function(){\n\t\t\n\t}, \n\n toggle: function(){\n if(this.opened){\n this.hide();\n }else{\n this.show();\n }\n },\n \n shouldOpen: function(){\n this.opened = true;\n this.shouldOpenFlag=true;\n },\n \n shouldSelect: function(value){\n if(typeof value==\'undefined\') value=true;\n this.shouldSelectFlag = value;\n },\n\n addSelectedCss: function(){\n\t\tif(self.element){\n\t\t\tself.element.className += \' selected3Tree\';\n\t\t}\n\t},\n\n\tselect: function(throwEvent){\n this.shouldSelectFlag = true;\n\t\tif(this.element){\n\t\t\tthis.element.className += \' selected3Tree\';\n\t\t}\n\t\t\n\t\t\n\t\tif(this.element){\n\t\t\tthis.focusLink.focus();\n\t\t\tif(this.nodeLabelDiv)\n\t\t\t\tthis.nodeLabelDiv.scrollIntoViewIfNeeded();\n\t\t\telse\n\t\t\t\tthis.element.scrollIntoViewIfNeeded();\n\t\t}\n\t\t\n\t\tif(this.onselect)\n\t\t\tthis.onselect(this, (typeof throwEvent==\'undefined\'||throwEvent));\n\t},\n\n\tunselect: function(){\n this.shouldSelectFlag = false;\n\t\tif(this.element){\n\t\t\tthis.element.className = this.element.className.replace(\/ selected3Tree\/g, \'\');\n\t\t}\n\n\t},\n\n\tclearItems: function(){\n\t\tif(this.items){\n\t\t\tfor(var i=this.items.length-1;i>=0;i--){\n\t\t\t\ttry{\n\t\t\t\t\tthis.items[i].dispose();\n\t\t\t\t}catch(e){ air.Introspector.Console.log(e);}\n\t\t\t\tthis.items[i]=null;\n\t\t\t}\n\t\t\tthis.items.length=0;\n\t\t}\n\t},\n\tclearListeners: function(){\n\t\tif(this.listeners){\n\t\t\tfor(var i=this.listeners.length-1;i>=0;i--){\n\t\t\t\tvar listener = this.listeners[i];\n\t\t\t\tlistener.element.removeEventListener(listener.ev, listener.fn, listener.capture);\n\t\t\t\tlistener.fn = null;\n\t\t\t\tthis.listeners[i]=null;\n\t\t\t}\n\t\t}\n\t\tdelete this.listeners;\n\t},\n\tdispose: function(){\n\t\tthis.clearItems();\n\t\tthis.clearListeners();\n\t\tvar self = this;\n\t\tfor(var i in self){\n\t\t\tself[i] = null;\n\t\t}\n\t},\n\t\n\tregisterListener:function(element, ev, fn, capture){\n\t\tif(!this.listeners){\n\t\t\tthis.listeners = [];\n\t\t}\n\n\t\tthis.listeners.push({element:element, ev:ev, fn: fn, capture:capture});\t\t\n\t\telement.addEventListener(ev, fn, capture);\t\t\n\t},\n\n\tshowElements: function(){\n\t\tthis.opened = true;\n this.onshow(this);\n\t\tthis.refreshNodeAnchor();\n this.refreshChildren();\t\n\t},\n show: function(){\n if(!this.openable)\n return;\n\t\tthis.showElements(); \n \n if(air.Introspector.tree.node.traceElement){\n \tair.Introspector.tree.node.traceElement.className = air.Introspector.tree.node.traceElement.className.replace(\/ selected2Tree\/g, \'\');\n }\n this.element.className += \' selected2Tree\';\n air.Introspector.tree.node.traceElement = this.element;\n var self = this;\n setTimeout(function(){\n\t\t\tif(self.element){\n\t\t\t\tself.element.className = self.element.className.replace(\/ selected2Tree\/g, \'\');\n\t\t\t}\n },1500);\n air.Introspector.tree.node.traceElement = this.element;\n \n \/\/this.nodeChildren.scrollIntoViewIfNeeded();\n this.element.scrollIntoViewIfNeeded();\n \n \n },\n refresh: function(){\n\t\tthis.clearListeners();\n\t\tif(this.element){\n\t\t\tvar oldElement = this.element;\n\t\t\tthis.createDiv(oldElement.ownerDocument);\n\t\t\toldElement.parentNode.replaceChild(this.element, oldElement);\n\t\t}\n\t},\n refreshChildren: function(){\n if(this.created){\n if(this.shouldOpenFlag){\n this.onshow(this);\n this.shouldOpenFlag = false;\n }\n \n var document = this.element.ownerDocument;\n \/*if(this.nodeChildren!=null){\n this.element.removeChild(this.nodeChildren);\n this.nodeChildren = null;\n }*\/\n var nodeChildren = this.nodeChildren;\/\/ document.createElement(\'div\');\n nodeChildren.innerHTML = \'\';\n this.nodeChildren.className = \'treeChildren\';\n for(var i=0;i<this.items.length;i++){\n var childElement = this.items[i].createDiv(document, true);\n\t\t\t\t this.items[i].registerEvents(this, i);\n nodeChildren.appendChild(childElement);\n }\n \/\/this.element.appendChild(nodeChildren);\n \/\/this.nodeChildren = nodeChildren;\n\t\t\tif(this.nodeEndLabelDiv)\n\t this.nodeEndLabelDiv.className = \'nodeEndLabelDivVisible\';\n }\n },\n\n\tregisterEvents: function(parentNode, index){\n\t\tthis.parentNode = parentNode;\n\t\tthis.parentIndex = index;\n\t\tvar self = this;\n\n\t\tif(this.unselectOnBlur||this.readOnly)\n\t\t{\n\t\t\tthis.registerListener(this.focusLink, \'blur\', function(ev){\n\t\t\t\tself.unselect();\n\t\t\t}, true);\n\t\t}\n\t\t\n\t\tvar findFirstElement = function(node){\n\t\t\tif(node==null) return null;\n\t\t\tif(!node.items) return node;\n\t\t\tif(!node.opened) return node;\t\t\t\n\t\t\tif(node.items.length==0) return node;\n\t\t\treturn node.items[0];\n\t\t\t\/\/return findFirstElement(node.items[0]);\t\n\t\t};\n\t\tvar findLastElement = function(node){\n\t\t\tif(node==null) return null;\n\t\t\tif(!node.items) return node;\n\t\t\tif(!node.opened) return node;\t\t\t\n\t\t\tif(node.items.length==0) return node;\n\t\t\treturn findLastElement(node.items[node.items.length-1]);\t\t\t\n\t\t};\n\n\t\tvar findNextParent = function(node){\n\t\t\tif(node==null||node.parentNode==null||node.parentNode.parentNode==null) return null;\n\t\t\tif(node.parentNode.parentNode&&node.parentNode.parentNode.items.length>node.parentNode.parentIndex+1)\n\t\t\t\treturn node.parentNode.parentNode.items[node.parentNode.parentIndex+1];\n\t\t\treturn findNextParent(node.parentNode);\n\t\t}\n\t\t\n\t\tthis.registerListener(this.element, \'keydown\', function(ev){\n\t\t\tif(self.state){\n\t\t\t\tev.stopPropagation();\n\t\t\t\treturn;\n\t\t\t}\n\t\t\t\t\n\t\t\tvar stopPropagation = true;\n\t\t\tswitch(ev.keyIdentifier){\n\t\t\t\tcase \'Left\':\n\t\t\t\t\tif(self.opened){\n\t\t\t\t\t\tif(self.hide)\n\t\t\t\t\t\t\tself.hide();\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \'Right\':\n\t\t\t\t\tif(!self.opened){\n\t\t\t\t\t\tif(self.show)\n\t\t\t\t\t\t\tself.show();\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \'Up\':\n\t\t\t\t\tif(self.parentNode){\n\t\t\t\t\t\tself.unselect();\n\t\t\t\t\t\tif(self.parentIndex==0){\n\t\t\t\t\t\t\tself.parentNode.select(true);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tvar element = findLastElement(self.parentNode.items[self.parentIndex-1]);\n\t\t\t\t\t\t\tif(element){\n\t\t\t\t\t\t\t\telement.select(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tself.parentNode.items[self.parentIndex-1].select(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \'Down\':\n\t\t\t\t\tif(self.parentNode){\n\t\t\t\t\t\tvar element = findFirstElement(self);\n\t\t\t\t\t\tif(element!=null&&element!=self){\n\t\t\t\t\t\t\tself.unselect();\n\t\t\t\t\t\t\telement.select(true);\n\t\t\t\t\t\t}else if(self.parentIndex+1>=self.parentNode.items.length){\n\t\t\t\t\t\t\tvar element = findNextParent(self);\n\t\t\t\t\t\t\tif(element){\n\t\t\t\t\t\t\t\tself.unselect();\n\t\t\t\t\t\t\t\telement.select(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tself.unselect();\n\t\t\t\t\t\t\tself.parentNode.items[self.parentIndex+1].select(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else{\n\t\t\t\t\t\tif(self.items.length>0){\n\t\t\t\t\t\t\tself.unselect();\n\t\t\t\t\t\t\tself.items[0].select(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase \'Enter\':\n\t\t\t\t\tsetTimeout(function(){\n\t\t\t\t\t\tif(self.editable){\n\t\t\t\t\t\t\tself.toggleEdit();\n\t\t\t\t\t\t}\n\t\t\t\t\t}, 0);\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tstopPropagation = false;\n\t\t\t}\n\t\t\tif(stopPropagation){\n\/\/\t\t\t\truntime.trace(ev.keyIdentifier);\n\t\t\t\tev.stopPropagation();\n\t\t\t\tev.preventDefault();\n\t\t\t}\n\t\t});\n\t},\n \n refreshLabel : function(){\n if(this.created){\n this.nodeLabelDiv.innerHTML = air.Introspector.escapeHtml(this.nodeLabel);\n\t\t\tif(this.element){\n\t\t\t\tif(this.nodeLabel2.length==0){\n\t\t\t\t\tthis.element.className += \' noLabel2\';\n\t\t\t\t}else{\n\t\t\t\t\tthis.element.className = this.element.className.replace(\/ noLabel2\/g, \'\');\n\t\t\t\t}\n\t\t\t}\n this.nodeLabel2Div.innerHTML = air.Introspector.escapeHtml(this.nodeLabel2).substr(0, 1000);\n }\n },\n \n hide: function(){\n if(!this.openable)\n return;\n this.opened = false;\n this.onhide(this);\n\t\tthis.refreshNodeAnchor();\n \/*if(this.nodeChildren!=null){\n this.element.removeChild(this.nodeChildren);\n this.nodeChildren = null;\n }*\/\n \n if(air.Introspector.tree.node.traceElement){\n air.Introspector.tree.node.traceElement.className = air.Introspector.tree.node.traceElement.className.replace(\/ selected2Tree\/g, \'\');\n air.Introspector.tree.node.traceElement = null;\n }\n this.element.className = this.element.className.replace(\/ selected2Tree\/g, \'\');\n this.nodeChildren.innerHTML = \'\';\n this.nodeChildren.className = \'\';\n \n if(this.nodeEndLabelDiv)\n this.nodeEndLabelDiv.className = \'nodeEndLabelDiv\';\n },\n \n showHover: function(visible){\n if(visible){\n this.element.className+=\' hover\'; \n }else{\n this.element.className = this.element.className.replace(\/ hover\/g, \'\');\n }\n },\n toggleEdit: function(toggle){\n if(!this.editVisible&&typeof toggle==\'undefined\'){\n this.element.className += \' editing\';\n this.nodeEdit.value = this.getEditValue();\n\t this.editVisible = true;\n this.nodeEdit.focus();\t\n\t\t\tthis.addSelectedCss();\n\t\t\tthis.state =1;\n }else if(this.editVisible){\n this.element.className = this.element.className.replace(\' editing\', \'\');\n\n if(toggle){\n this.setEditValue(this.nodeEdit.value);\n }else{\n\t this.editVisible = false;\n\t\t\t}\n\n\t\t\tvar self = this;\n\t\t\t\n\t\t\tsetTimeout(function(){\n\t\t\t\tself.select();\n \tself.editVisible = false;\n\t\t\t}, 0);\n\t\t\tthis.state = 0;\n }\n },\n \n\trefreshNodeAnchor: function(){\n\t\tif(!this.nodeAnchor) return;\n\t\tif(!this.openable){\n\t\t\tthis.nodeAnchor.innerHTML= \'\';\n\t\t\tthis.nodeAnchor.className = \'treeNodeEmpty\';\n\t\t}else if(!isAppSandbox){\n\t\t\t\tthis.nodeAnchor.innerHTML = this.opened?air.Introspector.tree.node.closedTagMac:air.Introspector.tree.node.openedTagMac;\n\t\t\t\tthis.nodeAnchor.className=\'treeAnchorMac\';\t\n\t\t}else if(air.Introspector.runtime.Capabilities.os.substr(0,3).toLowerCase() == \'mac\'){\n\t\t\tthis.nodeAnchor.innerHTML = this.opened?air.Introspector.tree.node.closedTagMac:air.Introspector.tree.node.openedTagMac;\n\t\t\tthis.nodeAnchor.className=\'treeAnchorMac\';\n\t\t}else{\n\t\t\tthis.nodeAnchor.innerHTML = this.opened?air.Introspector.tree.node.closedTagWin:air.Introspector.tree.node.openedTagWin;\n\t\t\tthis.nodeAnchor.className=\'treeAnchorWin\';\n\t\t}\n\t\t\n\t},\n\t\n createDiv: function(document, isChild){\n var self = this;\n var element = document.createElement(\'span\');\n\t\t\/\/element.href= \"javascript:void(0)\"; \n\t\tthis.focusLink = document.createElement(\"a\");\n\t\tthis.focusLink.href=\"#\";\n\t\telement.appendChild(this.focusLink);\n\t\n element.className=\'treeNode\';\n this.element = element;\n \n var nodeLabelDiv = document.createElement(\'div\');\n nodeLabelDiv.innerHTML = air.Introspector.escapeHtml(this.nodeLabel);\n nodeLabelDiv.className=\'treeLabel\'; \/\/+ (this.shouldSelectFlag?\' selectedTreeLabel\':\'\');\n\t\t\n\t\t\n\t\tif(this.shouldSelectFlag){\n\t\t\tthis.addSelectedCss();\n\t\t}\n\t\t\n\t\tif(this.onselect){\n\t\t\tthis.onselect(this, false);\n\t\t}\n\t\t\n if(this.openable){\n this.registerListener(nodeLabelDiv, \'click\', function(e){ if(!self.opened) self.show(); self.onclick(); \tself.select(); } );\n }else{\n this.registerListener(nodeLabelDiv, \'click\', function(e){ self.onclick(); \tself.select(); } );\n }\n this.registerListener(nodeLabelDiv, \'mouseover\', function(e){ self.showHover(true) } );\n this.registerListener(nodeLabelDiv, \'mouseout\', function(e){ self.showHover(false) } );\n \n element.appendChild(nodeLabelDiv);\n this.nodeLabelDiv = nodeLabelDiv;\n \n var nodeLabel2 = document.createElement(\'div\');\n nodeLabel2.innerHTML = air.Introspector.escapeHtml(this.nodeLabel2).substr(0, 1000);\n nodeLabel2.className=\'treeLabel2\';\n if(this.openable){\n this.registerListener(nodeLabel2, \'click\', function(e){ if(!self.opened) self.show() } );\n }else if(this.editable){\n this.editVisible = false;\n this.registerListener(nodeLabel2, \'click\', function(e){ self.toggleEdit() } );\n var nodeEdit = document.createElement(\'input\');\n nodeEdit.value = \'\';\n nodeEdit.className = \'treeEdit\';\n element.appendChild(nodeEdit);\n \n this.registerListener(nodeEdit, \'blur\', function(e){ self.toggleEdit(true); } );\n this.registerListener(nodeEdit, \'keypress\', function(e){ if(e.keyCode == 13) { self.toggleEdit(true); return false;} else if(e.keyCode == 27){ self.toggleEdit(false); return false;}} );\n this.nodeEdit = nodeEdit;\n }\n this.registerListener(nodeLabel2, \'mouseover\', function(e){ self.showHover(true) } );\n this.registerListener(nodeLabel2, \'mouseout\', function(e){ self.showHover(false) } );\n \n element.appendChild(nodeLabel2);\n this.nodeLabel2Div = nodeLabel2;\n \n\t\tif(this.nodeLabel2.length==0){\n\t\t\tthis.element.className += \' noLabel2\';\n\t\t}\n var nodeAnchor = document.createElement(\'div\');\n this.nodeAnchor = nodeAnchor;\n\t\tthis.refreshNodeAnchor();\n element.appendChild(nodeAnchor);\n this.registerListener(nodeAnchor, \'click\', function(e){ self.select(); self.toggle() } );\n \/\/nodeAnchor.style.visibility = this.openable?\'visible\':\'hidden\';\n\n this.created = true;\n \n \n var nodeChildren = document.createElement(\'div\');\n \n element.appendChild(nodeChildren);\n this.nodeChildren = nodeChildren;\n \n if(this.opened){\n this.refreshChildren();\n }\n \n\t\tsetTimeout(function(){\n\t\t\tif(self.shouldSelectFlag)\n\t\t\t\tself.focusLink.focus();\n\t\n\t\t}, 0);\n\t\n\t\tif(!isChild){\n\t\t\tthis.registerEvents(null, 0);\n\t\t}\n return element;\n }\n};\n\nair.Introspector.tree.textNode = function(value){\n this.nodeValue = value;\n};\n\nair.Introspector.tree.textNode.prototype = {\n createDiv: function(document){\n\t var element = document.createElement(\'span\');\n\/\/element.href= \"javascript:void(0)\"; \nthis.focusLink = document.createElement(\"a\");\nthis.focusLink.href=\"#\";\nelement.appendChild(this.focusLink);\n\t element.className=\'treeText\';\n\t \n\t var elementText = document.createElement(\'div\');\n\t elementText.className=\'treePreText\';\n\t var elementLines = document.createElement(\'div\');\n\t elementLines.className=\'treePreLine\';\n\t var splitText = air.Introspector.blockWrap(this.nodeValue);\n\t elementText.innerHTML = \'<pre>\'+air.Introspector.escapeHtml(splitText[0])+\'\\n\\n <\/pre>\';\n\t \n\t elementLines.innerHTML = \'<pre>\'+splitText[1]+\'<\/pre>\';\n\t \n\t element.appendChild(elementLines);\n\t element.appendChild(elementText);\n\t \n\t this.element = element;\n\t this.elementText = elementText;\n this.elementLines = elementLines;\n\t return element;\n }\n};\n\nair.Introspector.tree.node.putDisposeInPrototype(air.Introspector.tree.textNode);\n\nair.Introspector.tree.textDownloadNode = function(file){\n this.file = file;\n};\n\nair.Introspector.tree.textDownloadNode.prototype = {\n createDiv: function(document){\n var element = document.createElement(\'span\');\n\/\/element.href= \"javascript:void(0)\"; \nthis.focusLink = document.createElement(\"a\");\nthis.focusLink.href=\"#\";\nelement.appendChild(this.focusLink);\n element.className=\'treeText\';\n\n var elementText = document.createElement(\'div\');\n elementText.className=\'treePreText\';\n var elementLines = document.createElement(\'div\');\n elementLines.className=\'treePreLine\';\n \n elementText.innerHTML =\'Loading...\';\n \n \n element.appendChild(elementLines);\n element.appendChild(elementText);\n\t\tvar self = this;\n if(isAppSandbox){\n \tvar scriptLoader = new air.Introspector.runtime.URLLoader();\n\t scriptLoader.addEventListener(air.Introspector.runtime.Event.COMPLETE, function(e){\n\t \t var value = air.Introspector.blockWrap(scriptLoader.data);\n\t\t \telementText.innerHTML = \'<pre>\'+air.Introspector.escapeHtml(value[0])+\'\\n\\n<\/pre>\';\n\t\t\t elementLines.innerHTML = \'<pre>\'+value[1]+\'<\/pre>\';\n\t\t\t\t\tscriptLoader = null;\n\t\t });\n\t\t\tscriptLoader.addEventListener(air.Introspector.runtime.IOErrorEvent.IO_ERROR, function(e){\n\t\t\t\tvar value = air.Introspector.blockWrap(\'Error reading file \"\'+self.file+\'\"\');\n\t \telementText.innerHTML = \'<pre>\'+air.Introspector.escapeHtml(value[0])+\'\\n\\n<\/pre>\';\n\t\t elementLines.innerHTML = \'<pre>\'+value[1]+\'<\/pre>\';\n\t\t\t});\n\t\t\tscriptLoader.load(new air.Introspector.runtime.URLRequest(this.file));\n\t\t}else{\n\t\t\tvar myWindow = window;\n\t\t\tif(typeof activeWindow!=\'undefined\'){\n\t\t\t\tvar self = this;\n\t\t\t\tactiveWindow.setTimeout(function(){\n\t\t\t\t\tvar xhr = new activeWindow.XMLHttpRequest();\n\t\t\t\t\txhr.doNotDebug = true;\n\t\t\t\t\txhr.onreadystatechange = function(){\n\t\t\t\t\t\tif(this.readyState == 4){\n\t\t\t\t\t\t \tif(this.status == 200) {\n\t\t\t\t\t\t\t\tvar responseText = xhr.responseText;\n\t\t\t\t\t\t\t\tmyWindow.setTimeout(function(){\n\t\t\t\t\t\t\t\t\t\tvar value = air.Introspector.blockWrap(responseText);\n\t\t\t\t\t\t\t \telementText.innerHTML = \'<pre>\'+air.Introspector.escapeHtml(value[0])+\'\\n\\n<\/pre>\';\n\t\t\t\t\t\t\t\t elementLines.innerHTML = \'<pre>\'+value[1]+\'<\/pre>\';\n\t\t\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tmyWindow.setTimeout(function(){\n\t\t\t\t\t\t\t\t\tvar value = air.Introspector.blockWrap(\'Error reading file \"\'+self.file+\'\"\');\n\t\t\t\t\t\t \telementText.innerHTML = \'<pre>\'+air.Introspector.escapeHtml(value[0])+\'\\n\\n<\/pre>\';\n\t\t\t\t\t\t\t elementLines.innerHTML = \'<pre>\'+value[1]+\'<\/pre>\';\n\t\t\t\t\t\t\t\t}, 0);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\txhr = null;\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\txhr.open(\'GET\', self.file, true);\n\t\t\t\t\txhr.send();\n\t\t\t\t}, 0);\n\t\t\t}\n\t\t}\n this.element = element;\n this.elementText = elementText;\n this.elementLines = elementLines;\n return element;\n }\n};\nair.Introspector.tree.node.putDisposeInPrototype(air.Introspector.tree.textDownloadNode);\n\nair.Introspector.tree.imageDownloadNode = function(file){\n this.file = file;\n};\n\nair.Introspector.tree.imageDownloadNode.prototype = {\n createDiv: function(document){\n var element = document.createElement(\'span\');\n\/\/element.href= \"javascript:void(0)\"; \nthis.focusLink = document.createElement(\"a\");\nthis.focusLink.href=\"#\";\nelement.appendChild(this.focusLink);\n element.className=\'treeImage\';\n var imgElement = document.createElement(\'img\');\n imgElement.src = this.file;\n element.appendChild(imgElement);\n this.element = element;\n this.imgElement = imgElement;\n return element;\n }\n};\nair.Introspector.tree.node.putDisposeInPrototype(air.Introspector.tree.imageDownloadNode);\n\nair.Introspector.tree.domNode = function(domNode, config){\n this.domNode = domNode;\n this.readOnly = false;\n air.Introspector.tree.node.call(this, \'\', config);\n this.openable = true;\n this.unselectOnBlur = false;\n};\n\nair.Introspector.tree.domNode.prototype = {\n\tcreateAttribute: function(document, att){\n\t\tvar element = document.createElement(\'span\');\n\t\t\n\t\telement.appendChild(document.createTextNode(\' \'));\n\t\t\n\t\t var tagName = document.createElement(\'span\');\n tagName.className = \'tagDomNodeAttribute\';\n tagName.innerHTML = att.nodeName;\n element.appendChild(tagName);\n\t\t element.appendChild(document.createTextNode(\'=\"\'));\n\t\t\n\t\tvar editor = new air.Introspector.tree.inPlaceEditor(function(){ return att.nodeValue.replace(\/\\n\/g, \'\\\\n\') }, \n\t\tfunction(value){att.nodeValue = value.replace(\/\\\\n\/g, \'\\n\')});\n\t\t editor.attributeName = att.nodeName;\n\t\tthis.registerEditor(editor);\n\t\telement.appendChild(editor.createDiv(document));\n\t\telement.appendChild(document.createTextNode(\'\"\'));\n\t\t\n\t\tthis.registerListener(element, \'mousedown\', function(e){ air.Introspector.debugWindow.setHoverDomElementAttribute(att); }, true );\n\/\/ this.registerListener(element, \'mouseout\', function(e){ air.Introspector.debugWindow.clearHoverDomElementAttribute(); }, true );\n\t\t\n\t\treturn element;\n\t},\n\t\n\t\n\ttoggleAttribute: function(attributeName){\n\t\tfor(var i=this.editors.length-1;i>=0;i--){\n\t\t\tif(typeof this.editors[i].attributeName!=\'undefined\'&&this.editors[i].attributeName==attributeName){\n\t\t\t\tthis.editors[i].toggleEditing();\n\t\t\t\treturn;\t\n\t\t\t}\n\t\t}\n\t},\n\t\n\tregisterEditor: function(editor){\n\t\tif(!this.editors)\n\t\t\tthis.editors = [];\n\t\teditor.parent = this;\n\t\tthis.editors.push(editor);\n\t},\n\tclearEditors: function(){\n\t\tif(this.editors){\n\t\t\tfor(var i=this.editors.length-1;i>=0;i--){\n\t\t\t\tthis.editors[i].dispose();\n\t\t\t}\n\t\t}\n\t},\n\tdispose: function(){\n\t\tthis.clearEditors();\n\t\tair.Introspector.tree.node.prototype.dispose.call(this);\n\t},\n\tshowDomHover:function(visible){\n\t\t\/\/air.Introspector.init();\n\t\tif(visible){\n\t\t\tair.Introspector.debugWindow.highlight(this.domNode);\n\t\t\tif(!this.readOnly)\n\t\t\t\t{air.Introspector.debugWindow.setHoverDomElement(this);}\n\t\t}else{\n\t\t\tair.Introspector.debugWindow.highlight();\n\t\t\tif(!this.readOnly)\t\t\t\n\t\t\t\t{air.Introspector.debugWindow.clearHoverDomElement();}\n\t\t}\n\t},\n\tonselect: function(sender, throwevent){\n\t\tif(this.readOnly)\n\t\t\treturn;\n\t\t\t\n\t\tif(air.Introspector.tree.domNode.lastSelectedNode&&\n\t\t\tair.Introspector.tree.domNode.lastSelectedNode.unselect&&\n\t\t\t\tair.Introspector.tree.domNode.lastSelectedNode!=sender){\n\t\t\t\t\tair.Introspector.tree.domNode.lastSelectedNode.unselect();\n\t\t}\n\t\t\t\t\t\t\n \t air.Introspector.tree.domNode.lastSelectedNode = sender;\n\t\n\t if(typeof throwevent==\'undefined\'||throwevent==true){\n\t \t\tair.Introspector.showCssElement(this.domNode);\n\t }\t\n\t},\n\t\n\texpandAll: function(){\n\t\tthis.show();\n\t\tfor(var i=this.items.length-1;i>=0;i--)\n\t\t\tthis.items[i].expandAll();\n\t},\n\t\n\tcollapse: function(){\n\t\tfor(var i=this.items.length-1;i>=0;i--)\n\t\t\tthis.items[i].collapse();\n\t\tthis.hide();\n\t},\n\t\n\trefreshAttributes: function(){\n\t\tvar attributesTag = this.attributesTag;\n var atts = this.domNode.attributes;\n\t\tattributesTag.innerHTML = \'\';\n if(atts&&atts.length>0){\n \tattributesTag.appendChild(document.createTextNode(\' \'));\n for(var i=0;i<atts.length;i++){\n\t\t\t\tif(atts[i].nodeName.toLowerCase()==\'id\'){\n \tattributesTag.appendChild(this.createAttribute(document, atts[i]));\n\t\t\t\t}\n }\n for(var i=0;i<atts.length;i++){\n\t\t\t\tif(atts[i].nodeName.toLowerCase()!=\'id\'){\n \tattributesTag.appendChild(this.createAttribute(document, atts[i]));\n\t\t\t\t}\n }\n }\n\t},\n createDiv: function(document, isChild){\n var self = this;\n var element = document.createElement(\'span\');\n\t\t\/\/element.href= \"javascript:void(0)\"; \n\t\tthis.focusLink = document.createElement(\"a\");\n\t\tthis.focusLink.href=\"#\";\n\t\telement.appendChild(this.focusLink);\n\n element.className=\'treeNode domTreeNode\';\n this.element = element;\n \n var nodeLabelDiv = document.createElement(\'div\');\n var nodeEndLabelDiv = null;\n \/\/should add parameters here\n \/\/nodeLabelDiv.innerHTML = air.Introspector.escapeHtml(this.domNode.nodeName);\n var shouldAddEndTag = false;\n \n switch(this.domNode.nodeType){\n \tcase Node.DOCUMENT_NODE:\n \tcase Node.ELEMENT_NODE:\n\t\t nodeLabelDiv.appendChild(document.createTextNode(\'<\'));\n\t\t var tagName = document.createElement(\'span\');\n\t\t tagName.className = \'tagDomNodeName\';\n\t\t\t\tvar nodeName = this.domNode.nodeName;\n\t\t\t\tif(this.domNode.nodeType==Node.DOCUMENT_NODE)\n\t\t \t\t nodeName = \'Root\';\n\t \t\t tagName.innerHTML = nodeName;\n\t\t nodeLabelDiv.appendChild(tagName);\n\t\t\n\t\t\n\t\t\t\tvar attributesTag = document.createElement(\'span\');\n\t\t\t\tthis.attributesTag = attributesTag;\n\t\t\t\tnodeLabelDiv.appendChild(attributesTag);\n\t\t\t\tthis.refreshAttributes();\n\t\t\t\t\n\t\t if(this.domNode.hasChildNodes()){\n\t\t \tshouldAddEndTag = this.domNode.firstChild.nextSibling!=null || this.domNode.firstChild.nodeType!=Node.TEXT_NODE;\n\t\t \tif(!shouldAddEndTag){\n\t\t \t\tnodeLabelDiv.appendChild(document.createTextNode(\'>\'));\n\t\t \t\tvar editor = new air.Introspector.tree.inPlaceEditor(function(){ return self.domNode.firstChild.nodeValue.replace(\/\\n\/g, \'\\\\n\') }, \n function(value){self.domNode.firstChild.nodeValue = value.replace(\/\\\\n\/g, \'\\n\')});\n\t\t\t\t\t\t\tthis.registerEditor(editor);\n nodeLabelDiv.appendChild(editor.createDiv(document));\n \n var endTagName = document.createElement(\'span\');\n endTagName.className = \'tagDomNodeName\';\n endTagName.innerHTML = nodeName;\n nodeLabelDiv.appendChild(document.createTextNode(\'<\/\'));\n nodeLabelDiv.appendChild(endTagName);\n\t\t \t\tnodeLabelDiv.appendChild(document.createTextNode(\'>\'));\n\t\t\n\t\t\n\t\t \t}else{\n\t\t \t\t nodeLabelDiv.appendChild(document.createTextNode(\'>\'));\n\t\t \t}\n\t\t }else{\n\t\t \t nodeLabelDiv.appendChild(document.createTextNode(\'\/>\'));\n\t\t }\n\t this.openable = shouldAddEndTag;\n\t if(shouldAddEndTag){\n\t nodeEndLabelDiv = document.createElement(\'span\');\n \t nodeEndLabelDiv.className = this.opened?\'nodeEndLabelDivVisible\':\'nodeEndLabelDiv\';\n\t \t var endTagName = document.createElement(\'span\');\n endTagName.className = \'tagDomNodeName\';\n endTagName.innerHTML = nodeName;\n \n nodeEndLabelDiv.appendChild(document.createTextNode(\'<\/\'));\n nodeEndLabelDiv.appendChild(endTagName);\n nodeEndLabelDiv.appendChild(document.createTextNode(\'>\'));\n \n\t \t\n \/\/ nodeLabelDiv.addEventListener(\'click\', function(e){ self.toggle(); e.stopPropagation(); } );\n var nodeAnchor = document.createElement(\'div\');\n\t\t\t element.appendChild(nodeAnchor);\n\n\t\t\t\t\t\n\t\t\t this.registerListener(nodeAnchor, \'mouseover\', function(e){ self.showDomHover(true); self.showHover(true); e.stopPropagation();} );\n this.registerListener(nodeAnchor, \'mouseout\', function(e){ self.showDomHover(false); self.showHover(false); e.stopPropagation(); } );\n \t\t\tthis.nodeAnchor = nodeAnchor;\n\t\t\t\t\tthis.refreshNodeAnchor();\n\t\t\t\t\t\n\t\t\t this.registerListener(nodeEndLabelDiv, \'mouseover\', function(e){ self.showDomHover(true); self.showHover(true); e.stopPropagation();} );\n this.registerListener(nodeEndLabelDiv, \'mouseout\', function(e){ self.showDomHover(false); self.showHover(false); e.stopPropagation(); } );\n\n this.registerListener(nodeAnchor, \'click\', function(e){ self.select(); self.toggle(); e.stopPropagation(); } );\n\t\t\t\t\tif(this.domNode.nodeType==Node.DOCUMENT_NODE)\n\t\t\t\t\t\tthis.shouldOpen();\n }else{\n \tthis.opened = false;\n }\n break;\n case Node.TEXT_NODE:\n var editor = new air.Introspector.tree.inPlaceEditor(function(){ return self.domNode.nodeValue.replace(\/\\n\/g, \'\\\\n\') }, \n function(value){self.domNode.nodeValue = value.replace(\/\\\\n\/g, \'\\n\')});\n this.registerEditor(editor);\n nodeLabelDiv.appendChild(editor.createDiv(document));\n this.openable = false;\n this.opened = false;\n \tbreak;\n\t\t\tdefault:\n\t\t\t\tnodeLabelDiv.appendChild(document.createTextNode(\'<\'));\n\t\t var tagName = document.createElement(\'span\');\n\t\t tagName.className = \'tagDomNodeName\';\n\t \t\t tagName.innerHTML = this.domNode.nodeName;\n\t\t nodeLabelDiv.appendChild(tagName);\n\t\t\t\tnodeLabelDiv.appendChild(document.createTextNode(\'>\'));\n\t\t\tbreak;\n }\n \n \/*var child = this.domNode.firstChild;\n while(child)\n {\n node.items.push(this.createDomTreeNode(child)); \/\/, this.createGetter(obj, i), this.createSetter(obj, i)));\n child = child.nextSibling;\n }*\/ \n \n nodeLabelDiv.className=\'treeLabel\';\/\/ + (this.shouldSelectFlag?\' selectedTreeLabel\':\'\');\n\n\t\tif(this.shouldSelectFlag){\n\t\t\tthis.addSelectedCss();\n\t\t}\n \n\n this.registerListener( nodeLabelDiv, \'mouseover\', function(e){ self.showDomHover(true); self.showHover(true); e.stopPropagation(); }, true );\n this.registerListener(nodeLabelDiv, \'mouseout\', function(e){ self.showDomHover(false); self.showHover(false); e.stopPropagation(); }, true );\n\n element.appendChild(nodeLabelDiv);\n this.nodeLabelDiv = nodeLabelDiv;\n\n this.registerListener(nodeLabelDiv, \'click\', function(e){\n\t\t\tself.select();\n\t\t\t \/\/self.toggle();\n\t\t\t self.show();\n air.Introspector.debugWindow.showDomElementPath(self.domNode);\n\t\t});\n \n this.registerListener(element, \'dblclick\', function(e){\n\t\t\t \te.stopPropagation(); \n\t\t\/\/\t\tself.toggle();\n\t\t\/\/\t\tself.select();\n \/\/air.Introspector.debugWindow.gotoConsoleTab();\n\/\/ air.Introspector.debugWindow.showDomElementPath(self.domNode);\n } );\n \n \n \/\/nodeAnchor.style.visibility = this.openable?\'visible\':\'hidden\';\n\n this.created = true;\n \n \n var nodeChildren = document.createElement(\'div\');\n element.appendChild(nodeChildren);\n this.nodeChildren = nodeChildren;\n \n if(nodeEndLabelDiv){\n\t\t\tthis.registerListener(nodeEndLabelDiv, \'click\', function(e){\n\/\/\t\t\t\t\tself.toggle();\n\t\t\t\t\tself.select();\n\t air.Introspector.debugWindow.showDomElementPath(self.domNode);\n\t\t\t});\n\t \t\telement.appendChild(nodeEndLabelDiv);\n\t\t}\n this.nodeEndLabelDiv = nodeEndLabelDiv;\n \n if(this.opened){\n this.refreshChildren();\n }\n \n \t\tif(!isChild){\n\t\t\tthis.registerEvents(null, 0);\n\t\t}\n\t\t\n return element;\n }\n};\n\nair.Introspector.tree.domNode.prototype.__proto__ = air.Introspector.tree.node.prototype;\n\nair.Introspector.tree.inPlaceEditor = function(getter, setter, className){\n this.getter = getter;\n this.setter = setter; \n if(typeof className!=\'undefined\'){\n this.className = \' \'+className;\n }else{\n this.className = \'\';\n }\n};\n\nair.Introspector.tree.inPlaceEditor.prototype = {\n\tnoZeroLength: function(e){\n\t\ttry{\n\t\t var str = e+\'\';\n\t\t if(air.Introspector.trim(e).length==0){\n\t\t \treturn \'[Empty string - click to edit]\';\n\t\t }\n\t\t return str;\n\t\t}catch(e){\n\t\t\treturn e+\'\';\n\t\t}\n\t},\n\ttoggleEditing: function(){\n\t\tthis.onclick();\n\t},\n\tselectParent: function(){\n\t\tif(this.parent&&this.parent.select){\n\t\t\tthis.parent.select(true);\n\t\t}\n\t},\n\t\n\tonclick: function(){\n\t\tvar self = this;\n\t\tthis.selectParent();\n\t\tif(this.parent&&this.parent.readOnly)\n\t\t\t{return;}\n\t\tif(this.state==0){\/\/not editing\n\t\t var editor = document.createElement(\'input\');\n\t\t editor.type = \'text\';\n\t\t\n\t\t try{\n\t editor.value = this.getter();\n\t }catch(e){\n\t editor.value = e; \n\t }\n\t\n editor.style.width = this.element.clientWidth+\'px\';\n\t\t this.editor = editor;\n\t\t this.element.innerHTML = \'\';\n\t\t this.element.appendChild(editor);\n\t\t this.saveValue = true;\n\t\t \n\t\t this.registerListener(editor,\'dblclick\', function(e){\n e.stopPropagation(); \n }, true );\n\t\t this.registerListener(editor, \'click\', function(e){ e.stopPropagation(); }, true );\n\t\t this.registerListener(editor, \'keypress\', function(e){ if(self.state) { if(e.keyCode == 13) { self.saveValue=true; editor.blur(); return false;} else if(e.keyCode == 27){ self.saveValue=false; editor.blur(); return false;}}} );\n\t\t this.registerListener(editor, \'blur\', function(){ if(self.state) self.onclick(); } );\n\t\t editor.focus();\n\t\t}else{ \/\/editing mode\n\t\t\t\/\/set the value to setter\n\t\t\tif(this.saveValue){\n\t\t\t try{\n\t this.setter(this.editor.value);\t\t \n\t\t\t }catch(e){\n\t\t\t }\n\t\t\t}\n\t\t setTimeout(function(){\n\t\t try{\n\t self.element.innerHTML = self.noZeroLength(air.Introspector.escapeHtml(self.getter()));\n\t\t }catch(e){\n\t\t \/\/self.element.innerHTML = air.Introspector.escapeHtml(e); \n\t\t } \n\t }, 100);\n\t\t}\n\t\tthis.state ^= 1 ;\n\t\tif(this.parent)\n\t\t\tthis.parent.state = this.state;\n\t},\n createDiv: function(document){\n\t\tvar element = document.createElement(\'div\');\n element.className=\'inPlaceEditor\'+this.className;\n\n \tvar self = this;\n \tthis.state = 0; \/\/not editing\n\n \n try{\n element.innerHTML = this.noZeroLength(air.Introspector.escapeHtml(this.getter()));\n }catch(e){\n element.innerHTML = air.Introspector.escapeHtml(e);\t\n }\n \n this.registerListener(element, \'click\', function(e){ if(self.state==0) self.onclick(); e.stopPropagation(); } , true );\n \n \/\/ element.addEventListener(\'dblclick\', function(e){\n \/\/ e.stopPropagation(); \n \/\/ }, true );\n \n \n this.element = element;\n return element;\n }\n};\nair.Introspector.tree.node.putDisposeInPrototype(air.Introspector.tree.inPlaceEditor);\n\nair.Introspector.split = function(element, leftElement, rightElement, firstWidth, minWidth){\n\tthis.element = element;\n\tthis.leftElement = leftElement;\n\tthis.rightElement = rightElement;\n\tvar self = this;\n\tthis.dragging = false;\n\t\n\tthis.element.style.right = (firstWidth)+\'px\';\n\tthis.leftElement.style.right = (firstWidth+this.element.clientWidth)+\'px\';\n\tthis.rightElement.style.width = (firstWidth)+\'px\';\t\n\tthis.firstWidth = firstWidth;\n\tthis.minWidth = minWidth;\n\tif(isAppSandbox){\n\t\tthis.element.ownerDocument.defaultView.nativeWindow.stage.addEventListener(runtime.flash.events.MouseEvent.MOUSE_MOVE, function(ev){\n\t\t\tself.mousemove(ev);\n\t\t}, true);\n\t}else{\n\t\tthis.element.ownerDocument.addEventListener(\"mousemove\", function(ev){self.mousemove(ev);}, true);\n\t}\n\tthis.element.ownerDocument.addEventListener(\"mouseup\", function(ev){ self.mouseup(ev); }, true);\n\tthis.element.addEventListener(\"mousedown\", function(ev){self.mousedown(ev)}, true);\t\t\n};\n\nair.Introspector.split.prototype = {\n\tmousemove:function(ev){\n\t\tif(this.dragging){\n\t\t\tif(isAppSandbox){\n\t\t\t\tvar delta = this.firstX-ev.localX;\n\t\t\t}else{\n\t\t\t\tvar delta = this.firstX-ev.clientX;\n\t\t\t}\n\t\t\t\t\n\t\t\tvar currentWidth = this.firstWidth + delta;\n\n\t\t\tif(currentWidth<this.minWidth){\n\t\t\t\tcurrentWidth=this.minWidth;\n\t\t\t}\n\t\t\t\n\t\t\tthis.currentWidth = currentWidth;\n\t\t\tthis.element.style.right = (currentWidth)+\'px\';\n\t\t\tthis.leftElement.style.right = (currentWidth+this.element.clientWidth)+\'px\';\n\t\t\tthis.rightElement.style.width = (currentWidth)+\'px\';\t\n\t\t\tif(isAppSandbox){\n\t\t\t\tev.stopImmediatePropagation();\n\t\t\t}\n\t\t\tev.stopPropagation();\t\n\t\t\tev.preventDefault();\n\t\t}\n\t},\n\tmousedown: function(ev){\n\t\tthis.dragging = true;\n\t\tthis.firstX = ev.clientX;\n\t\tthis.currentWidth = this.firstWidth;\n\t\tev.stopPropagation();\t\t\n\t\tev.preventDefault();\n\t},\n\tmouseup: function(ev){\n\t\tif(this.dragging){\n\n\t\t\tthis.dragging = false;\n\t\t\tthis.firstWidth = this.currentWidth;\n\t\t\tev.stopPropagation();\n\t\t\tev.preventDefault();\n\t\t}\n\t}\n};\n\nair.Introspector.getCssGroups = function(){\n\t\tvar cssGroupNames = {\n\t0: \"Background\",\n\t1: \"Box Model\",\n\t2: \"Layout\",\n\t3: \"Text\",\n\t4: \"Other\",\n\tlength: 5\n};\n\nvar cssGroups = [];\n\n\/*\n$group = 0;\n\/\/Background - 0\ncssGroups[\'background-attachment\']=$group;\ncssGroups[\'background-color\']=$group;\ncssGroups[\'background-image\']=$group;\ncssGroups[\'background-position\']=$group;\ncssGroups[\'background-repeat\']=$group;\ncssGroups[\'opacity\']=$group;\ncssGroups[\'-webkit-background-clip\']=$group;\ncssGroups[\'-webkit-background-composite\']=$group;\ncssGroups[\'-webkit-background-origin\']=$group;\ncssGroups[\'-webkit-background-size\']=$group;\n\n$group = 1;\n\/\/Box Model - 1\ncssGroups[\'border-bottom-color\']=$group;\ncssGroups[\'border-bottom-style\']=$group;\ncssGroups[\'border-bottom-width\']=$group;\ncssGroups[\'border-collapse\']=$group;\ncssGroups[\'border-left-color\']=$group;\ncssGroups[\'border-left-style\']=$group;\ncssGroups[\'border-left-width\']=$group;\ncssGroups[\'border-right-color\']=$group;\ncssGroups[\'border-right-style\']=$group;\ncssGroups[\'border-right-width\']=$group;\ncssGroups[\'border-top-color\']=$group;\ncssGroups[\'border-top-style\']=$group;\ncssGroups[\'border-top-width\']=$group;\ncssGroups[\'bottom\']=$group;\ncssGroups[\'height\']=$group;\ncssGroups[\'left\']=$group;\ncssGroups[\'top\']=$group;\ncssGroups[\'right\']=$group;\ncssGroups[\'width\']=$group;\ncssGroups[\'padding-bottom\']=$group;\ncssGroups[\'padding-left\']=$group;\ncssGroups[\'padding-right\']=$group;\ncssGroups[\'padding-top\']=$group;\ncssGroups[\'margin-bottom\']=$group;\ncssGroups[\'margin-left\']=$group;\ncssGroups[\'margin-right\']=$group;\ncssGroups[\'margin-top\']=$group;\ncssGroups[\'-webkit-border-fit\']=$group;\ncssGroups[\'-webkit-border-horizontal-spacing\']=$group;\ncssGroups[\'-webkit-border-vertical-spacing\']=$group;\ncssGroups[\'-webkit-box-align\']=$group;\ncssGroups[\'-webkit-box-direction\']=$group;\ncssGroups[\'-webkit-box-flex\']=$group;\ncssGroups[\'-webkit-box-flex-group\']=$group;\ncssGroups[\'-webkit-box-lines\']=$group;\ncssGroups[\'-webkit-box-ordinal-group\']=$group;\ncssGroups[\'-webkit-box-orient\']=$group;\ncssGroups[\'-webkit-box-pack\']=$group;\ncssGroups[\'-webkit-box-shadow\']=$group;\ncssGroups[\'-webkit-border-bottom-left-radius\']=$group;\ncssGroups[\'-webkit-border-bottom-right-radius\']=$group;\ncssGroups[\'-webkit-border-top-left-radius\']=$group;\ncssGroups[\'-webkit-border-top-right-radius\']=$group;\ncssGroups[\'-webkit-margin-bottom-collapse\']=$group;\ncssGroups[\'-webkit-margin-top-collapse\']=$group;\n\n\n$group = 2;\n\/\/Layout - 2\ncssGroups[\'position\']=$group;\ncssGroups[\'visibility\']=$group;\ncssGroups[\'display\']=$group;\ncssGroups[\'z-index\']=$group;\ncssGroups[\'overflow-x\']=$group;\ncssGroups[\'overflow-y\']=$group;\ncssGroups[\'white-space\']=$group;\ncssGroups[\'clear\']=$group;\ncssGroups[\'float\']=$group;\ncssGroups[\'-webkit-box-sizing\']=$group;\n\n$group = 3;\n\/\/Text - 3\ncssGroups[\'text-align\']=$group;\ncssGroups[\'text-decoration\']=$group;\ncssGroups[\'text-indent\']=$group;\ncssGroups[\'text-shadow\']=$group;\ncssGroups[\'text-transform\']=$group;\ncssGroups[\'font-family\']=$group;\ncssGroups[\'font-size\']=$group;\ncssGroups[\'font-style\']=$group;\ncssGroups[\'font-variant\']=$group;\ncssGroups[\'font-weight\']=$group;\ncssGroups[\'letter-spacing\']=$group;\ncssGroups[\'line-height\']=$group;\ncssGroups[\'-webkit-text-decorations-in-effect\']=$group;\ncssGroups[\'-webkit-text-fill-color\']=$group;\ncssGroups[\'-webkit-text-security\']=$group;\ncssGroups[\'-webkit-text-stroke-color\']=$group;\ncssGroups[\'-webkit-text-stroke-width\']=$group;\ncssGroups[\'word-spacing\']=$group;\ncssGroups[\'word-wrap\']=$group;\n\n\n\n$group = 4;\n\/\/Other - 4\n\ncssGroups[\'caption-side\']=$group;\ncssGroups[\'color\']=$group;\ncssGroups[\'cursor\']=$group;\ncssGroups[\'direction\']=$group;\ncssGroups[\'empty-cells\']=$group;\n\n\ncssGroups[\'list-style-image\']=$group;\ncssGroups[\'list-style-position\']=$group;\ncssGroups[\'list-style-type\']=$group;\ncssGroups[\'max-height\']=$group;\ncssGroups[\'max-width\']=$group;\ncssGroups[\'min-height\']=$group;\ncssGroups[\'min-width\']=$group;\n\ncssGroups[\'orphans\']=$group;\ncssGroups[\'outline-color\']=$group;\ncssGroups[\'outline-style\']=$group;\ncssGroups[\'outline-width\']=$group;\n\n\ncssGroups[\'page-break-after\']=$group;\ncssGroups[\'page-break-before\']=$group;\ncssGroups[\'page-break-inside\']=$group;\n\ncssGroups[\'resize\']=$group;\n\ncssGroups[\'table-layout\']=$group;\n\ncssGroups[\'unicode-bidi\']=$group;\ncssGroups[\'vertical-align\']=$group;\n\n\ncssGroups[\'widows\']=$group;\n\ncssGroups[\'-webkit-appearance\']=$group;\ncssGroups[\'-webkit-column-break-after\']=$group;\ncssGroups[\'-webkit-column-break-before\']=$group;\ncssGroups[\'-webkit-column-break-inside\']=$group;\ncssGroups[\'-webkit-column-count\']=$group;\ncssGroups[\'-webkit-column-gap\']=$group;\ncssGroups[\'-webkit-column-rule-color\']=$group;\ncssGroups[\'-webkit-column-rule-style\']=$group;\ncssGroups[\'-webkit-column-rule-width\']=$group;\ncssGroups[\'-webkit-column-width\']=$group;\ncssGroups[\'-webkit-highlight\']=$group;\ncssGroups[\'-webkit-line-break\']=$group;\ncssGroups[\'-webkit-line-clamp\']=$group;\ncssGroups[\'-webkit-marquee-direction\']=$group;\ncssGroups[\'-webkit-marquee-increment\']=$group;\ncssGroups[\'-webkit-marquee-repetition\']=$group;\ncssGroups[\'-webkit-marquee-style\']=$group;\ncssGroups[\'-webkit-nbsp-mode\']=$group;\ncssGroups[\'-webkit-rtl-ordering\']=$group;\ncssGroups[\'-webkit-user-drag\']=$group;\ncssGroups[\'-webkit-user-modify\']=$group;\ncssGroups[\'-webkit-user-select\']=$group;\ncssGroups[\'-webkit-dashboard-region\']=$group;\n\n*\/\n\ncssGroups[0]=[\'background-attachment\', \'background-color\', \'background-image\', \'background-position\', \'background-repeat\', \'opacity\', \'-webkit-background-clip\', \'-webkit-background-composite\', \'-webkit-background-origin\', \'-webkit-background-size\', ];\n\n\/\/Box Model - 1\ncssGroups[1]=[\'border-bottom-color\', \'border-bottom-style\', \'border-bottom-width\', \'border-collapse\', \'border-left-color\', \'border-left-style\', \'border-left-width\', \'border-right-color\', \'border-right-style\', \'border-right-width\', \'border-top-color\', \'border-top-style\', \'border-top-width\', \'bottom\', \'height\', \'left\', \'top\', \'right\', \'width\', \'padding-bottom\', \'padding-left\', \'padding-right\', \'padding-top\', \'margin-bottom\', \'margin-left\', \'margin-right\', \'margin-top\', \'-webkit-border-fit\', \'-webkit-border-horizontal-spacing\', \'-webkit-border-vertical-spacing\', \'-webkit-box-align\', \'-webkit-box-direction\', \'-webkit-box-flex\', \'-webkit-box-flex-group\', \'-webkit-box-lines\', \'-webkit-box-ordinal-group\', \'-webkit-box-orient\', \'-webkit-box-pack\', \'-webkit-box-shadow\', \'-webkit-border-bottom-left-radius\', \'-webkit-border-bottom-right-radius\', \'-webkit-border-top-left-radius\', \'-webkit-border-top-right-radius\', \'-webkit-margin-bottom-collapse\', \'-webkit-margin-top-collapse\', ];\n\n\n\/\/Layout - 2\ncssGroups[2]=[\'position\', \'visibility\', \'display\', \'z-index\', \'overflow-x\', \'overflow-y\', \'white-space\', \'clear\', \'float\', \'-webkit-box-sizing\', ];\n\n\/\/Text - 3\ncssGroups[3]=[\'text-align\', \'text-decoration\', \'text-indent\', \'text-shadow\', \'text-transform\', \'font-family\', \'font-size\', \'font-style\', \'font-variant\', \'font-weight\', \'letter-spacing\', \'line-height\', \'-webkit-text-decorations-in-effect\', \'-webkit-text-fill-color\', \'-webkit-text-security\', \'-webkit-text-stroke-color\', \'-webkit-text-stroke-width\', \'word-spacing\', \'word-wrap\', ];\n\n\n\/\/Other - 4\n\ncssGroups[4]=[\'caption-side\', \'color\', \'cursor\', \'direction\', \'empty-cells\', \n\t\'list-style-image\', \'list-style-position\', \'list-style-type\', \'max-height\', \'max-width\', \'min-height\', \'min-width\', \n\t\'orphans\', \'outline-color\', \'outline-style\', \'outline-width\', \n\t\'page-break-after\', \'page-break-before\', \'page-break-inside\', \n\t\'resize\', \n\t\'table-layout\', \n\t\'unicode-bidi\', \'vertical-align\', \n\t\'widows\', \n\t\'-webkit-appearance\', \'-webkit-column-break-after\', \'-webkit-column-break-before\', \'-webkit-column-break-inside\', \'-webkit-column-count\', \'-webkit-column-gap\', \'-webkit-column-rule-color\', \'-webkit-column-rule-style\', \'-webkit-column-rule-width\', \'-webkit-column-width\', \'-webkit-highlight\', \'-webkit-line-break\', \'-webkit-line-clamp\', \'-webkit-marquee-direction\', \'-webkit-marquee-increment\', \'-webkit-marquee-repetition\', \'-webkit-marquee-style\', \'-webkit-nbsp-mode\', \'-webkit-rtl-ordering\', \'-webkit-user-drag\', \'-webkit-user-modify\', \'-webkit-user-select\', \'-webkit-dashboard-region\',];\n\n\n\n\n\t\t\treturn [cssGroupNames, cssGroups];\n\t\t}\t\n\t\t\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.js\n\t\t\/\/=======================================================================================================================================================\n\t\t\n\nair.Introspector.DebugWindow = function(config){\n var self = this;\n this.logLines = [];\n this.domList = [];\n this.isLoaded = false;\n\n\tif(isAppSandbox){\n \tthis.activeWindow = air.Introspector.runtime.NativeApplication.nativeApplication.activeWindow;\n\t}else{\n\t\t\/\/will get it from config later\n\t\tthis.activeWindow = activeWindow;\n\t}\n\n this.isInspecting = false;\n this.evalHistory = [];\n this.evalHistoryPos = -1;\n this.selectedTab = \'console\';\n this.scrollDisabled = false;\n this.requestLog = [];\n this.activeTab = 0;\n this.tabs = [\'console\', \'html2\', \'dom\',\'assets\',\'source\',\'net\'];\n\tthis.cssTabs = [\'css2Dom\', \'css2Style\', \'css2Box\'];\n\tthis.activeCssTab = 0;\n\tthis.activateDebug = false;\n\tthis.isWindowCreated = false;\n\tthis.isMenuVisible = false;\n \/\/var initOptions = new air.Introspector.runtime.NativeWindowInitOptions();\n \/\/initOptions.transparent = true;\n \/\/initOptions.systemChrome = \"none\";\n if(typeof config!=\'undefined\'){\n\t\tair.Introspector.extend(this, config);\n\t}\n\tvar css = air.Introspector.getCssGroups();\n\tthis.cssGroupNames = css[0];\n\tthis.cssGroups = css[1];\n\tthis.isAppSandbox = isAppSandbox;\n}\n\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\t\tair.Introspector.DebugWindow.prototype = \n\t\t{\n\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.INIT.js\n\t\t\/\/=======================================================================================================================================================\n\t\tsaveConfig: function(force){\n\tif(this.evalHistory&&this.evalHistory.length>30){\n\t\tthis.evalHistory.splice(0, this.evalHistory.length-30);\n\t\tthis.evalHistoryPos = this.evalHistory.length;\n\t}\n\t\n\tvar config = {\n\t\tevalHistory : this.evalHistory\n\t};\n\t\n\tif(isAppSandbox){\n\t\tif(this.nativeWindow.displayState==runtime.flash.display.NativeWindowDisplayState.NORMAL){\n\t\t\tconfig.rect = {\n\t\t\t\tx:this.nativeWindow.x,\n\t\t\t\ty:this.nativeWindow.y,\n\t\t\t\twidth:this.nativeWindow.width,\n\t\t\t\theight:this.nativeWindow.height\n\t\t\t};\n\t\t}else if(this.lastConfig){\n\t\t\tconfig.rect = this.lastConfig.rect;\n\t\t}\n\t\tconfig.windowState = this.nativeWindow.displayState;\n\t}else{\n\t\tconfig.rect = {\n\t\t\tx:this.window.screenX,\n\t\t\ty:this.window.screenY,\n\t\t\twidth:this.window.outerWidth,\n\t\t\theight:this.window.outerHeight\n\t\t};\n\t}\n\n\tvar ok = typeof force!=\'undefined\'?force:false;\n\tif(!ok&&this.lastConfig){\n\t\tif(!ok&&this.lastConfig.rect&&config.rect){\n\t\t\tif(config.rect.x!=this.lastConfig.rect.x) ok=true;\n\t\t\tif(config.rect.y!=this.lastConfig.rect.y) ok=true;\n\t\t\tif(config.rect.width!=this.lastConfig.rect.width) ok=true;\n\t\t\tif(config.rect.height!=this.lastConfig.rect.height) ok=true;\t\t\t\n\t\t}else{ ok=true; }\n\t\tif(!ok&&this.lastConfig.windowState&&config.windowState){\n\t\t\tif(config.windowState!=this.lastConfig.windowState) ok=true;\t\t\t\n\t\t}else{ ok=true; }\n\t}\n\tif(!ok)return;\n\tif(this.writeTimeout){\n\t\tclearTimeout(this.writeTimeout);\n\t\tthis.writeTimeout = null;\n\t}\n\t\n\tthis.writeTimeout = setTimeout(function(){ \n\t\tair.Introspector.writeConfigFile(config);\t\t\n\t}, 300);\n\n\tthis.lastConfig = config;\n},\n\nreadConfig: function(config){\n\tif(config.evalHistory){\n\t\tthis.evalHistory = config.evalHistory;\n\t\tthis.evalHistoryPos = config.evalHistory.length;\n\t}\n\tif(isAppSandbox){\n\t\tif(config.rect){\n\t\t\tthis.nativeWindow.x = config.rect.x;\n\t\t\tthis.nativeWindow.y = config.rect.y;\n\t\t\tthis.nativeWindow.width = config.rect.width;\n\t\t\tthis.nativeWindow.height = config.rect.height;\n\t\t}\n\t\tif(config.windowState){\n\t\t\tswitch(config.windowState){\n\t\t\t\tcase runtime.flash.display.NativeWindowDisplayState.MAXIMIZED:\n\t\t\t\t\tthis.nativeWindow.maximize();\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase runtime.flash.display.NativeWindowDisplayState.MINIMIZED:\n\t\t\t\t\tthis.nativeWindow.minimize();\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}else{\n\t\tif(config.rect){\n\t\t\tthis.window.moveTo(config.rect.x, config.rect.y);\n\t\t\tthis.window.resizeTo(config.rect.width, config.rect.height);\n\t\t}\n\t}\n\tthis.lastConfig = config;\n},\n\n\ninitConfigFile: function(){\n\tvar self = this;\n\n\tif(isAppSandbox){\n\t\tvar config = air.Introspector.readConfigFile();\n\t\tif(typeof config==\'undefined\') config = {};\n\t\tthis.readConfig(config);\n\t\tthis.nativeWindow.addEventListener(runtime.flash.events.NativeWindowBoundsEvent.MOVE , function(){ self.saveConfig(); });\n\t\tthis.nativeWindow.addEventListener(runtime.flash.events.NativeWindowBoundsEvent.RESIZE , function(){ self.saveConfig(); });\t\n\t}else{\n\t\tair.Introspector.readConfigFile(true, function(config){\n\t\t\tif(typeof config==\'undefined\') config = {};\n\t\t\tself.readConfig(config);\n\t\t\tsetInterval(function() { self.saveConfig(); }, 900);\n\t\t});\n\t}\n},\n\n\n\nloadUIElements: function(){\n\t\tthis.consoleDiv = this.htmlLoader.window.document.getElementById(\'console\');\n\t this.windowsDiv = this.htmlLoader.window.document.getElementById(\'windowList\');\n\t this.tabLabels = this.htmlLoader.window.document.getElementById(\'tabLabels\');\n\n\t\/\/ this.consoleTabLabel = this.htmlLoader.window.document.getElementById(\'consoleTabLabel\');\n\t\/\/ this.html2TabLabel = this.htmlLoader.window.document.getElementById(\'html2TabLabel\');\n\n\t this.evalConsoleText = this.htmlLoader.window.document.getElementById(\'evalConsoleText\');\n\t this.tabPages = this.htmlLoader.window.document.getElementById(\'tabPages\');\n\n\t this.cssTabLabels = this.htmlLoader.window.document.getElementById(\'css2TabLabels\');\n\t this.cssTabPages = this.htmlLoader.window.document.getElementById(\'css2TabPages\');\n\n\n\t this.domDiv = this.htmlLoader.window.document.getElementById(\'domTab\');\n\t \/\/this.htmlDiv = this.htmlLoader.window.document.getElementById(\'htmlTab\');\n\t this.netTabDiv = this.htmlLoader.window.document.getElementById(\'netTab\');\n\t this.html2TabDiv = this.htmlLoader.window.document.getElementById(\'html2Tab\');\n\t\tthis.html2Div = this.htmlLoader.window.document.getElementById(\'html2Div\');\n\t\tthis.html2Split = this.htmlLoader.window.document.getElementById(\'html2Split\');\n\t\tthis.css2Div = this.htmlLoader.window.document.getElementById(\'css2Div\');\n\t\tthis.css2SplitObj = new air.Introspector.split(this.html2Split, this.html2Div, this.css2Div , 300, 150);\n\t this.assetsTabDiv = this.htmlLoader.window.document.getElementById(\'assetsTab\');\n\t this.sourcesTabDiv = this.htmlLoader.window.document.getElementById(\'sourceTab\');\n\t this.inspectToolLabel = this.htmlLoader.window.document.getElementById(\'inspectToolLabel\');\n\t this.consoleMenuDiv = this.htmlLoader.window.document.getElementById(\'consoleMenuDiv\');\n\t this.domMenuDiv = this.htmlLoader.window.document.getElementById(\'domMenuDiv\');\t\n\t\tthis.menuDiv = this.htmlLoader.window.document.getElementById(\'menuDiv\');\t\n\n\t\tthis.domRemoveAttributeMenuDiv = this.htmlLoader.window.document.getElementById(\'domRemoveAttributeMenuDiv\');\n\n\t\tthis.css2DomTab = this.htmlLoader.window.document.getElementById(\'css2DomTab\');\n\t\tthis.css2StyleTab = this.htmlLoader.window.document.getElementById(\'css2StyleTab\');\n\t\tthis.searchTextBox = this.htmlLoader.window.document.getElementById(\'searchTextBox\');\n\t\tthis.txtSearch = this.htmlLoader.window.document.getElementById(\'txtSearch\');\n\n\t\tthis.refreshActiveWindowButton = this.htmlLoader.window.document.getElementById(\'refreshActiveWindow\');\n\t\n\t},\n\t\n\ncreateMenu: function(){\n\tvar self = this;\n\tif(isAppSandbox){\n\t\tvar consoleMenu = new runtime.flash.display.NativeMenu();\n\t\tvar domMenu = new runtime.flash.display.NativeMenu();\n\t\t\n\t\tvar clearMenu = new runtime.flash.display.NativeMenuItem(\'Clear console\');\n\t\tclearMenu.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.clearConsole(); });\n\n\t\tvar saveMenu = new runtime.flash.display.NativeMenuItem(\'Save console to file...\');\n\t\tsaveMenu.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.saveConsoleToFile(); });\n\n\t\tvar clipboardMenu = new runtime.flash.display.NativeMenuItem(\'Save console to clipboard\');\n\t\tclipboardMenu.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.saveConsoleToClipboard(); });\n\n\n\t\tvar copyMenu = new runtime.flash.display.NativeMenuItem(\'Copy\');\n\t\tcopyMenu.addEventListener(runtime.flash.events.Event.SELECT, function(){ air.Introspector.runtime.NativeApplication.nativeApplication.copy() });\n\n\n\t\t\n\t\tvar domMenuExpand = new runtime.flash.display.NativeMenuItem(\'Expand All\');\n\t\tdomMenuExpand.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.expandHoverDomElement(); });\t\t\n\t\tthis.domMenuExpand = domMenuExpand;\n\t\t\n\t\tvar domMenuCollapse = new runtime.flash.display.NativeMenuItem(\'Collapse\');\n\t\tdomMenuCollapse.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.collapseHoverDomElement(); });\t\t\t\t\n\t\tthis.domMenuCollapse = domMenuCollapse;\n\t\t\n\t\tvar domMenuAddAttribute = new runtime.flash.display.NativeMenuItem(\'Add attribute\');\n\t\tdomMenuAddAttribute.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.addHoverDomElementAttribute(); });\t\t\n\t\tthis.domMenuAddAttribute = domMenuAddAttribute;\n\t\t\n\t\tvar domMenuRemoveAttribute = new runtime.flash.display.NativeMenuItem(\'Remove attribute\');\n\t\tdomMenuRemoveAttribute.addEventListener(runtime.flash.events.Event.SELECT, function(){ self.removeHoverDomElementAttribute(); });\t\t\n\t\tthis.domMenuRemoveAttribute = domMenuRemoveAttribute;\n\t\t\n\t\t\n\t\t\n\t\tconsoleMenu.addItem(clearMenu);\n\t\tconsoleMenu.addItem(saveMenu);\t\n\t\tconsoleMenu.addItem(clipboardMenu);\t\n\t\tconsoleMenu.addItem(new runtime.flash.display.NativeMenuItem(\'\', true));\n\t\tconsoleMenu.addItem(copyMenu);\t\t\t\n\t\n\t\tdomMenu.addItem(domMenuExpand);\n\t\tdomMenu.addItem(domMenuCollapse);\t\t\n\t\tdomMenu.addItem(domMenuAddAttribute);\t\n\t\tdomMenu.addItem(domMenuRemoveAttribute);\t\t\t\n\t\t\t\n\t\tthis.consoleMenu = consoleMenu;\n\t\tthis.domMenu = domMenu;\n\t}else{\n\t\t\/\/preventing click when menu is visible\n\t\tthis.htmlLoader.window.document.addEventListener(\'click\', function(evt){\n\t\t\t\tif(self.isMenuVisible){\n\t\t\t\t\tvar parent = evt.srcElement;\n\t\t\t\t\twhile(parent){\n\t\t\t\t\t\tif(parent==self.menuDiv)\n\t\t\t\t\t\t\treturn;\n\t\t\t\t\t\tparent = parent.parentNode;\n\t\t\t\t\t}\n\t\t\t\t\tevt.stopPropagation();\n\t\t\t\t\tself.hideMenu();\n\t\t\t\t}\n\t\t\t}, true);\n\t\t\t\n\t\t\n\t\tvar preventClosingListener = function(){\n\t\t\t\tif(this.style.display==\'block\'){\n\t\t\t\t\tif(self.menuTimeout){\n\t\t\t\t\t\tclearTimeout(self.menuTimeout);\n\t\t\t\t\t\tdelete self.menuTimeout;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t};\n\n\t\tvar hideMenuListener = function(){\n\t\t\t\tif(this.style.visibility==\'visible\'){\n\t\t\t\t\tif(!self.menuTimeout)\n\t\t\t\t\t\tself.menuTimeout = setTimeout(function(){ self.hideMenu(); }, 400);\n\t\t\t\t}\t\n\t\t\t};\n\n\t\tthis.consoleMenuDiv.addEventListener(\'mouseover\', preventClosingListener, true);\n\t\tthis.domMenuDiv.addEventListener(\'mouseover\', preventClosingListener, true);\n\t\t\n\t\tthis.consoleMenuDiv.addEventListener(\'mouseout\',hideMenuListener , true);\n\t\tthis.domMenuDiv.addEventListener(\'mouseout\',hideMenuListener , true);\t\t\n\t}\n\t\n},\t\n\nattachSearchKeys: function(){\n\tvar self = this;\n\tthis.htmlLoader.window.document.addEventListener(\'keydown\', function(evt){\n\t\tif((evt.ctrlKey||evt.metaKey)==true&&evt.altKey==false&&evt.keyCode==70){\n\t\t\tself.searchTextBox.style.display = \'block\';\n\t\t\tself.txtSearch.focus();\n\t\t\tevt.preventDefault();\n\t\t}else if( evt.keyCode==27&&(evt.ctrlKey||evt.metaKey||evt.altKey)==false){\n\t\t\tif(self.searchTextBox.style.display == \'block\'){\n\t\t\t\tself.hideSearch();\n\t\t\t\tevt.preventDefault();\n\t\t\t}\n\t\t}\n\t});\n},\n\n\n\n\nattachUIWindow: function(window){\n\tif(!isAppSandbox){\n\t\tthis.window = window;\n\t\tthis.htmlLoader = { window: window };\n\t\tthis.window.document.title = \'Non Application Sandbox - frame id=\"\'+iframeId+\'\"\';\n\t}else{\n\t\tthis.htmlLoader = window.htmlLoader;\n\t\tthis.nativeWindow = window.nativeWindow;\n\t\tthis.nativeWindow.width = 640;\n\t this.nativeWindow.height = 480;\n\t\tthis.window = window;\n\t}\n},\n\ndispose: function(){\n\ttry{\n\t\tthis.finishInspect();\n\t\twindow.closed = true;\n\t}catch(e){} \n},\n\ninit: function(window){\n var self = this;\n\n this.isWindowCreated = true;\n this.attachUIWindow(window);\n\n\n\n this.initConfigFile();\n\n\n\n\t\n this.loadUIElements();\n this.createMenu();\n this.attachSearchKeys();\n\n\n\t\/\/restore inspecting to initial state\n\tif(this.isInspecting){\n this.inspectToolLabel.className+=\' selected\';\n }else{\n this.finishInspect();\n }\n\n\n this.consoleDiv.addEventListener(\'scroll\', function(){self.scrollDisabled = self.consoleDiv.scrollTop != self.consoleDiv.scrollHeight-self.consoleDiv.clientHeight;});\n \n\tthis.activateTab();\n\tthis.activateCssTab();\n\n \n this.isLoaded = true;\n if(this.logLines.length>0){\n this.refreshConsole();\n }\n \n if(this.requestLog.length>0){\n this.refreshNetConsole();\n }\n \n\n\tthis.refreshWindows();\n \n\tif(isAppSandbox){\n this.nativeWindow.visible = true;\n if(typeof window.activateDebug!=\'undefined\'&&window.activateDebug==false)\n {\n try{\n this.activeWindow.activate();\n\/\/ this.activeDebugWindow.orderToFront();\n }catch(e){\n }\n }\n \n\t air.Introspector.addKeyboardEvents(this.htmlLoader.stage);\n }\n\n this.refreshDomPanel();\n\n},\n\nrefreshWindows: function(){\n if(this.isAppSandbox){\n this.ownedWindows = air.Introspector.getHtmlWindows();\n this.windowsDiv.options.length = 0;\n\t\tvar windowsCount = 0;\n\t\tvar activeWindowFound = false;\n\t\tvar firstWindow = null;\n for(var i=this.ownedWindows.length-1;i>=0;i--){\n if(this.ownedWindows[i].nativeWindow==this.nativeWindow) continue;\n\t\t\ttry{\n\t\t\t\tif((this.ownedWindows[i].htmlLoader.window.alert+\'\').indexOf(\"[native code]\")<0) continue;\n\t\t\t}catch(e){ continue; }\n\t\t\t\twindowsCount ++;\n\t\t\tfirstWindow = this.ownedWindows[i].nativeWindow;\n\t\t\tif(this.ownedWindows[i].nativeWindow==this.activeWindow)\n\t\t\t\tactiveWindowFound = true;\n var selected = this.ownedWindows[i].nativeWindow==this.activeWindow;\n var option = new Option(this.ownedWindows[i].nativeWindow.title, i, selected, selected);\n\t\t\toption.innerHTML += \" \";\n this.windowsDiv.options.add(option);\n }\n\n\t\tif(windowsCount==0){\n\t\t\tif(air.Introspector.runtime.NativeApplication.nativeApplication.autoExit\n\t\t\t\t\t&&air.Introspector.config.closeIntrospectorOnExit){\t\t\t\n\t\t\t\tair.Introspector.runtime.NativeApplication.nativeApplication.exit();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tif(!activeWindowFound){\n\t\t\tthis.activeWindow = firstWindow;\n\t\t\tif(this.windowsDiv.options.length>0)\n\t\t\t\tthis.windowsDiv.options[0].selected = true;\n\t\t\tthis.activeHtmlLoader = null;\n\t\t}\n this.refreshDomPanel();\n this.createAssetsTree();\n this.createSourcesTree();\n\t}else{\n\t\tthis.windowsDiv.style.display=\'none\';\n\t\tthis.refreshActiveWindowButton.value=\'Refresh\';\n\t\t this.refreshDomPanel();\n\t this.createAssetsTree();\n\t this.createSourcesTree();\n\t}\n},\n\n\n refreshDomPanel: function(){\n this.makeDomDiv();\n this.makeHtmlDiv();\n },\n\n completeWindow: function(htmlLoader){\n \/\/clear dom related to this htmlLoader\n var self = this;\n var activeHtmlLoader = this.getActiveHtmlLoader();\n if(activeHtmlLoader==htmlLoader){\n this.createAssetsTree();\n this.createSourcesTree();\n }else{\n this.refreshWindows();\n }\n },\n\n setActiveWindowById: function(id){\n\t\tif(isAppSandbox){\n \t this.activeWindow = this.ownedWindows[id].nativeWindow;\n\t this.activeHtmlLoader = null;\n\t if(this.activeWindow!=null){\n\t try{\n\t this.logBuffer(this.activeWindow.title+\' selected\');\n\t }catch(e){\n\t }\n\t }\n\t this.refreshDomPanel();\n\t this.createAssetsTree();\n\t this.createSourcesTree();\n\t\t}\n },\n\n setActiveWindowByDocument: function(document){\n\t\tif(isAppSandbox){\n\t for(var i=this.windowsDiv.options.length-1;i>=0;i--){\n\t \ttry{\n\t \t\tvar option = this.windowsDiv.options[i];\n\t\t \tvar windowId = parseFloat(option.value);\n\t\t \tif(this.ownedWindows[windowId].htmlLoader.window.document==document){\n\t\t \t option.selected = true;\n\t\t \t this.setActiveWindowById(windowId);\n\t\t \t return;\n\t\t \t}\n\t \t}catch(e){\n\t \t}\n\t }\n\t\t}\n },\n\n getActiveHtmlLoader: function(){\n\t\tif(isAppSandbox){\n\t if(this.activeHtmlLoader==null&&this.activeWindow!=null){\n\t this.activeHtmlLoader = air.Introspector.findLoader(this.activeWindow.stage);\n\t }\n\t return this.activeHtmlLoader;\n\t\t}else{\n\t\t\treturn {window: this.activeWindow };\n\t\t}\n },\n\n\tsetTab: function(tab){\n\t\tthis.activeTab = tab;\n if(this.isLoaded){\n\t\t\tthis.activateTab();\n\t\t}\n\t\t\n },\n\tactivateTab: function(){\n this.clearTabs();\n\t\t\n\t\tvar tabName = this.tabs[this.activeTab];\n\t\tthis.activeTabDiv = this.htmlLoader.window.document.getElementById(tabName+\'Tab\');\n\t\tthis.htmlLoader.window.document.getElementById(tabName+\'Label\').className = \'selected\';\n this.activeTabDiv.className = \'selected\';\n\t\tthis.doFilter();\n\t\tif(this.activeTab==0){\n\t\t\tthis.evalConsoleText.focus();\n\t\t}\n\t},\n setTool: function(toolName){\n switch(toolName){\n case \'inspect\':\n this.toggleInspect();\n break;\n }\n },\n clearTabs: function(){\n var child = this.tabLabels.firstChild;\n while(child!=null){\n if(child.nodeType==1) child.className = child.className.replace(\/selected\/, \'\');\n child=child.nextSibling;\n }\n var child = this.tabPages.firstChild;\n while(child!=null){\n if(child.nodeType==1) child.className = child.className.replace(\/selected\/, \'\');\n child=child.nextSibling;\n }\n },\n\n \n\n\ttimerBounce: function(tag){\n\t\tvar bounceTimer = 1300;\n\t\tvar hideBounce = function(){\n\t\t\tif(tag.className.indexOf(\'bounce\')==-1) return;\n\t\t\ttag.className = tag.className.replace(\/bounceOn\/g, \"bounceOff\");\n\t\t\ttag.innerHTML +=\'\'; \/\/force render\n\t\t\tsetTimeout(showBounce, bounceTimer);\n\t\t};\n\t\tvar showBounce = function(){\n\t\t\tif(tag.className.indexOf(\'bounce\')==-1) return;\n\t\t\ttag.className = tag.className.replace(\/bounceOff\/g, \"bounceOn\");\n\t\t\ttag.innerHTML +=\'\';\t\/\/force render\t\t\n\t\t\tsetTimeout(hideBounce, bounceTimer);\t\t\t\n\t\t};\n\t\tsetTimeout(hideBounce, bounceTimer);\n\t},\n\t\n\tbounceTab: function(tab){\n\t\tif(!air.Introspector.config.flashTabLabels)\n\t\t\treturn;\n\t\t\n\t\tif(this.isLoaded&&this.activeTab!=tab){\n\t\t\ttry{\n\t\t\t\tvar tabName = this.tabs[tab];\n\t\t\t\tvar tag = this.htmlLoader.window.document.getElementById(tabName+\'Label\');\n\t\t\t\tif(tag.className.indexOf(\'bounce\')==-1){\n\t\t\t\t\ttag.className += \' bounceOn\';\n\t\t\t\t\tthis.timerBounce(tag);\n\t\t\t\t}\n\t\t\t}catch(e){\n\t\t\t\t\/\/wrong tab...\n\t\t\t}\n\t\t}\n\t},\n\t\n\t\n\tloadUrl: function(url, callback){\n \tvar loader = new air.Introspector.runtime.URLLoader();\n loader.addEventListener(air.Introspector.runtime.Event.COMPLETE, function(e)\n {\n \tcallback(loader.data);\n });\n loader.load(new air.Introspector.runtime.URLRequest(activeHtmlLoader.location));\n },\n \n \n \n closedWindow: function(htmlLoader){\n\t\tvar self = this;\n\t\tthis.htmlLoader.window.setTimeout(function(){\n \tself.refreshWindows();\n\t\t}, 0);\n },\n \n\thideMenu: function(ev){\n\t\tthis.isMenuVisible=false;\n\t\tthis.consoleMenuDiv.style.display = \'\';\n\t\tthis.domMenuDiv.style.display = \'\';\t\t\n\t\tthis.menuHoverDomElement = null;\t\t\n\t},\n\t\n\tshowMenu: function(ev){\n\t\tif(isAppSandbox){\n\t\t\tvar self = this;\n\t\t\tvar menu = this.activeTab==0?this.consoleMenu:null;\n\n\t\t\tif(this.hoverDomElement){\n\t\t\t\tthis.menuHoverDomElement = this.hoverDomElement;\n\t\t\t\tthis.menuHoverDomElementAttribute = this.hoverDomElementAttribute;\n\t\t\t\tthis.domMenuRemoveAttribute.enabled = this.hoverDomElementAttribute?true:false;\n\t\t\t\tmenu = this.domMenu;\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tif(menu){\n\t\t\t\tmenu.display(nativeWindow.stage, ev.pageX, ev.pageY);\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}else{\t\n\t\t\t\n\t\t\t\n\t\t\tvar menuDiv = this.activeTab==0?this.consoleMenuDiv:null;\n\t\t\t\n\t\t\tif(this.hoverDomElement){\n\t\t\t\tthis.menuHoverDomElement = this.hoverDomElement;\n\t\t\t\tmenuDiv = this.domMenuDiv;\n\t\t\t}\n\t\t\t\n\t\t\tif(this.hoverDomElementAttribute){\n\t\t\t\tthis.menuHoverDomElementAttribute=this.hoverDomElementAttribute;\n\t\t\t\tthis.domRemoveAttributeMenuDiv.style.display = \'\'; \t\t\t\t\n\t\t\t}else{\n\t\t\t\tthis.domRemoveAttributeMenuDiv.style.display = \'none\'; \n\t\t\t}\n\t\t\t\n\t\t\tif(menuDiv){\n\t\t\t\tthis.isMenuVisible = true;\n\t\t\t\tmenuDiv.style.left=(ev.pageX-4)+\'px\';\n\t\t\t\tmenuDiv.style.top=(ev.pageY-4)+\'px\';\t\t\t\n\t\t\t\tmenuDiv.style.display = \'block\';\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t}\n\n\t\treturn true;\t\n\t},\n\t\n\t\n\n\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.ASSETS.js\n\t\t\/\/=======================================================================================================================================================\n\t\tcreateLinksTree: function(document){\n\treturn function(){\n\t\tvar alreadyAdded = {};\n \tthis.items = [];\n \tfor(var i=0;i<document.links.length;i++){\n \t\tif(alreadyAdded[document.links[i].href]) continue;\n \t\tif(document.links[i].name&&document.links[i].name.length!=0){\n \t\t var node = new air.Introspector.tree.node(document.links[i].name, { nodeLabel2: document.links[i].href, openable:false});\n \t\t}else{\n \t\t\t var node = new air.Introspector.tree.node(document.links[i].href, { nodeLabel2: \'\', openable:false});\n \t\t}\n \t\tthis.items.push(node);\n \t\talreadyAdded[document.links[i].href]=true;\n \t}\n\t};\n},\n\ncreateImagesTree: function(document){\n return function(){\n \tvar alreadyAdded = {};\n this.items = [];\n for(var i=0;i<document.images.length;i++){\n \tif(alreadyAdded[document.images[i].src]) continue;\n\t\t\tvar title = document.images[i].src;\n\t\t\tif(isAppSandbox){\n\t\t\t\tvar file = new runtime.flash.filesystem.File(document.images[i].src);\n\t\t\t\tif(file.exists){\n\t\t\t\t\ttitle += \' [size: \'+(Math.round(file.size\/10.24)\/100)+\' KB]\';\n\t\t\t\t}else{\n\t\t\t\t\ttitle += \' [NOT FOUND]\';\n\t\t\t\t}\n\t\t\t}\n var node = new air.Introspector.tree.node(title, {\n src : document.images[i].src,\n onshow:function(){\n if(this.items.length==0){\n this.items = [ new air.Introspector.tree.imageDownloadNode(this.src) ];\n } \n }, onhide: function(){\n \t\/\/this.items.length = 0;\n\t\t\t\t\tthis.clearItems();\n }\n });\n this.items.push(node);\n alreadyAdded[document.images[i].src] = true;\n }\n };\n},\n\n\ncreateCssTree: function(document){\n return function(){\n this.items = [];\n for(var i=0;i<document.styleSheets.length;i++){\n \t\tvar node;\n if(document.styleSheets[i].href){\n \tnode = new air.Introspector.tree.node (document.styleSheets[i].href, {\n src : document.styleSheets[i].href,\n onshow:function(){\n if(this.items.length==0)\n this.items = [ new air.Introspector.tree.textDownloadNode(this.src) ]; \n }\n });\n }else{\n \t node = new air.Introspector.tree.node (\'<style>\', {\n text: document.styleSheets[i].ownerNode.innerHTML,\n onshow:function(){\n if(this.items.length==0)\n this.items = [ new air.Introspector.tree.textNode(this.text) ]; \n }\n }); \n }\n this.items.push(node);\n }\n };\n},\n\n\ncreateProjectTree: function(){\n\tif(isAppSandbox){\n\t\tvar self = this;\n \tvar formats = air.Introspector.formats;\n \tvar extendTree = function(parentNode, file){\n this.items = [];\n var files = file.getDirectoryListing();\n for(var i=0;i<files.length;i++){\n var node;\n if(files[i].isDirectory){\n node = new air.Introspector.tree.node (files[i].name , {\n src : files[i],\n onshow:function(){\n extendTree(this, this.src);\n },\n onhide:function(){\n \t\/\/this.items.length=0;\n\t\t\t\t\t\t\tthis.clearItems();\n }\n });\n }else{\n\t\t\t\t\t\tvar title = files[i].name;\n\t\t\t\t\t\tvar format = formats[files[i].extension];\n\n\t\t\t\t\t\tif(isAppSandbox && format==1){\n\t\t\t\t\t\t\tvar file = files[i];\n\t\t\t\t\t\t\tif(file.exists){\n\t\t\t\t\t\t\t\ttitle += \' [size: \'+(Math.round(file.size\/10.24)\/100)+\' KB]\';\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\ttitle += \' [NOT FOUND]\';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\t\n \t node = new air.Introspector.tree.node (title , {\n\t src : \'file:\/\/\/\'+files[i].nativePath,\n\t\t\t\t\t\t\tformat: formats[files[i].extension], \n\t onshow:function(){\n\t if(this.items.length==0){\n\t \tif(this.format==0){\n\t this.items = [ new air.Introspector.tree.textDownloadNode(this.src) ];\n\t \t}else if(this.format==1){\n\t \t this.items = [ new air.Introspector.tree.imageDownloadNode(this.src) ];\n\t \t}else if(this.format==2){\n\t\t\t\t\t\t\t\t\t\tif(this.items.length==0){\n\t\t\t\t\t\t\t\t\t\t\tvar selfNode = this;\n\t\t\t\t\t\t\t\t\t\t\tif(isAppSandbox){ \/\/can not be something else\n\t\t\t\t\t\t\t\t\t \tvar scriptLoader = new air.Introspector.runtime.URLLoader();\n\t\t\t\t\t\t\t\t\t\t scriptLoader.addEventListener(air.Introspector.runtime.Event.COMPLETE, function(e){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar domParser = new DOMParser();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tvar xmlData = domParser.parseFromString(scriptLoader.data, \"text\/xml\");\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tself.extendDom2TreeNode(selfNode, xmlData, true);\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}catch(e){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t \t\t\tselfNode.items = [ new air.Introspector.tree.textNode(scriptLoader.data) ];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}catch(err){\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tselfNode.items = [ new air.Introspector.tree.textNode(err+\'\') ];\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tselfNode.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\t\tscriptLoader = null;\n\t\t\t\t\t\t\t\t\t\t\t });\n\t\t\t\t\t\t\t\t\t\t\t\tscriptLoader.addEventListener(air.Introspector.runtime.IOErrorEvent.IO_ERROR, function(e){\n\t\t\t\t\t\t\t\t\t\t\t\t\tselfNode.items = [ new air.Introspector.tree.textNode(\"error loading file \"+e) ];\n\t\t\t\t\t\t\t\t\t\t\t\t\tselfNode.show();\n\t\t\t\t\t\t\t\t\t\t\t\t\tair.Introspector.logError(e);\n\t\t\t\t\t\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\t\t\t\t\t\tscriptLoader.load(new air.Introspector.runtime.URLRequest(this.src));\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\tselfNode.items = [ new air.Introspector.tree.textNode(\"Loading...\") ];\n\t\t\t\t\t\t\t\t\t\t}\n\t \t}\n\t } \n\t }, onhide: function(){ this.clearItems(); }\n\t });\n }\n parentNode.items.push(node);\n }\n };\n \n node = new air.Introspector.tree.node (\'Application files\' , {\n src : runtime.flash.filesystem.File.applicationDirectory,\n onshow:function(){\n extendTree(this, this.src);\n },\n onhide:function(){\n \/\/this.items.length=0;\n\t\t\t\t\t\t\tthis.clearItems();\n }\n });\n return node;\n\t}else{\n\t\treturn null;\n\t}\n},\n \n\ncreateScriptsTree: function(document){\n return function(){\n this.items = [];\n for(var i=0;i<document.scripts.length;i++){\n\t\t\tvar node;\n \tif(document.scripts[i].src){\n \t\tnode = new air.Introspector.tree.node (document.scripts[i].src, {\n \t\t\tsrc : document.scripts[i].src,\n \t\t\tonshow:function(){\n\t \t\t\t\tif(this.items.length==0){\t\n\t\t\t\t\t\t\tif(this.src.length>=3&&this.src.substr(this.src.length-3).toLowerCase()==\'swf\'){\n\t\t\t\t\t\t\t\tthis.items = [ new air.Introspector.tree.textNode(\"SWF file\") ]; \n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tthis.items = [ new air.Introspector.tree.textDownloadNode(this.src) ];\t\t\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n \t\t\t}\n \t\t});\n \t}else{\n node = new air.Introspector.tree.node (\'<script>\', {\n \ttext: document.scripts[i].innerText,\n \tonshow:function(){\n \t\tif(this.items.length==0)\n this.items = [ new air.Introspector.tree.textNode(this.text) ]; \n }\n });\t\n \t}\n this.items.push(node); \n }\n };\n \n}, \n\ncreateAssetsTree: function(){\n this.assetsTabDiv.innerHTML = \'\';\n\tif(this.assetsTabDivNode){\n\t\tthis.assetsTabDivNode.dispose();\n\t\tthis.assetsTabDivNode = null;\n\t}\n var activeHtmlLoader = this.getActiveHtmlLoader();\n if(activeHtmlLoader!=null){\n var document = activeHtmlLoader.window.document;\n\t\tif(!document)return;\n var self = this;\n var node = new air.Introspector.tree.node(\"Assets\",{\n onshow: function(){\n this.items = [\n new air.Introspector.tree.node(\"Links\",{openable:document.links.length!=0, onshow: self.createLinksTree(document) } ),\n new air.Introspector.tree.node(\"Images\",{openable:document.images.length!=0, onshow: self.createImagesTree(document) } ),\n new air.Introspector.tree.node(\"CSS (\"+document.styleSheets.length+\')\',{openable:document.styleSheets.length!=0, onshow: self.createCssTree(document) } ),\n new air.Introspector.tree.node(\"JS (\"+document.scripts.length+\')\',{openable:document.scripts.length!=0, onshow: self.createScriptsTree(document) } ),\n ];\n },\n onhide: function(){\n \t\/\/this.items.length = 0;\n\t\t\t\tthis.clearItems();\n }\n });\n node.shouldOpen();\n\t\tthis.assetsTabDivNode = node;\n this.assetsTabDiv.appendChild(node.createDiv(this.htmlLoader.window.document));\n }\n\n},\n\ncreateSourcesTree: function(){\n this.sourcesTabDiv.innerHTML = \'\';\n\n\tif(this.sourceTabDivNodes){\n\t\tfor(var i=this.sourceTabDivNodes.length-1;i>=0;i--){\n\t\t\tif(this.sourceTabDivNodes[i]){\n\t\t\t\tthis.sourceTabDivNodes[i].dispose();\n\t\t\t\tthis.sourceTabDivNodes[i] = null;\n\t\t\t}\n\t\t}\n\t\tthis.sourceTabDivNodes = null;\n\t}\n\t\n\tthis.sourceTabDivNodes = [];\n var activeHtmlLoader = this.getActiveHtmlLoader();\n if(activeHtmlLoader!=null){\n var document = activeHtmlLoader.window.document;\n var self = this;\n var node = new air.Introspector.tree.node(\"Actual source\",{\n \tsrc: activeHtmlLoader.window.location, \n onshow: function(){\n this.items = [ new air.Introspector.tree.textDownloadNode(this.src) ]; \n },\n onhide: function(){\n \/\/this.items.length = 0;\n\t\t\t\tthis.clearItems();\n }\n });\n\t\tthis.sourceTabDivNodes.push(node);\n this.sourcesTabDiv.appendChild(node.createDiv(this.htmlLoader.window.document));\n \n var node = new air.Introspector.tree.node(\"Parsed source\",{\n \t\/\/text: ,\n onshow: function(){\n this.items = [ new air.Introspector.tree.textNode(document.firstChild.outerHTML) ]; \n },\n onhide: function(){\n \/\/this.items.length = 0;\n\t\t\t\tthis.clearItems();\n }\n });\n\t\tthis.sourceTabDivNodes.push(node);\n this.sourcesTabDiv.appendChild(node.createDiv(this.htmlLoader.window.document));\n\n\t\tif(isAppSandbox){\n var node = this.createProjectTree();\n\t\t\tthis.sourceTabDivNodes.push(node);\n this.sourcesTabDiv.appendChild(node.createDiv(this.htmlLoader.window.document));\n\t\t}\n }\n},\n\n\n\n\n\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.CONSOLE.js\n\t\t\/\/=======================================================================================================================================================\n\t\t\n\n\n\n\n extendTreeNode: function(node, obj){\n try{\n var self = this;\n var items = [];\n if(typeof obj==\'undefined\'||obj==null)\n return;\n if(air.Introspector.isXMLObject(obj)){\n \tthis.extendDom2TreeNode(node, obj);\n \treturn;\n } \n var isItemNative = air.Introspector.isItemNative(obj);\n var parseArray = air.Introspector.isArrayObject(obj)||air.Introspector.isArgumentsObject(obj)||isItemNative;\n var parseHash = !parseArray || isItemNative;\n if (parseArray){\n\t\t\t\tvar l = obj.length;\n \tfor(var i=0;i<l;i++){\n var value;\n try{\n value = obj[i];\n }catch(e){\n value = e;\n }\n items.push(this.createJsTreeNode(i, value, this.createGetter(obj, i), this.createSetter(obj, i))); \n }\n } \n if(parseHash) {\n for(var i in obj){\n var value;\n try{\n value = obj[i];\n }catch(e){\n value = e;\n }\n items.push(this.createJsTreeNode(i, value, this.createGetter(obj, i), this.createSetter(obj, i)));\n }\n }\n\n\t\t\tif(air.Introspector.config.debugRuntimeObjects){\n\t\t\t\ttry{\n\t\t\t\t\tvar typeDescription = runtime.flash.utils.describeType(obj);\n\t\t\t\t\tif(!this.domParser) this.domParser = new DOMParser();\n\t\t\t\t\tvar typeXml = this.domParser.parseFromString(typeDescription, \"text\/xml\");\n\t\t\t\t\tvar child = typeXml.firstChild.firstChild;\n\t\t\t\t\twhile(child){\n\t\t\t\t\t\tif(child.nodeName==\'accessor\'||child.nodeName==\'constant\'||child.nodeName==\'method\'||child.nodeName==\'variable\'){\n\t\t\t\t\t\t\tvar name = child.getAttribute(\'name\');\n\t\t\t\t\t\t\tif(name!=null && name!=\'prototype\'){\n\t\t\t try{\n\t\t\t\t\t\t\t\t\titems.push(this.createJsTreeNode(name, obj[name], this.createGetter(obj, name), this.createSetter(obj, name)));\t\t\n\t\t\t }catch(e){\n\t\t\t\t\t\t\t\t\titems.push(this.createJsTreeNode(name, \'\', this.createGetter(obj, name), this.createSetter(obj, name), e));\n\t\t\t }\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t\tchild = child.nextSibling;\n\t\t\t\t\t}\n\t\t\t\t}catch(e){\n\t\t\t\t\t\/\/just hide the error\n\t\t\t\t}\n }\n items.sort(function(node1, node2){\n \tvar isNode1Number = parseInt(node1.nodeLabel)==node1.nodeLabel;\n \tvar isNode2Number = parseInt(node2.nodeLabel)==node2.nodeLabel;\n \tif(isNode1Number&&isNode2Number){\n \t\treturn parseInt(node1.nodeLabel)-parseInt(node2.nodeLabel);\n \t}\n \tif(isNode1Number){\n \t\treturn -1;\n \t}\n \tif(isNode2Number){\n \t\treturn 1;\n \t}\n \tif(node1.nodeLabel.toLowerCase()==node2.nodeLabel.toLowerCase())\n return 0;\n if(node1.nodeLabel.toLowerCase()<node2.nodeLabel.toLowerCase())\n return -1;\n return 1;\n });\n }catch(e){\n this.logError(e);\n }\n\t\tnode.items = items;\n },\n\n createGetter: function(obj, i){\n return function(){ \n try{\n return obj[i];\n }catch(e){}\n }\n },\n\n createSetter: function(obj, i){\n return function(value){ \n try{\n obj[i] = value;\n }catch(e){}\n }\n },\n\n\n\n\n\tcreateJsTreeNode : function(stringValue, value, getter, setter, error){\n var self = this;\n\n var config = {\n editable:false,\n onshow: function(sender){\n\t\t\t\t\tself.extendTreeNode(sender, value);\n }, \n onhide: function(){\n\t\t\t\t\tthis.clearItems();\n\/\/ this.items.length = 0;\n },\n onclick: function(){\n \tif(typeof getter!=\'undefined\'){\n \t self.clicked = getter();\n \t}\n },\n getEditValue: function(){\n if(typeof getter!=\'undefined\')\n {\n switch(this.valueType){\n case 0:\n return getter();\n case 1:\n return getter().replace(\/\\n\/g, \"\\\\n\");\n }\n }\n },\n setEditValue: function(value)\n {\n if(typeof setter!=\'undefined\'){\n switch(this.valueType){\n case 0:\n var lowerCaseValue = value.toLowerCase();\n if(lowerCaseValue==\'true\')\n setter(true);\n else if(lowerCaseValue==\'false\')\n setter(false);\n else\n setter(parseFloat(value));\n break;\n case 1:\n setter(value.replace(\/\\\\n\/g, \"\\n\"));\n break;\n }\n setTimeout(function(self){\n if(typeof getter!=\'undefined\'){\n var value = getter();\n if(typeof value!=\'undefined\'&&value!=null){\n switch(self.valueType){\n case 0:\n self.nodeLabel2 = value;\n break;\n case 1:\n var newValue = value.replace(\/\\n\/g, \"\\\\n\");\n if(newValue.length == 0) newValue = \'[empty string - click to edit]\';\n else newValue = \'\"\'+newValue +\'\"\';\n self.nodeLabel2 = newValue;\n break;\n }\n self.refreshLabel();\n }\n }\n },0,this);\n }\n }\n };\n\n var openable = false;\n var value2 = \'\';\n\n if(typeof value==\'undefined\'){\n openable = false;\n\t\tvalue2 = \'[undefined]\';\n }else if(value==null){\n openable = false;\n\t\tvalue2 = \'[null]\';\n }else{\n\t\t\n\t\t\n openable = false;\n for(var i in value){\n openable=true;\n break;\n }\n\t\tvar hasASValues = false;\n\t\tif(air.Introspector.config.debugRuntimeObjects){\n\t\t\ttry{\n\t\t\t\tvar typeDescription = runtime.flash.utils.describeType(value);\n\t\t\t\tif(!this.domParser) this.domParser = new DOMParser();\n\t\t\t\tvar typeXml = this.domParser.parseFromString(typeDescription, \"text\/xml\");\n\t\t\t\tvar child = typeXml.firstChild.firstChild;\n\t\t\t\twhile(child){\n\t\t\t\t\tif(child.nodeName==\'accessor\'||child.nodeName==\'method\'||child.nodeName==\'constant\'||child.nodeName==\'variable\'){\n\t\t\t\t\t\tif(child.getAttribute(\'declaredBy\') != \'flash.html::__HTMLScriptFunction\'){\n\t\t\t\t\t\t\topenable = true;\n\t\t\t\t\t\t\thasASValues = true;\t\n\t\t\t\t\t\t}\t\t\t\t\t\t\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t\tchild=child.nextSibling;\n\t\t\t\t}\n\t\t\t}catch(e){\n\t\t\t\t\/\/hide the error\n\t\t\t}\n\t\t}\n\tif(typeof error!=\'undefined\'){\n\t\t\n\t}else if(air.Introspector.isNumberObject(value)){\n value2 = value;\n if(typeof setter!=\'undefined\'){\n config.editable = true;\n config.valueType = 0;\n }\n openable = false;\n }else if(air.Introspector.isStringObject(value)){\n value2 = value.replace(\/\\n\/g, \"\\\\n\");\n if(value2.length == 0) value2 = \'[empty string - click to edit]\';\n else value2 = \'\"\'+value2 +\'\"\';\n\n if(typeof setter!=\'undefined\'){\n config.editable = true;\n config.valueType = 1; \n }\n openable = false;\n }else if(air.Introspector.isArgumentsObject(value)){\n value2 = \'[Arguments \'+value.length+\']\';\n openable = true;\n }else if(air.Introspector.isArrayObject(value)||(air.Introspector.isItemNative(value)&&typeof value.length!=\'undefined\')){\n value2 = \'[Array \'+value.length+\']\';\n openable = true;\n }else if(typeof value==\'function\' && !hasASValues ){\n\t\t\t\topenable = false;\n\t\t\t\tvalue2 = \"[function]\";\n\t\t }else{\n try{\n value2 = value+\'\';\n }catch(e){\n value2 = e+\'\';\n }\n }\n }\n\n config.nodeLabel2 = value2;\n config.openable = openable; \n\n if(air.Introspector.isStringObject(stringValue)&&stringValue.length==0){\n \tstringValue = value2;\n \tconfig.nodeLabel2 = \'\';\n }\n return new air.Introspector.tree.node(stringValue,config);\n },\n\n\n\t logArguments: function(args, config){\n\t if(typeof config==\'undefined\') config = {};\n\t config.buffer=\'\';\n\t if(args.length==1)\n\t this.logObject(args[0], config);\n\t else\n\t this.logObject(args, config);\n\t },\n\t\n\t\n\t logObject: function(obj, config){\n\t if(typeof config==\'undefined\') config = {};\n\t if(this.isLoaded){\n\t \t\tif(typeof obj != \'undefined\')\n\t\t\t\t{\n\t \t\tvar node = this.createJsTreeNode(\'\', obj);\n\t \t\tvar addElement = true;\n\t \t\tif(node.openable&&config.buffer==\'\'){\n\t \t\t\ttry{\n\t\t\t\t\t\t\tif(air.Introspector.isArrayObject(obj)||air.Introspector.isArgumentsObject(obj)){\n\t\t\t\t\t\t\t\tvar l = obj.length;\n\t\t\t\t\t\t\t\tvar str = \'\';\n\t\t\t\t\t\t\t\tfor(var i=0;i<l;i++){\n\t\t\t\t\t\t\t\t\ttry{\n\t\t\t\t\t\t\t\t\t\tif(typeof obj[i]==\'undefined\')\n\t \t\t\tstr+= \'[undefined], \';\t\t\t\n\t\t\t\t\t\t\t\t\t\telse if(air.Introspector.isArrayObject(obj[i]))\n\t\t\t\t\t\t\t\t\t\t\tstr+=\'[Array \'+obj[i].length+\'], \';\n\t\t\t\t\t\t\t\t\t\telse if(air.Introspector.isArgumentsObject(obj[i]))\n\t\t\t\t\t\t\t\t\t\t\tstr+=\'[Arguments \'+obj[i].length+\'], \';\n\t\t\t\t\t\t\t\t\t\telse\n\t \t\t\tstr+= obj[i]+\', \';\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}catch(e){\n\t\t\t\t\t\t\t\t\t\tstr+=\'[\'+e+\'], \';\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tconfig.buffer = str;\n\t\t\t\t\t\t\t}\n\t\t }catch(e){\n\t\t }\n\t \t\t}\n\t \t\tif(typeof config.buffer==\'undefined\'||config.buffer==\'\'){\n\t \t\t\ttry{\n\t \t config.buffer = obj+\'\';\n\t \t addElement = node.openable;\n\t \t\t\t}catch(e){\n\t \t\t\t\tconfig.buffer = e;\n\t \t\t\t}\n\t \t\t}\n\t \t\tif(addElement)\n\t \t\t config.element = node.createDiv(this.htmlLoader.window.document);\t\n\t \t}else if(typeof config.fromConsole==\'undefined\'||config.fromConsole==false){\n\t\t\t\t\tvar node = this.createJsTreeNode(\'[undefined]\');\n\t\t\t\t\tconfig.element = node.createDiv(this.htmlLoader.window.document);\t\n\t\t\t\t}\n\t this.logBuffer(config.buffer, config);\n\t\t\t\tthis.bounceTab(0);\n\t }else{\n\t air.Introspector.extend(config, {obj: obj, isObject:true, doNotLog:true});\n\t this.logLines.push(config);\n\t }\n\t },\n\n\t showLogItem: function(logItem){\n\t if(this.isLoaded){\n\t var listItem = this.consoleDiv.ownerDocument.createElement(\'li\');\n\t var listItemText = this.consoleDiv.ownerDocument.createElement(\'div\');\n\t\t\t\tif(logItem.usePre)\n\t\t\t\t{\n\t\t\t\t\tvar pre = \"<pre>\"+air.Introspector.escapeHtml(logItem.buffer).replace(\/\\n\/g, \'<\/pre><pre>\') + \"<\/pre>\";\n\t \tlistItemText.innerHTML = logItem.specialBuffer + pre;\n\t\t\t\t}else\n\t \tlistItemText.innerHTML = logItem.specialBuffer + air.Introspector.escapeHtml(logItem.buffer);\n\t listItemText.className = \'\tconsoleItemText\';\n\t listItem.appendChild(listItemText);\n\t this.consoleDiv.appendChild(listItem);\n\t if(typeof logItem.element!=\'undefined\'){\n\t listItem.appendChild(logItem.element);\n\t }\n\t if(typeof logItem.type!=\'undefined\'){\n\t listItem.className += \' \'+logItem.type;\n\t var listItemType = this.consoleDiv.ownerDocument.createElement(\'div\');\n\t listItemType.className = \'typeBox\';\n\t switch(logItem.type){\n\t case \'warn\':\n\t listItemType.innerHTML = \'!\';\n\t break;\n\t case \'info\':\n\t listItemType.innerHTML = \'i\';\n\t break;\n\t case \'error\':\n\t listItemType.innerHTML = \'x\';\n\t break;\n\t }\n\t listItem.appendChild(listItemType);\n\t }\n\t this.scrollConsole();\n\t\t\t\tlogItem.displayObject = listItem;\n\t }\n\t },\n\t logBuffer: function(buffer, config){\n\t if(typeof config==\'undefined\') config = {};\n\t if(typeof buffer==\'undefined\') buffer = \'\';\n\t var specialBuffer = \'\';\n\t\t\tvar textSpecialBuffer = \'\';\n\t\t\t\n\t if(air.Introspector.config.showTimestamp){\n\t var date = typeof config.timestamp==\'undefined\'?new Date():config.timestamp;\n\t\t\t\tvar dateStr = air.Introspector.twoDigits(date.getHours())+\':\'+air.Introspector.twoDigits(date.getMinutes())+\':\'+air.Introspector.twoDigits(date.getSeconds());\n\t specialBuffer=\'<span class=\"consoleTimestamp\">[\'+dateStr+\']<\/span> \'+specialBuffer;\n\t\t\t\ttextSpecialBuffer= \'[\'+dateStr+\']\'+textSpecialBuffer;\n\t }\n\t if(air.Introspector.config.showSender&&config.htmlLoader){\n\t try{\n\t\t\t\t var locationStr = config.htmlLoader.window.location;\n\t specialBuffer=\'<span class=\"consoleFrom\">[\'+locationStr+\']<\/span>\'+specialBuffer;\n\t\t\t\t textSpecialBuffer= \'[\'+locationStr+\']\'+textSpecialBuffer;\n\t }catch(e){\n\t \/\/no htmlLoader provided - use current window\n\t buffer=\'[Debugger]\'+buffer;\n\t } \n\t }\n\t var logItem = {buffer: buffer, specialBuffer:specialBuffer, textSpecialBuffer:textSpecialBuffer};\n\t delete config.buffer;\n\t air.Introspector.extend(logItem, config);\n\t this.showLogItem(logItem);\n\t if(typeof config.doNotLog==\'undefined\'){\n\t this.logLines.push(logItem);\n\t }\n\t },\n\t scrollConsole:function(){\n\t \tif(!this.scrollDisabled)\n\t {\n\t \tvar self = this;\n\t setTimeout(function(){ self.consoleDiv.scrollTop = self.consoleDiv.scrollHeight; self.scrollDisabled = false; }, 0);\n\t }\n\t },\n\t refreshConsole: function(){\n\t this.consoleDiv.innerHTML = \'\';\n\t for(var i=0;i<this.logLines.length;i++){\n\t if(typeof this.logLines[i].isObject!=\'undefined\'){\n\t \/\/air.Introspector.is an Object log\n\t this.logObject(this.logLines[i].obj, this.logLines[i] );\n\t }else{\n\t this.showLogItem(this.logLines[i]);\n\t }\n\t }\n\t this.scrollConsole();\n\t },\n\t\n\t\n\t aireval : function(src, realWindow, result, error){\n\t var self = this;\n\t\t\tvar myAir = {\n\t Introspector: { \n\t loadedEval: src, \n\t mainWindow: realWindow,\n\t loaded: function(returnValue){\n\t if(typeof result==\'function\'){\n\t result.call(self, returnValue);\n\t }\n\t },\n\t error : function(returnValue){\n\t if(typeof error==\'function\'){\n\t error.call(self, returnValue);\n\t }\n\t }, \n\t }\n\t };\n\n\t\t\tif(isAppSandbox){\n\t var htmlLoader = new air.Introspector.runtime.HTMLLoader();\n\t htmlLoader.addEventListener(air.Introspector.runtime.Event.HTML_DOM_INITIALIZE, function(){\n\t \t htmlLoader.window.clicked = self.clicked;\n\/*\t\t\t\t\t htmlLoader.window.toXML = function(xml){\n\t\t\t\t\t\t\tvar domParser = new DOMParser();\n\t\t\t\t\t\t\treturn domParser.parseFromString(xml, \"text\/xml\");\n\t\t\t\t\t };*\/\n\t htmlLoader.window.air = myAir;\n\t });\n\t htmlLoader.loadString(\"<script>var result; var aireval = eval; var evalSource = air.Introspector.loadedEval; try {with(air.Introspector.mainWindow){ result=aireval(evalSource); };air.Introspector.loaded(result); }catch(e){air.Introspector.error(e)}<\/\"+\"script>\");\n\t\t\t}else{\n\t\t\t\t\/\/we just don\'t need all that stuff - real eval is there (we actually run this peace of code in the same sandbox)\n\t\t\t\tvar resultvalue; \n\t\t\t\tvar aireval2 = realWindow.eval; \n\t\t\t\tvar evalSource = myAir.Introspector.loadedEval; \n\t\t\t\ttry {\n\t\t\t\t\twith(realWindow){ \n\t\t\t\t\t\tresultvalue=aireval2(evalSource); \n\t\t\t\t\t};\n\t\t\t\t\tmyAir.Introspector.loaded(resultvalue); \n\t\t\t\t}catch(e){ \n\t\t\t\t\tmyAir.Introspector.error(e); \n\t\t\t\t}\n\t\t\t}\n\t },\n\t\n\t historyUserInput: function(step){\n\t if(typeof step!=\'undefined\'){\n\t if(this.evalHistoryPos==this.evalHistory.length){\n\t this.evalHistorySaved = this.evalConsoleText.value;\n\t }\n\t var newEvalHistoryPos = this.evalHistoryPos + step;\n\t if(newEvalHistoryPos>=0){\n\t if(newEvalHistoryPos<this.evalHistory.length){\n\t this.evalConsoleText.value = this.evalHistory[newEvalHistoryPos];\n\t }else if(newEvalHistoryPos==this.evalHistory.length){\n\t this.evalConsoleText.value = this.evalHistorySaved;\n\t }else{\n\t return;\n\t }\n\t this.evalHistoryPos = newEvalHistoryPos;\n\t this.evalConsoleText.selectionStart = this.evalConsoleText.value.length;\n\t }\n\t }else if(this.evalHistoryPos<this.evalHistory.length&&this.evalConsoleText.value!=this.evalHistory[this.evalHistoryPos]){\n\t this.evalHistoryPos=this.evalHistory.length;\n\t this.evalHistorySaved = this.evalConsoleText.value;\n\t }\n\t },\n\n\t evalUserInput: function(){\n\t var htmlLoader = this.getActiveHtmlLoader();\n\t if(htmlLoader==null){\n\t this.logBuffer(null, \'No active window.\');\n\t return;\n\t }\n\t try{\n\t var userEval = this.evalConsoleText.value;\n\n\t if(air.Introspector.trim(userEval).length==0)\n\t return;\n\n\t\t\t\tthis.scrollDisabled = false;\n\n\t this.evalHistory.push(userEval);\n\t this.evalHistoryPos = this.evalHistory.length; \n\t\n\t \t\t\tthis.saveConfig(true);\n\n\t this.aireval(userEval, htmlLoader.window, function(result){\n\t \/\/if(typeof result!=\'undefined\'){\n\t\t this.logObject(result, {htmlLoader:htmlLoader, buffer: \'>>>\'+userEval, fromConsole:true });\n\t \/\/}\n\t }, function(error){\n\t this.logError(error, {htmlLoader:htmlLoader, buffer: \'>>>\'+userEval });\n\t });\n\n\t this.evalConsoleText.value = \'\';\n\t }catch(e){\n\t this.logError(e, {htmlLoader:htmlLoader, buffer: \'>>>eval console\' });\n\t }\n\t },\n\n\t logError: function(error, config){\n\t if(typeof config==\'undefined\')\n\t config = {};\n\t config.type = \'error\';\n\t this.logObject(error, config);\n\t },\n\n\t\tgotoConsoleTab: function(){\n\t \tthis.setTab(0);\n\t },\n\n\n\t\tclearConsole: function(){\n\t\t\tthis.logLines = [];\n\t\t\tthis.refreshConsole();\n\t\t},\n\t\t\n\t\t\n\t\tsearchKeyDown: function(evt){\n\t\t\tif(evt.keyCode==13){\n\/\/\t\t\t\tthis.hideSearch();\n\t\t\t\tthis.searchIndex ++;\n\t\t\t\tthis.doSearchSelectIndex();\n\t\t\t}\n\t\t},\n\t\t\n\t\tdoSearchSelectIndex: function(){\n\t\t\tif(this.oldSelectedNode){\n\t\t\t\tthis.oldSelectedNode.className = (this.oldSelectedNode.className+\'\').replace(\/searchselect\/gi, \'\');\n\t\t\t\tthis.oldSelectedNode=null;\n\t\t\t}\n\t\t\t\n\t\t\tif(!this.searchBuffer||this.searchBuffer.length==0) return;\n\t\t\t\t\t\t\t\n\t\t\t\n\t\t\tif(this.searchIndex>=this.searchBuffer.length)\n\t\t\t\tthis.searchIndex = 0;\n\t\t\t\t\n\t\t\tif(this.searchIndex < 0)\n\t\t\t\tthis.searchIndex=this.searchBuffer.length-1;\n\n\t\t\tvar node = this.searchBuffer[this.searchIndex];\n\t\t\tif(!node) return;\t\t\t\n\t\t\tif(node.parentNode){\n\t\t\t\tthis.oldSelectedNode = node.parentNode;\n\t\t\t\tnode.parentNode.className+=\' searchselect\';\t\n\t\t\t\tnode.parentNode.scrollIntoViewIfNeeded();\n\t\t\t}\n\t\t},\n\t\tdoFilter: function(value){\n\t\t\tif(typeof value==\'undefined\'){ \/\/force search again\n\t\t\t\tvalue = this.consoleFilter;\n\t\t\t\tthis.consoleFilter = \'\';\n\t\t\t}\n\t\t\tif(value==this.consoleFilter) return;\n\t\t\t\n\t\t\tthis.consoleFilter = value;\n\t\t\t\t\t\t\t\t\t\t\n\/\/\t\t\tvar items = this.htmlLoader.window.document.getElementsByTagName(\'#text\');\n\t\t\tif(!value||value==\'\'){\n\t\t\t\tthis.searchBuffer = null;\t\t\t\t\n\t\t\t\tthis.doSearchSelectIndex();\n\t\t\t\treturn;\n\t\t\t} \n\t\t\t\n\t\t\tvar tw=this.htmlLoader.window.document.createTreeWalker(\n\t\t\t\t\t\tthis.activeTabDiv , this.htmlLoader.window.NodeFilter.SHOW_TEXT,\n\t\t\t\t\t { acceptNode: function(node) { return this.htmlLoader.window.NodeFilter.FILTER_ACCEPT; } },\n\t\t\t\t\tfalse\n\t\t\t\t);\n\t\t\t\t\n\t\t\tvar node;\n\t\t\tvar buf=[];\n\t\t\tvar lowValue = value.toLowerCase();\n\t\t\twhile(node=tw.nextNode())\n\t\t\t{\n\t\t\t\tif(node.nodeValue&&(node.nodeValue.toLowerCase().indexOf(lowValue)>=0))\n\t\t\t\t{\n\t\t\t\t\tif(node.parentNode&&this.htmlLoader.window.getComputedStyle(node.parentNode)[\'display\']==\'none\') continue; \n\t\t\t\t\tbuf.push(node);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tthis.searchBuffer = buf;\n\t\t\tthis.searchIndex = 0;\n\t\t\tthis.doSearchSelectIndex();\n\t\t\t\n\t\t\treturn;\n\t\t\t\/*if(this.searchTextBox.style.visibility!=\'hidden\'){\n\t\t\t\t\n\t\t\t\tif(value.length==0){\n\t\t\t\t\tfor(var i=this.logLines.length-1;i>=0;i--){\n\t\t\t\t\t\tvar logLine = this.logLines[i];\n\t\t\t\t\t\tif(logLine.displayObject)\n\t\t\t\t\t\t\tlogLine.displayObject.style.display = \'\';\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t}else{\n\t\t\t\t\tfor(var i=this.logLines.length-1;i>=0;i--){\n\t\t\t\t\t\tvar logLine = this.logLines[i];\n\t\t\t\t\t\tif(logLine.displayObject&&logLine.buffer){\n\t\t\t\t\t\t\tif((logLine.displayObject.innerText+\'\').indexOf(value)>=0){\n\t\t\t\t\t\t\t\tlogLine.displayObject.style.display = \'\';\n\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\tlogLine.displayObject.style.display = \'none\';\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}*\/\n\t\t},\n\t\thideSearch: function(){\n\t\t\tthis.txtSearch.blur();\t\t\t\n\t\t\tthis.searchTextBox.style.display=\"none\";\n\t\t\tthis.searchBuffer = null;\n\t\t\tthis.searchIndex = 0;\n\t\t\tthis.consoleFilter = \'\';\n\t\t\tthis.doFilter(\'\');\n\t\t\tthis.txtSearch.value = \'\';\n\t\t\tthis.doSearchSelectIndex();\n\t\t},\n\t\n\tsaveConsole: function(){\n\t\tvar str = \'\';\n\t for(var i=0;i<this.logLines.length;i++){\n\t\t\tvar logItem = this.logLines[i];\n\t\t\tif(typeof logItem.type!=\'undefined\'){\n\t switch(logItem.type){\n\t case \'warn\':\n\t str += \'[warn ]\';\n\t break;\n\t case \'info\':\n\t str += \'[info ]\';\n\t break;\n\t case \'error\':\n\t str += \'[error]\';\n\t break;\n\t }\n\t }\n\t\t str+=logItem.textSpecialBuffer+\': \';\n str+=logItem.buffer+\'\\r\\n\';\n }\t\n\t\treturn str;\n\t},\n\n\tsaveConsoleToFile: function(){\n\t\ttry{\n\t\t\tair.Introspector.writeConsoleToFile(this.saveConsole());\n\t\t}catch(e){this.logError(e);}\n\t},\n\tsaveConsoleToClipboard: function(){\n\t\ttry{\n\t\t\tair.Introspector.writeConsoleToClipboard(this.saveConsole());\n\t\t}catch(e){this.logError(e);}\t\t\n\t},\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.HTML.js\n\t\t\/\/=======================================================================================================================================================\n\t\tmakeHtmlDiv: function(){\n\t\tif(!this.isLoaded) return;\n try{\n var htmlLoader = this.getActiveHtmlLoader();\n if(htmlLoader!=null){\n\t \/*this.htmlDiv.innerHTML = \'\';\n\t var domTreeDiv = this.createDomTreeNode(htmlLoader.window.document).createDiv(this.htmlLoader.window.document);\n\t this.htmlDiv.appendChild(domTreeDiv);*\/\n\t this.html2Div.innerHTML = \'\';\n\t\t\t\tif(this.html2Node){\n\t\t\t\t\tthis.html2Node.dispose();\n\t\t\t\t\tthis.html2Node = null;\n\t\t\t\t}\n\n\t if(htmlLoader.window.document&&htmlLoader.window.document.firstChild){\n\t\t\t\t var node = this.createDom2TreeNode(htmlLoader.window.document);\n\t var domTreeDiv = node.createDiv(this.htmlLoader.window.document);\n\t\t\t\t\tthis.html2Node = node;\n\t \t\tthis.html2Div.appendChild(domTreeDiv);\t\t\t\t\t\n\t }\n\n }\n }catch(e){\n \tair.Introspector.Console.log(e);\n }\n },\n\n\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.XHR.js\n\t\t\/\/=======================================================================================================================================================\n\t\t\n \n logNet: function(xhr, method, url, asyncFlag){\n \tvar requestLog = this.requestLog;\n \tfor(var i=requestLog.length-1;i>=0;i--){\n if(requestLog[i].xhr == xhr){\n this.refreshRequestObject(requestLog[i]);\n return;\t\n } \t\t\n \t}\n \tvar request = {\n \t\txhr: xhr, \n \t\tmethod: method, \n \t\turl: url,\n\t\t\tasync: asyncFlag,\n \t\telement: null\n \t};\n \tif(this.isLoaded){\n \t this.viewRequestObject(request);\n \t}\n \trequestLog.push(request);\n\t\tthis.bounceTab(5);\n },\n\n\tlogNetSend: function(xhr, obj){\n \tvar requestLog = this.requestLog;\n \tfor(var i=requestLog.length-1;i>=0;i--){\n if(requestLog[i].xhr == xhr){\n\t\t\t\trequestLog[i].obj = obj;\n this.refreshRequestObject(requestLog[i]);\n\t\t\t\treturn;\t\n } \t\t\n \t}\n \tvar request = {\n \t\txhr: xhr, \n\t\t\tobj: obj,\n \t\tmethod: \'unknown\',\n \t\turl: \'\', \n \t\telement: null\n \t};\n \tif(this.isLoaded){\n \t this.viewRequestObject(request);\n \t}\n \trequestLog.push(request);\n\t\tthis.bounceTab(5);\n\t},\n \n refreshRequestObject: function(request){\n \tvar self =this;\n \tvar src = \'\';\n\t\tif(!request.node)\n\t\t\treturn;\n \t\trequest.node.items = [];\n \trequest.node.items.push( new air.Introspector.tree.node(\'readyState\' , { openable: false, nodeLabel2:request.xhr.readyState } ));\n \ttry{\n \t\trequest.node.items.push( new air.Introspector.tree.node(\'status\' , { openable: false, nodeLabel2:request.xhr.status } ));\n \t}catch(e){\n \t}\n\n \ttry{\n\t\t\tif(typeof request.async==\'undefined\')\n\t\t\t\trequest.async = true;\n \t\trequest.node.items.push( new air.Introspector.tree.node(\'async\' , { openable: false, nodeLabel2:request.async } ));\n \t}catch(e){\n \t}\n\n \ttry{\n request.node.items.push( new air.Introspector.tree.node(\'statusText\' , { openable: false, nodeLabel2:request.xhr.statusText } ));\n \t}catch(e){}\n\n\t\t\ttry{\n\t\t\t\tif(typeof request.obj!=\'undefined\'&&request.obj!=null){\n\t\t\t\t\tif(this.isXMLObject(request.obj)){\n\t\t\t request.node.items.push( new air.Introspector.tree.node(\'sent\' , { openable: true, \n\t\t\t src: request.obj.firstChild,\n\t\t\t onshow: function(){\n\t\t\t if(this.items.length==0){\n\t\t\t this.items = [self.createDom2TreeNode(this.src)];\n\t\t\t }\n\t\t\t } } ));\n\t\t\t\t\t}else{\n\t\t\t \t\trequest.node.items.push( new air.Introspector.tree.node(\'sent\' , { openable: true, \n\t\t\t \t\t\tsrc: request.obj+\'\',\n\t\t\t \t\t\tonshow: function(){\n\t\t\t\t \t\t\tif(this.items.length==0){\n\t\t\t\t \t\t\t\tthis.items = [new air.Introspector.tree.textNode(this.src)];\n\t\t\t\t \t\t\t}\n\t\t\t \t\t} } ));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}catch(e){\n\t\t\t}\n\n \ttry{\n \t\trequest.node.items.push( new air.Introspector.tree.node(\'responseText\' , { openable: true, \n \t\t\tsrc: request.xhr.responseText,\n \t\t\tonshow: function(){\n\t \t\t\tif(this.items.length==0){\n\t \t\t\t\tthis.items = [new air.Introspector.tree.textNode(this.src)];\n\t \t\t\t}\n \t\t} } ));\n \t}catch(e){\n \t}\n \t\n\t\n \t\n \ttry{\n\t\t\trequest.node.items.push( new air.Introspector.tree.node(\'responseXml\' , { openable: true, \n src: request.xhr.responseXML,\n onshow: function(){\n if(this.items.length==0){\n\t\t\t\t\t\tself.extendDom2TreeNode(this, this.src, true);\n\/\/ this.items = [self.createDom2TreeNode(this.src)];\n }\n\t },\n\t\t\t\tonhide: function(){\n\t\t\t\t\t\/\/this.items.length = 0;\n\t\t\t\t\tthis.clearItems();\n\t\t\t\t}\n \t\t\t} ));\n }catch(e){\n }\n \t\n\t\ttry{\n\t\t\tvar headers = request.xhr.getAllResponseHeaders();\n\t\t\trequest.node.items.push( new air.Introspector.tree.node(\'responseHeaders\' , { openable: true, \n \t\t\tsrc: headers,\n \t\t\tonshow: function(){\n\t \t\t\tif(this.items.length==0){\n\t \t\t\t\tthis.items = [new air.Introspector.tree.textNode(headers)];\n\t \t\t\t}\n \t\t} } ));\n\t\t}catch(e){\n\t\n\t\t}\n\t\t\n\t\n\t\t\t\n \tif(request.node.opened){\n \t\trequest.node.refreshChildren();\n \t}\n \trequest.element.scrollIntoViewIfNeeded();\n },\n \n viewRequestObject: function(request){\n \ttry{\n \t\tvar self = this;\n\t \tvar requestElement = this.htmlLoader.window.document.createElement(\"div\");\n\t \trequestElement.className = \"requestElement\";\n\t \tvar node = new air.Introspector.tree.node (request.method.toUpperCase()+\' \'+request.url, {\n\t \t\tonshow: function(){\n\t if(this.items.length==0){\n\t \t self.refreshRequestObject(request);\n\t } \t\t \n\t \t }, \n\t \t\tonhide: function(){\n\t \t\t\t\/\/this.items.length = 0;\n\t\t\t\t\tthis.clearItems();\n\t \t\t}\n\t \t});\n\t\/\/ \tnode.shouldOpen();\n\t \trequest.node = node;\n\t \trequest.element = requestElement;\n this.netTabDiv.appendChild(requestElement);\t \t\n\t \trequestElement.appendChild(node.createDiv(this.htmlLoader.window.document));\n\n \t}catch(e){\n \t\tthis.logError(e);\n \t}\n },\n \n refreshNetConsole: function(){\n \tvar requestLog = this.requestLog;\n for(var i=0;i<requestLog.length;i++){\n this.viewRequestObject(requestLog[i]);\n }\n \n },\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\t\t\/\/=======================================================================================================================================================\n\t\t\/\/DebugWindow.XHR.js\n\t\t\/\/=======================================================================================================================================================\t\t\t\n\t\tmakeDomDiv: function(){\n this.domDiv.innerHTML = \'\';\n\tif(this.domDivNode){\n\t\tthis.domDivNode.dispose();\n\t\tthis.domDivNode = null;\n\t}\n try{\n var htmlLoader = this.getActiveHtmlLoader();\n\t\t\n\t\tvar node = this.createJsTreeNode(\'window\', htmlLoader.window);\n var treeDiv = node.createDiv(this.htmlLoader.window.document);\n\t\tthis.domDivNode = node;\n this.domDiv.appendChild(treeDiv);\n }catch(e){\n }\n},\n\ndom3Event: function(ev){\n\tvar node = ev.srcElement;\n\tif(!node) return;\n\tif(node.nodeType!=Node.DOCUMENT_NODE&&node.nodeType!=Node.ELEMENT_NODE){\n\t\tnode = node.parentNode;\n\t\tif(!node) return;\n\t}\n\t\n\t\tvar i = this.findDomListElement(node);\n\t\tif(i!=-1&&this.domList[i].node2)\n\t\t{\n\t\t\tvar node2 = this.domList[i].node2;\n\t\t\tif(this.domList[i].node2.opened){\n\t\t\t\tnode2.clearItems();\n\t\t\t\tnode2.onshow(node2);\n\t\t\t}\n\t\t\tnode2.refresh();\n\t\t\tev.stopPropagation();\n\t\t\t\n\t\t\tthis.openVisibleDomTags();\n\t\t}\n\n\t\n},\n\nfindDomListElement: function(element){\n var list = this.domList;\n for(var i=list.length-1;i>=0;i--){\n if(list[i].element==element)\n return i;\n }\n return -1;\n},\n\nremoveDomListElement: function(element){\n var index = this.findDomListElement(element);\n if(index==-1)\n return;\n this.domList.splice(index, 1);\n \n var child = element.firstChild;\n while(child)\n {\n this.removeDomListElement(child);\n child = child.nextSibling;\n } \n},\n\n\n extendDom2TreeNode: function(node, obj, readOnly){\n\tif(typeof readOnly==\'undefined\'){readOnly = false;}\n try{\n var self = this;\n node.items.length = 0;\n if(typeof obj==\'undefined\'||obj==null)\n return;\n var child = obj.firstChild;\n while(child)\n {\n\/\/ \tif(child.nodeType==Node.ELEMENT_NODE||child.nodeType==Node.TEXT_NODE){\n \t\tif(child.nodeType==Node.TEXT_NODE){\n \t\t\tvar value = air.Introspector.trim(child.nodeValue);\n \t\t\tif(value.length==0)\n \t\t\t{ \n \t\t\t\tchild = child.nextSibling;\n \t\t\t continue;\n \t\t\t}\n \t\t}\n node.items.push(this.createDom2TreeNode(child, readOnly)); \n\/\/ \t}else{\n\/\/\t\t\t\t\tair.Introspector.Console.log(child);\n\/\/\t\t\t\t}\n child = child.nextSibling;\n }\n }catch(e){\n this.logError(e);\n }\n},\n\ncreateDom2TreeNode : function(child, readOnly){\n var self = this;\n \n var config = {\n\t\t readOnly: readOnly,\n editable:false,\n openable:false,\n onshow: function(sender){\n var domListIndex = self.findDomListElement(child);\n if(domListIndex!=-1){\n self.domList[domListIndex].opened = true;\n }\n self.extendDom2TreeNode(sender, child, readOnly);\n }, \n onhide: function(sender){\n self.removeDomListElement(child); \/\/also remove children\n \/\/this.items.length = 0;\n\t\t\t\tthis.clearItems();\n }\n };\n var node = new air.Introspector.tree.domNode(child, config);\n \n var domListIndex = this.findDomListElement(child);\n if(domListIndex!=-1){\n this.domList[domListIndex].node2 = node;\n if(this.domList[domListIndex].opened)\n node.shouldOpen();\n if(this.domList[domListIndex].selected)\n node.shouldSelect();\n }else{\n this.domList.push({\n element:child, \n node2: node,\n node: null,\n opened: false,\n selected: false\n });\n }\n \n return node;\n},\n \ncreateDomElementPath: function(element, first){\n\tvar ret = false;\n if(typeof first==\'undefined\') first = false;\n var domListIndex = this.findDomListElement(element);\n if(domListIndex==-1){\n this.domList.push({\n element:element, \n\/\/ node: null, \n node2 :null,\n opened: true, \n selected: first\n });\n\t\tret=true;\n }else if(!first){\n\t\tif(this.domList[domListIndex].node2){\n\t\t\tif(!this.domList[domListIndex].node2.opened && this.domList[domListIndex].node2.showElements)\n\t\t\t\tthis.domList[domListIndex].node2.showElements();\n\t\t}else{\n\t\t\tret = true;\n\t\t}\n this.domList[domListIndex].opened = true;\n }else{\n this.domList[domListIndex].selected = true;\n\t\tif(this.domList[domListIndex].node2&&this.domList[domListIndex].node2.select){\n\t\t\tthis.domList[domListIndex].node2.select(false);\n\t\t}else{\n\t\t\tret = true;\n\t\t}\n }\n \n var parentNode = element.parentNode;\n if(parentNode){\n ret|=this.createDomElementPath(parentNode);\n }\n\treturn ret;\n},\n\nshowDomElementPath: function(element){\n var list = this.domList;\n for(var i=list.length-1;i>=0;i--){\n list[i].selected = false;\n\t\tif(list[i].node2&&list[i].node2.unselect){\n\t\t\tlist[i].node2.unselect();\n\t\t}\n }\n var shouldRecreate = this.createDomElementPath(element, true);\n \n var htmlLoader = this.getActiveHtmlLoader();\n if(htmlLoader!=null&&htmlLoader.window.document==element.ownerDocument){\n\t\tif(shouldRecreate){\n \tthis.makeHtmlDiv(); \t\n\t\t}\n }else{\n \tthis.setActiveWindowByDocument(element.ownerDocument);\n }\n \n \n\tthis.scrollSelectedDomItemIntoView();\n},\n\n\nputInList: function(element){\n\tvar domListIndex = this.findDomListElement(element);\n if(domListIndex!=-1){\n\t\tthis.domList[domListIndex].opened = true;\n\t}\n},\n\n\tsetHoverDomElement: function(node){\n\t\tthis.hoverDomElement = node;\n\t},\n\t\n\tclearHoverDomElement: function(){\n\t\tthis.hoverDomElement = null;\n\t\tthis.hoverDomElementAttribute = null;\n\t},\n\n\tsetHoverDomElementAttribute: function(att){\n\t\tthis.hoverDomElementAttribute = att;\n\t},\n\t\n\texpandHoverDomElement: function(){\n\t\tif(this.menuHoverDomElement)\n\t\t\tthis.menuHoverDomElement.expandAll();\n\t},\n\t\n\tcollapseHoverDomElement: function(){\n\t\tif(this.menuHoverDomElement)\n\t\t\tthis.menuHoverDomElement.collapse();\n\t},\n\t\n\taddHoverDomElementAttribute: function(){\n\t\ttry{\n\t\tif(this.menuHoverDomElement){\n\t\t\tvar attributeName = prompt(\'Attribute name\');\n\t\t\tif(attributeName&&attributeName.length){\n\t\t\t\tif(!this.menuHoverDomElement.domNode.getAttribute(attributeName))\n\t\t\t\t\tthis.menuHoverDomElement.domNode.setAttribute(attributeName, \'\');\n\t\t\t\tthis.menuHoverDomElement.refreshAttributes();\n\t\t\t\tthis.menuHoverDomElement.toggleAttribute(attributeName);\n\t\t\t}\n\t\t}}catch(e){\n\t\t\talert(\"Invalid attribute name!\");\n\t\t}\n\t},\n\t\n\tremoveHoverDomElementAttribute: function(){\n\t\tif(this.menuHoverDomElement&&this.menuHoverDomElementAttribute){\n\t\t\t\tthis.menuHoverDomElement.domNode.removeAttribute(this.menuHoverDomElementAttribute.nodeName);\n\t\t\t\tthis.hoverDomElementAttribute = null;\n\t\t\t\tthis.menuHoverDomElement.refreshAttributes();\n\t\t}\n\t},\n\n\topenVisibleDomTags: function(){\n\/\/\t\tthis.scrollSelectedDomItemIntoView();\n\/\/\t\treturn;\n\t\tvar list = this.domList;\n\t\tvar clone = [];\n\t\t for(var i=list.length-1;i>=0;i--)\n\t\t\tclone.push(list[i].element);\n\t\t for(var i=clone.length-1;i>=0;i--){\n\t\t\tvar element = clone[i];\n\t\t\tvar parentNode = element.parentNode;\n\t\t\tif(parentNode){\n\t this.putInList(parentNode);\n\t\t\t}\n\t\t}\n\t},\n\n scrollSelectedDomItemIntoView: function(){\n\t\t var list = this.domList;\n\t\t for(var i=list.length-1;i>=0;i--){\n\t if(list[i].selected){\n\t \tif(list[i].node2){\n\t\t\t\t\t\tif(list[i].node2.nodeLabelDiv)\n\t\t\t\t\t\t\tlist[i].node2.nodeLabelDiv.scrollIntoViewIfNeeded();\n\t\t\t\t\t\telse if(list[i].node2.element)\n\t \t\t\tlist[i].node2.element.scrollIntoViewIfNeeded();\n\t \t\t\/\/air.Introspector.Console.log(list[i].node2);\n\t \t\t\/\/air.Introspector.Console.log(this.html2Div);\n\t\t\t\t\t\tbreak;\n\t \t}\n\t }\n\t }\n\t},\n\t\n\t\n\tsetInspect: function(value){\n this.isInspecting = value;\n if(this.inspectToolLabel){\n if(value){\n if((this.inspectToolLabel.className+\'\').indexOf(\'selected\')==-1){\n this.inspectToolLabel.className += \' selected\';\n }\n }else{\n this.inspectToolLabel.className = this.inspectToolLabel.className.replace(\' selected\', \'\');\n }\n }\n\t\tif(value){\n\t\t\tthis.switchToHtmlTab();\n\t\t}\n\t\n\t\t\n\t\tif(isAppSandbox){\n\t var ownedWindows = air.Introspector.getHtmlWindows();\n\t for(var i=ownedWindows.length-1;i>=0;i--){\n\t try{\n\t ownedWindows[i].htmlLoader.window.air.Introspector.inspect=value;\n\t ownedWindows[i].htmlLoader.window.air.Introspector.canClick=false;\n\t }catch(e){\n\t }\n\t }\n\t\t}else{\n\t\t\ttry{\n\t\t\t\tthis.activeWindow.air.Introspector.inspect = value;\n\t\t\t\tthis.activeWindow.air.Introspector.canClick=false;\n\t\t\t}catch(e){}\n\t\t}\n },\n toggleInspect: function(){\n this.isInspecting ^= true;\n if(this.isInspecting){\n this.startInspect();\n }else{\n this.finishInspect();\n }\n },\n startInspect: function()\n {\n this.setInspect(true);\n this.inspectElement = null;\n },\n \n finishInspect: function(canceled){\n this.setInspect(false);\n if(typeof canceled==\'undefined\')\n canceled = true;\n if(!canceled&&typeof this.inspectElement!=\'undefined\'&&this.inspectElement){\n this.showCssElement(this.inspectElement);\t\n this.showDomElementPath(this.inspectElement);\n }else{\n\t\t\tif(this.selectedElement){\n\t\t\t\tthis.showDomElementPath(this.selectedElement);\n \t\tthis.showCssElement(this.selectedElement);\t\t\t\t\t\n\t\t\t}\n\t\t}\n delete inspectElement;\n }, \n \n\tshowCssElement: function(element){\n\t\tif(!element || !element.ownerDocument || !element.ownerDocument.defaultView) return;\n\t\tif(this.selectedElement==element){ return };\n\t\tthis.selectedElement = element;\n\t\tvar self = this;\n\t\tif(this.showCssElementTimer){\n\t\t\tclearTimeout(this.showCssElementTimer);\n\t\t\tthis.showCssElementTimer = null;\n\t\t}\n\t\tthis.clearCssElement();\n\t\tthis.showCssElementTimer = setTimeout(function(){\n\t\t\tself.showCssElementTimer = null;\n\t\t\tself.showCssElementTimeout(element);\n\t\t}, 300);\n\t},\n\tclearCssElement:function(){\n\t\tif(!this.isLoaded) return;\n\t\tthis.css2DomTab.innerHTML = \'\';\n\t\tthis.css2StyleTab.innerHTML = \'\';\n\t\t\n\t\tif(this.cssElementJsNode){\n\t\t\tthis.cssElementJsNode.dispose();\n\t\t\tthis.cssElementJsNode = null;\n\t\t}\n\t},\n\tshowCssElementTimeout: function(element){\n\t\tif(!this.isLoaded) return;\t\t\n\t\tvar value = \'\';\n\/*\t\ttry{\n\t\t\tvalue = \'DOM (\' + element+\')\';\n\t\t}catch(e){}*\/\n\t\tvar jsNode = this.createJsTreeNode(value, element);\n\t\tjsNode.shouldOpen();\n this.css2DomTab.appendChild(jsNode.createDiv(this.htmlLoader.window.document));\n\t\tthis.cssElementJsNode = jsNode;\n\n\t\tif(this.cssElementCssNode){\n\t\t\tthis.cssElementCssNode.dispose();\n\t\t\tthis.cssElementCssNode = null;\n\t\t}\n\n\t\tvar cssNode = this.createCssTreeNode(\'CSS\', element);\n\t\tcssNode.shouldOpen();\n this.css2StyleTab.appendChild(cssNode.createDiv(this.htmlLoader.window.document));\n\t\tthis.cssElementCssNode = cssNode;\t\n\t},\n\t\n\tcreateCssTreeNode: function (stringValue, element){\n\t\tvar self = this;\n\t\tvar config = {\n editable:false,\n onshow: function(sender){\n self.extendCssTreeNode(sender, element);\n }, \n onhide: function(sender){\n \/\/this.items.length = 0;\n\t\t\t\t\tthis.clearItems();\n }\n };\n\t\t return new air.Introspector.tree.node(stringValue,config);\n\t},\n\n\n\textendCssTreeNode: function(node, element){\n\t\ttry{\n\t\t\tvar self = this;\n\t\t\tif(!element.ownerDocument || !element.ownerDocument.defaultView) return;\n\t\t\tvar obj = element.ownerDocument.defaultView.getComputedStyle(element);\n\t\t\t\n\t\t\tif(obj){\n\t\t\t\tvar cssGroupNames = this.cssGroupNames;\n\t\t\t\tvar cssGroups = this.cssGroups;\t\t\t\t\n\t\t\t\t\n\t\t\t\tvar groupsCount=cssGroupNames.length;\n\n\t\t\t\tfor(var z=0;z<groupsCount;z++){\n\t\t\t\t\tvar groupNode = new air.Introspector.tree.node(cssGroupNames[z], \n\t\t\t\t\t\t\t{\n\t\t\t\t\t\t\t\tgroup: cssGroups[z],\n\t\t\t\t\t\t\t\tonshow: function(){\n\t\t\t\t\t\t\t\t\tif(this.items.length==0){\n\t\t\t\t\t\t\t\t\t\tvar l = this.group.length;\n\t\t\t\t\t\t\t\t\t\tfor(var i=0;i<l;i++){\n\t\t\t\t\t\t\t\t\t\t\tvar name = this.group[i], value;\n\t\t\t\t\t\t\t try{\n\t\t\t\t\t\t\t value = obj[name];\n\t\t\t\t\t\t\t }catch(e){\n\t\t\t\t\t\t\t value = e;\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t this.items.push(self.createJsTreeNode(name, value));\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\tgroupNode.shouldOpen();\n\t\t\t\t\tnode.items.push(groupNode);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(e){\n\t\t\tthis.logError(e);\n\t\t}\n\t},\n\n\tswitchToHtmlTab: function () {\n\t\tthis.setTab(1);\n\t},\n\n setInspectElement: function(element){\n this.inspectElement = element;\n this.showDomElementPath(this.inspectElement);\n },\n highlight: function(domNode){\n \tvar htmlLoader = this.getActiveHtmlLoader();\n if(htmlLoader!=null){\n \ttry{\n \t\tif(typeof domNode!=\'undefined\'){\n \t htmlLoader.window.air.Introspector.highlightElement(domNode);\n\t\t\t\t\n \t\t}\n \t else\n \t htmlLoader.window.air.Introspector.hideHighlight();\n \t}catch(e){\n \t\t\/\/no air debug highlighter..\n \t}\n }\n \t\n },\n\n\t setCssTab: function(tab){\n\t\t\tthis.activeCssTab = tab;\n\t if(this.isLoaded){\n\t\t\t\tthis.activateCssTab();\n\t\t\t}\n\n\t },\n\t\tactivateCssTab: function(){\n\t\/\/\t\tif(!this.isLoaded) return;\n\t\t\ttry{\n\t\t this.clearCssTabs();\n\t\t\t\tvar tabName = this.cssTabs[this.activeCssTab];\n\n\t\t\t\tthis.htmlLoader.window.document.getElementById(tabName+\'Label\').className = \'selected\';\n\t\t this.htmlLoader.window.document.getElementById(tabName+\'Tab\').className = \'selected\';\n\t\t\t}catch(e){}\n\t\t},\n\n\t \tclearCssTabs: function(){\n\t var child = this.cssTabLabels.firstChild;\n\t while(child!=null){\n\t if(child.nodeType==1) child.className = child.className.replace(\/selected\/, \'\');\n\t child=child.nextSibling;\n\t }\n\t var child = this.cssTabPages.firstChild;\n\t while(child!=null){\n\t if(child.nodeType==1) child.className = child.className.replace(\/selected\/, \'\');\n\t child=child.nextSibling;\n\t }\n\t },\t\t\/\/-------------------------------------------------------------------------------------------------------------------------------------------------------\n\n\t\t\/\/convert DebugUI.html\n\n\t\t};\n\t\t\t\t\n\t\tair.Introspector.version = \'0.15.88\';\n\t\n\n})();\n\n\t\n\n\/\/ ]]>\n<\/script>\n\t\t<xscript type=\"text\/javascript\" src=\"DebugUI.js\"><\/xscript>\n<\/head>\n\n<body onload=\'doLoad()\' onunload=\"doUnload()\" oncontextmenu=\'return debugWindow.showMenu(event);\'>\n\t<ul id=\"toolsLabels\">\n\t\tADOBE<span>©<\/span> AIR™ Introspector\n\t<\/ul>\n <ul id=\"toolToggle\">\n<li onclick=\"debugWindow.setTool(\'inspect\')\" id=\'inspectToolLabel\'>Inspect<\/li><\/ul>\n\t<ul id=\"tabLabels\">\n \t <li onclick=\"debugWindow.setTab(0)\" id=\'consoleLabel\'>Console<\/li> \t\n <li onclick=\"debugWindow.setTab(1)\" id=\'html2Label\'>HTML<\/li>\n\t\t<li onclick=\"debugWindow.setTab(2)\" id=\'domLabel\'>DOM<\/li>\n <li onclick=\"debugWindow.setTab(3)\" id=\'assetsLabel\'>Assets<\/li>\n <li onclick=\"debugWindow.setTab(4)\" id=\'sourceLabel\'>Source<\/li>\n\t\t<li onclick=\"debugWindow.setTab(5)\" id=\'netLabel\'>XHR<\/li>\n\t<\/ul>\n <div id=\"tabPages\">\n<div id=\"consoleTab\">\n \t<ul id=\"console\"><\/ul>\n <div id=\"evalConsole\"><span id=\"evalConsoleLabel\">>>><\/span><input type=\"text\" id=\"evalConsoleText\" value=\"\" onkeyup=\"if(event.keyCode==13){ debugWindow.evalUserInput();return true;} else if(event.keyCode==38){ debugWindow.historyUserInput(-1); return true;} else if(event.keyCode==40){ debugWindow.historyUserInput(1); return true;} else debugWindow.historyUserInput();\" \/><\/div>\n <\/div>\n\n\t\t<div id=\"html2Tab\">\n <div id=\"html2Div\">\n\t\t <\/div>\n\t\t <div id=\"html2Split\">\n\t\t <\/div>\n\t\t <div id=\"css2Div\">\n\t\t\t<ul id=\"css2TabLabels\">\n\t\t \t<li onclick=\"debugWindow.setCssTab(0)\" id=\'css2DomLabel\'>DOM<\/li> \t\n\t\t <li onclick=\"debugWindow.setCssTab(1)\" id=\'css2StyleLabel\'>Computed style<\/li>\n\t\t <\/ul>\n\t\t\t<div id=\"css2TabPages\">\n\t\t\t\t<div id=\'css2DomTab\'><\/div> \t\n\t\t <div id=\'css2StyleTab\'><\/div>\n\t\t\t<\/div>\n\t <\/div>\n\t\t\t\n <\/div> \n \t<div id=\"domTab\">\n \t\n <\/div>\n \t<div id=\"assetsTab\">\n \t\n <\/div> \n <div id=\"sourceTab\">\n \t\n <\/div>\n\t\t<div id=\"netTab\">\n \n <\/div> \n<\/div>\n \n<div id=\"windowSelector\">\n<input id=\'refreshActiveWindow\' type=\"button\" value=\"Refresh active window:\" onclick=\"debugWindow.refreshWindows()\" \/>\n\t <select id=\"windowList\" onchange=\"debugWindow.setActiveWindowById(parseFloat(this.options[this.options.selectedIndex].value))\"><\/select>\n \n<\/div>\n\n\n\n<div id=\"menuDiv\">\n\t<div id=\"consoleMenuDiv\" class=\"menu\">\n\t\t<ul>\n\t\t\t<li><a href=\"javascript:void(0)\" onclick=\'debugWindow.clearConsole();debugWindow.hideMenu();\'>Clear console<\/a><\/li>\n\t\t\t<li><a href=\"javascript:void(0)\" onclick=\'debugWindow.saveConsoleToFile();debugWindow.hideMenu();\'>Save console to file...<\/a><\/li>\n\t\t\t<li><a href=\"javascript:void(0)\" onclick=\'debugWindow.saveConsoleToClipboard();debugWindow.hideMenu();\'>Save console to clipboard<\/a><\/li>\t\t\n\t\t<\/ul>\n\t<\/div>\n\t<div id=\"domMenuDiv\" class=\"menu\">\n\t\t<ul>\n\t\t\t\t<li><a href=\"javascript:void(0)\" onclick=\'debugWindow.expandHoverDomElement();debugWindow.hideMenu();\'>Expand all<\/a><\/li>\n\t\t\t\t<li><a href=\"javascript:void(0)\" onclick=\'debugWindow.collapseHoverDomElement();debugWindow.hideMenu();\'>Collapse<\/a><\/li>\n\t\t\t\t<li><a href=\"javascript:void(0)\" onclick=\'debugWindow.addHoverDomElementAttribute();debugWindow.hideMenu();\'>Add attribute<\/a><\/li>\n\t\t\t\t<li id=\"domRemoveAttributeMenuDiv\"><a href=\"javascript:void(0)\" onclick=\'debugWindow.removeHoverDomElementAttribute();debugWindow.hideMenu();\'>Remove attribute<\/a><\/li>\t\t\t\t\n\t\t<\/ul>\n\t<\/div>\n<\/div>\n\n\n<div id=\"searchTextBox\">\n\tSearch filter: <input type=\"text\" id=\'txtSearch\' value=\'\' onkeydown=\'debugWindow.searchKeyDown(event)\' onkeyup=\'debugWindow.doFilter(this.value);\' \/>\n\t\n<\/div>\n \n<\/body>\n<\/html>\n'; +air.Introspector.register(); + + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/application.xml =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/application.xml (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/application.xml 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="utf-8" standalone="no"?> +<application xmlns="http://ns.adobe.com/air/application/1.0"> + <name>Simple Tasks</name> + <id>extTasks2</id> + <version>2.0</version> + <filename>Simple Tasks</filename> + <description>Simple Tasks sample application by Ext JS</description> + <copyright>(c) 2008 - Ext JS, LLC</copyright> + <initialWindow> + <title>Simple Tasks</title> + <content>main.html</content> + <systemChrome>standard</systemChrome> + <transparent>false</transparent> + <visible>false</visible> + </initialWindow> + <installFolder>Ext JS/Simple Tasks</installFolder> + <programMenuFolder>Ext JS/Simple Tasks</programMenuFolder> + <icon> + <image16x16>ext-air/resources/icons/extlogo16.png</image16x16> + <image32x32>ext-air/resources/icons/extlogo32.png</image32x32> + <image48x48>ext-air/resources/icons/extlogo48.png</image48x48> + <image128x128>ext-air/resources/icons/extlogo128.png</image128x128> + </icon> + <fileTypes></fileTypes> +</application> Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/beep.mp3 =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/beep.mp3 ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/adapter/ext/ext-base.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/adapter/ext/ext-base.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/adapter/ext/ext-base.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,2731 @@ +/* + * Ext JS Library 2.0.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext = {version: '2.0.1'}; + + +window["undefined"] = window["undefined"]; + + + + +Ext.apply = function(o, c, defaults){ + if(defaults){ + + 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), + isSafari3 = isSafari && ua.indexOf('webkit/5') != -1, + 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), + isAir = (ua.indexOf("adobeair") != -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]; + } + }; + var oc = Object.prototype.constructor; + + return function(sb, sp, overrides){ + if(typeof sp == 'object'){ + overrides = sp; + sp = sb; + sb = overrides.constructor != oc ? overrides.constructor : 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 == oc){ + 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<a.length; ++i) { + d=a[i].split("."); + rt = d[0]; + eval('if (typeof ' + rt + ' == "undefined"){' + rt + ' = {};} o = ' + rt + ';'); + for (j=1; j<d.length; ++j) { + o[d[j]]=o[d[j]] || {}; + o=o[d[j]]; + } + } + }, + + + urlEncode : function(o){ + if(!o){ + return ""; + } + var buf = []; + for(var key in o){ + var ov = o[key], k = encodeURIComponent(key); + var type = typeof ov; + if(type == 'undefined'){ + buf.push(k, "=&"); + }else if(type != "function" && type != "object"){ + buf.push(k, "=", encodeURIComponent(ov), "&"); + }else if(Ext.isArray(ov)){ + if (ov.length) { + for(var i = 0, len = ov.length; i < len; i++) { + buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&"); + } + } else { + buf.push(k, "=&"); + } + } + } + buf.pop(); + return buf.join(""); + }, + + + urlDecode : function(string, overwrite){ + if(!string || !string.length){ + return {}; + } + var obj = {}; + var pairs = string.split('&'); + var pair, name, value; + for(var i = 0, len = pairs.length; i < len; i++){ + pair = pairs[i].split('='); + name = decodeURIComponent(pair[0]); + value = decodeURIComponent(pair[1]); + if(overwrite !== true){ + if(typeof obj[name] == "undefined"){ + obj[name] = value; + }else if(typeof obj[name] == "string"){ + obj[name] = [obj[name]]; + obj[name].push(value); + }else{ + obj[name].push(value); + } + }else{ + obj[name] = value; + } + } + return obj; + }, + + + each : function(array, fn, scope){ + if(typeof array.length == "undefined" || typeof array == "string"){ + array = [array]; + } + for(var i = 0, len = array.length; i < len; i++){ + if(fn.call(scope || array[i], array[i], i, array) === false){ return i; }; + } + }, + + + combine : function(){ + var as = arguments, l = as.length, r = []; + for(var i = 0; i < l; i++){ + var a = as[i]; + if(Ext.isArray(a)){ + r = r.concat(a); + }else if(a.length !== undefined && !a.substr){ + r = r.concat(Array.prototype.slice.call(a, 0)); + }else{ + r.push(a); + } + } + return r; + }, + + + escapeRe : function(s) { + return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); + }, + + + callback : function(cb, scope, args, delay){ + if(typeof cb == "function"){ + if(delay){ + cb.defer(delay, scope, args || []); + }else{ + cb.apply(scope, args || []); + } + } + }, + + + getDom : function(el){ + if(!el || !document){ + return null; + } + return el.dom ? el.dom : (typeof el == 'string' ? document.getElementById(el) : el); + }, + + + getDoc : function(){ + return Ext.get(document); + }, + + + getBody : function(){ + return Ext.get(document.body || document.documentElement); + }, + + + getCmp : function(id){ + return Ext.ComponentMgr.get(id); + }, + + + num : function(v, defaultValue){ + if(typeof v != 'number'){ + return defaultValue; + } + return v; + }, + + + destroy : function(){ + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + var as = a[i]; + if(as){ + if(as.dom){ + as.removeAllListeners(); + as.remove(); + continue; + } + if(typeof as.destroy == 'function'){ + as.destroy(); + } + } + } + }, + + removeNode : isIE ? function(){ + var d; + return function(n){ + if(n){ + d = d || document.createElement('div'); + d.appendChild(n); + d.innerHTML = ''; + } + } + }() : function(n){ + if(n && n.parentNode){ + n.parentNode.removeChild(n); + } + }, + + + + 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; + }, + + + isEmpty : function(v, allowBlank){ + return v === null || v === undefined || (!allowBlank ? v === '' : false); + }, + + value : function(v, defaultValue, allowBlank){ + return Ext.isEmpty(v, allowBlank) ? defaultValue : v; + }, + + isArray : function(v){ + return v && typeof v.pop == 'function'; + }, + + isDate : function(v){ + return v && typeof v.getFullYear == 'function'; + }, + + + isOpera : isOpera, + + isSafari : isSafari, + + isSafari3 : isSafari3, + + isSafari2 : isSafari && !isSafari3, + + isIE : isIE, + + isIE6 : isIE && !isIE7, + + isIE7 : isIE7, + + isGecko : isGecko, + + isBorderBox : isBorderBox, + + isLinux : isLinux, + + isWindows : isWindows, + + isMac : isMac, + + isAir : isAir, + + + useShims : ((isIE && !isIE7) || (isGecko && isMac)) + }); + + + 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"); + + + +Ext.apply(Function.prototype, { + + createCallback : function(){ + + var args = arguments; + var method = this; + return function() { + return method.apply(window, args); + }; + }, + + + 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); + var applyArgs = [appendArgs, 0].concat(args); + Array.prototype.splice.apply(callArgs, applyArgs); + } + return method.apply(obj || window, callArgs); + }; + }, + + + defer : function(millis, obj, args, appendArgs){ + var fn = this.createDelegate(obj, args, appendArgs); + if(millis){ + return setTimeout(fn, millis); + } + fn(); + return 0; + }, + + 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; + }; + }, + + + 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); + }; + } +}); + + +Ext.applyIf(String, { + + + escape : function(string) { + return string.replace(/('|\\)/g, "\\$1"); + }, + + + leftPad : function (val, size, ch) { + var result = new String(val); + if(!ch) { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result.toString(); + }, + + + format : function(format){ + var args = Array.prototype.slice.call(arguments, 1); + return format.replace(/\{(\d+)\}/g, function(m, i){ + return args[i]; + }); + } +}); + + +String.prototype.toggle = function(value, other){ + return this == value ? other : value; +}; + + +String.prototype.trim = function(){ + var re = /^\s+|\s+$/g; + return function(){ return this.replace(re, ""); }; +}(); + +Ext.applyIf(Number.prototype, { + + constrain : function(min, max){ + return Math.min(Math.max(this, min), max); + } +}); + +Ext.applyIf(Array.prototype, { + + indexOf : function(o){ + for (var i = 0, len = this.length; i < len; i++){ + if(this[i] == o) return i; + } + return -1; + }, + + + remove : function(o){ + var index = this.indexOf(o); + if(index != -1){ + this.splice(index, 1); + } + return this; + } +}); + + +Date.prototype.getElapsed = function(date) { + return Math.abs((date || new Date()).getTime()-this.getTime()); +}; + +(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]); + } + }; + + + 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; + } + + + 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 (Ext.isArray(x)) { + 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) { + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Scroll); + }, + + motion : function(el, args, duration, easing, cb, scope) { + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); + }, + + color : function(el, args, duration, easing, cb, scope) { + return 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 && !Ext.isArray(control[0])) { + 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); + } + }; + })(); + + +})(); Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/ext-all.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/ext-all.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/ext-all.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,33795 @@ +/* + * Ext JS Library 2.0.2 + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 (Ext.isArray(o)) { + for (var i = 0, l = o.length; i < l; i++) { + b += createHtml(o[i]); + } + return 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){ + b += createHtml(cn); + } else if(o.html){ + b += o.html; + } + b += "</" + o.tag + ">"; + } + 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++) { + createDom(o[i], el); + } + } else if (typeof o == "string)") { + el = document.createTextNode(o); + } else { + el = document.createElement(o.tag||'div'); + var useSet = !!el.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){ + createDom(cn, el); + } else 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 = '<table>', + te = '</table>', + tbs = ts+'<tbody>', + tbe = '</tbody>'+te, + trs = tbs + '<tr>', + tre = '</tr>'+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(Ext.isArray(html)){ + 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 = Ext.isArray(el); + 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("<s"+'cript id="ie-deferred-loader" defer="defer" src="/'+'/:"></s'+"cript>"); + 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(Ext.isArray(className)){ + 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(Ext.isArray(className)){ + 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"); + } + } + }, + + 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(); + 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 += '<span id="' + id + '"></span>'; + + E.onAvailable(id, function(){ + var hd = document.getElementsByTagName("head")[0]; + var re = /(?:<script([^>]*)?>)((\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(/(?:<script.*?>)((\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(Ext.isArray(eventName)){ + 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 && !el.dom){ 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(Ext.isArray(el)){ + 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 && !el.dom){ 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.dom){ 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" || Ext.isArray(key)){ + 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' || Ext.isArray(x)){ + 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('<div class="{0}">'+El.boxMarkup+'</div>', 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 = '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>'; + +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(Ext.isArray(el)){ + 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(Ext.isArray(el)){ + 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(Ext.isArray(els)){ + 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 : 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 = '<div class="loading-indicator">'+cfg.text+"</div>";}; + 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 : '<div class="loading-indicator">Loading...</div>' + }; + + +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" + + "input = String(input);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 || Ext.isArray(objs)){ + 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(Ext.isArray(o)){ + return encodeArray(o); + }else if(Ext.isDate(o)){ + 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(/</g, "<").replace(/"/g, """); + }, + + + htmlDecode : function(value){ + return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/</g, "<").replace(/"/g, '"'); + }, + + + trim : function(value){ + return String(value).replace(trimRe, ""); + }, + + + substr : function(value, start, length){ + return String(value).substr(start, length); + }, + + + lowercase : function(value){ + return String(value).toLowerCase(); + }, + + + uppercase : function(value){ + return String(value).toUpperCase(); + }, + + + capitalize : function(value){ + return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); + }, + + + call : function(value, fn){ + if(arguments.length > 2){ + var args = Array.prototype.slice.call(arguments, 2); + args.unshift(value); + return eval(fn).apply(window, args); + }else{ + return eval(fn).call(window, value); + } + }, + + + usMoney : function(v){ + v = (Math.round((v-0)*100))/100; + v = (v == Math.floor(v)) ? v + ".00" : ((v*10 == Math.floor(v*10)) ? v + "0" : v); + v = String(v); + var ps = v.split('.'); + 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(!Ext.isDate(v)){ + v = new Date(Date.parse(v)); + } + return v.dateFormat(format || "m/d/Y"); + }, + + + dateRenderer : function(format){ + return function(v){ + return Ext.util.Format.date(v, format); + }; + }, + + + stripTagsRE : /<\/?[^>]+>/gi, + + + stripTags : function(v){ + return !v ? v : String(v).replace(this.stripTagsRE, ""); + }, + + stripScriptsRe : /(?:<script.*?>)((\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 = ['<tpl>', s, '</tpl>'].join(''); + + var re = /<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/; + + var nameRe = /^<tpl\b[^>]*?for="(.*?)"/; + var ifRe = /^<tpl\b[^>]*?if="(.*?)"/; + var execRe = /^<tpl\b[^>]*?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 && Ext.isArray(vs)){ + 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(!Ext.isArray(selector)){ + 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(!Ext.isArray(selector)){ + 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(Ext.isArray(config)){ + 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 = Ext.isArray(keyCode); + + 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" && !Ext.isArray(key)){ + 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<len; ++i) { + if (this.invalidHandleClasses[i] == cssClass) { + delete this.invalidHandleClasses[i]; + } + } + }, + + + isValidHandleChild: function(node) { + + var valid = true; + + var nodeName; + try { + nodeName = node.nodeName.toUpperCase(); + } catch(e) { + nodeName = node.nodeName; + } + valid = valid && !this.invalidHandleTypes[nodeName]; + valid = valid && !this.invalidHandleIds[node.id]; + + for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) { + valid = !Dom.hasClass(node, this.invalidHandleClasses[i]); + } + + + return valid; + + }, + + + setXTicks: function(iStartX, iTickSize) { + this.xTicks = []; + this.xTickSize = iTickSize; + + var tickMap = {}; + + for (var i = this.initPageX; 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<len; ++i) { + var next = i + 1; + if (tickArray[next] && tickArray[next] >= 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<len;++i) { + if (targets[i].id == oTargetDD.id) { + return true; + } + } + + return false; + }, + + + isTypeOfDD: function (oDD) { + return (oDD && oDD.__ygDragDrop); + }, + + + isHandle: function(sDDId, sHandleId) { + return ( this.handleIds[sDDId] && + this.handleIds[sDDId][sHandleId] ); + }, + + + getDDById: function(id) { + for (var i in this.ids) { + if (this.ids[i][id]) { + return this.ids[i][id]; + } + } + return null; + }, + + + handleMouseDown: function(e, oDD) { + if(Ext.QuickTips){ + Ext.QuickTips.disable(); + } + this.currentTarget = e.getTarget(); + + this.dragCurrent = oDD; + + var el = oDD.getEl(); + + + this.startX = e.getPageX(); + this.startY = e.getPageY(); + + this.deltaX = this.startX - el.offsetLeft; + this.deltaY = this.startY - el.offsetTop; + + this.dragThreshMet = false; + + this.clickTimeout = setTimeout( + function() { + var DDM = Ext.dd.DDM; + DDM.startDrag(DDM.startX, DDM.startY); + }, + this.clickTimeThresh ); + }, + + + startDrag: function(x, y) { + clearTimeout(this.clickTimeout); + if (this.dragCurrent) { + this.dragCurrent.b4StartDrag(x, y); + this.dragCurrent.startDrag(x, y); + } + this.dragThreshMet = true; + }, + + + handleMouseUp: function(e) { + + if(Ext.QuickTips){ + Ext.QuickTips.enable(); + } + if (! this.dragCurrent) { + return; + } + + clearTimeout(this.clickTimeout); + + if (this.dragThreshMet) { + this.fireEvents(e, true); + } else { + } + + this.stopDrag(e); + + this.stopEvent(e); + }, + + + stopEvent: function(e){ + if(this.stopPropagation) { + e.stopPropagation(); + } + + if (this.preventDefault) { + e.preventDefault(); + } + }, + + + stopDrag: function(e) { + + if (this.dragCurrent) { + if (this.dragThreshMet) { + this.dragCurrent.b4EndDrag(e); + this.dragCurrent.endDrag(e); + } + + this.dragCurrent.onMouseUp(e); + } + + this.dragCurrent = null; + this.dragOvers = {}; + }, + + + handleMouseMove: function(e) { + if (! this.dragCurrent) { + return true; + } + + + + + if (Ext.isIE && (e.button !== 0 && e.button !== 1 && e.button !== 2)) { + this.stopEvent(e); + return this.handleMouseUp(e); + } + + if (!this.dragThreshMet) { + var diffX = Math.abs(this.startX - e.getPageX()); + var diffY = Math.abs(this.startY - e.getPageY()); + if (diffX > 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<len; ++i) { + dc.b4DragOut(e, outEvts[i].id); + dc.onDragOut(e, outEvts[i].id); + } + + + for (i=0,len=enterEvts.length; i<len; ++i) { + + dc.onDragEnter(e, enterEvts[i].id); + } + + + for (i=0,len=overEvts.length; i<len; ++i) { + dc.b4DragOver(e, overEvts[i].id); + dc.onDragOver(e, overEvts[i].id); + } + + + for (i=0, len=dropEvts.length; i<len; ++i) { + dc.b4DragDrop(e, dropEvts[i].id); + dc.onDragDrop(e, dropEvts[i].id); + } + + } + + + if (isDrop && !dropEvts.length) { + dc.onInvalidDrop(e); + } + + }, + + + getBestMatch: function(dds) { + var winner = null; + + + + + + + var len = dds.length; + + if (len == 1) { + winner = dds[0]; + } else { + + for (var i=0; i<len; ++i) { + var dd = dds[i]; + + + + if (dd.cursorIsOver) { + winner = dd; + break; + + } else { + if (!winner || + winner.overlap.getArea() < dd.overlap.getArea()) { + winner = dd; + } + } + } + } + + return winner; + }, + + + 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)) { + + var loc = this.getLocation(oDD); + if (loc) { + this.locationCache[oDD.id] = loc; + } else { + delete this.locationCache[oDD.id]; + + + + } + } + } + } + }, + + + 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; + }, + + + 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 ); + }, + + + isOverTarget: function(pt, oTarget, intersect) { + + 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 ); + + + + + + + var dc = this.dragCurrent; + if (!dc || !dc.getTargetCoord || + (!intersect && !dc.constrainX && !dc.constrainY)) { + return oTarget.cursorIsOver; + } + + oTarget.overlap = null; + + + + + + 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; + } + }, + + + _onUnload: function(e, me) { + Ext.dd.DragDropMgr.unregAll(); + }, + + + 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 = {}; + }, + + + elementCache: {}, + + + getElWrapper: function(id) { + var oWrapper = this.elementCache[id]; + if (!oWrapper || !oWrapper.el) { + oWrapper = this.elementCache[id] = + new this.ElementWrapper(Ext.getDom(id)); + } + return oWrapper; + }, + + + getElement: function(id) { + return Ext.getDom(id); + }, + + + getCss: function(id) { + var el = Ext.getDom(id); + return (el) ? el.style : null; + }, + + + ElementWrapper: function(el) { + + this.el = el || null; + + this.id = this.el && el.id; + + this.css = this.el && el.style; + }, + + + getPosX: function(el) { + return Ext.lib.Dom.getX(el); + }, + + + getPosY: function(el) { + return Ext.lib.Dom.getY(el); + }, + + + 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); + } + } + }, + + + 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 }; + }, + + + getStyle: function(el, styleProp) { + return Ext.fly(el).getStyle(styleProp); + }, + + + getScrollTop: function () { return this.getScroll().top; }, + + + getScrollLeft: function () { return this.getScroll().left; }, + + + moveToEl: function (moveEl, targetEl) { + var aCoord = Ext.lib.Dom.getXY(targetEl); + Ext.lib.Dom.setXY(moveEl, aCoord); + }, + + + numericSort: function(a, b) { return (a - b); }, + + + _timeoutCount: 0, + + + _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; + } + } + } + }, + + + 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(Ext.isArray(el)){ + 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(Ext.isArray(el)){ + 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(Ext.isDate(s)){ + 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){ + 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); + }, + + + isModified : function(fieldName){ + return this.modified && this.modified.hasOwnProperty(fieldName); + } +}; + +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 = {}; + if(this.sortInfo){ + this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); + } + + 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); + return true; + } else { + return false; + } + }, + + + 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; + } + } + var st = (this.sortToggle) ? this.sortToggle[f.name] : null; + var si = (this.sortInfo) ? this.sortInfo : null; + + this.sortToggle[f.name] = dir; + this.sortInfo = {field: f.name, direction: dir}; + if(!this.remoteSort){ + this.applySort(); + this.fireEvent("datachanged", this); + }else{ + if (!this.load(this.lastOptions)) { + if (st) { + this.sortToggle[f.name] = st; + } + if (si) { + this.sortInfo = si; + } + } + } + }, + + + 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(Ext.isDate(v)){ + 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 = Ext.isArray(recordType) ? + 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, n); + } + 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, n); + 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, n); + 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(Ext.isArray(node)){ + 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(Ext.isArray(this.plugins)){ + 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.id) { + this.el.id = this.getId(); + } + } + 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; + }, + + + findParentBy: function(fn) { + for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt); + return p || null; + }, + + + findParentByType: function(xtype) { + return typeof xtype == 'function' ? + this.findParentBy(function(p){ + return p.constructor === xtype; + }) : + this.findParentBy(function(p){ + return p.constructor.xtype === xtype; + }); + } +}); + +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); + }, + + execute : function(){ + this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments); + } +}; + +(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 ? + '<div class="x-ie-shadow"></div>' : + '<div class="x-shadow"><div class="xst"><div class="xstl"></div><div class="xstc"></div><div class="xstr"></div></div><div class="xsc"><div class="xsml"></div><div class="xsmc"></div><div class="xsmr"></div></div><div class="xsb"><div class="xsbl"></div><div class="xsbc"></div><div class="xsbr"></div></div></div>'; + 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(Ext.isArray(items)){ + 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, [false]); + } + }, + + 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(shallow){ + if(this.rendered && this.layout){ + this.layout.layout(); + } + if(shallow !== false && 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){ + c.render(target, position); + if(this.extraCls){ + var t = c.getPositionEl ? c.getPositionEl() : c; + t.addClass(this.extraCls); + } + 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.innerCt.createChild({cls:'x-clear'}); + } + this.renderAll(ct, this.innerCt); + + 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( + '<div class="x-tool x-tool-{id}"> </div>' + ); + 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, + id: this.panel.id + '-xcollapsed' + }); + this.collapsedEl.enableDisplayMode('block'); + + if(this.collapseMode == 'mini'){ + this.collapsedEl.addClass('x-layout-cmini-'+this.position); + this.miniCollapsedEl = this.collapsedEl.createChild({ + cls: "x-layout-mini x-layout-mini-"+this.position, html: " " + }); + this.miniCollapsedEl.addClassOnOver('x-layout-mini-over'); + this.collapsedEl.addClassOnOver("x-layout-collapsed-over"); + this.collapsedEl.on('click', this.onExpandClick, this, {stopEvent:true}); + }else { + 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: " ", + id: this.panel.id + '-xsplit' + }); + + 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; + ct.labelWidth = ct.labelWidth || 100; + 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( + '<div class="x-form-item {5}" tabIndex="-1">', + '<label for="{0}" style="{2}" class="x-form-item-label">{1}{4}</label>', + '<div class="x-form-element" id="x-form-el-{0}" style="{3}">', + '</div><div class="{6}"></div>', + '</div>' + ); + 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.isFormField ? (comp.hideLabel ? 0 : this.labelAdjust) : 0); + }, + + 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.cells = []; + }, + + + 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 cell = this.getNextNonSpan(this.currentColumn, this.currentRow); + var curCol = this.currentColumn = cell[0], curRow = this.currentRow = cell[1]; + for(var rowIndex = curRow; rowIndex < curRow + (c.rowspan || 1); rowIndex++){ + if(!this.cells[rowIndex]){ + this.cells[rowIndex] = []; + } + for(var colIndex = curCol; colIndex < curCol + (c.colspan || 1); colIndex++){ + this.cells[rowIndex][colIndex] = true; + } + } + var td = document.createElement('td'); + if(c.cellId){ + td.id = c.cellId; + } + var cls = 'x-table-layout-cell'; + if(c.cellCls){ + cls += ' ' + c.cellCls; + } + td.className = cls; + if(c.colspan){ + td.colSpan = c.colspan; + } + if(c.rowspan){ + td.rowSpan = c.rowspan; + } + this.getRow(curRow).appendChild(td); + return td; + }, + + + getNextNonSpan: function(colIndex, rowIndex){ + var cols = this.columns; + while((cols && colIndex >= cols) || (this.cells[rowIndex] && this.cells[rowIndex][colIndex])) { + if(cols && colIndex >= cols){ + rowIndex++; + colIndex = 0; + }else{ + colIndex++; + } + } + return [colIndex, rowIndex]; + }, + + + 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', + isForm: false, + + setContainer : function(ct){ + Ext.layout.AbsoluteLayout.superclass.setContainer.call(this, ct); + if(ct.isXType('form')){ + this.isForm = true; + } + }, + + onLayout : function(ct, target){ + if(this.isForm){ ct.body.position(); } else { target.position(); } + Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); + }, + + + getAnchorViewSize : function(ct, target){ + return this.isForm ? ct.body.getStyleSize() : Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this, ct, target); + }, + + + isValidParent : function(c, target){ + return this.isForm ? true : Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this, c, target); + }, + + + adjustWidthAnchor : function(value, comp){ + return value ? value - comp.getPosition(true)[0] : value; + }, + + + adjustHeightAnchor : function(value, comp){ + return value ? value - comp.getPosition(true)[1] : value; + } + +}); +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 = + '<span class="' + this.headerTextCls + '">'+this.header.dom.innerHTML+'</span>'; + + 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:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>' + }}, 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(Ext.isArray(this.topToolbar)){ + this.topToolbar = new Ext.Toolbar(this.topToolbar); + } + this.topToolbar.render(this.tbar); + } + if(this.bbar && this.bottomToolbar){ + if(Ext.isArray(this.bottomToolbar)){ + 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 && this.header){ + 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); + btn.ownerCt = this; + 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( + '<div class="x-tool x-tool-{id}"> </div>' + ); + 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); + } + this.setAutoScroll(); + 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(); + }, + + setAutoScroll : function(){ + if(this.rendered && this.autoScroll){ + this.body.setOverflow('auto'); + } + }, + + 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, + this.mask + ); + Ext.Window.superclass.beforeDestroy.call(this); + }, + + onDestroy : function(){ + if(this.manager){ + this.manager.unregister(this); + } + Ext.Window.superclass.onDestroy.call(this); + }, + + initTools : function(){ + if(this.minimizable){ + this.addTool({ + id: 'minimize', + handler: this.minimize.createDelegate(this, []) + }); + } + if(this.maximizable){ + this.addTool({ + id: 'maximize', + handler: this.maximize.createDelegate(this, []) + }); + this.addTool({ + id: 'restore', + handler: this.restore.createDelegate(this, []), + hidden:true + }); + 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(Ext.isMac && Ext.isGecko){ this.cascade(this.setAutoScroll); + } + + 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(Ext.isMac && Ext.isGecko){ this.cascade(this.setAutoScroll); + } + } + 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(Ext.isDate(v)){ + enc = "d:" + v.toGMTString(); + }else if(Ext.isArray(v)){ + 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(Ext.isArray(nodeInfo)){ + 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('<div class="loading-indicator">'+this.loadingText+'</div>'); + 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 = this.tpl || new Ext.XTemplate( + '<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>' + ); + 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 = [ + '<table cellspacing="0">', + '<tr><td class="x-date-left"><a href="#" title="', this.prevText ,'"> </a></td><td class="x-date-middle" align="center"></td><td class="x-date-right"><a href="#" title="', this.nextText ,'"> </a></td></tr>', + '<tr><td colspan="3"><table class="x-date-inner" cellspacing="0"><thead><tr>']; + var dn = this.dayNames; + for(var i = 0; i < 7; i++){ + var d = this.startDay+i; + if(d > 6){ + d = d-7; + } + m.push("<th><span>", dn[d].substr(0,1), "</span></th>"); + } + m[m.length] = "</tr></thead><tbody><tr>"; + for(var i = 0; i < 42; i++) { + if(i % 7 == 0 && i != 0){ + m[m.length] = "</tr><tr>"; + } + m[m.length] = '<td><a href="#" hidefocus="on" class="x-date-date" tabIndex="1"><em><span></span></em></a></td>'; + } + m[m.length] = '</tr></tbody></table></td></tr><tr><td colspan="3" class="x-date-bottom" align="center"></td></tr></table><div class="x-date-mp"></div>'; + + 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); + this.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 = ['<table border="0" cellspacing="0">']; + for(var i = 0; i < 6; i++){ + buf.push( + '<tr><td class="x-date-mp-month"><a href="#">', this.monthNames[i].substr(0, 3), '</a></td>', + '<td class="x-date-mp-month x-date-mp-sep"><a href="#">', this.monthNames[i+6].substr(0, 3), '</a></td>', + i == 0 ? + '<td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-prev"></a></td><td class="x-date-mp-ybtn" align="center"><a class="x-date-mp-next"></a></td></tr>' : + '<td class="x-date-mp-year"><a href="#"></a></td><td class="x-date-mp-year"><a href="#"></a></td></tr>' + ); + } + buf.push( + '<tr class="x-date-mp-btns"><td colspan="4"><button type="button" class="x-date-mp-ok">', + this.okText, + '</button><button type="button" class="x-date-mp-cancel">', + this.cancelText, + '</button></td></tr>', + '</table>' + ); + 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]); + } + } + }, + + + beforeDestroy : function() { + this.mbtn.destroy(); + this.todayBtn.destroy(); + } + + +}); +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', + + activeTab : null, + + tabMargin : 2, + + plain: false, + + wheelIncrement : 20, + + + idDelimiter : '__', + + itemCls : 'x-tab-item', + + elements: 'body', + headerAsText: false, + frame: false, + hideBorders:true, + + initComponent : function(){ + this.frame = false; + Ext.TabPanel.superclass.initComponent.call(this); + this.addEvents( + + 'beforetabchange', + + 'tabchange', + + 'contextmenu' + ); + this.setLayout(new Ext.layout.CardLayout({ + 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( + '<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>', + '<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">', + '<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>', + '</em></a></li>' + ); + 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(this.idDelimiter)[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'; + } + if(item.tabCls){ + cls += ' ' + item.tabCls; + } + + var p = { + id: this.id + this.idDelimiter + 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){ + var itemId = (typeof item === 'number')?this.items.items[item].getItemId() : item.getItemId(); + return document.getElementById(this.id+this.idDelimiter+itemId); + }, + + 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 wd = wrap.dom; + var cw = wd.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){ + wd.scrollLeft = 0; + wrap.setWidth(tw); + if(this.scrolling){ + this.scrolling = false; + this.header.removeClass('x-tab-scrolling'); + this.scrollLeft.hide(); + this.scrollRight.hide(); + if(Ext.isAir){ + wd.style.marginLeft = ''; + wd.style.marginRight = ''; + } + } + }else{ + if(!this.scrolling){ + this.header.addClass('x-tab-scrolling'); + if(Ext.isAir){ + wd.style.marginLeft = '18px'; + wd.style.marginRight = '18px'; + } + } + 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)){ wd.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( + '<table border="0" cellpadding="0" cellspacing="0" class="x-btn-wrap"><tbody><tr>', + '<td class="x-btn-left"><i> </i></td><td class="x-btn-center"><em unselectable="on"><button class="x-btn-text" type="{1}">{0}</button></em></td><td class="x-btn-right"><i> </i></td>', + "</tr></tbody></table>"); + } + 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(){ + if(this.rendered){ + 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.text){ + this.el.addClass(this.disabledClass); + } + this.el.dom.disabled = true; + } + this.disabled = true; + }, + + onEnable : function(){ + if(this.el){ + if(!Ext.isIE6 || !this.text){ + this.el.removeClass(this.disabledClass); + } + 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( + '<table cellspacing="0" class="x-btn-menu-wrap x-btn"><tr><td>', + '<table cellspacing="0" class="x-btn-wrap x-btn-menu-text-wrap"><tbody>', + '<tr><td class="x-btn-left"><i> </i></td><td class="x-btn-center"><button class="x-btn-text" type="{1}">{0}</button></td></tr>', + "</tbody></table></td><td>", + '<table cellspacing="0" class="x-btn-wrap x-btn-menu-arrow-wrap"><tbody>', + '<tr><td class="x-btn-center"><button class="x-btn-menu-arrow-el" type="button"> </button></td><td class="x-btn-right"><i> </i></td></tr>', + "</tbody></table></td></tr></table>" + ); + 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(typeof item != 'object'){ + item = this.menu.items.get(item); + } + 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(!item.checked){ + item.setChecked(true, true); + } + if(this.forceIcon){ + this.setIconClass(this.forceIcon); + } + 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(Ext.isArray(config)){ + 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:'<table cellspacing="0"><tr></tr></table>' + }, + + + onRender : function(ct, position){ + this.el = ct.createChild(Ext.apply({ id: this.id },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(Ext.isArray(config)){ + 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(Ext.isArray(item)){ + 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 = "xtb-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 = "xtb-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(t){ + var s = document.createElement("span"); + s.className = "xtb-text"; + s.innerHTML = t.text ? t.text : t; + 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.inEditor = true; + 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); + this.doAutoSize(); + this.el.alignTo(this.boundEl, this.alignment); + this.editing = true; + this.show(); + }, + + doAutoSize : function(){ + 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); + } + } + }, + + + setSize : function(w, h){ + delete this.field.lastSize; + 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:'<div class="ext-mb-icon"></div><div class="ext-mb-content"><span class="ext-mb-text"></span><br /><input type="text" class="ext-mb-input" /><textarea class="ext-mb-textarea"></textarea></div>' + }); + 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(); + } + }, this, {single:true}); + + 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 = Ext.isArray(config) ? config : arguments; + for(var i = 0, len = cs.length; i < len; i++){ + var c = cs[i]; + var target = c.target; + if(target){ + if(Ext.isArray(target)){ + 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()); + this.activeTarget = t; + } + if(t.width){ + this.setWidth(t.width); + this.body.setWidth(this.adjustBodyWidth(t.width - this.getFrameWidth())); + 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.useArrows ? 'x-tree-arrows' : this.lines ? "x-tree-lines" : "x-tree-no-lines")}); + }, + + + initEvents : function(){ + Ext.tree.TreePanel.superclass.initEvents.call(this); + + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.body); + } + if((this.enableDD || this.enableDrop) && !this.dropZone){ + + this.dropZone = new Ext.tree.TreeDropZone(this, this.dropConfig || { + ddGroup: this.ddGroup || "TreeDD", appendOnly: this.ddAppendOnly === true + }); + } + if((this.enableDD || this.enableDrag) && !this.dragZone){ + + this.dragZone = new Ext.tree.TreeDragZone(this, this.dragConfig || { + ddGroup: this.ddGroup || "TreeDD", + scroll: this.ddScroll + }); + } + this.getSelectionModel().init(this); + }, + + + afterRender : function(){ + Ext.tree.TreePanel.superclass.afterRender.call(this); + this.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); + if(this.tree.trackMouseOver !== false){ + 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; + } + if(e.getTarget('.x-tree-ec-icon', 1)){ + var n = this.getNode(e); + this.onIconOut(e, n); + if(n == this.lastEcOver){ + delete this.lastEcOver; + } + } + if((t = this.getNodeTarget(e)) && !e.within(t, true)){ + this.onNodeOut(e, this.getNode(e)); + } + }, + + delegateOver : function(e, t){ + if(!this.beforeEvent(e)){ + return; + } + if(this.lastEcOver){ + this.onIconOut(e, this.lastEcOver); + delete this.lastEcOver; + } + if(e.getTarget('.x-tree-ec-icon', 1)){ + this.lastEcOver = this.getNode(e); + this.onIconOver(e, this.lastEcOver); + } + if(t = this.getNodeTarget(e)){ + 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); + }, + + onIconOver : function(e, node){ + node.ui.addClass('x-tree-ec-over'); + }, + + onIconOut : function(e, node){ + node.ui.removeClass('x-tree-ec-over'); + }, + + 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(){ + var node = tree.getNodeById(this.id); + tree.getTreeEl().scrollChildIntoView(node.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 (this.checkbox) { + this.checkbox.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.checkbox) { + this.checkbox.disabled = true; + } + } + 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 = ['<li class="x-tree-node"><div ext:tree-node-id="',n.id,'" class="x-tree-node-el x-tree-node-leaf x-unselectable ', a.cls,'" unselectable="on">', + '<span class="x-tree-node-indent">',this.indentMarkup,"</span>", + '<img src="', this.emptyIcon, '" class="x-tree-ec-icon x-tree-elbow" />', + '<img src="', a.icon || this.emptyIcon, '" class="x-tree-node-icon',(a.icon ? " x-tree-node-inline-icon" : ""),(a.iconCls ? " "+a.iconCls : ""),'" unselectable="on" />', + cb ? ('<input class="x-tree-node-cb" type="checkbox" ' + (a.checked ? 'checked="checked" />' : '/>')) : '', + '<a hidefocus="on" class="x-tree-node-anchor" href="',href,'" tabIndex="1" ', + a.hrefTarget ? ' target="'+a.hrefTarget+'"' : "", '><span unselectable="on">',n.text,"</span></a></div>", + '<ul class="x-tree-node-ct" style="display:none;"></ul>', + "</li>"].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('<img src="'+this.emptyIcon+'" class="x-tree-elbow-line" />'); + } else { + buf.unshift('<img src="'+this.emptyIcon+'" class="x-tree-icon" />'); + } + } + 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 = '<div class="x-tree-root-node"></div>'; + 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); + tree.on("textchange", this.updateSortParent, 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]); + } + }, + + updateSortParent : function(node){ + var p = node.parentNode; + if(p && p.childrenRendered){ + this.doSort.defer(1, this, [p]); + } + } +}; + +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, + dropStatus: false + }; + var retval = this.tree.fireEvent("beforenodedrop", dropEvent); + if(retval === false || dropEvent.cancel === true || !dropEvent.dropNode){ + targetNode.ui.endDrop(); + return dropEvent.dropStatus; + } + + 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(!Ext.isArray(ns)){ + 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); + tree.on('dblclick', this.onNodeDblClick, 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, defer){ + this.completeEdit(); + if(node.attributes.editable !== false){ + this.editNode = node; + this.autoEditTimer = this.startEdit.defer(this.editDelay, this, [node.ui.textNode, node.text]); + return false; + } + }, + + bindScroll : function(){ + this.tree.getTreeEl().on('scroll', this.cancelEdit, this); + }, + + beforeNodeClick : function(node, e){ + clearTimeout(this.autoEditTimer); + if(this.tree.getSelectionModel().isSelected(node)){ + e.stopEvent(); + return this.triggerEdit(node); + } + }, + + onNodeDblClick : function(node, e){ + clearTimeout(this.autoEditTimer); + }, + + updateNode : function(ed, value){ + this.tree.getTreeEl().un('scroll', this.cancelEdit, this); + this.editNode.setText(value); + }, + + onHide : function(){ + Ext.tree.TreeEditor.superclass.onHide.call(this); + if(this.editNode){ + this.editNode.ui.focus.defer(50, this.editNode.ui); + } + }, + + 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(Ext.isArray(config)){ + 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(); + + if(!this.keyNav){ + 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); + } + }, + + + destroy : function(){ + this.beforeDestroy(); + Ext.menu.MenuMgr.unregister(this); + if (this.keyNav) { + this.keyNav.disable(); + } + this.removeAll(); + if (this.ul) { + this.ul.removeAllListeners(); + } + if (this.el) { + this.el.destroy(); + } + }, + + beforeDestroy : Ext.emptyFn + +}); + +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"){ if(!menus){ return null; + } + 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( + '<img src="{0}" class="x-menu-item-icon {2}" />{1}', + this.icon || Ext.BLANK_IMAGE_URL, this.itemText||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( + '<img src="{0}" class="x-menu-item-icon {2}">{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', + + beforeDestroy : function() { + this.picker.destroy(); + } +}); + +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 this.inEditor ? w : 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", end-v.length); + 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, '<p> </p>'); + } + 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){ + v = parseFloat(v); + v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator); + Ext.form.NumberField.superclass.setValue.call(this, v); + }, + + 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|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d", + + 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 || Ext.isDate(value)){ + 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.menu) { + this.menu.destroy(); + } + if(this.wrap){ + this.wrap.remove(); + } + Ext.form.DateField.superclass.onDestroy.call(this); + }, + + formatDate : function(date){ + return Ext.isDate(date) ? date.dateFormat(this.format) : date; + }, + + 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, + + minHeight: 90, + + 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 = '<tpl for="."><div class="'+cls+'-item">{' + this.displayField + '}</div></tpl>'; + } + + + 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(); + this.delayedCheck = true; + this.unsetDelayCheck.defer(10, this); + }, + + "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); + }, + + unsetDelayCheck : function(){ + delete this.delayedCheck; + }, + fireKey : function(e){ + if(e.isNavKeyPress() && !this.isExpanded() && !this.delayedCheck){ + 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')); + } + }, + + onEnable: function(){ + Ext.form.ComboBox.superclass.onEnable.apply(this, arguments); + if(this.hiddenField){ + this.hiddenField.disabled = false; + } + }, + + onDisable: function(){ + Ext.form.ComboBox.superclass.onDisable.apply(this, arguments); + if(this.hiddenField){ + this.hiddenField.disabled = true; + } + }, + + + 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 ? + '<div class="loading-indicator">'+this.loadingText+'</div>' : ''); + 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(); + this.value = ''; + }, + + + 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 pad = this.list.getFrameWidth('tb')+(this.resizable?this.handleHeight:0)+this.assetHeight; + var h = Math.max(inner.clientHeight, inner.offsetHeight, inner.scrollHeight); + var ha = this.getPosition()[1]-Ext.getBody().getScroll().top; + var hb = Ext.lib.Dom.getViewHeight()-ha-this.getSize().height; + var space = Math.max(ha, hb, this.minHeight || 0)-this.list.shadow.offset-pad-2; + h = Math.min(h, space, this.maxHeight); + + this.innerList.setHeight(h); + this.list.beginUpdate(); + this.list.setHeight(h+pad); + 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(); + this.innerList.setOverflow('auto'); 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(){ + var p = this.el.up('form') || Ext.getBody(); + var c = p.child('input[name='+this.el.dom.name+']:checked', true); + return c ? c.value : null; + }, + + onClick : function(){ + if(this.el.dom.checked != this.checked){ + var p = this.el.up('form') || Ext.getBody(); + var els = p.select('input[name='+this.el.dom.name+']'); + els.each(function(el){ + if(el.dom.id == this.id){ + this.setValue(true); + }else{ + Ext.getCmp(el.dom.id).setValue(false); + } + }, this); + } + }, + + + setValue : function(v){ + if (typeof v == 'boolean') { + Ext.form.Radio.superclass.setValue.call(this, v); + } else { + var r = this.el.up('form').child('input[name='+this.el.dom.name+'][value='+v+']', true); + if (r){ + r.checked = true; + }; + } + } +}); +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(); + if(!this.standardSubmit){ + 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); + }); + if(this.el){ + 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){ + if(this.standardSubmit){ + var v = this.isValid(); + if(v){ + this.el.dom.submit(); + } + return v; + } + 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(Ext.isArray(errors)){ + 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(Ext.isArray(values)){ 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); + this.items.on('remove', this.onRemove, this); + this.items.on('add', this.onAdd, this); + if(this.monitorValid){ this.startMonitoring(); + } + }, + + onAdd : function(ct, c) { + if (c.isFormField) { + this.form.add(c); + } + }, + + onRemove : function(c) { + if (c.isFormField) { + Ext.destroy(c.container.up('.x-form-item')); + this.form.remove(c); + } + }, + + + 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; + if (this.title || this.header || this.checkboxToggle) { + 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( + '<option value="',lc,'" style="font-family:',ff,';"', + (this.defaultFont == lc ? ' selected="true">' : '>'), + ff, + '</option>' + ); + } + 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 '<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>'; + }, + + 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 = '<div style="'+m[0]+'">' + html + '</div>'; + } + } + 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; + + var v = parseInt(this.doc.queryCommandValue('FontSize') || 2, 10); + if(Ext.isSafari3 || Ext.isAir){ + + + if(v <= 10){ + v = 1 + adjust; + }else if(v <= 13){ + v = 2 + adjust; + }else if(v <= 16){ + v = 3 + adjust; + }else if(v <= 18){ + v = 4 + adjust; + }else if(v <= 24){ + v = 5 + adjust; + }else { + v = 6 + adjust; + } + v = v.constrain(1, 6); + }else{ + if(Ext.isSafari){ + adjust *= 2; + } + v = Math.max(1, v+adjust) + (Ext.isSafari ? 'px' : 0); + } + this.execCmd('FontSize', v); + }, + + 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('<br />'); + 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.Label = Ext.extend(Ext.BoxComponent, { + onRender : function(ct, position){ + if(!this.el){ + this.el = document.createElement('label'); + this.el.innerHTML = this.text ? Ext.util.Format.htmlEncode(this.text) : (this.html || ''); + if(this.forId){ + this.el.setAttribute('htmlFor', this.forId); + } + } + Ext.form.Label.superclass.onRender.call(this, ct, position); + } +}); + +Ext.reg('label', Ext.form.Label); + +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@xxxxxxxxxx"', + + '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, + + trackMouseOver : true, + + enableDragDrop : false, + + enableColumnMove : true, + + enableColumnHide : true, + + enableHdMenu : true, + + 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; + this.autoWidth = false; + + if(Ext.isArray(this.columns)){ + 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( + '<div class="x-grid3" hidefocus="true">', + '<div class="x-grid3-viewport">', + '<div class="x-grid3-header"><div class="x-grid3-header-inner"><div class="x-grid3-header-offset">{header}</div></div><div class="x-clear"></div></div>', + '<div class="x-grid3-scroller"><div class="x-grid3-body">{body}</div><a href="#" class="x-grid3-focus" tabIndex="-1"></a></div>', + "</div>", + '<div class="x-grid3-resize-marker"> </div>', + '<div class="x-grid3-resize-proxy"> </div>', + "</div>" + ); + } + + if(!ts.header){ + ts.header = new Ext.Template( + '<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">', + '<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>', + "</table>" + ); + } + + if(!ts.hcell){ + ts.hcell = new Ext.Template( + '<td class="x-grid3-hd x-grid3-cell x-grid3-td-{id}" style="{style}"><div {tooltip} {attr} class="x-grid3-hd-inner x-grid3-hd-{id}" unselectable="on" style="{istyle}">', this.grid.enableHdMenu ? '<a class="x-grid3-hd-btn" href="#"></a>' : '', + '{value}<img class="x-grid3-sort-icon" src="', Ext.BLANK_IMAGE_URL, '" />', + "</div></td>" + ); + } + + if(!ts.body){ + ts.body = new Ext.Template('{rows}'); + } + + if(!ts.row){ + ts.row = new Ext.Template( + '<div class="x-grid3-row {alt}" style="{tstyle}"><table class="x-grid3-row-table" border="0" cellspacing="0" cellpadding="0" style="{tstyle}">', + '<tbody><tr>{cells}</tr>', + (this.enableRowBody ? '<tr class="x-grid3-row-body-tr" style="{bodyStyle}"><td colspan="{cols}" class="x-grid3-body-cell" tabIndex="0" hidefocus="on"><div class="x-grid3-row-body">{body}</div></td></tr>' : ''), + '</tbody></table></div>' + ); + } + + if(!ts.cell){ + ts.cell = new Ext.Template( + '<td class="x-grid3-col x-grid3-cell x-grid3-td-{id} {css}" style="{style}" tabIndex="0" {cellAttr}>', + '<div class="x-grid3-cell-inner x-grid3-col-{id}" unselectable="on" {attr}>{value}</div>', + "</td>" + ); + } + + 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); + + if(this.grid.hideHeaders){ + this.mainHd.setDisplayed(false); + } + + 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(){ + this.syncHeaderScroll(); + var mb = this.scroller.dom; + this.grid.fireEvent("bodyscroll", mb.scrollLeft, mb.scrollTop); + }, + + syncHeaderScroll : function(){ + var mb = this.scroller.dom; + this.innerHd.scrollLeft = mb.scrollLeft; + this.innerHd.scrollLeft = mb.scrollLeft; }, + + 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.syncHeaderScroll(); + } + 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); + p.tooltip = this.getColumnTooltip(i); + if(cm.config[i].align == 'right'){ + p.istyle = 'padding-right:16px'; + } else { + delete p.istyle; + } + cb[cb.length] = ct.apply(p); + } + return ts.header.apply({cells: cb.join(""), tstyle:'width:'+this.getTotalWidth()+';'}); + }, + + getColumnTooltip : function(i){ + var tt = this.cm.getColumnTooltip(i); + if(tt){ + if(Ext.QuickTips.isEnabled()){ + return 'ext:qtip="'+tt+'"'; + }else{ + return 'title="'+tt+'"'; + } + } + return ""; + }, + + beforeUpdate : function(){ + this.grid.stopEditing(true); + }, + + updateHeaders : function(){ + this.innerHd.firstChild.innerHTML = this.renderHeaders(); + }, + + + focusRow : function(row){ + this.focusCell(row, 0, false); + }, + + + focusCell : function(row, col, hscroll){ + var xy = this.ensureVisible(row, col, hscroll); + this.focusEl.setXY(xy); + 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(!this.ds){ + return; + } + 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 ? Ext.fly(cellEl).getXY() : [c.scrollLeft, Ext.fly(rowEl).getY()]; + }, + + insertRows : function(dm, firstRow, lastRow, isUpdate){ + if(!isUpdate && 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(true); + + 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('<div class="x-grid-empty">' + this.emptyText + '</div>'); + } + }, + + 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.autoFill){ + this.fitColumns(true, true); + }else if(this.forceFit){ + this.fitColumns(true, false); + }else if(this.grid.autoExpandColumn){ + this.autoExpand(true); + } + + this.renderUI(); + }, + + + 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(true); + 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.isMenuDisabled(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)){ + ss.cursor = Ext.isAir ? 'move' : Ext.isSafari ? 'e-resize' : 'col-resize'; }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){ + ss.cursor = Ext.isAir ? 'move' : Ext.isSafari ? 'w-resize' : '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){ + if (ci + adjust < 0) { + return; + } + 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( + '<div id="{groupId}" class="x-grid-group {cls}">', + '<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div>', this.groupTextTpl ,'</div></div>', + '<div id="{groupId}-bd" class="x-grid-group-body">' + ); + } + this.startGroup.compile(); + this.endGroup = '</div></div>'; + }, + + + 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){ + if (!!field){ + s.setDisabled(this.cm.config[this.hdCtxIndex].groupable === false) + } + 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)); + this.beforeMenuShow(); + }, + + + onShowGroupsClick : function(mi, checked){ + if(checked){ + this.onGroupByClick(); + }else{ + this.grid.store.clearGrouping(); + } + }, + + + toggleGroup : function(group, expanded){ + this.grid.stopEditing(true); + 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 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 + '-' + Ext.util.Format.htmlEncode(g); + + + var isCollapsed = typeof this.state[gid] !== 'undefined' ? !this.state[gid] : this.startCollapsed; + var gcls = isCollapsed ? '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 + '-' + Ext.util.Format.htmlEncode(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.defaultWidth = 100; + + + this.defaultSortable = false; + + + if(config.columns){ + Ext.apply(this, config); + this.setConfig(config.columns, true); + }else{ + this.setConfig(config, true); + } + 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; + }, + + + isMenuDisabled : function(col){ + return !!this.config[col].menuDisabled; + }, + + + 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); + return true; + } + return false; + }, + + + selectPrevious : function(keepExisting){ + if(this.hasPrevious()){ + this.selectRow(this.last-1, keepExisting); + this.grid.getView().focusRow(this.last); + return true; + } + return false; + }, + + + hasNext : function(){ + return this.last !== false && (this.last+1) < this.grid.store.getCount(); + }, + + + hasPrevious : function(){ + return !!this.last; + }, + + + + getSelections : function(){ + return [].concat(this.selections.items); + }, + + + getSelected : function(){ + return this.selections.itemAt(0); + }, + + + each : function(fn, scope){ + var s = this.getSelections(); + 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; + var shift = e.shiftKey; + if(k == e.TAB){ + e.stopEvent(); + ed.completeEdit(); + if(shift){ + 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(this.moveEditorOnEnter !== false){ + if(shift){ + 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, + + + autoEncode : false, + + + + trackMouseOver: false, + + + initComponent : function(){ + Ext.grid.EditorGridPanel.superclass.initComponent.call(this); + + if(!this.selModel){ + this.selModel = new Ext.grid.CellSelectionModel(); + } + + this.activeEditor = null; + + this.addEvents( + + "beforeedit", + + "afteredit", + + "validateedit" + ); + }, + + + initEvents : function(){ + Ext.grid.EditorGridPanel.superclass.initEvents.call(this); + + this.on("bodyscroll", this.stopEditing, this, [true]); + + 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){ + if(e.button !== 0){ + return; + } + var row = this.view.findRowIndex(t); + var col = this.view.findCellIndex(t); + if(row !== false && col !== false){ + this.stopEditing(); + 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); + var r = ed.record; + var field = this.colModel.getDataIndex(ed.col); + value = this.postEditValue(value, startValue, r, field); + if(String(value) !== String(startValue)){ + 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 = this.preEditValue(r, field); + ed.startEdit(this.view.getCell(row, col), v); + }).defer(50, this); + } + } + }, + + preEditValue : function(r, field){ + return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(r.data[field]) : r.data[field]; + }, + + postEditValue : function(value, originalValue, r, field){ + return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value; + }, + + + stopEditing : function(cancel){ + if(this.activeEditor){ + this.activeEditor[cancel === true ? 'cancelEdit' : '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(Ext.isDate(val)){ + 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', menuDisabled:true}, + {header: this.valueText, width:50, resizable:false, dataIndex: 'value', id: 'value', menuDisabled:true} + ]); + 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(Ext.isDate(val)){ + 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(Ext.isDate(val)){ + 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, { + + + + 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, + menuDisabled: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: '<div class="x-grid3-hd-checker"> </div>', + + width: 20, + + sortable: false, + + + menuDisabled:true, + 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(e.button === 0 && 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 '<div class="x-grid3-row-checker"> </div>'; + } +}); + +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( + '<div class="{cls}-wrap">', + '<div class="{cls}-inner">', + '<div class="{cls}-bar">', + '<div class="{cls}-text">', + '<div> </div>', + '</div>', + '</div>', + '<div class="{cls}-text {cls}-text-back">', + '<div> </div>', + '</div>', + '</div>', + '</div>' + ); + + 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' || Ext.isDate(o)){ + Ext.log(o); + }else if(!o){ + Ext.log("null"); + }else if(typeof o != "object"){ + Ext.log('Unknown return type'); + }else if(Ext.isArray(o)){ + 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 = [ '<div style="padding:5px !important;border-bottom:1px solid #ccc;">', + Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '<br />').replace(/\s/g, ' '), + '</div>'].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<len; i++){ + var st = cl[i]; + var v = s[st] || fly.getStyle(st); + if(v != undefined && v !== null && v !== ''){ + props[st] = v; + } + } + } + }else{ + for(var a in dom){ + var v = dom[a]; + if((isNaN(a+10)) && v != undefined && v !== null && v !== '' && !(Ext.isGecko && a[0] == a[0].toUpperCase())){ + props[a] = v; + } + } + } + }else{ + if(inspecting){ + return; + } + addStyle.disable(); + reload.disabled(); + } + stylesGrid.setSource(props); + stylesGrid.treeNode = n; + stylesGrid.view.fitColumns(); + } + + this.loader = new Ext.tree.TreeLoader(); + this.loader.load = function(n, cb){ + var isBody = n.htmlNode == document.body; + var cn = n.htmlNode.childNodes; + for(var i = 0, c; c = cn[i]; i++){ + if(isBody && c.id == 'x-debug-browser'){ + continue; + } + if(c.nodeType == 1){ + n.appendChild(new Ext.debug.HtmlNode(c)); + }else if(c.nodeType == 3 && !nonSpace.test(c.nodeValue)){ + n.appendChild(new Ext.tree.TreeNode({ + text:'<em>' + ellipsis(html(String(c.nodeValue)), 35) + '</em>', + 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 + '="<i>' + html(v) +'</i>"'; + } + } + var style = n.style ? n.style.cssText : ''; + if(style){ + s += ' style="<i>' + html(style.toLowerCase()) +'</i>"'; + } + if(leaf && n.childNodes.length > 0){ + s+='><em>' + ellipsis(html(String(n.innerHTML)), 35) + '</em></'+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; +}(); + + + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/ext-all.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/ext-all.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/ext-all.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,4136 @@ +/* + * Ext JS Library 2.0.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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:#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; +} + +.x-border-layout-ct .x-tab-panel { + background: white; +} + +.x-form-field{ + margin: 0 0 0 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; +} +textarea.x-form-field { + padding:2px 3px; +} +.x-form-text { + height:22px; + line-height:18px; + vertical-align:middle; +} +.ext-ie .x-form-text { + margin:-1px 0; + height:22px; + line-height:18px; +} +.ext-ie textarea.x-form-field { + margin:-1px 0; +} +.ext-strict .x-form-text { + height:18px; +} +.ext-safari .x-form-text { + height:20px; + padding:0 3px; +} +.ext-safari.ext-mac textarea.x-form-field { + margin-bottom:-2px; +} +.ext-gecko .x-form-text { + padding-top:2px; + padding-bottom:0; +} +textarea { + resize: none; +} + + + +.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-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:#ffeeee; + 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:#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; +} + +.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; +} +.x-fieldset-noborder { + border:0px none transparent; +} +.x-fieldset-noborder legend { + margin-left:-3px; +} + +.ext-ie .x-fieldset-noborder legend { + position: relative; + margin-bottom:23px; +} +.ext-ie .x-fieldset-noborder legend span { + position: absolute; + left:-5px; +} + +.ext-gecko .x-window-body .x-form-item { + -moz-outline: none; + +} + +.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 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 .xtb-text{ + padding:2px; +} +.x-toolbar .xtb-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 .xtb-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-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; + + 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; +} + + +.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 #eeeeee; +} + + +.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-editor { + position: relative !important; + float: left; +} + +.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 #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; +} +.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:#444444; +} +.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-arrows .x-tree-elbow{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-end{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-line{ + background:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + + + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} +.x-tree-node{ + 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); +} + +.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; +} +.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; +} +.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; + position: relative; +} + +.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; +} + +.ext-ie7 .x-panel-tc { + overflow: visible; +} +.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-tool-print { + background-position:0 -315px; +} +.x-tool-print-over { + background-position:-15px -315px; +} + + +.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; +} Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/xtheme-gray.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/xtheme-gray.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/css/xtheme-gray.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,415 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 .xtb-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 Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/corners-blue.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/corners-blue.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/corners.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/corners.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/l-blue.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/l-blue.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/l.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/l.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/r-blue.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/r-blue.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/r.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/r.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/tb-blue.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/tb-blue.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/tb.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/box/tb.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/btn-arrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/btn-arrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/btn-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/button/btn-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-add.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-add.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-no.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-no.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-yes.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/dd/drop-yes.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/editor/tb-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/editor/tb-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/clear-trigger.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/clear-trigger.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/clear-trigger.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/clear-trigger.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/date-trigger.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/date-trigger.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/date-trigger.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/date-trigger.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/error-tip-corners.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/error-tip-corners.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/exclamation.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/exclamation.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/search-trigger.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/search-trigger.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/search-trigger.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/search-trigger.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/text-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/text-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger-tpl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger-tpl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/form/trigger.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/gradient-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/gradient-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/Thumbs.db =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/Thumbs.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/arrow-left-white.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/arrow-left-white.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/arrow-right-white.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/arrow-right-white.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/col-move-bottom.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/col-move-bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/col-move-top.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/col-move-top.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/columns.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/columns.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/dirty.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/dirty.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/done.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/done.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/drop-no.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/drop-no.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/drop-yes.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/drop-yes.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/footer-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/footer-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-blue-hd.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-blue-hd.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-blue-split.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-blue-split.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-hrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-hrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-loading.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-loading.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-split.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-split.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-vista-hd.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid-vista-hd.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hd-btn.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hd-btn.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hrow-over.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hrow-over.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-hrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-special-col-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-special-col-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-special-col-sel-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/grid3-special-col-sel-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/group-by.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/group-by.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/group-expand-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/group-expand-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hd-pop.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hd-pop.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-asc.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-asc.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-desc.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-desc.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-lock.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-lock.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-lock.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-lock.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-unlock.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-unlock.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-unlock.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/hmenu-unlock.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/invalid_line.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/invalid_line.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/loading.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/loading.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/mso-hd.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/mso-hd.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/nowait.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/nowait.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-first-disabled.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-first-disabled.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-first.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-first.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-last-disabled.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-last-disabled.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-last.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-last.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-next-disabled.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-next-disabled.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-next.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-next.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-prev-disabled.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-prev-disabled.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-prev.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/page-prev.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/pick-button.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/pick-button.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/refresh.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/refresh.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-check-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-check-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-expand-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-expand-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-over.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-over.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-sel.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/row-sel.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/sort_asc.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/sort_asc.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/sort_desc.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/sort_desc.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/wait.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/grid/wait.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/collapse.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/collapse.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/expand.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/expand.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/gradient-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/gradient-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-bottom.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-left.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-left.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-top.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/mini-top.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ns-collapse.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ns-collapse.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ns-expand.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/ns-expand.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-close.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-close.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-title-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-title-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-title-light-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/panel-title-light-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/stick.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/stick.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/stuck.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/stuck.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/tab-close-on.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/tab-close-on.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/tab-close.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/layout/tab-close.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/checked.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/checked.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/group-checked.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/group-checked.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/item-over.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/item-over.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/menu-parent.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/menu-parent.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/menu.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/menu.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/unchecked.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/menu/unchecked.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/corners-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/corners-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/left-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/left-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/light-hd.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/light-hd.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tool-sprite-tpl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tool-sprite-tpl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tool-sprites.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tool-sprites.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tools-sprites-trans.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/tools-sprites-trans.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/top-bottom.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/top-bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/top-bottom.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/top-bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-corners-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-corners-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-left-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-left-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-top-bottom.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/panel/white-top-bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/progress/progress-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/progress/progress-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/close.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/close.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/tip-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/qtip/tip-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/s.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/s.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow-c.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow-c.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow-lr.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow-lr.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shadow.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/blue-loading.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/blue-loading.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/calendar.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/calendar.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/glass-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/glass-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/hd-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/hd-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/large-loading.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/large-loading.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/left-btn.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/left-btn.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/loading-balls.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/loading-balls.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/right-btn.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/right-btn.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/warning.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/shared/warning.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/e-handle-dark.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/e-handle-dark.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/e-handle.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/e-handle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ne-handle-dark.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ne-handle-dark.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ne-handle.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/ne-handle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/nw-handle-dark.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/nw-handle-dark.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/nw-handle.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/nw-handle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/s-handle-dark.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/s-handle-dark.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/s-handle.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/s-handle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/se-handle-dark.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/se-handle-dark.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/se-handle.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/se-handle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/square.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/square.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/sw-handle-dark.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/sw-handle-dark.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/sw-handle.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/sizer/sw-handle.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroll-left.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroll-left.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroll-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroll-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroller-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/scroller-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-inactive-left-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-inactive-left-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-inactive-right-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-inactive-right-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-left-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-left-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-right-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-btm-right-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-close.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-close.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-bg.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-bg.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-btm-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tab-strip-btm-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tabs-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tabs/tabs-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-arrow-light.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-arrow-light.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-arrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-arrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-over-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/btn-over-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/gray-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/gray-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/tb-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/tb-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/tb-btn-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/toolbar/tb-btn-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/arrows.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/arrows.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-add.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-add.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-between.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-between.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-no.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-no.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-over.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-over.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-under.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-under.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-yes.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/drop-yes.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-minus-nl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-minus-nl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-minus.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-minus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-plus-nl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-plus-nl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-plus.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end-plus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-end.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-line.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-line.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-minus-nl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-minus-nl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-minus.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-minus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-plus-nl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-plus-nl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-plus.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow-plus.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/elbow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/folder-open.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/folder-open.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/folder.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/folder.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/leaf.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/leaf.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/loading.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/loading.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/s.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/tree/s.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-error.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-error.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-info.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-info.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-question.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-question.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-warning.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/icon-warning.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-corners.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-corners.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-right.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-right.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/left-right.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/right-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/right-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/right-corners.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/right-corners.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/top-bottom.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/top-bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/top-bottom.psd =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/default/window/top-bottom.psd ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/btn-arrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/btn-arrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/btn-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/button/btn-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/gradient-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/gradient-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/corners-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/corners-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/left-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/left-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/light-hd.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/light-hd.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tool-sprite-tpl.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tool-sprite-tpl.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tool-sprites.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tool-sprites.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tools-sprites-trans.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/tools-sprites-trans.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/top-bottom.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/top-bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/top-bottom.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/top-bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-corners-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-corners-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-left-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-left-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-top-bottom.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/panel/white-top-bottom.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/close.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/close.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/tip-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/qtip/tip-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/s.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/s.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroll-left.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroll-left.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroll-right.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroll-right.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroller-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/scroller-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-left-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-left-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-right-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-btm-right-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-close.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-close.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-bg.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-bg.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-btm-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tab-strip-btm-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tabs-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/tabs/tabs-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-arrow-light.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-arrow-light.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-arrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-arrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-over-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/btn-over-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/gray-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/gray-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/tb-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/tb-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/tb-btn-sprite.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/toolbar/tb-btn-sprite.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-error.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-error.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-info.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-info.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-question.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-question.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-warning.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/icon-warning.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-corners.pspimage =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-corners.pspimage ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-right.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/left-right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/right-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/right-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/top-bottom.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/images/gray/window/top-bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/license.txt =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/license.txt (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-2.0/resources/license.txt 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,30 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2008, Ext JS, LLC +All rights reserved. +licensing@xxxxxxxxx + +http://extjs.com/license + +Open Source License +------------------------------------------------------------------------------------------ +Ext is licensed under the terms of the Open Source GPL 3.0 license. + +http://www.gnu.org/licenses/gpl.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 +------------------------------------------------------------------------------------------ +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 +General Public License for more details. \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air-debug.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,1596 @@ +/* + * Ext JS Library 2.0.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.namespace('Ext.air', 'Ext.sql'); + +Ext.Template.prototype.compile = function() { + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + + var prevOffset = 0; + var arr = []; + var tpl = this; + var fn = function(m, name, format, args, offset, s){ + if (prevOffset != offset) { + var action = {type: 1, value: s.substr(prevOffset, offset - prevOffset)}; + arr.push(action); + } + prevOffset = offset + m.length; + if(format && useF){ + 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 = [''].concat(args); + } else { + args = ['']; + } + if(format.substr(0, 5) != "this."){ + var action = {type: 3, value:name, format: fm[format], args: args, scope: fm}; + arr.push(action); + }else{ + var action = {type: 3, value:name, format:tpl[format.substr(5)], args:args, scope: tpl}; + arr.push(action); + } + }else{ + var action = {type: 2, value: name}; + arr.push(action); + } + return m; + }; + + var s = this.html.replace(this.re, fn); + if (prevOffset != (s.length - 1)) { + var action = {type: 1, value: s.substr(prevOffset, s.length - prevOffset)}; + arr.push(action); + } + + this.compiled = function(values) { + function applyValues(el) { + switch (el.type) { + case 1: + return el.value; + case 2: + return (values[el.value] ? values[el.value] : ''); + default: + el.args[0] = values[el.value]; + return el.format.apply(el.scope, el.args); + } + } + return arr.map(applyValues).join(''); + } + return this; +}; + +Ext.Template.prototype.call = function(fnName, value, allValues){ + return this[fnName](value, allValues); +} + + +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); + }; + + + + + eval("var batch = 30803;"); + + var key = 30803; + + 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; + } + 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 quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return 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); + } + + function search(path, root, type) { + type = type || "select"; + + var n = root || document; + + 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]){ + 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] == "#"){ + n = quickId(n, mode, root, tm[2]); + }else{ + n = getNodes(n, mode, tm[2]); + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + n = getNodes(n, mode, "*"); + } + }else{ + if(tm){ + if(tm[1] == "#"){ + n = byId(n, null, tm[2]); + }else{ + 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){ + switch(j) { + case 0: + n = byClassName(n, null, " " + m[1] +" "); + break; + case 1: + n = byPseudo(n, m[1], m[2]); + break; + case 2: + n = byAttribute(n, m[2], m[4], m[3], m[1]); + break; + case 3: + n = byId(n, null, m[1]); + break; + case 4: + return {firstChild:{nodeValue:attrValue(n, m[1])}}; + + } + q = q.replace(m[0], ""); + matched = true; + break; + } + } + + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + q + '"'; + } + } + if(mm[1]){ + mode=mm[1].replace(trimRe, ""); + q = q.replace(mm[1], ""); + } + } + return nodup(n); + } + + return { + getStyle : function(el, name){ + return Ext.fly(el).getStyle(name); + }, + + compile: function(path, type) { + return function(root) { + return search(path, root, type); + } + }, + + + 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 = Ext.isArray(el); + 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; + +Date.precompileFormats = function(s){ + var formats = s.split('|'); + for(var i = 0, len = formats.length;i < len;i++){ + Date.createNewFormat(formats[i]); + Date.createParser(formats[i]); + } +} + +Date.precompileFormats("D n/j/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|YmdHis|F d, Y|l, F d, Y|H:i:s|g:i A|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|m/d/y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|Y-m-d H:i:s|d/m/y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|Y-m-d|l|D m/d|D m/d/Y|m/d/Y"); + + +Ext.ColorPalette.prototype.tpl = new Ext.XTemplate( + '<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>' +); + + + + + + + +Ext.air.FileProvider = function(config){ + Ext.air.FileProvider.superclass.constructor.call(this); + + this.defaultState = { + mainWindow : { + width:780, + height:580, + x:10, + y:10 + } + }; + + Ext.apply(this, config); + this.state = this.readState(); + + var provider = this; + air.NativeApplication.nativeApplication.addEventListener('exiting', function(){ + provider.saveState(); + }); +}; + +Ext.extend(Ext.air.FileProvider, Ext.state.Provider, { + file: 'extstate.data', + + + readState : function(){ + var stateFile = air.File.applicationStorageDirectory.resolvePath(this.file); + if(!stateFile.exists){ + return this.defaultState || {}; + } + + var stream = new air.FileStream(); + stream.open(stateFile, air.FileMode.READ); + + var stateData = stream.readObject(); + stream.close(); + + return stateData || this.defaultState || {}; + }, + + + saveState : function(name, value){ + var stateFile = air.File.applicationStorageDirectory.resolvePath(this.file); + var stream = new air.FileStream(); + stream.open(stateFile, air.FileMode.WRITE); + stream.writeObject(this.state); + stream.close(); + } +}); +Ext.air.NativeObservable = Ext.extend(Ext.util.Observable, { + addListener : function(name){ + this.proxiedEvents = this.proxiedEvents || {}; + if(!this.proxiedEvents[name]){ + var instance = this; + var f = function(){ + var args = Array.prototype.slice.call(arguments, 0); + args.unshift(name); + instance.fireEvent.apply(instance, args); + }; + this.proxiedEvents[name] = f; + this.getNative().addEventListener(name, f); + } + Ext.air.NativeObservable.superclass.addListener.apply(this, arguments); + } +}); + +Ext.air.NativeObservable.prototype.on = Ext.air.NativeObservable.prototype.addListener; + +Ext.air.NativeWindow = function(config){ + Ext.apply(this, config); + + this.id = this.id || Ext.uniqueId(); + + this.addEvents( + 'close', + 'closing', + 'move', + 'moving', + 'resize', + 'resizing', + 'displayStateChange', + 'displayStateChanging' + ); + + Ext.air.NativeWindow.superclass.constructor.call(this); + + if(!this.instance){ + var options = new air.NativeWindowInitOptions(); + options.systemChrome = this.chrome; + options.type = this.type; + options.resizable = this.resizable; + options.minimizable = this.minimizable; + options.maximizable = this.maximizable; + options.transparent = this.transparent; + + this.loader = window.runtime.flash.html.HTMLLoader.createRootWindow(false, options, false); + this.loader.load(new air.URLRequest(this.file)); + + this.instance = this.loader.window.nativeWindow; + }else{ + this.loader = this.instance.stage.getChildAt(0); + } + + var provider = Ext.state.Manager; + var b = air.Screen.mainScreen.visibleBounds; + + var state = provider.get(this.id) || {}; + provider.set(this.id, state); + + var win = this.instance; + + var width = Math.max(state.width || this.width, 100); + var height = Math.max(state.height || this.height, 100); + + var centerX = b.x + ((b.width/2)-(width/2)); + var centerY = b.y + ((b.height/2)-(height/2)); + + var x = !Ext.isEmpty(state.x, false) ? state.x : (!Ext.isEmpty(this.x, false) ? this.x : centerX); + var y = !Ext.isEmpty(state.y, false) ? state.y : (!Ext.isEmpty(this.y, false) ? this.y : centerY); + + win.width = width; + win.height = height; + win.x = x; + win.y = y; + + win.addEventListener('move', function(){ + if(win.displayState != air.NativeWindowDisplayState.MINIMIZED && win.width > 100 && win.height > 100) { + state.x = win.x; + state.y = win.y; + } + }); + win.addEventListener('resize', function(){ + if (win.displayState != air.NativeWindowDisplayState.MINIMIZED && win.width > 100 && win.height > 100) { + state.width = win.width; + state.height = win.height; + } + }); + + Ext.air.NativeWindowManager.register(this); + this.on('close', this.unregister, this); + + if(this.minimizeToTray){ + this.initMinimizeToTray(this.trayIcon, this.trayMenu); + } + +}; + +Ext.extend(Ext.air.NativeWindow, Ext.air.NativeObservable, { + chrome: 'standard', + type: 'normal', + width:600, + height:400, + resizable: true, + minimizable: true, + maximizable: true, + transparent: false, + + getNative : function(){ + return this.instance; + }, + + getCenterXY : function(){ + var b = air.Screen.mainScreen.visibleBounds; + return { + x: b.x + ((b.width/2)-(this.width/2)), + y: b.y + ((b.height/2)-(this.height/2)) + }; + }, + + show :function(){ + if(this.trayed){ + Ext.air.SystemTray.hideIcon(); + this.trayed = false; + } + this.instance.visible = true; + }, + + activate : function(){ + this.show(); + this.instance.activate(); + }, + + hide :function(){ + this.instance.visible = false; + }, + + close : function(){ + this.instance.close(); + }, + + isMinimized :function(){ + return this.instance.displayState == air.NativeWindowDisplayState.MINIMIZED; + }, + + isMaximized :function(){ + return this.instance.displayState == air.NativeWindowDisplayState.MAXIMIZED; + }, + + moveTo : function(x, y){ + this.x = this.instance.x = x; + this.y = this.instance.y = y; + }, + + resize : function(width, height){ + this.width = this.instance.width = width; + this.height = this.instance.height = height; + }, + + unregister : function(){ + Ext.air.NativeWindowManager.unregister(this); + }, + + initMinimizeToTray : function(icon, menu){ + var tray = Ext.air.SystemTray; + tray.setIcon(icon, this.trayTip); + this.on('displayStateChanging', function(e){ + if(e.afterDisplayState == 'minimized'){ + e.preventDefault(); + this.hide(); + tray.showIcon(); + this.trayed = true; + } + }, this); + + tray.on('click', function(){ + this.activate(); + }, this); + + if(menu){ + tray.setMenu(menu); + } + } +}); + +Ext.air.NativeWindow.getRootWindow = function(){ + return air.NativeApplication.nativeApplication.openedWindows[0]; +}; + +Ext.air.NativeWindow.getRootHtmlWindow = function(){ + return Ext.air.NativeWindow.getRootWindow().stage.getChildAt(0).window; +}; + +Ext.air.NativeWindowGroup = function(){ + var list = {}; + + return { + register : function(win){ + list[win.id] = win; + }, + + unregister : function(win){ + delete list[win.id]; + }, + + get : function(id){ + return list[id]; + }, + + closeAll : function(){ + for(var id in list){ + if(list.hasOwnProperty(id)){ + list[id].close(); + } + } + }, + + + each : function(fn, scope){ + for(var id in list){ + if(list.hasOwnProperty(id)){ + if(fn.call(scope || list[id], list[id]) === false){ + return; + } + } + } + } + }; +}; + + +Ext.air.NativeWindowManager = new Ext.air.NativeWindowGroup(); + +Ext.sql.Connection = function(config){ + Ext.apply(this, config); + Ext.sql.Connection.superclass.constructor.call(this); + + this.addEvents({ + open : true, + close: true + }); +}; + +Ext.extend(Ext.sql.Connection, Ext.util.Observable, { + maxResults: 10000, + openState : false, + + + open : function(file){ + }, + + close : function(){ + }, + + exec : function(sql){ + }, + + execBy : function(sql, args){ + }, + + query : function(sql){ + }, + + queryBy : function(sql, args){ + }, + + + isOpen : function(){ + return this.openState; + }, + + getTable : function(name, keyName){ + return new Ext.sql.Table(this, name, keyName); + }, + + createTable : function(o){ + var tableName = o.name; + var keyName = o.key; + var fs = o.fields; + if(!Ext.isArray(fs)){ + fs = fs.items; + } + var buf = []; + for(var i = 0, len = fs.length; i < len; i++){ + var f = fs[i], s = f.name; + switch(f.type){ + case "int": + case "bool": + case "boolean": + s += ' INTEGER'; + break; + case "float": + s += ' REAL'; + break; + default: + s += ' TEXT'; + } + if(f.allowNull === false || f.name == keyName){ + s += ' NOT NULL'; + } + if(f.name == keyName){ + s += ' PRIMARY KEY'; + } + if(f.unique === true){ + s += ' UNIQUE'; + } + + buf[buf.length] = s; + } + var sql = ['CREATE TABLE IF NOT EXISTS ', tableName, ' (', buf.join(','), ')'].join(''); + this.exec(sql); + } +}); + + +Ext.sql.Connection.getInstance = function(db, config){ + if(Ext.isAir){ + return new Ext.sql.AirConnection(config); + } else { + return new Ext.sql.GearsConnection(config); + } +}; +Ext.sql.Table = function(conn, name, keyName){ + this.conn = conn; + this.name = name; + this.keyName = keyName; +}; + +Ext.sql.Table.prototype = { + update : function(o){ + var clause = this.keyName + " = ?"; + return this.updateBy(o, clause, [o[this.keyName]]); + }, + + updateBy : function(o, clause, args){ + var sql = "UPDATE " + this.name + " set "; + var fs = [], a = []; + for(var key in o){ + if(o.hasOwnProperty(key)){ + fs[fs.length] = key + ' = ?'; + a[a.length] = o[key]; + } + } + for(var key in args){ + if(args.hasOwnProperty(key)){ + a[a.length] = args[key]; + } + } + sql = [sql, fs.join(','), ' WHERE ', clause].join(''); + return this.conn.execBy(sql, a); + }, + + insert : function(o){ + var sql = "INSERT into " + this.name + " "; + var fs = [], vs = [], a = []; + for(var key in o){ + if(o.hasOwnProperty(key)){ + fs[fs.length] = key; + vs[vs.length] = '?'; + a[a.length] = o[key]; + } + } + sql = [sql, '(', fs.join(','), ') VALUES (', vs.join(','), ')'].join(''); + return this.conn.execBy(sql, a); + }, + + lookup : function(id){ + return this.selectBy('where ' + this.keyName + " = ?", [id])[0] || null; + }, + + exists : function(id){ + return !!this.lookup(id); + }, + + save : function(o){ + if(this.exists(o[this.keyName])){ + this.update(o); + }else{ + this.insert(o); + } + }, + + select : function(clause){ + return this.selectBy(clause, null); + }, + + selectBy : function(clause, args){ + var sql = "select * from " + this.name; + if(clause){ + sql += ' ' + clause; + } + args = args || {}; + return this.conn.queryBy(sql, args); + }, + + remove : function(clause){ + this.deleteBy(clause, null); + }, + + removeBy : function(clause, args){ + var sql = "delete from " + this.name; + if(clause){ + sql += ' where ' + clause; + } + args = args || {}; + this.conn.execBy(sql, args); + } +}; +Ext.sql.Proxy = function(conn, table, keyName, store, readonly){ + Ext.sql.Proxy.superclass.constructor.call(this); + this.conn = conn; + this.table = this.conn.getTable(table, keyName); + this.store = store; + + if (readonly !== true) { + this.store.on('add', this.onAdd, this); + this.store.on('update', this.onUpdate, this); + this.store.on('remove', this.onRemove, this); + } +}; + +Ext.sql.Proxy.DATE_FORMAT = 'Y-m-d H:i:s'; + +Ext.extend(Ext.sql.Proxy, Ext.data.DataProxy, { + load : function(params, reader, callback, scope, arg){ + if(!this.conn.isOpen()){ + this.conn.on('open', function(){ + this.load(params, reader, callback, scope, arg); + }, this, {single:true}); + return; + }; + if(this.fireEvent("beforeload", this, params, reader, callback, scope, arg) !== false){ + var clause = params.where || ''; + var args = params.args || []; + var group = params.groupBy; + var sort = params.sort; + var dir = params.dir; + + if(group || sort){ + clause += ' ORDER BY '; + if(group && group != sort){ + clause += group + ' ASC, '; + } + clause += sort + ' ' + (dir || 'ASC'); + } + + var rs = this.table.selectBy(clause, args); + this.onLoad({callback:callback, scope:scope, arg:arg, reader: reader}, rs); + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + onLoad : function(trans, rs, e, stmt){ + if(rs === false){ + this.fireEvent("loadexception", this, null, trans.arg, e); + trans.callback.call(trans.scope||window, null, trans.arg, false); + return; + } + var result = trans.reader.readRecords(rs); + this.fireEvent("load", this, rs, trans.arg); + trans.callback.call(trans.scope||window, result, trans.arg, true); + }, + + processData : function(o){ + var fs = this.store.fields; + var r = {}; + for(var key in o){ + var f = fs.key(key), v = o[key]; + if(f){ + if(f.type == 'date'){ + r[key] = v ? v.format(Ext.sql.Proxy.DATE_FORMAT,10) : ''; + }else if(f.type == 'boolean'){ + r[key] = v ? 1 : 0; + }else{ + r[key] = v; + } + } + } + return r; + }, + + onUpdate : function(ds, record){ + var changes = record.getChanges(); + var kn = this.table.keyName; + this.table.updateBy(this.processData(changes), kn + ' = ?', [record.data[kn]]); + record.commit(true); + }, + + onAdd : function(ds, records, index){ + for(var i = 0, len = records.length; i < len; i++){ + this.table.insert(this.processData(records[i].data)); + } + }, + + onRemove : function(ds, record, index){ + var kn = this.table.keyName; + this.table.removeBy(kn + ' = ?', [record.data[kn]]); + } +}); + Ext.sql.AirConnection = Ext.extend(Ext.sql.Connection, { + + open : function(db){ + this.conn = new air.SQLConnection(); + var file = air.File.applicationDirectory.resolvePath(db); + this.conn.open(file); + this.openState = true; + this.fireEvent('open', this); + }, + + close : function(){ + this.conn.close(); + this.fireEvent('close', this); + }, + + createStatement : function(type){ + var stmt = new air.SQLStatement(); + stmt.sqlConnection = this.conn; + return stmt; + }, + + exec : function(sql){ + var stmt = this.createStatement('exec'); + stmt.text = sql; + stmt.execute(); + }, + + execBy : function(sql, args){ + var stmt = this.createStatement('exec'); + stmt.text = sql; + this.addParams(stmt, args); + stmt.execute(); + }, + + query : function(sql){ + var stmt = this.createStatement('query'); + stmt.text = sql; + stmt.execute(this.maxResults); + return this.readResults(stmt.getResult()); + }, + + queryBy : function(sql, args){ + var stmt = this.createStatement('query'); + stmt.text = sql; + this.addParams(stmt, args); + stmt.execute(this.maxResults); + return this.readResults(stmt.getResult()); + }, + + addParams : function(stmt, args){ + if(!args){ return; } + for(var key in args){ + if(args.hasOwnProperty(key)){ + if(!isNaN(key)){ + var v = args[key]; + if(Ext.isDate(v)){ + v = v.format(Ext.sql.Proxy.DATE_FORMAT); + } + stmt.parameters[parseInt(key)] = v; + }else{ + stmt.parameters[':' + key] = args[key]; + } + } + } + return stmt; + }, + + readResults : function(rs){ + var r = []; + if(rs && rs.data){ + var len = rs.data.length; + for(var i = 0; i < len; i++) { + r[r.length] = rs.data[i]; + } + } + return r; + } +}); +Ext.air.SystemTray = function(){ + var app = air.NativeApplication.nativeApplication; + var icon, isWindows = false, bitmaps; + + + if(air.NativeApplication.supportsSystemTrayIcon) { + icon = app.icon; + isWindows = true; + } + + + if(air.NativeApplication.supportsDockIcon) { + icon = app.icon; + } + + return { + + setIcon : function(icon, tooltip, initWithIcon){ + if(!icon){ + return; + } + var loader = new air.Loader(); + loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, function(e){ + bitmaps = new runtime.Array(e.target.content.bitmapData); + if (initWithIcon) { + icon.bitmaps = bitmaps; + } + }); + loader.load(new air.URLRequest(icon)); + if(tooltip && air.NativeApplication.supportsSystemTrayIcon) { + app.icon.tooltip = tooltip; + } + }, + + bounce : function(priority){ + icon.bounce(priority); + }, + + on : function(eventName, fn, scope){ + icon.addEventListener(eventName, function(){ + fn.apply(scope || this, arguments); + }); + }, + + hideIcon : function(){ + if(!icon){ + return; + } + icon.bitmaps = []; + }, + + showIcon : function(){ + if(!icon){ + return; + } + icon.bitmaps = bitmaps; + }, + + setMenu: function(actions, _parentMenu){ + if(!icon){ + return; + } + var menu = new air.NativeMenu(); + + for (var i = 0, len = actions.length; i < len; i++) { + var a = actions[i]; + if(a == '-'){ + menu.addItem(new air.NativeMenuItem("", true)); + }else{ + var item = menu.addItem(Ext.air.MenuItem(a)); + if(a.menu || (a.initialConfig && a.initialConfig.menu)){ + item.submenu = Ext.air.SystemTray.setMenu(a.menu || a.initialConfig.menu, menu); + } + } + + if(!_parentMenu){ + icon.menu = menu; + } + } + + return menu; + } + }; +}(); + + +Ext.air.DragType = { + TEXT : 'text/plain', + HTML : 'text/html', + URL : 'text/uri-list', + BITMAP : 'image/x-vnd.adobe.air.bitmap', + FILES : 'application/x-vnd.adobe.air.file-list' +}; + +Ext.apply(Ext.EventObjectImpl.prototype, { + hasFormat : function(format){ + if (this.browserEvent.dataTransfer) { + for (var i = 0, len = this.browserEvent.dataTransfer.types.length; i < len; i++) { + if(this.browserEvent.dataTransfer.types[i] == format) { + return true; + } + } + } + return false; + }, + + getData : function(type){ + return this.browserEvent.dataTransfer.getData(type); + } +}); + + + +Ext.air.Sound = { + play : function(file, startAt){ + var soundFile = air.File.applicationDirectory.resolvePath(file); + var sound = new air.Sound(); + sound.load(new air.URLRequest(soundFile.url)); + sound.play(startAt); + } +}; + + +Ext.air.SystemMenu = function(){ + var menu; + + if(air.NativeWindow.supportsMenu && nativeWindow.systemChrome != air.NativeWindowSystemChrome.NONE) { + menu = new air.NativeMenu(); + nativeWindow.menu = menu; + } + + + if(air.NativeApplication.supportsMenu) { + menu = air.NativeApplication.nativeApplication.menu; + } + + function find(menu, text){ + for(var i = 0, len = menu.items.length; i < len; i++){ + if(menu.items[i]['label'] == text){ + return menu.items[i]; + } + } + return null; + } + + return { + add: function(text, actions, mindex){ + + var item = find(menu, text); + if(!item){ + item = menu.addItem(new air.NativeMenuItem(text)); + item.mnemonicIndex = mindex || 0; + + item.submenu = new air.NativeMenu(); + } + for (var i = 0, len = actions.length; i < len; i++) { + item.submenu.addItem(actions[i] == '-' ? new air.NativeMenuItem("", true) : Ext.air.MenuItem(actions[i])); + } + return item.submenu; + }, + + get : function(){ + return menu; + } + }; +}(); + + +Ext.air.MenuItem = function(action){ + if(!action.isAction){ + action = new Ext.Action(action); + } + var cfg = action.initialConfig; + var nativeItem = new air.NativeMenuItem(cfg.itemText || cfg.text); + + nativeItem.enabled = !cfg.disabled; + + if(!Ext.isEmpty(cfg.checked)){ + nativeItem.checked = cfg.checked; + } + + var handler = cfg.handler; + var scope = cfg.scope; + + nativeItem.addEventListener(air.Event.SELECT, function(){ + handler.call(scope || window, cfg); + }); + + action.addComponent({ + setDisabled : function(v){ + nativeItem.enabled = !v; + }, + + setText : function(v){ + nativeItem.label = v; + }, + + setVisible : function(v){ + + nativeItem.enabled = !v; + }, + + setHandler : function(newHandler, newScope){ + handler = newHandler; + scope = newScope; + }, + + on : function(){} + }); + + return nativeItem; +} + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/ext-air.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,1596 @@ +/* + * Ext JS Library 2.0.1 + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.namespace('Ext.air', 'Ext.sql'); + +Ext.Template.prototype.compile = function() { + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + + var prevOffset = 0; + var arr = []; + var tpl = this; + var fn = function(m, name, format, args, offset, s){ + if (prevOffset != offset) { + var action = {type: 1, value: s.substr(prevOffset, offset - prevOffset)}; + arr.push(action); + } + prevOffset = offset + m.length; + if(format && useF){ + 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 = [''].concat(args); + } else { + args = ['']; + } + if(format.substr(0, 5) != "this."){ + var action = {type: 3, value:name, format: fm[format], args: args, scope: fm}; + arr.push(action); + }else{ + var action = {type: 3, value:name, format:tpl[format.substr(5)], args:args, scope: tpl}; + arr.push(action); + } + }else{ + var action = {type: 2, value: name}; + arr.push(action); + } + return m; + }; + + var s = this.html.replace(this.re, fn); + if (prevOffset != (s.length - 1)) { + var action = {type: 1, value: s.substr(prevOffset, s.length - prevOffset)}; + arr.push(action); + } + + this.compiled = function(values) { + function applyValues(el) { + switch (el.type) { + case 1: + return el.value; + case 2: + return (values[el.value] ? values[el.value] : ''); + default: + el.args[0] = values[el.value]; + return el.format.apply(el.scope, el.args); + } + } + return arr.map(applyValues).join(''); + } + return this; +}; + +Ext.Template.prototype.call = function(fnName, value, allValues){ + return this[fnName](value, allValues); +} + + +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); + }; + + + + + eval("var batch = 30803;"); + + var key = 30803; + + 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; + } + 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 quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return 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); + } + + function search(path, root, type) { + type = type || "select"; + + var n = root || document; + + 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]){ + 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] == "#"){ + n = quickId(n, mode, root, tm[2]); + }else{ + n = getNodes(n, mode, tm[2]); + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + n = getNodes(n, mode, "*"); + } + }else{ + if(tm){ + if(tm[1] == "#"){ + n = byId(n, null, tm[2]); + }else{ + 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){ + switch(j) { + case 0: + n = byClassName(n, null, " " + m[1] +" "); + break; + case 1: + n = byPseudo(n, m[1], m[2]); + break; + case 2: + n = byAttribute(n, m[2], m[4], m[3], m[1]); + break; + case 3: + n = byId(n, null, m[1]); + break; + case 4: + return {firstChild:{nodeValue:attrValue(n, m[1])}}; + + } + q = q.replace(m[0], ""); + matched = true; + break; + } + } + + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + q + '"'; + } + } + if(mm[1]){ + mode=mm[1].replace(trimRe, ""); + q = q.replace(mm[1], ""); + } + } + return nodup(n); + } + + return { + getStyle : function(el, name){ + return Ext.fly(el).getStyle(name); + }, + + compile: function(path, type) { + return function(root) { + return search(path, root, type); + } + }, + + + 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 = Ext.isArray(el); + 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; + +Date.precompileFormats = function(s){ + var formats = s.split('|'); + for(var i = 0, len = formats.length;i < len;i++){ + Date.createNewFormat(formats[i]); + Date.createParser(formats[i]); + } +} + +Date.precompileFormats("D n/j/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|YmdHis|F d, Y|l, F d, Y|H:i:s|g:i A|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|m/d/y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|Y-m-d H:i:s|d/m/y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|Y-m-d|l|D m/d|D m/d/Y|m/d/Y"); + + +Ext.ColorPalette.prototype.tpl = new Ext.XTemplate( + '<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>' +); + + + + + + + +Ext.air.FileProvider = function(config){ + Ext.air.FileProvider.superclass.constructor.call(this); + + this.defaultState = { + mainWindow : { + width:780, + height:580, + x:10, + y:10 + } + }; + + Ext.apply(this, config); + this.state = this.readState(); + + var provider = this; + air.NativeApplication.nativeApplication.addEventListener('exiting', function(){ + provider.saveState(); + }); +}; + +Ext.extend(Ext.air.FileProvider, Ext.state.Provider, { + file: 'extstate.data', + + + readState : function(){ + var stateFile = air.File.applicationStorageDirectory.resolvePath(this.file); + if(!stateFile.exists){ + return this.defaultState || {}; + } + + var stream = new air.FileStream(); + stream.open(stateFile, air.FileMode.READ); + + var stateData = stream.readObject(); + stream.close(); + + return stateData || this.defaultState || {}; + }, + + + saveState : function(name, value){ + var stateFile = air.File.applicationStorageDirectory.resolvePath(this.file); + var stream = new air.FileStream(); + stream.open(stateFile, air.FileMode.WRITE); + stream.writeObject(this.state); + stream.close(); + } +}); +Ext.air.NativeObservable = Ext.extend(Ext.util.Observable, { + addListener : function(name){ + this.proxiedEvents = this.proxiedEvents || {}; + if(!this.proxiedEvents[name]){ + var instance = this; + var f = function(){ + var args = Array.prototype.slice.call(arguments, 0); + args.unshift(name); + instance.fireEvent.apply(instance, args); + }; + this.proxiedEvents[name] = f; + this.getNative().addEventListener(name, f); + } + Ext.air.NativeObservable.superclass.addListener.apply(this, arguments); + } +}); + +Ext.air.NativeObservable.prototype.on = Ext.air.NativeObservable.prototype.addListener; + +Ext.air.NativeWindow = function(config){ + Ext.apply(this, config); + + this.id = this.id || Ext.uniqueId(); + + this.addEvents( + 'close', + 'closing', + 'move', + 'moving', + 'resize', + 'resizing', + 'displayStateChange', + 'displayStateChanging' + ); + + Ext.air.NativeWindow.superclass.constructor.call(this); + + if(!this.instance){ + var options = new air.NativeWindowInitOptions(); + options.systemChrome = this.chrome; + options.type = this.type; + options.resizable = this.resizable; + options.minimizable = this.minimizable; + options.maximizable = this.maximizable; + options.transparent = this.transparent; + + this.loader = window.runtime.flash.html.HTMLLoader.createRootWindow(false, options, false); + this.loader.load(new air.URLRequest(this.file)); + + this.instance = this.loader.window.nativeWindow; + }else{ + this.loader = this.instance.stage.getChildAt(0); + } + + var provider = Ext.state.Manager; + var b = air.Screen.mainScreen.visibleBounds; + + var state = provider.get(this.id) || {}; + provider.set(this.id, state); + + var win = this.instance; + + var width = Math.max(state.width || this.width, 100); + var height = Math.max(state.height || this.height, 100); + + var centerX = b.x + ((b.width/2)-(width/2)); + var centerY = b.y + ((b.height/2)-(height/2)); + + var x = !Ext.isEmpty(state.x, false) ? state.x : (!Ext.isEmpty(this.x, false) ? this.x : centerX); + var y = !Ext.isEmpty(state.y, false) ? state.y : (!Ext.isEmpty(this.y, false) ? this.y : centerY); + + win.width = width; + win.height = height; + win.x = x; + win.y = y; + + win.addEventListener('move', function(){ + if(win.displayState != air.NativeWindowDisplayState.MINIMIZED && win.width > 100 && win.height > 100) { + state.x = win.x; + state.y = win.y; + } + }); + win.addEventListener('resize', function(){ + if (win.displayState != air.NativeWindowDisplayState.MINIMIZED && win.width > 100 && win.height > 100) { + state.width = win.width; + state.height = win.height; + } + }); + + Ext.air.NativeWindowManager.register(this); + this.on('close', this.unregister, this); + + if(this.minimizeToTray){ + this.initMinimizeToTray(this.trayIcon, this.trayMenu); + } + +}; + +Ext.extend(Ext.air.NativeWindow, Ext.air.NativeObservable, { + chrome: 'standard', + type: 'normal', + width:600, + height:400, + resizable: true, + minimizable: true, + maximizable: true, + transparent: false, + + getNative : function(){ + return this.instance; + }, + + getCenterXY : function(){ + var b = air.Screen.mainScreen.visibleBounds; + return { + x: b.x + ((b.width/2)-(this.width/2)), + y: b.y + ((b.height/2)-(this.height/2)) + }; + }, + + show :function(){ + if(this.trayed){ + Ext.air.SystemTray.hideIcon(); + this.trayed = false; + } + this.instance.visible = true; + }, + + activate : function(){ + this.show(); + this.instance.activate(); + }, + + hide :function(){ + this.instance.visible = false; + }, + + close : function(){ + this.instance.close(); + }, + + isMinimized :function(){ + return this.instance.displayState == air.NativeWindowDisplayState.MINIMIZED; + }, + + isMaximized :function(){ + return this.instance.displayState == air.NativeWindowDisplayState.MAXIMIZED; + }, + + moveTo : function(x, y){ + this.x = this.instance.x = x; + this.y = this.instance.y = y; + }, + + resize : function(width, height){ + this.width = this.instance.width = width; + this.height = this.instance.height = height; + }, + + unregister : function(){ + Ext.air.NativeWindowManager.unregister(this); + }, + + initMinimizeToTray : function(icon, menu){ + var tray = Ext.air.SystemTray; + tray.setIcon(icon, this.trayTip); + this.on('displayStateChanging', function(e){ + if(e.afterDisplayState == 'minimized'){ + e.preventDefault(); + this.hide(); + tray.showIcon(); + this.trayed = true; + } + }, this); + + tray.on('click', function(){ + this.activate(); + }, this); + + if(menu){ + tray.setMenu(menu); + } + } +}); + +Ext.air.NativeWindow.getRootWindow = function(){ + return air.NativeApplication.nativeApplication.openedWindows[0]; +}; + +Ext.air.NativeWindow.getRootHtmlWindow = function(){ + return Ext.air.NativeWindow.getRootWindow().stage.getChildAt(0).window; +}; + +Ext.air.NativeWindowGroup = function(){ + var list = {}; + + return { + register : function(win){ + list[win.id] = win; + }, + + unregister : function(win){ + delete list[win.id]; + }, + + get : function(id){ + return list[id]; + }, + + closeAll : function(){ + for(var id in list){ + if(list.hasOwnProperty(id)){ + list[id].close(); + } + } + }, + + + each : function(fn, scope){ + for(var id in list){ + if(list.hasOwnProperty(id)){ + if(fn.call(scope || list[id], list[id]) === false){ + return; + } + } + } + } + }; +}; + + +Ext.air.NativeWindowManager = new Ext.air.NativeWindowGroup(); + +Ext.sql.Connection = function(config){ + Ext.apply(this, config); + Ext.sql.Connection.superclass.constructor.call(this); + + this.addEvents({ + open : true, + close: true + }); +}; + +Ext.extend(Ext.sql.Connection, Ext.util.Observable, { + maxResults: 10000, + openState : false, + + + open : function(file){ + }, + + close : function(){ + }, + + exec : function(sql){ + }, + + execBy : function(sql, args){ + }, + + query : function(sql){ + }, + + queryBy : function(sql, args){ + }, + + + isOpen : function(){ + return this.openState; + }, + + getTable : function(name, keyName){ + return new Ext.sql.Table(this, name, keyName); + }, + + createTable : function(o){ + var tableName = o.name; + var keyName = o.key; + var fs = o.fields; + if(!Ext.isArray(fs)){ + fs = fs.items; + } + var buf = []; + for(var i = 0, len = fs.length; i < len; i++){ + var f = fs[i], s = f.name; + switch(f.type){ + case "int": + case "bool": + case "boolean": + s += ' INTEGER'; + break; + case "float": + s += ' REAL'; + break; + default: + s += ' TEXT'; + } + if(f.allowNull === false || f.name == keyName){ + s += ' NOT NULL'; + } + if(f.name == keyName){ + s += ' PRIMARY KEY'; + } + if(f.unique === true){ + s += ' UNIQUE'; + } + + buf[buf.length] = s; + } + var sql = ['CREATE TABLE IF NOT EXISTS ', tableName, ' (', buf.join(','), ')'].join(''); + this.exec(sql); + } +}); + + +Ext.sql.Connection.getInstance = function(db, config){ + if(Ext.isAir){ + return new Ext.sql.AirConnection(config); + } else { + return new Ext.sql.GearsConnection(config); + } +}; +Ext.sql.Table = function(conn, name, keyName){ + this.conn = conn; + this.name = name; + this.keyName = keyName; +}; + +Ext.sql.Table.prototype = { + update : function(o){ + var clause = this.keyName + " = ?"; + return this.updateBy(o, clause, [o[this.keyName]]); + }, + + updateBy : function(o, clause, args){ + var sql = "UPDATE " + this.name + " set "; + var fs = [], a = []; + for(var key in o){ + if(o.hasOwnProperty(key)){ + fs[fs.length] = key + ' = ?'; + a[a.length] = o[key]; + } + } + for(var key in args){ + if(args.hasOwnProperty(key)){ + a[a.length] = args[key]; + } + } + sql = [sql, fs.join(','), ' WHERE ', clause].join(''); + return this.conn.execBy(sql, a); + }, + + insert : function(o){ + var sql = "INSERT into " + this.name + " "; + var fs = [], vs = [], a = []; + for(var key in o){ + if(o.hasOwnProperty(key)){ + fs[fs.length] = key; + vs[vs.length] = '?'; + a[a.length] = o[key]; + } + } + sql = [sql, '(', fs.join(','), ') VALUES (', vs.join(','), ')'].join(''); + return this.conn.execBy(sql, a); + }, + + lookup : function(id){ + return this.selectBy('where ' + this.keyName + " = ?", [id])[0] || null; + }, + + exists : function(id){ + return !!this.lookup(id); + }, + + save : function(o){ + if(this.exists(o[this.keyName])){ + this.update(o); + }else{ + this.insert(o); + } + }, + + select : function(clause){ + return this.selectBy(clause, null); + }, + + selectBy : function(clause, args){ + var sql = "select * from " + this.name; + if(clause){ + sql += ' ' + clause; + } + args = args || {}; + return this.conn.queryBy(sql, args); + }, + + remove : function(clause){ + this.deleteBy(clause, null); + }, + + removeBy : function(clause, args){ + var sql = "delete from " + this.name; + if(clause){ + sql += ' where ' + clause; + } + args = args || {}; + this.conn.execBy(sql, args); + } +}; +Ext.sql.Proxy = function(conn, table, keyName, store, readonly){ + Ext.sql.Proxy.superclass.constructor.call(this); + this.conn = conn; + this.table = this.conn.getTable(table, keyName); + this.store = store; + + if (readonly !== true) { + this.store.on('add', this.onAdd, this); + this.store.on('update', this.onUpdate, this); + this.store.on('remove', this.onRemove, this); + } +}; + +Ext.sql.Proxy.DATE_FORMAT = 'Y-m-d H:i:s'; + +Ext.extend(Ext.sql.Proxy, Ext.data.DataProxy, { + load : function(params, reader, callback, scope, arg){ + if(!this.conn.isOpen()){ + this.conn.on('open', function(){ + this.load(params, reader, callback, scope, arg); + }, this, {single:true}); + return; + }; + if(this.fireEvent("beforeload", this, params, reader, callback, scope, arg) !== false){ + var clause = params.where || ''; + var args = params.args || []; + var group = params.groupBy; + var sort = params.sort; + var dir = params.dir; + + if(group || sort){ + clause += ' ORDER BY '; + if(group && group != sort){ + clause += group + ' ASC, '; + } + clause += sort + ' ' + (dir || 'ASC'); + } + + var rs = this.table.selectBy(clause, args); + this.onLoad({callback:callback, scope:scope, arg:arg, reader: reader}, rs); + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + onLoad : function(trans, rs, e, stmt){ + if(rs === false){ + this.fireEvent("loadexception", this, null, trans.arg, e); + trans.callback.call(trans.scope||window, null, trans.arg, false); + return; + } + var result = trans.reader.readRecords(rs); + this.fireEvent("load", this, rs, trans.arg); + trans.callback.call(trans.scope||window, result, trans.arg, true); + }, + + processData : function(o){ + var fs = this.store.fields; + var r = {}; + for(var key in o){ + var f = fs.key(key), v = o[key]; + if(f){ + if(f.type == 'date'){ + r[key] = v ? v.format(Ext.sql.Proxy.DATE_FORMAT,10) : ''; + }else if(f.type == 'boolean'){ + r[key] = v ? 1 : 0; + }else{ + r[key] = v; + } + } + } + return r; + }, + + onUpdate : function(ds, record){ + var changes = record.getChanges(); + var kn = this.table.keyName; + this.table.updateBy(this.processData(changes), kn + ' = ?', [record.data[kn]]); + record.commit(true); + }, + + onAdd : function(ds, records, index){ + for(var i = 0, len = records.length; i < len; i++){ + this.table.insert(this.processData(records[i].data)); + } + }, + + onRemove : function(ds, record, index){ + var kn = this.table.keyName; + this.table.removeBy(kn + ' = ?', [record.data[kn]]); + } +}); + Ext.sql.AirConnection = Ext.extend(Ext.sql.Connection, { + + open : function(db){ + this.conn = new air.SQLConnection(); + var file = air.File.applicationDirectory.resolvePath(db); + this.conn.open(file); + this.openState = true; + this.fireEvent('open', this); + }, + + close : function(){ + this.conn.close(); + this.fireEvent('close', this); + }, + + createStatement : function(type){ + var stmt = new air.SQLStatement(); + stmt.sqlConnection = this.conn; + return stmt; + }, + + exec : function(sql){ + var stmt = this.createStatement('exec'); + stmt.text = sql; + stmt.execute(); + }, + + execBy : function(sql, args){ + var stmt = this.createStatement('exec'); + stmt.text = sql; + this.addParams(stmt, args); + stmt.execute(); + }, + + query : function(sql){ + var stmt = this.createStatement('query'); + stmt.text = sql; + stmt.execute(this.maxResults); + return this.readResults(stmt.getResult()); + }, + + queryBy : function(sql, args){ + var stmt = this.createStatement('query'); + stmt.text = sql; + this.addParams(stmt, args); + stmt.execute(this.maxResults); + return this.readResults(stmt.getResult()); + }, + + addParams : function(stmt, args){ + if(!args){ return; } + for(var key in args){ + if(args.hasOwnProperty(key)){ + if(!isNaN(key)){ + var v = args[key]; + if(Ext.isDate(v)){ + v = v.format(Ext.sql.Proxy.DATE_FORMAT); + } + stmt.parameters[parseInt(key)] = v; + }else{ + stmt.parameters[':' + key] = args[key]; + } + } + } + return stmt; + }, + + readResults : function(rs){ + var r = []; + if(rs && rs.data){ + var len = rs.data.length; + for(var i = 0; i < len; i++) { + r[r.length] = rs.data[i]; + } + } + return r; + } +}); +Ext.air.SystemTray = function(){ + var app = air.NativeApplication.nativeApplication; + var icon, isWindows = false, bitmaps; + + + if(air.NativeApplication.supportsSystemTrayIcon) { + icon = app.icon; + isWindows = true; + } + + + if(air.NativeApplication.supportsDockIcon) { + icon = app.icon; + } + + return { + + setIcon : function(icon, tooltip, initWithIcon){ + if(!icon){ + return; + } + var loader = new air.Loader(); + loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, function(e){ + bitmaps = new runtime.Array(e.target.content.bitmapData); + if (initWithIcon) { + icon.bitmaps = bitmaps; + } + }); + loader.load(new air.URLRequest(icon)); + if(tooltip && air.NativeApplication.supportsSystemTrayIcon) { + app.icon.tooltip = tooltip; + } + }, + + bounce : function(priority){ + icon.bounce(priority); + }, + + on : function(eventName, fn, scope){ + icon.addEventListener(eventName, function(){ + fn.apply(scope || this, arguments); + }); + }, + + hideIcon : function(){ + if(!icon){ + return; + } + icon.bitmaps = []; + }, + + showIcon : function(){ + if(!icon){ + return; + } + icon.bitmaps = bitmaps; + }, + + setMenu: function(actions, _parentMenu){ + if(!icon){ + return; + } + var menu = new air.NativeMenu(); + + for (var i = 0, len = actions.length; i < len; i++) { + var a = actions[i]; + if(a == '-'){ + menu.addItem(new air.NativeMenuItem("", true)); + }else{ + var item = menu.addItem(Ext.air.MenuItem(a)); + if(a.menu || (a.initialConfig && a.initialConfig.menu)){ + item.submenu = Ext.air.SystemTray.setMenu(a.menu || a.initialConfig.menu, menu); + } + } + + if(!_parentMenu){ + icon.menu = menu; + } + } + + return menu; + } + }; +}(); + + +Ext.air.DragType = { + TEXT : 'text/plain', + HTML : 'text/html', + URL : 'text/uri-list', + BITMAP : 'image/x-vnd.adobe.air.bitmap', + FILES : 'application/x-vnd.adobe.air.file-list' +}; + +Ext.apply(Ext.EventObjectImpl.prototype, { + hasFormat : function(format){ + if (this.browserEvent.dataTransfer) { + for (var i = 0, len = this.browserEvent.dataTransfer.types.length; i < len; i++) { + if(this.browserEvent.dataTransfer.types[i] == format) { + return true; + } + } + } + return false; + }, + + getData : function(type){ + return this.browserEvent.dataTransfer.getData(type); + } +}); + + + +Ext.air.Sound = { + play : function(file, startAt){ + var soundFile = air.File.applicationDirectory.resolvePath(file); + var sound = new air.Sound(); + sound.load(new air.URLRequest(soundFile.url)); + sound.play(startAt); + } +}; + + +Ext.air.SystemMenu = function(){ + var menu; + + if(air.NativeWindow.supportsMenu && nativeWindow.systemChrome != air.NativeWindowSystemChrome.NONE) { + menu = new air.NativeMenu(); + nativeWindow.menu = menu; + } + + + if(air.NativeApplication.supportsMenu) { + menu = air.NativeApplication.nativeApplication.menu; + } + + function find(menu, text){ + for(var i = 0, len = menu.items.length; i < len; i++){ + if(menu.items[i]['label'] == text){ + return menu.items[i]; + } + } + return null; + } + + return { + add: function(text, actions, mindex){ + + var item = find(menu, text); + if(!item){ + item = menu.addItem(new air.NativeMenuItem(text)); + item.mnemonicIndex = mindex || 0; + + item.submenu = new air.NativeMenu(); + } + for (var i = 0, len = actions.length; i < len; i++) { + item.submenu.addItem(actions[i] == '-' ? new air.NativeMenuItem("", true) : Ext.air.MenuItem(actions[i])); + } + return item.submenu; + }, + + get : function(){ + return menu; + } + }; +}(); + + +Ext.air.MenuItem = function(action){ + if(!action.isAction){ + action = new Ext.Action(action); + } + var cfg = action.initialConfig; + var nativeItem = new air.NativeMenuItem(cfg.itemText || cfg.text); + + nativeItem.enabled = !cfg.disabled; + + if(!Ext.isEmpty(cfg.checked)){ + nativeItem.checked = cfg.checked; + } + + var handler = cfg.handler; + var scope = cfg.scope; + + nativeItem.addEventListener(air.Event.SELECT, function(){ + handler.call(scope || window, cfg); + }); + + action.addComponent({ + setDisabled : function(v){ + nativeItem.enabled = !v; + }, + + setText : function(v){ + nativeItem.label = v; + }, + + setVisible : function(v){ + + nativeItem.enabled = !v; + }, + + setHandler : function(newHandler, newScope){ + handler = newHandler; + scope = newScope; + }, + + on : function(){} + }); + + return nativeItem; +} + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/air-resources.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/air-resources.jsb (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/air-resources.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,14 @@ +<?xml version="1.0" encoding="utf-8"?> +<project path="" name="Ext - JS Lib" author="Ext JS, LLC" version="2.0.1" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="$project\..\samples\tasks\ext-air\resources\" source="true" source-dir="$output" minify="False" min-dir="$output\build" doc="False" doc-dir="$output\docs" master="true" master-file="$output\yui-ext.js" zip="true" zip-file="$output\yuo-ext.$version.zip"> + <directory name="" /> + <file name="icons\extlogo128.png" path="icons" /> + <file name="icons\extlogo16.png" path="icons" /> + <file name="icons\extlogo32.png" path="icons" /> + <file name="icons\extlogo64.png" path="icons" /> + <file name="images\left-corners.png" path="images" /> + <file name="images\left-right.png" path="images" /> + <file name="images\right-corners.png" path="images" /> + <file name="images\top-bottom.png" path="images" /> + <file name="air-resources.jsb" path="" /> + <file name="ext-air.css" path="" /> +</project> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/ext-air.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/ext-air.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/ext-air.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,93 @@ +body.x-air-window { + background:transparent !important; + height:100%; +} + +.x-air.x-window-tc { + background: transparent url(images/top-bottom.png) repeat-x 0 0; + padding-top:11px; +} +.x-air.x-window-bc .x-air.x-window-footer { + background: transparent url(images/top-bottom.png) repeat-x 0 bottom; + padding-bottom:15px; +} +.x-panel-nofooter .x-air.x-window-bc { + background: transparent url(images/top-bottom.png) repeat-x 0 bottom; + height:15px; +} +.x-air.x-window-tr { + background: transparent url(images/right-corners.png) no-repeat right 0; + padding-right:15px; +} +.x-air.x-window-br { + background: transparent url(images/right-corners.png) no-repeat right bottom; + padding-right:15px; +} + +.x-air.x-window-tl { + background: transparent url(images/left-corners.png) no-repeat 0 0; + padding-left:15px; +} +.x-air.x-window-bl { + background: transparent url(images/left-corners.png) no-repeat 0 bottom; + padding-left:15px; +} + +.x-air.x-window-mr { + background: transparent url(images/left-right.png) repeat-y right 0; + padding-right:15px; +} + +.x-air.x-window-ml { + background: transparent url(images/left-right.png) repeat-y 0 0; + padding-left:15px; +} +.x-air.x-resizable-handle{ + margin:7px; +} + +.x-air.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-air.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; +} + + +.ext-safari .x-small-editor .x-form-field { + /* safari text field will not size so needs bigger font */ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-menu-sep { + overflow:hidden; + height:1px; + margin: 1px 3px; +} + +.x-layout-split, .x-splitbar-h, .x-splitbar-v, .x-layout-split-north, .x-layout-split-east, .x-layout-split-west, .x-layout-split-south { + cursor:move !important; +} + +.x-grid3:not(input) { + -khtml-user-select: none; +} +.x-tree:not(input) { + -khtml-user-select: none; +} +.x-panel:not(input) { + -khtml-user-select: none; +} +.x-panel .x-panel-body textarea { + -khtml-user-select: normal; +} + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo128.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo128.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo16.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo16.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo32.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo32.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo48.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo48.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo64.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/icons/extlogo64.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/left-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/left-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/left-right.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/left-right.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/right-corners.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/right-corners.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/top-bottom.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/ext-air/resources/images/top-bottom.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/bell.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/bell.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/check.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/check.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/delete.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/delete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/edit.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/edit.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/hd-check.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/hd-check.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/hrow.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/hrow.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-active.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-active.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-all.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-all.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-by-category.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-by-category.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-by-date.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-by-date.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-complete.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-complete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-delete-task.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-delete-task.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-filter.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-filter.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder-delete.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder-delete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder-new.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder-new.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-folder.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list-delete.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list-delete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list-new.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list-new.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-list.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-mark-active.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-mark-active.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-mark-complete.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-mark-complete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-multi-list.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-multi-list.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-no-group.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-no-group.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-paste-new.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-paste-new.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-active.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-active.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-all.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-all.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-complete.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/icon-show-complete.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/my-lists.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/my-lists.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/panel-header.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/panel-header.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/rbtn.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/rbtn.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/reminder-hd.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/reminder-hd.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/s.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/s.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/save.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/images/save.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/DateTimeField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/DateTimeField.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/DateTimeField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,376 @@ +Ext.namespace('Ext.ux.form'); + +/** + * Ext.ux.form.DateTime Extension Class for Ext 2.x Library + * + * @author Ing. Jozef Sakalos + * @copyright (c) 2008, Ing. Jozef Sakalos + * @version $Id: Ext.ux.form.DateTime.js 645 2008-01-27 21:53:01Z jozo $ + * + * @class Ext.ux.form.DateTime + * @extends Ext.form.Field + * + * @history + * 2008-1-31 Jack Slocum + * Updated for reformatting and code edits + */ +Ext.ux.form.DateTime = Ext.extend(Ext.form.Field, { + defaultAutoCreate: { + tag: 'input', + type: 'hidden' + }, + dateWidth: 135, + timeWidth: 100, + dtSeparator: ' ', + hiddenFormat: 'Y-m-d H:i:s', + otherToNow: true, + timePosition: 'right', + + initComponent: function(){ + // call parent initComponent + Ext.ux.form.DateTime.superclass.initComponent.call(this); + + // create DateField + var dateConfig = Ext.apply({}, { + id: this.id + '-date', + format: this.dateFormat, + width: this.dateWidth, + listeners: { + blur: { + scope: this, + fn: this.onBlur + }, + focus: { + scope: this, + fn: this.onFocus + } + } + }, this.dateConfig); + this.df = new Ext.form.DateField(dateConfig); + delete (this.dateFormat); + + // create TimeField + var timeConfig = Ext.apply({}, { + id: this.id + '-time', + format: this.timeFormat, + width: this.timeWidth, + listeners: { + blur: { + scope: this, + fn: this.onBlur + }, + focus: { + scope: this, + fn: this.onFocus + } + } + }, this.timeConfig); + this.tf = new Ext.form.TimeField(timeConfig); + delete (this.timeFormat); + + // relay events + this.relayEvents(this.df, ['focus', 'specialkey', 'invalid', 'valid']); + this.relayEvents(this.tf, ['focus', 'specialkey', 'invalid', 'valid']); + + }, + onRender: function(ct, position){ + if (this.isRendered) { + return; + } + + // render underlying field + Ext.ux.form.DateTime.superclass.onRender.call(this, ct, position); + + // render DateField and TimeField + // create bounding table + if ('below' === this.timePosition) { + var t = Ext.DomHelper.append(ct, { + tag: 'table', + style: 'border-collapse:collapse', + children: [{ + tag: 'tr', + children: [{ + tag: 'td', + style: 'padding-bottom:1px', + cls: 'ux-datetime-date' + }] + }, { + tag: 'tr', + children: [{ + tag: 'td', + cls: 'ux-datetime-time' + }] + }] + }, true); + } + else { + var t = Ext.DomHelper.append(ct, { + tag: 'table', + style: 'border-collapse:collapse', + children: [{ + tag: 'tr', + children: [{ + tag: 'td', + style: 'padding-right:4px', + cls: 'ux-datetime-date' + }, { + tag: 'td', + cls: 'ux-datetime-time' + }] + }] + }, true); + } + + this.tableEl = t; + this.wrap = t.wrap({ + cls: 'x-form-field-wrap' + }); + this.wrap.on("mousedown", this.onMouseDown, this, { + delay: 10 + }); + + // render DateField & TimeField + this.df.render(t.child('td.ux-datetime-date')); + this.tf.render(t.child('td.ux-datetime-time')); + + if (Ext.isIE && Ext.isStrict) { + t.select('input').applyStyles({ + top: 0 + }); + } + + this.on('specialkey', this.onSpecialKey, this); + + this.df.el.swallowEvent(['keydown', 'keypress']); + this.tf.el.swallowEvent(['keydown', 'keypress']); + + // create errorIcon for side invalid + if ('side' === this.msgTarget) { + var elp = this.el.findParent('.x-form-element', 10, true); + this.errorIcon = elp.createChild({ + cls: 'x-form-invalid-icon' + }); + + this.df.errorIcon = this.errorIcon; + this.tf.errorIcon = this.errorIcon; + } + + this.isRendered = true; + + }, + getPositionEl: function(){ + return this.wrap; + }, + getResizeEl: function(){ + return this.wrap; + }, + + adjustSize: Ext.BoxComponent.prototype.adjustSize, + + alignErrorIcon: function(){ + this.errorIcon.alignTo(this.wrap, 'tl-tr', [2, 0]); + }, + + onSpecialKey: function(t, e){ + if (e.getKey() == e.TAB) { + if (t === this.df && !e.shiftKey) { + e.stopEvent(); + this.tf.focus(); + } + if (t === this.tf && e.shiftKey) { + e.stopEvent(); + this.df.focus(); + } + } + }, + + setSize: function(w, h){ + if (!w) { + return; + } + if ('below' == this.timePosition) { + this.df.setSize(w, h); + this.tf.setSize(w, h) + if (Ext.isIE) { + this.df.el.up('td').setWidth(w); + this.tf.el.up('td').setWidth(w); + } + } + else { + this.df.setSize(w - this.timeWidth - 4, h); + this.tf.setSize(this.timeWidth, h); + + if (Ext.isIE) { + this.df.el.up('td').setWidth(w - this.timeWidth - 4); + this.tf.el.up('td').setWidth(this.timeWidth); + } + } + + }, + + setValue: function(val){ + if (!val) { + this.setDate(''); + this.setTime(''); + this.updateValue(); + return; + } + // clear cross frame AIR nonsense + val = new Date(val.getTime()); + var da, time; + if (Ext.isDate(val)) { + this.setDate(val); + this.setTime(val); + this.dateValue = new Date(val); + } + else { + da = val.split(this.dtSeparator); + this.setDate(da[0]); + if (da[1]) { + this.setTime(da[1]); + } + } + this.updateValue(); + }, + + getValue: function(){ + // create new instance of date + return this.dateValue ? new Date(this.dateValue) : ''; + }, + + onMouseDown: function(e){ + // just to prevent blur event when clicked in the middle of fields + this.wrapClick = 'td' === e.target.nodeName.toLowerCase(); + }, + + onFocus: function(){ + if (!this.hasFocus) { + this.hasFocus = true; + this.startValue = this.getValue(); + this.fireEvent("focus", this); + } + }, + + onBlur: function(f){ + // called by both DateField and TimeField blur events + + // revert focus to previous field if clicked in between + if (this.wrapClick) { + f.focus(); + this.wrapClick = false; + } + + // update underlying value + if (f === this.df) { + this.updateDate(); + } + else { + this.updateTime(); + } + this.updateHidden(); + + // fire events later + (function(){ + if (!this.df.hasFocus && !this.tf.hasFocus) { + var v = this.getValue(); + if (String(v) !== String(this.startValue)) { + this.fireEvent("change", this, v, this.startValue); + } + this.hasFocus = false; + this.fireEvent('blur', this); + } + }).defer(100, this); + + }, + updateDate: function(){ + + var d = this.df.getValue(); + if (d) { + if (!Ext.isDate(this.dateValue)) { + this.initDateValue(); + if (!this.tf.getValue()) { + this.setTime(this.dateValue); + } + } + this.dateValue.setFullYear(d.getFullYear()); + this.dateValue.setMonth(d.getMonth()); + this.dateValue.setDate(d.getDate()); + } + else { + this.dateValue = ''; + this.setTime(''); + } + }, + updateTime: function(){ + var t = this.tf.getValue(); + if (t && !Ext.isDate(t)) { + t = Date.parseDate(t, this.tf.format); + } + if (t && !this.df.getValue()) { + this.initDateValue(); + this.setDate(this.dateValue); + } + if (Ext.isDate(this.dateValue)) { + if (t) { + this.dateValue.setHours(t.getHours()); + this.dateValue.setMinutes(t.getMinutes()); + this.dateValue.setSeconds(t.getSeconds()); + } + else { + this.dateValue.setHours(0); + this.dateValue.setMinutes(0); + this.dateValue.setSeconds(0); + } + } + }, + initDateValue: function(){ + this.dateValue = this.otherToNow ? new Date() : new Date(1970, 0, 1, 0, 0, 0); + }, + updateHidden: function(){ + if (this.isRendered) { + var value = Ext.isDate(this.dateValue) ? this.dateValue.format(this.hiddenFormat) : ''; + this.el.dom.value = value; + } + }, + updateValue: function(){ + + this.updateDate(); + this.updateTime(); + this.updateHidden(); + + return; + + }, + setDate: function(date){ + this.df.setValue(date); + }, + setTime: function(date){ + this.tf.setValue(date); + }, + isValid: function(){ + return this.df.isValid() && this.tf.isValid(); + }, + validate: function(){ + return this.df.validate() && this.tf.validate(); + }, + focus: function(){ + this.df.focus(); + }, + + onDisable : function(){ + if(this.rendered){ + this.df.disable(); + this.tf.disable(); + } + }, + + onEnable : function(){ + if(this.rendered){ + this.df.enable(); + this.tf.enable(); + } + } +}); + +// register xtype +Ext.reg('xdatetime', Ext.ux.form.DateTime); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Exporter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Exporter.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Exporter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,52 @@ +tx.Exporter = function(){ + var lists = tx.data.conn.query('select * from list'); + + var doc = new runtime.flash.xml.XMLDocument(); + + var root = doc.createElement('simple-tasks'); + doc.appendChild(root); + + root.attributes['version'] = '2.0'; + + for(var i = 0, len = lists.length; i < len; i++){ + var list = lists[i]; + + var listNode = doc.createElement('list'); + root.appendChild(listNode); + + for(var k in list){ + if(list.hasOwnProperty(k)){ + listNode.attributes[k] = String(list[k]); + } + } + + var tasks = tx.data.conn.queryBy('select * from task where listId = ?', [list.listId]); + for(var j = 0, jlen = tasks.length; j < jlen; j++){ + var task = tasks[j]; + + var taskNode = doc.createElement('task'); + listNode.appendChild(taskNode); + + for(var t in task){ + if(task.hasOwnProperty(t)){ + taskNode.attributes[t] = String(task[t]); + } + } + } + } + + var file = new air.File(air.File.documentsDirectory.nativePath + air.File.separator + 'tasks.xml'); + + file.addEventListener('select', function(e){ + var target = e.target; + var stream = new air.FileStream(); + stream.open(target, air.FileMode.WRITE); + stream.writeUTFBytes('<?xml version="1.0" encoding="UTF-8"?>'); + stream.writeUTFBytes(doc.toString()); + stream.close(); + }); + + // I wonder why no filter for Save As? + // var filter = new air.FileFilter("Tasks XML File", "*.xml"); + file.browseForSave('Save As'); +}; Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Importer.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Importer.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Importer.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,103 @@ +tx.Importer = function(){ + function chooseFile(callback){ + var file = new air.File(air.File.documentsDirectory.nativePath); + var filter = new air.FileFilter("Tasks XML File", "*.xml"); + + file.addEventListener('select', function(e){ + doImport(e.target, callback); + }); + + file.browseForOpen('Open', [filter]); + } + + + /* + * This import function used to be clean and simple. The addition of asynchronous import and + * a progress bar changed that quickly. :) + */ + function doImport(file, callback){ + + Ext.Msg.progress('Import', 'Reading file...'); + + var listTable = tx.data.conn.getTable('list', 'listId'); + var taskTable = tx.data.conn.getTable('task', 'taskId'); + var taskCount = 0; + var visibleIndex = 0; + var doUpdate = true; + var f = String.format; + + function getProgress(index){ + if(taskCount > 0){ + return (.8 * index) / taskCount; + }else{ + return .8; + } + } + + function readFile(){ + var stream = new air.FileStream(); + stream.open(file, air.FileMode.READ); + var xml = stream.readUTFBytes(stream.bytesAvailable); + stream.close(); + + Ext.Msg.updateProgress(.1, 'Parsing...'); + parse.defer(10, null, [xml]); + } + + function parse(xml){ + try { + var doc = new runtime.flash.xml.XMLDocument(); + doc.ignoreWhite = true; + doc.parseXML(xml); + + var lists = doc.firstChild.childNodes; + var count = lists.length; + + for (var i = 0; i < count; i++) { + taskCount += lists[i].childNodes.length; + } + Ext.Msg.updateProgress(.15, '', 'Loading Tasks...'); + loadLists(lists, 0); + }catch(e){ + air.trace(e); + alert('An error occured while trying to import the selected file.'); + } + } + + function loadLists(lists, index){ + if(index < lists.length){ + var list = lists[index]; + listTable.save(list.attributes); + nextTask(list.childNodes, 0, lists, index); + } + else { + Ext.Msg.updateProgress(1, '', 'Completing import...'); + callback.defer(10); + } + } + + function nextTask(tasks, index, lists, listIndex){ + if(index < tasks.length){ + Ext.Msg.updateProgress( + getProgress(++visibleIndex), + f('{0} of {1}', visibleIndex, taskCount) + ); + loadTasks.defer(250, window, [tasks, index, lists, listIndex]); + } + else { + loadLists(lists, ++listIndex); + } + } + + function loadTasks(tasks, index, lists, listIndex){ + taskTable.save(tasks[index].attributes); + nextTask(tasks, ++index, lists, listIndex); + } + + readFile.defer(10); + } + + this.doImport = function(callback){ + chooseFile(callback); + } +}; Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListLoader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListLoader.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListLoader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,52 @@ +ListLoader = function(config){ + Ext.apply(this, config); +}; + +Ext.extend(ListLoader, Ext.util.Observable, { + keyAttribute: 'id', + keyField: 'parentId', + + load: function(node, callback){ + var key = this.keyField; + var v = node.attributes[this.keyAttribute]; + var rs = this.store.queryBy(function(r){ + return r.data[key] === v; + }); + node.beginUpdate(); + for (var i = 0, d = rs.items, len = d.length; i < len; i++) { + var n = this.createNode(d[i]); + if (n) { + node.appendChild(n); + } + } + node.endUpdate(); + if(typeof callback == "function"){ + callback(this, node); + } + }, + + createNode : function(record){ + var d = record.data, n; + if(d.isFolder){ + n = new Ext.tree.AsyncTreeNode({ + loader: this, + id: record.id, + text: d.listName, + leaf: false, + iconCls: 'icon-folder', + editable: true, + expanded: true, + isFolder: true + }); + }else{ + n = new Ext.tree.TreeNode({ + id: record.id, + text: d.listName, + leaf: true, + iconCls: 'icon-list', + editable: true + }); + } + return n; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListSelector.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListSelector.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListSelector.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,52 @@ +// Implementation class for created the tree powered form field +ListSelector = Ext.extend(Ext.ux.TreeSelector, { + maxHeight:200, + listenForLoad: false, + initComponent : function(){ + + this.tree = new Ext.tree.TreePanel({ + animate:false, + border:false, + width: this.treeWidth || 180, + autoScroll:true, + useArrows:true, + selModel: new Ext.tree.ActivationModel(), + loader : new ListLoader({store: this.store}) + }); + + var root = new Ext.tree.AsyncTreeNode({ + text: 'All Lists', + id: 'root', + leaf: false, + iconCls: 'icon-folder', + expanded: true, + isFolder: true + }); + this.tree.setRootNode(root); + + this.tree.on('render', function(){ + this.store.bindTree(this.tree); + }, this); + + ListSelector.superclass.initComponent.call(this); + + // selecting folders is not allowed, so filter them + this.tree.getSelectionModel().on('beforeselect', this.beforeSelection, this); + + // if being rendered before the store is loaded, reload when it is loaded + if(this.listenForLoad) { + this.store.on('load', function(){ + root.reload(); + }, this, { + single: true + }); + } + }, + + beforeSelection : function(tree, node){ + if(node && node.attributes.isFolder){ + node.toggle(); + return false; + } + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,108 @@ + +tx.data.ListStore = Ext.extend(Ext.data.Store, { + constructor: function(){ + tx.data.ListStore.superclass.constructor.call(this, { + sortInfo:{field: 'listName', direction: "ASC"}, + reader: new Ext.data.JsonReader({ + id: 'listId', + fields: tx.data.List + }) + }); + this.boundTrees = {}; + this.conn = tx.data.conn; + this.proxy = new Ext.sql.Proxy(tx.data.conn, 'list', 'listId', this); + }, + + getName : function(id){ + var l = this.data.map[id]; + return l ? l.data.listName : ''; + }, + + addList : function(name, id, isFolder, parentId){ + var l = this.findList(name); + if(!l){ + var id = id || Ext.uniqueId(); + l = new tx.data.List({listId: id, listName: name, isFolder: isFolder === true, parentId: parentId || 'root'}, id); + this.add(l); + } + return l; + }, + + newList : function(isFolder, parentId){ + var i = 1; + var text = isFolder ? 'New Folder ' : 'New List '; + while(this.findList(text + i)){ + i++; + } + return this.addList(text + i, undefined, isFolder, parentId); + }, + + findList : function(name){ + var d = this.data; + for(var i = 0, len = d.length; i < len; i++){ + if(d.items[i].data.listName === name){ + return d.items[i]; + } + } + return null; + }, + + loadDemoLists: function(){ + this.addList('Personal', 'personal', true, 'root'); + this.addList('Family', 'family', false, 'personal'); + this.addList('Bills', 'bills', false, 'personal'); + this.addList('Fun', 'fun', false, 'personal'); + this.addList('Other Stuff', 'personal-misc', false, 'personal'); + this.addList('Work', 'work', true, 'root'); + this.addList('Ext 2.x', 'ext2', false, 'work'); + this.addList('Ext 1.x', 'ext1', false, 'work'); + this.addList('Meetings', 'meetings', false, 'work'); + this.addList('Miscellaneous', 'work-misc', false, 'work'); + }, + + bindTree : function(tree){ + this.boundTrees[tree.id] = { + add: function(ls, records){ + var pnode = tree.getNodeById(records[0].data.parentId); + if(pnode){ + pnode.reload(); + } + }, + + remove: function(ls, record){ + var node = tree.getNodeById(record.id); + if(node && node.parentNode){ + node.parentNode.removeChild(node); + } + }, + + update: function(ls, record){ + var node = tree.getNodeById(record.id); + if(node){ + node.setText(record.data.listName); + } + } + }; + + this.on(this.boundTrees[tree.id]); + }, + + unbindTree : function(tree){ + var h = this.boundTrees[tree.id]; + if (h) { + this.un('add', h.add); + this.un('remove', h.remove); + this.un('update', h.update); + } + }, + + prepareTable : function(){ + try{ + this.createTable({ + name: 'list', + key: 'listId', + fields: tx.data.List.prototype.fields + }); + }catch(e){console.log(e);} + } +}); Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListTree.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListTree.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ListTree.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,172 @@ +ListTree = function(config){ + ListTree.superclass.constructor.call(this, Ext.apply({ + id:'list-tree', + animate:false, + //rootVisible:false, + region:'west', + width:200, + split:true, + title:'My Lists', + autoScroll:true, + margins: '3 0 3 3', + cmargins: '3 3 3 3', + useArrows:true, + collapsible:true, + minWidth:120 + }, config)); + + this.on('contextmenu', this.onContextMenu, this); +} +Ext.extend(ListTree, Ext.tree.TreePanel, { + + initComponent : function(){ + this.bbar = [ + tx.actions.newList, + tx.actions.deleteList, + '-', + tx.actions.newFolder, + tx.actions.deleteFolder + ]; + + this.loader = new ListLoader({ + store: tx.data.lists + }); + ListTree.superclass.initComponent.call(this); + + var root = new Ext.tree.AsyncTreeNode({ + text: 'All Lists', + id: 'root', + leaf: false, + iconCls: 'icon-folder', + expanded: true, + isFolder: true, + editable: false + }); + this.setRootNode(root); + + this.editor = new Ext.tree.TreeEditor(this, { + allowBlank:false, + blankText:'A name is required', + selectOnFocus:true + }); + this.editor.shadow = false; + + this.editor.on('beforecomplete', function(ed, value, startValue){ + var node = ed.editNode; + value = Ext.util.Format.htmlEncode(value); + var r = this.store.getById(node.id); + r.set('listName', value); + //ed.editing = false; + //ed.hide(); + //return false; + }, this); + + this.sorter = new Ext.tree.TreeSorter(this, { + folderSort: true + }); + }, + + getActiveFolderId : function(){ + var sm = this.selModel; + var n = sm.getSelectedNode(); + if(n){ + return n.attributes.isFolder ? n.id : n.attributes.parentId; + } + return 'root'; + }, + + onContextMenu : function(node, e){ + if(!this.menu){ // create context menu on first right click + this.menu = new Ext.menu.Menu({ + id:'lists-ctx', + listWidth: 200, + items: [{ + iconCls:'icon-edit', + text:'New Task', + scope: this, + handler:function(){ + this.ctxNode.select(); + tx.actions.newTask.execute(); + } + },{ + iconCls:'icon-list-new', + text:'New List', + scope: this, + handler:function(){ + this.ctxNode.select(); + tx.actions.newList.execute(); + } + },{ + iconCls:'icon-folder-new', + text:'New Folder', + scope: this, + handler:function(){ + this.ctxNode.select(); + tx.actions.newFolder.execute(); + } + },'-',{ + text:'Delete', + iconCls:'icon-list-delete', + scope: this, + handler:function(){ + this.removeList(this.ctxNode); + } + }] + }); + this.menu.on('hide', this.onContextHide, this); + } + if(this.ctxNode){ + this.ctxNode.ui.removeClass('x-node-ctx'); + this.ctxNode = null; + } + this.ctxNode = node; + this.ctxNode.ui.addClass('x-node-ctx'); + + this.menu.items.get(1).setVisible(!!node.attributes.isFolder); + this.menu.items.get(2).setVisible(!!node.attributes.isFolder); + this.menu.items.get(0).setVisible(!node.attributes.isFolder); + + this.menu.showAt(e.getXY()); + }, + + onContextHide : function(){ + if(this.ctxNode){ + this.ctxNode.ui.removeClass('x-node-ctx'); + this.ctxNode = null; + } + }, + + startEdit : function(node, select){ + if(typeof node == 'string'){ + node = this.getNodeById(node); + } + if(select === true){ + node.select(); + } + var ed = this.editor; + setTimeout(function(){ + ed.editNode = node; + ed.startEdit(node.ui.textNode); + }, 10); + }, + + removeList : function(s){ + if (s && s.attributes.editable) { + Ext.Msg.confirm('Confirm', 'Are you sure you want to delete "' + Ext.util.Format.htmlEncode(s.text) + '"?', function(btn){ + if (btn == 'yes') { + if (s.nextSibling) { + s.nextSibling.select(); + } + else + if (s.previousSibling) { + s.previousSibling.select(); + } + s.parentNode.removeChild(s); + tx.data.lists.remove(this.store.getById(s.id)); + tx.data.tasks.removeList(s.id); + } + }, this); + } + } +}); + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Reminder.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Reminder.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Reminder.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,31 @@ +tx.ReminderManager = function(){ + var table; + + var run = function(){ + var rs = table.selectBy('where completed = 0 AND reminder <> \'\' AND reminder <= ?', [new Date()]); + for(var i = 0, len = rs.length; i < len; i++){ + showReminder.defer(10, window, [rs[i]]); + } + }; + + var showReminder = function(task){ + var o; + if (o = tx.data.tasks.getById(task.taskId)) { // if currently loaded + o.set('reminder', ''); + } + else { // else update db directly + table.update({ + taskId: task.taskId, + reminder: '' + }); + } + Ext.air.NativeWindowManager.getReminderWindow(task.taskId); + } + + return { + init : function(){ + table = tx.data.conn.getTable('task', 'taskId'); + setInterval(run, 10000); + } + } +}(); Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SelectBox.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SelectBox.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SelectBox.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,191 @@ +/** + * 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; + } + } + +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SwitchButton.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SwitchButton.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/SwitchButton.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,89 @@ +Ext.SwitchButton = Ext.extend(Ext.Component, { + initComponent : function(){ + Ext.SwitchButton.superclass.initComponent.call(this); + + var mc = new Ext.util.MixedCollection(); + mc.addAll(this.items); + this.items = mc; + + this.addEvents('change'); + + if(this.handler){ + this.on('change', this.handler, this.scope || this); + } + }, + + onRender : function(ct, position){ + + var el = document.createElement('table'); + el.cellSpacing = 0; + el.className = 'x-rbtn'; + el.id = this.id; + + var row = document.createElement('tr'); + el.appendChild(row); + + var count = this.items.length; + var last = count - 1; + this.activeItem = this.items.get(this.activeItem); + + for(var i = 0; i < count; i++){ + var item = this.items.itemAt(i); + + var cell = row.appendChild(document.createElement('td')); + cell.id = this.id + '-rbi-' + i; + + var cls = i == 0 ? 'x-rbtn-first' : (i == last ? 'x-rbtn-last' : 'x-rbtn-item'); + item.baseCls = cls; + + if(this.activeItem == item){ + cls += '-active'; + } + cell.className = cls; + + var button = document.createElement('button'); + button.innerHTML = ' '; + button.className = item.iconCls; + button.qtip = item.tooltip; + + cell.appendChild(button); + + item.cell = cell; + } + + this.el = Ext.get(ct.dom.appendChild(el)); + + this.el.on('click', this.onClick, this); + }, + + getActiveItem : function(){ + return this.activeItem; + }, + + setActiveItem : function(item){ + if(typeof item != 'object' && item !== null){ + item = this.items.get(item); + } + var current = this.getActiveItem(); + if(item != current){ + if(current){ + Ext.fly(current.cell).removeClass(current.baseCls + '-active'); + } + if(item) { + Ext.fly(item.cell).addClass(item.baseCls + '-active'); + } + this.activeItem = item; + this.fireEvent('change', this, item); + } + return item; + }, + + onClick : function(e){ + var target = e.getTarget('td', 2); + if(!this.disabled && target){ + this.setActiveItem(parseInt(target.id.split('-rbi-')[1], 10)); + } + } +}); + +Ext.reg('switch', Ext.SwitchButton); Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskGrid.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskGrid.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskGrid.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,241 @@ +TaskGrid = function(){ + + // custom columns + var completeColumn = new CompleteColumn(); + var reminderColumn = new ReminderColumn(); + + TaskGrid.superclass.constructor.call(this, { + id:'tasks-grid', + store: tx.data.tasks, + sm: new Ext.grid.RowSelectionModel({moveEditorOnEnter: false}), + clicksToEdit: 'auto', + enableColumnHide:false, + enableColumnMove:false, + autoEncode: true, + title:'All Tasks', + iconCls:'icon-folder', + region:'center', + plugins: [completeColumn, reminderColumn], + margins:'3 3 3 0', + columns: [ + completeColumn, + { + header: "Task", + width:400, + sortable: true, + dataIndex: 'title', + id:'task-title', + editor: new Ext.form.TextField({ + allowBlank: false + }) + }, + { + header: "List", + width:150, + sortable: true, + dataIndex: 'listId', + editor: new ListSelector({ + store:tx.data.lists + }), + renderer : function(v){ + return tx.data.lists.getName(v); + } + }, + { + id:'dueDate', + header: "Due Date", + width: 150, + sortable: true, + renderer: Ext.util.Format.dateRenderer('D m/d/Y'), + dataIndex: 'dueDate', + groupRenderer: Ext.util.Format.createTextDateRenderer(), + groupName: 'Due', + editor: new Ext.form.DateField({ + format : "m/d/Y" + }) + }, + reminderColumn + ], + + view: new TaskView() + }); + + // Keep the visible date groups in the grid accurate + Ext.TaskMgr.start({ + run: function(){ + var col = this.getColumnModel().getColumnById('dueDate'); + if(col.groupRenderer.date.getTime() != new Date().clearTime().getTime()){ + col.groupRenderer = Ext.util.Format.createTextDateRenderer(); + tx.data.tasks.applyGrouping(); + } + }, + interval: 60000, + scope: this + }); + + this.on('rowcontextmenu', this.onRowContext, this); +}; + +Ext.extend(TaskGrid, Ext.grid.EditorGridPanel, { + onCellDblClick: function(g, row){ + clearTimeout(this.autoEditTimer); // allow dbl click without starting edit + var id = this.store.getAt(row).id; + + Ext.air.NativeWindowManager.getTaskWindow(id); + }, + + // private + onAutoEditClick : function(e, t){ + clearTimeout(this.autoEditTimer); + if(e.button !== 0){ + return; + } + var row = this.view.findRowIndex(t); + var col = this.view.findCellIndex(t); + if(row !== false && col !== false){ + if(this.selModel.isSelected(row) && this.selModel.getCount() === 1){ + this.autoEditTimer = this.startEditing.defer(300, this, [row, col]); + } + } + }, + + onRowContext : function(grid, row, e){ + if(!this.menu){ // create context menu on first right click + this.menu = new Ext.menu.Menu({ + id:'tasks-ctx', + listWidth: 200, + items: [{ + text:'Open', + scope: this, + handler:function(){ + Ext.each(this.selModel.getSelections(), function(r){ + Ext.air.NativeWindowManager.getTaskWindow(r.id); + }); + } + },'-', + tx.actions.complete, + tx.actions.deleteTask + ] + }); + } + if(!this.selModel.isSelected(row)){ + this.selModel.selectRow(row); + } + + this.menu.showAt(e.getXY()); + } +}) + + +TaskView = Ext.extend(Ext.grid.GroupingView, { + forceFit:true, + ignoreAdd: true, + emptyText: 'There are no tasks to show in this list.', + + templates: { + header: Templates.gridHeader + }, + getRowClass : function(r){ + var d = r.data; + if(d.completed){ + return 'task-completed'; + } + if(d.dueDate && d.dueDate.getTime() < new Date().clearTime().getTime()){ + return 'task-overdue'; + } + return ''; + } +}); + + +TaskHeader = function(grid){ + grid.on('resize', syncFields); + grid.on('columnresize', syncFields); + + // The fields in the grid's header + var ntTitle = this.ntTitle = new Ext.form.TextField({ + renderTo: 'new-task-title', + emptyText: 'Add a task...' + }); + + var ntCat = new ListSelector({ + renderTo: 'new-task-cat', + disabled:true, + store:tx.data.lists, + listenForLoad: true + }); + + var ntDue = new Ext.form.DateField({ + renderTo: 'new-task-due', + value: new Date(), + disabled:true, + format : "m/d/Y" + }); + + // syncs the header fields' widths with the grid column widths + function syncFields(){ + var cm = grid.getColumnModel(); + ntTitle.setSize(cm.getColumnWidth(1)-2); + ntCat.setSize(cm.getColumnWidth(2)-4); + ntDue.setSize(cm.getColumnWidth(3)-4); + } + syncFields(); + + var editing = false, focused = false, userTriggered = false; + var handlers = { + focus: function(){ + setFocus.defer(20, window, [true]); + }, + blur: function(){ + focused = false; + doBlur.defer(250); + }, + specialkey: function(f, e){ + if(e.getKey()==e.ENTER && (!f.isExpanded || !f.isExpanded())){ + userTriggered = true; + e.stopEvent(); + f.el.blur(); + if(f.triggerBlur){ + f.triggerBlur(); + } + } + } + } + ntTitle.on(handlers); + ntCat.on(handlers); + ntDue.on(handlers); + + ntTitle.on('focus', function(){ + focused = true; + if(!editing){ + ntCat.enable(); + ntDue.enable(); + syncFields(); + editing = true; + + ntCat.setValue(tx.data.getActiveListId()); + } + }); + + function setFocus(v){ + focused = v; + } + // when a field in the add bar is blurred, this determines + // whether a new task should be created + function doBlur(){ + if(editing && !focused){ + var title = ntTitle.getValue(); + if(!Ext.isEmpty(title)){ + tx.data.tasks.createTask(title, ntCat.getRawValue(), ntDue.getValue()); + ntTitle.setValue(''); + if(userTriggered){ // if they entered to add the task, then go to a new add automatically + userTriggered = false; + ntTitle.focus.defer(100, ntTitle); + } + } + ntCat.disable(); + ntDue.disable(); + editing = false; + } + } +}; Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,164 @@ + +tx.data.TaskStore = Ext.extend(Ext.data.GroupingStore, { + constructor: function(){ + tx.data.TaskStore.superclass.constructor.call(this, { + sortInfo:{field: 'dueDate', direction: "ASC"}, + groupField:'dueDate', + taskFilter: 'all', + reader: new Ext.data.JsonReader({ + id: 'taskId', + fields: tx.data.Task + }) + }); + this.conn = tx.data.conn; + this.proxy = new Ext.sql.Proxy(tx.data.conn, 'task', 'taskId', this); + }, + + applyFilter : function(filter){ + if(filter !== undefined){ + this.taskFilter = filter; + } + var value = this.taskFilter; + if(value == 'all'){ + return this.clearFilter(); + } + return this.filterBy(function(item){ + return item.data.completed === value; + }); + }, + + addTask : function(data){ + this.suspendEvents(); + this.clearFilter(); + this.resumeEvents(); + this.loadData([data], true); + this.suspendEvents(); + this.applyFilter(); + this.applyGrouping(true); + this.resumeEvents(); + this.fireEvent('datachanged', this); + }, + + loadList: function(listId){ + var multi = Ext.isArray(listId); + this.activeList = multi ? listId[0] : listId; + this.suspendEvents(); + if(multi){ + var ps = []; + for(var i = 0, len = listId.length; i < len; i++){ + ps.push('?'); + } + this.load({ + params: { + where: 'where listId in (' + ps.join(',') + ')', + args: listId + } + }); + }else{ + this.load({params: { + where: 'where listId = ?', + args: [listId] + }}); + } + this.applyFilter(); + this.applyGrouping(true); + this.resumeEvents(); + this.fireEvent('datachanged', this); + }, + + removeList: function(listId){ + this.conn.execBy('delete from task where listId = ?', [listId]); + this.reload(); + }, + + prepareTable : function(){ + try{ + this.createTable({ + name: 'task', + key: 'taskId', + fields: tx.data.Task.prototype.fields + }); + }catch(e){console.log(e);} + }, + + createTask : function(title, listText, dueDate, description, completed){ + if(!Ext.isEmpty(title)){ + var listId = ''; + if(!Ext.isEmpty(listText)){ + listId = tx.data.lists.addList(Ext.util.Format.htmlEncode(listText)).id; + }else{ + listId = tx.data.lists.newList(false).id; + } + this.addTask({ + taskId: Ext.uniqueId(), + title: Ext.util.Format.htmlEncode(title), + dueDate: dueDate||'', + description: description||'', + listId: listId, + completed: completed || false + }); + } + }, + + afterEdit : function(r){ + if(r.isModified(this.getGroupState())){ + this.applyGrouping(); + } + //workaround WebKit cross-frame date issue + fixDateMember(r.data, 'completedDate'); + fixDateMember(r.data, 'reminder'); + fixDateMember(r.data, 'dueDate'); + if(r.isModified('completed')){ + r.editing = true; + r.set('completedDate', r.data.completed ? new Date() : ''); + r.editing = false; + } + tx.data.TaskStore.superclass.afterEdit.apply(this, arguments); + }, + + init : function(){ + tx.data.lists.load(); + this.load({ + callback: function(){ + // first time? + if(this.getCount() < 1){ + Ext.Msg.confirm('Create Tasks?', 'Your database is currently empty. Would you like to insert some demo data?', + function(btn){ + if(btn == 'yes'){ + tx.data.lists.loadDemoLists(); + this.loadDemoTasks(); + } + }, this); + } + }, + scope: this + }); + }, + + lookup : function(id){ + var task; + if(task = this.getById(id)){ + return task; + } + var data = this.proxy.table.lookup(id); + if (data) { + var result = this.reader.readRecords([data]); + return result.records[0]; + } + return null; + }, + + /* This is used to laod some demo tasks if the task database is empty */ + loadDemoTasks: function(){ + var s = new Date(); + // hardcoded demo tasks + this.addTask({taskId: Ext.uniqueId(), title:'Update Ext 2.0 documentation', listId:'ext2', description:'', dueDate: s.add('d', 21), completed: false, reminder: ''}); + this.addTask({taskId: Ext.uniqueId(), title:'Release Ext 2.l Beta 1', listId:'ext2', description:'', dueDate:s.add('d', 2), completed: false, reminder: s.add('d', 2).clearTime(true).add('h', 9)}); + this.addTask({taskId: Ext.uniqueId(), title:'Take wife to see movie', listId:'family', description:'', dueDate:s.add('d', 2), completed: false, reminder: ''}); + this.addTask({taskId: Ext.uniqueId(), title:'Finish Simple Tasks v2 sample app', listId:'ext2', description:'', dueDate:s.add('d', 2), completed: false, reminder: ''}); + this.addTask({taskId: Ext.uniqueId(), title:'Do something other than work', listId:'fun', description:'', dueDate:s.add('d', -1), completed: false, reminder: ''}); + this.addTask({taskId: Ext.uniqueId(), title:'Go to the grocery store', listId:'family', description:'', dueDate:s.add('d', -1), completed: true, reminder: '', completedDate: new Date()}); + this.addTask({taskId: Ext.uniqueId(), title:'Reboot my computer', listId:'personal-misc', description:'', dueDate:s, completed: false, reminder: ''}); + this.addTask({taskId: Ext.uniqueId(), title:'Respond to emails', listId:'work-misc', description:'', dueDate:s, completed: true, reminder: '', completedDate: new Date()}); + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskWindow.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskWindow.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TaskWindow.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,65 @@ +Ext.air.NativeWindowManager.getTaskWindow = function(taskId){ + var win, winId = 'task' + taskId; + if(win = this.get(winId)) { + win.instance.orderToFront(); + } else { + win = new Ext.air.NativeWindow({ + id: winId, + file: 'task.html?taskId=' + taskId, + width: 500, + height:350 + }); + } + return win; +} + +Ext.air.NativeWindowManager.getReminderWindow = function(taskId){ + var win, winId = 'reminder' + taskId; + if(win = this.get(winId)) { + win.instance.orderToFront(); + } else { + win = new Ext.air.NativeWindow({ + id: winId, + file: 'reminder.html?taskId=' + taskId, + width:400, + height:140, + maximizable: false, + resizable: false + }); + } + return win; +} + +Ext.air.NativeWindowManager.getAboutWindow = function(){ + var win, winId = 'about'; + if(win = this.get(winId)) { + win.instance.orderToFront(); + } else { + win = new Ext.air.NativeWindow({ + id: winId, + file: 'about.html', + width:350, + height:300, + resizable: false, + type:'utility' + }); + } + return win; +} + +Ext.air.NativeWindowManager.getPrefWindow = function(){ + var win, winId = 'prefs'; + if(win = this.get(winId)) { + win.instance.orderToFront(); + } else { + win = new Ext.air.NativeWindow({ + id: winId, + file: 'preferences.html', + width:240, + height:150, + resizable: false, + type:'utility' + }); + } + return win; +} Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Templates.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Templates.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/Templates.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,21 @@ +// In AIR, XTemplates must be created at load time +Templates = { + categoryCombo: new Ext.XTemplate( + '<tpl for="."><div class="x-combo-list-item">{listName}</div></tpl>' + ), + timeField: new Ext.XTemplate( + '<tpl for="."><div class="x-combo-list-item">{text}</div></tpl>' + ), + + gridHeader : new Ext.Template( + '<table border="0" cellspacing="0" cellpadding="0" style="{tstyle}">', + '<thead><tr class="x-grid3-hd-row">{cells}</tr></thead>', + '<tbody><tr class="new-task-row">', + '<td><div id="new-task-icon"></div></td>', + '<td><div class="x-small-editor" id="new-task-title"></div></td>', + '<td><div class="x-small-editor" id="new-task-cat"></div></td>', + '<td><div class="x-small-editor" id="new-task-due"></div></td>', + '</tr></tbody>', + "</table>" + ) +}; Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TextDate.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TextDate.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TextDate.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,45 @@ +// generates a renderer function to be used for textual date groups +Ext.util.Format.createTextDateRenderer = function(){ + // create the cache of ranges to be reused + var today = new Date().clearTime(true); + var year = today.getFullYear(); + var todayTime = today.getTime(); + var yesterday = today.add('d', -1).getTime(); + var tomorrow = today.add('d', 1).getTime(); + var weekDays = today.add('d', 6).getTime(); + var lastWeekDays = today.add('d', -6).getTime(); + + var weekAgo1 = today.add('d', -13).getTime(); + var weekAgo2 = today.add('d', -20).getTime(); + var weekAgo3 = today.add('d', -27).getTime(); + + var f = function(date){ + if(!date) { + return '(No Date)'; + } + var notime = date.clearTime(true).getTime(); + + if (notime == todayTime) { + return 'Today'; + } + if(notime > todayTime){ + if (notime == tomorrow) { + return 'Tomorrow'; + } + if (notime <= weekDays) { + return date.format('l'); + } + }else { + if(notime == yesterday) { + return 'Yesterday'; + } + if(notime >= lastWeekDays) { + return 'Last ' + date.format('l'); + } + } + return date.getFullYear() == year ? date.format('D m/d') : date.format('D m/d/Y'); + }; + + f.date = today; + return f; +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TreeSelector.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TreeSelector.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/TreeSelector.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,282 @@ +// custom menu item to contain Ext trees +Ext.menu.TreeItem = Ext.extend(Ext.menu.Adapter, { + constructor : function(config){ + Ext.menu.TreeItem.superclass.constructor.call(this, config.tree, config); + this.tree = this.component; + this.addEvents('selectionchange'); + + this.tree.on("render", function(tree){ + tree.body.swallowEvent(['click','keydown', 'keypress', 'keyup']); + }); + + this.tree.getSelectionModel().on("selectionchange", this.onSelect, this); + }, + + onSelect : function(tree, sel){ + this.fireEvent("select", this, sel, tree); + } +}); + + +// custom menu containing a single tree +Ext.menu.TreeMenu = Ext.extend(Ext.menu.Menu, { + cls:'x-tree-menu', + keyNav: true, + hideOnClick:false, + plain: true, + + constructor : function(config){ + Ext.menu.TreeMenu.superclass.constructor.call(this, config); + this.treeItem = new Ext.menu.TreeItem(config); + this.add(this.treeItem); + + this.tree = this.treeItem.tree; + this.tree.on('click', this.onNodeClick, this); + this.relayEvents(this.treeItem, ["selectionchange"]); + }, + + // private + beforeDestroy : function() { + this.tree.destroy(); + }, + + onNodeClick : function(node, e){ + if(!node.attributes.isFolder){ + this.treeItem.handleClick(e); + } + } +}); + + +// custom form field for displaying a tree, similar to select or combo +Ext.ux.TreeSelector = Ext.extend(Ext.form.TriggerField, { + initComponent : function(){ + Ext.ux.TreeSelector.superclass.initComponent.call(this); + this.addEvents('selectionchange'); + + this.tree.getSelectionModel().on('selectionchange', this.onSelection, this); + this.tree.on({ + 'expandnode': this.sync, + 'collapsenode' : this.sync, + 'append' : this.sync, + 'remove' : this.sync, + 'insert' : this.sync, + scope: this + }); + this.on('focus', this.onTriggerClick, this); + }, + + sync : function(){ + if(this.menu && this.menu.isVisible()){ + if(this.tree.body.getHeight() > this.maxHeight){ + this.tree.body.setHeight(this.maxHeight); + this.restricted = true; + }else if(this.restricted && this.tree.body.dom.firstChild.offsetHeight < this.maxHeight){ + this.tree.body.setHeight(''); + this.restricted = false; + } + this.menu.el.sync(); + } + }, + + onSelection : function(tree, node){ + if(!node){ + this.setRawValue(''); + }else{ + this.setRawValue(node.text); + } + }, + + initEvents : function(){ + Ext.ux.TreeSelector.superclass.initEvents.call(this); + this.el.on('mousedown', this.onTriggerClick, this); + this.el.on("keydown", this.onKeyDown, this); + }, + + onKeyDown : function(e){ + if(e.getKey() == e.DOWN){ + this.onTriggerClick(); + } + }, + + validateBlur : function(){ + return !this.menu || !this.menu.isVisible(); + }, + + getValue : function(){ + var sm = this.tree.getSelectionModel(); + var s = sm.getSelectedNode(); + return s ? s.id : ''; + }, + + setValue : function(id){ + var n = this.tree.getNodeById(id); + if(n){ + n.select(); + }else{ + this.tree.getSelectionModel().clearSelections(); + } + }, + + // private + onDestroy : function(){ + if(this.menu) { + this.menu.destroy(); + } + if(this.wrap){ + this.wrap.remove(); + } + Ext.ux.TreeSelector.superclass.onDestroy.call(this); + }, + + // private + menuListeners : { + show : function(){ // retain focus styling + this.onFocus(); + }, + hide : function(){ + this.focus.defer(10, this); + var ml = this.menuListeners; + this.menu.un("show", ml.show, this); + this.menu.un("hide", ml.hide, this); + } + }, + + onTriggerClick : function(){ + if(this.disabled){ + return; + } + this.menu.on(Ext.apply({}, this.menuListeners, { + scope:this + })); + + this.menu.show(this.el, "tl-bl?"); + this.sync(); + var sm = this.tree.getSelectionModel(); + var selected = sm.getSelectedNode(); + if(selected){ + selected.ensureVisible(); + sm.activate.defer(250, sm, [selected]); + } + }, + + beforeBlur : function(){ + // + }, + + onRender : function(){ + Ext.ux.TreeSelector.superclass.onRender.apply(this, arguments); + this.menu = new Ext.menu.TreeMenu(Ext.apply(this.menuConfig || {}, {tree: this.tree})); + this.menu.render(); + + this.tree.body.addClass('x-tree-selector'); + }, + + readOnly: true +}); + +/* + * Custom tree keyboard navigation that supports node navigation without selection + */ +Ext.tree.ActivationModel = Ext.extend(Ext.tree.DefaultSelectionModel, { + select : function(node){ + return this.activate(Ext.tree.ActivationModel.superclass.select.call(this, node)); + }, + + activate : function(node){ + if(!node){ + return; + } + if(this.activated != node) { + if(this.activated){ + this.activated.ui.removeClass('x-tree-activated'); + } + this.activated = node; + node.ui.addClass('x-tree-activated'); + } + node.ui.focus(); + return node; + }, + + activatePrevious : function(){ + var s = this.activated; + if(!s){ + return null; + } + var ps = s.previousSibling; + if(ps){ + if(!ps.isExpanded() || ps.childNodes.length < 1){ + return this.activate(ps); + } else{ + var lc = ps.lastChild; + while(lc && lc.isExpanded() && lc.childNodes.length > 0){ + lc = lc.lastChild; + } + return this.activate(lc); + } + } else if(s.parentNode && (this.tree.rootVisible || !s.parentNode.isRoot)){ + return this.activate(s.parentNode); + } + return null; + }, + + activateNext : function(){ + var s = this.activated; + if(!s){ + return null; + } + if(s.firstChild && s.isExpanded()){ + return this.activate(s.firstChild); + }else if(s.nextSibling){ + return this.activate(s.nextSibling); + }else if(s.parentNode){ + var newS = null; + s.parentNode.bubble(function(){ + if(this.nextSibling){ + newS = this.getOwnerTree().selModel.activate(this.nextSibling); + return false; + } + }); + return newS; + } + return null; + }, + + onKeyDown : function(e){ + var s = this.activated; + // undesirable, but required + var sm = this; + if(!s){ + return; + } + var k = e.getKey(); + switch(k){ + case e.DOWN: + e.stopEvent(); + this.activateNext(); + break; + case e.UP: + e.stopEvent(); + this.activatePrevious(); + break; + case e.RIGHT: + e.preventDefault(); + if(s.hasChildNodes()){ + if(!s.isExpanded()){ + s.expand(); + }else if(s.firstChild){ + this.activate(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.activate(s.parentNode, e); + } + break; + }; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/columns.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/columns.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/columns.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,159 @@ +// Grid column plugin that does the complete/active button in the left-most column +CompleteColumn = function(){ + var grid; + + function getRecord(t){ + var index = grid.getView().findRowIndex(t); + return grid.store.getAt(index); + } + + function onMouseDown(e, t){ + if(Ext.fly(t).hasClass('task-check')){ + e.stopEvent(); + var record = getRecord(t); + record.set('completed', !record.data.completed); + grid.store.applyFilter(); + } + } + + function onMouseOver(e, t){ + if(Ext.fly(t).hasClass('task-check')){ + Ext.fly(t.parentNode).addClass('task-check-over'); + } + } + + function onMouseOut(e, t){ + if(Ext.fly(t).hasClass('task-check')){ + Ext.fly(t.parentNode).removeClass('task-check-over'); + } + } + + Ext.apply(this, { + width: 22, + header: '<div class="task-col-hd"></div>', + fixed: true, + menuDisabled: true, + id: 'task-col', + renderer: function(){ + return '<div class="task-check"></div>'; + }, + init : function(xg){ + grid = xg; + grid.on('render', function(){ + var view = grid.getView(); + view.mainBody.on('mousedown', onMouseDown); + view.mainBody.on('mouseover', onMouseOver); + view.mainBody.on('mouseout', onMouseOut); + }); + } + }); +}; + + +ReminderColumn = function(){ + var grid, menu, record; + + function getRecord(t){ + var index = grid.getView().findRowIndex(t); + return grid.store.getAt(index); + } + + function onMenuCheck(item){ + if(item.reminder === false){ + record.set('reminder', ''); + }else{ + var s = record.data.dueDate ? record.data.dueDate.clearTime(true) : new Date().clearTime(); + s = s.add('mi', Ext.state.Manager.get('defaultReminder')); + s = s.add('mi', item.reminder*-1); + record.set('reminder', s); + } + } + + function getMenu(){ + if(!menu){ + menu = new Ext.menu.Menu({ + plain: true, + items: [{ + text: 'No Reminder', + reminder: false, + handler: onMenuCheck + },'-',{ + text: 'On the Due Date', + reminder: 0, + handler: onMenuCheck + },'-',{ + text: '1 day before', + reminder: 24*60, + handler: onMenuCheck + },{ + text: '2 days before', + reminder: 48*60, + handler: onMenuCheck + },{ + text: '3 days before', + reminder: 72*60, + handler: onMenuCheck + },{ + text: '1 week before', + reminder: 7*24*60, + handler: onMenuCheck + },{ + text: '2 weeks before', + reminder: 14*24*60, + handler: onMenuCheck + },'-',{ + text: 'Set Default Time...', + handler: function(){ + Ext.air.NativeWindowManager.getPrefWindow(); + } + }] + }); + } + return menu; + } + + function onMouseDown(e, t){ + if(Ext.fly(t).hasClass('reminder')){ + e.stopEvent(); + record = getRecord(t); + if (!record.data.completed) { + var rmenu = getMenu(); + rmenu.show(t, 'tr-br?'); + } + } + } + + function onMouseOver(e, t){ + if(Ext.fly(t).hasClass('reminder')){ + Ext.fly(t.parentNode).addClass('reminder-over'); + } + } + + function onMouseOut(e, t){ + if(Ext.fly(t).hasClass('reminder')){ + Ext.fly(t.parentNode).removeClass('reminder-over'); + } + } + + Ext.apply(this, { + width: 26, + header: '<div class="reminder-col-hd"></div>', + fixed: true, + id: 'reminder-col', + menuDisabled: true, + dataIndex:'reminder', + renderer: function(v){ + return '<div class="reminder '+(v ? 'reminder-active' : '')+'"></div>'; + }, + init : function(xg){ + grid = xg; + grid.on('render', function(){ + var view = grid.getView(); + view.mainBody.on('contextmenu', onMouseDown); + view.mainBody.on('mousedown', onMouseDown); + view.mainBody.on('mouseover', onMouseOver); + view.mainBody.on('mouseout', onMouseOut); + }); + } + }); +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/data.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/data.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/data.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,57 @@ +// Unique task ids, if the time isn't unique enough, the addition +// of random chars should be +Ext.uniqueId = function(){ + var t = String(new Date().getTime()).substr(4); + var s = 'ABCDEFGHIJKLMNOPQRSTUVWXYZ'; + for(var i = 0; i < 4; i++){ + t += s.charAt(Math.floor(Math.random()*26)); + } + return t; +} + +// Define the Task data type +tx.data.Task = Ext.data.Record.create([ + {name: 'taskId', type:'string'}, + {name: 'listId', type:'string'}, + {name: 'title', type:'string'}, + {name: 'description', type:'string'}, + {name: 'dueDate', type:'date', dateFormat: Ext.sql.Proxy.DATE_FORMAT, defaultValue: ''}, + {name: 'completed', type:'boolean'}, + {name: 'completedDate', type:'date', dateFormat: Ext.sql.Proxy.DATE_FORMAT, defaultValue: ''}, + {name: 'reminder', type:'date', dateFormat: Ext.sql.Proxy.DATE_FORMAT, defaultValue: ''} +]); + +// Define the List data type +tx.data.List = Ext.data.Record.create([ + {name: 'listId', type:'string'}, + {name: 'parentId', type:'string'}, + {name: 'listName', type:'string'}, + {name: 'isFolder', type:'boolean'} +]); + +tx.data.conn = Ext.sql.Connection.getInstance(); + +tx.data.tasks = new tx.data.TaskStore(); +tx.data.lists = new tx.data.ListStore(); + + +tx.data.getDefaultReminder = function(task){ + var s = task.data.dueDate ? task.data.dueDate.clearTime(true) : new Date().clearTime(); + s = s.add('mi', Ext.state.Manager.get('defaultReminder')); + return s; +}; + + +tx.data.getActiveListId = function(){ + var id = tx.data.tasks.activeList; + if(!id){ + var first = tx.data.lists.getAt(0); + if(first){ + id = first.id; + }else{ + id = tx.data.lists.newList().id; + } + } + return id; +}; + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ext-config.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ext-config.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/js/ext-config.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +Ext.BLANK_IMAGE_URL = 'images/s.gif'; + +tx = {data:{}, ui: {}}; + +// work around for broken cross frame Dates in Safari +function fixDate(d){ + return d ? new Date(d.getTime()) : d; +} + +function fixDateMember(o, name){ + if(o[name]){ + o[name] = new Date(o[name].getTime()); + } +} + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,339 @@ +/* + * Ext JS Library 2.0 + * Copyright(c) 2006-2007, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://www.extjs.com/license + */ +html, body { + height:100%; + margin:0; + border:0; +} +#tasks-grid .x-grid3-header { + background: #f9f9f9 url(images/hrow.gif) repeat-x left top; +} +#tasks-grid .new-task-row { + height:24px; +} +#tasks-grid .new-task-row .x-small-editor { + overflow:hidden; + width:100%; +} +#tasks-grid .new-task-row .x-small-editor input { + font-size:11px; +} +#new-task-icon { + width:16px; + height:16px; + margin-left:3px; + background: transparent url(images/edit.gif) no-repeat; +} +.x-grid3-body .x-grid3-td-task-col .x-grid3-cell-inner { + padding: 1px 0 0 0 !important; +} + +.x-grid3-body .x-grid3-td-reminder-col .x-grid3-cell-inner { + padding: 1px 0 0 0 !important; +} + +.task-check { + width:98%; + height:16px; + background: transparent url(images/check.gif) no-repeat center 0; + cursor:pointer; +} + +.task-completed .task-check { + background: transparent url(images/check.gif) no-repeat center -16px; +} + +.task-check-over { + background: transparent url(images/check.gif) no-repeat center -32px; +} + +.reminder { + width:98%; + height:16px; + background: transparent url(images/bell.png) no-repeat center -50px; +} +.reminder-active { + background-position: center 0; +} + +.task-completed .reminder { + background-image:url(images/s.gif); +} + +.reminder-over { + cursor:pointer; + background-color:#DFE8F6; +} +.task-completed .reminder-over { + cursor:default; + background-color:transparent; +} + +.task-overdue .x-grid3-cell-inner { + color:#fb223a; +} + +.task-completed .x-grid3-cell-inner { + text-decoration:line-through; + color:gray; +} + +.task-col-hd { + width:98%; + height:12px; + background: transparent url(images/hd-check.gif) no-repeat center center; + cursor:default; +} +.reminder-col-hd { + width:98%; + height:12px; + background: transparent url(images/reminder-hd.png) no-repeat center center; + cursor:default; +} + +.x-grid3-td-task-title .x-grid3-cell-inner { + white-space:normal; +} + + +.icon-show-active { + background-image:url(images/icon-show-active.gif) !important; +} +.icon-show-complete { + background-image:url(images/icon-show-complete.gif) !important; +} +.icon-show-all { + background-image:url(images/icon-show-all.gif) !important; +} +.icon-all { + background-image:url(images/icon-all.gif) !important; +} +.x-grid3-dirty-cell { + background:transparent; +} + +.icon-active { + background-image:url(images/icon-active.gif) !important; +} +.icon-complete { + background-image:url(images/icon-complete.gif) !important; +} +.icon-delete { + background-image:url(images/delete.gif) !important; +} +.icon-delete-task { + background-image:url(images/icon-delete-task.gif) !important; +} +.icon-edit { + background-image:url(images/edit.gif) !important; +} +.icon-mark-complete { + background-image:url(images/icon-mark-complete.gif) !important; +} +.icon-mark-active { + background-image:url(images/icon-mark-active.gif) !important; +} +.icon-folder { + background-image:url(images/icon-folder.gif) !important; +} +.icon-folder-new { + background-image:url(images/icon-folder-new.gif) !important; +} +.icon-folder-delete { + background-image:url(images/icon-folder-delete.gif) !important; +} +.icon-paste-new { + background-image:url(images/icon-paste-new.gif) !important; +} +.icon-list { + background-image:url(images/icon-list.gif) !important; +} +.icon-multi-list { + background-image:url(images/icon-multi-list.gif) !important; +} +.icon-list-new { + background-image:url(images/icon-list-new.gif) !important; +} +.icon-list-delete { + background-image:url(images/icon-list-delete.gif) !important; +} + +.icon-by-date { + background-image:url(images/icon-by-date.gif) !important; +} +.icon-by-category { + background-image:url(images/icon-by-category.gif) !important; +} +.icon-no-group { + background-image:url(images/icon-no-group.gif) !important; +} +.icon-save { + background-image:url(images/save.gif) !important; +} + +.icon-filter { + background-image:url(images/icon-filter.gif) !important; +} +.x-panel-trans { + background:transparent; +} + +.x-layout-split-west { + cursor:move; + width:4px; +} +.x-panel-header-text { + color:#3764A0; +} +#main-tb { + background-position:0 -1px; +} + +#list-tree .x-tool { + background-image:url(ext-2.0/resources/images/default/panel/tools-sprites-trans.gif); +} + +/*#list-tree .special-node span { + font-style:italic; +}*/ + +#list-tree .x-panel-body { + background-color:white; + position:relative; + padding:3px 1px 3px 1px; +} +#list-tree .x-tree-node-el{ + border:1px solid #fff; +} + +#list-tree .x-tree-selected { + border:1px dotted #a3bae9; + background:#DFE8F6; +} +#list-tree .x-tree-node .x-tree-selected a span{ + background:transparent; + color:#1E4176; + font-weight:bold; +} + +#list-tree .x-node-ctx { + border:1px dotted #aaa; + background:#eee; +} +/* +#list-tree .x-tree-elbow-line, #list-tree .x-tree-elbow, #list-tree .x-tree-elbow-end, #list-tree .x-tree-elbow-plus, #list-tree .x-tree-elbow-minus, #list-tree .x-tree-elbow-end-plus, #list-tree .x-tree-elbow-end-minus{ + width:4px; +}*/ + + +.x-layout-collapsed-west { + background-image:url(images/my-lists.png); + background-repeat:no-repeat; + background-position: center; +} + +.x-panel-header .x-panel-header-text { + color: #15428b; +} +.x-panel-header { + background-image:url(images/panel-header.gif); +} + + +.x-grid3:not(input) { + -khtml-user-select: none; +} +.x-tree:not(input) { + -khtml-user-select: none; +} + +.x-menu-item-icon { + background-position:center 0; +} + +.x-item-disabled .x-btn-center .x-btn-text{ + opacity: .6; +} + +.x-form-item { + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.ext-safari .x-form-field-wrap .x-form-trigger{ + height:19px; +} +.x-tree-selector .x-tree-node-el { + border:1px solid #fff; +} +.x-tree-selector .x-tree-activated { + border:1px dotted #999 !important; +} +.x-tree-menu { + padding:0 !important; +} + +.x-menu-item-active { + background: #ebf3fd; + border:1px solid #aaccf6; + padding: 0; +} +.x-panel-header { + height:16px; +} + +.x-menu-sep { + overflow:hidden; + height:1px; + margin: 1px 3px; +} +.x-rbtn { + table-layout:fixed; +} +.x-rbtn td { + width:24px; + height:21px; + background-image:url(images/rbtn.gif); + background-repeat:no-repeat; + padding:0; + vertical-align:middle; + border:0 none; +} +.x-rbtn td.x-rbtn-first { + background-position: 0 0; +} +.x-rbtn td.x-rbtn-item { + background-position: 0 -42px; +} +.x-rbtn td.x-rbtn-last { + background-position: right -21px; +} +.x-rbtn td.x-rbtn-first-active { + background-position: 0 -63px; +} +.x-rbtn td.x-rbtn-item-active { + background-position: 0 -105px; +} +.x-rbtn td.x-rbtn-last-active { + background-position: right -84px; +} +.x-rbtn button{ + background-color:transparent; + background-repeat:no-repeat; + background-position:center; + padding: 0; + margin:0; + border:0 none; + cursor:pointer; + width:24px; + height:16px; + -moz-outline:0 none; + outline:0 none; + font-size:1px; + line-height:1px; +} + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,40 @@ +<html> +<head> + <title>Simple Tasks</title> + + <link rel="stylesheet" type="text/css" href="ext-2.0/resources/css/ext-all.css" /> + <link rel="stylesheet" type="text/css" href="ext-air/resources/ext-air.css" /> + <link rel="stylesheet" type="text/css" href="main.css" /> + + <script type="text/javascript" src="adobe/AIRAliases.js"></script> + + <script type="text/javascript" src="ext-2.0/adapter/ext/ext-base.js"></script> + <script type="text/javascript" src="ext-2.0/ext-all.js"></script> + + <script type="text/javascript" src="ext-air/ext-air.js"></script> + + <script type="text/javascript" src="js/ext-config.js"></script> + <script type="text/javascript" src="js/Templates.js"></script> + <script type="text/javascript" src="js/TaskStore.js"></script> + <script type="text/javascript" src="js/ListStore.js"></script> + <script type="text/javascript" src="js/data.js"></script> + <script type="text/javascript" src="js/columns.js"></script> + <script type="text/javascript" src="js/TaskGrid.js"></script> + <script type="text/javascript" src="js/SelectBox.js"></script> + <script type="text/javascript" src="js/ListLoader.js"></script> + <script type="text/javascript" src="js/ListTree.js"></script> + <script type="text/javascript" src="js/TreeSelector.js"></script> + <script type="text/javascript" src="js/ListSelector.js"></script> + <script type="text/javascript" src="js/TaskWindow.js"></script> + <script type="text/javascript" src="js/Reminder.js"></script> + <script type="text/javascript" src="js/TextDate.js"></script> + <script type="text/javascript" src="js/SwitchButton.js"></script> + <script type="text/javascript" src="js/Importer.js"></script> + <script type="text/javascript" src="js/Exporter.js"></script> + <script type="text/javascript" src="main.js"></script> + +</head> +<body> +<span></span> +</body> +</html> Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/main.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,416 @@ +// Initialize the state provider +Ext.state.Manager.setProvider(new Ext.air.FileProvider({ + file: 'tasks.state', + // if first time running + defaultState : { + mainWindow : { + width:780, + height:580, + x:10, + y:10 + }, + defaultReminder: 480 + } +})); + +Ext.onReady(function(){ + Ext.QuickTips.init(); + + // maintain window state automatically + var win = new Ext.air.NativeWindow({ + id: 'mainWindow', + instance: window.nativeWindow, + minimizeToTray: true, + trayIcon: 'ext-air/resources/icons/extlogo16.png', + trayTip: 'Simple Tasks', + trayMenu : [{ + text: 'Open Simple Tasks', + handler: function(){ + win.activate(); + } + }, '-', { + text: 'Exit', + handler: function(){ + air.NativeApplication.nativeApplication.exit(); + } + }] + }); + + tx.data.conn.open('tasks.db'); + + var grid = new TaskGrid(); + var selections = grid.getSelectionModel(); + + + // Shared actions used by Ext toolbars, menus, etc. + var actions = { + newTask: new Ext.Action({ + text: 'New Task', + iconCls: 'icon-active', + tooltip: 'New Task', + handler: function(){ + taskHeader.ntTitle.focus(); + } + }), + + deleteTask: new Ext.Action({ + itemText: 'Delete', + iconCls: 'icon-delete-task', + tooltip: 'Delete Task', + disabled: true, + handler: function(){ + Ext.Msg.confirm('Confirm', 'Are you sure you want to delete the selected task(s)?', function(btn){ + if (btn == 'yes') { + selections.each(function(s){ + tx.data.tasks.remove(s); + }); + } + }); + } + }), + + complete: new Ext.Action({ + itemText: 'Mark Complete', + iconCls: 'icon-mark-complete', + tooltip: 'Mark Complete', + disabled: true, + handler: function(){ + selections.each(function(s){ + s.set('completed', true); + }); + tx.data.tasks.applyFilter(); + } + }), + + active: new Ext.Action({ + itemText: 'Mark Active', + tooltip: 'Mark Active', + iconCls: 'icon-mark-active', + disabled: true, + handler: function(){ + selections.each(function(s){ + s.set('completed', false); + }); + tx.data.tasks.applyFilter(); + } + }), + + newList: new Ext.Action({ + itemText: 'New List', + tooltip: 'New List', + iconCls: 'icon-list-new', + handler: function(){ + var id = tx.data.lists.newList(false, tree.getActiveFolderId()).id; + tree.startEdit(id, true); + } + }), + + deleteList: new Ext.Action({ + itemText: 'Delete', + tooltip: 'Delete List', + iconCls: 'icon-list-delete', + disabled: true, + handler: function(){ + tree.removeList(tree.getSelectionModel().getSelectedNode()); + } + }), + + newFolder: new Ext.Action({ + itemText: 'New Folder', + tooltip: 'New Folder', + iconCls: 'icon-folder-new', + handler: function(){ + var id = tx.data.lists.newList(true, tree.getActiveFolderId()).id; + tree.startEdit(id, true); + } + }), + + deleteFolder: new Ext.Action({ + itemText: 'Delete', + tooltip: 'Delete Folder', + iconCls: 'icon-folder-delete', + disabled: true, + handler: function(s){ + tree.removeList(tree.getSelectionModel().getSelectedNode()); + } + }), + + quit : new Ext.Action({ + text: 'Exit', + handler: function(){ + air.NativeApplication.nativeApplication.exit(); + } + }), + + pasteAsTask : new Ext.Action({ + itemText: 'Paste as New Task', + tooltip: 'Paste as New Task', + iconCls: 'icon-paste-new', + handler: function(){ + if(air.Clipboard.generalClipboard.hasFormat(air.ClipboardFormats.TEXT_FORMAT)){ + var text = air.Clipboard.generalClipboard.getData(air.ClipboardFormats.TEXT_FORMAT); + tx.data.tasks.addTask({ + taskId: Ext.uniqueId(), + title: Ext.util.Format.htmlEncode(text.replace(/[\n\r]/g, '')), + dueDate: new Date(), + description: '', + listId: tx.data.getActiveListId(), + completed: false, + reminder: '' + }); + }else{ + Ext.Msg.alert('Warning', 'Could not create task. The clipboard is empty.'); + } + } + }) + }; + tx.actions = actions; + + var menus = Ext.air.SystemMenu; + + menus.add('File', [ + actions.newTask, + actions.newList, + actions.newFolder, + '-',{ + text:'Import...', + handler: function(){ + var importer = new tx.Importer(); + importer.doImport(function(){ + tx.data.lists.load(); + root.reload(); + loadList('root'); + Ext.Msg.hide(); + }); + } + },{ + text:'Export...', + handler: function(){ + new tx.Exporter(); + } + }, + '-', + actions.quit + ]); + + menus.add('Edit', [ + actions.pasteAsTask + ]); + + + var viewMenu = menus.add('View', [{ + text: 'All Tasks', + checked: true, + handler: function(){ + Ext.getCmp('filter').setActiveItem(0); + } + },{ + text: 'Active Tasks', + checked: false, + handler: function(){ + Ext.getCmp('filter').setActiveItem(1); + } + },{ + text: 'Completed Tasks', + checked: false, + handler: function(){ + Ext.getCmp('filter').setActiveItem(2); + } + }]); + + menus.add('Help', [{ + text: 'About', + handler: function(){ + Ext.air.NativeWindowManager.getAboutWindow().activate(); + } + }]); + + + var tree = new ListTree({ + actions: actions, + store: tx.data.lists + }); + + var root = tree.getRootNode(); + + var listSm = tree.getSelectionModel(); + + tx.data.lists.bindTree(tree); + tx.data.lists.on('update', function(){ + tx.data.tasks.applyGrouping(); + if(grid.titleNode){ + grid.setTitle(grid.titleNode.text); + } + }); + + var tb = new Ext.Toolbar({ + region:'north', + id:'main-tb', + height:26, + items: [{ + xtype:'splitbutton', + iconCls:'icon-edit', + text:'New', + handler: actions.newTask.initialConfig.handler, + menu: [actions.newTask, actions.newList, actions.newFolder] + },'-', + actions.deleteTask, + actions.complete, + actions.active, + '-', + actions.pasteAsTask, + '->',{ + xtype:'switch', + id:'filter', + activeItem:0, + items: [{ + tooltip:'All Tasks', + filter: 'all', + iconCls:'icon-all', + menuIndex: 0 + },{ + tooltip:'Active Tasks', + filter: false, + iconCls:'icon-active', + menuIndex: 1 + },{ + tooltip:'Completed Tasks', + filter: true, + iconCls:'icon-complete', + menuIndex: 2 + }], + listeners: { + change: function(btn, item){ + tx.data.tasks.applyFilter(item.filter); + for (var i = 0; i < 3; i++) { + viewMenu.items[i].checked = item.menuIndex === i; + } + }, + delay: 10 // delay gives user instant click feedback before filtering tasks + } + }, ' ', ' ', ' ' + ] + }); + + var viewport = new Ext.Viewport({ + layout:'border', + items: [tb, tree, grid] + }); + + grid.on('keydown', function(e){ + if(e.getKey() == e.DELETE && !grid.editing){ + actions.deleteTask.execute(); + } + }); + + tree.el.on('keydown', function(e){ + if(e.getKey() == e.DELETE && !tree.editor.editing){ + actions.deleteList.execute(); + } + }); + + selections.on('selectionchange', function(sm){ + var disabled = sm.getCount() < 1; + actions.complete.setDisabled(disabled); + actions.active.setDisabled(disabled); + actions.deleteTask.setDisabled(disabled); + }); + + var taskHeader = new TaskHeader(grid); + + win.show(); + win.instance.activate(); + + tx.data.tasks.init(); + + tree.root.select(); + + var loadList = function(listId){ + var node = tree.getNodeById(listId); + if(node && !node.isSelected()){ + node.select(); + return; + } + actions.deleteList.setDisabled(!node || !node.attributes.editable); + actions.deleteFolder.setDisabled(!node || node.attributes.editable === false || !node.attributes.isFolder); + if(node){ + if (node.attributes.isFolder) { + var lists = []; + node.cascade(function(n){ + if (!n.attributes.isFolder) { + lists.push(n.attributes.id); + } + }); + tx.data.tasks.loadList(lists); + } + else { + tx.data.tasks.loadList(node.id); + } + grid.titleNode = node; + grid.setTitle(node.text); + grid.setIconClass(node.attributes.iconCls); + } + } + + listSm.on('selectionchange', function(t, node){ + loadList(node ? node.id : null); + }); + + root.reload(); + + if(Ext.state.Manager.get('defaultReminder') === undefined){ + Ext.state.Manager.set('defaultReminder', 9 * 60); // default to 9am + } + + win.on('closing', function(){ + Ext.air.NativeWindowManager.closeAll(); + }); + + tx.ReminderManager.init(); + + grid.body.on('dragover', function(e){ + if(e.hasFormat(Ext.air.DragType.TEXT)){ + e.preventDefault(); + } + }); + + grid.body.on('drop', function(e){ + if(e.hasFormat(Ext.air.DragType.TEXT)){ + var text = e.getData(Ext.air.DragType.TEXT); + try{ + // from outlook + if(text.indexOf("Subject\t") != -1){ + var tasks = text.split("\n"); + for(var i = 1, len = tasks.length; i < len; i++){ + var data = tasks[i].split("\t"); + var list = tx.data.lists.findList(data[2]); + tx.data.tasks.addTask({ + taskId: Ext.uniqueId(), + title: Ext.util.Format.htmlEncode(data[0]), + dueDate: Date.parseDate(data[1], 'D n/j/Y') || '', + description: '', + listId: list ? list.id : tx.data.getActiveListId(), + completed: false, + reminder: '' + }); + } + }else{ + tx.data.tasks.addTask({ + taskId: Ext.uniqueId(), + title: Ext.util.Format.htmlEncode(text), + dueDate: new Date(), + description: '', + listId: tx.data.getActiveListId(), + completed: false, + reminder: '' + }); + } + }catch(e){ + air.trace('An error occured trying to import drag drop tasks.'); + } + } + }); +}); + + + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/mimetype =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/mimetype (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/mimetype 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1 @@ +application/vnd.adobe.air-application-installer-package+zip \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,20 @@ +html, body { + font:normal 12px arial, tahoma, helvetica, sans-serif; + background-color:#DFE8F6; + overflow:hidden; +} +body td { + font:normal 12px arial, tahoma, helvetica, sans-serif; +} +#time-ct { + padding:8px 0 0 25px; +} +#btns { + padding-top:15px; + padding-left:25px; +} + +#btns .x-btn { + margin-right:8px; + float:left; +} Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,133 @@ +<html> +<head> + <title>Set Reminder Time</title> + + <link rel="stylesheet" type="text/css" href="ext-2.0/resources/css/ext-all.css" /> + <link rel="stylesheet" type="text/css" href="ext-air/ext-air.css" /> + <link rel="stylesheet" type="text/css" href="main.css" /> + <link rel="stylesheet" type="text/css" href="preferences.css" /> + + <script type="text/javascript" src="adobe/AIRAliases.js"></script> + + <script type="text/javascript" src="ext-2.0/adapter/ext/ext-base.js"></script> + <script type="text/javascript" src="ext-2.0/ext-all.js"></script> + + <script type="text/javascript" src="ext-air/ext-air.js"></script> + <script type="text/javascript" src="js/ext-config.js"></script> + <script type="text/javascript" src="preferences.js"></script> +</head> +<body> + <div style="padding:10px;"> +<table border="0" cellspacing="0" cellpadding="0"> + <tr> + <td>When setting quick reminders, default the time to:</td> + </tr> + <tr> + <td id="time-ct"> + <select id="time"> + <option value="12:00 AM">12:00 AM</option> + <option value="12:15 AM">12:15 AM</option> + <option value="12:30 AM">12:30 AM</option> + <option value="12:45 AM">12:45 AM</option> + <option value="1:00 AM">1:00 AM</option> + <option value="1:15 AM">1:15 AM</option> + <option value="1:30 AM">1:30 AM</option> + <option value="1:45 AM">1:45 AM</option> + <option value="2:00 AM">2:00 AM</option> + <option value="2:15 AM">2:15 AM</option> + <option value="2:30 AM">2:30 AM</option> + <option value="2:45 AM">2:45 AM</option> + <option value="3:00 AM">3:00 AM</option> + <option value="3:15 AM">3:15 AM</option> + <option value="3:30 AM">3:30 AM</option> + <option value="3:45 AM">3:45 AM</option> + <option value="4:00 AM">4:00 AM</option> + <option value="4:15 AM">4:15 AM</option> + <option value="4:30 AM">4:30 AM</option> + <option value="4:45 AM">4:45 AM</option> + <option value="5:00 AM">5:00 AM</option> + <option value="5:15 AM">5:15 AM</option> + <option value="5:30 AM">5:30 AM</option> + <option value="5:45 AM">5:45 AM</option> + <option value="6:00 AM">6:00 AM</option> + <option value="6:15 AM">6:15 AM</option> + <option value="6:30 AM">6:30 AM</option> + <option value="6:45 AM">6:45 AM</option> + <option value="7:00 AM">7:00 AM</option> + <option value="7:15 AM">7:15 AM</option> + <option value="7:30 AM">7:30 AM</option> + <option value="7:45 AM">7:45 AM</option> + <option value="8:00 AM">8:00 AM</option> + <option value="8:15 AM">8:15 AM</option> + <option value="8:30 AM">8:30 AM</option> + <option value="8:45 AM">8:45 AM</option> + <option value="9:00 AM">9:00 AM</option> + <option value="9:15 AM">9:15 AM</option> + <option value="9:30 AM">9:30 AM</option> + <option value="9:45 AM">9:45 AM</option> + <option value="10:00 AM">10:00 AM</option> + <option value="10:15 AM">10:15 AM</option> + <option value="10:30 AM">10:30 AM</option> + <option value="10:45 AM">10:45 AM</option> + <option value="11:00 AM">11:00 AM</option> + <option value="11:15 AM">11:15 AM</option> + <option value="11:30 AM">11:30 AM</option> + <option value="11:45 AM">11:45 AM</option> + <option value="12:00 PM">12:00 PM</option> + <option value="12:15 PM">12:15 PM</option> + <option value="12:30 PM">12:30 PM</option> + <option value="12:45 PM">12:45 PM</option> + <option value="1:00 PM">1:00 PM</option> + <option value="1:15 PM">1:15 PM</option> + <option value="1:30 PM">1:30 PM</option> + <option value="1:45 PM">1:45 PM</option> + <option value="2:00 PM">2:00 PM</option> + <option value="2:15 PM">2:15 PM</option> + <option value="2:30 PM">2:30 PM</option> + <option value="2:45 PM">2:45 PM</option> + <option value="3:00 PM">3:00 PM</option> + <option value="3:15 PM">3:15 PM</option> + <option value="3:30 PM">3:30 PM</option> + <option value="3:45 PM">3:45 PM</option> + <option value="4:00 PM">4:00 PM</option> + <option value="4:15 PM">4:15 PM</option> + <option value="4:30 PM">4:30 PM</option> + <option value="4:45 PM">4:45 PM</option> + <option value="5:00 PM">5:00 PM</option> + <option value="5:15 PM">5:15 PM</option> + <option value="5:30 PM">5:30 PM</option> + <option value="5:45 PM">5:45 PM</option> + <option value="6:00 PM">6:00 PM</option> + <option value="6:15 PM">6:15 PM</option> + <option value="6:30 PM">6:30 PM</option> + <option value="6:45 PM">6:45 PM</option> + <option value="7:00 PM">7:00 PM</option> + <option value="7:15 PM">7:15 PM</option> + <option value="7:30 PM">7:30 PM</option> + <option value="7:45 PM">7:45 PM</option> + <option value="8:00 PM">8:00 PM</option> + <option value="8:15 PM">8:15 PM</option> + <option value="8:30 PM">8:30 PM</option> + <option value="8:45 PM">8:45 PM</option> + <option value="9:00 PM">9:00 PM</option> + <option value="9:15 PM">9:15 PM</option> + <option value="9:30 PM">9:30 PM</option> + <option value="9:45 PM">9:45 PM</option> + <option value="10:00 PM">10:00 PM</option> + <option value="10:15 PM">10:15 PM</option> + <option value="10:30 PM">10:30 PM</option> + <option value="10:45 PM">10:45 PM</option> + <option value="11:00 PM">11:00 PM</option> + <option value="11:15 PM">11:15 PM</option> + <option value="11:30 PM">11:30 PM</option> + <option value="11:45 PM">11:45 PM</option> + </select> + </td> + </tr> + <tr> + <td id="btns"></td> + </tr> +</table> +</div> +</body> +</html> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/preferences.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,39 @@ +Ext.onReady(function(){ + var win = window.nativeWindow; + var opener = Ext.air.NativeWindow.getRootHtmlWindow(); + + var d = new Date().clearTime(true); + d = d.add('mi', opener.Ext.state.Manager.get('defaultReminder')); + + var time = new Ext.get('time'); + time.dom.value = d.format('g:i A'); + + var ok = new Ext.Button({ + text: 'OK', + minWidth: 80, + renderTo: 'btns', + handler: function(){ + var t = Date.parseDate(time.getValue(), 'g:i A'); + if(t){ + var m = t.getMinutes() + (t.getHours()*60); + opener.Ext.state.Manager.set('defaultReminder', m); + } + win.close(); + } + }); + + var close = new Ext.Button({ + text: 'Cancel', + minWidth: 80, + renderTo: 'btns', + handler: function(){ + win.close(); + } + }); + + win.visible = true; + win.activate(); +}); + + + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,31 @@ +html, body { + font:normal 12px arial, tahoma, helvetica, sans-serif; +} +body td { + font:normal 12px arial, tahoma, helvetica, sans-serif; +} +#icon-col { + width: 24px; + padding-top:8px; + vertical-align:top; + text-align:center; +} + +#task-title { + font-weight:bold; + padding-top:8px; +} + +#snooze-ct { + padding-top:8px; + text-align:left; +} + +#btns { + padding-top:8px; +} + +#btns .x-btn { + float:right; + margin-right:8px; +} Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,58 @@ +<html> +<head> + <title>Reminder</title> + + <link rel="stylesheet" type="text/css" href="ext-2.0/resources/css/ext-all.css" /> + <link rel="stylesheet" type="text/css" href="ext-air/ext-air.css" /> + <link rel="stylesheet" type="text/css" href="main.css" /> + <link rel="stylesheet" type="text/css" href="reminder.css" /> + + <script type="text/javascript" src="adobe/AIRAliases.js"></script> + + <script type="text/javascript" src="ext-2.0/adapter/ext/ext-base.js"></script> + <script type="text/javascript" src="ext-2.0/ext-all.js"></script> + + <script type="text/javascript" src="ext-air/ext-air.js"></script> + + <script type="text/javascript" src="js/ext-config.js"></script> + <script type="text/javascript" src="js/SelectBox.js"></script> + <script type="text/javascript" src="reminder.js"></script> +</head> +<body style="background-color:#DFE8F6;"> +<table border="0" cellspacing="0" cellpadding="0" style="width:100%;"> + <tr> + <td rowspan="3" id="icon-col"><img src="images/icon-active.gif" style="width:16px;height:16px;"></td> + <td><div id="task-title"></div></td> + </tr> + <tr> + <td id="due-ct"><div>Due: <span id="task-due"></span></div></td> + </tr> + <tr> + <td id="snooze-ct"> + Remind me again in <select id="snooze-time"> + <option value="5">5 minutes</option> + <option value="10">10 minutes</option> + <option value="15">15 minutes</option> + <option value="30">30 minutes</option> + <option value="60">1 hour</option> + <option value="120">2 hours</option> + <option value="240">4 hours</option> + <option value="480">8 hours</option> + <option value="720">12 hours</option> + <option value="1440">1 day</option> + <option value="2880">2 days</option> + <option value="4320">3 days</option> + <option value="5760">4 days</option> + <option value="10080">1 week</option> + <option value="20160">2 weeks</option> + <option value="30240">3 weeks</option> + <option value="40320">4 weeks</option> + </select> + </td> + </tr> + <tr> + <td colspan="2" id="btns"></td> + </tr> +</table> +</body> +</html> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/reminder.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,56 @@ +Ext.onReady(function(){ + var win = window.nativeWindow; + var opener = Ext.air.NativeWindow.getRootHtmlWindow(); + var taskId = String(window.location).split('=')[1]; + + var store = opener.tx.data.tasks; + var task = store.lookup(taskId); + + win.title = 'Reminder - ' + Ext.util.Format.ellipsis(task.data.title, 40); + + bulkUpdate({ + 'task-title' : Ext.util.Format.ellipsis(task.data.title, 80), + 'task-due' : task.data.dueDate ? task.data.dueDate.format('F d, Y') : 'None' + }); + + function bulkUpdate(o){ + for(var id in o){ + Ext.fly(id).update(o[id]); + } + } + + var dismiss = new Ext.Button({ + text: 'Dismiss', + minWidth: 80, + renderTo: 'btns', + handler: function(){ + win.close(); + } + }); + + var snooze = new Ext.Button({ + text: 'Snooze', + minWidth: 80, + renderTo: 'btns', + handler: function(){ + var min = parseInt(Ext.get('snooze-time').getValue(), 10); + var reminder = new Date().add('mi', min); + var o = store.getById(taskId); + if(o){ + o.set('reminder', reminder); + }else{ + store.proxy.table.updateBy({reminder: reminder}, 'where taskId = ?', [taskId]); + } + win.close(); + } + }); + + win.visible = true; + win.activate(); + win.notifyUser('informational'); + + Ext.air.Sound.play('beep.mp3', 10500); +}); + + + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,26 @@ +#msg { + background:#fffad7; + border:1px solid #eee096; + padding:3px; + margin:0 0 8px 0; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-form-check-wrap label { + vertical-align:top; +} +.x-form-check-wrap { + padding-top:2px; +} +.divider { + height:1px; + background:#a3bad9; + margin-bottom:8px; +} +.x-form-item { + margin-bottom:8px; +} + +.x-form-field { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,27 @@ +<html> +<head> + <title>Task</title> + + <link rel="stylesheet" type="text/css" href="ext-2.0/resources/css/ext-all.css" /> + <link rel="stylesheet" type="text/css" href="ext-air/ext-air.css" /> + <link rel="stylesheet" type="text/css" href="main.css" /> + <link rel="stylesheet" type="text/css" href="task.css" /> + + <script type="text/javascript" src="adobe/AIRAliases.js"></script> + + <script type="text/javascript" src="ext-2.0/adapter/ext/ext-base.js"></script> + <script type="text/javascript" src="ext-2.0/ext-all.js"></script> + + <script type="text/javascript" src="ext-air/ext-air.js"></script> + + <script type="text/javascript" src="js/ext-config.js"></script> + <script type="text/javascript" src="js/SelectBox.js"></script> + <script type="text/javascript" src="js/DateTimeField.js"></script> + <script type="text/javascript" src="js/ListLoader.js"></script> + <script type="text/javascript" src="js/TreeSelector.js"></script> + <script type="text/javascript" src="js/ListSelector.js"></script> + <script type="text/javascript" src="task.js"></script> +</head> +<body style="background-color:#DFE8F6;"> +</body> +</html> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/task.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,289 @@ + +Ext.onReady(function(){ + Ext.QuickTips.init(); + + var win = window.nativeWindow; + + var opener = Ext.air.NativeWindow.getRootHtmlWindow(); + var taskId = String(window.location).split('=')[1]; + var isNew = !taskId; + var completed = false; + + win.title = 'Task - ' + Ext.util.Format.ellipsis(getTask().data.title, 40); + + var tb = new Ext.Toolbar({ + region: 'north', + height:26, + id:'main-tb', + items:[{ + id:'cpl-btn', + iconCls: 'icon-mark-complete', + text: 'Mark Complete', + handler: function(){ + setCompleted(!completed); + if(completed) { + setMsg('This task was completed on ' + new Date().format('l, F d, Y')); + } + if(validate()) { + (function(){ + saveData(); + if (completed) { + win.close(); + } + }).defer(250); + } + } + },'-', + {iconCls: 'icon-delete-task', text: 'Delete', handler: function(){ + Ext.Msg.confirm('Confirm Delete', 'Are you sure you want to delete this task?', function(btn){ + if(btn == 'yes'){ + opener.tx.data.tasks.remove(getTask()); + win.close(); + } + }); + }} + ] + }); + + var title = new Ext.form.TextField({ + fieldLabel: 'Task Subject', + name: 'title', + anchor: '100%' + }); + + var dueDate = new Ext.form.DateField({ + fieldLabel: 'Due Date', + name: 'dueDate', + width: 135, + format: 'm/d/Y' + }); + + var list = new ListSelector({ + fieldLabel: 'Task List', + name: 'listId', + store: opener.tx.data.lists, + anchor: '100%' + }); + + list.on('render', function(){ + this.menu.on('beforeshow', function(m){ + list.tree.setWidth(Math.max(180, list.getSize().width)); + }); + }); + win.addEventListener('closing', function(){ + opener.tx.data.lists.unbindTree(list.tree); + }); + + + var hasReminder = new Ext.form.Checkbox({ + boxLabel: 'Reminder:', + checked: false + }); + + var reminder = new Ext.ux.form.DateTime({ + name: 'reminder', + disabled: true, + timeFormat: 'g:i A', + dateFormat: 'm/d/Y', + timeConfig: { + tpl: opener.Templates.timeField, + listClass:'x-combo-list-small', + maxHeight:100 + } + }); + + var description = new Ext.form.HtmlEditor({ + hideLabel: true, + name: 'description', + anchor: '100% -95', // anchor width by percentage and height by raw adjustment + onEditorEvent : function(e){ + var t; + if(e.browserEvent.type == 'mousedown' && (t = e.getTarget('a', 3))){ + t.target = '_blank'; + } + this.updateToolbar(); + } + }); + + var form = new Ext.form.FormPanel({ + region:'center', + baseCls: 'x-plain', + labelWidth: 75, + margins:'10 10 5 10', + + buttonAlign: 'right', + minButtonWidth: 80, + buttons:[{ + text: 'OK', + handler: function(){ + if(validate()) { + saveData(); + window.nativeWindow.close(); + } + } + },{ + text: 'Cancel', + handler: function(){ window.nativeWindow.close(); } + }], + + + items: [{ + xtype:'box', + autoEl: {id:'msg'} + }, + title,{ + layout: 'column', + anchor: '100%', + baseCls: 'x-plain', + items: [{ + width: 250, + layout: 'form', + baseCls: 'x-plain', + items: dueDate + }, { + columnWidth: 1, + layout: 'form', + baseCls: 'x-plain', + labelWidth:55, + items: list + }] + },{ + xtype:'box', + autoEl: {cls:'divider'} + },{ + layout: 'column', + anchor: '100%', + baseCls: 'x-plain', + items: [{ + width: 80, + layout: 'form', + baseCls: 'x-plain', + hideLabels: true, + items: hasReminder + }, { + columnWidth: 1, + layout: 'form', + baseCls: 'x-plain', + hideLabels: true, + items: reminder + }] + }, + description] + }); + + var viewport = new Ext.Viewport({ + layout:'border', + items:[tb, form] + }); + + var msg = Ext.get('msg'); + var task = getTask(); + + if(task && task.data.completedDate){ + setMsg('This task was completed on ' + task.data.completedDate.format('l, F d, Y')); + } + + hasReminder.on('check', function(cb, checked){ + reminder.setDisabled(!checked); + if(checked && !reminder.getValue()){ + reminder.setValue(opener.tx.data.getDefaultReminder(getTask())); + } + }); + + refreshData.defer(10); + + win.visible = true; + win.activate(); + + title.focus(); + + function refreshData(){ + if(!isNew){ + var task = getTask(); + hasReminder.setValue(!!task.data.reminder); + form.getForm().loadRecord(task); + setCompleted(task.data.completed); + } + } + + function saveData(){ + var task; + if(isNew){ + task = opener.tx.data.tasks.createTask( + title.getValue(), + list.getRawValue(), + dueDate.getValue(), + description.getValue(), + completed + ); + }else{ + task = getTask(); + task.set('completed', completed); + } + if(!hasReminder.getValue()){ + reminder.setValue(''); + } + form.getForm().updateRecord(task); + } + + function setCompleted(value){ + completed = value; + var cplBtn = Ext.getCmp('cpl-btn'); + if (completed) { + cplBtn.setText('Mark Active'); + cplBtn.setIconClass('icon-mark-active'); + hasReminder.disable(); + reminder.disable(); + } + else { + cplBtn.setText('Mark Complete'); + cplBtn.setIconClass('icon-mark-complete'); + setMsg(null); + hasReminder.enable(); + reminder.setDisabled(!hasReminder.checked); + } + } + + function setMsg(msgText){ + var last; + if(!msgText) { + msg.setDisplayed(false); + } else { + msg.setDisplayed(''); + msg.update(msgText); + } + description.anchorSpec.bottom = function(v){ + if(v !== last){ + last = v; + var h = msg.getHeight(); + return v - 95 - (h ? h + 8 : 0); + } + }; + form.doLayout(); + } + + function validate(){ + if(Ext.isEmpty(title.getValue(), false)){ + Ext.Msg.alert('Warning', 'Unable to save changes. A subject is required.', function(){ + title.focus(); + }); + return false; + } + return true; + } + + function getTask(){ + var t = opener.tx.data.tasks.lookup(taskId); + if(t){ + //workaround WebKit cross-frame date issue + fixDateMember(t.data, 'completedDate'); + fixDateMember(t.data, 'reminder'); + fixDateMember(t.data, 'dueDate'); + } + return t; + } + +}); + + + Added: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/tasks.db =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/air/samples/tasks/tasks.db ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/air/src/FileProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/FileProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/FileProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,67 @@ +/** + * @class Ext.air.FileProvider + * @extends Ext.state.Provider + * + * An Ext state provider implementation for Adobe AIR that stores state in the application + * storage directory. + * + * @constructor + * @param {Object} config + */ +Ext.air.FileProvider = function(config){ + Ext.air.FileProvider.superclass.constructor.call(this); + + this.defaultState = { + mainWindow : { + width:780, + height:580, + x:10, + y:10 + } + }; + + Ext.apply(this, config); + this.state = this.readState(); + + var provider = this; + air.NativeApplication.nativeApplication.addEventListener('exiting', function(){ + provider.saveState(); + }); +}; + +Ext.extend(Ext.air.FileProvider, Ext.state.Provider, { + /** + * @cfg {String} file + * The file name to use for the state file in the application storage directory + */ + file: 'extstate.data', + + /** + * @cfg {Object} defaultState + * The default state if no state file can be found + */ + // private + readState : function(){ + var stateFile = air.File.applicationStorageDirectory.resolvePath(this.file); + if(!stateFile.exists){ + return this.defaultState || {}; + } + + var stream = new air.FileStream(); + stream.open(stateFile, air.FileMode.READ); + + var stateData = stream.readObject(); + stream.close(); + + return stateData || this.defaultState || {}; + }, + + // private + saveState : function(name, value){ + var stateFile = air.File.applicationStorageDirectory.resolvePath(this.file); + var stream = new air.FileStream(); + stream.open(stateFile, air.FileMode.WRITE); + stream.writeObject(this.state); + stream.close(); + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/NativeDD.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/NativeDD.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/NativeDD.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,52 @@ + +/** + * @class Ext.air.DragType + * + * Drag drop type constants + * + * @singleton + */ +Ext.air.DragType = { + /** + * Constant for text data + */ + TEXT : 'text/plain', + /** + * Constant for html data + */ + HTML : 'text/html', + /** + * Constant for url data + */ + URL : 'text/uri-list', + /** + * Constant for bitmap data + */ + BITMAP : 'image/x-vnd.adobe.air.bitmap', + /** + * Constant for file list data + */ + FILES : 'application/x-vnd.adobe.air.file-list' +}; + + +// workaround for DD dataTransfer Clipboard not having hasFormat + +Ext.apply(Ext.EventObjectImpl.prototype, { + hasFormat : function(format){ + if (this.browserEvent.dataTransfer) { + for (var i = 0, len = this.browserEvent.dataTransfer.types.length; i < len; i++) { + if(this.browserEvent.dataTransfer.types[i] == format) { + return true; + } + } + } + return false; + }, + + getData : function(type){ + return this.browserEvent.dataTransfer.getData(type); + } +}); + + Added: mickael/trunk/ext/v3.0.0-a1/air/src/NativeObservable.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/NativeObservable.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/NativeObservable.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,27 @@ +/** + * @class Ext.air.NativeObservable + * @extends Ext.util.Observable + * + * Adds ability for Ext Observable functionality to proxy events for native (AIR) object wrappers + * + * @constructor + */ + +Ext.air.NativeObservable = Ext.extend(Ext.util.Observable, { + addListener : function(name){ + this.proxiedEvents = this.proxiedEvents || {}; + if(!this.proxiedEvents[name]){ + var instance = this; + var f = function(){ + var args = Array.prototype.slice.call(arguments, 0); + args.unshift(name); + instance.fireEvent.apply(instance, args); + }; + this.proxiedEvents[name] = f; + this.getNative().addEventListener(name, f); + } + Ext.air.NativeObservable.superclass.addListener.apply(this, arguments); + } +}); + +Ext.air.NativeObservable.prototype.on = Ext.air.NativeObservable.prototype.addListener; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/NativeWindow.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/NativeWindow.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/NativeWindow.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,389 @@ +/** + * @class Ext.air.NativeWindow + * @extends Ext.air.NativeObservable + * + * Wraps the AIR NativeWindow class to give an Ext friendly API. <br/><br/>This class also adds + * automatic state management (position and size) for the window (by id) and it can be used + * for easily creating "minimize to system tray" for the main window in your application.<br/><br/> + * + * Note: Many of the config options for this class can only be applied to NEW windows. Passing + * in an existing instance of a window along with those config options will have no effect. + * + * @constructor + * @param {Object} config + */ +Ext.air.NativeWindow = function(config){ + Ext.apply(this, config); + + /** + * @type String + */ + this.id = this.id || Ext.uniqueId(); + + this.addEvents( + /** + * @event close + * @param {Object} e The air event object + */ + 'close', + /** + * @event closing + * @param {Object} e The air event object + */ + 'closing', + /** + * @event move + * @param {Object} e The air event object + */ + 'move', + /** + * @event moving + * @param {Object} e The air event object + */ + 'moving', + /** + * @event resize + * @param {Object} e The air event object + */ + 'resize', + /** + * @event resizing + * @param {Object} e The air event object + */ + 'resizing', + /** + * @event displayStateChange + * @param {Object} e The air event object + */ + 'displayStateChange', + /** + * @event displayStateChanging + * @param {Object} e The air event object + */ + 'displayStateChanging' + ); + + Ext.air.NativeWindow.superclass.constructor.call(this); + + if(!this.instance){ + var options = new air.NativeWindowInitOptions(); + options.systemChrome = this.chrome; + options.type = this.type; + options.resizable = this.resizable; + options.minimizable = this.minimizable; + options.maximizable = this.maximizable; + options.transparent = this.transparent; + + this.loader = window.runtime.flash.html.HTMLLoader.createRootWindow(false, options, false); + this.loader.load(new air.URLRequest(this.file)); + + this.instance = this.loader.window.nativeWindow; + }else{ + this.loader = this.instance.stage.getChildAt(0); + } + + var provider = Ext.state.Manager; + var b = air.Screen.mainScreen.visibleBounds; + + var state = provider.get(this.id) || {}; + provider.set(this.id, state); + + var win = this.instance; + + var width = Math.max(state.width || this.width, 100); + var height = Math.max(state.height || this.height, 100); + + var centerX = b.x + ((b.width/2)-(width/2)); + var centerY = b.y + ((b.height/2)-(height/2)); + + var x = !Ext.isEmpty(state.x, false) ? state.x : (!Ext.isEmpty(this.x, false) ? this.x : centerX); + var y = !Ext.isEmpty(state.y, false) ? state.y : (!Ext.isEmpty(this.y, false) ? this.y : centerY); + + win.width = width; + win.height = height; + win.x = x; + win.y = y; + + win.addEventListener('move', function(){ + if(win.displayState != air.NativeWindowDisplayState.MINIMIZED && win.width > 100 && win.height > 100) { + state.x = win.x; + state.y = win.y; + } + }); + win.addEventListener('resize', function(){ + if (win.displayState != air.NativeWindowDisplayState.MINIMIZED && win.width > 100 && win.height > 100) { + state.width = win.width; + state.height = win.height; + } + }); + + Ext.air.NativeWindowManager.register(this); + this.on('close', this.unregister, this); + + /** + * @cfg {Boolean} minimizeToTray + * True to enable minimizing to the system tray. Note: this should only be applied + * to the primary window in your application. A trayIcon is required. + */ + if(this.minimizeToTray){ + this.initMinimizeToTray(this.trayIcon, this.trayMenu); + } + +}; + +Ext.extend(Ext.air.NativeWindow, Ext.air.NativeObservable, { + + /** + * @cfg {air.NativeWindow} instance + * The native window instance to wrap. If undefined, a new window will be created. + */ + + /** + * @cfg {String} trayIcon + * The icon to display when minimized in the system tray + */ + /** + * @cfg {NativeMenu} trayMenu + * Menu to display when the tray icon is right clicked + */ + /** + * @cfg {String} trayTip + * Tooltip for the tray icon + */ + + /** + * @cfg {String} chrome + * The native window chrome (defaults to 'standard', can also be 'none'). + */ + chrome: 'standard', // can also be none + /** + * @cfg {String} type + * The native window type - normal, utility or lightweight. (defaults to normal) + */ + type: 'normal', // can be normal, utility or lightweight + /** + * @cfg {Number} width + */ + width:600, + /** + * @cfg {Number} height + */ + height:400, + /** + * @cfg {Boolean} resizable + */ + resizable: true, + /** + * @cfg {Boolean} minimizable + */ + minimizable: true, + /** + * @cfg {Boolean} maximizable + */ + maximizable: true, + /** + * @cfg {Boolean} transparent + */ + transparent: false, + + /** + * Returns the air.NativeWindow instance + * @return air.NativeWindow + */ + getNative : function(){ + return this.instance; + }, + + /** + * Returns the x/y coordinates for centering the windw on the screen + * @return {x: Number, y: Number} + */ + getCenterXY : function(){ + var b = air.Screen.mainScreen.visibleBounds; + return { + x: b.x + ((b.width/2)-(this.width/2)), + y: b.y + ((b.height/2)-(this.height/2)) + }; + }, + + /** + * Shows the window + */ + show :function(){ + if(this.trayed){ + Ext.air.SystemTray.hideIcon(); + this.trayed = false; + } + this.instance.visible = true; + }, + + /** + * Shows and activates the window + */ + activate : function(){ + this.show(); + this.instance.activate(); + }, + + /** + * Hides the window + */ + hide :function(){ + this.instance.visible = false; + }, + + /** + * Closes the window + */ + close : function(){ + this.instance.close(); + }, + + /** + * Returns true if this window is minimized + * @return Boolean + */ + isMinimized :function(){ + return this.instance.displayState == air.NativeWindowDisplayState.MINIMIZED; + }, + + /** + * Returns true if this window is maximized + * @return Boolean + */ + isMaximized :function(){ + return this.instance.displayState == air.NativeWindowDisplayState.MAXIMIZED; + }, + + /** + * Moves the window to the passed xy and y coordinates + * @param {Number} x + * @param {Number} y + */ + moveTo : function(x, y){ + this.x = this.instance.x = x; + this.y = this.instance.y = y; + }, + + /** + * @param {Number} width + * @param {Number} height + */ + resize : function(width, height){ + this.width = this.instance.width = width; + this.height = this.instance.height = height; + }, + + unregister : function(){ + Ext.air.NativeWindowManager.unregister(this); + }, + + initMinimizeToTray : function(icon, menu){ + var tray = Ext.air.SystemTray; + + tray.setIcon(icon, this.trayTip); + this.on('displayStateChanging', function(e){ + if(e.afterDisplayState == 'minimized'){ + e.preventDefault(); + this.hide(); + tray.showIcon(); + this.trayed = true; + } + }, this); + + tray.on('click', function(){ + this.activate(); + }, this); + + if(menu){ + tray.setMenu(menu); + } + } +}); + +/** + * Returns the first opened window in your application + * @return air.NativeWindow + * @static + */ +Ext.air.NativeWindow.getRootWindow = function(){ + return air.NativeApplication.nativeApplication.openedWindows[0]; +}; + +/** + * Returns the javascript "window" object of the first opened window in your application + * @return Window + * @static + */ +Ext.air.NativeWindow.getRootHtmlWindow = function(){ + return Ext.air.NativeWindow.getRootWindow().stage.getChildAt(0).window; +}; + +/** + * @class Ext.air.NativeWindowGroup + * + * A collection of NativeWindows. + */ +Ext.air.NativeWindowGroup = function(){ + var list = {}; + + return { + /** + * @param {Object} win + */ + register : function(win){ + list[win.id] = win; + }, + + /** + * @param {Object} win + */ + unregister : function(win){ + delete list[win.id]; + }, + + /** + * @param {String} id + */ + get : function(id){ + return list[id]; + }, + + /** + * Closes all windows + */ + closeAll : function(){ + for(var id in list){ + if(list.hasOwnProperty(id)){ + list[id].close(); + } + } + }, + + /** + * 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.hasOwnProperty(id)){ + if(fn.call(scope || list[id], list[id]) === false){ + return; + } + } + } + } + }; +}; + +/** + * @class Ext.air.NativeWindowManager + * @extends Ext.air.NativeWindowGroup + * + * Collection of all NativeWindows created. + * + * @singleton + */ +Ext.air.NativeWindowManager = new Ext.air.NativeWindowGroup(); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/Sound.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/Sound.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/Sound.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,18 @@ +/** + * @class Ext.air.Sound + * + * @singleton + */ +Ext.air.Sound = { + /** + * Play a sound. + * @param {String} file The file to be played. The path is resolved against applicationDirectory + * @param {Number} startAt (optional) A time in the sound file to skip to before playing + */ + play : function(file, startAt){ + var soundFile = air.File.applicationDirectory.resolvePath(file); + var sound = new air.Sound(); + sound.load(new air.URLRequest(soundFile.url)); + sound.play(startAt); + } +}; Added: mickael/trunk/ext/v3.0.0-a1/air/src/SystemMenu.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/SystemMenu.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/SystemMenu.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,110 @@ +/** + * @class Ext.air.SystemMenu + * + * Provides platform independent handling of adding item to the application menu, creating the menu or + * items as needed. <br/><br/> + * + * This class also provides the ability to bind standard Ext.Action instances with NativeMenuItems + * + * @singleton + */ +Ext.air.SystemMenu = function(){ + var menu; + // windows + if(air.NativeWindow.supportsMenu && nativeWindow.systemChrome != air.NativeWindowSystemChrome.NONE) { + menu = new air.NativeMenu(); + nativeWindow.menu = menu; + } + + // mac + if(air.NativeApplication.supportsMenu) { + menu = air.NativeApplication.nativeApplication.menu; + } + + function find(menu, text){ + for(var i = 0, len = menu.items.length; i < len; i++){ + if(menu.items[i]['label'] == text){ + return menu.items[i]; + } + } + return null; + } + + return { + /** + * Add items to one of the application menus + * @param {String} text The application menu to add the actions to (e.g. 'File' or 'Edit'). + * @param {Array} actions An array of Ext.Action objects or menu item configs + * @param {Number} mindex The index of the character in "text" which should be used for + * keyboard access + * @return air.NativeMenu The raw submenu + */ + add: function(text, actions, mindex){ + + var item = find(menu, text); + if(!item){ + item = menu.addItem(new air.NativeMenuItem(text)); + item.mnemonicIndex = mindex || 0; + + item.submenu = new air.NativeMenu(); + } + for (var i = 0, len = actions.length; i < len; i++) { + item.submenu.addItem(actions[i] == '-' ? new air.NativeMenuItem("", true) : Ext.air.MenuItem(actions[i])); + } + return item.submenu; + }, + + /** + * Returns the application menu + */ + get : function(){ + return menu; + } + }; +}(); + +// ability to bind native menu items to an Ext.Action +Ext.air.MenuItem = function(action){ + if(!action.isAction){ + action = new Ext.Action(action); + } + var cfg = action.initialConfig; + var nativeItem = new air.NativeMenuItem(cfg.itemText || cfg.text); + + nativeItem.enabled = !cfg.disabled; + + if(!Ext.isEmpty(cfg.checked)){ + nativeItem.checked = cfg.checked; + } + + var handler = cfg.handler; + var scope = cfg.scope; + + nativeItem.addEventListener(air.Event.SELECT, function(){ + handler.call(scope || window, cfg); + }); + + action.addComponent({ + setDisabled : function(v){ + nativeItem.enabled = !v; + }, + + setText : function(v){ + nativeItem.label = v; + }, + + setVisible : function(v){ + // could not find way to hide in air so disable? + nativeItem.enabled = !v; + }, + + setHandler : function(newHandler, newScope){ + handler = newHandler; + scope = newScope; + }, + // empty function + on : function(){} + }); + + return nativeItem; +} Added: mickael/trunk/ext/v3.0.0-a1/air/src/SystemTray.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/SystemTray.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/SystemTray.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,84 @@ +Ext.air.SystemTray = function(){ + var app = air.NativeApplication.nativeApplication; + var icon, isWindows = false, bitmaps; + + // windows + if(air.NativeApplication.supportsSystemTrayIcon) { + icon = app.icon; + isWindows = true; + } + + // mac + if(air.NativeApplication.supportsDockIcon) { + icon = app.icon; + } + + return { + + setIcon : function(icon, tooltip, initWithIcon){ + if(!icon){ // not supported OS + return; + } + var loader = new air.Loader(); + loader.contentLoaderInfo.addEventListener(air.Event.COMPLETE, function(e){ + bitmaps = new runtime.Array(e.target.content.bitmapData); + if (initWithIcon) { + icon.bitmaps = bitmaps; + } + }); + loader.load(new air.URLRequest(icon)); + if(tooltip && air.NativeApplication.supportsSystemTrayIcon) { + app.icon.tooltip = tooltip; + } + }, + + bounce : function(priority){ + icon.bounce(priority); + }, + + on : function(eventName, fn, scope){ + icon.addEventListener(eventName, function(){ + fn.apply(scope || this, arguments); + }); + }, + + hideIcon : function(){ + if(!icon){ // not supported OS + return; + } + icon.bitmaps = []; + }, + + showIcon : function(){ + if(!icon){ // not supported OS + return; + } + icon.bitmaps = bitmaps; + }, + + setMenu: function(actions, _parentMenu){ + if(!icon){ // not supported OS + return; + } + var menu = new air.NativeMenu(); + + for (var i = 0, len = actions.length; i < len; i++) { + var a = actions[i]; + if(a == '-'){ + menu.addItem(new air.NativeMenuItem("", true)); + }else{ + var item = menu.addItem(Ext.air.MenuItem(a)); + if(a.menu || (a.initialConfig && a.initialConfig.menu)){ + item.submenu = Ext.air.SystemTray.setMenu(a.menu || a.initialConfig.menu, menu); + } + } + + if(!_parentMenu){ + icon.menu = menu; + } + } + + return menu; + } + }; +}(); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/air.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/air.jsb (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/air.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="utf-8"?> +<project path="" name="Ext - JS Lib" author="Ext JS, LLC" version="2.0.2" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="$project\..\samples\tasks\ext-air\" source="False" source-dir="$output\source" minify="False" min-dir="$output\build" doc="False" doc-dir="$output\docs" master="true" master-file="$output\yui-ext.js" zip="true" zip-file="$output\yuo-ext.$version.zip"> + <directory name="" /> + <file name="air.jsb" path="" /> + <target name="Air" file="$output\ext-air.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="ext-air-adapter.js" /> + <include name="FileProvider.js" /> + <include name="MainWindow.js" /> + <include name="NativeObservable.js" /> + <include name="NativeWindow.js" /> + <include name="sql\Connection.js" /> + <include name="sql\Table.js" /> + <include name="sql\Proxy.js" /> + <include name="sql\AirConnection.js" /> + <include name="SystemTray.js" /> + <include name="NativeDD.js" /> + <include name="Sound.js" /> + <include name="SystemMenu.js" /> + </target> + <file name="MainWindow.js" path="" /> +</project> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/ext-air-adapter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/ext-air-adapter.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/ext-air-adapter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,795 @@ +/* + * This file corrects air eval issues and other issues found in the AIR application sandbox + */ +Ext.namespace('Ext.air', 'Ext.sql'); + +Ext.Template.prototype.compile = function() { + var fm = Ext.util.Format; + var useF = this.disableFormats !== true; + // + var prevOffset = 0; + var arr = []; + var tpl = this; + var fn = function(m, name, format, args, offset, s){ + if (prevOffset != offset) { + var action = {type: 1, value: s.substr(prevOffset, offset - prevOffset)}; + arr.push(action); + } + prevOffset = offset + m.length; + if(format && useF){ + 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 = [''].concat(args); + } else { + args = ['']; + } + if(format.substr(0, 5) != "this."){ + var action = {type: 3, value:name, format: fm[format], args: args, scope: fm}; + arr.push(action); + }else{ + var action = {type: 3, value:name, format:tpl[format.substr(5)], args:args, scope: tpl}; + arr.push(action); + } + }else{ + var action = {type: 2, value: name}; + arr.push(action); + } + return m; + }; + + var s = this.html.replace(this.re, fn); + if (prevOffset != (s.length - 1)) { + var action = {type: 1, value: s.substr(prevOffset, s.length - prevOffset)}; + arr.push(action); + } + + this.compiled = function(values) { + function applyValues(el) { + switch (el.type) { + case 1: + return el.value; + case 2: + return (values[el.value] ? values[el.value] : ''); + default: + el.args[0] = values[el.value]; + return el.format.apply(el.scope, el.args); + } + } + return arr.map(applyValues).join(''); + } + return this; +}; + +Ext.Template.prototype.call = function(fnName, value, allValues){ + return this[fnName](value, allValues); +} + + +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 eval is stop the compressor from + // renaming the variable to something shorter + eval("var batch = 30803;"); + + var key = 30803; + + 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; + } + 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 quickDiff(c1, c2){ + var len1 = c1.length; + if(!len1){ + return 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); + } + + function search(path, root, type) { + type = type || "select"; + // + var n = root || document; + // + 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]){ + 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] == "#"){ + n = quickId(n, mode, root, tm[2]); + }else{ + n = getNodes(n, mode, tm[2]); + } + q = q.replace(tm[0], ""); + }else if(q.substr(0, 1) != '@'){ + n = getNodes(n, mode, "*"); + } + }else{ + if(tm){ + if(tm[1] == "#"){ + n = byId(n, null, tm[2]); + }else{ + 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){ + switch(j) { + case 0: + n = byClassName(n, null, " " + m[1] +" "); + break; + case 1: + n = byPseudo(n, m[1], m[2]); + break; + case 2: + n = byAttribute(n, m[2], m[4], m[3], m[1]); + break; + case 3: + n = byId(n, null, m[1]); + break; + case 4: + return {firstChild:{nodeValue:attrValue(n, m[1])}}; + + } + q = q.replace(m[0], ""); + matched = true; + break; + } + } + + if(!matched){ + throw 'Error parsing selector, parsing failed at "' + q + '"'; + } + } + if(mm[1]){ + mode=mm[1].replace(trimRe, ""); + q = q.replace(mm[1], ""); + } + } + return nodup(n); + } + + return { + getStyle : function(el, name){ + return Ext.fly(el).getStyle(name); + }, + + compile: function(path, type) { + return function(root) { + return search(path, root, type); + } + }, + + /** + * 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 = Ext.isArray(el); + 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 <i>c</i>= where <i>c</i> 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; + } + } + }; +}(); + +Ext.query = Ext.DomQuery.select; + +Date.precompileFormats = function(s){ + var formats = s.split('|'); + for(var i = 0, len = formats.length;i < len;i++){ + Date.createNewFormat(formats[i]); + Date.createParser(formats[i]); + } +} + +Date.precompileFormats("D n/j/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|YmdHis|F d, Y|l, F d, Y|H:i:s|g:i A|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|m/d/y|m/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|Y-m-d H:i:s|d/m/y|d/m/Y|d-m-y|d-m-Y|d/m|d-m|dm|dmy|dmY|Y-m-d|l|D m/d|D m/d/Y|m/d/Y"); + +// precompile instead of lazy init +Ext.ColorPalette.prototype.tpl = new Ext.XTemplate( + '<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>' +); + +Ext.grid.GroupingView.prototype.startTpl = new Ext.XTemplate( + '<div id="{groupId}" class="x-grid-group {cls}">', + '<div id="{groupId}-hd" class="x-grid-group-hd" style="{style}"><div>{text}</div></div>', + '<div id="{groupId}-bd" class="x-grid-group-body">' +); + + + + + Added: mickael/trunk/ext/v3.0.0-a1/air/src/sql/AirConnection.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/sql/AirConnection.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/sql/AirConnection.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,78 @@ + Ext.sql.AirConnection = Ext.extend(Ext.sql.Connection, { + // abstract methods + open : function(db){ + this.conn = new air.SQLConnection(); + var file = air.File.applicationDirectory.resolvePath(db); + this.conn.open(file); + this.openState = true; + this.fireEvent('open', this); + }, + + close : function(){ + this.conn.close(); + this.fireEvent('close', this); + }, + + createStatement : function(type){ + var stmt = new air.SQLStatement(); + stmt.sqlConnection = this.conn; + return stmt; + }, + + exec : function(sql){ + var stmt = this.createStatement('exec'); + stmt.text = sql; + stmt.execute(); + }, + + execBy : function(sql, args){ + var stmt = this.createStatement('exec'); + stmt.text = sql; + this.addParams(stmt, args); + stmt.execute(); + }, + + query : function(sql){ + var stmt = this.createStatement('query'); + stmt.text = sql; + stmt.execute(this.maxResults); + return this.readResults(stmt.getResult()); + }, + + queryBy : function(sql, args){ + var stmt = this.createStatement('query'); + stmt.text = sql; + this.addParams(stmt, args); + stmt.execute(this.maxResults); + return this.readResults(stmt.getResult()); + }, + + addParams : function(stmt, args){ + if(!args){ return; } + for(var key in args){ + if(args.hasOwnProperty(key)){ + if(!isNaN(key)){ + var v = args[key]; + if(Ext.isDate(v)){ + v = v.format(Ext.sql.Proxy.DATE_FORMAT); + } + stmt.parameters[parseInt(key)] = v; + }else{ + stmt.parameters[':' + key] = args[key]; + } + } + } + return stmt; + }, + + readResults : function(rs){ + var r = []; + if(rs && rs.data){ + var len = rs.data.length; + for(var i = 0; i < len; i++) { + r[r.length] = rs.data[i]; + } + } + return r; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/sql/Connection.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/sql/Connection.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/sql/Connection.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,90 @@ +// Asbtract base class for Connection classes +Ext.sql.Connection = function(config){ + Ext.apply(this, config); + Ext.sql.Connection.superclass.constructor.call(this); + + this.addEvents({ + open : true, + close: true + }); +}; + +Ext.extend(Ext.sql.Connection, Ext.util.Observable, { + maxResults: 10000, + openState : false, + + // abstract methods + open : function(file){ + }, + + close : function(){ + }, + + exec : function(sql){ + }, + + execBy : function(sql, args){ + }, + + query : function(sql){ + }, + + queryBy : function(sql, args){ + }, + + // protected/inherited method + isOpen : function(){ + return this.openState; + }, + + getTable : function(name, keyName){ + return new Ext.sql.Table(this, name, keyName); + }, + + createTable : function(o){ + var tableName = o.name; + var keyName = o.key; + var fs = o.fields; + if(!Ext.isArray(fs)){ // Ext fields collection + fs = fs.items; + } + var buf = []; + for(var i = 0, len = fs.length; i < len; i++){ + var f = fs[i], s = f.name; + switch(f.type){ + case "int": + case "bool": + case "boolean": + s += ' INTEGER'; + break; + case "float": + s += ' REAL'; + break; + default: + s += ' TEXT'; + } + if(f.allowNull === false || f.name == keyName){ + s += ' NOT NULL'; + } + if(f.name == keyName){ + s += ' PRIMARY KEY'; + } + if(f.unique === true){ + s += ' UNIQUE'; + } + + buf[buf.length] = s; + } + var sql = ['CREATE TABLE IF NOT EXISTS ', tableName, ' (', buf.join(','), ')'].join(''); + this.exec(sql); + } +}); + + +Ext.sql.Connection.getInstance = function(db, config){ + if(Ext.isAir){ // air + return new Ext.sql.AirConnection(config); + } else { // gears + return new Ext.sql.GearsConnection(config); + } +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/sql/Proxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/sql/Proxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/sql/Proxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,92 @@ +Ext.sql.Proxy = function(conn, table, keyName, store, readonly){ + Ext.sql.Proxy.superclass.constructor.call(this); + this.conn = conn; + this.table = this.conn.getTable(table, keyName); + this.store = store; + + if (readonly !== true) { + this.store.on('add', this.onAdd, this); + this.store.on('update', this.onUpdate, this); + this.store.on('remove', this.onRemove, this); + } +}; + +Ext.sql.Proxy.DATE_FORMAT = 'Y-m-d H:i:s'; + +Ext.extend(Ext.sql.Proxy, Ext.data.DataProxy, { + load : function(params, reader, callback, scope, arg){ + if(!this.conn.isOpen()){ // assume that the connection is in the process of opening + this.conn.on('open', function(){ + this.load(params, reader, callback, scope, arg); + }, this, {single:true}); + return; + }; + if(this.fireEvent("beforeload", this, params, reader, callback, scope, arg) !== false){ + var clause = params.where || ''; + var args = params.args || []; + var group = params.groupBy; + var sort = params.sort; + var dir = params.dir; + + if(group || sort){ + clause += ' ORDER BY '; + if(group && group != sort){ + clause += group + ' ASC, '; + } + clause += sort + ' ' + (dir || 'ASC'); + } + + var rs = this.table.selectBy(clause, args); + this.onLoad({callback:callback, scope:scope, arg:arg, reader: reader}, rs); + }else{ + callback.call(scope||this, null, arg, false); + } + }, + + onLoad : function(trans, rs, e, stmt){ + if(rs === false){ + this.fireEvent("loadexception", this, null, trans.arg, e); + trans.callback.call(trans.scope||window, null, trans.arg, false); + return; + } + var result = trans.reader.readRecords(rs); + this.fireEvent("load", this, rs, trans.arg); + trans.callback.call(trans.scope||window, result, trans.arg, true); + }, + + processData : function(o){ + var fs = this.store.fields; + var r = {}; + for(var key in o){ + var f = fs.key(key), v = o[key]; + if(f){ + if(f.type == 'date'){ + r[key] = v ? v.format(Ext.sql.Proxy.DATE_FORMAT,10) : ''; + }else if(f.type == 'boolean'){ + r[key] = v ? 1 : 0; + }else{ + r[key] = v; + } + } + } + return r; + }, + + onUpdate : function(ds, record){ + var changes = record.getChanges(); + var kn = this.table.keyName; + this.table.updateBy(this.processData(changes), kn + ' = ?', [record.data[kn]]); + record.commit(true); + }, + + onAdd : function(ds, records, index){ + for(var i = 0, len = records.length; i < len; i++){ + this.table.insert(this.processData(records[i].data)); + } + }, + + onRemove : function(ds, record, index){ + var kn = this.table.keyName; + this.table.removeBy(kn + ' = ?', [record.data[kn]]); + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/air/src/sql/Table.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/air/src/sql/Table.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/air/src/sql/Table.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,86 @@ +Ext.sql.Table = function(conn, name, keyName){ + this.conn = conn; + this.name = name; + this.keyName = keyName; +}; + +Ext.sql.Table.prototype = { + update : function(o){ + var clause = this.keyName + " = ?"; + return this.updateBy(o, clause, [o[this.keyName]]); + }, + + updateBy : function(o, clause, args){ + var sql = "UPDATE " + this.name + " set "; + var fs = [], a = []; + for(var key in o){ + if(o.hasOwnProperty(key)){ + fs[fs.length] = key + ' = ?'; + a[a.length] = o[key]; + } + } + for(var key in args){ + if(args.hasOwnProperty(key)){ + a[a.length] = args[key]; + } + } + sql = [sql, fs.join(','), ' WHERE ', clause].join(''); + return this.conn.execBy(sql, a); + }, + + insert : function(o){ + var sql = "INSERT into " + this.name + " "; + var fs = [], vs = [], a = []; + for(var key in o){ + if(o.hasOwnProperty(key)){ + fs[fs.length] = key; + vs[vs.length] = '?'; + a[a.length] = o[key]; + } + } + sql = [sql, '(', fs.join(','), ') VALUES (', vs.join(','), ')'].join(''); + return this.conn.execBy(sql, a); + }, + + lookup : function(id){ + return this.selectBy('where ' + this.keyName + " = ?", [id])[0] || null; + }, + + exists : function(id){ + return !!this.lookup(id); + }, + + save : function(o){ + if(this.exists(o[this.keyName])){ + this.update(o); + }else{ + this.insert(o); + } + }, + + select : function(clause){ + return this.selectBy(clause, null); + }, + + selectBy : function(clause, args){ + var sql = "select * from " + this.name; + if(clause){ + sql += ' ' + clause; + } + args = args || {}; + return this.conn.queryBy(sql, args); + }, + + remove : function(clause){ + this.deleteBy(clause, null); + }, + + removeBy : function(clause, args){ + var sql = "delete from " + this.name; + if(clause){ + sql += ' where ' + clause; + } + args = args || {}; + this.conn.execBy(sql, args); + } +}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/core/Element-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/core/Element-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/core/Element-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -48,8 +48,8 @@ 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(this.isBorderBox()){w-=this.getFrameWidth('lr');}} -if(s.height&&s.height!='auto'){h=parseInt(s.height,10);if(this.isBorderBox()){h-=this.getFrameWidth('tb');}} +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"));} @@ -80,18 +80,18 @@ if(typeof callback=="function"){callback();}});dom.innerHTML=html.replace(/(?:<script.*?>)((\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&&this.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"));} +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.addClass("x-masked-relative");} +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","x-masked-relative"]);},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='0';el.className='ext-shim';if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL;} +this.removeClass("x-masked");},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='0';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){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(Ext.isArray(eventName)){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;} Modified: mickael/trunk/ext/v3.0.0-a1/build/core/Element.insertion-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/core/Element.insertion-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/core/Element.insertion-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -11,4 +11,4 @@ return rt;} where=where?where.toLowerCase():'before';el=el||{};var refNode=where=='before'?this.dom:this.dom.nextSibling;if(typeof el=='object'&&!el.nodeType&&!el.dom){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;},replace:function(el){el=Ext.get(el);this.insertBefore(el);el.remove();return this;},replaceWith:function(el){if(typeof el=='object'&&!el.nodeType&&!el.dom){el=this.insertSibling(el,'before');}else{el=Ext.getDom(el);this.dom.parentNode.insertBefore(el,this.dom);} -El.uncache(this.id);Ext.removeNode(this.dom);this.dom=el;this.id=Ext.id(el);El.cache[this.id]=this;return this;}}); \ No newline at end of file +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;}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/core/Element.scroll-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/core/Element.scroll-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/core/Element.scroll-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -10,7 +10,7 @@ Ext.Element.addMethods({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);},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){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;},scrollChildIntoView:function(child,hscroll){Ext.fly(child,'_scrollChildIntoView').scrollIntoView(this,hscroll);},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;} Modified: mickael/trunk/ext/v3.0.0-a1/build/core/EventManager-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/core/EventManager-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/core/EventManager-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -21,15 +21,14 @@ 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("<s"+'cript id="ie-deferred-loader" defer="defer" src="/'+'/:"></s'+"cript>");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,scope){return function(e){Ext.EventManager.removeListener(el,ename,fn,scope);h(e);};};var createDelayed=function(h,o){return function(e){e=new Ext.EventObjectImpl(e);setTimeout(function(){h(e);},o.delay||10);};};var createTargeted=function(h,o){return function(){if(o.target==Ext.EventObject.setEvent(arguments[0]).target){h.apply(this,Array.prototype.slice.call(arguments,0));}};};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.';} +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,scope){return function(e){Ext.EventManager.removeListener(el,ename,fn,scope);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){if(!window[xname]){return;} 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.target){h=createTargeted(h,o);} -if(o.delay){h=createDelayed(h,o);} +fn.call(scope||el,e,t,o);};if(o.delay){h=createDelayed(h,o);} if(o.single){h=createSingle(h,el,ename,fn,scope);} if(o.buffer){h=createBuffered(h,o);} addListener(el,ename,fn,h,scope);return h;};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;} @@ -38,10 +37,10 @@ return listen(element,eventName,options,fn,scope);},removeListener:function(element,eventName,fn,scope){return removeListener(element,eventName,fn,scope);},removeAll:function(element){return removeAll(element);},onDocumentReady:function(fn,scope,options){if(docReadyState){docReadyEvent.addListener(fn,scope,options);docReadyEvent.fire();docReadyEvent.clearListeners();return;} if(!docReadyEvent){initDocReady();} options=options||{};if(!options.delay){options.delay=1;} -docReadyEvent.addListener(fn,scope,options);},doResizeEvent:function(){resizeEvent.fire(D.getViewWidth(),D.getViewHeight());},onWindowResize:function(fn,scope,options){if(!resizeEvent){resizeEvent=new Ext.util.Event();resizeTask=new Ext.util.DelayedTask(this.doResizeEvent);E.on(window,"resize",this.fireWindowResize,this);} +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;(function(){var initExtCss=function(){var bd=document.body||document.getElementsByTagName('body')[0];if(!bd){return false;} -var cls=[' ',Ext.isIE?"ext-ie "+(Ext.isIE6?'ext-ie6':(Ext.isIE7?'ext-ie7':'ext-ie8')):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?'ext-gecko2':'ext-gecko3'):Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":Ext.isChrome?"ext-chrome":""];if(Ext.isMac){cls.push("ext-mac");} +var cls=[' ',Ext.isIE?"ext-ie "+(Ext.isIE6?'ext-ie6':'ext-ie7'):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?'ext-gecko2':'ext-gecko3'):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.parentNode;if(p){p.className+=' ext-strict';}} Modified: mickael/trunk/ext/v3.0.0-a1/build/core/Ext-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/core/Ext-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/core/Ext-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,21 +9,21 @@ Ext={version:'3.0'};window["undefined"]=window["undefined"];Ext.apply=function(o,c,defaults){if(defaults){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,isChrome=ua.indexOf("chrome")>-1,isSafari=!isChrome&&(/webkit|khtml/).test(ua),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isIE8=!isOpera&&ua.indexOf("msie 8")>-1,isGecko=!isSafari&&!isChrome&&ua.indexOf("gecko")>-1,isGecko3=isGecko&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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){}} +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),isSafari3=isSafari&&ua.indexOf('webkit/5')!=-1,isIE=!isOpera&&ua.indexOf("msie")>-1,isIE7=!isOpera&&ua.indexOf("msie 7")>-1,isGecko=!isSafari&&ua.indexOf("gecko")>-1,isGecko3=!isSafari&&ua.indexOf("rv:1.9")>-1,isBorderBox=isIE&&!isStrict,isWindows=(ua.indexOf("windows")!=-1||ua.indexOf("win32")!=-1),isMac=(ua.indexOf("macintosh")!=-1||ua.indexOf("mac os x")!=-1),isAir=(ua.indexOf("adobeair")!=-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];}};var oc=Object.prototype.constructor;return function(sb,sp,overrides){if(typeof sp=='object'){overrides=sp;sp=sb;sb=overrides.constructor!=oc?overrides.constructor: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==oc){spp.constructor=sp;} -sb.override=function(o){Ext.override(sb,o);};sbp.superclass=sbp.supr=(function(){return spp;});sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};return sb;};}(),extendX:function(supr,fn){return Ext.extend(supr,fn(supr.prototype));},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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} +sb.override=function(o){Ext.override(sb,o);};sbp.override=io;Ext.override(sb,overrides);sb.extend=function(o){Ext.extend(sb,o);};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<a.length;++i){d=a[i].split(".");rt=d[0];eval('if (typeof '+rt+' == "undefined"){'+rt+' = {};} o = '+rt+';');for(j=1;j<d.length;++j){o[d[j]]=o[d[j]]||{};o=o[d[j]];}}},urlEncode:function(o){if(!o){return"";} var buf=[];for(var key in o){var ov=o[key],k=encodeURIComponent(key);var type=typeof ov;if(type=='undefined'){buf.push(k,"=&");}else if(type!="function"&&type!="object"){buf.push(k,"=",encodeURIComponent(ov),"&");}else if(Ext.isArray(ov)){if(ov.length){for(var i=0,len=ov.length;i<len;i++){buf.push(k,"=",encodeURIComponent(ov[i]===undefined?'':ov[i]),"&");}}else{buf.push(k,"=&");}}} buf.pop();return buf.join("");},urlDecode:function(string,overwrite){if(!string||!string.length){return{};} var obj={};var pairs=string.split('&');var pair,name,value;for(var i=0,len=pairs.length;i<len;i++){pair=pairs[i].split('=');name=decodeURIComponent(pair[0]);value=decodeURIComponent(pair[1]);if(overwrite!==true){if(typeof obj[name]=="undefined"){obj[name]=value;}else if(typeof obj[name]=="string"){obj[name]=[obj[name]];obj[name].push(value);}else{obj[name].push(value);}}else{obj[name]=value;}} return obj;},each:function(array,fn,scope){if(typeof array.length=="undefined"||typeof array=="string"){array=[array];} for(var i=0,len=array.length;i<len;i++){if(fn.call(scope||array[i],array[i],i,array)===false){return i;};}},combine:function(){var as=arguments,l=as.length,r=[];for(var i=0;i<l;i++){var a=as[i];if(Ext.isArray(a)){r=r.concat(a);}else if(a.length!==undefined&&!a.substr){r=r.concat(Array.prototype.slice.call(a,0));}else{r.push(a);}} return r;},escapeRe:function(s){return s.replace(/([.*+?^${}()|[\]\/\\])/g,"\\$1");},callback:function(cb,scope,args,delay){if(typeof cb=="function"){if(delay){cb.defer(delay,scope,args||[]);}else{cb.apply(scope,args||[]);}}},getDom:function(el){if(!el||!document){return null;} -return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'||isNaN(v)){return defaultValue;} +return el.dom?el.dom:(typeof el=='string'?document.getElementById(el):el);},getDoc:function(){return Ext.get(document);},getBody:function(){return Ext.get(document.body||document.documentElement);},getCmp:function(id){return Ext.ComponentMgr.get(id);},num:function(v,defaultValue){if(typeof v!='number'){return defaultValue;} return v;},destroy:function(){for(var i=0,a=arguments,len=a.length;i<len;i++){var as=a[i];if(as){if(typeof as.destroy=='function'){as.destroy();} else if(as.dom){as.removeAllListeners();as.remove();}}}},destroyMembers:function(o,arg1,arg2,etc){for(var i=1,a=arguments,len=a.length;i<len;i++){Ext.destroy(o[a[i]]);delete o[a[i]];}},removeNode:isIE?function(){var d;return function(n){if(n&&n.tagName!='BODY'){d=d||document.createElement('div');d.appendChild(n);d.innerHTML='';}}}():function(n){if(n&&n.parentNode&&n.tagName!='BODY'){n.parentNode.removeChild(n);}},type:function(o){if(o===undefined||o===null){return false;} if(o.htmlElement){return'element';} @@ -32,7 +32,7 @@ if(typeof o.length=='number'&&typeof o.item=='function'){return'nodelist';}} return t;},isEmpty:function(v,allowBlank){return v===null||v===undefined||(!allowBlank?v==='':false);},value:function(v,defaultValue,allowBlank){return Ext.isEmpty(v,allowBlank)?defaultValue:v;},isArray:function(v){return v&&typeof v.length=='number'&&typeof v.splice=='function';},isDate:function(v){return v&&typeof v.getFullYear=='function';},copyTo:function(dest,source,names){if(typeof names=='string'){names=names.split(/[,;\s]/);} for(var i=0,len=names.length;i<len;i++){var n=names[i];if(source.hasOwnProperty(n)){dest[n]=source[n];}} -return dest;},intercept:function(o,name,fn,scope){o[name]=o[name].createInterceptor(fn,scope);},sequence:function(o,name,fn,scope){o[name]=o[name].createSequence(fn,scope);},isOpera:isOpera,isChrome:isChrome,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7&&!isIE8,isIE7:isIE7,isIE8:isIE8,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart","Ext.direct");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} +return dest;},isOpera:isOpera,isSafari:isSafari,isSafari3:isSafari3,isSafari2:isSafari&&!isSafari3,isIE:isIE,isIE6:isIE&&!isIE7,isIE7:isIE7,isGecko:isGecko,isGecko2:isGecko&&!isGecko3,isGecko3:isGecko3,isBorderBox:isBorderBox,isLinux:isLinux,isWindows:isWindows,isMac:isMac,isAir:isAir,useShims:((isIE&&!isIE7)||(isMac&&isGecko&&!isGecko3))});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","Ext.chart");Ext.apply(Function.prototype,{createCallback:function(){var args=arguments;var method=this;return function(){return method.apply(window,args);};},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);var applyArgs=[appendArgs,0].concat(args);Array.prototype.splice.apply(callArgs,applyArgs);} return method.apply(obj||window,callArgs);};},defer:function(millis,obj,args,appendArgs){var fn=this.createDelegate(obj,args,appendArgs);if(millis){return setTimeout(fn,millis);} fn();return 0;},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;};},createInterceptor:function(fcn,scope){if(typeof fcn!="function"){return this;} Modified: mickael/trunk/ext/v3.0.0-a1/build/core/Fx-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/core/Fx-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/core/Fx-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -14,9 +14,8 @@ 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(){var to=o.endOpacity||0;arguments.callee.anim=this.fxanim({opacity:{to:to}},o,null,.5,"easeOut",function(){if(to===0){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)};} +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(o.left!==undefined){a.left={to:o.left};} if(o.top!==undefined){a.top={to:o.top};} Added: mickael/trunk/ext/v3.0.0-a1/build/css/borders-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/borders-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/borders-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,69 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/box-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/box-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/box-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,109 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + + + +.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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/button-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/button-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/button-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,424 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 arial,tahoma,verdana,helvetica; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; + color:#333; +} +* html .ext-ie .x-btn button { + width:1px; +} +.ext-gecko .x-btn button { + padding-left:0; + padding-right:0; +} +.ext-gecko .x-btn button::-moz-focus-inner { + padding:0; +} +.ext-ie .x-btn button { + padding-top:2px; +} +.x-btn em { + font-style:normal; + font-weight:normal; +} +.x-btn td { + padding:0 !important; +} +.x-btn-text { + cursor:pointer; + white-space: nowrap; + padding:0; +} + + + + +.x-btn-noicon .x-btn-small .x-btn-text{ + height: 16px; +} +.x-btn-noicon .x-btn-medium .x-btn-text{ + height: 24px; +} +.x-btn-noicon .x-btn-large .x-btn-text{ + height: 32px; +} + + +.x-btn-icon .x-btn-text{ + background-position: center; + background-repeat: no-repeat; +} +.x-btn-icon .x-btn-small .x-btn-text{ + height: 16px; + width: 16px; +} +.x-btn-icon .x-btn-medium .x-btn-text{ + height: 24px; + width: 24px; +} +.x-btn-icon .x-btn-large .x-btn-text{ + height: 32px; + width: 32px; +} + + + +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:18px; + height:16px; +} +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:26px; + height:24px; +} +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:34px; + height:32px; +} + +.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:18px; +} +.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:26px; +} +.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:34px; +} + +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:18px; + height:16px; +} +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:26px; + height:24px; +} +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:34px; + height:32px; +} + +.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:18px; +} +.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:26px; +} +.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:34px; +} + + +.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ + font-size:1px; + line-height:1px; + width:3px; + display:block; + overflow:hidden; +} +.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ + height:3px; +} +.x-btn-tl{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 0; +} +.x-btn-tr{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px 0; +} +.x-btn-tc{ + height:3px; + background:url(../images/default/button/btn.gif) repeat-x 0 -6px; +} + +.x-btn-ml{ + width:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 -24px; +} +.x-btn-mr{ + width:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px -24px; +} + +.x-btn-mc{ + background:url(../images/default/button/btn.gif) repeat-x 0 -1096px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} +.x-btn-bl{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 -3px; +} +.x-btn-br{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px -3px; +} +.x-btn-bc{ + height:3px; + background:url(../images/default/button/btn.gif) repeat-x 0 -15px; +} + + +.x-btn-over .x-btn-tl{ + background-position: -6px 0; +} +.x-btn-over .x-btn-tr{ + background-position: -9px 0; +} +.x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} +.x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} +.x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} +.x-btn-over .x-btn-br{ + background-position: -9px -3px; +} +.x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + + +.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} +.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} +.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} +.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} +.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} +.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} +.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + + +.x-btn-disabled *{ + color:gray !important; + cursor:default !important; +} + + + + +.x-btn-mc em.x-btn-arrow { + display:block; + background:transparent url(../images/default/button/arrow.gif) no-repeat right center; + padding-right:10px; +} + +.x-btn-mc em.x-btn-split { + display:block; + background:transparent url(../images/default/button/s-arrow.gif) no-repeat right center; + padding-right:14px; +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + display:block; + background:transparent url(../images/default/button/s-arrow-b-noline.gif) no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-mc em.x-btn-split-bottom { + display:block; + background:transparent url(../images/default/button/s-arrow-b.gif) no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + + +.x-btn-as-arrow .x-btn-mc em { + display:block; + background:transparent; + padding-bottom:14px; +} + + +.x-btn-group { + padding:1px; +} +.x-btn-group-header { + padding:2px; + color: #3e6aaa; + text-align:center; +} +.x-btn-group-tc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 0; + overflow:hidden; +} +.x-btn-group-tl { + background: transparent url(../images/default/button/group-cs.gif) no-repeat 0 0; + padding-left:3px; + zoom:1; +} +.x-btn-group-tr { + background: transparent url(../images/default/button/group-cs.gif) no-repeat right 0; + zoom:1; + padding-right:3px; +} +.x-btn-group-bc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 bottom; + zoom:1; +} +.x-btn-group-bc .x-panel-footer { + zoom:1; +} + +.x-btn-group-bl { + background: transparent url(../images/default/button/group-cs.gif) no-repeat 0 bottom; + padding-left:3px; + zoom:1; +} +.x-btn-group-br { + background: transparent url(../images/default/button/group-cs.gif) no-repeat right bottom; + padding-right:3px; + zoom:1; +} +.x-btn-group-mc { + border:0 none; + padding:1px 0 0 0; + margin:0; +} +.x-btn-group-mc .x-btn-group-body { + background:transparent; + border: 0 none; +} +.x-btn-group-ml { + background: transparent url(../images/default/button/group-lr.gif) repeat-y 0 0; + padding-left:3px; + zoom:1; +} +.x-btn-group-mr { + background: transparent url(../images/default/button/group-lr.gif) repeat-y right 0; + padding-right:3px; + zoom:1; +} +.x-btn-group-bc .x-btn-group-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-btn-group-bc { + height:3px; + font-size:0; + line-height:0; +} +.x-btn-group-bwrap { + overflow:hidden; + zoom:1; +} +.x-btn-group-body { + overflow:hidden; + zoom:1; +} +.x-btn-group-notitle .x-btn-group-tc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 0; + overflow:hidden; + height:2px; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/css/combo-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/combo-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/combo-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,63 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/core-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/core-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/core-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,346 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} + +.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-history-frame { + position:absolute; + top:-1px; + left:0; + width:1px; + height:1px; + visibility:hidden; +} + +#x-history-field { + position:absolute; + top:0; + left:-1px; + width:1px; + height:1px; + visibility:hidden; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/date-picker-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/date-picker-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/date-picker-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,257 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, +.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, +.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ + background:transparent !important; + vertical-align:middle; +} +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} +.x-date-middle .x-btn-mc em.x-btn-arrow { + 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; + width:130px; +} +.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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/dd-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/dd-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/dd-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,89 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/debug-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/debug-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/debug-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,45 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/dialog-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/dialog-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/dialog-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,77 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} +.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; +} +.ext-gecko2 .ext-mb-fix-cursor { + overflow:auto; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/css/editor-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/editor-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/editor-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,74 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/form-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/form-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/form-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,567 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + + +.x-form-field{ + margin: 0 0 0 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; +} +textarea.x-form-field { + padding:2px 3px; +} +.x-form-text, .ext-ie .x-form-file { + height:22px; + line-height:18px; + vertical-align:middle; +} +.ext-ie .x-form-text { + margin:-1px 0; + height:22px; + line-height:18px; +} +.ext-ie textarea.x-form-field { + margin:-1px 0; +} +.ext-strict .x-form-text { + height:18px; +} +.ext-safari.ext-mac textarea.x-form-field { + margin-bottom:-2px; +} +.ext-gecko .x-form-text { + padding-top:2px; + padding-bottom:0; +} +textarea { + resize: none; +} + + + +.x-form-select-one { + height:20px; + line-height:18px; + vertical-align:middle; + background-color:#fff; + border: 1px solid #B5B8C8; +} + + + + + + +.x-form-check-group, .x-form-radio-group { + margin-bottom: 0; +} +.x-form-check-group .x-form-invalid .x-panel-body, +.x-form-radio-group .x-form-invalid .x-panel-body { + background-color: transparent; +} +.x-form-check-wrap, .x-form-radio-wrap { + padding: 3px 0 0 0; + line-height:18px; +} +.x-form-check-group .x-form-check-wrap, +.x-form-radio-group .x-form-radio-wrap { + height: 18px; +} +.ext-ie .x-form-check-group .x-form-check-wrap, +.ext-ie .x-form-radio-group .x-form-radio-wrap { + height: 21px; +} +.ext-ie .x-form-check-wrap input, +.ext-ie .x-form-radio-wrap input { + width:15px; + height:15px; +} +.x-form-check, .x-form-radio { + height: 13px; + width: 13px; + vertical-align: bottom; +} +.x-form-radio { + margin-bottom: 3px; +} +.x-form-check, .ext-ie .x-form-radio { + margin-bottom: 2px; +} +.x-form-check-wrap-inner, .x-form-radio-wrap-inner { + display: inline; + padding: 3px 0 0 0; +} +.x-form-check { + background: url('../images/default/form/checkbox.gif') no-repeat 0 0; +} +.x-form-radio { + background: url('../images/default/form/radio.gif') no-repeat 0 0; +} +.x-form-check-focus .x-form-check, .x-form-check-over .x-form-check, +.x-form-check-focus .x-form-radio, .x-form-check-over .x-form-radio { + background-position: -13px 0; +} +.x-form-check-down .x-form-check, +.x-form-check-down .x-form-radio { + background-position:-26px 0; +} +.x-form-check-checked .x-form-check-focus .x-form-check, +.x-form-check-checked .x-form-check-over .x-form-check { + background-position:-13px -13px; +} +.x-form-check-checked .x-form-check-down .x-form-check { + background-position:-26px -13px; +} +.x-form-check-checked .x-form-check, +.x-form-check-checked .x-form-radio { + background-position:0 -13px; +} +.x-form-check-group-label { + border-bottom: 1px solid #99BBE8; + color: #15428B; + margin-bottom: 5px; + padding-left: 3px !important; + float: none !important; +} + + + +.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 { + position:relative; + left:0;top:0; + zoom:1; + white-space: nowrap; +} + +.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 #cc3300; +} +.ext-safari .x-form-invalid{ + background-color:#ffeeee; + border: 1px solid #ff7870; +} +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom; +} + + +.x-editor { + visibility:hidden; + padding:0; + margin:0; +} +.x-form-check-wrap { + height: 22px; + 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; + zoom:1; +} + +.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:#c0272b; + 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-left label { + text-align:left; +} +.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; + display:block; +} +.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:10px; +} +.x-fieldset legend .x-tool-toggle { + margin-right:3px; + margin-left:0; + float:left !important; +} +.x-fieldset legend input { + margin-right:3px; + float:left !important; + height:13px; + width:13px; +} +fieldset.x-panel-collapsed { + padding-bottom:0 !important; + border-width: 1px 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 .x-toolbar .x-form-text { + position:relative; + top:-1px; +} +.x-fieldset-noborder { + border:0px none transparent; +} +.x-fieldset-noborder legend { + margin-left:-3px; +} + +.ext-ie .x-fieldset-noborder legend { + position: relative; + margin-bottom:23px; +} +.ext-ie .x-fieldset-noborder legend span { + position: absolute; + left:-5px; +} + +.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-fieldset { + overflow:hidden; +} + +.x-fieldset-bwrap { + overflow:hidden; + zoom:1; +} + +.x-fieldset-body { + overflow:hidden; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/grid-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/grid-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/grid-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,599 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + + + + + + + + +.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; +} + +.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-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; + + 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; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; +} + + +.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 #eeeeee; +} + + +.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,.x-grid3-row-checked .x-grid3-row-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-td-row-icon { + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; + vertical-align:top; + text-align:center; +} +.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { + padding:0 !important; + background-position:center center; + background-repeat:no-repeat; + width:16px; + height:16px; + margin-left:2px; + margin-top:3px; +} + + + +.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; +} +.ext-ie .x-props-grid .x-editor .x-form-text { + position:static; + top:0; +} + +.x-grid-empty { + padding:10px; + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + + + +.ext-ie7 .x-grid-panel .x-panel-bbar { + position:relative; +} + + + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + padding-right:0; + border-right:1px solid #ededed; +} +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/layout-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/layout-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/layout-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,309 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} + + +.ext-strict .ext-ie6 .x-layout-split{ + background-color: #fff !important; + filter: alpha(opacity=1); +} + +.x-layout-split-h{ + background-image:url(../images/default/s.gif); + background-position: left; +} +.x-layout-split-v{ + background-image:url(../images/default/s.gif); + background-position: top; +} + +.x-column-layout-ct { + overflow:hidden; + + zoom:1; +} + +.x-column { + float:left; + padding:0; + margin:0; + overflow:hidden; + zoom:1; + +} +.x-column-inner { + overflow:hidden; + zoom:1; +} + + + +.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; +} + +.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { + margin:0; +} + + +.x-box-layout-ct { + overflow:hidden; + zoom:1; +} +.x-box-inner { + overflow:hidden; + zoom:1; + position:relative; + left:0; + top:0; +} +.x-box-item { + position:absolute; + left:0; + top:0; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/css/list-view-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/list-view-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/list-view-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,97 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + +.x-list-header{ + background: #f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom; + cursor:default; + zoom:1; + height:22px; +} +.x-list-header-inner div { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; +} +.x-list-header-inner div em { + display:block; + border-left:1px solid #ddd; + padding:4px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + font:normal 11px arial, tahoma, helvetica, sans-serif; + line-height:14px; +} +.x-list-body { + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + zoom:1; +} +.x-list-body dl { + zoom:1; +} +.x-list-body dt { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + cursor:pointer; + zoom:1; +} +.x-list-body dt em { + display:block; + padding:3px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#DFE8F6; +} + +.x-list-resizer { + border-left:1px solid #555; + border-right:1px solid #555; + position:absolute; + left:0; + top:0; +} + +.x-list-header-inner em.sort-asc { + background: transparent url(../images/default/grid/sort-hd.gif) no-repeat center 0; + border-color: #99bbe8; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} +.x-list-header-inner em.sort-desc { + background: transparent url(../images/default/grid/sort-hd.gif) no-repeat center -23px; + border-color: #99bbe8; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/menu-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/menu-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/menu-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,156 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + overflow:hidden; +} +.x-menu-focus { + position:absolute; + left:-1px; + top:-1px; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + overflow:hidden; + display:block; +} +.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; + 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; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/panel-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/panel-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/panel-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,431 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + position: relative; +} + +.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; +} + +.ext-strict .ext-ie7 .x-panel-tc { + overflow: visible; +} +.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, .x-panel-nofooter .x-window-bc { + height:6px; + font-size:0; + line-height:0; +} + +.x-panel-bwrap { + overflow:hidden; + zoom:1; + left:0;top:0; +} +.x-panel-body { + overflow:hidden; + zoom:1; +} + +.x-panel-collapsed .x-resizable-handle{ + display:none; +} + +.ext-gecko .x-panel-animated div { + overflow:hidden !important; +} + + +.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-tool-print { + background-position:0 -315px; +} +.x-tool-print-over { + background-position:-15px -315px; +} + + +.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; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/progress-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/progress-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/progress-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,51 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/qtips-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/qtips-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/qtips-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,147 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/reset-min-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/reset-min-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/reset-min-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/reset-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/reset-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/reset-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,9 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/resizable-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/resizable-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/resizable-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,149 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + +.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); +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/slider-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/slider-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/slider-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,92 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +.x-slider { + zoom:1; +} +.x-slider-inner { + position:relative; + left:0; + top:0; + overflow:visible; + zoom:1; +} +.x-slider-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + display:block; + overflow:hidden; +} + + +.x-slider-horz { + padding-left:7px; + background:transparent url(../images/default/slider/slider-bg.png) no-repeat 0 -22px; +} +.x-slider-horz .x-slider-end { + padding-right:7px; + zoom:1; + background:transparent url(../images/default/slider/slider-bg.png) no-repeat right -44px; +} +.x-slider-horz .x-slider-inner { + background:transparent url(../images/default/slider/slider-bg.png) repeat-x 0 0; + height:22px; +} +.x-slider-horz .x-slider-thumb { + width:14px; + height:15px; + position:absolute; + left:0; + top:3px; + background:transparent url(../images/default/slider/slider-thumb.png) no-repeat 0 0; +} +.x-slider-horz .x-slider-thumb-over { + background-position: -14px -15px; +} +.x-slider-horz .x-slider-thumb-drag { + background-position: -28px -30px; +} + + +.x-slider-vert { + padding-top:7px; + background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -44px 0; + width:22px; +} +.x-slider-vert .x-slider-end { + padding-bottom:7px; + zoom:1; + background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -22px bottom; +} +.x-slider-vert .x-slider-inner { + background:transparent url(../images/default/slider/slider-v-bg.png) repeat-y 0 0; +} +.x-slider-vert .x-slider-thumb { + width:15px; + height:14px; + position:absolute; + left:3px; + bottom:0; + background:transparent url(../images/default/slider/slider-v-thumb.png) no-repeat 0 0; +} +.x-slider-vert .x-slider-thumb-over { + background-position: -15px -14px; +} +.x-slider-vert .x-slider-thumb-drag { + background-position: -30px -28px; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/css/tabs-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/tabs-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/tabs-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,363 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border:1px solid #8db2e3; + height:2px; + background: #deecfd; + font-size:1px; + line-height:1px; +} +.x-tab-panel-header-plain .x-tab-strip-spacer { + border-top: 0 none; +} +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-bottom: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-bottom { + background:transparent !important; + padding-bottom:0 !important; +} +.x-tab-panel-footer-plain { + background:transparent !important; + border-width:0 !important; + padding-top:0 !important; +} + +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, +.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { + height:3px; +} + +ul.x-tab-strip li { + float:left; + margin-left:2px; +} + + +ul.x-tab-strip li.x-tab-edge { + float:left; + margin:0 !important; + padding:0 !important; + border:0 none !important; + font-size:1px !important; + line-height:1px !important; + overflow:hidden; + zoom:1; + background:transparent !important; + width:1px; +} + +.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { + display:block; +} + +.x-tab-strip a { + text-decoration:none !important; + -moz-outline: none; + outline: none; + cursor:pointer; +} + +.x-tab-strip-inner { + overflow:hidden; + text-overflow: ellipsis; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; + white-space: nowrap; + cursor:pointer; + padding:4px 0; +} +.x-tab-strip-top .x-tab-with-icon .x-tab-right { + padding-left:6px; +} +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { + padding-left:20px; + background-position: 0 3px; + background-repeat: no-repeat; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { + cursor:default; +} + +.x-tab-strip-active span.x-tab-strip-text { + cursor:default; + 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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/toolbar-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/toolbar-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/toolbar-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,279 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + left:0; + top:0; + zoom:1; + overflow:hidden; +} +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} +.x-toolbar td { + vertical-align:middle; +} +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; + font:normal 11px arial,tahoma, 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-toolbar-cell { + vertical-align:middle; +} + +.x-toolbar .x-btn-tl{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-tr{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-tc{ + background-position: 500px 500px; +} + +.x-toolbar .x-btn-ml{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-mr{ + background-position: 500px 500px; +} + +.x-toolbar .x-btn-mc{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-bl{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-br{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-bc{ + background-position: 500px 500px; +} + + +.x-toolbar .x-btn-over .x-btn-tl{ + background-position: -6px 0; +} +.x-toolbar .x-btn-over .x-btn-tr{ + background-position: -9px 0; +} +.x-toolbar .x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-toolbar .x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} +.x-toolbar .x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} +.x-toolbar .x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} +.x-toolbar .x-btn-over .x-btn-br{ + background-position: -9px -3px; +} +.x-toolbar .x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} +.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} +.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} +.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} +.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} +.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} +.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + + + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar div.xtb-text{ + padding:2px 2px 0; + line-height:16px; + display:block; +} +.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/refresh.gif) !important; +} +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/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-toolbar-ct { + width:100%; +} + +.x-toolbar-left { + +} + +.x-toolbar-right td { + text-align:left; +} + +.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { + overflow:hidden; + zoom:1; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +} +.x-toolbar-more .x-btn-small .x-btn-text{ + height: 16px; + width: 12px; +} +.x-toolbar-more em.x-btn-arrow { + display:inline; + background:transparent; + padding-right:0; +} + +div.x-toolbar-no-items { + color:gray !important; + padding:5px 10px !important; +} + + + +.ext-border-box .x-toolbar-cell .x-form-text { + margin-top:1px !important; + margin-bottom:-1px !important; +} + +.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { + margin:0 !important; +} +.ext-ie .x-toolbar-cell .x-form-field-wrap { + height:21px; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/css/tree-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/tree-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/tree-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,260 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} + +.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); +} +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.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:#444444; +} +.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-arrows .x-tree-elbow{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-end{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-line{ + background:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + + + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} +.x-tree-node{ + 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); +} + +.x-tree-root-ct { + zoom:1; +} Added: mickael/trunk/ext/v3.0.0-a1/build/css/window-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/window-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/window-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,208 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + left:0;top:0; +} +.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-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 Added: mickael/trunk/ext/v3.0.0-a1/build/css/xtheme-gray-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/css/xtheme-gray-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/css/xtheme-gray-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,415 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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); +} + + +.x-tool { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + + +.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; +} + + + +.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); +} + + + +.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; +} + + + +.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); +} + + + +.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); +} + + + +.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; +} + + + +.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; +} + + + +.x-html-editor-wrap { + border-color:#d0d0d0; +} + + +.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 Modified: mickael/trunk/ext/v3.0.0-a1/build/data/ArrayReader-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/ArrayReader-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/ArrayReader-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,8 +7,6 @@ */ -Ext.data.ArrayReader=Ext.extend(Ext.data.JsonReader,{readRecords:function(o){this.arrayData=o;var s=this.meta;var sid=s?(s.idIndex||s.id):null;var recordType=this.recordType,fields=recordType.prototype.fields;var records=[];if(!this.getRoot){this.getRoot=s.root?this.getJsonAccessor(s.root):function(p){return p;};if(s.totalProperty){this.getTotal=this.getJsonAccessor(s.totalProperty);}} -var root=this.getRoot(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,n);values[f.name]=v;} +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,n);values[f.name]=v;} var record=new recordType(values,id);record.json=n;records[records.length]=record;} -var totalRecords=records.length;if(s.totalProperty){var v=parseInt(this.getTotal(o),10);if(!isNaN(v)){totalRecords=v;}} -return{records:records,totalRecords:totalRecords};}}); \ No newline at end of file +return{records:records,totalRecords:records.length};}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/data/DirectProxy-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/DirectProxy-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/DirectProxy-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,6 +9,6 @@ Ext.data.DirectProxy=function(config){Ext.apply(this,config);if(typeof this.paramOrder=='string'){this.paramOrder=this.paramOrder.split(/[\s,|]/);} Ext.data.DirectProxy.superclass.constructor.call(this);};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,load:function(params,reader,cb,scope,arg){if(this.fireEvent("beforeload",this,params)!==false){var args=[];if(this.paramOrder){for(var i=0,len=this.paramOrder.length;i<len;i++){args.push(params[this.paramOrder[i]]);}}else if(this.paramsAsHash){args.push(params);} -args.push({callback:function(result,e){if(!e.status){this.fireEvent("loadexception",this,e,result);cb.call(scope,null,arg,false);return;} +args.push({callback:function(result,e){if(!e.success){this.fireEvent("loadexception",this,e,result);cb.call(scope,null,arg,false);return;} var rs;try{rs=reader.readRecords(result);}catch(ex){this.fireEvent("loadexception",this,e,result,ex);cb.call(scope,null,arg,false);return;} this.fireEvent("load",this,e,arg);cb.call(scope,rs,arg,true);},scope:this});this.directFn.apply(window,args);}else{cb.call(scope||this,null,arg,false);}}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/data/JsonStore-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/JsonStore-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/JsonStore-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,4 +7,4 @@ */ -Ext.data.JsonStore=function(c){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(c,{proxy: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.reg('jsonstore',Ext.data.JsonStore); \ No newline at end of file +Ext.data.JsonStore=function(c){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(c,{proxy: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 Modified: mickael/trunk/ext/v3.0.0-a1/build/data/SimpleStore-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/SimpleStore-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/SimpleStore-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,4 +9,4 @@ 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.reg('simplestore',Ext.data.SimpleStore); \ No newline at end of file +Ext.data.SimpleStore.superclass.loadData.call(this,data,append);}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/data/Store-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/Store-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/Store-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -13,7 +13,7 @@ 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={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir);}else if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);} +this.sortToggle={};if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);} 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;} @@ -39,4 +39,4 @@ 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;},setBaseParam:function(name,value){this.baseParams=this.baseParams||{};this.baseParams[name]=value;}});Ext.reg('store',Ext.data.Store); \ No newline at end of file +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;},setBaseParam:function(name,value){this.baseParams=this.baseParams||{};this.baseParams[name]=value;}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/data/StoreMgr-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/StoreMgr-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/StoreMgr-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,4 +7,4 @@ */ -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.events?id:Ext.create(id,'store')):this.get(id);},getKey:function(o){return o.storeId||o.id;}}); \ No newline at end of file +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;}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/data/XmlReader-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/data/XmlReader-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/data/XmlReader-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -8,7 +8,7 @@ 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.idPath||this.meta.id;var totalRecords=0,success=true;if(this.meta.totalRecords){totalRecords=q.selectNumber(this.meta.totalRecords,root,0);} +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,n);values[f.name]=v;} var record=new recordType(values,id);record.node=n;records[records.length]=record;} Modified: mickael/trunk/ext/v3.0.0-a1/build/dd/DDCore-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/dd/DDCore-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/dd/DDCore-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,7 +7,7 @@ */ -(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;},moveOnly:false,unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(constrainTo,pad,inContent){if(typeof pad=="number"){pad={left:pad,right:pad,top:pad,bottom:pad};} +(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);} @@ -34,14 +34,13 @@ 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]&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}} +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<len;++i){if(targets[i].id==oTargetDD.id){return true;}} return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}} return null;},handleMouseDown:function(e,oDD){if(Ext.QuickTips){Ext.QuickTips.disable();} -if(this.dragCurrent){this.handleMouseUp(e);} this.currentTarget=e.getTarget();this.dragCurrent=oDD;var el=oDD.getEl();this.startX=e.getPageX();this.startY=e.getPageY();this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=Ext.dd.DDM;DDM.startDrag(DDM.startX,DDM.startY);},this.clickTimeThresh);},startDrag:function(x,y){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(x,y);this.dragCurrent.startDrag(x,y);} this.dragThreshMet=true;},handleMouseUp:function(e){if(Ext.QuickTips){Ext.QuickTips.enable();} if(!this.dragCurrent){return;} Modified: mickael/trunk/ext/v3.0.0-a1/build/dd/DragTracker-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/dd/DragTracker-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/dd/DragTracker-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -8,7 +8,6 @@ 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;if(this.preventDefault!==false){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;}} +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 Added: mickael/trunk/ext/v3.0.0-a1/build/direct/Direct-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/Direct-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/Direct-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,17 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:'xhr',PARSE:'parse',LOGIN:'login',SERVER:'exception'},constructor:function(){this.addEvents('event','exception');this.transactions={};this.providers={};},addProvider:function(provider){var a=arguments;if(a.length>1){for(var i=0,len=a.length;i<len;i++){this.addProvider(a[i]);} +return;} +if(!provider.events){provider=new Ext.Direct.PROVIDERS[provider.type](provider);} +provider.id=provider.id||Ext.id;this.providers[provider.id]=provider;provider.on('data',this.onProviderData,this);provider.on('exception',this.onProviderException,this);if(!provider.isConnected()){provider.connect();} +return provider;},getProvider:function(id){return this.providers[id];},removeProvider:function(id){var provider=id.id?id:providers[id.id];provider.un('data',this.onProviderData,this);provider.un('exception',this.onProviderException,this);delete this.providers[provider.id];return provider;},addTransaction:function(t){this.transactions[t.tid]=t;return t;},removeTransaction:function(t){delete this.transactions[t.tid||t];return t;},getTransaction:function(tid){return this.transactions[tid.tid||tid];},onProviderData:function(provider,e){if(Ext.isArray(e)){for(var i=0,len=e.length;i<len;i++){this.onProviderData(provider,e[i]);} +return;} +if(e.name&&e.name!='event'&&e.name!='exception'){this.fireEvent(e.name,e);}else if(e.type=='exception'){this.fireEvent('exception',e);} +this.fireEvent('event',e,provider);},createEvent:function(response,extraProps){return new Ext.Direct.eventTypes[response.type](Ext.apply(response,extraProps));}});Ext.Direct=new Ext.Direct();Ext.Direct.TID=1;Ext.Direct.PROVIDERS={}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/direct/Event-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/Event-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/Event-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,11 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.Direct.Event=function(config){Ext.apply(this,config);} +Ext.Direct.Event.prototype={status:true,getData:function(){return this.data;}};Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:'rpc',getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid);}});Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:false,type:'exception'});Ext.Direct.eventTypes={'rpc':Ext.Direct.RemotingEvent,'event':Ext.Direct.Event,'exception':Ext.Direct.ExceptionEvent}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/direct/JsonProvider-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/JsonProvider-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/JsonProvider-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(xhr){if(!Ext.isEmpty(xhr.responseText)){if(typeof xhr.responseText=='object'){return xhr.responseText;} +return Ext.decode(xhr.responseText);} +return null;},getEvents:function(xhr){var data=null;try{data=this.parseResponse(xhr);}catch(e){var event=new Ext.Direct.ExceptionEvent({data:e,xhr:xhr,code:Ext.Direct.exceptions.PARSE,message:'Error parsing json response: \n\n '+data}) +return[event];} +var events=[];if(Ext.isArray(data)){for(var i=0,len=data.length;i<len;i++){events.push(Ext.Direct.createEvent(data[i]));}}else{events.push(Ext.Direct.createEvent(data));} +return events;}}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/direct/PollingProvider-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/PollingProvider-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/PollingProvider-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,10 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3000,constructor:function(config){Ext.direct.PollingProvider.superclass.constructor.call(this,config);this.addEvents('beforepoll','poll');},isConnected:function(){return!!this.pollTask;},connect:function(){if(this.url&&!this.pollTask){this.pollTask=Ext.TaskMgr.start({run:function(){if(this.fireEvent('beforepoll',this)!==false){if(typeof this.url=='function'){this.url(this.baseParams);}else{Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams});}}},interval:this.interval,scope:this});this.fireEvent('connect',this);}else if(!this.url){throw'Error initializing PollingProvider, no url configured.';}},disconnect:function(){if(this.pollTask){Ext.TaskMgr.stop(this.pollTask);delete this.pollTask;this.fireEvent('disconnect',this);}},onData:function(opt,success,xhr){if(success){var events=this.getEvents(xhr);for(var i=0,len=events.length;i<len;i++){var e=events[i];this.fireEvent('data',this,e);}}else{var e=new Ext.Direct.ExceptionEvent({data:e,code:Ext.Direct.exceptions.TRANSPORT,message:'Unable to connect to the server.',xhr:xhr});this.fireEvent('data',this,e);}}});Ext.Direct.PROVIDERS['polling']=Ext.direct.PollingProvider; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/direct/Provider-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/Provider-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/Provider-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,10 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(config){Ext.apply(this,config);this.addEvents('connect','disconnect','data','exception');Ext.direct.Provider.superclass.constructor.call(this,config);},isConnected:function(){return false;},connect:Ext.emptyFn,disconnect:Ext.emptyFn}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/direct/RemotingProvider-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/RemotingProvider-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/RemotingProvider-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,16 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:1,enableBuffer:10,maxRetries:1,constructor:function(config){Ext.direct.RemotingProvider.superclass.constructor.call(this,config);this.addEvents('beforecall','call');this.namespace=this.namespace||window;this.transactions={};this.callBuffer=[];},initAPI:function(){var o=this.actions;for(var c in o){var cls=this.namespace[c]||(this.namespace[c]={});var ms=o[c];for(var i=0,len=ms.length;i<len;i++){var m=ms[i];cls[m.name]=this.createMethod(c,m);}}},isConnected:function(){return!!this.connected;},connect:function(){if(this.url){this.initAPI();this.connected=true;this.fireEvent('connect',this);}else if(!this.url){throw'Error initializing RemotingProvider, no url configured.';}},disconnect:function(){if(this.connected){this.connected=false;this.fireEvent('disconnect',this);}},onData:function(opt,success,xhr){if(success){var events=this.getEvents(xhr);for(var i=0,len=events.length;i<len;i++){var e=events[i];var t=e.getTransaction();this.fireEvent('data',this,e);if(t){this.doCallback(t,e,true);Ext.Direct.removeTransaction(t);}}}else{var ts=[].concat(opt.ts);for(var i=0,len=ts.length;i<len;i++){var t=this.getTransaction(opt.ts[i]);if(t&&t.retryCount<this.maxRetries){t.retry();}else{var e=new Ext.Direct.ExceptionEvent({data:e,transaction:t,code:Ext.Direct.exceptions.TRANSPORT,message:'Unable to connect to the server.',xhr:xhr});this.fireEvent('data',this,e);if(t){this.doCallback(t,e,false);Ext.Direct.removeTransaction(t);}}}}},getCallData:function(t){return{action:t.action,method:t.method,data:t.data,type:'rpc',tid:t.tid};},doSend:function(data){var o={url:this.url,callback:this.onData,scope:this};var callData;if(Ext.isArray(data)){callData=[];for(var i=0,len=data.length;i<len;i++){callData.push(this.getCallData(data[i]));}}else{callData=this.getCallData(data);} +if(this.enableUrlEncode){var params={};params[typeof this.enableUrlEncode=='string'?this.enableUrlEncode:'data']=Ext.encode(callData);o.params=params;}else{o.jsonData=callData;} +Ext.Ajax.request(o);},combineAndSend:function(){var len=this.callBuffer.length;if(len>0){this.doSend(len==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[];}},queueTransaction:function(t){this.callBuffer.push(t);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this);} +this.callTask.delay(typeof this.enableBuffer=='number'?this.enableBuffer:10);}else{this.combineAndSend();}},doCall:function(c,m,args){var data=null,hs=args[m.len],scope=args[m.len+1];if(m.len!==0){data=args.slice(0,m.len);} +var t=new Ext.Direct.Transaction({provider:this,args:args,action:c,method:m.name,data:data,cb:scope&&typeof hs=='function'?hs.createDelegate(scope):hs});if(this.fireEvent('beforecall',this,t)!==false){Ext.Direct.addTransaction(t);this.queueTransaction(t);this.fireEvent('call',this,t);}},doForm:function(c,m,form,callback,scope){var t=new Ext.Direct.Transaction({provider:this,action:c,method:m.name,args:[form,callback,scope],cb:scope&&typeof callback=='function'?callback.createDelegate(scope):callback});if(this.fireEvent('beforecall',this,t)!==false){Ext.Direct.addTransaction(t);form=Ext.getDom(form);var isUpload=String(form.getAttribute("enctype")).toLowerCase()=='multipart/form-data';var params={extTID:t.tid,extAction:c,extMethod:m.name,extUpload:String(isUpload)};if(callback&&typeof callback=='object'){Ext.apply(params,callback.params);} +Ext.Ajax.request({url:this.url,params:params,callback:this.onData,scope:this,form:form,isUpload:isUpload,ts:t});}},createMethod:function(c,m){var f;if(!m.formHandler){f=function(){this.doCall(c,m,Array.prototype.slice.call(arguments,0));}.createDelegate(this);}else{f=function(form,callback,scope){this.doForm(c,m,form,callback,scope);}.createDelegate(this);} +f.directCfg={action:c,method:m};return f;},getTransaction:function(opt){return opt&&opt.tid?Ext.Direct.getTransaction(opt.tid):null;},doCallback:function(t,e){var fn=e.status?'success':'failure';if(t&&t.cb){var hs=t.cb;var result=e.result||e.data;if(typeof hs=='function'){hs(result,e);}else{Ext.callback(hs[fn],hs.scope,[result,e]);Ext.callback(hs.callback,hs.scope,[result,e]);}}}});Ext.Direct.PROVIDERS['remoting']=Ext.direct.RemotingProvider; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/direct/Transaction-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/direct/Transaction-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/direct/Transaction-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,11 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.Direct.Transaction=function(config){Ext.apply(this,config);this.tid=++Ext.Direct.TID;this.retryCount=0;} +Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this);},retry:function(){this.retryCount++;this.send();},getProvider:function(){return this.provider;}}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-fr-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-fr-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-fr-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,24 +7,26 @@ */ -Ext.UpdateManager.defaults.indicatorText='<div class="loading-indicator">En cours de chargement...</div>';if(Ext.DataView){Ext.DataView.prototype.emptyText="";} -if(Ext.grid.GridPanel){Ext.grid.GridPanel.prototype.ddText="{0} ligne{1} sélectionnée{1}";} +Ext.UpdateManager.defaults.indicatorText='<div class="loading-indicator">En cours de chargement...</div>';if(Ext.View){Ext.View.prototype.emptyText="";} +if(Ext.grid.GridPanel){Ext.grid.GridPanel.prototype.ddText="{0} ligne(s) sélectionnée(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.shortMonthNames=["Janv","Févr","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"];Date.getShortMonthName=function(month){return Date.shortMonthNames[month];};Date.monthNames=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"];Date.monthNumbers={"Janvier":0,"Février":1,"Mars":2,"Avril":3,"Mai":4,"Juin":5,"Juillet":6,"Août":7,"Septembre":8,"Octobre":9,"Novembre":10,"Décembre":11};Date.getMonthNumber=function(name){return Date.monthNumbers[Ext.util.Format.capitalize(name)];};Date.dayNames=["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"];Date.getShortDayName=function(day){return Date.dayNames[day].substring(0,3);};Date.parseCodes.S.s="(?:er)";Ext.override(Date,{getSuffix:function(){return(this.getDate()==1)?"er":"";}});if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"OK",cancel:"Annuler",yes:"Oui",no:"Non"};} +Date.shortMonthNames=["Janv","Févr","Mars","Avr","Mai","Juin","Juil","Août","Sept","Oct","Nov","Déc"];Date.getShortMonthName=function(month){return Date.shortMonthNames[month];};Date.monthNames=["Janvier","Février","Mars","Avril","Mai","Juin","Juillet","Août","Septembre","Octobre","Novembre","Décembre"];Date.monthNumbers={"Janvier":0,"Février":1,"Mars":2,"Avril":3,"Mai":4,"Juin":5,"Juillet":6,"Août":7,"Septembre":8,"Octobre":9,"Novembre":10,"Décembre":11};Date.getMonthNumber=function(name){return Date.monthNumbers[Ext.util.Format.capitalize(name)];};Date.dayNames=["Dimanche","Lundi","Mardi","Mercredi","Jeudi","Vendredi","Samedi"];Date.getShortDayName=function(day){return Date.dayNames[day].substring(0,3);};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 antérieure à la date minimum",maxText:"Cette date est postérieure à la date maximum",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:'Mois suivant (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.Field){Ext.form.Field.prototype.invalidText="La valeur de ce champ est invalide";} 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,{decimalSeparator:",",decimalPrecision:2,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.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 ne peut être antérieure au {0}",maxText:"La date de ce champ ne peut être postérieure au {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@xxxxxxxxxxx"',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",columnsText:"Colonnes"});} +if(Ext.form.TimeField){Ext.apply(Ext.form.TimeField.prototype,{minText:"L'heure de ce champ ne peut être antérieure au {0}",maxText:"L'heure de ce champ ne peut être postérieure au {0}",invalidText:"{0} n'est pas une heure valide",format:"H:i",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H"});} +if(Ext.form.CheckboxGroup){Ext.apply(Ext.form.TextField.prototype,{blankText:"Vous devez sélectionner au moins un item du groupe"});} +if(Ext.form.RadioGroup){Ext.apply(Ext.form.RadioGroup.prototype,{blankText:"Vous devez sélectionner un choix"});} +if(Ext.form.BasicForm){Ext.form.BasicForm.prototype.waitTitle="Veuillez patienter...";} +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.GroupingView){Ext.apply(Ext.grid.GroupingView.prototype,{emptyGroupText:'(Aucun)',groupByText:'Grouper par ce champ',showGroupsText:'Afficher par groupes'});} if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Propriété",valueText:"Valeur",dateFormat:"d/m/Y"});} -if(Ext.layout.BorderLayout&&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."});} -if(Ext.form.TimeField){Ext.apply(Ext.form.TimeField.prototype,{minText:"L'heure de ce champ ne peut être antérieure à {0}",maxText:"L'heure de ce champ ne peut être postérieure à {0}",invalidText:"{0} n'est pas une heure valide",format:"H:i",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H"});} -if(Ext.form.CheckboxGroup){Ext.apply(Ext.form.CheckboxGroup.prototype,{blankText:"Vous devez sélectionner au moins un élément dans ce groupe"});} -if(Ext.form.RadioGroup){Ext.apply(Ext.form.RadioGroup.prototype,{blankText:"Vous devez sélectionner au moins un élément dans ce groupe"});} \ No newline at end of file +if(Ext.layout.BorderLayout&&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 Modified: mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-tr-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-tr-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/locale/ext-lang-tr-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -8,21 +8,21 @@ Ext.UpdateManager.defaults.indicatorText='<div class="loading-indicator">Yükleniyor ...</div>';if(Ext.View){Ext.View.prototype.emptyText="";} -if(Ext.grid.Grid){Ext.grid.Grid.prototype.ddText="Seçili satýr sayýsý : {0}";} +if(Ext.grid.GridPanel){Ext.grid.GridPanel.prototype.ddText="Şeçili satır sayısı : {0}";} if(Ext.TabPanelItem){Ext.TabPanelItem.prototype.closeText="Sekmeyi kapat";} -if(Ext.form.Field){Ext.form.Field.prototype.invalidText="Bu alandaki deðer geçersiz";} +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.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=["Pazar","Pazartesi","Salý","LJarþŸamba","PerþŸembe","Cuma","Cumartesi"];Date.shortDayNames=["Paz","Pzt","Sal","ÇrþŸ","Prþ","Cum","Cmt"];Date.getShortDayName=function(day){return Date.shortDayNames[day];};if(Ext.MessageBox){Ext.MessageBox.buttonText={ok:"Tamam",cancel:"İptal",yes:"Evet",no:"Hayýr"};} +Date.monthNames=["Ocak","Şubat","Mart","Nisan","Mayıs","Haziran","Temmuz","Ağustos","Eylül","Ekim","Kasım","Aralık"];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=["Pazar","Pazartesi","Salı","Çarşamba","Perşembe","Cuma","Cumartesi"];Date.shortDayNames=["Paz","Pzt","Sal","Çrş","Prş","Cum","Cmt"];Date.getShortDayName=function(day){return Date.shortDayNames[day];};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||"d/m/Y");};} -if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Bugün",minText:"Bu tarih izin verilen en küçük tarihten daha önce",maxText:"Bu tarih izin verilen en büyük tarihten daha sonra",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:'Gelecek Ay (Control+Right)',prevText:'Önceki Ay (Control+Left)',monthYearText:'Bir ay sŸeçiniz (Yýlý artýrmak/azaltmak için Control+Up/Down)',todayTip:"{0} (BoþŸluk TuþŸu - Spacebar)",format:"d/m/Y",okText:" Tamam ",cancelText:"İptal",startDay:1});} -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:"Gösterilen {0} - {1} / {2}",emptyMsg:'Gösterilebilecek veri yok'});} -if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Girilen verinin uzunluðu en az {0} olabilir",maxLengthText:"Girilen verinin uzunluðu en fazla {0} olabilir",blankText:"Bu alan boþŸ býrakýlamaz",regexText:"",emptyText:null});} -if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"En az {0} girilebilir",maxText:"En çok {0} girilebilir",nanText:"{0} geçersiz bir sayýdýr"});} -if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"Bu tarih, {0} tarihinden daha sonra olmalýdýr",maxText:"Bu tarih, {0} tarihinden daha önce olmalýdýr",invalidText:"{0} geçersiz bir tarihdir - tarih formatý {1} þŸeklinde olmalýdýr",format:"d/m/Y",altFormats:"d.m.y|d.m.Y|d/m/y|d-m-Y|d-m-y|d.m|d/m|d-m|dm|dmY|dmy|d|Y.m.d|Y-m-d|Y/m/d"});} +if(Ext.DatePicker){Ext.apply(Ext.DatePicker.prototype,{todayText:"Bugün",minText:"Bu tarih izin verilen en küçük tarihten daha önce",maxText:"Bu tarih izin verilen en büyük tarihten daha sonra",disabledDaysText:"",disabledDatesText:"",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:'Gelecek Ay (Control+Right)',prevText:'Önceki Ay (Control+Left)',monthYearText:'Bir ay şeçiniz (Yılı artırmak/azaltmak için Control+Up/Down)',todayTip:"{0} (Boşluk Tuşu - Spacebar)",format:"d/m/Y",okText:" Tamam ",cancelText:"İptal",startDay:1});} +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:"Gösterilen {0} - {1} / {2}",emptyMsg:'Gösterilebilecek veri yok'});} +if(Ext.form.TextField){Ext.apply(Ext.form.TextField.prototype,{minLengthText:"Girilen verinin uzunluğu en az {0} olabilir",maxLengthText:"Girilen verinin uzunluğu en fazla {0} olabilir",blankText:"Bu alan boş bırakılamaz",regexText:"",emptyText:null});} +if(Ext.form.NumberField){Ext.apply(Ext.form.NumberField.prototype,{minText:"En az {0} girilebilir",maxText:"En çok {0} girilebilir",nanText:"{0} geçersiz bir sayıdır"});} +if(Ext.form.DateField){Ext.apply(Ext.form.DateField.prototype,{disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"Bu tarih, {0} tarihinden daha sonra olmalıdır",maxText:"Bu tarih, {0} tarihinden daha önce olmalıdır",invalidText:"{0} geçersiz bir tarihdir - tarih formatı {1} şeklinde olmalıdır",format:"d/m/Y",altFormats:"d.m.y|d.m.Y|d/m/y|d-m-Y|d-m-y|d.m|d/m|d-m|dm|dmY|dmy|d|Y.m.d|Y-m-d|Y/m/d"});} if(Ext.form.ComboBox){Ext.apply(Ext.form.ComboBox.prototype,{loadingText:"Yükleniyor ...",valueNotFoundText:undefined});} -if(Ext.form.VTypes){Ext.form.VTypes["emailText"]='Bu alan "user@xxxxxxxxxx" þŸeklinde elektronik posta formatýnda olmalýdýr';Ext.form.VTypes["urlText"]='Bu alan "http://www.domain.com" þŸeklinde URL adres formatýnda olmalýdýr';Ext.form.VTypes["alphaText"]='Bu alan sadece harf ve _ içermeli';Ext.form.VTypes["alphanumText"]='Bu alan sadece harf, sayý ve _ içermeli';} -if(Ext.form.HtmlEditor){Ext.apply(Ext.form.HtmlEditor.prototype,{createLinkText:'Lütfen bu baðlantý için gerekli URL adresini giriniz:',buttonTips:{bold:{title:'Kalýn(Bold) (Ctrl+B)',text:'Þžeçili yazýyý kalýn yapar.',cls:'x-html-editor-tip'},italic:{title:'İtalik(Italic) (Ctrl+I)',text:'Þžeçili yazýyý italik yapar.',cls:'x-html-editor-tip'},underline:{title:'Alt Çizgi(Underline) (Ctrl+U)',text:'Þžeçili yazýnýn altýný çizer.',cls:'x-html-editor-tip'},increasefontsize:{title:'Fontu büyült',text:'Yazý fontunu büyütür.',cls:'x-html-editor-tip'},decreasefontsize:{title:'Fontu küçült',text:'Yazý fontunu küçültür.',cls:'x-html-editor-tip'},backcolor:{title:'Arka Plan Rengi',text:'Seçili yazýnýn arka plan rengini deðiþŸtir.',cls:'x-html-editor-tip'},forecolor:{title:'Yazý Rengi',text:'Seçili yazýnýn rengini deðiþŸtir.',cls:'x-html-editor-tip'},justifyleft:{title:'Sola Daya',text:'Yazýyý sola daya.',cls:'x-html-editor-tip'},justifycenter:{title:'Ortala',text:'Yazýyý editörde ortala.',cls:'x-html-editor-tip'},justifyright:{title:'Saða daya',text:'Yazýyý saða daya.',cls:'x-html-editor-tip'},insertunorderedlist:{title:'Noktalý Liste',text:'Noktalý listeye baþŸla.',cls:'x-html-editor-tip'},insertorderedlist:{title:'Numaralý Liste',text:'Numaralý lisyeye baþŸla.',cls:'x-html-editor-tip'},createlink:{title:'Web Adresi(Hyperlink)',text:'Seçili yazýyý web adresi(hyperlink) yap.',cls:'x-html-editor-tip'},sourceedit:{title:'Kaynak kodu Düzenleme',text:'Kaynak kodu düzenleme moduna geç.',cls:'x-html-editor-tip'}}});} -if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Artan sýrada sýrala",sortDescText:"Azalan sýrada sýrala",lockText:"Kolonu kilitle",unlockText:"Kolon kilidini kaldýr",columnsText:"Kolonlar"});} +if(Ext.form.VTypes){Ext.apply(Ext.form.VTypes,{emailText:'Bu alan "user@xxxxxxxxxx" şeklinde elektronik posta formatında olmalıdır',urlText:'Bu alan "http://www.domain.com" şeklinde URL adres formatında olmalıdır',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 bu bağlantı için gerekli URL adresini giriniz:',buttonTips:{bold:{title:'Kalın(Bold) (Ctrl+B)',text:'Şeçili yazıyı kalın yapar.',cls:'x-html-editor-tip'},italic:{title:'İtalik(Italic) (Ctrl+I)',text:'Şeçili yazıyı italik yapar.',cls:'x-html-editor-tip'},underline:{title:'Alt Çizgi(Underline) (Ctrl+U)',text:'Şeçili yazının altını çizer.',cls:'x-html-editor-tip'},increasefontsize:{title:'Fontu büyült',text:'Yazı fontunu büyütür.',cls:'x-html-editor-tip'},decreasefontsize:{title:'Fontu küçült',text:'Yazı fontunu küçültür.',cls:'x-html-editor-tip'},backcolor:{title:'Arka Plan Rengi',text:'Seçili yazının arka plan rengini değiştir.',cls:'x-html-editor-tip'},forecolor:{title:'Yazı Rengi',text:'Seçili yazının rengini değiştir.',cls:'x-html-editor-tip'},justifyleft:{title:'Sola Daya',text:'Yazıyı sola daya.',cls:'x-html-editor-tip'},justifycenter:{title:'Ortala',text:'Yazıyı editörde ortala.',cls:'x-html-editor-tip'},justifyright:{title:'Sağa daya',text:'Yazıyı sağa daya.',cls:'x-html-editor-tip'},insertunorderedlist:{title:'Noktalı Liste',text:'Noktalı listeye başla.',cls:'x-html-editor-tip'},insertorderedlist:{title:'Numaralı Liste',text:'Numaralı lisyeye başla.',cls:'x-html-editor-tip'},createlink:{title:'Web Adresi(Hyperlink)',text:'Seçili yazıyı web adresi(hyperlink) yap.',cls:'x-html-editor-tip'},sourceedit:{title:'Kaynak kodu Düzenleme',text:'Kaynak kodu düzenleme moduna geç.',cls:'x-html-editor-tip'}}});} +if(Ext.grid.GridView){Ext.apply(Ext.grid.GridView.prototype,{sortAscText:"Artan sırada sırala",sortDescText:"Azalan sırada sırala",lockText:"Kolonu kilitle",unlockText:"Kolon kilidini kaldır",columnsText:"Kolonlar"});} if(Ext.grid.GroupingView){Ext.apply(Ext.grid.GroupingView.prototype,{emptyGroupText:'(Yok)',groupByText:'Bu Alana Göre Grupla',showGroupsText:'Gruplar Halinde Göster'});} -if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Ad",valueText:"Deðer",dateFormat:"d/m/Y"});} -if(Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Yeniden boyutlandýrmak için sürükle.",collapsibleSplitTip:"Yeniden boyutlandýrmak için sürükle. Saklamak için çift týkla."});} \ No newline at end of file +if(Ext.grid.PropertyColumnModel){Ext.apply(Ext.grid.PropertyColumnModel.prototype,{nameText:"Ad",valueText:"Değer",dateFormat:"d/m/Y"});} +if(Ext.layout.BorderLayout&&Ext.layout.BorderLayout.SplitRegion){Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype,{splitTip:"Yeniden boyutlandırmak için sürükle.",collapsibleSplitTip:"Yeniden boyutlandırmak için sürükle. Saklamak için çift tıkla."});} \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/util/ClickRepeater-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/util/ClickRepeater-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/util/ClickRepeater-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -11,7 +11,7 @@ {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,destroy:function(){Ext.destroy(this.el);this.purgeListeners();},handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass);} +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,this);if(this.pressClass){this.el.addClass(this.pressClass);} Modified: mickael/trunk/ext/v3.0.0-a1/build/util/Date-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/util/Date-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/util/Date-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,35 +7,59 @@ */ -(function(){function xf(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(/\{(\d+)\}/g,function(m,i){return args[i];});} -Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=='function'?p():p;Date.parseCodes[character]=p;} -return p?Ext.applyIf({c:p.c?xf(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}} +(function(){Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=='function'?p():p;Date.parseCodes[character]=p;} +return p?Ext.applyIf({c:p.c?String.format(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}} var $f=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(month){return Date.monthNames[month].substring(0,3);},getShortDayName:function(day){return Date.dayNames[day].substring(0,3);},getMonthNumber:function(name){return Date.monthNumbers[name.substring(0,1).toUpperCase()+name.substring(1,3).toLowerCase()];},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var c="Y-m-dTH:i:sP",code=[],i=0,l=c.length;i<l;++i){var e=c.charAt(i);code.push(e=="T"?"'T'":Date.getFormatCode(e));} return code.join(" + ");},U:"Math.round(this.getTime() / 1000)"},parseDate:function(input,format){var p=Date.parseFunctions;if(p[format]==null){Date.createParser(format);} var func=p[format];return Date[func](input);},getFormatCode:function(character){var f=Date.formatCodes[character];if(f){f=Ext.type(f)=='function'?f():f;Date.formatCodes[character]=f;} -return f||("'"+String.escape(character)+"'");},createNewFormat:function(format){var funcName="format"+Date.formatFunctions.count++,code="Date.prototype."+funcName+" = function(){return ",special=false,ch='';Date.formatFunctions[format]=funcName;for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;} +return f||("'"+String.escape(character)+"'");},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)+";}");},createParser:function(){var code=["Date.{0} = function(input){","var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;","input = String(input);","d = new Date();","y = d.getFullYear();","m = d.getMonth();","d = d.getDate();","var results = input.match(Date.parseRegexes[{1}]);","if(results && results.length > 0){","{2}","if(u){","v = new Date(u * 1000);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){","v = new Date(y, m, d, h, i, s, ms);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){","v = new Date(y, m, d, h, i, s);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){","v = new Date(y, m, d, h, i);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){","v = new Date(y, m, d, h);","}else if (y >= 0 && m >= 0 && d > 0){","v = new Date(y, m, d);","}else if (y >= 0 && m >= 0){","v = new Date(y, m);","}else if (y >= 0){","v = new Date(y);","}","}","return (v && (z != null || o != null))?" +eval(code.substring(0,code.length-3)+";}");},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, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" ++"input = String(input);\n" ++"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);\n" ++"}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" ++"}\n}\nreturn (v && (z || o))?" +" (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" -+" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;","}"].join('\n');return function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1,calc="",regex="",special=false,ch="";Date.parseFunctions[format]=funcName;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=$f(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){calc+=obj.c;}}} -Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(xf(code,funcName,regexNum,calc));}}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" ++" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" ++"}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code);},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3}"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" +"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\n" +"if (h == 12) { h = 0; }\n" +"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\n" +"if (h == 12) { h = 0; }\n" +"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $f("G");},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return $f("H");},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+\-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+\-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"z = results[{0}] * 1;\n" -+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"},c:function(){var calc=[],arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[9] == 'Z'){","z = 0;","}else{",$f("P",9).c,"}"].join('\n')}];for(var i=0,l=arr.length;i<l;++i){calc.push(arr[i].c);} ++"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"},c:function(){var calc=[];var arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:"if(results[9] == 'Z'){\no = 0;\n}else{\n"+$f("P",9).c+"\n}"}];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 +"((\.|,)\\d+)?" -+"(Z|([+\-]\\d{2}:\\d{2}))"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.override(Date,{dateFormat:function(format){if(Date.formatFunctions[format]==null){Date.createNewFormat(format);} ++"("+$f("P",null).s+"|Z)"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.override(Date,{dateFormat:function(format){if(Date.formatFunctions[format]==null){Date.createNewFormat(format);} var func=Date.formatFunctions[format];return this[func]();},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"");},getGMTOffset:function(colon){return(this.getTimezoneOffset()>0?"-":"+") -+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0") ++String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0") +(colon?":":"") +String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0");},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;},getWeekOfYear:function(){var ms1d=864e5,ms7d=7*ms1d;return function(){var DC3=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/ms1d,AWN=Math.floor(DC3/7),Wyr=new Date(AWN*ms7d).getUTCFullYear();return AWN-Math.floor(Date.UTC(Wyr,0,7)/ms7d)+1;}}(),isLeapYear:function(){var year=this.getFullYear();return!!((year&3)==0&&(year%100||(year%400==0&&year)));},getFirstDayOfMonth:function(){var day=(this.getDay()-(this.getDate()-1))%7;return(day<0)?(day+7):day;},getLastDayOfMonth:function(){var day=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(day<0)?(day+7):day;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(clone){if(clone){return this.clone().clearTime();} +return num+this.getDate()-1;},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;},isLeapYear:function(){var year=this.getFullYear();return!!((year&3)==0&&(year%100||(year%400==0&&year)));},getFirstDayOfMonth:function(){var day=(this.getDay()-(this.getDate()-1))%7;return(day<0)?(day+7):day;},getLastDayOfMonth:function(){var day=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(day<0)?(day+7):day;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(clone){if(clone){return this.clone().clearTime();} this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;},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;},between:function(start,end){var t=this.getTime();return start.getTime()<=t&&t<=end.getTime();}});Date.prototype.format=Date.prototype.dateFormat;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);}};} \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/util/Format-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/util/Format-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/util/Format-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -15,11 +15,10 @@ 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:/(?:<script.*?>)((\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);}}(),number:function(v,format){if(!format){return v;} v*=1;if(typeof v!='number'||isNaN(v)){return'';} -var comma=',';var dec='.';var i18n=false;if(format.substr(format.length-2)=='/i'){format=format.substr(0,format.length-2);i18n=true;comma='.';dec=',';} -var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,''):format.replace(/[^\d\.]/g,'')).split(dec);if(1<psplit.length){v=v.toFixed(psplit[1].length);} +var hasComma=-1<format.indexOf(','),psplit=format.replace(/[^\d\.]/g,'').split('.');if(1<psplit.length){v=v.toFixed(psplit[1].length);} else if(2<psplit.length){throw('NumberFormatException: invalid format, formats should have no more than 1 period: '+format);} else{v=v.toFixed(0);} var fnum=v.toString();if(hasComma){psplit=fnum.split('.');var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;i<j;i+=n){if(i!=0){n=3;} parr[parr.length]=cnum.substr(i,n);m-=1;} -fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1];}} +fnum=parr.join(',');if(psplit[1]){fnum+='.'+psplit[1];}} return format.replace(/[\d,?\.?]+/,fnum);},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format);};},plural:function(v,s,p){return v+' '+(v==1?s:(p?p:s+'s'));}}}(); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/util/History-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/util/History-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/util/History-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -13,7 +13,7 @@ function updateIFrame(token){var html=['<html><body><div id="state">',token,'</div></body></html>'].join('');try{var doc=iframe.contentWindow.document;doc.open();doc.write(html);doc.close();return true;}catch(e){return false;}} function checkIFrame(){if(!iframe.contentWindow||!iframe.contentWindow.document){setTimeout(checkIFrame,10);return;} var doc=iframe.contentWindow.document;var elem=doc.getElementById("state");var token=elem?elem.innerText:null;var hash=getHash();setInterval(function(){doc=iframe.contentWindow.document;elem=doc.getElementById("state");var newtoken=elem?elem.innerText:null;var newHash=getHash();if(newtoken!==token){token=newtoken;handleStateChange(token);top.location.hash=token;hash=token;doSave();}else if(newHash!==hash){hash=newHash;updateIFrame(newHash);}},50);ready=true;Ext.History.fireEvent('ready',Ext.History);} -function startUp(){currentToken=hiddenField.value?hiddenField.value:getHash();if(Ext.isIE){checkIFrame();}else{var hash=getHash();setInterval(function(){var newHash=getHash();if(newHash!==hash){hash=newHash;handleStateChange(hash);doSave();}},50);ready=true;Ext.History.fireEvent('ready',Ext.History);}} +function startUp(){currentToken=hiddenField.value;if(Ext.isIE){checkIFrame();}else{var hash=getHash();setInterval(function(){var newHash=getHash();if(newHash!==hash){hash=newHash;handleStateChange(hash);doSave();}},50);ready=true;Ext.History.fireEvent('ready',Ext.History);}} return{fieldId:'x-history-field',iframeId:'x-history-frame',events:{},init:function(onReady,scope){if(ready){Ext.callback(onReady,scope,[this]);return;} if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(onReady,scope);});return;} hiddenField=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){iframe=Ext.getDom(Ext.History.iframeId);} Modified: mickael/trunk/ext/v3.0.0-a1/build/util/Observable-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/util/Observable-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/util/Observable-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,11 +7,7 @@ */ -Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners;} -if(!this.events){this.events={};}};Ext.util.Observable.prototype={fireEvent:function(){var a=Array.prototype.slice.call(arguments,0);var ename=a[0];if(ename===true){a.shift();var c=this;while(c){if(c.fireEvent.apply(c,a)===false){return false;} -c=c.getBubbleTarget?c.getBubbleTarget():null;} -return true;} -if(this.eventsSuspended===true){var q=this.suspendedEventsQueue;if(q){q[q.length]=a;}}else{var ce=this.events[ename.toLowerCase()];if(typeof ce=="object"){a.shift();return ce.fire.apply(ce,a);}} +Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners;}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended===true){if(this.suspendedEventsQueue){this.suspendedEventsQueue.push(arguments);}}else{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;} @@ -26,8 +22,7 @@ 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);};};var createTargeted=function(h,o,scope){return function(){if(o.target==arguments[0]){h.apply(scope,Array.prototype.slice.call(arguments,0));}};};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.target){h=createTargeted(h,o,scope);} -if(o.delay){h=createDelayed(h,o,scope);} +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;}} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Action-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Action-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Action-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,5 +7,5 @@ */ -Ext.Action=function(config){this.initialConfig=config;this.itemId=config.itemId=(config.itemId||config.id||Ext.id());this.items=[];} +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);},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments);}}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Button-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Button-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Button-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,16 +12,15 @@ return[this.text||' ',this.type,this.iconCls||'',cls,'x-btn-'+this.scale+' x-btn-icon-'+this.scale+'-'+this.iconAlign,this.getMenuClass()];},getMenuClass:function(){return this.menu?(this.arrowAlign!='bottom'?'x-btn-arrow':'x-btn-arrow-bottom'):'';},onRender:function(ct,position){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">','<tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr>','<tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i> </i></td></tr>','<tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr>',"</tbody></table>");Ext.Button.buttonTemplate.compile();} this.template=Ext.Button.buttonTemplate;} var btn,targs=this.getTemplateArgs();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);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(btn,btnEl){this.el=btn;if(this.id){this.el.dom.id=this.el.id=this.id;} -if(this.icon){btnEl.setStyle('background-image','url('+this.icon+')');} +var btnEl=btn.child(this.buttonSelector);btnEl.on('focus',this.onFocus,this);btnEl.on('blur',this.onBlur,this);this.initButtonEl(btn,btnEl);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(btn,btnEl){this.el=btn;if(this.icon){btnEl.setStyle('background-image','url('+this.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.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.doAutoWidth.defer(1,this);}else{this.doAutoWidth();}},setIconClass:function(cls){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,cls);} -this.iconCls=cls;},beforeDestroy:function(){if(this.rendered){var btnEl=this.el.child(this.buttonSelector);if(btnEl){if(this.tooltip){Ext.QuickTips.unregister(btnEl);} -btnEl.removeAllListeners();}} +this.iconCls=cls;},beforeDestroy:function(){if(this.rendered){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);}},doAutoWidth:function(){if(this.el&&this.text&&typeof this.width=='undefined'){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-mc "+this.buttonSelector).update(text);} this.doAutoWidth();},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);} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/ColorPalette-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/ColorPalette-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/ColorPalette-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,5 +7,5 @@ */ -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=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>');var el=document.createElement("div");el.id=this.getId();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");} +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=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>');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); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Component-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Component-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Component-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -21,11 +21,8 @@ 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();} -if(this.stateful!==false){this.initStateEvents();} -this.initRef();} -return this;},initRef:function(){if(this.ref){var levels=this.ref.split('/');var last=levels.length,i=0;var t=this;while(i<last){if(t.ownerCt){t=t.ownerCt;} -i++;} -t[levels[--i]]=this;}},initState:function(config){if(Ext.state.Manager){var id=this.getStateId();if(id){var state=Ext.state.Manager.get(id);if(state){if(this.fireEvent('beforestaterestore',this,state)!==false){this.applyState(state);this.fireEvent('staterestore',this,state);}}}}},getStateId:function(){return this.stateId||((this.id.indexOf('ext-comp-')==0||this.id.indexOf('ext-gen')==0)?null:this.id);},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 id=this.getStateId();if(id){var state=this.getState();if(this.fireEvent('beforestatesave',this,state)!==false){Ext.state.Manager.set(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.stateful!==false){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.id){this.el.id=this.getId();}} if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,position);} if(this.overCls){this.el.addClassOnOver(this.overCls);}}},getAutoCreate:function(){var cfg=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!cfg.id){cfg.id=this.id;} @@ -46,4 +43,4 @@ return tc.xtypes;},findParentBy:function(fn){for(var p=this.ownerCt;(p!=null)&&!fn(p,this);p=p.ownerCt);return p||null;},findParentByType:function(xtype){return typeof xtype=='function'?this.findParentBy(function(p){return p.constructor===xtype;}):this.findParentBy(function(p){return p.constructor.xtype===xtype;});},getDomPositionEl:function(){return this.getPositionEl?this.getPositionEl():this.getEl();},mon:function(item,ename,fn,scope,opt){if(!this.mons){this.mons=[];this.on('beforedestroy',function(){for(var i=0,len=this.mons.length;i<len;i++){var m=this.mons[i];m.item.un(m.ename,m.fn,m.scope);}},this);} this.mons.push({item:item,ename:ename,fn:fn,scope:scope});item.on(ename,fn,scope,opt);},nextSibling:function(){if(this.ownerCt){var index=this.ownerCt.items.indexOf(this);if(index!=-1&&index+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(index+1);}} return null;},previousSibling:function(){if(this.ownerCt){var index=this.ownerCt.items.indexOf(this);if(index>0){return this.ownerCt.items.itemAt(index-1);}} -return null;},getBubbleTarget:function(){return this.ownerCt;}});Ext.reg('component',Ext.Component); \ No newline at end of file +return null;}});Ext.reg('component',Ext.Component); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/ComponentMgr-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/ComponentMgr-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/ComponentMgr-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,4 +7,4 @@ */ -Ext.ComponentMgr=function(){var all=new Ext.util.MixedCollection();var types={};var ptypes={};return{register:function(c){all.add(c);},unregister:function(c){all.remove(c);},get:function(id){return all.get(id);},onAvailable:function(id,fn,scope){all.on("add",function(index,o){if(o.id==id){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 config.render?config:new types[config.xtype||defaultType](config);},registerPlugin:function(ptype,cls){ptypes[ptype]=cls;cls.ptype=ptype;},createPlugin:function(config,defaultType){return new ptypes[config.ptype||defaultType](config);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create; \ No newline at end of file +Ext.ComponentMgr=function(){var all=new Ext.util.MixedCollection();var types={};var ptypes={};return{register:function(c){all.add(c);},unregister:function(c){all.remove(c);},get:function(id){return all.get(id);},onAvailable:function(id,fn,scope){all.on("add",function(index,o){if(o.id==id){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);},registerPlugin:function(ptype,cls){ptypes[ptype]=cls;cls.ptype=ptype;},createPlugin:function(config,defaultType){return new ptypes[config.ptype||defaultType](config);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Container-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Container-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Container-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -15,20 +15,20 @@ if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false]);}},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++){Ext.Container.prototype.add.call(this,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(true,'add',this,c,pos);} +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(true,'add',this,c,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(true,'remove',this,c);} +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.create(config,this.defaultType);},doLayout:function(shallow){if(this.rendered&&this.layout){this.layout.layout();} +return comp;},createComponent:function(config){return Ext.ComponentMgr.create(config,this.defaultType);},doLayout:function(shallow){if(this.rendered&&this.layout){this.layout.layout();} if(shallow!==false&&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;},beforeDestroy:function(){if(this.items){Ext.destroy.apply(Ext,this.items.items);} if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this);} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/DatePicker-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/DatePicker-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/DatePicker-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -36,4 +36,4 @@ 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++){var 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]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn);}}});Ext.reg('datepicker',Ext.DatePicker); \ No newline at end of file +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]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.mbtn,this.todayBtn);}}});Ext.reg('datepicker',Ext.DatePicker); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Editor-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Editor-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Editor-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,9 +7,7 @@ */ -Ext.Editor=function(field,config){if(field.field){this.field=Ext.create(field.field,'textfield');config=Ext.apply({},field);delete config.field;}else{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","canceledit","specialkey");},onRender:function(ct,position){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:ct,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex);} -this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!='title'){this.field.msgTarget='qtip';} +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","canceledit","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.inEditor=true;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){var key=e.getKey();if(this.completeOnEnter&&key==e.ENTER){e.stopEvent();this.completeEdit();}else if(this.cancelOnEsc&&key==e.ESC){this.cancelEdit();}else{this.fireEvent('specialkey',field,e);} @@ -27,4 +25,4 @@ this.fireEvent("startedit",this.boundEl,this.startValue);},deferredFocus:function(){if(this.editing){this.field.focus();}},cancelEdit:function(remainVisible){if(this.editing){var v=this.getValue();this.setValue(this.startValue);if(remainVisible!==true){this.hide();} this.fireEvent("canceledit",this,v,this.startValue);}},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(){Ext.destroy(this.field);this.field=null;}});Ext.reg('editor',Ext.Editor); \ No newline at end of file +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); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/PagingToolbar-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/PagingToolbar-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/PagingToolbar-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -13,5 +13,4 @@ this.cursor=(o.params&&o.params[this.paramNames.start])?o.params[this.paramNames.start]:0;var d=this.getPageData(),ap=d.activePage,ps=d.pages;this.afterTextItem.setText(String.format(this.afterPageText,d.pages));this.field.value=ap;this.first.setDisabled(ap==1);this.prev.setDisabled(ap==1);this.next.setDisabled(ap==ps);this.last.setDisabled(ap==ps);this.refresh.enable();this.updateInfo();this.fireEvent('change',this,d);},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)};},changePage:function(page){this.doLoad(((page-1)*this.pageSize).constrain(0,this.store.getTotalCount()));},onLoadError:function(){if(!this.rendered){return;} this.refresh.enable();},readPage:function(d){var v=this.field.value,pageNum;if(!v||isNaN(pageNum=parseInt(v,10))){this.field.value=d.activePage;return false;} return pageNum;},onPagingKeydown:function(e){var k=e.getKey(),d=this.getPageData(),pageNum;if(k==e.RETURN){e.stopEvent();pageNum=this.readPage(d);if(pageNum!==false){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.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.value=pageNum;}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(start){var o={},pn=this.paramNames;o[pn.start]=start;o[pn.limit]=this.pageSize;if(this.fireEvent('beforechange',this,o)!==false){this.store.load({params:o});}},onClick:function(button){var store=this.store;switch(button){case this.first:this.doLoad(0);break;case this.prev:this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case this.next:this.doLoad(this.cursor+this.pageSize);break;case this.last:var total=store.getTotalCount();var extra=total%this.pageSize;var lastStart=extra?(total-extra):total-this.pageSize;this.doLoad(lastStart);break;case this.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;this.paramNames.start=store.paramNames.start;this.paramNames.limit=store.paramNames.limit;},onDestroy:function(){if(this.store){this.unbind(this.store);} -Ext.PagingToolbar.superclass.onDestroy.call(this);}});})();Ext.reg('paging',Ext.PagingToolbar); \ No newline at end of file +pageNum+=increment;if(pageNum>=1&pageNum<=d.pages){this.field.value=pageNum;}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(start){var o={},pn=this.paramNames;o[pn.start]=start;o[pn.limit]=this.pageSize;if(this.fireEvent('beforechange',this,o)!==false){this.store.load({params:o});}},onClick:function(button){var store=this.store;switch(button){case this.first:this.doLoad(0);break;case this.prev:this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case this.next:this.doLoad(this.cursor+this.pageSize);break;case this.last:var total=store.getTotalCount();var extra=total%this.pageSize;var lastStart=extra?(total-extra):total-this.pageSize;this.doLoad(lastStart);break;case this.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;this.paramNames.start=store.paramNames.start;this.paramNames.limit=store.paramNames.limit;}});})();Ext.reg('paging',Ext.PagingToolbar); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Panel-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Panel-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Panel-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,51 +7,44 @@ */ -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',disabledClass:'',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.unstyled){this.baseCls='x-plain';} -if(this.tbar){this.elements+=',tbar';if(typeof this.tbar=='object'){this.topToolbar=this.tbar;} +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',disabledClass:'',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){this.elements+=',footer';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 if(btns[i].xtype){this.buttons.push(Ext.create(btns[i],'button'));}else{this.addButton(btns[i]);}}} -if(this.fbar){this.elements+=',footer';if(this.buttonAlign=='right'&&this.initialConfig.buttonAlign===undefined){this.buttonAlign='left';}} +if(this.buttons){var btns=this.buttons;this.buttons=[];for(var i=0,len=btns.length;i<len;i++){if(btns[i].render){btns[i].ownerCt=this;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));} -if(this[name+'CssClass']){this[name].addClass(this[name+'CssClass']);} -if(this[name+'Style']){this[name].applyStyles(this[name+'Style']);}}},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);} +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.padding!==undefined){this.body.setStyle('padding',this.body.addUnits(this.padding));} if(this.border===false){this.el.addClass(this.baseCls+'-noborder');this.body.addClass(this.bodyCls+'-noborder');if(this.header){this.header.addClass(this.headerCls+'-noborder');} if(this.footer){this.footer.addClass(this.footerCls+'-noborder');} if(this.tbar){this.tbar.addClass(this.tbarCls+'-noborder');} if(this.bbar){this.bbar.addClass(this.bbarCls+'-noborder');}} if(this.bodyBorder===false){this.body.addClass(this.bodyCls+'-noborder');} +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='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+'</span>';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){this.fbar=new Ext.Toolbar({items:this.buttons,toolbarCls:'x-panel-fbar'});} -if(this.fbar){this.fbar=Ext.create(this.fbar,'toolbar');if(this.fbar.items){this.fbar.items.each(function(c){c.minWidth=this.minButtonWidth;},this);} -this.fbar.toolbarCls='x-panel-fbar';var bct=this.footer.createChild({cls:'x-panel-btns x-panel-btns-'+this.buttonAlign});this.fbar.ownerCt=this;this.fbar.render(bct);bct.createChild({cls:'x-clear'});} -if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar);}else if(!this.topToolbar.events){this.topToolbar=Ext.create(this.topToolbar,'toolbar');} -this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar);} -if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);}else if(!this.bottomToolbar.events){this.bottomToolbar=Ext.create(this.bottomToolbar,'toolbar');} -this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar);}},setIconClass:function(cls){var old=this.iconCls;this.iconCls=cls;if(this.rendered&&this.header){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=[];} +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:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},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(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar);}else if(!this.topToolbar.events){this.topToolbar=Ext.ComponentMgr.create(this.topToolbar,'toolbar');} +this.topToolbar.render(this.tbar);this.topToolbar.ownerCt=this;} +if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);}else if(!this.bottomToolbar.events){this.bottomToolbar=Ext.ComponentMgr.create(this.bottomToolbar,'toolbar');} +this.bottomToolbar.render(this.bbar);this.bottomToolbar.ownerCt=this;}},setIconClass:function(cls){var old=this.iconCls;this.iconCls=cls;if(this.rendered&&this.header){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);btn.ownerCt=this;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('<div class="x-tool x-tool-{id}"> </div>');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];if(!this.tools[tc.id]){var overCls='x-tool-'+tc.id+'-over';var t=this.toolTemplate.insertFirst((tc.align!=='left')?this[this.toolTarget]:this[this.toolTarget].child('span'),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);} +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((tc.align!=='left')?this[this.toolTarget]:this[this.toolTarget].child('span'),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);}}},doLayout:function(shallow){Ext.Panel.superclass.doLayout.call(this,shallow);if(this.topToolbar){this.topToolbar.doLayout();} -if(this.bottomToolbar){this.bottomToolbar.doLayout();} -if(this.fbar){this.fbar.doLayout();}},onShow:function(){if(this.floating){return this.el.show();} +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.floating&&!this.hidden&&!this.initHidden){this.el.show();} +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);} this.setAutoScroll();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);} @@ -64,11 +57,10 @@ 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'){w=this.adjustBodyWidth(w-this.getFrameWidth());if(this.tbar){this.tbar.setWidth(w);if(this.topToolbar){this.topToolbar.setSize(w);}} -if(this.bbar){this.bbar.setWidth(w);if(this.bottomToolbar){this.bottomToolbar.setSize(w);}} -if(this.fbar){this.fbar.setSize(w-this.fbar.container.getFrameWidth('lr'));} -this.body.setWidth(w);}else if(w=='auto'){this.body.setWidth(w);} +Ext.Panel.superclass.onEnable.call(this);},onResize:function(w,h){if(w!==undefined||h!==undefined){if(!this.collapsed){if(typeof w=='number'){w=this.adjustBodyWidth(w-this.getFrameWidth());this.body.setWidth(w);}else if(w=='auto'){this.body.setWidth(w);} if(typeof h=='number'){h=this.adjustBodyHeight(h-this.getFrameHeight());this.body.setHeight(h);}else if(h=='auto'){this.body.setHeight(h);} +if(this.tbar){this.tbar.setWidth(w);if(this.topToolbar){this.topToolbar.setSize(w);}} +if(this.bbar){this.bbar.setWidth(w);if(this.bottomToolbar){this.bottomToolbar.setSize(w);}} if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight());}}else{this.queuedBodySize={width:w,height:h};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;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();},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');} @@ -77,9 +69,8 @@ (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(){if(this.header){this.header.removeAllListeners();if(this.headerAsText){Ext.Element.uncache(this.header.child('span'));}} -Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body,this.bwrap);if(this.tools){for(var k in this.tools){Ext.destroy(this.tools[k]);}} +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);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,this.fbar);Ext.Panel.superclass.beforeDestroy.call(this);},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.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.beforeDestroy.call(this);},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); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Resizable-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Resizable-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Resizable-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -33,10 +33,9 @@ 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){if(this.dd){this.dd.destroy();} -if(this.overlay){Ext.destroy(this.overlay);this.overlay=null;} -Ext.destroy(this.proxy);this.proxy=null;var ps=Ext.Resizable.positions;for(var k in ps){if(typeof ps[k]!="function"&&this[ps[k]]){this[ps[k]].destroy();}} -if(removeEl){this.el.update("");Ext.destroy(this.el);this.el=null;}},syncHandleHeight:function(){var h=this.el.getHeight(true);if(this.west){this.west.el.setHeight(h);} +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);},destroy:function(){Ext.destroy(this.el);this.el=null;}}; \ No newline at end of file +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);}}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/SplitBar-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/SplitBar-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/SplitBar-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -10,9 +10,9 @@ 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){Ext.destroy(this.overlay);delete this.overlay;} +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.destroy(Ext.get(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; \ No newline at end of file +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; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/TabPanel-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/TabPanel-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/TabPanel-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,9 +9,9 @@ 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',activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:'__',itemCls:'x-tab-item',elements:'body',headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;Ext.TabPanel.superclass.initComponent.call(this);this.addEvents('beforetabchange','tabchange','contextmenu');this.setLayout(new Ext.layout.CardLayout({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();if(this.activeTab!==undefined&&typeof this.activeTab!='object'){this.activeTab=this.items.get(this.activeTab);}},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');} +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}});var beforeEl=(this.tabPosition=='bottom'?this.stripWrap:null);this.stripSpacer=st.createChild({cls:'x-tab-strip-spacer'},beforeEl);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:'li',cls:'x-tab-edge'});this.strip.createChild({cls:'x-clear'});this.body.addClass('x-tab-panel-body-'+this.tabPosition);if(!this.itemTpl){var tt=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>','</em></a></li>');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,{target:this});this.on('remove',this.onRemove,this,{target:this});this.strip.on('mousedown',this.onStripMouseDown,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(this.idDelimiter)[1]);if(item.disabled){return{close:null,item:null,el:null};}} +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('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(this.idDelimiter)[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){if(e.button!=0){return;} e.preventDefault();var t=this.findTargets(e);if(t.close){if(t.item.fireEvent('close',t.item)!==false){this.remove(t.item);} return;} @@ -20,9 +20,9 @@ if(item.iconCls){cls+=' x-tab-with-icon';} if(item.tabCls){cls+=' '+item.tabCls;} var p={id:this.id+this.idDelimiter+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.tabEl=el;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();} +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.destroy(Ext.get(this.getTabEl(item)));this.stack.remove(item);item.un('disable',this.onItemDisabled,this);item.un('enable',this.onItemEnabled,this);item.un('titlechange',this.onItemTitleChanged,this);item.un('beforeshow',this.onBeforeShowItem,this);if(item==this.activeTab){var next=this.stack.next();if(next){this.setActiveTab(next);}else{this.setActiveTab(0);}} +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);item.un('disable',this.onItemDisabled,this);item.un('enable',this.onItemEnabled,this);item.un('titlechange',this.onItemTitleChanged,this);item.un('beforeshow',this.onBeforeShowItem,this);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){var itemId=(typeof item==='number')?this.items.items[item].getItemId():item.getItemId();return document.getElementById(this.id+this.idDelimiter+itemId);},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();} this.stack.remove(item);},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;} @@ -41,7 +41,5 @@ 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)){wd.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');},beforeDestroy:function(){if(this.items){this.items.each(function(item){if(item&&item.tabEl){Ext.get(item.tabEl).removeAllListeners();item.tabEl=null;}},this);} -if(this.strip){this.strip.removeAllListeners();} -Ext.TabPanel.superclass.beforeDestroy.apply(this);}});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]);}} +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();}};}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Toolbar-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Toolbar-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Toolbar-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,15 +12,14 @@ this.cleanup(this.leftTr);this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(target);},cleanup:function(row){var cn=row.childNodes;for(var i=cn.length-1,c;i>=0&&(c=cn[i]);i--){if(!c.firstChild){row.removeChild(c);}}},insertCell:function(c,side,pos){var td=document.createElement('td');td.className='x-toolbar-cell';side.insertBefore(td,side.childNodes[pos]||null);return td;},hideItem:function(item){var h=(this.hiddens=this.hiddens||[]);h.push(item);item.xtbHidden=true;item.xtbWidth=item.getDomPositionEl().dom.parentNode.offsetWidth;item.hide();},unhideItem:function(item){item.show();item.xtbHidden=false;this.hiddens.remove(item);if(this.hiddens.length<1){delete this.hiddens;}},getItemWidth:function(c){return c.hidden?(c.xtbWidth||0):c.getDomPositionEl().dom.parentNode.offsetWidth;},fitToSize:function(t){var w=t.dom.clientWidth;var lw=this.lastWidth||0;this.lastWidth=w;var iw=t.dom.firstChild.offsetWidth;var clipWidth=w-this.triggerWidth;var hideIndex=-1;if(iw>w||(this.hiddens&&w>lw)){var i,items=this.container.items.items,len=items.length,c;var loopWidth=0;for(i=0;i<len;i++){c=items[i];if(!c.isFill){loopWidth+=this.getItemWidth(c);if(loopWidth>clipWidth){if(!c.xtbHidden){this.hideItem(c);}}else{if(c.xtbHidden){this.unhideItem(c);}}}}} if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent('overflowchange',this.container,true);this.lastOverflow=true;}}else if(this.more){this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent('overflowchange',this.container,false);this.lastOverflow=false;}}},createMenuConfig:function(c,hideOnClick){var cfg=Ext.apply({},c.initialConfig);cfg.hideOnClick=hideOnClick;delete cfg.xtype;return cfg;},addComponentToMenu:function(m,c){if(c instanceof Ext.Toolbar.Separator){m.add('-');}else if(typeof c.isXType=='function'){if(c.isXType('splitbutton')){m.add(this.createMenuConfig(c,true));}else if(c.isXType('button')){m.add(this.createMenuConfig(c,!c.menu));}else if(c.isXType('buttongroup')){m.add('-');c.items.each(function(item){this.addComponentToMenu(m,item);},this);m.add('-');}}},beforeMoreShow:function(m){m.removeAll();for(var i=0,h=this.container.items.items,len=h.length,c;i<len;i++){c=h[i];if(c.xtbHidden){this.addComponentToMenu(m,c);}} if(m.items.length<1){m.add(this.noItemsMenuText);}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({listeners:{beforeshow:this.beforeMoreShow,scope:this}});this.more=new Ext.Button({iconCls:'x-toolbar-more-icon',cls:'x-toolbar-more',menu:this.moreMenu});var td=this.insertCell(this.more,this.extrasTr,100);this.more.render(td);}}});Ext.Container.LAYOUTS['toolbar']=Ext.layout.ToolbarLayout;Ext.Toolbar=function(config){if(Ext.isArray(config)){config={items:config,layout:'toolbar'};}else{config=Ext.apply({layout:'toolbar'},config);if(config.buttons){config.items=config.buttons;}} -Ext.Toolbar.superclass.constructor.call(this,config);};(function(){var T=Ext.Toolbar;Ext.extend(T,Ext.Container,{defaultType:'button',trackMenus:true,internalDefaults:{removeMode:'container',hideParent:true},toolbarCls:'x-toolbar',initComponent:function(){T.superclass.initComponent.call(this);this.addEvents('overflowchange');},onRender:function(ct,position){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+' x-small-editor'}} -this.el=ct.createChild(Ext.apply({id:this.id},this.autoCreate),position);}},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.tag){this.addDom(el);}else if(el.tagName){this.addElement(el);}else if(typeof el=="object"){if(el.xtype){this.addItem(Ext.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(){this.addItem(new T.Fill());},addElement:function(el){var item=new T.Item({el:el});this.addItem(item);return item;},addItem:function(item){Ext.Toolbar.superclass.add.apply(this,arguments);return item;},addButton:function(config){if(Ext.isArray(config)){var buttons=[];for(var i=0,len=config.length;i<len;i++){buttons.push(this.addButton(config[i]));} +Ext.Toolbar.superclass.constructor.call(this,config);};(function(){var T=Ext.Toolbar;Ext.extend(T,Ext.Container,{defaultType:'button',trackMenus:true,internalDefaults:{removeMode:'container',hideParent:true},autoCreate:{cls:'x-toolbar x-small-editor'},initComponent:function(){T.superclass.initComponent.call(this);this.addEvents('overflowchange');},onRender:function(ct,position){this.el=ct.createChild(Ext.apply({id:this.id},this.autoCreate),position);},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.tag){this.addDom(el);}else if(el.tagName){this.addElement(el);}else if(typeof el=="object"){if(el.xtype){this.addItem(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(){this.addItem(new T.Fill());},addElement:function(el){var item=new T.Item({el:el});this.addItem(item);return item;},addItem:function(item){Ext.Toolbar.superclass.add.apply(this,arguments);return item;},addButton:function(config){if(Ext.isArray(config)){var buttons=[];for(var i=0,len=config.length;i<len;i++){buttons.push(this.addButton(config[i]));} return buttons;} var b=config;if(!b.events){b=config.split?new T.SplitButton(config):new T.Button(config);} this.initMenuTracking(b);this.addItem(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){var t=new T.TextItem(text);this.addItem(t);return t;},insertButton:function(index,item){if(Ext.isArray(item)){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);} Ext.Toolbar.superclass.insert.call(this,index,item);return item;},addDom:function(config){var item=new T.Item({autoEl:config});this.addItem(item);return item;},addField:function(field){this.addItem(field);return field;},applyDefaults:function(c){c=Ext.Toolbar.superclass.applyDefaults.call(this,c);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d);}else{Ext.applyIf(c,d);} -return c;},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg('tbitem',T.Item);T.Separator=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'span',cls:'xtb-sep'},position);}});Ext.reg('tbseparator',T.Separator);T.Spacer=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'div',cls:'xtb-spacer',style:this.width?'width:'+this.width+'px':''},position);}});Ext.reg('tbspacer',T.Spacer);T.Fill=Ext.extend(T.Item,{render:Ext.emptyFn,isFill:true});Ext.reg('tbfill',T.Fill);T.TextItem=Ext.extend(T.Item,{constructor:function(config){if(typeof config=='string'){config={autoEl:{cls:'xtb-text',html:config}};}else{config.autoEl={cls:'xtb-text',html:config.text||''};} +return c;},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg('tbitem',T.Item);T.Separator=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'span',cls:'ytb-sep'},position);}});Ext.reg('tbseparator',T.Separator);T.Spacer=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'div',cls:'ytb-spacer'},position);}});Ext.reg('tbspacer',T.Spacer);T.Fill=Ext.extend(T.Item,{render:Ext.emptyFn,isFill:true});Ext.reg('tbfill',T.Fill);T.TextItem=Ext.extend(T.Item,{constructor:function(config){if(typeof config=='string'){config={autoEl:{cls:'xtb-text',html:config}};}else{config.autoEl={cls:'xtb-text',html:config.text||''};} T.TextItem.superclass.constructor.call(this,config);},setText:function(t){if(this.rendered){this.el.dom.innerHTML=t;}else{this.autoEl.html=t;}}});Ext.reg('tbtext',T.TextItem);T.Button=Ext.extend(Ext.Button,{});T.SplitButton=Ext.extend(Ext.SplitButton,{});Ext.reg('tbbutton',T.Button);Ext.reg('tbsplit',T.SplitButton);})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:'x-btn-group',layout:'table',defaultType:'button',frame:true,internalDefaults:{removeMode:'container',hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass('x-btn-group-notitle');} this.on('afterlayout',this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this);},applyDefaults:function(c){c=Ext.ButtonGroup.superclass.applyDefaults.call(this,c);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d);}else{Ext.applyIf(c,d);} return c;},onAfterLayout:function(){var bodyWidth=this.body.getFrameWidth('lr')+this.body.dom.firstChild.offsetWidth;this.body.setWidth(bodyWidth);this.el.setWidth(bodyWidth+this.getFrameWidth());}});Ext.reg('buttongroup',Ext.ButtonGroup); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/Window-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/Window-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/Window-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -8,18 +8,17 @@ 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();this.mask.on('click',this.focus,this);}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget);} +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(){this.hide();if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,'scroll',this.doAnchor,this);} -Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask);Ext.Window.superclass.beforeDestroy.call(this);},onDestroy:function(){if(this.manager){this.manager.unregister(this);} +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,this.mask);Ext.Window.superclass.beforeDestroy.call(this);},onDestroy:function(){if(this.manager){this.manager.unregister(this);} Ext.Window.superclass.onDestroy.call(this);},initTools:function(){if(this.minimizable){this.addTool({id:'minimize',handler:this.minimize.createDelegate(this,[])});} if(this.maximizable){this.addTool({id:'maximize',handler:this.maximize.createDelegate(this,[])});this.addTool({id:'restore',handler:this.restore.createDelegate(this,[]),hidden:true});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();if(this.layout){this.doLayout();} -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'&&this.fbar){f=this.fbar.items.get(db);}else if(t=='string'){f=Ext.getCmp(db);}else{f=db;}} -f=f||this.focusEl;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.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;} @@ -49,8 +48,7 @@ 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){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,'scroll',this.doAnchor,this);} -this.doAnchor=function(){this.alignTo(el,alignment,offsets);};Ext.EventManager.onWindowResize(this.doAnchor,this);var tm=typeof monitorScroll;if(tm!='undefined'){Ext.EventManager.on(window,'scroll',this.doAnchor,this,{buffer:tm=='number'?monitorScroll:50});} -this.doAnchor();return this;},toFront:function(e){if(this.manager.bringToFront(this)){if(!e||!e.getTarget().focus){this.focus();}} +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();}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Combo-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Combo-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Combo-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -25,9 +25,8 @@ 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();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this);},"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){Ext.destroy(this.view);} -if(this.list){if(this.innerList){this.innerList.un('mouseover',this.onViewOver,this);this.innerList.un('mousemove',this.onViewMove,this);} -this.list.destroy();} +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);},unsetDelayCheck:function(){delete this.delayedCheck;},fireKey:function(e){if(e.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){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'));}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false;}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true;}},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?'<div class="loading-indicator">'+this.loadingText+'</div>':'');this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){if(!this.hasFocus){return;} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DateField-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DateField-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DateField-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,14 +9,14 @@ Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:'x-form-date-trigger',showToday:true,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.disabledDatesRE=null;this.initDisabledDays();},initDisabledDays:function(){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=null;this.initDisabledDays();},initDisabledDays:function(){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.disabledDatesRE=new RegExp(re+")");}},setDisabledDates:function(dd){this.disabledDates=dd;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE);}},setDisabledDays:function(dd){this.disabledDays=dd;if(this.menu){this.menu.picker.setDisabledDays(dd);}},setMinValue:function(dt){this.minValue=(typeof dt=="string"?this.parseDate(dt):dt);if(this.menu){this.menu.picker.setMinDate(this.minValue);}},setMaxValue:function(dt){this.maxValue=(typeof dt=="string"?this.parseDate(dt):dt);if(this.menu){this.menu.picker.setMaxDate(this.maxValue);}},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.disabledDatesRE&&this.disabledDatesRE.test(fvalue)){this.markInvalid(String.format(this.disabledDatesText,fvalue));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||Ext.isDate(value)){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]);}} @@ -24,4 +24,4 @@ if(this.wrap){this.wrap.remove();} Ext.form.DateField.superclass.onDestroy.call(this);},formatDate:function(date){return Ext.isDate(date)?date.dateFormat(this.format):date;},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.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,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); \ No newline at end of file +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,showToday:this.showToday,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); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DisplayField-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DisplayField-min.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/DisplayField-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,13 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +Ext.form.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:false,validateOnBlur:false,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:false,initEvents:function(){},isValid:function(){return true;},validate:function(){return true;},getRawValue:function(){var v=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,'');if(v===this.emptyText){v='';} +if(this.htmlEncode){v=Ext.util.Format.htmlDecode(v);} +return v;},getValue:function(){return this.getRawValue();},setRawValue:function(v){if(this.htmlEncode){v=Ext.util.Format.htmlEncode(v);} +return this.rendered?(this.el.dom.innerHTML=(v===null||v===undefined?'':v)):(this.value=v);},setValue:function(v){this.setRawValue(v);}});Ext.reg('displayfield',Ext.form.DisplayField); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Field-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Field-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Field-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -14,7 +14,7 @@ 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]);},getItemCt:function(){return this.el.up('.x-form-item',4);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);} +this.el.addClass([this.fieldClass,this.cls]);},getItemCt:function(){return this.el.up('.x-form-item',4);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);} this.originalValue=this.getValue();},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();this.initValue();},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||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var o=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,o);},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);} @@ -29,7 +29,7 @@ this.fireEvent('valid',this);},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget];},getErrorCt:function(){return this.el.findParent('.x-form-element',5,true)||this.el.findParent('.x-form-field-wrap',5,true);},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,'tl-tr',[2,0]);},getRawValue:function(){var v=this.rendered?this.el.getValue():Ext.value(this.value,'');if(v===this.emptyText){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();}},append:function(v){this.setValue([this.getValue(),v].join(''));},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);if(this.offsetCt){var ct=this.getItemCt();s.width-=ct.getFrameWidth('lr');s.height-=ct.getFrameWidth('tb');} +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);if(this.offsetCt){var ct=this.getItemCt();s.width-=ct.getFrameWidth('lr');s.height-=ct.getFrameWidth('tb');} 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 this.inEditor?w: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;} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/FieldSet-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/FieldSet-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/FieldSet-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -10,5 +10,4 @@ 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;if(this.title||this.header||this.checkboxToggle){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']();},beforeDestroy:function(){if(this.checkbox){this.checkbox.un('click',this.onCheckClick,this);} -Ext.form.FieldSet.superclass.beforeDestroy.call(this);}});Ext.reg('fieldset',Ext.form.FieldSet); \ No newline at end of file +this.afterExpand();},onCheckClick:function(){this[this.checkbox.dom.checked?'expand':'collapse']();}});Ext.reg('fieldset',Ext.form.FieldSet); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Form-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Form-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/Form-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,8 +7,8 @@ */ -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.bodyCfg={tag:'form',cls:this.baseCls+'-body',method:this.method||'POST',id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype='multipart/form-data';} -this.initItems();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.isFormField){f.add(c);}if(c.isFieldWrap){Ext.applyIf(c,{labelAlign:c.ownerCt.labelAlign,labelWidth:c.ownerCt.labelWidth,itemCls:c.ownerCt.itemCls});f.add(c.field);}else 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);}}} +Ext.FormPanel=Ext.extend(Ext.Panel,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,initComponent:function(){this.form=this.createForm();this.bodyCfg={tag:'form',cls:this.baseCls+'-body',method:this.method||'POST',id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype='multipart/form-data';} +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.isFormField){f.add(c);}if(c.isFieldWrap){Ext.applyIf(c,{labelAlign:c.ownerCt.labelAlign,labelWidth:c.ownerCt.labelWidth,itemCls:c.ownerCt.itemCls});f.add(c.field);}else 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);}}} 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);this.form.initEl(this.body);},beforeDestroy:function(){Ext.FormPanel.superclass.beforeDestroy.call(this);this.stopMonitoring();Ext.destroy(this.form);},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.items.on('remove',this.onRemove,this);this.items.on('add',this.onAdd,this);if(this.monitorValid){this.startMonitoring();}},onAdd:function(ct,c){if(c.isFormField){this.form.add(c);}},onRemove:function(c){if(c.isFormField){Ext.destroy(c.container.up('.x-form-item'));this.form.remove(c);}},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; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/HtmlEditor-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/HtmlEditor-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/HtmlEditor-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,7 +12,8 @@ var tb=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild});tb.el.on('click',function(e){e.preventDefault();});if(this.enableFont&&!Ext.isSafari2){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:tipsEnabled?editor.buttonTips['forecolor']||undefined: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:tipsEnabled?editor.buttonTips['backcolor']||undefined: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.isSafari2){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'<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';},getEditorBody:function(){return this.doc.body||this.doc.documentElement;},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document);},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name];},onRender:function(ct,position){Ext.form.HtmlEditor.superclass.onRender.call(this,ct,position);this.el.dom.style.border='0 none';this.el.dom.setAttribute('tabIndex',-1);this.el.addClass('x-hidden');if(Ext.isIE){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();}});this.tb.doLayout();this.createIFrame();if(!this.width){var sz=this.el.getSize();this.setSize(sz.width,this.height||sz.height);}},createIFrame:function(){var iframe=document.createElement('iframe');iframe.name=Ext.id();iframe.frameBorder='0';iframe.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(iframe);this.iframe=iframe;this.initFrame();if(this.autoMonitorDesignMode!==false){this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100});}},initFrame:function(){this.doc=this.getDoc();this.win=this.getWin();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);},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var doc=this.getDoc();if(!doc){return;} +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();}});this.tb.doLayout();var iframe=document.createElement('iframe');iframe.name=Ext.id();iframe.frameBorder='0';iframe.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(iframe);this.iframe=iframe;this.initFrame();if(this.autoMonitorDesignMode!==false){this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100});} +if(!this.width){var sz=this.el.getSize();this.setSize(sz.width,this.height||sz.height);}},initFrame:function(){this.doc=this.getDoc();this.win=this.getWin();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);},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var doc=this.getDoc();if(!doc){return;} if(!doc.editorInitialized||String(doc.designMode).toLowerCase()!='on'){this.initFrame();}}},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;} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/form/TextField-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/form/TextField-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/form/TextField-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -13,7 +13,7 @@ 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.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this);} if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);this.el.on("keypress",this.onKeyPress,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);}},onKeyUpBuffered:function(e){if(!e.isNavKeyPress()){this.autoSize();}},onKeyUp:function(e){this.fireEvent('keyup',this,e);},onKeyDown:function(e){this.fireEvent('keydown',this,e);},onKeyPress:function(e){this.fireEvent('keypress',this,e);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass);}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue('');} +return value;},filterValidation:function(e){if(!e.isNavKeyPress()){this.validationTask.delay(this.validationDelay);}},onKeyUpBuffered:function(e){if(!e.isNavKeyPress()){this.autoSize();}},onKeyUp:function(e){this.fireEvent('keyup',this,e);},onKeyDown:function(e){this.fireEvent('keydown',this,e);},onKeyPress:function(e){this.fireEvent('keypress',this,e);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},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){if(e.ctrlKey){return;} var k=e.getKey();if(Ext.isGecko&&(e.isNavKeyPress()||k==e.BACKSPACE||(k==e.DELETE&&e.button==-1))){return;} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/Column-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/Column-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/Column-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,13 +7,8 @@ */ -Ext.grid.Column=function(config){Ext.apply(this,config);if(typeof this.renderer=="string"){this.renderer=Ext.util.Format[this.renderer];} +Ext.grid.Column=function(config){Ext.apply(this,config);if(typeof this.renderer=="string"){this.renderer=Ext.util.Format[c.renderer];} if(typeof this.id=="undefined"){this.id=++Ext.grid.Column.AUTO_ID;} -if(this.editor){if(this.editor.xtype&&!this.editor.events){this.editor=Ext.create(this.editor,'textfield');}}} -Ext.grid.Column.AUTO_ID=0;Ext.grid.Column.prototype={isColumn:true,renderer:function(value){if(typeof value=="string"&&value.length<1){return" ";} -return value;},getEditor:function(rowIndex){return this.editable!==false?this.editor:null;},getCellEditor:function(rowIndex){var editor=this.getEditor(rowIndex);if(editor){if(!editor.startEdit){if(!editor.gridEditor){editor.gridEditor=new Ext.grid.GridEditor(editor);} -return editor.gridEditor;}else if(editor.startEdit){return editor;}} -return null;}};Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{renderer:function(value){if(value===undefined){return" ";} -if(!value||value==='false'){return"false";} -return'true';}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:'0,000.00',constructor:function(cfg){this.supr().constructor.apply(this,arguments);this.renderer=Ext.util.Format.numberRenderer(this.format);}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:'m/d/Y',constructor:function(cfg){this.supr().constructor.apply(this,arguments);this.renderer=Ext.util.Format.dateRenderer(this.format);}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(cfg){this.supr().constructor.apply(this,arguments);var tpl=typeof this.tpl=='object'?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(value,p,r){return tpl.apply(r.data);} -this.tpl=tpl;}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn}; \ No newline at end of file +if(this.editor&&this.editor.isFormField){this.editor=new Ext.grid.GridEditor(this.editor);}} +Ext.grid.Column.AUTO_ID=0;Ext.grid.Column.prototype={renderer:function(value){if(typeof value=="string"&&value.length<1){return" ";} +return value;}}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/ColumnModel-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/ColumnModel-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/ColumnModel-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,9 +7,11 @@ */ -Ext.grid.ColumnModel=function(config){if(config.columns){Ext.apply(this,config);this.setConfig(config.columns,true);}else{this.setConfig(config,true);} -this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","columnlockchange","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this);};Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{defaultWidth:100,defaultSortable:false,getColumnId:function(index){return this.config[index].id;},getColumnAt:function(index){return this.config[index];},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(!c.isColumn){var cls=Ext.grid.Column.types[c.xtype||'gridcolumn'];c=new cls(c);config[i]=c;} +Ext.grid.ColumnModel=function(config){this.defaultWidth=100;this.defaultSortable=false;if(config.columns){Ext.apply(this,config);this.setConfig(config.columns,true);}else{this.setConfig(config,true);} +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='xgc'+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;} @@ -21,5 +23,5 @@ return this.config[col].sortable;},isMenuDisabled:function(col){return!!this.config[col].menuDisabled;},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].getCellEditor(rowIndex);},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-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;}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/EditorGrid-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/EditorGrid-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/EditorGrid-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,8 +12,7 @@ this.on("celldblclick",this.onCellDblClick,this);} this.getGridEl().addClass("xedit-grid");},onCellDblClick:function(g,row,col){this.startEditing(row,col);},onAutoEditClick:function(e,t){if(e.button!==0){return;} var row=this.view.findRowIndex(t);var col=this.view.findCellIndex(t);if(row!==false&&col!==false){this.stopEditing();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);var r=ed.record;var field=this.colModel.getDataIndex(ed.col);value=this.postEditValue(value,startValue,r,field);if(String(value)!==String(startValue)){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){return;} -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=this.preEditValue(r,field);ed.startEdit(this.view.getCell(row,col).firstChild,v===undefined?'':v);}).defer(50,this);}}},preEditValue:function(r,field){var value=r.data[field];return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlDecode(value):value;},postEditValue:function(value,originalValue,r,field){return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlEncode(value):value;},stopEditing:function(cancel){if(this.activeEditor){this.activeEditor[cancel===true?'cancelEdit':'completeEdit']();} +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=this.preEditValue(r,field);ed.startEdit(this.view.getCell(row,col).firstChild,v);}).defer(50,this);}}},preEditValue:function(r,field){var value=r.data[field];return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlDecode(value):value;},postEditValue:function(value,originalValue,r,field){return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlEncode(value):value;},stopEditing:function(cancel){if(this.activeEditor){this.activeEditor[cancel===true?'cancelEdit':'completeEdit']();} this.activeEditor=null;},onDestroy:function(){if(this.rendered){var cols=this.colModel.config;for(var i=0,len=cols.length;i<len;i++){var c=cols[i];Ext.destroy(c.editor);}} Ext.grid.EditorGridPanel.superclass.onDestroy.call(this);}});Ext.reg('editorgrid',Ext.grid.EditorGridPanel); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridPanel-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridPanel-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridPanel-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -13,8 +13,8 @@ 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[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;}} -if(this.store){var ss=this.store.getSortState();if(ss){o.sort=ss;}} +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();if(this.deferRowRender){this.view.afterRender.defer(10,this.view);}else{this.view.afterRender();} 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();} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridView-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridView-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/grid/GridView-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -21,12 +21,12 @@ return this.fly(el).findParent(this.cellSelector,this.cellSelectorDepth);},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,this.rowSelectorDepth);},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));this.syncFocusEl(row);},removeRows:function(firstRow,lastRow){var bd=this.mainBody.dom;for(var rowIndex=firstRow;rowIndex<=lastRow;rowIndex++){Ext.removeNode(bd.childNodes[firstRow]);} -this.syncFocusEl(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(){this.syncHeaderScroll();var mb=this.scroller.dom;this.grid.fireEvent("bodyscroll",mb.scrollLeft,mb.scrollTop);},syncHeaderScroll:function(){var mb=this.scroller.dom;this.innerHd.scrollLeft=mb.scrollLeft;this.innerHd.scrollLeft=mb.scrollLeft;},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);} +return this.fly(el).findParent(this.rowSelector,this.rowSelectorDepth);},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));this.focusRow(row);},removeRows:function(firstRow,lastRow){var bd=this.mainBody.dom;for(var rowIndex=firstRow;rowIndex<=lastRow;rowIndex++){Ext.removeNode(bd.childNodes[firstRow]);} +this.focusRow(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(){this.syncHeaderScroll();var mb=this.scroller.dom;this.grid.fireEvent("bodyscroll",mb.scrollLeft,mb.scrollTop);},syncHeaderScroll:function(){var mb=this.scroller.dom;this.innerHd.scrollLeft=mb.scrollLeft;this.innerHd.scrollLeft=mb.scrollLeft;},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(),row,trow;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;trow=row.firstChild.rows[0];for(var j=0;j<clen;j++){trow.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(),row;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;row.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(),row;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;row.firstChild.rows[0].childNodes[col].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;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";} @@ -35,39 +35,35 @@ 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","");}}}},afterRender:function(){if(!this.ds||!this.cm){return;} -this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText();}},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();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(isAlt){row.className+=" x-grid3-row-alt";}else{row.className=row.className.replace("x-grid3-row-alt","");}}}},afterRender:function(){this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText();}},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();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.trackMouseOver){this.mainBody.on("mouseover",this.onRowOver,this);this.mainBody.on("mouseout",this.onRowOut,this);} if(g.enableDragDrop||g.enableDrag){this.dragZone=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();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.syncHeaderScroll();} -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=[],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);p.tooltip=this.getColumnTooltip(i);if(cm.config[i].align=='right'){p.istyle='padding-right:16px';}else{delete p.istyle;} +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);p.tooltip=this.getColumnTooltip(i);if(cm.config[i].align=='right'){p.istyle='padding-right:16px';}else{delete p.istyle;} cb[cb.length]=ct.apply(p);} return ts.header.apply({cells:cb.join(""),tstyle:'width:'+this.getTotalWidth()+';'});},getColumnTooltip:function(i){var tt=this.cm.getColumnTooltip(i);if(tt){if(Ext.QuickTips.isEnabled()){return'ext:qtip="'+tt+'"';}else{return'title="'+tt+'"';}} -return"";},beforeUpdate:function(){this.grid.stopEditing(true);},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();},focusRow:function(row){this.focusCell(row,0,false);},focusCell:function(row,col,hscroll){this.syncFocusEl(this.ensureVisible(row,col,hscroll));if(Ext.isGecko){this.focusEl.focus();}else{this.focusEl.focus.defer(1,this.focusEl);}},resolveCell:function(row,col,hscroll){if(typeof row!="number"){row=row.rowIndex;} -if(!this.ds){return null;} -if(row<0||row>=this.ds.getCount()){return null;} +return"";},beforeUpdate:function(){this.grid.stopEditing(true);},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();},focusRow:function(row){this.focusCell(row,0,false);},focusCell:function(row,col,hscroll){row=Math.min(row,Math.max(0,this.getRows().length-1));var xy=this.ensureVisible(row,col,hscroll);this.focusEl.setXY(xy||this.scroller.getXY());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(!this.ds){return;} +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);} -return{row:rowEl,cell:cellEl};},getResolvedXY:function(resolved){if(!resolved){return null;} -var s=this.scroller.dom,c=resolved.cell,r=resolved.row;return c?Ext.fly(c).getXY():[s.scrollLeft+this.el.getX(),Ext.fly(r).getY()];},syncFocusEl:function(row,col,hscroll){var xy=row;if(!Ext.isArray(xy)){row=Math.min(row,Math.max(0,this.getRows().length-1));xy=this.getResolvedXY(this.resolveCell(row,col,hscroll));} -this.focusEl.setXY(xy||this.scroller.getXY());},ensureVisible:function(row,col,hscroll){var resolved=this.resolveCell(row,col,hscroll);if(!resolved||!resolved.row){return;} -var rowEl=resolved.row,cellEl=resolved.cell;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;} +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 this.getResolvedXY(resolved);},insertRows:function(dm,firstRow,lastRow,isUpdate){if(!isUpdate&&firstRow===0&&lastRow>=dm.getCount()-1){this.refresh();}else{if(!isUpdate){this.fireEvent("beforerowsinserted",this,firstRow,lastRow);} +return cellEl?Ext.fly(cellEl).getXY():[c.scrollLeft+this.el.getX(),Ext.fly(rowEl).getY()];},insertRows:function(dm,firstRow,lastRow,isUpdate){if(!isUpdate&&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);}} -this.syncFocusEl(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;';} +this.focusRow(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,i;var tw=cm.getTotalWidth(false);var aw=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(aw<20){return;} +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;}} @@ -77,26 +73,26 @@ 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);} -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(true);var result=this.renderBody();this.mainBody.update(result);if(headersToo===true){this.updateHeaders();this.updateHeaderSortState();} +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(true);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('<div class="x-grid-empty">'+this.emptyText+'</div>');}},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){Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.destroy();delete this.colMenu;} -if(this.hmenu){Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.destroy();delete this.hmenu;} +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];}} -if(this.dragZone){this.dragZone.unreg();} -Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);Ext.destroy(this.resizeMarker,this.resizeProxy,this.focusEl,this.mainBody,this.scroller,this.mainHd,this.mainWrap,this.dragZone,this.splitone,this.columnDrag,this.columnDrop);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},onDenyColumnHide:function(){},render:function(){if(this.autoFill){this.fitColumns(true,true);}else if(this.forceFit){this.fitColumns(true,false);}else if(this.grid.autoExpandColumn){this.autoExpand(true);} +Ext.destroy(this.resizeMarker,this.resizeProxy);if(this.dragZone){this.dragZone.unreg();} +this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},onDenyColumnHide:function(){},render:function(){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();},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){delete this.lastViewWidth;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();this.syncFocusEl(0);},onClear:function(){this.refresh();this.syncFocusEl(0);},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);},initEvents:function(){},onHeaderClick:function(g,index){if(this.headersDisabled||!this.cm.isSortable(index)){return;} -g.stopEditing(true);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&&!e.within(this.getRow(row),true)){this.removeRowClass(row,"x-grid3-row-over");}},handleWheel:function(e){e.stopPropagation();},onRowSelect:function(row){this.addRowClass(row,this.selectedRowClass);},onRowDeselect:function(row){this.removeRowClass(row,this.selectedRowClass);},onCellSelect:function(row,col){var cell=this.getCell(row,col);if(cell){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.syncHeaderScroll();} +this.cm=cm;},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.focusRow(0);},onClear:function(){this.refresh();this.focusRow(0);},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(true);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,this.selectedRowClass);},onRowDeselect:function(row){this.removeRowClass(row,this.selectedRowClass);},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.isMenuDisabled(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)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'e-resize':'col-resize';}else if(r.right-x<=(!this.activeHdBtn?hw:2)&&this.cm.isResizable(this.activeHdIndex)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'w-resize':'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];var w=t.offsetWidth,adjust=false;if((ex-x)<=this.hw){adjust=-1;}else if((x+w)-ex<=this.hw){adjust=0;} +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.isMenuDisabled(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)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'e-resize':'col-resize';}else if(r.right-x<=(!this.activeHdBtn?hw:2)&&this.cm.isResizable(this.activeHdIndex)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'w-resize':'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){if(ci+adjust<0){return;} 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);}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AbsoluteLayout-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AbsoluteLayout-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AbsoluteLayout-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,5 +7,5 @@ */ -Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:'x-abs-layout-item',isForm:false,setContainer:function(ct){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,ct);if(ct.isXType('form')){this.isForm=true;}},onLayout:function(ct,target){if(this.isForm){ct.body.position();this.paddingLeft=ct.body.getPadding('r');this.paddingTop=ct.body.getPadding('t');}else{target.position();this.paddingLeft=target.getPadding('r');this.paddingTop=target.getPadding('t');} -Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,ct,target);},getAnchorViewSize:function(ct,target){return this.isForm?ct.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,ct,target);},isValidParent:function(c,target){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,c,target);},adjustWidthAnchor:function(value,comp){return value?value-comp.getPosition(true)[0]+this.paddingLeft:value;},adjustHeightAnchor:function(value,comp){return value?value-comp.getPosition(true)[1]+this.paddingTop:value;}});Ext.Container.LAYOUTS['absolute']=Ext.layout.AbsoluteLayout; \ No newline at end of file +Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:'x-abs-layout-item',isForm:false,setContainer:function(ct){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,ct);if(ct.isXType('form')){this.isForm=true;}},onLayout:function(ct,target){if(this.isForm){ct.body.position();}else{target.position();} +Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,ct,target);},getAnchorViewSize:function(ct,target){return this.isForm?ct.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,ct,target);},isValidParent:function(c,target){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,c,target);},adjustWidthAnchor:function(value,comp){return value?value-comp.getPosition(true)[0]:value;},adjustHeightAnchor:function(value,comp){return value?value-comp.getPosition(true)[1]:value;}});Ext.Container.LAYOUTS['absolute']=Ext.layout.AbsoluteLayout; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AccordionLayout-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AccordionLayout-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/AccordionLayout-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,8 +12,8 @@ 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&&this.activeItem!=c){c.collapsed=true;} +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;if(!ai.collapsed){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);}},setActiveItem:function(item){item=this.container.getComponent(item);this.activeItem=item;if(item){item.expand();}}});Ext.Container.LAYOUTS['accordion']=Ext.layout.Accordion; \ No newline at end of file +size.height-=hh;item.setSize(size);}}});Ext.Container.LAYOUTS['accordion']=Ext.layout.Accordion; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/BorderLayout-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/BorderLayout-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/BorderLayout-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -13,28 +13,27 @@ 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&&Ext.layout.BorderLayout.WARN!==false){throw'No center region defined in BorderLayout '+ct.id;} +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);} -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)};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();}},destroy:function(){var r=['north','south','east','west'];for(var i=0;i<r.length;i++){var region=this[r[i]];if(region){if(region.destroy){region.destroy();}else if(region.split){region.split.destroy(true);}}} +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();}},destroy:function(){var r=['north','south','east','west'];for(var i=0;i<r.length;i++){var region=this[r[i]];if(region&®ion.split){region.split.destroy(true);}} Ext.layout.BorderLayout.superclass.destroy.call(this);}});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},floatingZIndex:100,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(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('<div class="x-tool x-tool-{id}"> </div>');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,id:this.panel.id+'-xcollapsed'});this.collapsedEl.enableDisplayMode('block');if(this.collapseMode=='mini'){this.collapsedEl.addClass('x-layout-cmini-'+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver('x-layout-mini-over');this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on('click',this.onExpandClick,this,{stopEvent:true});}else{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',this.floatingZIndex);},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show();} +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",this.floatingZIndex+2);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.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);} @@ -45,4 +44,4 @@ 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;},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);}});Ext.Container.LAYOUTS['border']=Ext.layout.BorderLayout; \ No newline at end of file +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 Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/FormLayout-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/FormLayout-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/layout/FormLayout-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,4 +12,4 @@ if(ct.labelAlign=='top'){this.labelStyle="width:auto;";this.labelAdjust=0;this.elementStyle="padding-left:0;";}} if(!this.fieldTpl){var t=new Ext.Template('<div class="x-form-item {5}" tabIndex="-1">','<label for="{0}" style="{2}" class="x-form-item-label">{1}{4}</label>','<div class="x-form-element" id="x-form-el-{0}" style="{3}">','</div><div class="{6}"></div>','</div>');t.disableFormats=true;t.compile();Ext.layout.FormLayout.prototype.fieldTpl=t;}},renderItem:function(c,position,target){if(c&&!c.rendered&&(c.isFormField||c.fieldLabel)&&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.isFormField||comp.fieldLabel?(comp.hideLabel?0:this.labelAdjust):0);},isValidParent:function(c,target){return true;}});Ext.Container.LAYOUTS['form']=Ext.layout.FormLayout; \ No newline at end of file +c.render('x-form-el-'+c.id);}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments);}},adjustWidthAnchor:function(value,comp){return value-(comp.isFormField?(comp.hideLabel?0:this.labelAdjust):0);},isValidParent:function(c,target){return true;}});Ext.Container.LAYOUTS['form']=Ext.layout.FormLayout; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/BaseItem-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/BaseItem-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/BaseItem-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,6 +7,6 @@ */ -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,clickHideDelay:1,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.itemId||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);} +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.clickHideDelay,this.parentMenu,[true]);}},expandMenu:function(autoActivate){},hideMenu:function(){}}); \ No newline at end of file +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(){}}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/Menu-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/Menu-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/menu/Menu-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -8,7 +8,7 @@ Ext.menu.Menu=function(config){if(Ext.isArray(config)){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(false,Ext.Container.prototype.getComponentId);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,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:this.zIndex||15000});},render:function(){if(this.el){return;} +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,ignoreParentClicks: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();if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this);} if(this.plain){el.addClass("x-menu-plain");} if(this.cls){el.addClass(this.cls);} @@ -28,7 +28,7 @@ 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.remove(item);item.destroy();},removeAll:function(){if(this.items){var f;while(f=this.items.first()){this.remove(f);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();} +return item;},remove:function(item){this.items.removeKey(item.id);item.destroy();},removeAll:function(){if(this.items){var f;while(f=this.items.first()){this.remove(f);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();} this.removeAll();if(this.ul){this.ul.removeAllListeners();} if(this.el){this.el.destroy();}},beforeDestroy:Ext.emptyFn});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 Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/tips/Tip-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/tips/Tip-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/tips/Tip-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,7 +7,7 @@ */ -Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:'x-tip',floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:'hide',initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=',header';}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:'close',handler:this[this.closeAction],scope:this});}},showAt:function(xy){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!='number')){this.doAutoWidth();} +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')){this.doAutoWidth();} if(this.constrainPosition){xy=this.el.adjustForConstraints(xy);} this.setPagePosition(xy[0],xy[1]);},doAutoWidth:function(){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(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true;}},showBy:function(el,pos){if(!this.rendered){this.render(Ext.getBody());} Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeEventModel-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeEventModel-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeEventModel-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -14,11 +14,10 @@ return t;},delegateOut:function(e,t){if(!this.beforeEvent(e)){return;} if(e.getTarget('.x-tree-ec-icon',1)){var n=this.getNode(e);this.onIconOut(e,n);if(n==this.lastEcOver){delete this.lastEcOver;}} if((t=this.getNodeTarget(e))&&!e.within(t,true)){this.onNodeOut(e,this.getNode(e));}},delegateOver:function(e,t){if(!this.beforeEvent(e)){return;} -if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on('mouseover',this.trackExit,this);this.trackingDoc=true;} if(this.lastEcOver){this.onIconOut(e,this.lastEcOver);delete this.lastEcOver;} if(e.getTarget('.x-tree-ec-icon',1)){this.lastEcOver=this.getNode(e);this.onIconOver(e,this.lastEcOver);} -if(t=this.getNodeTarget(e)){this.onNodeOver(e,this.getNode(e));}},trackExit:function(e){if(this.lastOverNode&&!e.within(this.lastOverNode.ui.getEl())){this.onNodeOut(e,this.lastOverNode);delete this.lastOverNode;Ext.getBody().un('mouseover',this.trackExit,this);this.trackingDoc=false;}},delegateClick:function(e,t){if(!this.beforeEvent(e)){return;} +if(t=this.getNodeTarget(e)){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){this.lastOverNode=node;node.ui.onOver(e);},onNodeOut:function(e,node){node.ui.onOut(e);},onIconOver:function(e,node){node.ui.addClass('x-tree-ec-over');},onIconOut:function(e,node){node.ui.removeClass('x-tree-ec-over');},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;} +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);},onIconOver:function(e,node){node.ui.addClass('x-tree-ec-over');},onIconOut:function(e,node){node.ui.removeClass('x-tree-ec-over');},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;}}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeNode-min.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeNode-min.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/build/widgets/tree/TreeNode-min.js 2008-12-01 20:55:57 UTC (rev 32) @@ -25,7 +25,7 @@ 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?this.parentNode.getPath():this.getPath(),false,function(){var node=tree.getNodeById(this.id);tree.getTreeEl().scrollChildIntoView(node.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.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(){var node=tree.getNodeById(this.id);tree.getTreeEl().scrollChildIntoView(node.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);} Added: mickael/trunk/ext/v3.0.0-a1/css/ext-all.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/css/ext-all.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/css/ext-all.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,5086 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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-history-frame { + position:absolute; + top:-1px; + left:0; + width:1px; + height:1px; + visibility:hidden; +} + +#x-history-field { + position:absolute; + top:0; + left:-1px; + width:1px; + height:1px; + visibility:hidden; +} + + + + + + + +.x-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, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border:1px solid #8db2e3; + height:2px; + background: #deecfd; + font-size:1px; + line-height:1px; +} +.x-tab-panel-header-plain .x-tab-strip-spacer { + border-top: 0 none; +} +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-bottom: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-bottom { + background:transparent !important; + padding-bottom:0 !important; +} +.x-tab-panel-footer-plain { + background:transparent !important; + border-width:0 !important; + padding-top:0 !important; +} + +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, +.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { + height:3px; +} + +ul.x-tab-strip li { + float:left; + margin-left:2px; +} + + +ul.x-tab-strip li.x-tab-edge { + float:left; + margin:0 !important; + padding:0 !important; + border:0 none !important; + font-size:1px !important; + line-height:1px !important; + overflow:hidden; + zoom:1; + background:transparent !important; + width:1px; +} + +.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { + display:block; +} + +.x-tab-strip a { + text-decoration:none !important; + -moz-outline: none; + outline: none; + cursor:pointer; +} + +.x-tab-strip-inner { + overflow:hidden; + text-overflow: ellipsis; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; + white-space: nowrap; + cursor:pointer; + padding:4px 0; +} +.x-tab-strip-top .x-tab-with-icon .x-tab-right { + padding-left:6px; +} +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { + padding-left:20px; + background-position: 0 3px; + background-repeat: no-repeat; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { + cursor:default; +} + +.x-tab-strip-active span.x-tab-strip-text { + cursor:default; + 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; +} + + + + + + + + + +.x-form-field{ + margin: 0 0 0 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; +} +textarea.x-form-field { + padding:2px 3px; +} +.x-form-text, .ext-ie .x-form-file { + height:22px; + line-height:18px; + vertical-align:middle; +} +.ext-ie .x-form-text { + margin:-1px 0; + height:22px; + line-height:18px; +} +.ext-ie textarea.x-form-field { + margin:-1px 0; +} +.ext-strict .x-form-text { + height:18px; +} +.ext-safari.ext-mac textarea.x-form-field { + margin-bottom:-2px; +} +.ext-gecko .x-form-text { + padding-top:2px; + padding-bottom:0; +} +textarea { + resize: none; +} + + + +.x-form-select-one { + height:20px; + line-height:18px; + vertical-align:middle; + background-color:#fff; + border: 1px solid #B5B8C8; +} + + + + + + +.x-form-check-group, .x-form-radio-group { + margin-bottom: 0; +} +.x-form-check-group .x-form-invalid .x-panel-body, +.x-form-radio-group .x-form-invalid .x-panel-body { + background-color: transparent; +} +.x-form-check-wrap, .x-form-radio-wrap { + padding: 3px 0 0 0; + line-height:18px; +} +.x-form-check-group .x-form-check-wrap, +.x-form-radio-group .x-form-radio-wrap { + height: 18px; +} +.ext-ie .x-form-check-group .x-form-check-wrap, +.ext-ie .x-form-radio-group .x-form-radio-wrap { + height: 21px; +} +.ext-ie .x-form-check-wrap input, +.ext-ie .x-form-radio-wrap input { + width:15px; + height:15px; +} +.x-form-check, .x-form-radio { + height: 13px; + width: 13px; + vertical-align: bottom; +} +.x-form-radio { + margin-bottom: 3px; +} +.x-form-check, .ext-ie .x-form-radio { + margin-bottom: 2px; +} +.x-form-check-wrap-inner, .x-form-radio-wrap-inner { + display: inline; + padding: 3px 0 0 0; +} +.x-form-check { + background: url('../images/default/form/checkbox.gif') no-repeat 0 0; +} +.x-form-radio { + background: url('../images/default/form/radio.gif') no-repeat 0 0; +} +.x-form-check-focus .x-form-check, .x-form-check-over .x-form-check, +.x-form-check-focus .x-form-radio, .x-form-check-over .x-form-radio { + background-position: -13px 0; +} +.x-form-check-down .x-form-check, +.x-form-check-down .x-form-radio { + background-position:-26px 0; +} +.x-form-check-checked .x-form-check-focus .x-form-check, +.x-form-check-checked .x-form-check-over .x-form-check { + background-position:-13px -13px; +} +.x-form-check-checked .x-form-check-down .x-form-check { + background-position:-26px -13px; +} +.x-form-check-checked .x-form-check, +.x-form-check-checked .x-form-radio { + background-position:0 -13px; +} +.x-form-check-group-label { + border-bottom: 1px solid #99BBE8; + color: #15428B; + margin-bottom: 5px; + padding-left: 3px !important; + float: none !important; +} + + + +.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 { + position:relative; + left:0;top:0; + zoom:1; + white-space: nowrap; +} + +.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 #cc3300; +} +.ext-safari .x-form-invalid{ + background-color:#ffeeee; + border: 1px solid #ff7870; +} +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom; +} + + +.x-editor { + visibility:hidden; + padding:0; + margin:0; +} +.x-form-check-wrap { + height: 22px; + 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; + zoom:1; +} + +.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:#c0272b; + 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-left label { + text-align:left; +} +.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; + display:block; +} +.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:10px; +} +.x-fieldset legend .x-tool-toggle { + margin-right:3px; + margin-left:0; + float:left !important; +} +.x-fieldset legend input { + margin-right:3px; + float:left !important; + height:13px; + width:13px; +} +fieldset.x-panel-collapsed { + padding-bottom:0 !important; + border-width: 1px 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 .x-toolbar .x-form-text { + position:relative; + top:-1px; +} +.x-fieldset-noborder { + border:0px none transparent; +} +.x-fieldset-noborder legend { + margin-left:-3px; +} + +.ext-ie .x-fieldset-noborder legend { + position: relative; + margin-bottom:23px; +} +.ext-ie .x-fieldset-noborder legend span { + position: absolute; + left:-5px; +} + +.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-fieldset { + overflow:hidden; +} + +.x-fieldset-bwrap { + overflow:hidden; + zoom:1; +} + +.x-fieldset-body { + overflow:hidden; +} + + + + + + + + + + + + + + + +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; + cursor:pointer; + white-space: nowrap; +} +.x-btn button{ + border:0 none; + background:transparent; + font:normal 11px arial,tahoma,verdana,helvetica; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; + color:#333; +} +* html .ext-ie .x-btn button { + width:1px; +} +.ext-gecko .x-btn button { + padding-left:0; + padding-right:0; +} +.ext-gecko .x-btn button::-moz-focus-inner { + padding:0; +} +.ext-ie .x-btn button { + padding-top:2px; +} +.x-btn em { + font-style:normal; + font-weight:normal; +} +.x-btn td { + padding:0 !important; +} +.x-btn-text { + cursor:pointer; + white-space: nowrap; + padding:0; +} + + + + +.x-btn-noicon .x-btn-small .x-btn-text{ + height: 16px; +} +.x-btn-noicon .x-btn-medium .x-btn-text{ + height: 24px; +} +.x-btn-noicon .x-btn-large .x-btn-text{ + height: 32px; +} + + +.x-btn-icon .x-btn-text{ + background-position: center; + background-repeat: no-repeat; +} +.x-btn-icon .x-btn-small .x-btn-text{ + height: 16px; + width: 16px; +} +.x-btn-icon .x-btn-medium .x-btn-text{ + height: 24px; + width: 24px; +} +.x-btn-icon .x-btn-large .x-btn-text{ + height: 32px; + width: 32px; +} + + + +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:18px; + height:16px; +} +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:26px; + height:24px; +} +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:34px; + height:32px; +} + +.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:18px; +} +.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:26px; +} +.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:34px; +} + +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:18px; + height:16px; +} +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:26px; + height:24px; +} +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:34px; + height:32px; +} + +.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:18px; +} +.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:26px; +} +.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:34px; +} + + +.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ + font-size:1px; + line-height:1px; + width:3px; + display:block; + overflow:hidden; +} +.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ + height:3px; +} +.x-btn-tl{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 0; +} +.x-btn-tr{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px 0; +} +.x-btn-tc{ + height:3px; + background:url(../images/default/button/btn.gif) repeat-x 0 -6px; +} + +.x-btn-ml{ + width:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 -24px; +} +.x-btn-mr{ + width:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px -24px; +} + +.x-btn-mc{ + background:url(../images/default/button/btn.gif) repeat-x 0 -1096px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} +.x-btn-bl{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 -3px; +} +.x-btn-br{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px -3px; +} +.x-btn-bc{ + height:3px; + background:url(../images/default/button/btn.gif) repeat-x 0 -15px; +} + + +.x-btn-over .x-btn-tl{ + background-position: -6px 0; +} +.x-btn-over .x-btn-tr{ + background-position: -9px 0; +} +.x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} +.x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} +.x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} +.x-btn-over .x-btn-br{ + background-position: -9px -3px; +} +.x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + + +.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} +.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} +.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} +.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} +.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} +.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} +.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + + +.x-btn-disabled *{ + color:gray !important; + cursor:default !important; +} + + + + +.x-btn-mc em.x-btn-arrow { + display:block; + background:transparent url(../images/default/button/arrow.gif) no-repeat right center; + padding-right:10px; +} + +.x-btn-mc em.x-btn-split { + display:block; + background:transparent url(../images/default/button/s-arrow.gif) no-repeat right center; + padding-right:14px; +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + display:block; + background:transparent url(../images/default/button/s-arrow-b-noline.gif) no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-mc em.x-btn-split-bottom { + display:block; + background:transparent url(../images/default/button/s-arrow-b.gif) no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + + +.x-btn-as-arrow .x-btn-mc em { + display:block; + background:transparent; + padding-bottom:14px; +} + + +.x-btn-group { + padding:1px; +} +.x-btn-group-header { + padding:2px; + color: #3e6aaa; + text-align:center; +} +.x-btn-group-tc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 0; + overflow:hidden; +} +.x-btn-group-tl { + background: transparent url(../images/default/button/group-cs.gif) no-repeat 0 0; + padding-left:3px; + zoom:1; +} +.x-btn-group-tr { + background: transparent url(../images/default/button/group-cs.gif) no-repeat right 0; + zoom:1; + padding-right:3px; +} +.x-btn-group-bc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 bottom; + zoom:1; +} +.x-btn-group-bc .x-panel-footer { + zoom:1; +} + +.x-btn-group-bl { + background: transparent url(../images/default/button/group-cs.gif) no-repeat 0 bottom; + padding-left:3px; + zoom:1; +} +.x-btn-group-br { + background: transparent url(../images/default/button/group-cs.gif) no-repeat right bottom; + padding-right:3px; + zoom:1; +} +.x-btn-group-mc { + border:0 none; + padding:1px 0 0 0; + margin:0; +} +.x-btn-group-mc .x-btn-group-body { + background:transparent; + border: 0 none; +} +.x-btn-group-ml { + background: transparent url(../images/default/button/group-lr.gif) repeat-y 0 0; + padding-left:3px; + zoom:1; +} +.x-btn-group-mr { + background: transparent url(../images/default/button/group-lr.gif) repeat-y right 0; + padding-right:3px; + zoom:1; +} +.x-btn-group-bc .x-btn-group-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-btn-group-bc { + height:3px; + font-size:0; + line-height:0; +} +.x-btn-group-bwrap { + overflow:hidden; + zoom:1; +} +.x-btn-group-body { + overflow:hidden; + zoom:1; +} +.x-btn-group-notitle .x-btn-group-tc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 0; + overflow:hidden; + height:2px; +} + + + + + + +.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; + left:0; + top:0; + zoom:1; + overflow:hidden; +} +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} +.x-toolbar td { + vertical-align:middle; +} +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; + font:normal 11px arial,tahoma, 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-toolbar-cell { + vertical-align:middle; +} + +.x-toolbar .x-btn-tl{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-tr{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-tc{ + background-position: 500px 500px; +} + +.x-toolbar .x-btn-ml{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-mr{ + background-position: 500px 500px; +} + +.x-toolbar .x-btn-mc{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-bl{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-br{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-bc{ + background-position: 500px 500px; +} + + +.x-toolbar .x-btn-over .x-btn-tl{ + background-position: -6px 0; +} +.x-toolbar .x-btn-over .x-btn-tr{ + background-position: -9px 0; +} +.x-toolbar .x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-toolbar .x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} +.x-toolbar .x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} +.x-toolbar .x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} +.x-toolbar .x-btn-over .x-btn-br{ + background-position: -9px -3px; +} +.x-toolbar .x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} +.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} +.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} +.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} +.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} +.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} +.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + + + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar div.xtb-text{ + padding:2px 2px 0; + line-height:16px; + display:block; +} +.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/refresh.gif) !important; +} +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/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-toolbar-ct { + width:100%; +} + +.x-toolbar-left { + +} + +.x-toolbar-right td { + text-align:left; +} + +.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { + overflow:hidden; + zoom:1; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +} +.x-toolbar-more .x-btn-small .x-btn-text{ + height: 16px; + width: 12px; +} +.x-toolbar-more em.x-btn-arrow { + display:inline; + background:transparent; + padding-right:0; +} + +div.x-toolbar-no-items { + color:gray !important; + padding:5px 10px !important; +} + + + +.ext-border-box .x-toolbar-cell .x-form-text { + margin-top:1px !important; + margin-bottom:-1px !important; +} + +.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { + margin:0 !important; +} +.ext-ie .x-toolbar-cell .x-form-field-wrap { + height:21px; +} + + + + + + +.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; +} + +.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-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; + + 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; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; +} + + +.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 #eeeeee; +} + + +.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,.x-grid3-row-checked .x-grid3-row-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-td-row-icon { + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; + vertical-align:top; + text-align:center; +} +.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { + padding:0 !important; + background-position:center center; + background-repeat:no-repeat; + width:16px; + height:16px; + margin-left:2px; + margin-top:3px; +} + + + +.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; +} +.ext-ie .x-props-grid .x-editor .x-form-text { + position:static; + top:0; +} + +.x-grid-empty { + padding:10px; + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + + + +.ext-ie7 .x-grid-panel .x-panel-bbar { + position:relative; +} + + + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + padding-right:0; + border-right:1px solid #ededed; +} +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} + + + + + + + + + + + + + + + +.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; +} + + + + + + +.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-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); +} +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.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:#444444; +} +.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-arrows .x-tree-elbow{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-end{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-line{ + background:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + + + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} +.x-tree-node{ + 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); +} + +.x-tree-root-ct { + zoom:1; +} + + + + + + + + + +.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-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, +.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, +.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ + background:transparent !important; + vertical-align:middle; +} +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} +.x-date-middle .x-btn-mc em.x-btn-arrow { + 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; + width:130px; +} +.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; +} + + + + + + + + + + + + + + +.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; +} + + + + + + + + + + + + + + +.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; + overflow:hidden; +} +.x-menu-focus { + position:absolute; + left:-1px; + top:-1px; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + overflow:hidden; + display:block; +} +.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; + 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; + position: relative; +} + +.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; +} + +.ext-strict .ext-ie7 .x-panel-tc { + overflow: visible; +} +.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, .x-panel-nofooter .x-window-bc { + height:6px; + font-size:0; + line-height:0; +} + +.x-panel-bwrap { + overflow:hidden; + zoom:1; + left:0;top:0; +} +.x-panel-body { + overflow:hidden; + zoom:1; +} + +.x-panel-collapsed .x-resizable-handle{ + display:none; +} + +.ext-gecko .x-panel-animated div { + overflow:hidden !important; +} + + +.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-tool-print { + background-position:0 -315px; +} +.x-tool-print-over { + background-position:-15px -315px; +} + + +.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; + left:0;top:0; +} +.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-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; +} + + +.ext-strict .ext-ie6 .x-layout-split{ + background-color: #fff !important; + filter: alpha(opacity=1); +} + +.x-layout-split-h{ + background-image:url(../images/default/s.gif); + background-position: left; +} +.x-layout-split-v{ + background-image:url(../images/default/s.gif); + background-position: top; +} + +.x-column-layout-ct { + overflow:hidden; + + zoom:1; +} + +.x-column { + float:left; + padding:0; + margin:0; + overflow:hidden; + zoom:1; + +} +.x-column-inner { + overflow:hidden; + zoom:1; +} + + + +.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; +} + +.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { + margin:0; +} + + +.x-box-layout-ct { + overflow:hidden; + zoom:1; +} +.x-box-inner { + overflow:hidden; + zoom:1; + position:relative; + left:0; + top:0; +} +.x-box-item { + position:absolute; + left:0; + top:0; +} + + + + + + + + +.x-progress-wrap { + border:1px solid #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-list-header{ + background: #f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom; + cursor:default; + zoom:1; + height:22px; +} +.x-list-header-inner div { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; +} +.x-list-header-inner div em { + display:block; + border-left:1px solid #ddd; + padding:4px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + font:normal 11px arial, tahoma, helvetica, sans-serif; + line-height:14px; +} +.x-list-body { + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + zoom:1; +} +.x-list-body dl { + zoom:1; +} +.x-list-body dt { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + cursor:pointer; + zoom:1; +} +.x-list-body dt em { + display:block; + padding:3px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#DFE8F6; +} + +.x-list-resizer { + border-left:1px solid #555; + border-right:1px solid #555; + position:absolute; + left:0; + top:0; +} + +.x-list-header-inner em.sort-asc { + background: transparent url(../images/default/grid/sort-hd.gif) no-repeat center 0; + border-color: #99bbe8; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} +.x-list-header-inner em.sort-desc { + background: transparent url(../images/default/grid/sort-hd.gif) no-repeat center -23px; + border-color: #99bbe8; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} + + +.x-slider { + zoom:1; +} +.x-slider-inner { + position:relative; + left:0; + top:0; + overflow:visible; + zoom:1; +} +.x-slider-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + display:block; + overflow:hidden; +} + + +.x-slider-horz { + padding-left:7px; + background:transparent url(../images/default/slider/slider-bg.png) no-repeat 0 -22px; +} +.x-slider-horz .x-slider-end { + padding-right:7px; + zoom:1; + background:transparent url(../images/default/slider/slider-bg.png) no-repeat right -44px; +} +.x-slider-horz .x-slider-inner { + background:transparent url(../images/default/slider/slider-bg.png) repeat-x 0 0; + height:22px; +} +.x-slider-horz .x-slider-thumb { + width:14px; + height:15px; + position:absolute; + left:0; + top:3px; + background:transparent url(../images/default/slider/slider-thumb.png) no-repeat 0 0; +} +.x-slider-horz .x-slider-thumb-over { + background-position: -14px -15px; +} +.x-slider-horz .x-slider-thumb-drag { + background-position: -28px -30px; +} + + +.x-slider-vert { + padding-top:7px; + background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -44px 0; + width:22px; +} +.x-slider-vert .x-slider-end { + padding-bottom:7px; + zoom:1; + background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -22px bottom; +} +.x-slider-vert .x-slider-inner { + background:transparent url(../images/default/slider/slider-v-bg.png) repeat-y 0 0; +} +.x-slider-vert .x-slider-thumb { + width:15px; + height:14px; + position:absolute; + left:3px; + bottom:0; + background:transparent url(../images/default/slider/slider-v-thumb.png) no-repeat 0 0; +} +.x-slider-vert .x-slider-thumb-over { + background-position: -15px -14px; +} +.x-slider-vert .x-slider-thumb-drag { + background-position: -30px -28px; +} + + + + + + + + +.x-window-dlg .x-window-body { + border:0 none !important; + padding:5px 10px; + overflow:hidden !important; +} +.x-window-dlg .x-window-mc { + border:0 none !important; +} +.x-window-dlg .ext-mb-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; +} +.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; +} +.ext-gecko2 .ext-mb-fix-cursor { + overflow:auto; +} Added: mickael/trunk/ext/v3.0.0-a1/dep-tree.json =================================================================== --- mickael/trunk/ext/v3.0.0-a1/dep-tree.json (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/dep-tree.json 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1 @@ +[{"text":"Ext Core (Required)","id":"c-1176543742240","options":[],"files":[{"allowDelete":true,"text":"DomHelper.js","id":"source/core/DomHelper.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 14 KB","qtipTitle":"DomHelper.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Template.js","id":"source/core/Template.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 13 KB","qtipTitle":"Template.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DomQuery.js","id":"source/core/DomQuery.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 24 KB","qtipTitle":"DomQuery.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Observable.js","id":"source/util/Observable.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 9.4 KB","qtipTitle":"Observable.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"EventManager.js","id":"source/core/EventManager.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 24 KB","qtipTitle":"EventManager.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Element.js","id":"source/core/Element.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 101 KB","qtipTitle":"Element.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Fx.js","id":"source/core/Fx.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 33 KB","qtipTitle":"Fx.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"CompositeElement.js","id":"source/core/CompositeElement.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 7.1 KB","qtipTitle":"CompositeElement.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"UpdateManager.js","id":"source/core/UpdateManager.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 19 KB","qtipTitle":"UpdateManager.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DelayedTask.js","id":"source/util/DelayedTask.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 4:51 am<br />Size: 2 KB","qtipTitle":"DelayedTask.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"expanded":true,"text":"Connection.js","id":"source/data/Connection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:13 am<br />Size: 16 KB","qtipTitle":"Connection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"dep":[]},{"text":"Core - Utilities","id":"c-1176547092092","options":[],"files":[{"allowDelete":true,"text":"ClickRepeater.js","id":"source/util/ClickRepeater.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 4.9 KB","qtipTitle":"ClickRepeater.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"CSS.js","id":"source/util/CSS.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 5 KB","qtipTitle":"CSS.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Format.js","id":"source/util/Format.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 5.4 KB","qtipTitle":"Format.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"JSON.js","id":"source/util/JSON.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 4.3 KB","qtipTitle":"JSON.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"KeyMap.js","id":"source/util/KeyMap.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 5.9 KB","qtipTitle":"KeyMap.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"KeyNav.js","id":"source/util/KeyNav.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 3 KB","qtipTitle":"KeyNav.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TaskMgr.js","id":"source/util/TaskMgr.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 2.3 KB","qtipTitle":"TaskMgr.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextMetrics.js","id":"source/util/TextMetrics.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:31 am<br />Size: 1.8 KB","qtipTitle":"TextMetrics.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"Core - Date Parsing and Formatting","id":"c-1176614560128","options":[],"files":[{"allowDelete":true,"expanded":true,"text":"Date.js","id":"source/util/Date.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 11:01 pm<br />Size: 23 KB","qtipTitle":"Date.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"dep":[]},{"text":"Core - Layers","id":"c-1176548288067","options":[],"files":[{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"Core - Drag and Drop","id":"c-1176548288338","options":[{"text":"Overflow Scrolling Support","cmpId":"c-1176548288338","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176599383444","children":[{"allowDelete":true,"text":"ScrollManager.js","id":"source/dd/ScrollManager.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 5.5 KB","qtipTitle":"ScrollManager.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"DDCore.js","id":"source/dd/DDCore.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 95 KB","qtipTitle":"DDCore.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"StatusProxy.js","id":"source/dd/StatusProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 3.1 KB","qtipTitle":"StatusProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Registry.js","id":"source/dd/Registry.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 2.3 KB","qtipTitle":"Registry.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DragSource.js","id":"source/dd/DragSource.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 6.3 KB","qtipTitle":"DragSource.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DropTarget.js","id":"source/dd/DropTarget.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 1.2 KB","qtipTitle":"DropTarget.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DragZone.js","id":"source/dd/DragZone.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 2.6 KB","qtipTitle":"DragZone.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DropZone.js","id":"source/dd/DropZone.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 2.3 KB","qtipTitle":"DropZone.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Core - State Management","id":"c-1176681140293","options":[],"files":[{"allowDelete":true,"expanded":true,"text":"State.js","id":"source/state/State.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 9.8 KB","qtipTitle":"State.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"dep":[]},{"text":"Resizable","id":"c-1176548288611","options":[],"files":[{"allowDelete":true,"text":"Resizable.js","id":"source/widgets/Resizable.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 21 KB","qtipTitle":"Resizable.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"QuickTips - Tooltip Widget","id":"c-1176548289178","options":[],"files":[{"allowDelete":true,"text":"QuickTips.js","id":"source/widgets/QuickTips.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 9.1 KB","qtipTitle":"QuickTips.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Button Widget","id":"c-1176548288907","options":[{"text":"Button QuickTips","cmpId":"c-1176548288907","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176590302846","children":[{"allowDelete":true,"text":"QuickTips.js","id":"source/widgets/QuickTips.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 9.1 KB","qtipTitle":"QuickTips.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"Button.js","id":"source/widgets/Button.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 13 KB","qtipTitle":"Button.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MenuButton.js","id":"source/widgets/MenuButton.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 6.3 KB","qtipTitle":"MenuButton.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"TextMetrics.js","id":"source/util/TextMetrics.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 1.8 KB","qtipTitle":"TextMetrics.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Tabs Widget","id":"c-1176590622815","options":[],"files":[{"allowDelete":true,"text":"TabPanel.js","id":"source/widgets/TabPanel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 25 KB","qtipTitle":"TabPanel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"SplitBar Widget","id":"c-1176548289426","options":[],"files":[{"allowDelete":true,"text":"SplitBar.js","id":"source/widgets/SplitBar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 14 KB","qtipTitle":"SplitBar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"DDCore.js","id":"source/dd/DDCore.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 95 KB","qtipTitle":"DDCore.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Menu Widget","id":"c-1176548289698","options":[{"text":"Color Palette Item","cmpId":"c-1176548289698","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176600135917","children":[{"allowDelete":true,"text":"ColorPalette.js","id":"source/widgets/ColorPalette.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 4.5 KB","qtipTitle":"ColorPalette.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Date Picker Item","cmpId":"c-1176548289698","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176600141997","children":[{"allowDelete":true,"text":"DatePicker.js","id":"source/widgets/DatePicker.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 16 KB","qtipTitle":"DatePicker.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"Adapter.js","id":"source/widgets/menu/Adapter.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.5 KB","qtipTitle":"Adapter.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"BaseItem.js","id":"source/widgets/menu/BaseItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.7 KB","qtipTitle":"BaseItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"CheckItem.js","id":"source/widgets/menu/CheckItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.7 KB","qtipTitle":"CheckItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Item.js","id":"source/widgets/menu/Item.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.8 KB","qtipTitle":"Item.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Menu.js","id":"source/widgets/menu/Menu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 16 KB","qtipTitle":"Menu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MenuMgr.js","id":"source/widgets/menu/MenuMgr.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 4.7 KB","qtipTitle":"MenuMgr.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Separator.js","id":"source/widgets/menu/Separator.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.2 KB","qtipTitle":"Separator.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextItem.js","id":"source/widgets/menu/TextItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.1 KB","qtipTitle":"TextItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"KeyNav.js","id":"source/util/KeyNav.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"KeyNav.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Loading Mask Widget","id":"c-1176682522794","options":[],"files":[{"allowDelete":true,"expanded":true,"text":"LoadMask.js","id":"source/widgets/LoadMask.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 3.1 KB","qtipTitle":"LoadMask.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"dep":[]},{"text":"Date Picker Popup (DateMenu)","id":"c-1176548289970","options":[],"files":[{"allowDelete":true,"text":"DateMenu.js","id":"source/widgets/menu/DateMenu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 888 B","qtipTitle":"DateMenu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DatePicker.js","id":"source/widgets/DatePicker.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 16 KB","qtipTitle":"DatePicker.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DateItem.js","id":"source/widgets/menu/DateItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.1 KB","qtipTitle":"DateItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Date.js","id":"source/util/Date.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 23 KB","qtipTitle":"Date.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MenuMgr.js","id":"source/widgets/menu/MenuMgr.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 4.7 KB","qtipTitle":"MenuMgr.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Menu.js","id":"source/widgets/menu/Menu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 16 KB","qtipTitle":"Menu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"BaseItem.js","id":"source/widgets/menu/BaseItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.7 KB","qtipTitle":"BaseItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Adapter.js","id":"source/widgets/menu/Adapter.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.5 KB","qtipTitle":"Adapter.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"KeyNav.js","id":"source/util/KeyNav.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"KeyNav.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ClickRepeater.js","id":"source/util/ClickRepeater.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.9 KB","qtipTitle":"ClickRepeater.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Color Picker Popup (ColorMenu)","id":"c-1176548290251","options":[],"files":[{"allowDelete":true,"text":"ColorMenu.js","id":"source/widgets/menu/ColorMenu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 915 B","qtipTitle":"ColorMenu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ColorItem.js","id":"source/widgets/menu/ColorItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 792 B","qtipTitle":"ColorItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ColorPalette.js","id":"source/widgets/ColorPalette.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 4.5 KB","qtipTitle":"ColorPalette.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MenuMgr.js","id":"source/widgets/menu/MenuMgr.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 4.7 KB","qtipTitle":"MenuMgr.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Menu.js","id":"source/widgets/menu/Menu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 16 KB","qtipTitle":"Menu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"BaseItem.js","id":"source/widgets/menu/BaseItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.7 KB","qtipTitle":"BaseItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Adapter.js","id":"source/widgets/menu/Adapter.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.5 KB","qtipTitle":"Adapter.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Border Layout Widget","id":"c-1176590622527","options":[{"text":"Preconfigured Outlook Style Layout","cmpId":"c-1176590622527","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176600285242","children":[{"allowDelete":true,"text":"ReaderLayout.js","id":"source/widgets/layout/ReaderLayout.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 2.4 KB","qtipTitle":"ReaderLayout.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"BasicLayoutRegion.js","id":"source/widgets/layout/BasicLayoutRegion.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9.5 KB","qtipTitle":"BasicLayoutRegion.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"BorderLayout.js","id":"source/widgets/layout/BorderLayout.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 11 KB","qtipTitle":"BorderLayout.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"BorderLayoutRegions.js","id":"source/widgets/layout/BorderLayoutRegions.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 6.2 KB","qtipTitle":"BorderLayoutRegions.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ContentPanels.js","id":"source/widgets/layout/ContentPanels.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 17 KB","qtipTitle":"ContentPanels.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"LayoutManager.js","id":"source/widgets/layout/LayoutManager.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 4.2 KB","qtipTitle":"LayoutManager.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"LayoutRegion.js","id":"source/widgets/layout/LayoutRegion.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 21 KB","qtipTitle":"LayoutRegion.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"LayoutStateManager.js","id":"source/widgets/layout/LayoutStateManager.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 2.3 KB","qtipTitle":"LayoutStateManager.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"SplitLayoutRegion.js","id":"source/widgets/layout/SplitLayoutRegion.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 10 KB","qtipTitle":"SplitLayoutRegion.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"SplitBar.js","id":"source/widgets/SplitBar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 14 KB","qtipTitle":"SplitBar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DDCore.js","id":"source/dd/DDCore.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 95 KB","qtipTitle":"DDCore.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TabPanel.js","id":"source/widgets/TabPanel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 25 KB","qtipTitle":"TabPanel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Toolbar Widget","id":"c-1176590623103","options":[{"text":"Menu Buttons","cmpId":"c-1176590623103","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176600354384","children":[{"allowDelete":true,"text":"MenuButton.js","id":"source/widgets/MenuButton.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 6.3 KB","qtipTitle":"MenuButton.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Paging Toolbar","cmpId":"c-1176590623103","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176683220697","children":[{"allowDelete":true,"expanded":true,"text":"PagingToolbar.js","id":"source/widgets/PagingToolbar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 9.2 KB","qtipTitle":"PagingToolbar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}]}],"files":[{"allowDelete":true,"text":"Toolbar.js","id":"source/widgets/Toolbar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 12 KB","qtipTitle":"Toolbar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Button.js","id":"source/widgets/Button.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 13 KB","qtipTitle":"Button.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextMetrics.js","id":"source/util/TextMetrics.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:56 am<br />Size: 1.8 KB","qtipTitle":"TextMetrics.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Dialog - Basic Widget","id":"c-1176590621920","options":[{"text":"Dialog Resize Support","cmpId":"c-1176590621920","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176591083447","children":[{"allowDelete":true,"text":"Resizable.js","id":"source/widgets/Resizable.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 21 KB","qtipTitle":"Resizable.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Dialog Drag and Drop Support","cmpId":"c-1176590621920","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176591106528","children":[{"allowDelete":true,"text":"DDCore.js","id":"source/dd/DDCore.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 95 KB","qtipTitle":"DDCore.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Tabs Support","cmpId":"c-1176590621920","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176593460681","children":[{"allowDelete":true,"text":"TabPanel.js","id":"source/widgets/TabPanel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 25 KB","qtipTitle":"TabPanel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"BasicDialog.js","id":"source/widgets/BasicDialog.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 41 KB","qtipTitle":"BasicDialog.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Dialog - MessageBox","id":"c-1176590623375","options":[],"files":[{"allowDelete":true,"text":"MessageBox.js","id":"source/widgets/MessageBox.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 20 KB","qtipTitle":"MessageBox.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"BasicDialog.js","id":"source/widgets/BasicDialog.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 41 KB","qtipTitle":"BasicDialog.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Data - Core","id":"c-1176590623903","options":[],"files":[{"allowDelete":true,"text":"DataField.js","id":"source/data/DataField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"DataField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataProxy.js","id":"source/data/DataProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 1.7 KB","qtipTitle":"DataProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataReader.js","id":"source/data/DataReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 379 B","qtipTitle":"DataReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Record.js","id":"source/data/Record.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 7.5 KB","qtipTitle":"Record.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"SortTypes.js","id":"source/data/SortTypes.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.4 KB","qtipTitle":"SortTypes.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Store.js","id":"source/data/Store.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 20 KB","qtipTitle":"Store.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"HttpProxy.js","id":"source/data/HttpProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.7 KB","qtipTitle":"HttpProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ScriptTagProxy.js","id":"source/data/ScriptTagProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6.2 KB","qtipTitle":"ScriptTagProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MemoryProxy.js","id":"source/data/MemoryProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.1 KB","qtipTitle":"MemoryProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Data - JSON Support","id":"c-1176590624144","options":[],"files":[{"allowDelete":true,"text":"JsonReader.js","id":"source/data/JsonReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6 KB","qtipTitle":"JsonReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ArrayReader.js","id":"source/data/ArrayReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.4 KB","qtipTitle":"ArrayReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"JSON.js","id":"source/util/JSON.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.3 KB","qtipTitle":"JSON.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Connection.js","id":"source/data/Connection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.6 KB","qtipTitle":"Connection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataField.js","id":"source/data/DataField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"DataField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataProxy.js","id":"source/data/DataProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 1.7 KB","qtipTitle":"DataProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataReader.js","id":"source/data/DataReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 379 B","qtipTitle":"DataReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Record.js","id":"source/data/Record.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 7.5 KB","qtipTitle":"Record.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"SortTypes.js","id":"source/data/SortTypes.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.4 KB","qtipTitle":"SortTypes.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Store.js","id":"source/data/Store.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 20 KB","qtipTitle":"Store.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"HttpProxy.js","id":"source/data/HttpProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.7 KB","qtipTitle":"HttpProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ScriptTagProxy.js","id":"source/data/ScriptTagProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6.2 KB","qtipTitle":"ScriptTagProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MemoryProxy.js","id":"source/data/MemoryProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.1 KB","qtipTitle":"MemoryProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Data - XML Support","id":"c-1176594563024","options":[],"files":[{"allowDelete":true,"text":"XmlReader.js","id":"source/data/XmlReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.7 KB","qtipTitle":"XmlReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Connection.js","id":"source/data/Connection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.6 KB","qtipTitle":"Connection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataField.js","id":"source/data/DataField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"DataField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataProxy.js","id":"source/data/DataProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 1.7 KB","qtipTitle":"DataProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataReader.js","id":"source/data/DataReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 379 B","qtipTitle":"DataReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Record.js","id":"source/data/Record.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 7.5 KB","qtipTitle":"Record.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"SortTypes.js","id":"source/data/SortTypes.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.4 KB","qtipTitle":"SortTypes.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Store.js","id":"source/data/Store.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 20 KB","qtipTitle":"Store.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"HttpProxy.js","id":"source/data/HttpProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.7 KB","qtipTitle":"HttpProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ScriptTagProxy.js","id":"source/data/ScriptTagProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6.2 KB","qtipTitle":"ScriptTagProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MemoryProxy.js","id":"source/data/MemoryProxy.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.1 KB","qtipTitle":"MemoryProxy.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Data - Simple Store","id":"c-1176594562552","options":[],"files":[{"allowDelete":true,"text":"SimpleStore.js","id":"source/data/SimpleStore.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 976 B","qtipTitle":"SimpleStore.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"JsonReader.js","id":"source/data/JsonReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6 KB","qtipTitle":"JsonReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ArrayReader.js","id":"source/data/ArrayReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.4 KB","qtipTitle":"ArrayReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Connection.js","id":"source/data/Connection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.6 KB","qtipTitle":"Connection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataField.js","id":"source/data/DataField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"DataField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DataReader.js","id":"source/data/DataReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 379 B","qtipTitle":"DataReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Record.js","id":"source/data/Record.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 7.5 KB","qtipTitle":"Record.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"SortTypes.js","id":"source/data/SortTypes.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 2.4 KB","qtipTitle":"SortTypes.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Store.js","id":"source/data/Store.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 20 KB","qtipTitle":"Store.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Views - Data Bound Views","id":"c-1176590623664","options":[{"text":"JSON Support","cmpId":"c-1176590623664","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176594452492","children":[{"allowDelete":true,"expanded":true,"text":"JSON.js","id":"source/util/JSON.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 11:01 pm<br />Size: 4.3 KB","qtipTitle":"JSON.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"View.js","id":"source/widgets/View.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 24 KB","qtipTitle":"View.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"JsonView.js","id":"source/widgets/JsonView.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9.9 KB","qtipTitle":"JsonView.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"Form - Basic Fields","id":"c-1176596007536","options":[{"text":"Custom Validations","cmpId":"c-1176596007536","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176596661900","children":[{"allowDelete":true,"text":"VTypes.js","id":"source/widgets/form/VTypes.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 2.9 KB","qtipTitle":"VTypes.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"Field.js","id":"source/widgets/form/Field.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 15 KB","qtipTitle":"Field.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Checkbox.js","id":"source/widgets/form/Checkbox.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.6 KB","qtipTitle":"Checkbox.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"NumberField.js","id":"source/widgets/form/NumberField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.8 KB","qtipTitle":"NumberField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Radio.js","id":"source/widgets/form/Radio.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 489 B","qtipTitle":"Radio.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextArea.js","id":"source/widgets/form/TextArea.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.2 KB","qtipTitle":"TextArea.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextField.js","id":"source/widgets/form/TextField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 11 KB","qtipTitle":"TextField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"expanded":true,"text":"BoxComponent.js","id":"source/widgets/BoxComponent.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:13 am<br />Size: 9.1 KB","qtipTitle":"BoxComponent.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Form - ComboBox Widget","id":"c-1176594563568","options":[{"text":"Custom Validations","cmpId":"c-1176594563568","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176596097474","children":[{"allowDelete":true,"text":"VTypes.js","id":"source/widgets/form/VTypes.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 2.9 KB","qtipTitle":"VTypes.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"Combo.js","id":"source/widgets/form/Combo.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 28 KB","qtipTitle":"Combo.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Field.js","id":"source/widgets/form/Field.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 15 KB","qtipTitle":"Field.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextField.js","id":"source/widgets/form/TextField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 11 KB","qtipTitle":"TextField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TriggerField.js","id":"source/widgets/form/TriggerField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6 KB","qtipTitle":"TriggerField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"View.js","id":"source/widgets/View.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 24 KB","qtipTitle":"View.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"KeyNav.js","id":"source/util/KeyNav.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"KeyNav.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"expanded":true,"text":"BoxComponent.js","id":"source/widgets/BoxComponent.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:13 am<br />Size: 9.1 KB","qtipTitle":"BoxComponent.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}]},{"text":"Form - Date Field","id":"c-1176596008487","options":[],"files":[{"allowDelete":true,"text":"DateField.js","id":"source/widgets/form/DateField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"DateField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"TriggerField.js","id":"source/widgets/form/TriggerField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6 KB","qtipTitle":"TriggerField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Field.js","id":"source/widgets/form/Field.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 15 KB","qtipTitle":"Field.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TextField.js","id":"source/widgets/form/TextField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 11 KB","qtipTitle":"TextField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DateMenu.js","id":"source/widgets/menu/DateMenu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 888 B","qtipTitle":"DateMenu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DatePicker.js","id":"source/widgets/DatePicker.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 16 KB","qtipTitle":"DatePicker.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"DateItem.js","id":"source/widgets/menu/DateItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.1 KB","qtipTitle":"DateItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Date.js","id":"source/util/Date.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 23 KB","qtipTitle":"Date.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"MenuMgr.js","id":"source/widgets/menu/MenuMgr.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 4.7 KB","qtipTitle":"MenuMgr.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Menu.js","id":"source/widgets/menu/Menu.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 16 KB","qtipTitle":"Menu.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"BaseItem.js","id":"source/widgets/menu/BaseItem.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 3.7 KB","qtipTitle":"BaseItem.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Adapter.js","id":"source/widgets/menu/Adapter.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 6:04 pm<br />Size: 1.5 KB","qtipTitle":"Adapter.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"KeyNav.js","id":"source/util/KeyNav.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3 KB","qtipTitle":"KeyNav.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ClickRepeater.js","id":"source/util/ClickRepeater.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.9 KB","qtipTitle":"ClickRepeater.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"expanded":true,"text":"BoxComponent.js","id":"source/widgets/BoxComponent.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:13 am<br />Size: 9.1 KB","qtipTitle":"BoxComponent.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Form - HtmlEditor","id":"c-1185895832722","options":[],"files":[{"allowDelete":true,"expanded":true,"text":"HtmlEditor.js","id":"source/widgets/form/HtmlEditor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 31 KB","qtipTitle":"HtmlEditor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"dep":[{"allowDelete":true,"expanded":true,"text":"Field.js","id":"source/widgets/form/Field.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 17 KB","qtipTitle":"Field.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"BoxComponent.js","id":"source/widgets/BoxComponent.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 9.1 KB","qtipTitle":"BoxComponent.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Toolbar.js","id":"source/widgets/Toolbar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 14 KB","qtipTitle":"Toolbar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Button.js","id":"source/widgets/Button.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 16 KB","qtipTitle":"Button.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 13 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"TaskMgr.js","id":"source/util/TaskMgr.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Jul 31, 2007, 11:29 am<br />Size: 2.3 KB","qtipTitle":"TaskMgr.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}]},{"text":"Form - Ajax and Loading Support","id":"c-1176596009103","options":[{"text":"XML Loading Support","cmpId":"c-1176596009103","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176596755855","children":[{"allowDelete":true,"text":"XmlReader.js","id":"source/data/XmlReader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 4.7 KB","qtipTitle":"XmlReader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"BasicForm.js","id":"source/widgets/form/BasicForm.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9.9 KB","qtipTitle":"BasicForm.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Action.js","id":"source/widgets/form/Action.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 5.6 KB","qtipTitle":"Action.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"Form - Dynamic Rendering","id":"c-1176596009599","options":[],"files":[{"allowDelete":true,"text":"Form.js","id":"source/widgets/form/Form.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 7.7 KB","qtipTitle":"Form.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layout.js","id":"source/widgets/form/Layout.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.3 KB","qtipTitle":"Layout.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"BasicForm.js","id":"source/widgets/form/BasicForm.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9.9 KB","qtipTitle":"BasicForm.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Action.js","id":"source/widgets/form/Action.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 5.6 KB","qtipTitle":"Action.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Form - Floating Editor","id":"c-1176596675069","options":[],"files":[{"allowDelete":true,"text":"Editor.js","id":"source/widgets/Editor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.5 KB","qtipTitle":"Editor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Grid - Core","id":"c-1176596674270","options":[{"text":"CellSelectionModel.js","cmpId":"c-1176596674270","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176598193101","children":[{"allowDelete":true,"text":"CellSelectionModel.js","id":"source/widgets/grid/CellSelectionModel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 6.7 KB","qtipTitle":"CellSelectionModel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Drag and Drop Column Reorder","cmpId":"c-1176596674270","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176598971151","children":[{"allowDelete":true,"text":"ColumnDD.js","id":"source/widgets/grid/ColumnDD.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 5.7 KB","qtipTitle":"ColumnDD.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Column Resizing","cmpId":"c-1176596674270","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176598974743","children":[{"allowDelete":true,"text":"ColumnSplitDD.js","id":"source/widgets/grid/ColumnSplitDD.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 2 KB","qtipTitle":"ColumnSplitDD.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Drag Grid Rows","cmpId":"c-1176596674270","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176598980335","children":[{"allowDelete":true,"text":"GridDD.js","id":"source/widgets/grid/GridDD.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 1.7 KB","qtipTitle":"GridDD.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Loading Mask","cmpId":"c-1176596674270","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176682774459","children":[{"allowDelete":true,"expanded":true,"text":"LoadMask.js","id":"source/widgets/LoadMask.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 3.1 KB","qtipTitle":"LoadMask.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Paging Toolbar","cmpId":"c-1176596674270","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176683284876","children":[{"allowDelete":true,"expanded":true,"text":"PagingToolbar.js","id":"source/widgets/PagingToolbar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 9.2 KB","qtipTitle":"PagingToolbar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Toolbar.js","id":"source/widgets/Toolbar.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 12 KB","qtipTitle":"Toolbar.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Button.js","id":"source/widgets/Button.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 14 KB","qtipTitle":"Button.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"TextMetrics.js","id":"source/util/TextMetrics.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 1.8 KB","qtipTitle":"TextMetrics.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"MixedCollection.js","id":"source/util/MixedCollection.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 17 KB","qtipTitle":"MixedCollection.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"AbstractGridView.js","id":"source/widgets/grid/AbstractGridView.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.1 KB","qtipTitle":"AbstractGridView.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"AbstractSelectionModel.js","id":"source/widgets/grid/AbstractSelectionModel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 1 KB","qtipTitle":"AbstractSelectionModel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"RowSelectionModel.js","id":"source/widgets/grid/RowSelectionModel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 13 KB","qtipTitle":"RowSelectionModel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Grid.js","id":"source/widgets/grid/Grid.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 18 KB","qtipTitle":"Grid.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"ColumnModel.js","id":"source/widgets/grid/ColumnModel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 12 KB","qtipTitle":"ColumnModel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"GridView.js","id":"source/widgets/grid/GridView.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 58 KB","qtipTitle":"GridView.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"expanded":true,"text":"CSS.js","id":"source/util/CSS.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 11:01 pm<br />Size: 5 KB","qtipTitle":"CSS.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Grid - Editing Support","id":"c-1176596839124","options":[],"files":[{"allowDelete":true,"text":"GridEditor.js","id":"source/widgets/grid/GridEditor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 461 B","qtipTitle":"GridEditor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"EditorGrid.js","id":"source/widgets/grid/EditorGrid.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6.2 KB","qtipTitle":"EditorGrid.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"Editor.js","id":"source/widgets/Editor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.5 KB","qtipTitle":"Editor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Grid - Property Grid","id":"c-1176596839827","options":[],"files":[{"allowDelete":true,"text":"PropertyGrid.js","id":"source/widgets/grid/PropertyGrid.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6.3 KB","qtipTitle":"PropertyGrid.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"GridEditor.js","id":"source/widgets/grid/GridEditor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 461 B","qtipTitle":"GridEditor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"EditorGrid.js","id":"source/widgets/grid/EditorGrid.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 6.2 KB","qtipTitle":"EditorGrid.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Editor.js","id":"source/widgets/Editor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 4.5 KB","qtipTitle":"Editor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9.9 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 3.4 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Tree - Core","id":"c-1176596840547","options":[{"text":"Sorting Support","cmpId":"c-1176596840547","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176599045969","children":[{"allowDelete":true,"text":"TreeSorter.js","id":"source/widgets/tree/TreeSorter.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 2.3 KB","qtipTitle":"TreeSorter.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Filtering Support","cmpId":"c-1176596840547","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176599073554","children":[{"allowDelete":true,"text":"TreeFilter.js","id":"source/widgets/tree/TreeFilter.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 3.6 KB","qtipTitle":"TreeFilter.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"text":"Drag and Drop Support","cmpId":"c-1176596840547","iconCls":"folder","type":"fileCt","allowDelete":true,"allowEdit":true,"id":"o-1176599245706","children":[{"allowDelete":true,"text":"TreeDragZone.js","id":"source/widgets/tree/TreeDragZone.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 1.5 KB","qtipTitle":"TreeDragZone.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"text":"TreeDropZone.js","id":"source/widgets/tree/TreeDropZone.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 7.9 KB","qtipTitle":"TreeDropZone.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"files":[{"allowDelete":true,"text":"Tree.js","id":"source/data/Tree.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 7:44 pm<br />Size: 25 KB","qtipTitle":"Tree.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TreePanel.js","id":"source/widgets/tree/TreePanel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 14 KB","qtipTitle":"TreePanel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TreeSelectionModel.js","id":"source/widgets/tree/TreeSelectionModel.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 9.1 KB","qtipTitle":"TreeSelectionModel.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TreeNode.js","id":"source/widgets/tree/TreeNode.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 15 KB","qtipTitle":"TreeNode.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TreeNodeUI.js","id":"source/widgets/tree/TreeNodeUI.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 14 KB","qtipTitle":"TreeNodeUI.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[]},{"text":"Tree - Ajax Loading Support","id":"c-1176598286138","options":[],"files":[{"allowDelete":true,"text":"AsyncTreeNode.js","id":"source/widgets/tree/AsyncTreeNode.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 3.5 KB","qtipTitle":"AsyncTreeNode.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}},{"allowDelete":true,"text":"TreeLoader.js","id":"source/widgets/tree/TreeLoader.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 4.1 KB","qtipTitle":"TreeLoader.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}],"dep":[{"allowDelete":true,"text":"JSON.js","id":"source/util/JSON.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 14, 2007, 9:02 pm<br />Size: 4.3 KB","qtipTitle":"JSON.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","events":{"beforeload":true,"load":true,"loadexception":true}}}]},{"text":"Tree - Editing Support","id":"c-1176682872198","options":[],"files":[{"allowDelete":true,"expanded":true,"text":"TreeEditor.js","id":"source/widgets/tree/TreeEditor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 2.2 KB","qtipTitle":"TreeEditor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}],"dep":[{"allowDelete":true,"expanded":true,"text":"Editor.js","id":"source/widgets/Editor.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 8.7 KB","qtipTitle":"Editor.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Shadow.js","id":"source/widgets/Shadow.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 5 KB","qtipTitle":"Shadow.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Layer.js","id":"source/widgets/Layer.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 11 KB","qtipTitle":"Layer.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Component.js","id":"source/widgets/Component.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 9 KB","qtipTitle":"Component.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"Field.js","id":"source/widgets/form/Field.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 15 KB","qtipTitle":"Field.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}},{"allowDelete":true,"expanded":true,"text":"TextField.js","id":"source/widgets/form/TextField.js","leaf":true,"qtip":"Type: JavaScript File<br />Last Modified: Apr 15, 2007, 5:18 pm<br />Size: 11 KB","qtipTitle":"TextField.js","cls":"file","loader":{"baseParams":{},"requestMethod":"POST","dataUrl":"dependency.php","events":{"beforeload":true,"load":true,"loadexception":true},"transId":false}}]}] \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,82 @@ +Ext.onReady(function(){ + Ext.Direct.addProvider( + Ext.app.REMOTING_API, + { + type:'polling', + url: 'php/poll.php' + } + ); + + var out = new Ext.form.DisplayField({ + cls: 'x-form-text', + id: 'out' + }); + + var text = new Ext.form.TextField({ + width: 300, + emptyText: 'Echo input' + }); + + var call = new Ext.Button({ + text: 'Echo', + handler: function(){ + TestAction.doEcho(text.getValue(), function(result, e){ + var t = e.getTransaction(); + out.append(String.format('<p><b>Successful call to {0}.{1} with response:</b><xmp>{2}</xmp></p>', + t.action, t.method, Ext.encode(result))); + out.el.scrollTo('t', 100000, true); + }); + } + }); + + var num = new Ext.form.TextField({ + width: 80, + emptyText: 'Multiply x 8', + style: 'text-align:left;' + }); + + var multiply = new Ext.Button({ + text: 'Multiply', + handler: function(){ + TestAction.multiply(num.getValue(), function(result, e){ + var t = e.getTransaction(); + if(e.status){ + out.append(String.format('<p><b>Successful call to {0}.{1} with response:</b><xmp>{2}</xmp></p>', + t.action, t.method, Ext.encode(result))); + }else{ + out.append(String.format('<p><b>Call to {0}.{1} failed with message:</b><xmp>{2}</xmp></p>', + t.action, t.method, e.message)); + } + out.el.scrollTo('t', 100000, true); + }); + } + }); + + text.on('specialkey', function(t, e){ + if(e.getKey() == e.ENTER){ + call.handler(); + } + }); + + num.on('specialkey', function(t, e){ + if(e.getKey() == e.ENTER){ + multiply.handler(); + } + }); + + var p = new Ext.Panel({ + title: 'Remote Call Log', + //frame:true, + width: 600, + height: 300, + layout:'fit', + + items: [out], + bbar: [text, call, '-', num, multiply] + }).render(Ext.getBody()); + + Ext.Direct.on('message', function(e){ + out.append(String.format('<p><i>{0}</i></p>', e.data)); + out.el.scrollTo('t', 100000, true); + }); +}); Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.php =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.php (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/direct.php 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,48 @@ +<html> +<head> +<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>Ext.Direct</title> + <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css" /> + + <!-- GC --> + <!-- LIBS --> + <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script> + <!-- ENDLIBS --> + + <script type="text/javascript" src="../../ext-all.js"></script> + + <script language="javascript" src="direct.js"></script> + <script language="javascript" src="DirectProvider.js"></script> + + <script type="text/javascript" src="php/api.php"></script> + + <!-- Common Styles for the examples --> + <link rel="stylesheet" type="text/css" href="../examples.css" /> + <style> + #out { + padding: 5px; + overflow:auto; + border-width:0; + } + #out b { + color:#555; + } + #out xmp { + margin: 5px; + } + #out p { + margin:0; + } +} + </style> +</head> +<body> +<script type="text/javascript" src="../shared/examples.js"></script><!-- EXAMPLES --> + +<h1>Ext.Direct Generic Remoting</h1> + +<p>The js is not minified so it is readable. See <a href="direct.js">direct.js</a>.</p> + + +</body> +</html> Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/php/api.php =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/php/api.php (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/api.php 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,32 @@ +<? +require('config.php'); +header('Content-Type: text/javascript'); + +// convert API config to Ext.Direct spec +$actions = array(); +foreach($API as $aname=>&$a){ + $methods = array(); + foreach($a['methods'] as $mname=>&$m){ + $md = array( + 'name'=>$mname, + 'len'=>$m['len'] + ); + if($m['formHandler']){ + $md['formHandler'] = true; + } + $methods[] = $md; + } + $actions[$aname] = $methods; +} + +$cfg = array( + 'url'=>'php/router.php', + 'type'=>'remoting', + 'actions'=>$actions +); + +echo 'Ext.app.REMOTING_API = '; + +echo json_encode($cfg); +echo ';'; +?> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/php/classes/TestAction.php =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/php/classes/TestAction.php (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/classes/TestAction.php 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,14 @@ +<? +class TestAction { + function doEcho($data){ + return $data; + } + + function multiply($num){ + if(!is_numeric($num)){ + throw new Exception('Call to multiply with a value that is not a number'); + } + return $num*8; + } +} +?> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/php/config.php =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/php/config.php (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/config.php 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,14 @@ +<? +$API = array( + 'TestAction'=>array( + 'methods'=>array( + 'doEcho'=>array( + 'len'=>1 + ), + 'multiply'=>array( + 'len'=>1 + ) + ) + ) +); +?> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/php/poll.php =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/php/poll.php (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/poll.php 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,7 @@ +<? +echo json_encode(array( + 'type'=>'event', + 'name'=>'message', + 'data'=>'Successfully polled at: '. date('g:i:s a') +)); +?> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/direct/php/router.php =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/direct/php/router.php (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/direct/php/router.php 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,102 @@ +<? +require('config.php'); + +class BogusAction { + public $action; + public $method; + public $data; + public $tid; +} + +$isForm = false; +$isUpload = false; +if(isset($HTTP_RAW_POST_DATA)){ + header('Content-Type: text/javascript'); + $data = json_decode($HTTP_RAW_POST_DATA); +}else if(isset($_POST['extAction'])){ // form post + $isForm = true; + $isUpload = $_POST['extUpload'] == 'true'; + $data = new BogusAction(); + $data->action = $_POST['extAction']; + $data->method = $_POST['extMethod']; + $data->tid = $_POST['extTID']; + $data->data = array($_POST, $_FILES); +}else{ + die('Invalid request.'); +} + +function doRpc($cdata){ + global $API; + try { + if(!isset($API[$cdata->action])){ + throw new Exception('Call to undefined action: ' . $cdata->action); + } + + $action = $cdata->action; + $a = $API[$action]; + + doAroundCalls($a['before'], $cdata); + + $method = $cdata->method; + $mdef = $a['methods'][$method]; + if(!$mdef){ + throw new Exception("Call to undefined method: $method on action $action"); + } + doAroundCalls($mdef['before'], $cdata); + + $r = array( + 'type'=>'rpc', + 'tid'=>$cdata->tid, + 'action'=>$action, + 'method'=>$method + ); + + require_once("classes/$action.php"); + $o = new $action(); + + $params = isset($cdata->data) && is_array($cdata->data) ? $cdata->data : array(); + + $r['result'] = call_user_func_array(array($o, $method), $params); + + doAroundCalls($mdef['after'], $cdata, $r); + doAroundCalls($a['after'], $cdata, $r); + } + catch(Exception $e){ + $r['type'] = 'exception'; + $r['message'] = $e->getMessage(); + $r['where'] = $e->getTraceAsString(); + } + return $r; +} + + +function doAroundCalls(&$fns, &$cdata, &$returnData=null){ + if(!$fns){ + return; + } + if(is_array($fns)){ + foreach($fns as $f){ + $f($cdata, $returnData); + } + }else{ + $fns($cdata, $returnData); + } +} + +$response = null; +if(is_array($data)){ + $response = array(); + foreach($data as $d){ + $response[] = doRpc($d); + } +}else{ + $response = doRpc($data); +} +if($isForm && $isUpload){ + echo '<html><body><textarea>'; + echo json_encode($response); + echo '</textarea></body></html>'; +}else{ + echo json_encode($response); +} +?> \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.html 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.html 2008-12-01 20:55:57 UTC (rev 32) @@ -10,7 +10,7 @@ <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script> <!-- ENDLIBS --> - <script type="text/javascript" src="../../ext-all.js"></script> + <script type="text/javascript" src="../../ext-all-debug.js"></script> <script type="text/javascript" src="GroupingView.js"></script> <script type="text/javascript" src="edit-grid.js"></script> Modified: mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/examples/grid/edit-grid.js 2008-12-01 20:55:57 UTC (rev 32) @@ -104,7 +104,7 @@ frame:true, plugins:checkColumn, clicksToEdit:1, - + selModel: new Ext.grid.RowSelectionModel({singleSelect:false}), tbar: [{ text: 'Add Plant', handler : function(){ @@ -119,6 +119,59 @@ store.insert(0, p); grid.startEditing(0, 0); } + },{ + text: 'Save Changes', + handler: function(){ + //returns array of record objects for selected rows + var s = grid.getSelectionModel().getSelections(); + + var n = s.length; + if (n > 0) { + //specify a refresh limit to control whether the entire + //grid is updated or just update rows individually + //it may be beneficial to update entire view if number + //of selections are high + var refreshLimit = 5; // you decide + //this sequence only removes records from the client's store + //you may want to update the server via ajax as well + //so the following sequence would be executed inside + //the success callback... + + //suspend the Grid's events and resume after tasks completed + //(helps with performance, otherwise would be much slower) + grid.suspendEvents(); + + //get the store associated with the grid: + var store = grid.getStore(); + + //show message box to confirm delete? + + //loop through each record and delete + for (var i = 0; i < s.length; i++) { + //remove record from the cache + //store.remove(s[i]);//record = selected[i] + //refresh row if under limit + if (n <= refreshLimit) { + store.fireEvent("update", store, s[i], Ext.data.Record.COMMIT); + } + }//end for + //turn events back on now that the work has been done + grid.resumeEvents(); + + //since events were disabled, gridView does not know that the + //data has changed. We turned events back on, but we need to + //manually fire the datachanged event to refresh entire grid + //this ends up calling the "onDataChange" method of Ext.grid.gridView + if (n > refreshLimit) { + store.fireEvent("datachanged", store); + } + } + else { + //show message box? + console.warn('no rows selected'); + return false; + } + } }] }); Modified: mickael/trunk/ext/v3.0.0-a1/examples/layout/column.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/layout/column.html 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/examples/layout/column.html 2008-12-01 20:55:57 UTC (rev 32) @@ -8,7 +8,7 @@ <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script> <!-- ENDLIBS --> - <script type="text/javascript" src="../../ext-all.js"></script> + <script type="text/javascript" src="../../ext-all-detail.js"></script> <!--<script language="javascript" src="../grid/PropsGrid.js"></script>--> <style type="text/css"> @@ -57,6 +57,7 @@ minSize: 175, maxSize: 400, collapsible: true, + collapseMode: 'mini', margins:'35 0 5 5', cmargins:'35 5 5 5', layout:'accordion', Added: mickael/trunk/ext/v3.0.0-a1/examples/samples.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/samples.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/samples.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,42 @@ +.x-panel-tl .x-panel-header { + color:#fff; +} +.x-panel-tc { + background-image:url(shared/extjs/images/top-bottom.gif); +} +.x-panel-tl { + background-image:url(shared/extjs/images/corners-sprite.gif); + border-color:#d0d0d0; +} +.x-panel-tr { + background-image:url(shared/extjs/images/corners-sprite.gif); +} +.x-panel-bc { + background-image:url(shared/extjs/images/top-bottom.gif); +} +.x-panel-bl { + background-image:url(shared/extjs/images/corners-sprite.gif); +} +.x-panel-br { + background-image:url(shared/extjs/images/corners-sprite.gif); +} +.x-panel-mc { + background:#f1f1f1; +} +.x-panel-mc .x-panel-body { + background:transparent; + border: 0 none; +} +.x-panel-mc { + background:#f1f1f1; +} +.x-panel-mc .x-panel-body { + background:transparent; + border: 0 none; +} +.x-panel-ml { + background-image:url(shared/extjs/images/left-right.gif); +} +.x-panel-mr { + background-image:url(shared/extjs/images/left-right.gif); +} Added: mickael/trunk/ext/v3.0.0-a1/examples/samples.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/samples.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/samples.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,267 @@ +<html> +<head> + <title>Ext JS 2.2 Samples</title> + + <style type="text/css"> + #all-demos { + + } + #all-demos dd { + float:left; + width:300px; + height:100px; + margin:5px 5px 5px 10px; + cursor:pointer; + zoom:1; + } + #all-demos dd img { + width:120px; + height:90px; + margin:5px 0 0 5px; + float:left; + } + + #all-demos dd div { + float:left; + width:160px; + margin-left:10px; + } + + #all-demos dd h4 { + font-family:tahoma,arial,san-serif; + color:#555; + font-size:11px; + font-weight:bold; + } + #all-demos dd p { + color:#777; + } + #all-demos dd.over { + background: #F5FDE3 url(shared/extjs/images/sample-over.gif) no-repeat; + } + #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 a { + color:#225588; + } + #loading .loading-indicator{ + background:white; + color:#444; + font:bold 13px tahoma,arial,helvetica; + padding:10px; + margin:0; + height:auto; + } + #loading-msg { + font: normal 10px arial,tahoma,sans-serif; + } + + #all-demos .x-panel-body { + background-color:#fff; + border:1px solid; + border-color:#fafafa #fafafa #fafafa #fafafa; + } + #sample-ct { + border:1px solid; + border-color:#dadada #ebebeb #ebebeb #dadada; + padding:2px; + } + + #all-demos h2 { + border-bottom: 2px solid #99bbe8; + cursor:pointer; + padding-top:6px; + } + #all-demos h2 div { + background:transparent url(../resources/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; + } + #all-demos .collapsed h2 div { + background-position: 3px 3px; + } + #all-demos .collapsed dl { + display:none; + } + .x-window { + text-align:left; + } + </style> +</head> +<body> +<div id="loading-mask" style=""></div> +<div id="loading"> + <div class="loading-indicator"><img src="shared/extjs/images/extanim32.gif" width="32" height="32" style="margin-right:8px;float:left;vertical-align:top;"/>Ext 2.2 - <a href="http://extjs.com">extjs.com</a><br /><span id="loading-msg">Loading styles and images...</span></div> +</div> + +<div id="viewport"> + +<div id="hd"> + <h1><a href="http://extjs.com/" title="Home"><span>Ext</span></a></h1> + + <table cellspacing="0" class="nav main-nav"> + <tr> + <td><a id="home-link" href="http://extjs.com/"><span>Home</span></a></td><td class="active"><a id="products-link" href="http://extjs.com/products"><span>Products</span></a></td><td><a id="support-link" href="http://extjs.com/support"><span>Support</span></a></td><td><a id="jobs-link" href="http://jobs.extjs.com"><span>Jobs</span></a></td><td><a id="company-link" href="http://extjs.com/company"><span>Company</span></a></td><td><a id="blog-link" href="http://extjs.com/blog"><span>Blog</span></a></td><td><a id="store-link" href="http://extjs.com/store"><span>Store</span></a></td> </tr> + </table> + + + <table cellspacing="0" class="sub-nav"> + <tr> + <td><a href="http://extjs.com/">Home</a></td><td class="spacer"><img src="shared/extjs/images/c-sep.gif"></td><td><a href="http://extjs.com/products">Products</a></td><td class="spacer"><img src="shared/extjs/images/c-sep.gif"></td><td><a href="http://extjs.com/products/extjs/">Ext JS</a></td><td class="spacer"><img src="shared/extjs/images/c-sep.gif"></td><td>2.2 Samples</td></tr> + </table> +</div> + +<div id="bd"> + <div class="left-column"> + <h3>Ext JS 2.2 Samples</h3> + <br/> + <div id="sample-spacer" style="height:800px;"></div> + + <link rel="stylesheet" type="text/css" href="../resources/css/ext-all.css" /> + <!--link rel="stylesheet" type="text/css" href="../resources/css/xtheme-gray.css" /--> + <link rel="stylesheet" type="text/css" href="shared/extjs/css/extjs.css" /> + + <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading Core API...';</script> + <script type="text/javascript" src="../adapter/ext/ext-base.js"></script> + <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Loading UI Components...';</script> + <script type="text/javascript" src="../ext-all.js"></script> + <script type="text/javascript">document.getElementById('loading-msg').innerHTML = 'Initializing...';</script> + + <script type="text/javascript" src="shared/extjs/site.js"></script> + <script type="text/javascript" src="samples.js"></script> + + <div id="all-demos"> + </div> + + </div> + + <div class="right-column" style="padding-top:45px;"> + + <div class="side-box"><div class="side-box-inner"> + <ul id="sample-menu" class="features"></ul> + </div></div> + </div> + + <div style="clear:both"></div> +</div><!-- end bd --> + +<div id="ft"> + <table cellspacing="0" class="nav"> + <tr> + <td><a id="home-foot-link" href="http://extjs.com/">Home</a></td><td class="active"><a id="products-foot-link" href="http://extjs.com/products">Products</a></td><td><a id="support-foot-link" href="http://extjs.com/support">Support</a></td><td><a id="jobs-foot-link" href="http://jobs.extjs.com">Jobs</a></td><td><a id="company-foot-link" href="http://extjs.com/company">Company</a></td><td><a id="blog-foot-link" href="http://extjs.com/blog">Blog</a></td><td><a id="store-foot-link" href="http://extjs.com/store">Store</a></td> </tr> + + </table> + <div class="copy">© 2006-2008 Ext, LLC</div> +</div> + +</div><!-- end viewport --> + +<div class="flyout-menu" id="products-menu" style="display:none;"> + <div style="width:200px;"> + <h3><a href="http://extjs.com/products/extjs">Ext JS</a></h3> + <p>Cross-browser JavaScript library for building rich internet applications</p> + + <ul> + <li><a href="http://extjs.com/products/extjs">Overview</a></li> + <li><a href="http://extjs.com/products/extjs/download.php">Download</a></li> + <li><a href="http://extjs.com/deploy/dev/examples/samples.html">Samples & Demos</a></li> + <li><a href="http://extjs.com/deploy/dev/docs/">API Documentation</a></li> + <li><a href="http://extjs.com/products/license.php">Licensing & Open Source</a></li> + + <li><a href="http://extjs.com/store/extjs/">Purchase</a></li> + </ul> + <br/> + <h3><a href="http://extjs.com/products/gxt">Ext GWT</a></h3> + <p>Java library for building rich internet applications with GWT</p> + <ul> + <li><a href="http://extjs.com/products/gxt">Overview</a></li> + + <li><a href="http://extjs.com/products/gxt/download.php">Download</a></li> + <li><a href="http://extjs.com/explorer/" target="_blank">Samples & Demos</a></li> + <li><a href="http://extjs.com/products/license.php">Licensing & Open Source</a></li> + <li><a href="http://extjs.com/store/gxt/">Purchase</a></li> + </ul> + + </div> +</div> + +<div class="flyout-menu" id="support-menu" style="display:none;"> + <div style="width:200px;"> + + <h3><a href="http://extjs.com/support">Support Subscriptions</a></h3> + <p>With 1-on-1 email and phone support, we solve your Ext JS, GWT, CSS and JavaScript issues</p> + <ul> + <li><a href="http://extjs.com/store/extjs/#support-table">Ext JS Subscriptions</a></li> + <li><a href="http://extjs.com/store/gxt/#support-table">Ext GWT Subscriptions</a></li> + </ul> + <br/> + + <h3><a href="http://extjs.com/support/training">Training</a></h3> + <p>Get up to speed quickly with on-site training provided by Ext</p> + <ul> + <li><a href="http://extjs.com/support/training/extjs/">Ext JS Training</a></li> + <li><a href="http://extjs.com/support/training/gxt/">Ext GWT Training</a></li> + </ul> + <br/> + + <h3><a href="http://extjs.com/forum">Community</a></h3> + <p>The Ext community forums and wiki</p> + <ul> + <li><a href="http://extjs.com/forum">Forums</a></li> + <li><a href="http://extjs.com/learn">Learning Center</a></li> + + </ul> + <br/> + <h3><a href="http://extjs.com/forum">Ext Solutions</a></h3> + <p>Enterprise consulting and custom development</p> + <ul> + <li><a href="http://extjs.com/support/services/">Find out more »</a></li> + </ul> + </div> + +</div> + + +<div class="flyout-menu" id="store-menu" style="display:none;"> + <div style="width:200px;"> + <h3><a href="http://extjs.com/store/extjs/">Ext JS</a></h3> + <ul> + <li><a href="http://extjs.com/store/extjs/">Licenses</a></li> + <li><a href="http://extjs.com/store/extjs/#support-table">Support Subscriptions</a></li> + + </ul> + <br/> + <h3><a href="http://extjs.com/store/gxt/">Ext GWT</a></h3> + <ul> + <li><a href="http://extjs.com/store/gxt/">Licenses</a></li> + <li><a href="http://extjs.com/store/gxt/#support-table">Support Subscriptions</a></li> + </ul> + + <br/> + <h3><a href="http://extjs.com/store/faq.php">Help</a></h3> + <ul> + <li><a href="http://extjs.com/store/faq.php">Ordering FAQ</a></li> + </ul> + </div> +</div> + +</body> +</html> + + Added: mickael/trunk/ext/v3.0.0-a1/examples/shared/code-display.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/shared/code-display.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/shared/code-display.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,369 @@ +// Create and append to the body, a Panel containing a block of code from the passed URL +function createCodePanel(url, title) { + var panel = new Ext.Panel({ + hideMode: 'visibility', + title: title, + width: 750, + style: { + 'margin-top': '10px' + }, + hideCollapseTool: true, + titleCollapse: true, + collapsible: true, + collapsed: true, + autoScroll: true, + renderTo: Ext.getBody(), + listeners: { + render: function(p) { + p.getUpdater().setRenderer({ + render: Ext.isIE ? function(el, response, scripts, callback) { + el.update(''); + var np = el.createChild({ + tag: 'pre', + cls: 'code', + cn: { + tag: 'code' + } + }); + var t = response.responseText.split("\n"); + var c = np.child('code', true); + for (var i = 0, l = t.length; i < l; i++) { + var pre = document.createElement('pre'); + if (t[i].length) { + pre.appendChild(document.createTextNode(t[i])); + c.appendChild(pre); + } else if (i < (l - 1)) { + c.appendChild(document.createElement("br")); + } + + } + } : function(el, response, scripts, callback) { + el.update(''); + el.createChild({ + tag: 'pre', + cls: 'code', + cn: { + tag: 'code', + html: response.responseText + } + }); + } + }); + }, + beforeexpand: function(p) { + p.load(url); + }, + single: true + } + }); +} + +// Patch to allow XHR to local files. From hendricd: http://extjs.com/forum/member.php?u=8730 +Ext.apply( Ext.lib.Ajax , +{ forceActiveX:false, + createXhrObject:function(transactionId) + { + var obj={ status:{isError:false} + , tId:transactionId}, http; + try + { + + if(Ext.isIE7 && !!this.forceActiveX){throw("IE7forceActiveX");} + + obj.conn= new XMLHttpRequest(); + + } + catch(e) + { + for (var i = 0; i < this.activeX.length; ++i) { + try + { + obj.conn= new ActiveXObject(this.activeX[i]); + + break; + } + catch(e) { + } + } + } + finally + { + obj.status.isError = typeof(obj.conn) === undefined; + } + return obj; + + }, + + getHttpStatus: function(reqObj){ + + var statObj = { status:0 + ,statusText:'' + ,isError:false + ,isLocal:false + ,isOK:false + ,error:null}; + + try { + if(!reqObj)throw('noobj'); + statObj.status = reqObj.status; + + statObj.isLocal = !reqObj.status && location.protocol == "file:" || + Ext.isSafari && reqObj.status === undefined; + + statObj.isOK = (statObj.isLocal || (statObj.status > 199 && statObj.status < 300)); + statObj.statusText = reqObj.statusText || ''; + } catch(e){ //status may not avail/valid yet (or called too early). + } + + return statObj; + + }, + handleTransactionResponse:function(o, callback, isAbort) + { + + + callback = callback || {}; + var responseObject=null; + + if(!o.status.isError){ + o.status = this.getHttpStatus(o.conn); + /* create and enhance the response with proper status and XMLDOM if necessary */ + responseObject = this.createResponseObject(o, callback.argument); + } + + if(o.status.isError){ /* checked again in case exception was raised - ActiveX was disabled during XML-DOM creation? */ + // And mixin everything the XHR object had to offer as well + responseObject = Ext.applyIf(responseObject||{},this.createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false))); + + } + + responseObject.options = o.options; + responseObject.stat = o.status; + + if (o.status.isOK && !o.status.isError) { + if (callback.success) { + if (!callback.scope) { + callback.success(responseObject); + } + else { + callback.success.apply(callback.scope, [responseObject]); + } + } + } else { + + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + + } + + if(o.options.async){ + this.releaseObject(o); + responseObject = null; + }else{ + this.releaseObject(o); + return responseObject; + } + + }, + createResponseObject:function(o, callbackArg) + { + var obj = {}; + var headerObj = {},headerStr=''; + + try{ //to catch bad encoding problems here + obj.responseText = o.conn.responseText; + }catch(e){obj.responseText ='';} + + obj.responseXML = o.conn.responseXML; + + try{ + headerStr = o.conn.getAllResponseHeaders()||''; + } catch(e){} + + if(o.status.isLocal){ + + o.status.isOK = ((o.status.status = (!!obj.responseText.length)?200:404) == 200); + + if(o.status.isOK && (!obj.responseXML || obj.responseXML.childNodes.length == 0)){ + + var xdoc=null; + try{ //ActiveX may be disabled + if(typeof(DOMParser) == 'undefined'){ + xdoc=new ActiveXObject("Microsoft.XMLDOM"); + xdoc.async="false"; + xdoc.loadXML(obj.responseText); + + }else{ + try{ //Opera 9 will fail parsing non-XML content, so trap here. + var domParser = new DOMParser(); + xdoc = domParser.parseFromString(obj.responseText, 'application\/xml'); + }catch(ex){} + finally{domParser = null;} + + } + } catch(ex){ + o.status.isError = true; + o.status.error = ex; + + } + + obj.responseXML = xdoc; + } + + if(obj.responseXML){ + + var parseBad = (obj.responseXML.parseError || 0) != 0 || obj.responseXML.childNodes.length == 0; + if(!parseBad){ + headerStr = 'Content-Type: ' + (obj.responseXML.contentType || 'text\/xml') + '\n' + headerStr ; + } + } + + + } + + 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); + } + } + + obj.tId = o.tId; + obj.status = o.status.status; + obj.statusText = o.status.statusText; + obj.getResponseHeader = headerObj; + obj.getAllResponseHeaders = headerStr; + obj.stat = o.status + + if (typeof callbackArg !== undefined) { + obj.argument = callbackArg; + } + + return obj; + }, + + request : function(method, uri, cb, data, options) { + + options = Ext.apply({async:true, + headers:false, + userId:null, + password:null, + xmlData:null }, 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; + } + + return this.makeRequest(method, uri, cb, data, options); + + }, + asyncRequest:function(method, uri, callback, postData) + { + var o = this.getConnectionObject(); + + if (!o || o.status.isError) { + return null; + } + else { + o.options = options; + try{ + o.conn.open(method, uri, true); + } catch(ex){ + o.status.isError = true; + o.status.error = ex; + return Ext.apply(o,this.handleTransactionResponse(o, callback)); + + } + + + 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); + + try{ o.conn.send(postData || null); + } catch(ex){ + o.status.isError=true; + o.status.error = ex; + return Ext.apply(o,this.handleTransactionResponse(o, callback)); + } + + + return o; + } + }, + + makeRequest:function(method, uri, callback, postData, options) + { + var o = this.getConnectionObject(); + + if (!o || o.status.isError) { + return null; + } + else { + o.options = options; + try{ + o.conn.open(method, uri, options.async, options.userId, options.password); + } catch(ex){ + o.status.isError = true; + o.status.error = ex; + var r=this.handleTransactionResponse(o, callback); + return Ext.apply(o,r); + } + + 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); + } + + if(o.options.async){ //Timers won't work here as it's a blocking call + this.handleReadyState(o, callback); + } + + try{ o.conn.send(postData || null); + } catch(ex){ + //Ext.apply(o,this.handleTransactionResponse(o, callback)); + } + + return options.async?o:Ext.apply(o,this.handleTransactionResponse(o, callback)); + } + }}); + +Ext.lib.Ajax.forceActiveX = (document.location.protocol == 'file:');/* or other true/false mechanism */ \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,52 @@ +body { + font-family:helvetica,tahoma,verdana,sans-serif; + padding:20px; + padding-top:32px; + font-size:13px; + background-color:#fff !important; +} +p { + margin-bottom:15px; +} +h1 { + font-size:large; + margin-bottom:20px; +} +h2 { + font-size:14px; + color:#333; + font-weight:bold; + margin:10px 0; +} +.example-info{ + width:150px; + border:1px solid #c3daf9; + border-top:1px solid #DCEAFB; + border-left:1px solid #DCEAFB; + background:#ecf5fe url( info-bg.gif ) repeat-x; + font-size:10px; + padding:8px; +} +pre.code{ + background: #F8F8F8; + border: 1px solid #e8e8e8; + padding:10px; + margin:10px; + margin-left:0px; + border-left:5px solid #e8e8e8; + font-size: 12px !important; + line-height:14px !important; +} +.msg .x-box-mc { + font-size:14px; +} +#msg-div { + position:absolute; + left:35%; + top:10px; + width:250px; + z-index:20000; +} +.x-grid3-row-body p { + margin:5px 5px 10px 5px !important; +} Added: mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/shared/examples.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,102 @@ +Ext.BLANK_IMAGE_URL = '../../resources/images/default/s.gif'; + +Ext.example = function(){ + var msgCt; + + function createBox(t, s){ + return ['<div class="msg">', + '<div class="x-box-tl"><div class="x-box-tr"><div class="x-box-tc"></div></div></div>', + '<div class="x-box-ml"><div class="x-box-mr"><div class="x-box-mc"><h3>', t, '</h3>', s, '</div></div></div>', + '<div class="x-box-bl"><div class="x-box-br"><div class="x-box-bc"></div></div></div>', + '</div>'].join(''); + } + return { + msg : function(title, format){ + if(!msgCt){ + msgCt = Ext.DomHelper.insertFirst(document.body, {id:'msg-div'}, true); + } + msgCt.alignTo(document, 't-t'); + var s = String.format.apply(String, Array.prototype.slice.call(arguments, 1)); + var m = Ext.DomHelper.append(msgCt, {html:createBox(title, s)}, true); + m.slideIn('t').pause(1).ghost("t", {remove:true}); + }, + + init : function(){ + /* + var t = Ext.get('exttheme'); + if(!t){ // run locally? + return; + } + var theme = Cookies.get('exttheme') || 'aero'; + if(theme){ + t.dom.value = theme; + Ext.getBody().addClass('x-'+theme); + } + t.on('change', function(){ + Cookies.set('exttheme', t.getValue()); + setTimeout(function(){ + window.location.reload(); + }, 250); + });*/ + + var lb = Ext.get('lib-bar'); + if(lb){ + lb.show(); + } + } + }; +}(); + +Ext.example.shortBogusMarkup = '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.'; +Ext.example.bogusMarkup = '<p>Lorem ipsum dolor sit amet, consectetuer adipiscing elit. Sed metus nibh, sodales a, porta at, vulputate eget, dui. Pellentesque ut nisl. Maecenas tortor turpis, interdum non, sodales non, iaculis ac, lacus. Vestibulum auctor, tortor quis iaculis malesuada, libero lectus bibendum purus, sit amet tincidunt quam turpis vel lacus. In pellentesque nisl non sem. Suspendisse nunc sem, pretium eget, cursus a, fringilla vel, urna.<br/><br/>Aliquam commodo ullamcorper erat. Nullam vel justo in neque porttitor laoreet. Aenean lacus dui, consequat eu, adipiscing eget, nonummy non, nisi. Morbi nunc est, dignissim non, ornare sed, luctus eu, massa. Vivamus eget quam. Vivamus tincidunt diam nec urna. Curabitur velit.</p>'; + +Ext.onReady(Ext.example.init, Ext.example); + + +// old school cookie functions +var Cookies = {}; +Cookies.set = function(name, value){ + var argv = arguments; + var argc = arguments.length; + var expires = (argc > 2) ? argv[2] : null; + var path = (argc > 3) ? argv[3] : '/'; + var domain = (argc > 4) ? argv[4] : null; + var secure = (argc > 5) ? argv[5] : false; + document.cookie = name + "=" + escape (value) + + ((expires == null) ? "" : ("; expires=" + expires.toGMTString())) + + ((path == null) ? "" : ("; path=" + path)) + + ((domain == null) ? "" : ("; domain=" + domain)) + + ((secure == true) ? "; secure" : ""); +}; + +Cookies.get = function(name){ + var arg = name + "="; + var alen = arg.length; + var clen = document.cookie.length; + var i = 0; + var j = 0; + while(i < clen){ + j = i + alen; + if (document.cookie.substring(i, j) == arg) + return Cookies.getCookieVal(j); + i = document.cookie.indexOf(" ", i) + 1; + if(i == 0) + break; + } + return null; +}; + +Cookies.clear = function(name) { + if(Cookies.get(name)){ + document.cookie = name + "=" + + "; expires=Thu, 01-Jan-70 00:00:01 GMT"; + } +}; + +Cookies.getCookieVal = function(offset){ + var endstr = document.cookie.indexOf(";", offset); + if(endstr == -1){ + endstr = document.cookie.length; + } + return unescape(document.cookie.substring(offset, endstr)); +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/examples/shared/info-bg.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/examples/shared/info-bg.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/examples/shared/lib-bar.png =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/examples/shared/lib-bar.png ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/examples/shared/lib.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/examples/shared/lib.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/examples/shared/lib.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,16 @@ +#lib-bar { + position:absolute; + top:0; + right:10px; + z-index:100; + visibility:hidden; + width:298px; + height:25px; + background-image:url(lib-bar.png); +} +#lib-bar-inner { + padding:4px; +} +#lib-bar * { + font-size:11px; +} \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/ext-all-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/ext-all-debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/ext-all-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,8 @@ * http://extjs.com/license */ + + Ext.DomHelper = function(){ var tempTableEl = null; @@ -339,6 +341,8 @@ }; }(); + + Ext.Template = function(html){ var a = arguments; @@ -495,6 +499,8 @@ }; + + Ext.DomQuery = function(){ var cache = {}, simpleCache = {}, valueCache = {}; var nonSpace = /\S/; @@ -1182,6 +1188,8 @@ Ext.query = Ext.DomQuery.select; + + Ext.util.Observable = function(){ @@ -1189,36 +1197,18 @@ this.on(this.listeners); delete this.listeners; } - if(!this.events){ - this.events = {}; - } }; Ext.util.Observable.prototype = { fireEvent : function(){ - var a = Array.prototype.slice.call(arguments, 0); - var ename = a[0]; - if(ename === true){ - a.shift(); - var c = this; - while(c){ - if(c.fireEvent.apply(c, a) === false){ - return false; - } - c = c.getBubbleTarget ? c.getBubbleTarget() : null; - } - return true; - } if(this.eventsSuspended === true){ - var q = this.suspendedEventsQueue; - if (q) { - q[q.length] = a; + if (this.suspendedEventsQueue) { + this.suspendedEventsQueue.push(arguments); } } else { - var ce = this.events[ename.toLowerCase()]; + var ce = this.events[arguments[0].toLowerCase()]; if(typeof ce == "object"){ - a.shift(); - return ce.fire.apply(ce, a); + return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); } } return true; @@ -1461,14 +1451,6 @@ }; }; - var createTargeted = function(h, o, scope){ - return function(){ - if(o.target == arguments[0]){ - h.apply(scope, Array.prototype.slice.call(arguments, 0)); - } - }; - }; - Ext.util.Event = function(obj, name){ this.name = name; this.obj = obj; @@ -1494,9 +1476,6 @@ scope = scope || this.obj; var l = {fn: fn, scope: scope, options: o}; var h = fn; - if(o.target){ - h = createTargeted(h, o, scope); - } if(o.delay){ h = createDelayed(h, o, scope); } @@ -1562,6 +1541,8 @@ } }; })(); + + Ext.EventManager = function(){ var docReadyEvent, docReadyProcId, docReadyState = false; @@ -1723,14 +1704,6 @@ }; }; - var createTargeted = function(h, o){ - return function(){ - if(o.target == Ext.EventObject.setEvent(arguments[0]).target){ - h.apply(this, Array.prototype.slice.call(arguments, 0)); - } - }; - }; - var listen = function(element, ename, opt, fn, scope){ var o = (!opt || typeof opt == "boolean") ? {} : opt; fn = fn || o.fn; scope = scope || o.scope; @@ -1769,9 +1742,6 @@ fn.call(scope || el, e, t, o); }; - if(o.target){ - h = createTargeted(h, o); - } if(o.delay){ h = createDelayed(h, o); } @@ -1838,16 +1808,13 @@ docReadyEvent.addListener(fn, scope, options); }, - // private - doResizeEvent: function(){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - }, - onWindowResize : function(fn, scope, options){ if(!resizeEvent){ resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); + resizeTask = new Ext.util.DelayedTask(function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }); E.on(window, "resize", this.fireWindowResize, this); } resizeEvent.addListener(fn, scope, options); @@ -1919,11 +1886,10 @@ var bd = document.body || document.getElementsByTagName('body')[0]; if(!bd){ return false; } var cls = [' ', - Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8')) + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') : Ext.isOpera ? "ext-opera" - : Ext.isSafari ? "ext-safari" - : Ext.isChrome ? "ext-chrome" : ""]; + : Ext.isSafari ? "ext-safari" : ""]; if(Ext.isMac){ cls.push("ext-mac"); @@ -2326,6 +2292,8 @@ return new Ext.EventObjectImpl(); }(); + + (function(){ var D = Ext.lib.Dom; @@ -2880,13 +2848,13 @@ var w, h, d = this.dom, s = d.style; if(s.width && s.width != 'auto'){ w = parseInt(s.width, 10); - if(this.isBorderBox()){ + if(Ext.isBorderBox){ w -= this.getFrameWidth('lr'); } } if(s.height && s.height != 'auto'){ h = parseInt(s.height, 10); - if(this.isBorderBox()){ + if(Ext.isBorderBox){ h -= this.getFrameWidth('tb'); } } @@ -3381,7 +3349,7 @@ getFrameWidth : function(sides, onlyContentBox){ - return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); }, @@ -3452,7 +3420,7 @@ mask : function(msg, msgCls){ if(this.getStyle("position") == "static"){ - this.addClass("x-masked-relative"); + this.setStyle("position", "relative"); } if(this._maskMsg){ this._maskMsg.remove(); @@ -3489,7 +3457,7 @@ this._mask.remove(); delete this._mask; } - this.removeClass(["x-masked", "x-masked-relative"]); + this.removeClass("x-masked"); }, @@ -3958,6 +3926,8 @@ }); })(); + + Ext.Element.addMethods({ scrollIntoView : function(container, hscroll){ @@ -4008,7 +3978,7 @@ scrollTo : function(side, value, animate){ var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; - if(!animate){ + if(!animate || !A){ this.dom[prop] = value; }else{ var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; @@ -4068,6 +4038,8 @@ return scrolled; } }); + + Ext.Element.addMethods({ addKeyListener : function(key, fn, scope){ @@ -4096,6 +4068,8 @@ return new Ext.KeyMap(this, config); } }); + + Ext.Element.addMethods({ appendChild: function(el){ @@ -4183,13 +4157,15 @@ this.dom.parentNode.insertBefore(el, this.dom); } El.uncache(this.id); - Ext.removeNode(this.dom); + this.dom.parentNode.removeChild(this.dom); this.dom = el; this.id = Ext.id(el); El.cache[this.id] = this; return this; } }); + + Ext.Element.addMethods({ initDD : function(group, config, overrides){ @@ -4209,6 +4185,8 @@ return Ext.apply(dd, overrides); } }); + + Ext.Element.addMethods({ getAnchorXY : function(anchor, local, s){ @@ -4431,6 +4409,8 @@ }() }); + + //Notifies Element that fx methods are available Ext.enableFx = true; @@ -4820,17 +4800,14 @@ var el = this.getFxEl(); o = o || {}; el.queueFx(o, function(){ - var to = o.endOpacity || 0; - arguments.callee.anim = this.fxanim({opacity:{to:to}}, + arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, o, null, .5, "easeOut", function(){ - if(to === 0){ - if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ - this.dom.style.display = "none"; - }else{ - this.dom.style.visibility = "hidden"; - } - this.clearOpacity(); + if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ + this.dom.style.display = "none"; + }else{ + this.dom.style.visibility = "hidden"; } + this.clearOpacity(); el.afterFx(o); }); }); @@ -5131,6 +5108,8 @@ Ext.Element.addMethods(Ext.Fx); + + Ext.CompositeElement = function(els){ this.elements = []; this.addElements(els); @@ -5385,6 +5364,8 @@ }; Ext.select = Ext.Element.select; + + Ext.data.Connection = function(config){ Ext.apply(this, config); @@ -5648,7 +5629,420 @@ return Ext.lib.Ajax.serializeForm(form); } }); + + +(function(){ + var transactions = {}, TID = 0, impl, d, pollStartTimer = 0, + callBuffer = [], callTask; + + var get = function(id){ + return transactions[id] || {}; + } + + var createEvent = function(t, data, xhr, success, hs){ + return Ext.apply(t || {}, { + xhr: xhr, + success: success, + data: data, + arg: hs + }); + } + + var doCallback = function(data, t, success, xhr){ + var fn = success ? 'success' : 'failure'; + if(t && t.cb){ + var hs = t.cb; + var e = createEvent(t, data, xhr, success, hs); + if(typeof hs == 'function'){ + delete e.arg; + hs(data, e); + } else{ + Ext.callback(hs[fn], hs.scope, [data, e]); + Ext.callback(hs.callback, hs.scope, [data, e]); + } + } + } + + var handleEvent = function(data, xhr){ + if(!data){ + return; + } + var t = get(data.tid); + switch(data.type){ + case 'rpc': + if(t){ + doCallback(data.result, t, true, xhr); + data.xhr = xhr; + d.fireEvent('event', data); + delete transactions[data.tid]; + } else{ + data.xhr = xhr; + d.fireEvent('event', data); + } + break; + case 'event': + data.xhr = xhr; + d.fireEvent(data.name, data); + d.fireEvent('event', data); + break; + case 'exception': + if(t){ + t.code = data.code; + t.message = data.message; + t.trace = data.where; + doCallback(data.result, t, false, xhr); + data.xhr = xhr; + d.fireEvent('exception', data); + delete transactions[data.tid]; + } else{ + data.xhr = xhr; + d.fireEvent('exception', data); + } + if(data.where && d.enableDebug){ // testing + Ext.Msg.maxWidth = 800; + Ext.Msg.show({ + title: 'Exception occurred while making a remote call to the server', + msg: 'Stack trace from the server:', + buttons: Ext.MessageBox.OK, + multiline: 400, + width:800, + value: data.message + '\n' + data.where + }); + } + break; + } + } + + var handleException = function(opt, xhr, type){ + var t = get(opt.tid); + if(t){ + t.xhr = xhr; + t.type = type || d.exceptions.TRANSPORT; + doCallback(null, t, false, xhr); + d.fireEvent('exception', t); + delete transactions[opt.tid]; + } else{ + d.fireEvent('exception', { + tid: opt.tid, + xhr: xhr, + code: type || d.exceptions.TRANSPORT + }); + } + } + + var cb = function(opt, success, xhr){ + if(opt && opt.poll){ + Ext.Direct.fireEvent('poll', xhr, success); + } + if(success){ + var data = null; + if(!Ext.isEmpty(xhr.responseText)){ + try{ + data = Ext.decode(xhr.responseText); + } catch(e){ + return handleException(opt, xhr, d.exceptions.PARSE); + } + if(Ext.isArray(data)){ + for(var i = 0, len = data.length; i < len; i++){ + handleEvent(data[i], xhr); + } + } else{ + handleEvent(data, xhr); + } + } else if(opt.ts){ + for(var j = 0, len = opt.ts.length; j < len; j++){ + doCallback(null, transactions[opt.ts[j].tid], true, xhr); + } + } + } else{ + handleException(opt, xhr); + } + } + + var doSend = function(data){ + if(d.enableUrlEncode){ + var params = {}; + params[typeof d.enableUrlEncode == 'string' ? d.enableUrlEncode : 'data'] = Ext.encode(data); + Ext.Ajax.request({ + url: d.remoteUrl, + params: params, + callback: cb, + ts: data + }); + }else{ + Ext.Ajax.request({ + url: d.remoteUrl, + jsonData: data, + callback: cb, + ts: data + }); + } + } + + var combineAndSend = function(){ + var len = callBuffer.length; + if(len > 0){ + doSend(len == 1 ? callBuffer[0] : callBuffer); + callBuffer = []; + } + } + + var doCall = function(c, m, args){ + var data = null, hs = args[m.len], scope = args[m.len+1]; + var t = { + tid: ++TID, + args: args, + action: c, + method: m, + cb: scope && typeof hs == 'function' ? hs.createDelegate(scope) : hs + }; + if(d.fireEvent('beforecall', t) !== false){ + transactions[t.tid] = t; + + if(m.len !== 0){ + data = args.slice(0, m.len); + } + + callBuffer.push({ + action: c, + method: m.name, + tid: t.tid, + data: data + }); + + if(d.enableBuffer){ + if(!callTask){ + callTask = new Ext.util.DelayedTask(combineAndSend); + } + callTask.delay(typeof d.enableBuffer == 'number' ? d.enableBuffer : 10); + }else{ + combineAndSend(); + } + d.fireEvent('call', t); + } + } + + var doForm = function(c, m, form, callback, scope){ + var t = { + tid: ++TID, + action: c, + method: m, + args:[form, callback, scope], + cb: scope && typeof callback == 'function' ? callback.createDelegate(scope) : callback + }; + transactions[t.tid] = t; + + form = Ext.getDom(form); + var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data'; + + var params = { + extTID: t.tid, + extAction: c, + extMethod: m.name, + extUpload: String(isUpload) + }; + if(callback && typeof callback == 'object'){ + Ext.apply(params, callback.params); + } + Ext.Ajax.request({ + url: d.remoteUrl, + params: params, + callback: cb, + form: form, + isUpload: isUpload, + ts: { + action: c, + method: m.name, + tid: t.tid, + data: null + } + }); + } + + var createMethod = function(c, m){ + var f; + if(!m.formHandler){ + f = function(){ + doCall(c, m, Array.prototype.slice.call(arguments, 0)); + }; + }else{ + f = function(form, callback, scope){ + doForm(c, m, form, callback, scope); + }; + } + f.directCfg = { + action: c, + method: m + }; + return f; + } + + impl = Ext.extend(Ext.util.Observable, { + exceptions: { + TRANSPORT: 'xhr', + PARSE: 'parse', + LOGIN: 'login', + SERVER: 'exception' + }, + + constructor: function(){ + impl.superclass.constructor.call(this); + this.addEvents('beforecall', 'call', 'beforeevent', 'event', 'exception', 'connect', 'disconnect', 'pollstart', 'pollstop'); + }, + + defineAPI : function(data){ + d.remoteUrl = data.url; + var o = data.actions || data.cls; + for(var c in o){ + var cls = window[c] || (window[c] = {}); + var ms = o[c]; + for(var i = 0, len = ms.length; i < len; i++){ + var m = ms[i]; + cls[m.name] = createMethod(c, m); + } + } + }, + + startPoll : function(){ + clearTimeout(pollStartTimer); + if(!this.poller){ + this.poller = Ext.TaskMgr.start({ + run: function(){ + if(Ext.Direct.fireEvent('beforepoll') !== false){ + Ext.Ajax.request({ + url: d.remoteUrl + d.pollUrlFragment, + callback: cb, + poll: true + }); + } + }, + interval: this.pollInterval, + scope: this + }); + Ext.Direct.fireEvent('startpolling'); + } + }, + + stopPoll : function(){ + clearTimeout(pollStartTimer); + if(this.poller){ + Ext.TaskMgr.stop(this.poller); + delete this.poller; + Ext.Direct.fireEvent('stoppolling'); + } + }, + + inject : function(stringData, opt){ + cb(opt || {}, true, {responseText: stringData}); + }, + + injectTransaction : function(callback){ + var t = { + tid: ++TID, + action: c, + method: m, + cb: callback + }; + transactions[t.tid] = t; + return t; + }, + + startStreaming : function(startKeepAlive){ + pollStartTimer = this.startPoll.defer(10000, this); + if(startKeepAlive === true){ + this.startKeepAlive(); + } + }, + + startKeepAlive : function(){ + (function(){ + this.keepAlive = Ext.TaskMgr.start({ + run: function(){ + Ext.Ajax.request({ + url: d.remoteUrl + d.pingUrlFragment, + callback: cb + }); + var flash; + if(d.Flash && (flash = d.Flash.getFlash())){ + try{flash.send('ping');}catch(e){try{flash.reconnect();}catch(e){}} + } + }, + interval: this.keepAliveInterval, + scope: this + }); + }).defer(100, this); + }, + + autoReconnect: true, + pollInterval: 3000, + keepAliveInterval: 60000, + pollUrlFragment: '/poll', + pingUrlFragment: '/ping', + enableBuffer: 10 + }); + Ext.Direct = d = new impl(); + + + var reconnId = 0; + var retryId = 0; + + var clear = function(){ + clearTimeout(reconnId); + clearTimeout(retryId); + } + + d.Flash = { + onData : function(strData){ + // setTimeout to avoid flash crash bug + setTimeout(function(){ + d.inject(strData); + }, 10); + }, + + onConnect : function(success){ + if(success){ + clear(); + d.stopPoll(); + d.fireEvent('connect'); + }else{ + d.startPoll(); + if(d.autoReconnect){ + d.Flash.reconnect(); + } + } + }, + + getFlash : function(){ + return Ext.isIE ? window.xflashDirect : document.xflashDirect; + }, + + reconnect : function(){ + clear(); + var flash = d.Flash.getFlash(); + if(flash){ + reconnId = setTimeout(function(){ + flash.reconnect(); + }, 1000); + retryId = setInterval(function(){ + flash.reconnect(); + }, 30000); + } + }, + + onClose : function(){ + d.fireEvent('disconnect'); + d.startPoll(); + if(d.autoReconnect){ + d.Flash.reconnect(); + } + } + }; +})(); + + + + Ext.Updater = Ext.extend(Ext.util.Observable, { constructor: function(el, forceNew){ el = Ext.get(el); @@ -5912,23 +6306,13 @@ Ext.UpdateManager = Ext.Updater; + + (function() { - -// create private copy of Ext's String.format() method -// - to remove unnecessary dependency -// - to resolve namespace conflict with M$-Ajax's implementation -function xf(format) { - var args = Array.prototype.slice.call(arguments, 1); - return format.replace(/\{(\d+)\}/g, function(m, i) { - return args[i]; - }); -} - - // private Date.formatCodeToRegex = function(character, currentGroup) { // Note: currentGroup - position in regex result array (see notes for Date.parseCodes below) @@ -5940,7 +6324,7 @@ } return p? Ext.applyIf({ - c: p.c? xf(p.c, currentGroup || "{0}") : p.c + c: p.c? String.format(p.c, currentGroup || "{0}") : p.c }, p) : { g:0, c:null, @@ -6108,13 +6492,11 @@ // private createNewFormat : function(format) { - var funcName = "format" + Date.formatFunctions.count++, - code = "Date.prototype." + funcName + " = function(){return ", - special = false, - ch = ''; - + 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 == "\\") { @@ -6132,77 +6514,69 @@ }, // private - createParser : function() { - var code = [ - "Date.{0} = function(input){", - "var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;", - "input = String(input);", - "d = new Date();", - "y = d.getFullYear();", - "m = d.getMonth();", - "d = d.getDate();", - "var results = input.match(Date.parseRegexes[{1}]);", - "if(results && results.length > 0){", - "{2}", - "if(u){", - "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){", - "v = new Date(y, m, d, h, i, s, ms);", - "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){", - "v = new Date(y, m, d, h, i, s);", - "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){", - "v = new Date(y, m, d, h, i);", - "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){", - "v = new Date(y, m, d, h);", - "}else if (y >= 0 && m >= 0 && d > 0){", - "v = new Date(y, m, d);", - "}else if (y >= 0 && m >= 0){", - "v = new Date(y, m);", - "}else if (y >= 0){", - "v = new Date(y);", - "}", - "}", - "return (v && (z != null || o != null))?" // favour UTC offset over GMT offset - + " (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" // reset to UTC, then add offset - + " v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;", // reset to GMT, then add offset - "}" - ].join('\n'); + createParser : function(format) { + var funcName = "parse" + Date.parseFunctions.count++; + var regexNum = Date.parseRegexes.length; + var currentGroup = 1; + Date.parseFunctions[format] = funcName; - return function(format) { - var funcName = "parse" + Date.parseFunctions.count++, - regexNum = Date.parseRegexes.length, - currentGroup = 1, - calc = "", - regex = "", - special = false, - ch = ""; + var code = "Date." + funcName + " = function(input){\n" + + "var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" + + "input = String(input);\n" + + "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 = ""; - Date.parseFunctions[format] = funcName; - - for (var i = 0; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; + 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; } - else if (special) { - special = false; - regex += String.escape(ch); - } - else { - var obj = $f(ch, currentGroup); - currentGroup += obj.g; - regex += obj.s; - if (obj.g && obj.c) { - calc += obj.c; - } - } } - - Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); - eval(xf(code, funcName, regexNum, calc)); } - }(), + code += "if (u){\n" + + "v = new Date(u * 1000);\n" // 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" + + "}\n}\nreturn (v && (z || o))?" // favour UTC offset over GMT offset + + " (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" // reset to UTC, then add offset + + " v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" // reset to GMT, then add offset + + "}"; + + Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); + eval(code); + }, + // private parseCodes : { @@ -6249,7 +6623,7 @@ z: { g:0, c:null, - s:"(?:\\d{1,3})" // day of the year (0 - 364 (365 in leap years)) + s:"(?:\\d{1,3}" // day of the year (0 - 364 (365 in leap years)) }, W: { g:0, @@ -6346,7 +6720,7 @@ u: { g:1, c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n", - s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited) + s:"(\\d+)" // milliseconds with leading zeroes (arbitrary number of digits allowed) e.g. 001, 100, 999, 999876543210 }, O: { g:1, @@ -6382,24 +6756,17 @@ s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset }, c: function() { - var calc = [], - arr = [ - $f("Y", 1), // year - $f("m", 2), // month - $f("d", 3), // day - $f("h", 4), // hour - $f("i", 5), // minute - $f("s", 6), // second - {c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited) - {c:[ // allow both "Z" (i.e. UTC) and "+08:00" (i.e. UTC offset) time zone delimiters - "if(results[9] == 'Z'){", - "z = 0;", - "}else{", - $f("P", 9).c, - "}" - ].join('\n')} - ]; - + var calc = []; + var arr = [ + $f("Y", 1), // year + $f("m", 2), // month + $f("d", 3), // day + $f("h", 4), // hour + $f("i", 5), // minute + $f("s", 6), // second + {c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // millisecond decimal fraction (with leading zeroes + arbitrary no. of digits) + {c:"if(results[9] == 'Z'){\no = 0;\n}else{\n" + $f("P", 9).c + "\n}"} // allow both "Z" (i.e. UTC) and "+08:00" (i.e. GMT) time zone delimiters + ]; for (var i = 0, l = arr.length; i < l; ++i) { calc.push(arr[i].c); } @@ -6408,8 +6775,8 @@ 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 - + "((\.|,)\\d+)?" // decimal fraction of a second (e.g. ",998465" or ".998465") - + "(Z|([+\-]\\d{2}:\\d{2}))" // "Z" (UTC) or "+08:00" (UTC offset) + + "((\.|,)\\d+)?" // ",998465" or ".998465" millisecond decimal fraction + + "(" + $f("P", null).s + "|Z)" // "Z" (UTC) or "GMT+08:00" (GMT offset) } }, U: { @@ -6452,7 +6819,7 @@ getGMTOffset : function(colon) { return (this.getTimezoneOffset() > 0 ? "-" : "+") - + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0") + + String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset() / 60)), 2, "0") + (colon ? ":" : "") + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0"); }, @@ -6470,18 +6837,14 @@ getWeekOfYear : function() { // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm - var ms1d = 864e5, // milliseconds in a day - ms7d = 7 * ms1d; // milliseconds in a week + 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; + }, - return function() { // return a closure so constants get calculated only once - var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number - AWN = Math.floor(DC3 / 7), // an Absolute Week Number - Wyr = new Date(AWN * ms7d).getUTCFullYear(); - - return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; - } - }(), - isLeapYear : function() { var year = this.getFullYear(); @@ -6616,6 +6979,8 @@ } }; } + + Ext.util.DelayedTask = function(fn, scope, args){ var id = null, d, t; @@ -6651,6 +7016,8 @@ } }; }; + + Ext.util.TaskRunner = function(interval){ interval = interval || 10; @@ -6742,6 +7109,8 @@ Ext.TaskMgr = new Ext.util.TaskRunner(); + + Ext.util.MixedCollection = function(allowFunctions, keyFn){ this.items = []; @@ -7096,69 +7465,9 @@ }); Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item; + + -Ext.ComponentMgr = function(){ - var all = new Ext.util.MixedCollection(); - var types = {}; - var ptypes = {}; - - return { - - register : function(c){ - all.add(c); - }, - - - unregister : function(c){ - all.remove(c); - }, - - - get : function(id){ - return all.get(id); - }, - - - onAvailable : function(id, fn, scope){ - all.on("add", function(index, o){ - if(o.id == id){ - 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 config.render ? config : new types[config.xtype || defaultType](config); - }, - - registerPlugin : function(ptype, cls){ - ptypes[ptype] = cls; - cls.ptype = ptype; - }, - - createPlugin : function(config, defaultType){ - return new ptypes[config.ptype || defaultType](config); - } - }; -}(); - - -Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down -Ext.preg = Ext.ComponentMgr.registerPlugin; -Ext.create = Ext.ComponentMgr.create; - - Ext.util.JSON = new (function(){ var useHasOwn = !!{}.hasOwnProperty; @@ -7275,6 +7584,8 @@ Ext.decode = Ext.util.JSON.decode; + + Ext.util.Format = function(){ var trimRe = /^\s+|\s+$/g; return { @@ -7425,7 +7736,6 @@ } }(), - number: function(v, format) { if(!format){ @@ -7435,52 +7745,52 @@ if(typeof v != 'number' || isNaN(v)){ return ''; } - var comma = ','; - var dec = '.'; - var i18n = false; - - if(format.substr(format.length - 2) == '/i'){ - format = format.substr(0, format.length-2); - i18n = true; - comma = '.'; - dec = ','; - } + var hasComma = -1 < format.indexOf(','), + psplit = format.replace(/[^\d\.]/g,'').split('.'); - var hasComma = format.indexOf(comma) != -1, - psplit = (i18n ? format.replace(/[^\d\,]/g,'') : format.replace(/[^\d\.]/g,'')).split(dec); - + // compute precision if (1 < psplit.length) { + // fix number precision v = v.toFixed(psplit[1].length); } + // error: too many periods else if (2 < psplit.length) { throw('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format); } + // remove precision else { v = v.toFixed(0); } + // get the string now that precision is correct var fnum = v.toString(); + // format has comma, then compute commas if (hasComma) { + // remove precision for computation psplit = fnum.split('.'); var cnum = psplit[0], parr = [], j = cnum.length, m = Math.floor(j / 3), - n = cnum.length % 3 || 3; + n = cnum.length % 3 || 3; // n cannot be ZERO or causes infinite loop + // break the number into chunks of 3 digits; first chunk may be less than 3 for (var i = 0; i < j; i += n) { if (i != 0) {n = 3;} parr[parr.length] = cnum.substr(i, n); m -= 1; } - fnum = parr.join(comma); - if (psplit[1]) { - fnum += dec + psplit[1]; - } + + // put chunks back together, separated by comma + fnum = parr.join(','); + + // add the precision back in + if (psplit[1]) {fnum += '.' + psplit[1];} } + // replace the number portion of the format with fnum return format.replace(/[\d,?\.?]+/, fnum); }, @@ -7497,6 +7807,8 @@ } } }(); + + Ext.XTemplate = function(){ Ext.XTemplate.superclass.constructor.apply(this, arguments); @@ -7657,6 +7969,8 @@ return new Ext.XTemplate(el.value || el.innerHTML); }; + + Ext.util.CSS = function(){ var rules = null; var doc = document; @@ -7776,6 +8090,8 @@ } }; }(); + + Ext.util.ClickRepeater = function(el, config) { @@ -7821,12 +8137,6 @@ timer : 0, // private - destroy : function() { - Ext.destroy(this.el); - this.purgeListeners(); - }, - - // private handleMouseDown : function(){ clearTimeout(this.timer); this.el.blur(); @@ -7891,6 +8201,8 @@ this.fireEvent("mouseup", this); } }); + + Ext.KeyNav = function(el, config){ this.el = Ext.get(el); @@ -7993,6 +8305,8 @@ } }; + + Ext.KeyMap = function(el, config, eventName){ this.el = Ext.get(el); this.eventName = eventName || "keydown"; @@ -8114,6 +8428,8 @@ } } }; + + Ext.util.TextMetrics = function(){ var shared; @@ -8191,6 +8507,8 @@ } }); + + (function() { @@ -8244,9 +8562,6 @@ lock: function() { this.locked = true; }, - moveOnly: false, - - unlock: function() { this.locked = false; }, @@ -8976,7 +9291,7 @@ _remove: function(oDD) { for (var g in oDD.groups) { - if (g && this.ids[g] && this.ids[g][oDD.id]) { + if (g && this.ids[g][oDD.id]) { delete this.ids[g][oDD.id]; } } @@ -9052,13 +9367,8 @@ if(Ext.QuickTips){ Ext.QuickTips.disable(); } - if(this.dragCurrent){ - // the original browser mouseup wasn't handled (e.g. outside FF browser window) - // so clean up first to avoid breaking the next drag - this.handleMouseUp(e); - } - this.currentTarget = e.getTarget(); + this.dragCurrent = oDD; var el = oDD.getEl(); @@ -9144,6 +9454,7 @@ if (! this.dragCurrent) { return true; } + // var button = e.which || e.button; // check for IE mouseup outside of page boundary @@ -9972,6 +10283,8 @@ } }); + + Ext.dd.DragTracker = function(config){ Ext.apply(this, config); this.addEvents( @@ -10009,9 +10322,7 @@ 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; - if(this.preventDefault !== false){ - e.preventDefault(); - } + e.preventDefault(); var doc = Ext.getDoc(); doc.on('mouseup', this.onMouseUp, this); doc.on('mousemove', this.onMouseMove, this); @@ -10127,6 +10438,8 @@ } }); + + Ext.dd.ScrollManager = function(){ var ddm = Ext.dd.DragDropMgr; var els = {}; @@ -10274,6 +10587,8 @@ }; }(); + + Ext.dd.Registry = function(){ var elements = {}; var handles = {}; @@ -10356,6 +10671,8 @@ }; }(); + + Ext.dd.StatusProxy = function(config){ Ext.apply(this, config); this.id = this.id || Ext.id(); @@ -10477,6 +10794,8 @@ } }; + + Ext.dd.DragSource = function(el, config){ this.el = Ext.get(el); if(!this.dragData){ @@ -10724,6 +11043,8 @@ } }); + + Ext.dd.DropTarget = function(el, config){ this.el = Ext.get(el); @@ -10778,6 +11099,8 @@ } }); + + Ext.dd.DragZone = function(el, config){ Ext.dd.DragZone.superclass.constructor.call(this, el, config); if(this.containerScroll){ @@ -10816,6 +11139,8 @@ } }); + + Ext.dd.DropZone = function(el, config){ Ext.dd.DropZone.superclass.constructor.call(this, el, config); }; @@ -10908,6 +11233,8 @@ }); + + Ext.data.SortTypes = { none : function(s){ @@ -10957,6 +11284,8 @@ return val; } }; + + Ext.data.Record = function(data, id){ this.id = (id || id === 0) ? id : ++Ext.data.Record.AUTO_ID; @@ -11100,6 +11429,8 @@ return !!(this.modified && this.modified.hasOwnProperty(fieldName)); } }; + + Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), { @@ -11120,7 +11451,7 @@ lookup : function(id){ - return typeof id == "object" ? (id.events ? id : Ext.create(id, 'store')) : this.get(id); + return typeof id == "object" ? id : this.get(id); }, // getKey implementation for MixedCollection @@ -11128,6 +11459,8 @@ return o.storeId || o.id; } }); + + Ext.data.Store = function(config){ this.data = new Ext.util.MixedCollection(false); @@ -11195,9 +11528,7 @@ } this.sortToggle = {}; - if(this.sortField){ - this.setDefaultSort(this.sortField, this.sortDir); - }else if(this.sortInfo){ + if(this.sortInfo){ this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); } @@ -11643,9 +11974,9 @@ this.baseParams[name] = value; } }); + + -Ext.reg('store', Ext.data.Store); - Ext.data.SimpleStore = function(config){ Ext.data.SimpleStore.superclass.constructor.call(this, Ext.apply(config, { reader: new Ext.data.ArrayReader({ @@ -11667,7 +11998,8 @@ Ext.data.SimpleStore.superclass.loadData.call(this, data, append); } }); -Ext.reg('simplestore', Ext.data.SimpleStore); + + Ext.data.JsonStore = function(c){ @@ -11678,19 +12010,18 @@ })); }; Ext.extend(Ext.data.JsonStore, Ext.data.Store); - -Ext.reg('jsonstore', Ext.data.JsonStore); -Ext.data.XmlStore = function(c){ - - - Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(c, { - proxy: c.proxy || (!c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined), - reader: new Ext.data.XmlReader(c, c.fields) + + +Ext.data.DirectStore = function(c){ + var pcfg = Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn'); + Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: new Ext.data.DirectProxy(pcfg), + reader: new Ext.data.JsonReader(c, c.fields) })); }; -Ext.extend(Ext.data.XmlStore, Ext.data.Store); +Ext.extend(Ext.data.DirectStore, Ext.data.Store); -Ext.reg('xmlstore', Ext.data.XmlStore); + // 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. @@ -11791,6 +12122,8 @@ sortDir : "ASC" }; + + Ext.data.DataReader = function(meta, recordType){ this.meta = meta; @@ -11802,6 +12135,8 @@ }; + + Ext.data.DataProxy = function(){ this.addEvents( @@ -11814,6 +12149,8 @@ Ext.extend(Ext.data.DataProxy, Ext.util.Observable); + + Ext.data.MemoryProxy = function(data){ Ext.data.MemoryProxy.superclass.constructor.call(this); this.data = data; @@ -11842,6 +12179,8 @@ } }); + + Ext.data.HttpProxy = function(conn){ Ext.data.HttpProxy.superclass.constructor.call(this); @@ -11916,6 +12255,8 @@ } }); + + Ext.data.ScriptTagProxy = function(config){ Ext.data.ScriptTagProxy.superclass.constructor.call(this); Ext.apply(this, config); @@ -12040,6 +12381,62 @@ trans.callback.call(trans.scope||window, null, trans.arg, false); } }); + + +Ext.data.DirectProxy = function(config){ + Ext.apply(this, config); + if(typeof this.paramOrder == 'string'){ + this.paramOrder = this.paramOrder.split(/[\s,|]/); + } + Ext.data.DirectProxy.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, { + + paramOrder: undefined, + paramsAsHash: true, + directFn: undefined, + + load: function(params, reader, cb, scope, arg){ + if(this.fireEvent("beforeload", this, params) !== false) { + var args = []; + if(this.paramOrder){ + for(var i = 0, len = this.paramOrder.length; i < len; i++){ + args.push(params[this.paramOrder[i]]); + } + }else if(this.paramsAsHash){ + args.push(params); + } + args.push({ + callback: function(result, e){ + if(!e.success){ + this.fireEvent("loadexception", this, e, result); + cb.call(scope, null, arg, false); + return; + } + var rs; + try { + rs = reader.readRecords(result); + }catch(ex){ + this.fireEvent("loadexception", this, e, result, ex); + cb.call(scope, null, arg, false); + return; + } + this.fireEvent("load", this, e, arg); + cb.call(scope, rs, arg, true); + }, + + scope: this + }); + + this.directFn.apply(window, args); + } else { + cb.call(scope || this, null, arg, false); + } + } +}); + + Ext.data.JsonReader = function(meta, recordType){ meta = meta || {}; @@ -12155,6 +12552,8 @@ }; } }); + + Ext.data.XmlReader = function(meta, recordType){ meta = meta || {}; @@ -12177,7 +12576,7 @@ var root = doc.documentElement || doc; var q = Ext.DomQuery; var recordType = this.recordType, fields = recordType.prototype.fields; - var sid = this.meta.idPath || this.meta.id; + var sid = this.meta.id; var totalRecords = 0, success = true; if(this.meta.totalRecords){ totalRecords = q.selectNumber(this.meta.totalRecords, root, 0); @@ -12211,26 +12610,17 @@ }; } }); + + Ext.data.ArrayReader = Ext.extend(Ext.data.JsonReader, { readRecords : function(o){ - this.arrayData = o; - var s = this.meta; - var sid = s ? (s.idIndex || s.id) : null; + var sid = this.meta ? this.meta.id : null; var recordType = this.recordType, fields = recordType.prototype.fields; var records = []; - - if(!this.getRoot){ - this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;}; - if(s.totalProperty) { - this.getTotal = this.getJsonAccessor(s.totalProperty); - } - } - - var root = this.getRoot(o); - - for(var i = 0; i < root.length; i++){ + 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); @@ -12245,573 +12635,15 @@ record.json = n; records[records.length] = record; } - - var totalRecords = records.length; - - if(s.totalProperty){ - var v = parseInt(this.getTotal(o), 10); - if(!isNaN(v)){ - totalRecords = v; - } - } - - return { + return { records : records, - totalRecords : totalRecords + totalRecords : records.length }; } }); -Ext.Direct = Ext.extend(Ext.util.Observable, { - exceptions: { - TRANSPORT: 'xhr', - PARSE: 'parse', - LOGIN: 'login', - SERVER: 'exception' - }, - constructor: function(){ - this.addEvents('event', 'exception'); - this.transactions = {}; - this.providers = {}; - }, - addProvider : function(provider){ - var a = arguments; - if(a.length > 1){ - for(var i = 0, len = a.length; i < len; i++){ - this.addProvider(a[i]); - } - return; - } - if(!provider.events){ - provider = new Ext.Direct.PROVIDERS[provider.type](provider); - //provider = new Ext.Direct.PROVIDERS[provider.type](provider); - } - provider.id = provider.id || Ext.id; - this.providers[provider.id] = provider; - provider.on('data', this.onProviderData, this); - provider.on('exception', this.onProviderException, this); - - if(!provider.isConnected()){ - provider.connect(); - } - - return provider; - }, - - getProvider : function(id){ - return this.providers[id]; - }, - - removeProvider : function(id){ - var provider = id.id ? id : providers[id.id]; - provider.un('data', this.onProviderData, this); - provider.un('exception', this.onProviderException, this); - delete this.providers[provider.id]; - return provider; - }, - - addTransaction: function(t){ - this.transactions[t.tid] = t; - return t; - }, - - removeTransaction: function(t){ - delete this.transactions[t.tid || t]; - return t; - }, - - getTransaction: function(tid){ - return this.transactions[tid.tid || tid]; - }, - - onProviderData : function(provider, e){ - if(Ext.isArray(e)){ - for(var i = 0, len = e.length; i < len; i++){ - this.onProviderData(provider, e[i]); - } - return; - } - if(e.name && e.name != 'event' && e.name != 'exception'){ - this.fireEvent(e.name, e); - }else if(e.type == 'exception'){ - this.fireEvent('exception', e); - } - this.fireEvent('event', e, provider); - }, - - createEvent : function(response, extraProps){ - return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps)); - } -}); -Ext.Direct = new Ext.Direct(); - -Ext.Direct.TID = 1; -Ext.Direct.PROVIDERS = {}; -Ext.Direct.Transaction = function(config){ - Ext.apply(this, config); - this.tid = ++Ext.Direct.TID; - this.retryCount = 0; -} -Ext.Direct.Transaction.prototype = { - send: function(){ - this.provider.queueTransaction(this); - }, - - retry: function(){ - this.retryCount++; - this.send(); - }, - - getProvider: function(){ - return this.provider; - } -}; -Ext.Direct.Event = function(config){ - Ext.apply(this, config); -} -Ext.Direct.Event.prototype = { - status: true, - getData: function(){ - return this.data; - } -}; - -Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, { - type: 'rpc', - getTransaction: function(){ - return this.transaction || Ext.Direct.getTransaction(this.tid); - } -}); - -Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, { - status: false, - type: 'exception' -}); - -Ext.Direct.eventTypes = { - 'rpc': Ext.Direct.RemotingEvent, - 'event': Ext.Direct.Event, - 'exception': Ext.Direct.ExceptionEvent -}; - - -Ext.direct.Provider = Ext.extend(Ext.util.Observable, { - priority: 1, // lower is higher priority, 0 mens "duplex", aka always on - constructor : function(config){ - Ext.apply(this, config); - this.addEvents('connect', 'disconnect', 'data', 'exception'); - Ext.direct.Provider.superclass.constructor.call(this, config); - }, - - isConnected: function(){ - return false; - }, - - connect: Ext.emptyFn, - disconnect: Ext.emptyFn -}); - -Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, { - parseResponse: function(xhr){ - if(!Ext.isEmpty(xhr.responseText)){ - if(typeof xhr.responseText == 'object'){ - return xhr.responseText; - } - return Ext.decode(xhr.responseText); - } - return null; - }, - - getEvents: function(xhr){ - var data = null; - try{ - data = this.parseResponse(xhr); - }catch(e){ - var event = new Ext.Direct.ExceptionEvent({ - data: e, - xhr: xhr, - code: Ext.Direct.exceptions.PARSE, - message: 'Error parsing json response: \n\n ' + data - }) - return [event]; - } - var events = []; - if(Ext.isArray(data)){ - for(var i = 0, len = data.length; i < len; i++){ - events.push(Ext.Direct.createEvent(data[i])); - } - }else{ - events.push(Ext.Direct.createEvent(data)); - } - return events; - } -}); -Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, { - priority: 3, - interval: 3000, - - constructor : function(config){ - Ext.direct.PollingProvider.superclass.constructor.call(this, config); - this.addEvents('beforepoll', 'poll'); - }, - - isConnected: function(){ - return !!this.pollTask; - }, - - connect: function(){ - if(this.url && !this.pollTask){ - this.pollTask = Ext.TaskMgr.start({ - run: function(){ - if(this.fireEvent('beforepoll', this) !== false){ - if(typeof this.url == 'function'){ - this.url(this.baseParams); - }else{ - Ext.Ajax.request({ - url: this.url, - callback: this.onData, - scope: this, - params: this.baseParams - }); - } - } - }, - interval: this.interval, - scope: this - }); - this.fireEvent('connect', this); - }else if(!this.url){ - throw 'Error initializing PollingProvider, no url configured.'; - } - }, - - disconnect: function(){ - if(this.pollTask){ - Ext.TaskMgr.stop(this.pollTask); - delete this.pollTask; - this.fireEvent('disconnect', this); - } - }, - - onData: function(opt, success, xhr){ - if(success){ - var events = this.getEvents(xhr); - for(var i = 0, len = events.length; i < len; i++){ - var e = events[i]; - this.fireEvent('data', this, e); - } - }else{ - var e = new Ext.Direct.ExceptionEvent({ - data: e, - code: Ext.Direct.exceptions.TRANSPORT, - message: 'Unable to connect to the server.', - xhr: xhr - }); - this.fireEvent('data', this, e); - } - } -}); - -Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider; -Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, { - priority: 1, - enableBuffer: 10, - maxRetries: 1, - - constructor : function(config){ - Ext.direct.RemotingProvider.superclass.constructor.call(this, config); - this.addEvents('beforecall', 'call'); - this.namespace = this.namespace || window; - this.transactions = {}; - this.callBuffer = []; - }, - - initAPI : function(){ - var o = this.actions; - for(var c in o){ - var cls = this.namespace[c] || (this.namespace[c] = {}); - var ms = o[c]; - for(var i = 0, len = ms.length; i < len; i++){ - var m = ms[i]; - cls[m.name] = this.createMethod(c, m); - } - } - }, - - isConnected: function(){ - return !!this.connected; - }, - - connect: function(){ - if(this.url){ - this.initAPI(); - this.connected = true; - this.fireEvent('connect', this); - }else if(!this.url){ - throw 'Error initializing RemotingProvider, no url configured.'; - } - }, - - disconnect: function(){ - if(this.connected){ - this.connected = false; - this.fireEvent('disconnect', this); - } - }, - - onData: function(opt, success, xhr){ - if(success){ - var events = this.getEvents(xhr); - for(var i = 0, len = events.length; i < len; i++){ - var e = events[i]; - var t = e.getTransaction(); - this.fireEvent('data', this, e); - if(t){ - this.doCallback(t, e, true); - Ext.Direct.removeTransaction(t); - } - } - }else{ - var ts = [].concat(opt.ts); - for(var i = 0, len = ts.length; i < len; i++){ - var t = this.getTransaction(opt.ts[i]); - if(t && t.retryCount < this.maxRetries){ - t.retry(); - }else{ - var e = new Ext.Direct.ExceptionEvent({ - data: e, - transaction: t, - code: Ext.Direct.exceptions.TRANSPORT, - message: 'Unable to connect to the server.', - xhr: xhr - }); - this.fireEvent('data', this, e); - if(t){ - this.doCallback(t, e, false); - Ext.Direct.removeTransaction(t); - } - } - } - } - }, - - getCallData: function(t){ - return { - action: t.action, - method: t.method, - data: t.data, - type: 'rpc', - tid: t.tid - }; - }, - - doSend : function(data){ - var o = { - url: this.url, - callback: this.onData, - scope: this - }; - - // send only needed data - var callData; - if(Ext.isArray(data)){ - callData = []; - for(var i = 0, len = data.length; i < len; i++){ - callData.push(this.getCallData(data[i])); - } - }else{ - callData = this.getCallData(data); - } - - if(this.enableUrlEncode){ - var params = {}; - params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData); - o.params = params; - }else{ - o.jsonData = callData; - } - Ext.Ajax.request(o); - }, - - combineAndSend : function(){ - var len = this.callBuffer.length; - if(len > 0){ - this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer); - this.callBuffer = []; - } - }, - - queueTransaction: function(t){ - this.callBuffer.push(t); - if(this.enableBuffer){ - if(!this.callTask){ - this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this); - } - this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10); - }else{ - this.combineAndSend(); - } - }, - - doCall : function(c, m, args){ - var data = null, hs = args[m.len], scope = args[m.len+1]; - - if(m.len !== 0){ - data = args.slice(0, m.len); - } - - var t = new Ext.Direct.Transaction({ - provider: this, - args: args, - action: c, - method: m.name, - data: data, - cb: scope && typeof hs == 'function' ? hs.createDelegate(scope) : hs - }); - - if(this.fireEvent('beforecall', this, t) !== false){ - Ext.Direct.addTransaction(t); - this.queueTransaction(t); - this.fireEvent('call', this, t); - } - }, - - doForm : function(c, m, form, callback, scope){ - var t = new Ext.Direct.Transaction({ - provider: this, - action: c, - method: m.name, - args:[form, callback, scope], - cb: scope && typeof callback == 'function' ? callback.createDelegate(scope) : callback - }); - - if(this.fireEvent('beforecall', this, t) !== false){ - Ext.Direct.addTransaction(t); - - form = Ext.getDom(form); - var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data'; - - var params = { - extTID: t.tid, - extAction: c, - extMethod: m.name, - extUpload: String(isUpload) - }; - if(callback && typeof callback == 'object'){ - Ext.apply(params, callback.params); - } - Ext.Ajax.request({ - url: this.url, - params: params, - callback: this.onData, - scope: this, - form: form, - isUpload: isUpload, - ts: t - }); - } - }, - - createMethod : function(c, m){ - var f; - if(!m.formHandler){ - f = function(){ - this.doCall(c, m, Array.prototype.slice.call(arguments, 0)); - }.createDelegate(this); - }else{ - f = function(form, callback, scope){ - this.doForm(c, m, form, callback, scope); - }.createDelegate(this); - } - f.directCfg = { - action: c, - method: m - }; - return f; - }, - - getTransaction: function(opt){ - return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null; - }, - - doCallback: function(t, e){ - var fn = e.status ? 'success' : 'failure'; - if(t && t.cb){ - var hs = t.cb; - var result = e.result || e.data; - if(typeof hs == 'function'){ - hs(result, e); - } else{ - Ext.callback(hs[fn], hs.scope, [result, e]); - Ext.callback(hs.callback, hs.scope, [result, e]); - } - } - } -}); -Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider; -Ext.data.DirectProxy = function(config){ - Ext.apply(this, config); - if(typeof this.paramOrder == 'string'){ - this.paramOrder = this.paramOrder.split(/[\s,|]/); - } - Ext.data.DirectProxy.superclass.constructor.call(this); -}; - -Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, { - - paramOrder: undefined, - paramsAsHash: true, - directFn: undefined, - - load: function(params, reader, cb, scope, arg){ - if(this.fireEvent("beforeload", this, params) !== false) { - var args = []; - if(this.paramOrder){ - for(var i = 0, len = this.paramOrder.length; i < len; i++){ - args.push(params[this.paramOrder[i]]); - } - }else if(this.paramsAsHash){ - args.push(params); - } - args.push({ - callback: function(result, e){ - if(!e.status){ - this.fireEvent("loadexception", this, e, result); - cb.call(scope, null, arg, false); - return; - } - var rs; - try { - rs = reader.readRecords(result); - }catch(ex){ - this.fireEvent("loadexception", this, e, result, ex); - cb.call(scope, null, arg, false); - return; - } - this.fireEvent("load", this, e, arg); - cb.call(scope, rs, arg, true); - }, - - scope: this - }); - - this.directFn.apply(window, args); - } else { - cb.call(scope || this, null, arg, false); - } - } -}); -Ext.data.DirectStore = function(c){ - var pcfg = Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn'); - Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, { - proxy: new Ext.data.DirectProxy(pcfg), - reader: new Ext.data.JsonReader(c, c.fields) - })); -}; -Ext.extend(Ext.data.DirectStore, Ext.data.Store); - Ext.data.Tree = function(root){ this.nodeHash = {}; @@ -13307,6 +13139,8 @@ } }); + + Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { @@ -13387,7 +13221,71 @@ (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; } }); + + +Ext.ComponentMgr = function(){ + var all = new Ext.util.MixedCollection(); + var types = {}; + var ptypes = {}; + + return { + + register : function(c){ + all.add(c); + }, + + + unregister : function(c){ + all.remove(c); + }, + + + get : function(id){ + return all.get(id); + }, + + + onAvailable : function(id, fn, scope){ + all.on("add", function(index, o){ + if(o.id == id){ + 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); + }, + + registerPlugin : function(ptype, cls){ + ptypes[ptype] = cls; + cls.ptype = ptype; + }, + + createPlugin : function(config, defaultType){ + return new ptypes[config.ptype || defaultType](config); + } + }; +}(); + + +Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down +Ext.preg = Ext.ComponentMgr.registerPlugin; + + + Ext.Component = function(config){ config = config || {}; if(config.initialConfig){ @@ -13584,48 +13482,24 @@ if(this.stateful !== false){ this.initStateEvents(); } - this.initRef(); } return this; }, - initRef : function(){ - if(this.ref){ - var levels = this.ref.split('/'); - var last = levels.length, i = 0; - var t = this; - while(i < last){ - if(t.ownerCt){ - t = t.ownerCt; - } - i++; - } - t[levels[--i]] = this; - } - }, - // private initState : function(config){ if(Ext.state.Manager){ - var id = this.getStateId(); - if(id){ - var state = Ext.state.Manager.get(id); - if(state){ - if(this.fireEvent('beforestaterestore', this, state) !== false){ - this.applyState(state); - this.fireEvent('staterestore', this, state); - } + 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 - getStateId : function(){ - return this.stateId || ((this.id.indexOf('ext-comp-') == 0 || this.id.indexOf('ext-gen') == 0) ? null : this.id); - }, - - // private initStateEvents : function(){ if(this.stateEvents){ for(var i = 0, e; e = this.stateEvents[i]; i++){ @@ -13649,13 +13523,10 @@ // private saveState : function(){ if(Ext.state.Manager){ - var id = this.getStateId(); - if(id){ - var state = this.getState(); - if(this.fireEvent('beforestatesave', this, state) !== false){ - Ext.state.Manager.set(id, state); - this.fireEvent('statesave', this, state); - } + 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); } } }, @@ -13707,7 +13578,7 @@ } if(this.overCls) { this.el.addClassOnOver(this.overCls); - } + } } }, @@ -13958,7 +13829,6 @@ item.on(ename, fn, scope, opt); }, - nextSibling : function(){ if(this.ownerCt){ var index = this.ownerCt.items.indexOf(this); @@ -13969,7 +13839,6 @@ return null; }, - previousSibling : function(){ if(this.ownerCt){ var index = this.ownerCt.items.indexOf(this); @@ -13978,20 +13847,16 @@ } } return null; - }, - - - getBubbleTarget : function(){ - return this.ownerCt; } }); Ext.reg('component', Ext.Component); + + Ext.Action = function(config){ this.initialConfig = config; - this.itemId = config.itemId = (config.itemId || config.id || Ext.id()); this.items = []; } @@ -14106,429 +13971,433 @@ this.initialConfig.handler.apply(this.initialConfig.scope || window, arguments); } }; - -(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 so = this.shadowOffset; - var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; - // only move it if it needs it - var moved = false; - // first validate right/bottom - if((x + w) > vw+s.left){ - x = vw - w - so; - moved = true; - } - if((y + h) > vh+s.top){ - y = vh - h - so; - 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; - }, - - - 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); - } - } -}); + + + +(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 so = this.shadowOffset; + var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; + // only move it if it needs it + var moved = false; + // first validate right/bottom + if((x + w) > vw+s.left){ + x = vw - w - so; + moved = true; + } + if((y + h) > vh+s.top){ + y = vh - h - so; + 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; + }, + + + 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); @@ -14680,6 +14549,8 @@ } }; }(); + + Ext.BoxComponent = Ext.extend(Ext.Component, { @@ -14923,6 +14794,8 @@ }); Ext.reg('spacer', Ext.Spacer); + + Ext.SplitBar = function(dragElement, resizingElement, orientation, placement, existingProxy){ @@ -15033,7 +14906,7 @@ Ext.get(this.proxy).setDisplayed(false); var endPoint = Ext.lib.Event.getXY(e); if(this.overlay){ - Ext.destroy(this.overlay); + this.overlay.remove(); delete this.overlay; } var newSize; @@ -15105,7 +14978,7 @@ this.shim.remove(); } this.dd.unreg(); - Ext.destroy(Ext.get(this.proxy)); + Ext.removeNode(this.proxy); if(removeEl){ this.el.remove(); } @@ -15221,6 +15094,8 @@ Ext.SplitBar.BOTTOM = 4; + + Ext.Container = Ext.extend(Ext.BoxComponent, { @@ -15339,7 +15214,7 @@ if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){ this.items.add(c); c.ownerCt = this; - this.fireEvent(true, 'add', this, c, pos); + this.fireEvent('add', this, c, pos); } return c; }, @@ -15365,7 +15240,7 @@ if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ this.items.insert(index, c); c.ownerCt = this; - this.fireEvent(true, 'add', this, c, index); + this.fireEvent('add', this, c, index); } return c; }, @@ -15407,7 +15282,7 @@ if(this.layout && this.layout.activeItem == c){ delete this.layout.activeItem; } - this.fireEvent(true, 'remove', this, c); + this.fireEvent('remove', this, c); } return c; }, @@ -15432,7 +15307,7 @@ // private createComponent : function(config){ - return Ext.create(config, this.defaultType); + return Ext.ComponentMgr.create(config, this.defaultType); }, @@ -15550,6 +15425,8 @@ Ext.Container.LAYOUTS = {}; Ext.reg('container', Ext.Container); + + Ext.layout.ContainerLayout = function(config){ Ext.apply(this, config); @@ -15677,11 +15554,12 @@ }; }, - destroy : Ext.emptyFn }; Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout; + + Ext.layout.FitLayout = Ext.extend(Ext.layout.ContainerLayout, { // private monitorResize:true, @@ -15703,6 +15581,8 @@ }); Ext.Container.LAYOUTS['fit'] = Ext.layout.FitLayout; + + Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { deferredRender : false, @@ -15734,6 +15614,8 @@ }); Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout; + + Ext.layout.AnchorLayout = Ext.extend(Ext.layout.ContainerLayout, { // private monitorResize:true, @@ -15841,6 +15723,8 @@ }); Ext.Container.LAYOUTS['anchor'] = Ext.layout.AnchorLayout; + + Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { // private monitorResize:true, @@ -15904,6 +15788,8 @@ }); Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout; + + Ext.layout.BorderLayout = Ext.extend(Ext.layout.ContainerLayout, { // private @@ -15953,7 +15839,7 @@ 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 && Ext.layout.BorderLayout.WARN !== false){ + if(!c){ throw 'No center region defined in BorderLayout ' + ct.id; } @@ -15998,21 +15884,22 @@ centerW -= totalWidth; e.applyLayout(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) - }; - c.applyLayout(centerBox); - } + + 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){ // workaround IE strict repainting issue target.repaint(); } @@ -16022,12 +15909,8 @@ var r = ['north', 'south', 'east', 'west']; for (var i = 0; i < r.length; i++) { var region = this[r[i]]; - if(region){ - if(region.destroy){ - region.destroy(); - }else if (region.split){ - region.split.destroy(true); - } + if (region && region.split) { + region.split.destroy(true); } } Ext.layout.BorderLayout.superclass.destroy.call(this); @@ -16082,7 +15965,6 @@ defaultNSCMargins : {left:5,top:5,right:5,bottom:5}, // private defaultEWCMargins : {left:5,top:0,right:5,bottom:0}, - floatingZIndex: 100, isCollapsed : false, @@ -16216,7 +16098,7 @@ } c.hide(); c.dom.style.visibility = 'hidden'; - this.panel.el.setStyle('z-index', this.floatingZIndex); + this.panel.el.setStyle('z-index', 100); }, // private @@ -16370,7 +16252,7 @@ } this.restoreLT = [this.el.dom.style.left, this.el.dom.style.top]; this.el.alignTo(this.collapsedEl, this.getCollapseAnchor()); - this.el.setStyle("z-index", this.floatingZIndex+2); + this.el.setStyle("z-index", 102); if(this.animFloat !== false){ this.beforeSlide(); this.el.slideIn(this.getSlideAnchor(), { @@ -16700,22 +16582,17 @@ getSplitBar : function(){ return this.split; - }, - - // inherit docs - destroy : function() { - Ext.destroy( - this.miniSplitEl, - this.split, - this.splitEl - ); } }); Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout; + + Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { + + labelSeparator : ':', // private @@ -16792,7 +16669,7 @@ // private adjustWidthAnchor : function(value, comp){ - return value - (comp.isFormField || comp.fieldLabel ? (comp.hideLabel ? 0 : this.labelAdjust) : 0); + return value - (comp.isFormField ? (comp.hideLabel ? 0 : this.labelAdjust) : 0); }, // private @@ -16805,6 +16682,8 @@ Ext.Container.LAYOUTS['form'] = Ext.layout.FormLayout; + + Ext.layout.Accordion = Ext.extend(Ext.layout.FitLayout, { fill : true, @@ -16842,7 +16721,7 @@ } if(!this.activeItem && !c.collapsed){ this.activeItem = c; - }else if(this.activeItem && this.activeItem != c){ + }else if(this.activeItem){ c.collapsed = true; } Ext.layout.Accordion.superclass.renderItem.apply(this, arguments); @@ -16887,19 +16766,12 @@ size.height -= hh; item.setSize(size); } - }, - - - setActiveItem : function(item){ - item = this.container.getComponent(item); - this.activeItem = item; - if(item){ - item.expand(); - } } }); Ext.Container.LAYOUTS['accordion'] = Ext.layout.Accordion; + + Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { @@ -17004,6 +16876,8 @@ Ext.Container.LAYOUTS['table'] = Ext.layout.TableLayout; + + Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, { extraCls: 'x-abs-layout-item', isForm: false, @@ -17016,15 +16890,7 @@ }, onLayout : function(ct, target){ - if(this.isForm){ - ct.body.position(); - this.paddingLeft = ct.body.getPadding('r'); - this.paddingTop = ct.body.getPadding('t'); - } else { - target.position(); - this.paddingLeft = target.getPadding('r'); - this.paddingTop = target.getPadding('t'); - } + if(this.isForm){ ct.body.position(); } else { target.position(); } Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); }, @@ -17040,17 +16906,19 @@ // private adjustWidthAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value; + return value ? value - comp.getPosition(true)[0] : value; }, // private adjustHeightAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[1] + this.paddingTop : value; + return value ? value - comp.getPosition(true)[1] : value; } }); Ext.Container.LAYOUTS['absolute'] = Ext.layout.AbsoluteLayout; + + Ext.Viewport = Ext.extend(Ext.Container, { @@ -17084,258 +16952,8 @@ } }); Ext.reg('viewport', Ext.Viewport); -Ext.layout.Box = Ext.extend(Ext.layout.ContainerLayout, { - // private - monitorResize:true, - scrollOffset : 0, - extraCls: 'x-box-item', - ctCls: 'x-box-layout-ct', - innerCls: 'x-box-inner', - defaultMargins : {left:0,top:0,right:0,bottom:0}, - padding:'0', - pack: 'start', - // private - isValidParent : function(c, target){ - return c.getEl().dom.parentNode == this.innerCt.dom; - }, - - // private - onLayout : function(ct, target){ - var cs = ct.items.items, len = cs.length, c, i, last = len-1, cm; - - if(!this.innerCt){ - target.addClass(this.ctCls); - - // the innerCt prevents wrapping and shuffling while - // the container is resizing - this.innerCt = target.createChild({cls:this.innerCls}); - this.padding = this.parseMargins(this.padding); - } - this.renderAll(ct, this.innerCt); - }, - - // private - renderItem : function(c){ - if(typeof c.margins == 'string'){ - c.margins = this.parseMargins(c.margins); - }else if(!c.margins){ - c.margins = this.defaultMargins; - } - Ext.layout.Box.superclass.renderItem.apply(this, arguments); - }, - - getTargetSize : function(target){ - return Ext.isIE && target.dom != Ext.getBody().dom ? target.getStyleSize() : target.getViewSize(); - } - - -}); - -Ext.layout.VBox = Ext.extend(Ext.layout.Box, { - // private - align: 'left', // left, center, stretch, strechmax - pack: 'start', - - // private - onLayout : function(ct, target){ - Ext.layout.VBox.superclass.onLayout.call(this, ct, target); - - var cs = ct.items.items, len = cs.length, c, i, last = len-1, cm; - var size = this.getTargetSize(target); - - if(size.width < 1 && size.height < 1){ // display none? - return; - } - - var w = size.width - target.getPadding('lr') - this.scrollOffset, - h = size.height - target.getPadding('tb'), - l = this.padding.left, t = this.padding.top; - - var stretchWidth = w - (this.padding.left + this.padding.right); - - var totalFlex = 0; - var totalHeight = 0; - - var maxWidth = 0; - - for(i = 0; i < len; i++){ - c = cs[i]; - cm = c.margins; - totalFlex += c.flex || 0; - totalHeight += c.getHeight() + cm.top + cm.bottom; - maxWidth = Math.max(maxWidth, c.getWidth() + cm.left + cm.top); - } - - var innerCtWidth = maxWidth + this.padding.left + this.padding.right; - - switch(this.align){ - case 'stretch': - this.innerCt.setSize(w, h); - break; - case 'stretchmax': - case 'left': - case 'center': - this.innerCt.setSize(w = Math.max(w, innerCtWidth), h); - break; - - } - - var extraHeight = h - totalHeight - this.padding.top - this.padding.bottom; - var allocated = 0; - - var cw, ch, cl, availableWidth = w - this.padding.left - this.padding.right; - - if(this.pack == 'center'){ - t += extraHeight ? extraHeight/2 : 0; - }else if(this.pack == 'end'){ - t += extraHeight; - } - for(i = 0; i < len; i++){ - c = cs[i]; - cm = c.margins; - cw = c.getWidth(); - ch = c.getHeight(); - - t += cm.top; - if(this.align != 'center'){ - cl = l + cm.left; - }else{ - var diff = availableWidth - (cw + cm.left + cm.right); - if(diff == 0){ - cl = l + cm.left; - }else{ - cl = l + cm.left + (diff/2); - } - } - c.setPosition(cl, t); - if(this.pack == 'start' && c.flex){ - var ratio = c.flex/totalFlex; - var add = Math.floor(extraHeight*ratio); - allocated += add; - if(i == last){ - add += (extraHeight-allocated); - } - ch += add; - c.setHeight(ch); - } - if(this.align == 'stretch'){ - c.setWidth((stretchWidth - (cm.left + cm.right)).constrain(c.minWidth || 0, c.maxWidth || 1000000)); - }else if(this.align == 'stretchmax'){ - c.setWidth((maxWidth - (cm.left + cm.right)).constrain(c.minWidth || 0, c.maxWidth || 1000000)); - } - t += ch + cm.bottom; - } - } - -}); - -Ext.Container.LAYOUTS['vbox'] = Ext.layout.VBox; - -Ext.layout.HBox = Ext.extend(Ext.layout.Box, { - // private - align: 'top', // top, middle, stretch, strechmax - pack: 'start', - - // private - onLayout : function(ct, target){ - Ext.layout.HBox.superclass.onLayout.call(this, ct, target); - - var cs = ct.items.items, len = cs.length, c, i, last = len-1, cm; - var size = this.getTargetSize(target); - - if(size.width < 1 && size.height < 1){ // display none? - return; - } - - var w = size.width - target.getPadding('lr') - this.scrollOffset, - h = size.height - target.getPadding('tb'), - l = this.padding.left, t = this.padding.top; - - var stretchHeight = h - (this.padding.top + this.padding.bottom); - - var totalFlex = 0; - var totalWidth = 0; - - var maxHeight = 0; - - for(i = 0; i < len; i++){ - c = cs[i]; - cm = c.margins; - totalFlex += c.flex || 0; - totalWidth += c.getWidth() + cm.left + cm.right; - maxHeight = Math.max(maxHeight, c.getHeight() + cm.top + cm.bottom); - } - - var innerCtHeight = maxHeight + this.padding.top + this.padding.bottom; - - switch(this.align){ - case 'stretch': - this.innerCt.setSize(w, h); - break; - case 'stretchmax': - case 'top': - this.innerCt.setSize(w, innerCtHeight); - break; - case 'middle': - this.innerCt.setSize(w, h = Math.max(h, innerCtHeight)); - break; - - } - - var extraWidth = w - totalWidth - this.padding.left - this.padding.right; - var allocated = 0; - - var cw, ch, ct, availableHeight = h - this.padding.top - this.padding.bottom; - - if(this.pack == 'center'){ - l += extraWidth ? extraWidth/2 : 0; - }else if(this.pack == 'end'){ - l += extraWidth; - } - for(i = 0; i < len; i++){ - c = cs[i]; - cm = c.margins; - cw = c.getWidth(); - ch = c.getHeight(); - - l += cm.left; - if(this.align != 'middle'){ - ct = t + cm.top; - }else{ - var diff = availableHeight - (ch + cm.top + cm.bottom); - if(diff == 0){ - ct = t + cm.top; - }else{ - ct = t + cm.top + (diff/2); - } - } - - c.setPosition(l, ct); - if(this.pack == 'start' && c.flex){ - var ratio = c.flex/totalFlex; - var add = Math.floor(extraWidth*ratio); - allocated += add; - if(i == last){ - add += (extraWidth-allocated); - } - cw += add; - c.setWidth(cw); - } - if(this.align == 'stretch'){ - c.setHeight((stretchHeight - (cm.top + cm.bottom)).constrain(c.minHeight || 0, c.maxHeight || 1000000)); - }else if(this.align == 'stretchmax'){ - c.setHeight((maxHeight - (cm.top + cm.bottom)).constrain(c.minHeight || 0, c.maxHeight || 1000000)); - } - l += cw + cm.right; - } - } - - -}); - -Ext.Container.LAYOUTS['hbox'] = Ext.layout.HBox; Ext.Panel = Ext.extend(Ext.Container, { @@ -17392,7 +17010,6 @@ minButtonWidth:75, - elements : 'body', // protected - these could be used to customize the behavior of the window, @@ -17441,10 +17058,6 @@ 'deactivate' ); - if(this.unstyled){ - this.baseCls = 'x-plain'; - } - // shortcuts if(this.tbar){ this.elements += ',tbar'; @@ -17474,27 +17087,18 @@ } if(this.buttons){ - this.elements += ',footer'; var btns = this.buttons; this.buttons = []; for(var i = 0, len = btns.length; i < len; i++) { if(btns[i].render){ // button instance + btns[i].ownerCt = this; this.buttons.push(btns[i]); - }else if(btns[i].xtype){ - this.buttons.push(Ext.create(btns[i], 'button')); }else{ this.addButton(btns[i]); } } } - if(this.fbar){ - this.elements += ',footer'; - // if default button align and using fbar, align left by default - if(this.buttonAlign == 'right' && this.initialConfig.buttonAlign === undefined){ - this.buttonAlign = 'left'; - } - } if(this.autoLoad){ this.on('render', this.doAutoLoad, this, {delay:10}); } @@ -17515,12 +17119,6 @@ el.className = this[name+'Cls']; this[name] = Ext.get(pnode.appendChild(el)); } - if(this[name+'CssClass']){ - this[name].addClass(this[name+'CssClass']); - } - if(this[name+'Style']){ - this[name].applyStyles(this[name+'Style']); - } } }, @@ -17529,6 +17127,7 @@ 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); @@ -17598,10 +17197,6 @@ } } - if(this.padding !== undefined) { - this.body.setStyle('padding', this.body.addUnits(this.padding)); - } - if(this.border === false){ this.el.addClass(this.baseCls + '-noborder'); this.body.addClass(this.bodyCls + '-noborder'); @@ -17623,6 +17218,10 @@ this.body.addClass(this.bodyCls + '-noborder'); } + if(this.bodyStyle){ + this.body.applyStyles(this.bodyStyle); + } + this.bwrap.enableDisplayMode('block'); if(this.header){ @@ -17666,43 +17265,37 @@ } if(this.buttons && this.buttons.length > 0){ - this.fbar = new Ext.Toolbar({ - items: this.buttons, - toolbarCls: 'x-panel-fbar' - }); - } - if(this.fbar){ - this.fbar = Ext.create(this.fbar, 'toolbar'); - if(this.fbar.items){ - this.fbar.items.each(function(c){ - c.minWidth = this.minButtonWidth; - }, this); + // 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:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>' + }}, 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)); } - this.fbar.toolbarCls = 'x-panel-fbar'; - - var bct = this.footer.createChild({cls: 'x-panel-btns x-panel-btns-'+this.buttonAlign}); - this.fbar.ownerCt = this; - this.fbar.render(bct); - bct.createChild({cls:'x-clear'}); } if(this.tbar && this.topToolbar){ if(Ext.isArray(this.topToolbar)){ this.topToolbar = new Ext.Toolbar(this.topToolbar); }else if(!this.topToolbar.events){ - this.topToolbar = Ext.create(this.topToolbar, 'toolbar'); + this.topToolbar = Ext.ComponentMgr.create(this.topToolbar, 'toolbar'); } - this.topToolbar.ownerCt = this; this.topToolbar.render(this.tbar); + this.topToolbar.ownerCt = this; } if(this.bbar && this.bottomToolbar){ if(Ext.isArray(this.bottomToolbar)){ this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar); }else if(!this.bottomToolbar.events){ - this.bottomToolbar = Ext.create(this.bottomToolbar, 'toolbar'); + this.bottomToolbar = Ext.ComponentMgr.create(this.bottomToolbar, 'toolbar'); } - this.bottomToolbar.ownerCt = this; this.bottomToolbar.render(this.bbar); + this.bottomToolbar.ownerCt = this; } }, @@ -17765,6 +17358,7 @@ Ext.apply(bc, config); } var btn = new Ext.Button(bc); + btn.ownerCt = this; if(!this.buttons){ this.buttons = []; } @@ -17787,46 +17381,30 @@ Ext.Panel.prototype.toolTemplate = tt; } for(var i = 0, a = arguments, len = a.length; i < len; i++) { - var tc = a[i]; - if(!this.tools[tc.id]){ - var overCls = 'x-tool-'+tc.id+'-over'; - var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), 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); + var tc = a[i], overCls = 'x-tool-'+tc.id+'-over'; + var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), 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; } - 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); } + t.addClassOnOver(overCls); } }, - doLayout : function(shallow){ - Ext.Panel.superclass.doLayout.call(this, shallow); - if(this.topToolbar){ - this.topToolbar.doLayout(); - } - if(this.bottomToolbar){ - this.bottomToolbar.doLayout(); - } - if(this.fbar){ - this.fbar.doLayout(); - } - }, - // private onShow : function(){ if(this.floating){ @@ -17856,6 +17434,9 @@ // 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(); } @@ -18039,22 +17620,7 @@ if(w !== undefined || h !== undefined){ if(!this.collapsed){ if(typeof w == 'number'){ - w = this.adjustBodyWidth(w - this.getFrameWidth()); - if(this.tbar){ - this.tbar.setWidth(w); - if(this.topToolbar){ - this.topToolbar.setSize(w); - } - } - if(this.bbar){ - this.bbar.setWidth(w); - if(this.bottomToolbar){ - this.bottomToolbar.setSize(w); - } - } - if(this.fbar){ - this.fbar.setSize(w - this.fbar.container.getFrameWidth('lr')); - } + w = this.adjustBodyWidth(w - this.getFrameWidth()); this.body.setWidth(w); }else if(w == 'auto'){ this.body.setWidth(w); @@ -18062,11 +17628,24 @@ if(typeof h == 'number'){ h = this.adjustBodyHeight(h - this.getFrameHeight()); - this.body.setHeight(h); + this.body.setHeight(h); }else if(h == 'auto'){ this.body.setHeight(h); } + if(this.tbar){ + this.tbar.setWidth(w); + if(this.topToolbar){ + this.topToolbar.setSize(w); + } + } + if(this.bbar){ + this.bbar.setWidth(w); + if(this.bottomToolbar){ + this.bottomToolbar.setSize(w); + } + } + if(this.disabled && this.el._mask){ this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight()); } @@ -18182,19 +17761,12 @@ // private beforeDestroy : function(){ - if(this.header){ - this.header.removeAllListeners(); - if(this.headerAsText){ - Ext.Element.uncache(this.header.child('span')); - } - } Ext.Element.uncache( this.header, this.tbar, this.bbar, this.footer, - this.body, - this.bwrap + this.body ); if(this.tools){ for(var k in this.tools){ @@ -18208,8 +17780,7 @@ } Ext.destroy( this.topToolbar, - this.bottomToolbar, - this.fbar + this.bottomToolbar ); Ext.Panel.superclass.beforeDestroy.call(this); }, @@ -18259,6 +17830,8 @@ }); Ext.reg('panel', Ext.Panel); + + Ext.Window = Ext.extend(Ext.Panel, { @@ -18270,8 +17843,6 @@ - - baseCls : 'x-window', resizable:true, @@ -18360,7 +17931,6 @@ this.mask = this.container.createChild({cls:"ext-el-mask"}, this.el.dom); this.mask.enableDisplayMode("block"); this.mask.hide(); - this.mask.on('click', this.focus, this); } }, @@ -18415,13 +17985,7 @@ // private beforeDestroy : function(){ - this.hide(); - if(this.doAnchor){ - Ext.EventManager.removeResizeListener(this.doAnchor, this); - Ext.EventManager.un(window, 'scroll', this.doAnchor, this); - } Ext.destroy( - this.focusEl, this.resizer, this.dd, this.proxy, @@ -18510,15 +18074,14 @@ focus : function(){ var f = this.focusEl, db = this.defaultButton, t = typeof db; if(t != 'undefined'){ - if(t == 'number' && this.fbar){ - f = this.fbar.items.get(db); + if(t == 'number'){ + f = this.buttons[db]; }else if(t == 'string'){ f = Ext.getCmp(db); }else{ f = db; } } - f = f || this.focusEl; f.focus.defer(10, f); }, @@ -18844,31 +18407,25 @@ }, - anchorTo : function(el, alignment, offsets, monitorScroll){ - if(this.doAnchor){ - Ext.EventManager.removeResizeListener(this.doAnchor, this); - Ext.EventManager.un(window, 'scroll', this.doAnchor, this); - } - this.doAnchor = function(){ - this.alignTo(el, alignment, offsets); - }; - Ext.EventManager.onWindowResize(this.doAnchor, this); - - var tm = typeof monitorScroll; - if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', this.doAnchor, this, - {buffer: tm == 'number' ? monitorScroll : 50}); - } - this.doAnchor(); - 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(e){ + toFront : function(){ if(this.manager.bringToFront(this)){ - if(!e || !e.getTarget().focus){ - this.focus(); - } + this.focus(); } return this; }, @@ -18937,6 +18494,8 @@ } }); + + Ext.WindowGroup = function(){ var list = {}; @@ -19074,6 +18633,8 @@ Ext.WindowMgr = new Ext.WindowGroup(); + + Ext.dd.PanelProxy = function(panel, config){ this.panel = panel; this.id = this.panel.id +'-ddproxy'; @@ -19192,6 +18753,8 @@ this.setDelta(x, y); } }); + + Ext.state.Provider = function(){ @@ -19284,6 +18847,8 @@ }); + + Ext.state.Manager = function(){ var provider = new Ext.state.Provider(); @@ -19316,6 +18881,8 @@ }(); + + Ext.state.CookieProvider = function(config){ Ext.state.CookieProvider.superclass.constructor.call(this); this.path = "/"; @@ -19376,6 +18943,8 @@ ((this.secure == true) ? "; secure" : ""); } }); + + Ext.DataView = Ext.extend(Ext.BoxComponent, { @@ -19853,6 +19422,8 @@ }); Ext.reg('dataview', Ext.DataView); + + Ext.ListView = Ext.extend(Ext.DataView, { itemSelector: 'dl', selectedClass:'x-list-selected', @@ -20018,6 +19589,8 @@ }); Ext.reg('listview', Ext.ListView); + + Ext.ListView.ColumnResizer = Ext.extend(Ext.util.Observable, { minPct: .05, constructor: function(config){ @@ -20132,6 +19705,8 @@ }, 100); } }); + + Ext.ListView.Sorter = Ext.extend(Ext.util.Observable, { sortClasses : ["sort-asc", "sort-desc"], @@ -20186,6 +19761,8 @@ } } }); + + Ext.ColorPalette = function(config){ Ext.ColorPalette.superclass.constructor.call(this, config); @@ -20226,7 +19803,6 @@ '<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>' ); var el = document.createElement("div"); - el.id = this.getId(); el.className = this.itemCls; t.overwrite(el, this.colors); container.dom.insertBefore(el, position); @@ -20274,6 +19850,8 @@ }); Ext.reg('colorpalette', Ext.ColorPalette); + + Ext.DatePicker = Ext.extend(Ext.Component, { todayText : "Today", @@ -20861,25 +20439,19 @@ // private beforeDestroy : function() { if(this.rendered){ - Ext.destroy( - this.leftClickRpt, - this.rightClickRpt, - this.monthPicker, - this.eventEl, - this.mbtn, - this.todayBtn - ); + Ext.destroy(this.mbtn, this.todayBtn); } } }); Ext.reg('datepicker', Ext.DatePicker); + + Ext.TabPanel = Ext.extend(Ext.Panel, { - monitorResize : true, deferredRender : true, @@ -20954,9 +20526,6 @@ this.stack = Ext.TabPanel.AccessStack(); } this.initItems(); - if(this.activeTab !== undefined && typeof this.activeTab != 'object'){ - this.activeTab = this.items.get(this.activeTab); - } }, // private @@ -20986,7 +20555,7 @@ var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null); this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}, beforeEl); this.strip = new Ext.Element(this.stripWrap.dom.firstChild); - + this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge'}); this.strip.createChild({cls:'x-clear'}); @@ -21018,8 +20587,8 @@ // private initEvents : function(){ Ext.TabPanel.superclass.initEvents.call(this); - this.on('add', this.onAdd, this, {target: this}); - this.on('remove', this.onRemove, this, {target: this}); + this.on('add', this.onAdd, this); + this.on('remove', this.onRemove, this); this.strip.on('mousedown', this.onStripMouseDown, this); this.strip.on('contextmenu', this.onStripContextMenu, this); @@ -21108,7 +20677,7 @@ if(item.tabCls){ cls += ' ' + item.tabCls; } - + var p = { id: this.id + this.idDelimiter + item.getItemId(), text: item.title, @@ -21124,8 +20693,6 @@ if(item.tabTip){ Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip; } - item.tabEl = el; - item.on('disable', this.onItemDisabled, this); item.on('enable', this.onItemEnabled, this); item.on('titlechange', this.onItemTitleChanged, this); @@ -21156,7 +20723,7 @@ // private onRemove : function(tp, item){ - Ext.destroy(Ext.get(this.getTabEl(item))); + Ext.removeNode(this.getTabEl(item)); this.stack.remove(item); item.un('disable', this.onItemDisabled, this); item.un('enable', this.onItemEnabled, this); @@ -21516,22 +21083,6 @@ 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'); - }, - - // private - beforeDestroy : function() { - if(this.items){ - this.items.each(function(item){ - if(item && item.tabEl){ - Ext.get(item.tabEl).removeAllListeners(); - item.tabEl = null; - } - }, this); - } - if(this.strip){ - this.strip.removeAllListeners(); - } - Ext.TabPanel.superclass.beforeDestroy.apply(this); } @@ -21579,6 +21130,8 @@ }; + + Ext.Button = Ext.extend(Ext.BoxComponent, { @@ -21705,9 +21258,6 @@ initButtonEl : function(btn, btnEl){ this.el = btn; - if(this.id){ - this.el.dom.id = this.el.id = this.id; - } if(this.icon){ btnEl.setStyle('background-image', 'url(' +this.icon +')'); } @@ -21736,6 +21286,10 @@ 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 : {} @@ -21767,12 +21321,9 @@ // private beforeDestroy: function(){ if(this.rendered){ - var btnEl = this.el.child(this.buttonSelector); - if(btnEl){ - if(this.tooltip){ - Ext.QuickTips.unregister(btnEl); - } - btnEl.removeAllListeners(); + var btn = this.el.child(this.buttonSelector); + if(btn){ + btn.removeAllListeners(); } } if(this.menu){ @@ -22072,6 +21623,8 @@ }; }(); + + Ext.SplitButton = Ext.extend(Ext.Button, { // private arrowSelector : 'em', @@ -22145,6 +21698,8 @@ Ext.reg('splitbutton', Ext.SplitButton); + + Ext.CycleButton = Ext.extend(Ext.SplitButton, { @@ -22259,6 +21814,8 @@ }); Ext.reg('cycle', Ext.CycleButton); + + Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { monitorResize: true, triggerWidth: 16, @@ -22471,8 +22028,12 @@ trackMenus : true, internalDefaults: {removeMode: 'container', hideParent: true}, - toolbarCls: 'x-toolbar', + // private + autoCreate: { + cls:'x-toolbar x-small-editor' + }, + initComponent : function(){ T.superclass.initComponent.call(this); @@ -22481,14 +22042,7 @@ // private onRender : function(ct, position){ - if(!this.el){ - if(!this.autoCreate){ - this.autoCreate = { - cls: this.toolbarCls + ' x-small-editor' - } - } - this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); - } + this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); }, @@ -22516,7 +22070,7 @@ this.addElement(el); }else if(typeof el == "object"){ // must be button config? if(el.xtype){ - this.addItem(Ext.create(el, 'button')); + this.addItem(Ext.ComponentMgr.create(el, 'button')); }else{ this.addButton(el); } @@ -22683,7 +22237,7 @@ T.Separator = Ext.extend(T.Item, { onRender : function(ct, position){ - this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position); + this.el = ct.createChild({tag:'span', cls:'ytb-sep'}, position); } }); Ext.reg('tbseparator', T.Separator); @@ -22691,7 +22245,7 @@ T.Spacer = Ext.extend(T.Item, { onRender : function(ct, position){ - this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position); + this.el = ct.createChild({tag:'div', cls:'ytb-spacer'}, position); } }); Ext.reg('tbspacer', T.Spacer); @@ -22771,6 +22325,8 @@ }); Ext.reg('buttongroup', Ext.ButtonGroup); + + (function() { @@ -22805,7 +22361,6 @@ paramNames : {start: 'start', limit: 'limit'}, - // private constructor: function(config) { var pagingItems = [this.first = new T.Button({ tooltip: this.firstText, @@ -22871,7 +22426,6 @@ this.on('afterlayout', this.onFirstLayout, this, {single: true}); }, - // private onFirstLayout: function(ii) { this.inputItem.el.on({ keydown: {fn: this.onPagingKeydown, scope: this}, @@ -22940,7 +22494,6 @@ this.refresh.enable(); }, - // private readPage : function(d){ var v = this.field.value, pageNum; if (!v || isNaN(pageNum = parseInt(v, 10))) { @@ -22986,7 +22539,6 @@ } }, - // private doLoad : function(start){ var o = {}, pn = this.paramNames; o[pn.start] = start; @@ -23039,20 +22591,14 @@ this.store = store; this.paramNames.start = store.paramNames.start; this.paramNames.limit = store.paramNames.limit; - }, - - // private - onDestroy : function(){ - if(this.store){ - this.unbind(this.store); - } - Ext.PagingToolbar.superclass.onDestroy.call(this); } }); })(); Ext.reg('paging', Ext.PagingToolbar); + + Ext.Resizable = function(el, config){ this.el = Ext.get(el); @@ -23511,26 +23057,22 @@ destroy : function(removeEl){ - if(this.dd){ - this.dd.destroy(); - } + this.proxy.remove(); if(this.overlay){ - Ext.destroy(this.overlay); - this.overlay = null; + this.overlay.removeAllListeners(); + this.overlay.remove(); } - Ext.destroy(this.proxy); - this.proxy = null; - var ps = Ext.Resizable.positions; for(var k in ps){ if(typeof ps[k] != "function" && this[ps[k]]){ - this[ps[k]].destroy(); + var h = this[ps[k]]; + h.el.removeAllListeners(); + h.el.remove(); } } if(removeEl){ this.el.update(""); - Ext.destroy(this.el); - this.el = null; + this.el.remove(); } }, @@ -23577,7 +23119,6 @@ // private Ext.Resizable.Handle.prototype = { - // private afterResize : function(rz){ // do nothing }, @@ -23592,26 +23133,17 @@ // private onMouseOut : function(e){ this.rz.handleOut(this, e); - }, - // private - destroy : function(){ - Ext.destroy(this.el); - this.el = null; - } + } }; + + Ext.Editor = function(field, config){ - if(field.field){ - this.field = Ext.create(field.field, 'textfield'); - config = Ext.apply({}, field); // copy so we don't disturb original config - delete config.field; - }else{ - this.field = field; - } + this.field = field; Ext.Editor.superclass.constructor.call(this, config); }; @@ -23621,7 +23153,6 @@ - value : "", alignment: "c-c?", @@ -23663,13 +23194,10 @@ cls: "x-editor", parentEl : ct, shim : this.shim, - shadowOffset: this.shadowOffset || 4, + shadowOffset:4, id: this.id, constrain: this.constrain }); - if(this.zIndex){ - this.el.setZIndex(this.zIndex); - } this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); if(this.field.msgTarget != 'title'){ this.field.msgTarget = 'qtip'; @@ -23857,11 +23385,13 @@ }, beforeDestroy : function(){ - Ext.destroy(this.field); + this.field.destroy(); this.field = null; } }); Ext.reg('editor', Ext.Editor); + + Ext.MessageBox = function(){ var dlg, opt, mask, waitTimer; @@ -24241,6 +23771,8 @@ Ext.Msg = Ext.MessageBox; + + Ext.Tip = Ext.extend(Ext.Panel, { @@ -24262,8 +23794,6 @@ floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, autoHeight:true, - closeAction: 'hide', - // private initComponent : function(){ Ext.Tip.superclass.initComponent.call(this); @@ -24278,7 +23808,7 @@ if(this.closable){ this.addTool({ id: 'close', - handler: this[this.closeAction], + handler: this.hide, scope: this }); } @@ -24347,6 +23877,8 @@ } }); + + Ext.ToolTip = Ext.extend(Ext.Tip, { @@ -24516,6 +24048,8 @@ } }); + + Ext.QuickTip = Ext.extend(Ext.ToolTip, { @@ -24661,6 +24195,8 @@ } }); + + Ext.QuickTips = function(){ var tip, locks = []; return { @@ -24725,6 +24261,8 @@ } }(); + + Ext.tree.TreePanel = Ext.extend(Ext.Panel, { rootVisible : true, animate: Ext.enableFx, @@ -25103,6 +24641,8 @@ Ext.tree.TreePanel.nodeTypes = {}; Ext.reg('treepanel', Ext.tree.TreePanel); + + Ext.tree.TreeEventModel = function(tree){ this.tree = tree; this.tree.on('render', this.initEvents, this); @@ -25159,10 +24699,6 @@ if(!this.beforeEvent(e)){ return; } - if(Ext.isGecko && !this.trackingDoc){ // prevent hanging in FF - Ext.getBody().on('mouseover', this.trackExit, this); - this.trackingDoc = true; - } if(this.lastEcOver){ // prevent hung highlight this.onIconOut(e, this.lastEcOver); delete this.lastEcOver; @@ -25176,15 +24712,6 @@ } }, - trackExit : function(e){ - if(this.lastOverNode && !e.within(this.lastOverNode.ui.getEl())){ - this.onNodeOut(e, this.lastOverNode); - delete this.lastOverNode; - Ext.getBody().un('mouseover', this.trackExit, this); - this.trackingDoc = false; - } - }, - delegateClick : function(e, t){ if(!this.beforeEvent(e)){ return; @@ -25218,7 +24745,6 @@ }, onNodeOver : function(e, node){ - this.lastOverNode = node; node.ui.onOver(e); }, @@ -25267,6 +24793,8 @@ } }; + + Ext.tree.DefaultSelectionModel = function(config){ this.selNode = null; @@ -25506,6 +25034,8 @@ selectPrevious : Ext.tree.DefaultSelectionModel.prototype.selectPrevious }); + + Ext.tree.TreeNode = function(attributes){ attributes = attributes || {}; if(typeof attributes == "string"){ @@ -25766,7 +25296,7 @@ ensureVisible : function(callback){ var tree = this.getOwnerTree(); - tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){ + tree.expandPath(this.parentNode.getPath(), false, function(){ var node = tree.getNodeById(this.id); // Somehow if we don't do this, we lose changes that happened to node in the meantime tree.getTreeEl().scrollChildIntoView(node.ui.anchor); Ext.callback(callback); @@ -25884,6 +25414,8 @@ Ext.tree.TreePanel.nodeTypes.node = Ext.tree.TreeNode; + + Ext.tree.AsyncTreeNode = function(config){ this.loaded = config && config.loaded === true; this.loading = false; @@ -25964,6 +25496,8 @@ Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode; + + Ext.tree.TreeNodeUI = function(node){ this.node = node; this.rendered = false; @@ -26529,6 +26063,8 @@ expand : Ext.emptyFn }); + + Ext.tree.TreeLoader = function(config){ this.baseParams = {}; Ext.apply(this, config); @@ -26692,6 +26228,8 @@ } }); + + Ext.tree.TreeFilter = function(tree, config){ this.tree = tree; this.filtered = {}; @@ -26781,6 +26319,8 @@ }; + + Ext.tree.TreeSorter = function(tree, config){ @@ -26846,6 +26386,8 @@ } }; + + if(Ext.dd.DropZone){ Ext.tree.TreeDropZone = function(tree, config){ @@ -27105,6 +26647,8 @@ } + + if(Ext.dd.DragZone){ Ext.tree.TreeDragZone = function(tree, config){ Ext.tree.TreeDragZone.superclass.constructor.call(this, tree.getTreeEl(), config); @@ -27166,6 +26710,8 @@ } }); } + + Ext.tree.TreeEditor = function(tree, fc, config){ fc = fc || {}; @@ -27278,6 +26824,8 @@ } } }); + + Ext.menu.Menu = function(config){ if(Ext.isArray(config)){ @@ -27308,7 +26856,7 @@ var mis = this.items; - this.items = new Ext.util.MixedCollection(false, Ext.Container.prototype.getComponentId); + this.items = new Ext.util.MixedCollection(); if(mis){ this.add.apply(this, mis); } @@ -27340,7 +26888,7 @@ shadow:this.shadow, constrain: false, parentEl: this.parentEl || document.body, - zindex: this.zIndex || 15000 + zindex:15000 }); }, @@ -27626,7 +27174,7 @@ remove : function(item){ - this.items.remove(item); + this.items.removeKey(item.id); item.destroy(); }, @@ -27711,6 +27259,8 @@ } } }); + + Ext.menu.MenuMgr = function(){ var menus, active, groups = {}, attached = false, lastShow = new Date(); @@ -27906,6 +27456,8 @@ }; }(); + + Ext.menu.BaseItem = function(config){ Ext.menu.BaseItem.superclass.constructor.call(this, config); @@ -27934,7 +27486,7 @@ hideOnClick : true, - clickHideDelay : 1, + hideDelay : 100, // private ctype: "Ext.menu.BaseItem", @@ -27947,7 +27499,7 @@ this.parentMenu = parentMenu; Ext.menu.BaseItem.superclass.render.call(this, container); - this.container.menuItemId = this.itemId || this.id; + this.container.menuItemId = this.id; }, // private @@ -28000,7 +27552,7 @@ // private handleClick : function(e){ if(this.hideOnClick){ - this.parentMenu.hide.defer(this.clickHideDelay, this.parentMenu, [true]); + this.parentMenu.hide.defer(this.hideDelay, this.parentMenu, [true]); } }, @@ -28014,6 +27566,8 @@ // do nothing } }); + + Ext.menu.TextItem = function(cfg){ if(typeof cfg == 'string'){ @@ -28038,6 +27592,8 @@ Ext.menu.TextItem.superclass.onRender.apply(this, arguments); } }); + + Ext.menu.Separator = function(config){ Ext.menu.Separator.superclass.constructor.call(this, config); @@ -28059,6 +27615,8 @@ Ext.menu.Separator.superclass.onRender.apply(this, arguments); } }); + + Ext.menu.Item = function(config){ Ext.menu.Item.superclass.constructor.call(this, config); @@ -28199,6 +27757,8 @@ } } }); + + Ext.menu.CheckItem = function(config){ Ext.menu.CheckItem.superclass.constructor.call(this, config); @@ -28266,6 +27826,8 @@ Ext.menu.CheckItem.superclass.handleClick.apply(this, arguments); } }); + + Ext.menu.Adapter = function(component, config){ Ext.menu.Adapter.superclass.constructor.call(this, config); @@ -28308,6 +27870,8 @@ Ext.menu.Adapter.superclass.enable.call(this); } }); + + Ext.menu.DateItem = function(config){ Ext.menu.DateItem.superclass.constructor.call(this, new Ext.DatePicker(config), config); @@ -28330,6 +27894,8 @@ Ext.menu.DateItem.superclass.handleClick.call(this); } }); + + Ext.menu.ColorItem = function(config){ Ext.menu.ColorItem.superclass.constructor.call(this, new Ext.ColorPalette(config), config); @@ -28341,6 +27907,8 @@ } }; Ext.extend(Ext.menu.ColorItem, Ext.menu.Adapter); + + Ext.menu.DateMenu = function(config){ Ext.menu.DateMenu.superclass.constructor.call(this, config); @@ -28366,6 +27934,8 @@ this.picker.destroy(); } }); + + Ext.menu.ColorMenu = function(config){ Ext.menu.ColorMenu.superclass.constructor.call(this, config); @@ -28378,6 +27948,8 @@ this.relayEvents(ci, ["select"]); }; Ext.extend(Ext.menu.ColorMenu, Ext.menu.Menu); + + Ext.form.Field = Ext.extend(Ext.BoxComponent, { @@ -28387,7 +27959,6 @@ - invalidClass : "x-form-invalid", invalidText : "The value in this field is invalid", @@ -28481,7 +28052,7 @@ initValue : function(){ if(this.value !== undefined){ this.setValue(this.value); - }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){ + }else if(this.el.dom.value.length > 0 && this.el.dom.value != this.emptyText){ this.setValue(this.el.dom.value); } // reference to original value for reset @@ -28682,11 +28253,6 @@ } }, - // private, does not work for all fields - append :function(v){ - this.setValue([this.getValue(), v].join('')); - }, - // private adjustSize : function(w, h){ var s = Ext.form.Field.superclass.adjustSize.call(this, w, h); @@ -28846,6 +28412,8 @@ }; Ext.reg('field', Ext.form.Field); + + Ext.form.TextField = Ext.extend(Ext.form.Field, { @@ -28987,7 +28555,7 @@ }, applyEmptyText : function(){ - if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){ + if(this.rendered && this.emptyText && this.getRawValue().length < 1){ this.setRawValue(this.emptyText); this.el.addClass(this.emptyClass); } @@ -29118,6 +28686,8 @@ }); Ext.reg('textfield', Ext.form.TextField); + + Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { @@ -29346,6 +28916,8 @@ onTrigger2Click : Ext.emptyFn }); Ext.reg('trigger', Ext.form.TriggerField); + + Ext.form.TextArea = Ext.extend(Ext.form.TextField, { @@ -29434,6 +29006,8 @@ } }); Ext.reg('textarea', Ext.form.TextArea); + + Ext.form.NumberField = Ext.extend(Ext.form.TextField, { @@ -29541,6 +29115,8 @@ } }); Ext.reg('numberfield', Ext.form.NumberField); + + Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { @@ -29578,7 +29154,7 @@ if(typeof this.maxValue == "string"){ this.maxValue = this.parseDate(this.maxValue); } - this.disabledDatesRE = null; + this.ddMatch = null; this.initDisabledDays(); }, @@ -29662,7 +29238,7 @@ } } var fvalue = this.formatDate(value); - if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){ + if(this.ddMatch && this.ddMatch.test(fvalue)){ this.markInvalid(String.format(this.disabledDatesText, fvalue)); return false; } @@ -29748,7 +29324,7 @@ Ext.apply(this.menu.picker, { minDate : this.minValue, maxDate : this.maxValue, - disabledDatesRE : this.disabledDatesRE, + disabledDatesRE : this.ddMatch, disabledDatesText : this.disabledDatesText, disabledDays : this.disabledDays, disabledDaysText : this.disabledDaysText, @@ -29779,54 +29355,8 @@ }); Ext.reg('datefield', Ext.form.DateField); -Ext.form.DisplayField = Ext.extend(Ext.form.Field, { - validationEvent : false, - validateOnBlur : false, - defaultAutoCreate : {tag: "div"}, - fieldClass : "x-form-display-field", - htmlEncode: false, - // private - initEvents : function(){}, - - isValid : function(){ - return true; - }, - - validate : function(){ - return true; - }, - - getRawValue : function(){ - var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, ''); - if(v === this.emptyText){ - v = ''; - } - if(this.htmlEncode){ - v = Ext.util.Format.htmlDecode(v); - } - return v; - }, - - getValue : function(){ - return this.getRawValue(); - }, - - setRawValue : function(v){ - if(this.htmlEncode){ - v = Ext.util.Format.htmlEncode(v); - } - return this.rendered ? (this.el.dom.innerHTML = (v === null || v === undefined ? '' : v)) : (this.value = v); - }, - - setValue : function(v){ - this.setRawValue(v); - } -}); - -Ext.reg('displayfield', Ext.form.DisplayField); - Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { @@ -30166,13 +29696,11 @@ // private onDestroy : function(){ if(this.view){ - Ext.destroy(this.view); + this.view.el.removeAllListeners(); + this.view.el.remove(); + this.view.purgeListeners(); } if(this.list){ - if(this.innerList){ - this.innerList.un('mouseover', this.onViewOver, this); - this.innerList.un('mousemove', this.onViewMove, this); - } this.list.destroy(); } this.bindStore(null); @@ -30591,6 +30119,8 @@ }); Ext.reg('combo', Ext.form.ComboBox); + + Ext.form.Checkbox = Ext.extend(Ext.form.Field, { @@ -30793,6 +30323,8 @@ }); Ext.reg('checkbox', Ext.form.Checkbox); + + Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { @@ -30983,6 +30515,8 @@ Ext.reg('checkboxgroup', Ext.form.CheckboxGroup); + + Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { // private @@ -31035,6 +30569,8 @@ }); Ext.reg('radio', Ext.form.Radio); + + Ext.form.RadioGroup = Ext.extend(Ext.form.CheckboxGroup, { @@ -31052,6 +30588,8 @@ Ext.reg('radiogroup', Ext.form.RadioGroup); + + Ext.form.Hidden = Ext.extend(Ext.form.Field, { // private inputType : 'hidden', @@ -31076,6 +30614,8 @@ clearInvalid : Ext.emptyFn }); Ext.reg('hidden', Ext.form.Hidden); + + Ext.form.BasicForm = function(el, config){ Ext.apply(this, config); @@ -31412,6 +30952,8 @@ // back compat Ext.BasicForm = Ext.form.BasicForm; + + Ext.FormPanel = Ext.extend(Ext.Panel, { @@ -31432,13 +30974,9 @@ monitorPoll : 200, - layout:'form', - // private initComponent :function(){ this.form = this.createForm(); - Ext.FormPanel.superclass.initComponent.call(this); - this.bodyCfg = { tag: 'form', cls: this.baseCls + '-body', @@ -31448,8 +30986,9 @@ if(this.fileUpload) { this.bodyCfg.enctype = 'multipart/form-data'; } - this.initItems(); - + + Ext.FormPanel.superclass.initComponent.call(this); + this.addEvents( 'clientvalidation' @@ -31612,6 +31151,8 @@ + + Ext.form.FieldSet = Ext.extend(Ext.Panel, { @@ -31664,14 +31205,6 @@ onCheckClick : function(){ this[this.checkbox.dom.checked ? 'expand' : 'collapse'](); - }, - - // private - beforeDestroy : function(){ - if(this.checkbox){ - this.checkbox.un('click', this.onCheckClick, this); - } - Ext.form.FieldSet.superclass.beforeDestroy.call(this); } @@ -31717,6 +31250,8 @@ + + Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { enableFormat : true, @@ -31988,15 +31523,6 @@ }); this.tb.doLayout(); - this.createIFrame(); - - if(!this.width){ - var sz = this.el.getSize(); - this.setSize(sz.width, this.height || sz.height); - } - }, - - createIFrame: function(){ var iframe = document.createElement('iframe'); iframe.name = Ext.id(); iframe.frameBorder = '0'; @@ -32006,7 +31532,7 @@ this.iframe = iframe; this.initFrame(); - + if(this.autoMonitorDesignMode !== false){ this.monitorTask = Ext.TaskMgr.start({ run: this.checkDesignMode, @@ -32014,6 +31540,11 @@ interval:100 }); } + + if(!this.width){ + var sz = this.el.getSize(); + this.setSize(sz.width, this.height || sz.height); + } }, initFrame : function(){ @@ -32606,6 +32137,8 @@ }); Ext.reg('htmleditor', Ext.form.HtmlEditor); + + Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { minValue : null, @@ -32699,6 +32232,8 @@ }); Ext.reg('timefield', Ext.form.TimeField); + + Ext.form.Label = Ext.extend(Ext.BoxComponent, { @@ -32729,6 +32264,8 @@ }); Ext.reg('label', Ext.form.Label); + + Ext.form.Action = function(form, options){ this.form = form; @@ -32961,6 +32498,8 @@ 'submit' : Ext.form.Action.Submit }; + + Ext.form.VTypes = function(){ // closure these in so they are only created once. @@ -33007,6 +32546,8 @@ }; }(); + + Ext.grid.GridPanel = Ext.extend(Ext.Panel, { @@ -33206,7 +32747,7 @@ } } } - if(state.sort && this.store){ + if(state.sort){ this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction); } }, @@ -33222,11 +32763,9 @@ o.columns[i].hidden = true; } } - if(this.store){ - var ss = this.store.getSortState(); - if(ss){ - o.sort = ss; - } + var ss = this.store.getSortState(); + if(ss){ + o.sort = ss; } return o; }, @@ -33466,6 +33005,8 @@ }); Ext.reg('grid', Ext.grid.GridPanel); + + Ext.grid.GridView = function(config){ Ext.apply(this, config); @@ -33737,7 +33278,7 @@ // private removeRow : function(row){ Ext.removeNode(this.getRow(row)); - this.syncFocusEl(row); + this.focusRow(row); }, // private @@ -33746,7 +33287,7 @@ for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ Ext.removeNode(bd.childNodes[firstRow]); } - this.syncFocusEl(firstRow); + this.focusRow(firstRow); }, // scrolling stuff @@ -33807,16 +33348,13 @@ hd.style.width = ws[i]; } - var ns = this.getRows(), row, trow; + var ns = this.getRows(); for(var i = 0, len = ns.length; i < len; i++){ - row = ns[i]; - row.style.width = tw; - if(row.firstChild){ - row.firstChild.style.width = tw; - trow = row.firstChild.rows[0]; - for (var j = 0; j < clen; j++) { - trow.childNodes[j].style.width = ws[j]; - } + 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]; } } @@ -33832,14 +33370,11 @@ var hd = this.getHeaderCell(col); hd.style.width = w; - var ns = this.getRows(), row; + var ns = this.getRows(); for(var i = 0, len = ns.length; i < len; i++){ - row = ns[i]; - row.style.width = tw; - if(row.firstChild){ - row.firstChild.style.width = tw; - row.firstChild.rows[0].childNodes[col].style.width = w; - } + 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); @@ -33856,14 +33391,11 @@ var hd = this.getHeaderCell(col); hd.style.display = display; - var ns = this.getRows(), row; + var ns = this.getRows(); for(var i = 0, len = ns.length; i < len; i++){ - row = ns[i]; - row.style.width = tw; - if(row.firstChild){ - row.firstChild.style.width = tw; - row.firstChild.rows[0].childNodes[col].style.display = display; - } + 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); @@ -33940,9 +33472,6 @@ }, afterRender: function(){ - if(!this.ds || !this.cm){ - return; - } this.mainBody.dom.innerHTML = this.renderRows(); this.processRows(0, true); @@ -34006,11 +33535,6 @@ //g.on("headercontextmenu", this.handleHdCtx, this); } - if(g.trackMouseOver){ - this.mainBody.on("mouseover", this.onRowOver, this); - this.mainBody.on("mouseout", this.onRowOut, this); - } - if(g.enableDragDrop || g.enableDrag){ this.dragZone = new Ext.grid.GridDragZone(g, { ddGroup : g.ddGroup || 'GridDD' @@ -34034,7 +33558,6 @@ if(vw < 20 || csize.height < 20){ // display: none? return; } - if(g.autoHeight){ this.scroller.dom.style.overflow = 'visible'; }else{ @@ -34106,7 +33629,7 @@ var cm = this.cm, ts = this.templates; var ct = ts.hcell; - var cb = [], p = {}; + var cb = [], sb = [], p = {}; for(var i = 0, len = cm.getColumnCount(); i < len; i++){ p.id = cm.getColumnId(i); @@ -34153,7 +33676,10 @@ focusCell : function(row, col, hscroll){ - this.syncFocusEl(this.ensureVisible(row, col, hscroll)); + row = Math.min(row, Math.max(0, this.getRows().length-1)); + var xy = this.ensureVisible(row, col, hscroll); + this.focusEl.setXY(xy||this.scroller.getXY()); + if(Ext.isGecko){ this.focusEl.focus(); }else{ @@ -34161,15 +33687,16 @@ } }, - resolveCell : function(row, col, hscroll){ - if(typeof row != "number"){ + // private + ensureVisible : function(row, col, hscroll){ + if(typeof row != "number"){ row = row.rowIndex; } if(!this.ds){ - return null; + return; } if(row < 0 || row >= this.ds.getCount()){ - return null; + return; } col = (col !== undefined ? col : 0); @@ -34180,37 +33707,12 @@ } cellEl = this.getCell(row, col); } + if(!rowEl){ + return; + } - return {row: rowEl, cell: cellEl}; - }, + var c = this.scroller.dom; - getResolvedXY : function(resolved){ - if(!resolved){ - return null; - } - var s = this.scroller.dom, c = resolved.cell, r = resolved.row; - return c ? Ext.fly(c).getXY() : [s.scrollLeft+this.el.getX(), Ext.fly(r).getY()]; - }, - - syncFocusEl : function(row, col, hscroll){ - var xy = row; - if(!Ext.isArray(xy)){ - row = Math.min(row, Math.max(0, this.getRows().length-1)); - xy = this.getResolvedXY(this.resolveCell(row, col, hscroll)); - } - this.focusEl.setXY(xy||this.scroller.getXY()); - }, - - ensureVisible : function(row, col, hscroll){ - var resolved = this.resolveCell(row, col, hscroll); - if(!resolved || !resolved.row){ - return; - } - - var rowEl = resolved.row, cellEl = resolved.cell; - - var c = this.scroller.dom; - var ctop = 0; var p = rowEl, stop = this.el.dom; while(p && p != stop){ @@ -34225,7 +33727,7 @@ var stop = parseInt(c.scrollTop, 10); var sbot = stop + ch; - if(ctop < stop){ + if(ctop < stop){ c.scrollTop = ctop; }else if(cbot > sbot){ c.scrollTop = cbot-ch; @@ -34243,7 +33745,7 @@ c.scrollLeft = cright-c.clientWidth; } } - return this.getResolvedXY(resolved); + return cellEl ? Ext.fly(cellEl).getXY() : [c.scrollLeft+this.el.getX(), Ext.fly(rowEl).getY()]; }, // private @@ -34266,7 +33768,7 @@ this.processRows(firstRow); } } - this.syncFocusEl(firstRow); + this.focusRow(firstRow); }, // private @@ -34313,7 +33815,7 @@ // private fitColumns : function(preventRefresh, onlyExpand, omitColumn){ - var cm = this.cm, i; + var cm = this.cm, leftOver, dist, i; var tw = cm.getTotalWidth(false); var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; @@ -34439,6 +33941,7 @@ }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); @@ -34490,13 +33993,15 @@ // private destroy : function(){ if(this.colMenu){ + this.colMenu.removeAll(); Ext.menu.MenuMgr.unregister(this.colMenu); - this.colMenu.destroy(); + this.colMenu.getEl().remove(); delete this.colMenu; } if(this.hmenu){ + this.hmenu.removeAll(); Ext.menu.MenuMgr.unregister(this.hmenu); - this.hmenu.destroy(); + this.hmenu.getEl().remove(); delete this.hmenu; } if(this.grid.enableColumnMove){ @@ -34520,16 +34025,11 @@ } } + Ext.destroy(this.resizeMarker, this.resizeProxy); + if(this.dragZone){ this.dragZone.unreg(); } - - Ext.fly(this.innerHd).removeAllListeners(); - Ext.removeNode(this.innerHd); - - Ext.destroy(this.resizeMarker, this.resizeProxy, this.focusEl, this.mainBody, - this.scroller, this.mainHd, this.mainWrap, this.dragZone, - this.splitone, this.columnDrag, this.columnDrop); this.initData(null, null); Ext.EventManager.removeResizeListener(this.onWindowResize, this); @@ -34599,13 +34099,13 @@ onDataChange : function(){ this.refresh(); this.updateHeaderSortState(); - this.syncFocusEl(0); + this.focusRow(0); }, // private onClear : function(){ this.refresh(); - this.syncFocusEl(0); + this.focusRow(0); }, // private @@ -34671,10 +34171,16 @@ // 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 @@ -34697,7 +34203,7 @@ // private onRowOut : function(e, t){ var row; - if((row = this.findRowIndex(t)) !== false && !e.within(this.getRow(row), true)){ + if((row = this.findRowIndex(t)) !== false && row !== this.findRowIndex(e.getRelatedTarget())){ this.removeRowClass(row, "x-grid3-row-over"); } }, @@ -34744,7 +34250,6 @@ this.updateAllColumnWidths(); }else{ this.updateColumnWidth(i, w); - this.syncHeaderScroll(); } this.grid.fireEvent("columnresize", i, w); @@ -34911,7 +34416,7 @@ 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]; + var exy = e.getXY(), ex = exy[0], ey = exy[1]; var w = t.offsetWidth, adjust = false; if((ex - x) <= this.hw){ adjust = -1; @@ -34960,6 +34465,8 @@ }); + + Ext.grid.GroupingView = Ext.extend(Ext.grid.GridView, { hideGroupedColumn:false, @@ -35332,6 +34839,8 @@ }); // private Ext.grid.GroupingView.GROUP_ID = 1000; + + // private // This is a support class used internally by the Grid components Ext.grid.HeaderDragZone = function(grid, hd, hd2){ @@ -35543,6 +35052,8 @@ Ext.grid.GridView.ColumnDragZone.superclass.handleMouseDown.call(this, e); } }); + + // private // This is a support class used internally by the Grid components Ext.grid.SplitDragZone = function(grid, hd, hd2){ @@ -35599,6 +35110,8 @@ this.setDelta(0,0); } }); + + Ext.grid.GridDragZone = function(grid, config){ this.view = grid.getView(); @@ -35662,9 +35175,17 @@ } }); + + Ext.grid.ColumnModel = function(config){ + this.defaultWidth = 100; + + + this.defaultSortable = false; + + if(config.columns){ Ext.apply(this, config); this.setConfig(config.columns, true); @@ -35689,9 +35210,7 @@ }; Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { - defaultWidth: 100, - defaultSortable: false, @@ -35706,18 +35225,12 @@ - - getColumnId : function(index){ return this.config[index].id; }, - getColumnAt : function(index){ - return this.config[index]; - }, - setConfig : function(config, initial){ if(!initial){ // cleanup @@ -35734,11 +35247,15 @@ // if no id, create one for(var i = 0, len = config.length; i < len; i++){ var c = config[i]; - if(!c.isColumn){ - var cls = Ext.grid.Column.types[c.xtype || 'gridcolumn']; - c = new cls(c); - config[i] = c; + if(typeof c.renderer == "string"){ + c.renderer = Ext.util.Format[c.renderer]; } + if(typeof c.id == "undefined"){ + c.id = 'xgc'+i; + } + if(c.editor && c.editor.isFormField){ + c.editor = new Ext.grid.GridEditor(c.editor); + } this.lookup[c.id] = c; } if(!initial){ @@ -35933,7 +35450,7 @@ getCellEditor : function(colIndex, rowIndex){ - return this.config[colIndex].getCellEditor(rowIndex); + return this.config[colIndex].editor; }, @@ -35983,6 +35500,8 @@ + + Ext.grid.AbstractSelectionModel = function(){ this.locked = false; Ext.grid.AbstractSelectionModel.superclass.constructor.call(this); @@ -36010,6 +35529,8 @@ return this.locked; } }); + + Ext.grid.RowSelectionModel = function(config){ Ext.apply(this, config); @@ -36378,6 +35899,8 @@ } } }); + + Ext.grid.CellSelectionModel = function(config){ Ext.apply(this, config); @@ -36565,6 +36088,8 @@ } } }); + + Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { @@ -36581,7 +36106,7 @@ // private trackMouseOver: false, // causes very odd FF errors - + // private initComponent : function(){ Ext.grid.EditorGridPanel.superclass.initComponent.call(this); @@ -36606,7 +36131,7 @@ // private initEvents : function(){ Ext.grid.EditorGridPanel.superclass.initEvents.call(this); - + this.on("bodyscroll", this.stopEditing, this, [true]); if(this.clicksToEdit == 1){ @@ -36694,9 +36219,6 @@ if(this.fireEvent("beforeedit", e) !== false && !e.cancel){ this.editing = true; var ed = this.colModel.getCellEditor(col, row); - if(!ed){ - return; - } if(!ed.rendered){ ed.render(this.view.getEditorParent(ed)); } @@ -36706,26 +36228,25 @@ ed.record = r; ed.on("complete", this.onEditComplete, this, {single: true}); ed.on("specialkey", this.selModel.onEditorKey, this.selModel); - this.activeEditor = ed; var v = this.preEditValue(r, field); - ed.startEdit(this.view.getCell(row, col).firstChild, v === undefined ? '' : v); + ed.startEdit(this.view.getCell(row, col).firstChild, v); }).defer(50, this); } } }, - + // private preEditValue : function(r, field){ var value = r.data[field]; return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value; }, - + // private postEditValue : function(value, originalValue, r, field){ return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value; }, - + stopEditing : function(cancel){ if(this.activeEditor){ @@ -36733,7 +36254,7 @@ } this.activeEditor = null; }, - + // private onDestroy: function() { if(this.rendered){ @@ -36747,6 +36268,8 @@ } }); Ext.reg('editorgrid', Ext.grid.EditorGridPanel); + + // private // This is a support class used internally by the Grid components Ext.grid.GridEditor = function(field, config){ @@ -36762,6 +36285,8 @@ shim:false, shadow:false }); + + Ext.grid.PropertyRecord = Ext.data.Record.create([ {name:'name',type:'string'}, 'value' @@ -37007,101 +36532,35 @@ }); Ext.reg("propertygrid", Ext.grid.PropertyGrid); + + Ext.grid.Column = function(config){ Ext.apply(this, config); if(typeof this.renderer == "string"){ - this.renderer = Ext.util.Format[this.renderer]; + this.renderer = Ext.util.Format[c.renderer]; } if(typeof this.id == "undefined"){ this.id = ++Ext.grid.Column.AUTO_ID; } - if(this.editor){ - if(this.editor.xtype && !this.editor.events){ - this.editor = Ext.create(this.editor, 'textfield'); - } + if(this.editor && this.editor.isFormField){ + this.editor = new Ext.grid.GridEditor(this.editor); } } Ext.grid.Column.AUTO_ID = 0; Ext.grid.Column.prototype = { - isColumn : true, renderer : function(value){ if(typeof value == "string" && value.length < 1){ return " "; } return value; - }, - - getEditor: function(rowIndex){ - return this.editable !== false ? this.editor : null; - }, - - getCellEditor: function(rowIndex){ - var editor = this.getEditor(rowIndex); - if(editor){ - if(!editor.startEdit){ - if(!editor.gridEditor){ - editor.gridEditor = new Ext.grid.GridEditor(editor); - } - return editor.gridEditor; - }else if(editor.startEdit){ - return editor; - } - } - return null; } -}; +}; -Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, { - renderer : function(value){ - if(value === undefined){ - return " "; - } - if(!value || value === 'false'){ - return "false"; - } - return 'true'; - } -}); -Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, { - format : '0,000.00', - constructor: function(cfg){ - this.supr().constructor.apply(this, arguments); - this.renderer = Ext.util.Format.numberRenderer(this.format); - } -}); -Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, { - format : 'm/d/Y', - constructor: function(cfg){ - this.supr().constructor.apply(this, arguments); - this.renderer = Ext.util.Format.dateRenderer(this.format); - } -}); - -Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, { - constructor: function(cfg){ - this.supr().constructor.apply(this, arguments); - var tpl = typeof this.tpl == 'object' ? this.tpl : new Ext.XTemplate(this.tpl); - this.renderer = function(value, p, r){ - return tpl.apply(r.data); - } - this.tpl = tpl; - } -}); - - -Ext.grid.Column.types = { - gridcolumn : Ext.grid.Column, - booleancolumn: Ext.grid.BooleanColumn, - numbercolumn: Ext.grid.NumberColumn, - datecolumn: Ext.grid.DateColumn, - templatecolumn: Ext.grid.TemplateColumn -}; - Ext.grid.RowNumberer = function(config){ Ext.apply(this, config); if(this.rowspan){ @@ -37133,6 +36592,8 @@ } }; + + Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { header: '<div class="x-grid3-hd-checker"> </div>', @@ -37203,6 +36664,8 @@ return '<div class="x-grid3-row-checker"> </div>'; } }); + + Ext.LoadMask = function(el, config){ this.el = Ext.get(el); @@ -37280,6 +36743,8 @@ } }; + + Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { baseCls : 'x-progress', @@ -37445,6 +36910,8 @@ } }); Ext.reg('progress', Ext.ProgressBar); + + Ext.debug = {}; (function(){ @@ -37930,6 +37397,8 @@ + + var deconcept = deconcept || {}; if(typeof deconcept.util == "undefined" || !deconcept.util){ @@ -38204,6 +37673,8 @@ deconcept.unloadSet = true; } } + + Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { flashVersion : '9.0.45', backgroundColor: '#ffffff', @@ -38278,6 +37749,8 @@ }); Ext.reg('flash', Ext.FlashComponent); + + Ext.FlashEventProxy = { onEvent : function(id, e){ var fp = Ext.getCmp(id); @@ -38289,6 +37762,8 @@ } } + + Ext.Slider = Ext.extend(Ext.BoxComponent, { @@ -38590,6 +38065,8 @@ } } }; + + Ext.util.Cookies = { set : function(name, value){ var argv = arguments; @@ -38632,6 +38109,8 @@ return unescape(document.cookie.substring(offset, endstr)); } }; + + Ext.chart.Chart = Ext.extend(Ext.FlashComponent, { url: "http:/"+"/yui.yahooapis.com/2.5.1/build/charts/assets/charts.swf", refreshBuffer: 100, @@ -39050,6 +38529,8 @@ + + Ext.History = (function () { var iframe, hiddenField; var ready = false; @@ -39122,7 +38603,7 @@ } function startUp() { - currentToken = hiddenField.value ? hiddenField.value : getHash(); + currentToken = hiddenField.value; if (Ext.isIE) { checkIFrame(); Modified: mickael/trunk/ext/v3.0.0-a1/ext-all-detail.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/ext-all-detail.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/ext-all-detail.js 2008-12-01 20:55:57 UTC (rev 32) @@ -50,12 +50,12 @@ includeFile('source/util/Observable.js'); //ext core - required as of 08/30/2008 includeFile('source/core/EventManager.js'); //ext core - required as of 08/30/2008 includeFile('source/core/Element.js'); //ext core - required as of 08/30/2008 + includeFile('source/core/Element.scroll.js'); //ext core + includeFile('source/core/Element.keys.js'); //ext core + includeFile('source/core/Element.insertion.js'); //ext core + includeFile('source/core/Element.dd.js'); //ext core includeFile('source/core/Element.alignment.js'); //ext core - includeFile('source/core/Element.dd.js'); //ext core - includeFile('source/core/Element.insertion.js'); //ext core - includeFile('source/core/Element.keys.js'); //ext core - includeFile('source/core/Element.legacy.js'); //ext core - includeFile('source/core/Element.scroll.js'); //ext core +// includeFile('source/core/Element.legacy.js'); //ext core includeFile('source/core/Fx.js'); //ext core - required as of 08/30/2008 includeFile('source/core/CompositeElement.js'); //ext core - required as of 08/30/2008 includeFile('source/data/Connection.js'); @@ -86,21 +86,28 @@ includeFile('source/data/Record.js'); includeFile('source/data/StoreMgr.js'); includeFile('source/data/Store.js'); - includeFile('source/data/SimpleStore.js'); +// includeFile('source/data/SimpleStore.js'); includeFile('source/data/JsonStore.js'); includeFile('source/data/XmlStore.js'); + includeFile('source/data/ArrayStore.js'); includeFile('source/data/DataField.js'); includeFile('source/data/DataReader.js'); includeFile('source/data/DataProxy.js'); - includeFile('source/data/Direct.js'); - includeFile('source/data/DirectProxy.js'); - includeFile('source/data/DirectStore.js'); includeFile('source/data/MemoryProxy.js'); includeFile('source/data/HttpProxy.js'); includeFile('source/data/ScriptTagProxy.js'); includeFile('source/data/JsonReader.js'); includeFile('source/data/XmlReader.js'); includeFile('source/data/ArrayReader.js'); + includeFile('source/direct/Direct.js'); + includeFile('source/direct/Transaction.js'); + includeFile('source/direct/Event.js'); +// includeFile('source/direct/Provider.js'); +// includeFile('source/direct/JsonProvider.js'); +// includeFile('source/direct/PollingProvider.js'); +// includeFile('source/direct/RemotingProvider.js'); + includeFile('source/data/DirectProxy.js'); + includeFile('source/data/DirectStore.js'); includeFile('source/data/Tree.js'); includeFile('source/data/GroupingStore.js'); includeFile('source/widgets/Component.js'); //core components - 08/30/2008 - needed for widgets @@ -116,12 +123,12 @@ includeFile('source/widgets/layout/AnchorLayout.js'); includeFile('source/widgets/layout/ColumnLayout.js'); includeFile('source/widgets/layout/BorderLayout.js'); - includeFile('source/widgets/layout/BoxLayout.js'); includeFile('source/widgets/layout/FormLayout.js'); includeFile('source/widgets/layout/AccordionLayout.js'); includeFile('source/widgets/layout/TableLayout.js'); includeFile('source/widgets/layout/AbsoluteLayout.js'); includeFile('source/widgets/Viewport.js'); + includeFile('source/widgets/layout/BoxLayout.js'); includeFile('source/widgets/Panel.js'); includeFile('source/widgets/Window.js'); includeFile('source/widgets/WindowManager.js'); @@ -178,6 +185,7 @@ includeFile('source/widgets/form/TextArea.js'); includeFile('source/widgets/form/NumberField.js'); includeFile('source/widgets/form/DateField.js'); + includeFile('source/widgets/form/DisplayField.js'); includeFile('source/widgets/form/Combo.js'); includeFile('source/widgets/form/Checkbox.js'); includeFile('source/widgets/form/CheckboxGroup.js'); @@ -195,7 +203,6 @@ includeFile('source/widgets/grid/GridPanel.js'); includeFile('source/widgets/grid/GridView.js'); includeFile('source/widgets/grid/GroupingView.js'); - includeFile('source/widgets/grid/Column.js'); includeFile('source/widgets/grid/ColumnDD.js'); includeFile('source/widgets/grid/ColumnSplitDD.js'); includeFile('source/widgets/grid/GridDD.js'); @@ -206,6 +213,7 @@ includeFile('source/widgets/grid/EditorGrid.js'); includeFile('source/widgets/grid/GridEditor.js'); includeFile('source/widgets/grid/PropertyGrid.js'); + includeFile('source/widgets/grid/Column.js'); includeFile('source/widgets/grid/RowNumberer.js'); includeFile('source/widgets/grid/CheckboxSelectionModel.js'); includeFile('source/widgets/LoadMask.js'); @@ -214,9 +222,9 @@ includeFile('source/debug.js'); includeFile('source/widgets/chart/swfobject.js'); includeFile('source/widgets/chart/FlashComponent.js'); + includeFile('source/widgets/chart/EventProxy.js'); includeFile('source/widgets/Slider.js'); includeFile('source/util/Cookies.js'); includeFile('source/widgets/chart/Chart.js'); - includeFile('source/widgets/chart/EventProxy.js'); includeFile('source/util/History.js'); } \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/ext-all.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/ext-all.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/ext-all.js 2008-12-01 20:55:57 UTC (rev 32) @@ -129,11 +129,7 @@ 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;} -if(!this.events){this.events={};}};Ext.util.Observable.prototype={fireEvent:function(){var a=Array.prototype.slice.call(arguments,0);var ename=a[0];if(ename===true){a.shift();var c=this;while(c){if(c.fireEvent.apply(c,a)===false){return false;} -c=c.getBubbleTarget?c.getBubbleTarget():null;} -return true;} -if(this.eventsSuspended===true){var q=this.suspendedEventsQueue;if(q){q[q.length]=a;}}else{var ce=this.events[ename.toLowerCase()];if(typeof ce=="object"){a.shift();return ce.fire.apply(ce,a);}} +Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners;}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended===true){if(this.suspendedEventsQueue){this.suspendedEventsQueue.push(arguments);}}else{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;} @@ -148,8 +144,7 @@ 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);};};var createTargeted=function(h,o,scope){return function(){if(o.target==arguments[0]){h.apply(scope,Array.prototype.slice.call(arguments,0));}};};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.target){h=createTargeted(h,o,scope);} -if(o.delay){h=createDelayed(h,o,scope);} +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;}} @@ -173,15 +168,14 @@ 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("<s"+'cript id="ie-deferred-loader" defer="defer" src="/'+'/:"></s'+"cript>");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,scope){return function(e){Ext.EventManager.removeListener(el,ename,fn,scope);h(e);};};var createDelayed=function(h,o){return function(e){e=new Ext.EventObjectImpl(e);setTimeout(function(){h(e);},o.delay||10);};};var createTargeted=function(h,o){return function(){if(o.target==Ext.EventObject.setEvent(arguments[0]).target){h.apply(this,Array.prototype.slice.call(arguments,0));}};};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.';} +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,scope){return function(e){Ext.EventManager.removeListener(el,ename,fn,scope);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){if(!window[xname]){return;} 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.target){h=createTargeted(h,o);} -if(o.delay){h=createDelayed(h,o);} +fn.call(scope||el,e,t,o);};if(o.delay){h=createDelayed(h,o);} if(o.single){h=createSingle(h,el,ename,fn,scope);} if(o.buffer){h=createBuffered(h,o);} addListener(el,ename,fn,h,scope);return h;};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;} @@ -190,10 +184,10 @@ return listen(element,eventName,options,fn,scope);},removeListener:function(element,eventName,fn,scope){return removeListener(element,eventName,fn,scope);},removeAll:function(element){return removeAll(element);},onDocumentReady:function(fn,scope,options){if(docReadyState){docReadyEvent.addListener(fn,scope,options);docReadyEvent.fire();docReadyEvent.clearListeners();return;} if(!docReadyEvent){initDocReady();} options=options||{};if(!options.delay){options.delay=1;} -docReadyEvent.addListener(fn,scope,options);},doResizeEvent:function(){resizeEvent.fire(D.getViewWidth(),D.getViewHeight());},onWindowResize:function(fn,scope,options){if(!resizeEvent){resizeEvent=new Ext.util.Event();resizeTask=new Ext.util.DelayedTask(this.doResizeEvent);E.on(window,"resize",this.fireWindowResize,this);} +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;(function(){var initExtCss=function(){var bd=document.body||document.getElementsByTagName('body')[0];if(!bd){return false;} -var cls=[' ',Ext.isIE?"ext-ie "+(Ext.isIE6?'ext-ie6':(Ext.isIE7?'ext-ie7':'ext-ie8')):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?'ext-gecko2':'ext-gecko3'):Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":Ext.isChrome?"ext-chrome":""];if(Ext.isMac){cls.push("ext-mac");} +var cls=[' ',Ext.isIE?"ext-ie "+(Ext.isIE6?'ext-ie6':'ext-ie7'):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?'ext-gecko2':'ext-gecko3'):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.parentNode;if(p){p.className+=' ext-strict';}} @@ -249,8 +243,8 @@ 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(this.isBorderBox()){w-=this.getFrameWidth('lr');}} -if(s.height&&s.height!='auto'){h=parseInt(s.height,10);if(this.isBorderBox()){h-=this.getFrameWidth('tb');}} +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"));} @@ -281,18 +275,18 @@ if(typeof callback=="function"){callback();}});dom.innerHTML=html.replace(/(?:<script.*?>)((\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&&this.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"));} +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.addClass("x-masked-relative");} +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","x-masked-relative"]);},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='0';el.className='ext-shim';if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL;} +this.removeClass("x-masked");},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='0';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){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(Ext.isArray(eventName)){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;} @@ -330,7 +324,7 @@ Ext.Element.addMethods({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);},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){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;},scrollChildIntoView:function(child,hscroll){Ext.fly(child,'_scrollChildIntoView').scrollIntoView(this,hscroll);},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;} @@ -346,7 +340,7 @@ return rt;} where=where?where.toLowerCase():'before';el=el||{};var refNode=where=='before'?this.dom:this.dom.nextSibling;if(typeof el=='object'&&!el.nodeType&&!el.dom){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;},replace:function(el){el=Ext.get(el);this.insertBefore(el);el.remove();return this;},replaceWith:function(el){if(typeof el=='object'&&!el.nodeType&&!el.dom){el=this.insertSibling(el,'before');}else{el=Ext.getDom(el);this.dom.parentNode.insertBefore(el,this.dom);} -El.uncache(this.id);Ext.removeNode(this.dom);this.dom=el;this.id=Ext.id(el);El.cache[this.id]=this;return this;}}); +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;}}); Ext.Element.addMethods({initDD:function(group,config,overrides){var dd=new Ext.dd.DD(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides);},initDDProxy:function(group,config,overrides){var dd=new Ext.dd.DDProxy(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides);},initDDTarget:function(group,config,overrides){var dd=new Ext.dd.DDTarget(Ext.id(this.dom),group,config);return Ext.apply(dd,overrides);}}); @@ -376,9 +370,8 @@ 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(){var to=o.endOpacity||0;arguments.callee.anim=this.fxanim({opacity:{to:to}},o,null,.5,"easeOut",function(){if(to===0){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)};} +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(o.left!==undefined){a.left={to:o.left};} if(o.top!==undefined){a.top={to:o.top};} @@ -444,6 +437,31 @@ 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]);if(!this.debugUploads){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);}}); +(function(){var transactions={},TID=0,impl,d,pollStartTimer=0,callBuffer=[],callTask;var get=function(id){return transactions[id]||{};} +var createEvent=function(t,data,xhr,success,hs){return Ext.apply(t||{},{xhr:xhr,success:success,data:data,arg:hs});} +var doCallback=function(data,t,success,xhr){var fn=success?'success':'failure';if(t&&t.cb){var hs=t.cb;var e=createEvent(t,data,xhr,success,hs);if(typeof hs=='function'){delete e.arg;hs(data,e);}else{Ext.callback(hs[fn],hs.scope,[data,e]);Ext.callback(hs.callback,hs.scope,[data,e]);}}} +var handleEvent=function(data,xhr){if(!data){return;} +var t=get(data.tid);switch(data.type){case'rpc':if(t){doCallback(data.result,t,true,xhr);data.xhr=xhr;d.fireEvent('event',data);delete transactions[data.tid];}else{data.xhr=xhr;d.fireEvent('event',data);} +break;case'event':data.xhr=xhr;d.fireEvent(data.name,data);d.fireEvent('event',data);break;case'exception':if(t){t.code=data.code;t.message=data.message;t.trace=data.where;doCallback(data.result,t,false,xhr);data.xhr=xhr;d.fireEvent('exception',data);delete transactions[data.tid];}else{data.xhr=xhr;d.fireEvent('exception',data);} +if(data.where&&d.enableDebug){Ext.Msg.maxWidth=800;Ext.Msg.show({title:'Exception occurred while making a remote call to the server',msg:'Stack trace from the server:',buttons:Ext.MessageBox.OK,multiline:400,width:800,value:data.message+'\n'+data.where});} +break;}} +var handleException=function(opt,xhr,type){var t=get(opt.tid);if(t){t.xhr=xhr;t.type=type||d.exceptions.TRANSPORT;doCallback(null,t,false,xhr);d.fireEvent('exception',t);delete transactions[opt.tid];}else{d.fireEvent('exception',{tid:opt.tid,xhr:xhr,code:type||d.exceptions.TRANSPORT});}} +var cb=function(opt,success,xhr){if(opt&&opt.poll){Ext.Direct.fireEvent('poll',xhr,success);} +if(success){var data=null;if(!Ext.isEmpty(xhr.responseText)){try{data=Ext.decode(xhr.responseText);}catch(e){return handleException(opt,xhr,d.exceptions.PARSE);} +if(Ext.isArray(data)){for(var i=0,len=data.length;i<len;i++){handleEvent(data[i],xhr);}}else{handleEvent(data,xhr);}}else if(opt.ts){for(var j=0,len=opt.ts.length;j<len;j++){doCallback(null,transactions[opt.ts[j].tid],true,xhr);}}}else{handleException(opt,xhr);}} +var doSend=function(data){if(d.enableUrlEncode){var params={};params[typeof d.enableUrlEncode=='string'?d.enableUrlEncode:'data']=Ext.encode(data);Ext.Ajax.request({url:d.remoteUrl,params:params,callback:cb,ts:data});}else{Ext.Ajax.request({url:d.remoteUrl,jsonData:data,callback:cb,ts:data});}} +var combineAndSend=function(){var len=callBuffer.length;if(len>0){doSend(len==1?callBuffer[0]:callBuffer);callBuffer=[];}} +var doCall=function(c,m,args){var data=null,hs=args[m.len],scope=args[m.len+1];var t={tid:++TID,args:args,action:c,method:m,cb:scope&&typeof hs=='function'?hs.createDelegate(scope):hs};if(d.fireEvent('beforecall',t)!==false){transactions[t.tid]=t;if(m.len!==0){data=args.slice(0,m.len);} +callBuffer.push({action:c,method:m.name,tid:t.tid,data:data});if(d.enableBuffer){if(!callTask){callTask=new Ext.util.DelayedTask(combineAndSend);} +callTask.delay(typeof d.enableBuffer=='number'?d.enableBuffer:10);}else{combineAndSend();} +d.fireEvent('call',t);}} +var doForm=function(c,m,form,callback,scope){var t={tid:++TID,action:c,method:m,args:[form,callback,scope],cb:scope&&typeof callback=='function'?callback.createDelegate(scope):callback};transactions[t.tid]=t;form=Ext.getDom(form);var isUpload=String(form.getAttribute("enctype")).toLowerCase()=='multipart/form-data';var params={extTID:t.tid,extAction:c,extMethod:m.name,extUpload:String(isUpload)};if(callback&&typeof callback=='object'){Ext.apply(params,callback.params);} +Ext.Ajax.request({url:d.remoteUrl,params:params,callback:cb,form:form,isUpload:isUpload,ts:{action:c,method:m.name,tid:t.tid,data:null}});} +var createMethod=function(c,m){var f;if(!m.formHandler){f=function(){doCall(c,m,Array.prototype.slice.call(arguments,0));};}else{f=function(form,callback,scope){doForm(c,m,form,callback,scope);};} +f.directCfg={action:c,method:m};return f;} +impl=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:'xhr',PARSE:'parse',LOGIN:'login',SERVER:'exception'},constructor:function(){impl.superclass.constructor.call(this);this.addEvents('beforecall','call','beforeevent','event','exception','connect','disconnect','pollstart','pollstop');},defineAPI:function(data){d.remoteUrl=data.url;var o=data.actions||data.cls;for(var c in o){var cls=window[c]||(window[c]={});var ms=o[c];for(var i=0,len=ms.length;i<len;i++){var m=ms[i];cls[m.name]=createMethod(c,m);}}},startPoll:function(){clearTimeout(pollStartTimer);if(!this.poller){this.poller=Ext.TaskMgr.start({run:function(){if(Ext.Direct.fireEvent('beforepoll')!==false){Ext.Ajax.request({url:d.remoteUrl+d.pollUrlFragment,callback:cb,poll:true});}},interval:this.pollInterval,scope:this});Ext.Direct.fireEvent('startpolling');}},stopPoll:function(){clearTimeout(pollStartTimer);if(this.poller){Ext.TaskMgr.stop(this.poller);delete this.poller;Ext.Direct.fireEvent('stoppolling');}},inject:function(stringData,opt){cb(opt||{},true,{responseText:stringData});},injectTransaction:function(callback){var t={tid:++TID,action:c,method:m,cb:callback};transactions[t.tid]=t;return t;},startStreaming:function(startKeepAlive){pollStartTimer=this.startPoll.defer(10000,this);if(startKeepAlive===true){this.startKeepAlive();}},startKeepAlive:function(){(function(){this.keepAlive=Ext.TaskMgr.start({run:function(){Ext.Ajax.request({url:d.remoteUrl+d.pingUrlFragment,callback:cb});var flash;if(d.Flash&&(flash=d.Flash.getFlash())){try{flash.send('ping');}catch(e){try{flash.reconnect();}catch(e){}}}},interval:this.keepAliveInterval,scope:this});}).defer(100,this);},autoReconnect:true,pollInterval:3000,keepAliveInterval:60000,pollUrlFragment:'/poll',pingUrlFragment:'/ping',enableBuffer:10});Ext.Direct=d=new impl();var reconnId=0;var retryId=0;var clear=function(){clearTimeout(reconnId);clearTimeout(retryId);} +d.Flash={onData:function(strData){setTimeout(function(){d.inject(strData);},10);},onConnect:function(success){if(success){clear();d.stopPoll();d.fireEvent('connect');}else{d.startPoll();if(d.autoReconnect){d.Flash.reconnect();}}},getFlash:function(){return Ext.isIE?window.xflashDirect:document.xflashDirect;},reconnect:function(){clear();var flash=d.Flash.getFlash();if(flash){reconnId=setTimeout(function(){flash.reconnect();},1000);retryId=setInterval(function(){flash.reconnect();},30000);}},onClose:function(){d.fireEvent('disconnect');d.startPoll();if(d.autoReconnect){d.Flash.reconnect();}}};})(); + Ext.Updater=Ext.extend(Ext.util.Observable,{constructor: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");Ext.apply(this,Ext.Updater.defaults);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=this.getDefaultRenderer();} Ext.Updater.superclass.constructor.call(this);},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer();},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"){cfg=url;url=cfg.url;params=params||cfg.params;callback=callback||cfg.callback;discardUrl=discardUrl||cfg.discardUrl;callerScope=cfg.scope;if(typeof cfg.nocache!="undefined"){this.disableCaching=cfg.nocache;};if(typeof cfg.text!="undefined"){this.indicatorText='<div class="loading-indicator">'+cfg.text+"</div>";};if(typeof cfg.scripts!="undefined"){this.loadScripts=cfg.scripts;};if(typeof cfg.timeout!="undefined"){this.timeout=cfg.timeout;};} @@ -458,35 +476,59 @@ 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:'<div class="loading-indicator">Loading...</div>'};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.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(el,response,updateManager,callback){el.update(response.responseText,updateManager.loadScripts,callback);}};Ext.UpdateManager=Ext.Updater; -(function(){function xf(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(/\{(\d+)\}/g,function(m,i){return args[i];});} -Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=='function'?p():p;Date.parseCodes[character]=p;} -return p?Ext.applyIf({c:p.c?xf(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}} +(function(){Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=='function'?p():p;Date.parseCodes[character]=p;} +return p?Ext.applyIf({c:p.c?String.format(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}} var $f=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(month){return Date.monthNames[month].substring(0,3);},getShortDayName:function(day){return Date.dayNames[day].substring(0,3);},getMonthNumber:function(name){return Date.monthNumbers[name.substring(0,1).toUpperCase()+name.substring(1,3).toLowerCase()];},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var c="Y-m-dTH:i:sP",code=[],i=0,l=c.length;i<l;++i){var e=c.charAt(i);code.push(e=="T"?"'T'":Date.getFormatCode(e));} return code.join(" + ");},U:"Math.round(this.getTime() / 1000)"},parseDate:function(input,format){var p=Date.parseFunctions;if(p[format]==null){Date.createParser(format);} var func=p[format];return Date[func](input);},getFormatCode:function(character){var f=Date.formatCodes[character];if(f){f=Ext.type(f)=='function'?f():f;Date.formatCodes[character]=f;} -return f||("'"+String.escape(character)+"'");},createNewFormat:function(format){var funcName="format"+Date.formatFunctions.count++,code="Date.prototype."+funcName+" = function(){return ",special=false,ch='';Date.formatFunctions[format]=funcName;for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;} +return f||("'"+String.escape(character)+"'");},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)+";}");},createParser:function(){var code=["Date.{0} = function(input){","var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;","input = String(input);","d = new Date();","y = d.getFullYear();","m = d.getMonth();","d = d.getDate();","var results = input.match(Date.parseRegexes[{1}]);","if(results && results.length > 0){","{2}","if(u){","v = new Date(u * 1000);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){","v = new Date(y, m, d, h, i, s, ms);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){","v = new Date(y, m, d, h, i, s);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){","v = new Date(y, m, d, h, i);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){","v = new Date(y, m, d, h);","}else if (y >= 0 && m >= 0 && d > 0){","v = new Date(y, m, d);","}else if (y >= 0 && m >= 0){","v = new Date(y, m);","}else if (y >= 0){","v = new Date(y);","}","}","return (v && (z != null || o != null))?" -+" (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" -+" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;","}"].join('\n');return function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1,calc="",regex="",special=false,ch="";Date.parseFunctions[format]=funcName;for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;} +eval(code.substring(0,code.length-3)+";}");},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, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" ++"input = String(input);\n" ++"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=$f(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){calc+=obj.c;}}} -Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(xf(code,funcName,regexNum,calc));}}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" +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);\n" ++"}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" ++"}\n}\nreturn (v && (z || o))?" ++" (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" ++" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" ++"}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code);},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3}"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" +"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\n" +"if (h == 12) { h = 0; }\n" +"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\n" +"if (h == 12) { h = 0; }\n" +"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $f("G");},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return $f("H");},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+\-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+\-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"z = results[{0}] * 1;\n" -+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"},c:function(){var calc=[],arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[9] == 'Z'){","z = 0;","}else{",$f("P",9).c,"}"].join('\n')}];for(var i=0,l=arr.length;i<l;++i){calc.push(arr[i].c);} ++"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"},c:function(){var calc=[];var arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:"if(results[9] == 'Z'){\no = 0;\n}else{\n"+$f("P",9).c+"\n}"}];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 +"((\.|,)\\d+)?" -+"(Z|([+\-]\\d{2}:\\d{2}))"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.override(Date,{dateFormat:function(format){if(Date.formatFunctions[format]==null){Date.createNewFormat(format);} ++"("+$f("P",null).s+"|Z)"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.override(Date,{dateFormat:function(format){if(Date.formatFunctions[format]==null){Date.createNewFormat(format);} var func=Date.formatFunctions[format];return this[func]();},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"");},getGMTOffset:function(colon){return(this.getTimezoneOffset()>0?"-":"+") -+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0") ++String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0") +(colon?":":"") +String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0");},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;},getWeekOfYear:function(){var ms1d=864e5,ms7d=7*ms1d;return function(){var DC3=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/ms1d,AWN=Math.floor(DC3/7),Wyr=new Date(AWN*ms7d).getUTCFullYear();return AWN-Math.floor(Date.UTC(Wyr,0,7)/ms7d)+1;}}(),isLeapYear:function(){var year=this.getFullYear();return!!((year&3)==0&&(year%100||(year%400==0&&year)));},getFirstDayOfMonth:function(){var day=(this.getDay()-(this.getDate()-1))%7;return(day<0)?(day+7):day;},getLastDayOfMonth:function(){var day=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(day<0)?(day+7):day;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(clone){if(clone){return this.clone().clearTime();} +return num+this.getDate()-1;},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;},isLeapYear:function(){var year=this.getFullYear();return!!((year&3)==0&&(year%100||(year%400==0&&year)));},getFirstDayOfMonth:function(){var day=(this.getDay()-(this.getDate()-1))%7;return(day<0)?(day+7):day;},getLastDayOfMonth:function(){var day=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(day<0)?(day+7):day;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(clone){if(clone){return this.clone().clearTime();} this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;},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;},between:function(start,end){var t=this.getTime();return start.getTime()<=t&&t<=end.getTime();}});Date.prototype.format=Date.prototype.dateFormat;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);}};} @@ -526,8 +568,6 @@ 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.ComponentMgr=function(){var all=new Ext.util.MixedCollection();var types={};var ptypes={};return{register:function(c){all.add(c);},unregister:function(c){all.remove(c);},get:function(id){return all.get(id);},onAvailable:function(id,fn,scope){all.on("add",function(index,o){if(o.id==id){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 config.render?config:new types[config.xtype||defaultType](config);},registerPlugin:function(ptype,cls){ptypes[ptype]=cls;cls.ptype=ptype;},createPlugin:function(config,defaultType){return new ptypes[config.ptype||defaultType](config);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create; - Ext.util.JSON=new(function(){var useHasOwn=!!{}.hasOwnProperty;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)+ @@ -551,13 +591,12 @@ 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:/(?:<script.*?>)((\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);}}(),number:function(v,format){if(!format){return v;} v*=1;if(typeof v!='number'||isNaN(v)){return'';} -var comma=',';var dec='.';var i18n=false;if(format.substr(format.length-2)=='/i'){format=format.substr(0,format.length-2);i18n=true;comma='.';dec=',';} -var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,''):format.replace(/[^\d\.]/g,'')).split(dec);if(1<psplit.length){v=v.toFixed(psplit[1].length);} +var hasComma=-1<format.indexOf(','),psplit=format.replace(/[^\d\.]/g,'').split('.');if(1<psplit.length){v=v.toFixed(psplit[1].length);} else if(2<psplit.length){throw('NumberFormatException: invalid format, formats should have no more than 1 period: '+format);} else{v=v.toFixed(0);} var fnum=v.toString();if(hasComma){psplit=fnum.split('.');var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;i<j;i+=n){if(i!=0){n=3;} parr[parr.length]=cnum.substr(i,n);m-=1;} -fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1];}} +fnum=parr.join(',');if(psplit[1]){fnum+='.'+psplit[1];}} return format.replace(/[\d,?\.?]+/,fnum);},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format);};},plural:function(v,s,p){return v+' '+(v==1?s:(p?p:s+'s'));}}}(); Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var s=this.html;s=['<tpl>',s,'</tpl>'].join('');var re=/<tpl\b[^>]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/;var nameRe=/^<tpl\b[^>]*?for="(.*?)"/;var ifRe=/^<tpl\b[^>]*?if="(.*?)"/;var execRe=/^<tpl\b[^>]*?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))+'; }');}} @@ -591,7 +630,7 @@ {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,destroy:function(){Ext.destroy(this.el);this.purgeListeners();},handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass);} +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,this);if(this.pressClass){this.el.addClass(this.pressClass);} @@ -616,7 +655,7 @@ 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','text-transform','letter-spacing'));},setFixedWidth:function(width){ml.setWidth(width);},getWidth:function(text){ml.dom.style.width='auto';return this.getSize(text).width;},getHeight:function(text){return this.getSize(text).height;}};instance.bind(bindTo);return instance;};Ext.Element.addMethods({getTextWidth:function(text,min,max){return(Ext.util.TextMetrics.measure(this.dom,Ext.value(text,this.dom.innerHTML,true)).width).constrain(min||0,max||1000000);}}); -(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;},moveOnly:false,unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(constrainTo,pad,inContent){if(typeof pad=="number"){pad={left:pad,right:pad,top:pad,bottom:pad};} +(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);} @@ -643,14 +682,13 @@ 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]&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}} +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<len;++i){if(targets[i].id==oTargetDD.id){return true;}} return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}} return null;},handleMouseDown:function(e,oDD){if(Ext.QuickTips){Ext.QuickTips.disable();} -if(this.dragCurrent){this.handleMouseUp(e);} this.currentTarget=e.getTarget();this.dragCurrent=oDD;var el=oDD.getEl();this.startX=e.getPageX();this.startY=e.getPageY();this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=Ext.dd.DDM;DDM.startDrag(DDM.startX,DDM.startY);},this.clickTimeThresh);},startDrag:function(x,y){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(x,y);this.dragCurrent.startDrag(x,y);} this.dragThreshMet=true;},handleMouseUp:function(e){if(Ext.QuickTips){Ext.QuickTips.enable();} if(!this.dragCurrent){return;} @@ -706,8 +744,7 @@ 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;if(this.preventDefault!==false){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;}} +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];}}}); @@ -773,7 +810,7 @@ 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);},isModified:function(fieldName){return!!(this.modified&&this.modified.hasOwnProperty(fieldName));}}; -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.events?id:Ext.create(id,'store')):this.get(id);},getKey:function(o){return o.storeId||o.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});} @@ -781,7 +818,7 @@ 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={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir);}else if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);} +this.sortToggle={};if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);} 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;} @@ -807,15 +844,15 @@ 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;},setBaseParam:function(name,value){this.baseParams=this.baseParams||{};this.baseParams[name]=value;}});Ext.reg('store',Ext.data.Store); +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;},setBaseParam:function(name,value){this.baseParams=this.baseParams||{};this.baseParams[name]=value;}}); 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.reg('simplestore',Ext.data.SimpleStore); +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.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.reg('jsonstore',Ext.data.JsonStore); +Ext.data.JsonStore=function(c){Ext.data.JsonStore.superclass.constructor.call(this,Ext.apply(c,{proxy: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.XmlStore=function(c){Ext.data.XmlStore.superclass.constructor.call(this,Ext.apply(c,{proxy:c.proxy||(!c.data?new Ext.data.HttpProxy({url:c.url}):undefined),reader:new Ext.data.XmlReader(c,c.fields)}));};Ext.extend(Ext.data.XmlStore,Ext.data.Store);Ext.reg('xmlstore',Ext.data.XmlStore); +Ext.data.DirectStore=function(c){var pcfg=Ext.copyTo({},c,'paramOrder,paramsAsHash,directFn');Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(c,{proxy:new Ext.data.DirectProxy(pcfg),reader:new Ext.data.JsonReader(c,c.fields)}));};Ext.extend(Ext.data.DirectStore,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";} @@ -846,6 +883,12 @@ 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.DirectProxy=function(config){Ext.apply(this,config);if(typeof this.paramOrder=='string'){this.paramOrder=this.paramOrder.split(/[\s,|]/);} +Ext.data.DirectProxy.superclass.constructor.call(this);};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,load:function(params,reader,cb,scope,arg){if(this.fireEvent("beforeload",this,params)!==false){var args=[];if(this.paramOrder){for(var i=0,len=this.paramOrder.length;i<len;i++){args.push(params[this.paramOrder[i]]);}}else if(this.paramsAsHash){args.push(params);} +args.push({callback:function(result,e){if(!e.success){this.fireEvent("loadexception",this,e,result);cb.call(scope,null,arg,false);return;} +var rs;try{rs=reader.readRecords(result);}catch(ex){this.fireEvent("loadexception",this,e,result,ex);cb.call(scope,null,arg,false);return;} +this.fireEvent("load",this,e,arg);cb.call(scope,rs,arg,true);},scope:this});this.directFn.apply(window,args);}else{cb.call(scope||this,null,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"};} 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;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);} @@ -860,60 +903,16 @@ 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.idPath||this.meta.id;var totalRecords=0,success=true;if(this.meta.totalRecords){totalRecords=q.selectNumber(this.meta.totalRecords,root,0);} +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,n);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){this.arrayData=o;var s=this.meta;var sid=s?(s.idIndex||s.id):null;var recordType=this.recordType,fields=recordType.prototype.fields;var records=[];if(!this.getRoot){this.getRoot=s.root?this.getJsonAccessor(s.root):function(p){return p;};if(s.totalProperty){this.getTotal=this.getJsonAccessor(s.totalProperty);}} -var root=this.getRoot(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,n);values[f.name]=v;} +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,n);values[f.name]=v;} var record=new recordType(values,id);record.json=n;records[records.length]=record;} -var totalRecords=records.length;if(s.totalProperty){var v=parseInt(this.getTotal(o),10);if(!isNaN(v)){totalRecords=v;}} -return{records:records,totalRecords:totalRecords};}}); +return{records:records,totalRecords:records.length};}}); -Ext.Direct=Ext.extend(Ext.util.Observable,{exceptions:{TRANSPORT:'xhr',PARSE:'parse',LOGIN:'login',SERVER:'exception'},constructor:function(){this.addEvents('event','exception');this.transactions={};this.providers={};},addProvider:function(provider){var a=arguments;if(a.length>1){for(var i=0,len=a.length;i<len;i++){this.addProvider(a[i]);} -return;} -if(!provider.events){provider=new Ext.Direct.PROVIDERS[provider.type](provider);} -provider.id=provider.id||Ext.id;this.providers[provider.id]=provider;provider.on('data',this.onProviderData,this);provider.on('exception',this.onProviderException,this);if(!provider.isConnected()){provider.connect();} -return provider;},getProvider:function(id){return this.providers[id];},removeProvider:function(id){var provider=id.id?id:providers[id.id];provider.un('data',this.onProviderData,this);provider.un('exception',this.onProviderException,this);delete this.providers[provider.id];return provider;},addTransaction:function(t){this.transactions[t.tid]=t;return t;},removeTransaction:function(t){delete this.transactions[t.tid||t];return t;},getTransaction:function(tid){return this.transactions[tid.tid||tid];},onProviderData:function(provider,e){if(Ext.isArray(e)){for(var i=0,len=e.length;i<len;i++){this.onProviderData(provider,e[i]);} -return;} -if(e.name&&e.name!='event'&&e.name!='exception'){this.fireEvent(e.name,e);}else if(e.type=='exception'){this.fireEvent('exception',e);} -this.fireEvent('event',e,provider);},createEvent:function(response,extraProps){return new Ext.Direct.eventTypes[response.type](Ext.apply(response,extraProps));}});Ext.Direct=new Ext.Direct();Ext.Direct.TID=1;Ext.Direct.PROVIDERS={}; - -Ext.Direct.Transaction=function(config){Ext.apply(this,config);this.tid=++Ext.Direct.TID;this.retryCount=0;} -Ext.Direct.Transaction.prototype={send:function(){this.provider.queueTransaction(this);},retry:function(){this.retryCount++;this.send();},getProvider:function(){return this.provider;}}; - -Ext.Direct.Event=function(config){Ext.apply(this,config);} -Ext.Direct.Event.prototype={status:true,getData:function(){return this.data;}};Ext.Direct.RemotingEvent=Ext.extend(Ext.Direct.Event,{type:'rpc',getTransaction:function(){return this.transaction||Ext.Direct.getTransaction(this.tid);}});Ext.Direct.ExceptionEvent=Ext.extend(Ext.Direct.RemotingEvent,{status:false,type:'exception'});Ext.Direct.eventTypes={'rpc':Ext.Direct.RemotingEvent,'event':Ext.Direct.Event,'exception':Ext.Direct.ExceptionEvent}; - -Ext.direct.Provider=Ext.extend(Ext.util.Observable,{priority:1,constructor:function(config){Ext.apply(this,config);this.addEvents('connect','disconnect','data','exception');Ext.direct.Provider.superclass.constructor.call(this,config);},isConnected:function(){return false;},connect:Ext.emptyFn,disconnect:Ext.emptyFn}); - -Ext.direct.JsonProvider=Ext.extend(Ext.direct.Provider,{parseResponse:function(xhr){if(!Ext.isEmpty(xhr.responseText)){if(typeof xhr.responseText=='object'){return xhr.responseText;} -return Ext.decode(xhr.responseText);} -return null;},getEvents:function(xhr){var data=null;try{data=this.parseResponse(xhr);}catch(e){var event=new Ext.Direct.ExceptionEvent({data:e,xhr:xhr,code:Ext.Direct.exceptions.PARSE,message:'Error parsing json response: \n\n '+data}) -return[event];} -var events=[];if(Ext.isArray(data)){for(var i=0,len=data.length;i<len;i++){events.push(Ext.Direct.createEvent(data[i]));}}else{events.push(Ext.Direct.createEvent(data));} -return events;}}); - -Ext.direct.PollingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:3,interval:3000,constructor:function(config){Ext.direct.PollingProvider.superclass.constructor.call(this,config);this.addEvents('beforepoll','poll');},isConnected:function(){return!!this.pollTask;},connect:function(){if(this.url&&!this.pollTask){this.pollTask=Ext.TaskMgr.start({run:function(){if(this.fireEvent('beforepoll',this)!==false){if(typeof this.url=='function'){this.url(this.baseParams);}else{Ext.Ajax.request({url:this.url,callback:this.onData,scope:this,params:this.baseParams});}}},interval:this.interval,scope:this});this.fireEvent('connect',this);}else if(!this.url){throw'Error initializing PollingProvider, no url configured.';}},disconnect:function(){if(this.pollTask){Ext.TaskMgr.stop(this.pollTask);delete this.pollTask;this.fireEvent('disconnect',this);}},onData:function(opt,success,xhr){if(success){var events=this.getEvents(xhr);for(var i=0,len=events.length;i<len;i++){var e=events[i];this.fireEvent('data',this,e);}}else{var e=new Ext.Direct.ExceptionEvent({data:e,code:Ext.Direct.exceptions.TRANSPORT,message:'Unable to connect to the server.',xhr:xhr});this.fireEvent('data',this,e);}}});Ext.Direct.PROVIDERS['polling']=Ext.direct.PollingProvider; - -Ext.direct.RemotingProvider=Ext.extend(Ext.direct.JsonProvider,{priority:1,enableBuffer:10,maxRetries:1,constructor:function(config){Ext.direct.RemotingProvider.superclass.constructor.call(this,config);this.addEvents('beforecall','call');this.namespace=this.namespace||window;this.transactions={};this.callBuffer=[];},initAPI:function(){var o=this.actions;for(var c in o){var cls=this.namespace[c]||(this.namespace[c]={});var ms=o[c];for(var i=0,len=ms.length;i<len;i++){var m=ms[i];cls[m.name]=this.createMethod(c,m);}}},isConnected:function(){return!!this.connected;},connect:function(){if(this.url){this.initAPI();this.connected=true;this.fireEvent('connect',this);}else if(!this.url){throw'Error initializing RemotingProvider, no url configured.';}},disconnect:function(){if(this.connected){this.connected=false;this.fireEvent('disconnect',this);}},onData:function(opt,success,xhr){if(success){var events=this.getEvents(xhr);for(var i=0,len=events.length;i<len;i++){var e=events[i];var t=e.getTransaction();this.fireEvent('data',this,e);if(t){this.doCallback(t,e,true);Ext.Direct.removeTransaction(t);}}}else{var ts=[].concat(opt.ts);for(var i=0,len=ts.length;i<len;i++){var t=this.getTransaction(opt.ts[i]);if(t&&t.retryCount<this.maxRetries){t.retry();}else{var e=new Ext.Direct.ExceptionEvent({data:e,transaction:t,code:Ext.Direct.exceptions.TRANSPORT,message:'Unable to connect to the server.',xhr:xhr});this.fireEvent('data',this,e);if(t){this.doCallback(t,e,false);Ext.Direct.removeTransaction(t);}}}}},getCallData:function(t){return{action:t.action,method:t.method,data:t.data,type:'rpc',tid:t.tid};},doSend:function(data){var o={url:this.url,callback:this.onData,scope:this};var callData;if(Ext.isArray(data)){callData=[];for(var i=0,len=data.length;i<len;i++){callData.push(this.getCallData(data[i]));}}else{callData=this.getCallData(data);} -if(this.enableUrlEncode){var params={};params[typeof this.enableUrlEncode=='string'?this.enableUrlEncode:'data']=Ext.encode(callData);o.params=params;}else{o.jsonData=callData;} -Ext.Ajax.request(o);},combineAndSend:function(){var len=this.callBuffer.length;if(len>0){this.doSend(len==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[];}},queueTransaction:function(t){this.callBuffer.push(t);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this);} -this.callTask.delay(typeof this.enableBuffer=='number'?this.enableBuffer:10);}else{this.combineAndSend();}},doCall:function(c,m,args){var data=null,hs=args[m.len],scope=args[m.len+1];if(m.len!==0){data=args.slice(0,m.len);} -var t=new Ext.Direct.Transaction({provider:this,args:args,action:c,method:m.name,data:data,cb:scope&&typeof hs=='function'?hs.createDelegate(scope):hs});if(this.fireEvent('beforecall',this,t)!==false){Ext.Direct.addTransaction(t);this.queueTransaction(t);this.fireEvent('call',this,t);}},doForm:function(c,m,form,callback,scope){var t=new Ext.Direct.Transaction({provider:this,action:c,method:m.name,args:[form,callback,scope],cb:scope&&typeof callback=='function'?callback.createDelegate(scope):callback});if(this.fireEvent('beforecall',this,t)!==false){Ext.Direct.addTransaction(t);form=Ext.getDom(form);var isUpload=String(form.getAttribute("enctype")).toLowerCase()=='multipart/form-data';var params={extTID:t.tid,extAction:c,extMethod:m.name,extUpload:String(isUpload)};if(callback&&typeof callback=='object'){Ext.apply(params,callback.params);} -Ext.Ajax.request({url:this.url,params:params,callback:this.onData,scope:this,form:form,isUpload:isUpload,ts:t});}},createMethod:function(c,m){var f;if(!m.formHandler){f=function(){this.doCall(c,m,Array.prototype.slice.call(arguments,0));}.createDelegate(this);}else{f=function(form,callback,scope){this.doForm(c,m,form,callback,scope);}.createDelegate(this);} -f.directCfg={action:c,method:m};return f;},getTransaction:function(opt){return opt&&opt.tid?Ext.Direct.getTransaction(opt.tid):null;},doCallback:function(t,e){var fn=e.status?'success':'failure';if(t&&t.cb){var hs=t.cb;var result=e.result||e.data;if(typeof hs=='function'){hs(result,e);}else{Ext.callback(hs[fn],hs.scope,[result,e]);Ext.callback(hs.callback,hs.scope,[result,e]);}}}});Ext.Direct.PROVIDERS['remoting']=Ext.direct.RemotingProvider; - -Ext.data.DirectProxy=function(config){Ext.apply(this,config);if(typeof this.paramOrder=='string'){this.paramOrder=this.paramOrder.split(/[\s,|]/);} -Ext.data.DirectProxy.superclass.constructor.call(this);};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,load:function(params,reader,cb,scope,arg){if(this.fireEvent("beforeload",this,params)!==false){var args=[];if(this.paramOrder){for(var i=0,len=this.paramOrder.length;i<len;i++){args.push(params[this.paramOrder[i]]);}}else if(this.paramsAsHash){args.push(params);} -args.push({callback:function(result,e){if(!e.status){this.fireEvent("loadexception",this,e,result);cb.call(scope,null,arg,false);return;} -var rs;try{rs=reader.readRecords(result);}catch(ex){this.fireEvent("loadexception",this,e,result,ex);cb.call(scope,null,arg,false);return;} -this.fireEvent("load",this,e,arg);cb.call(scope,rs,arg,true);},scope:this});this.directFn.apply(window,args);}else{cb.call(scope||this,null,arg,false);}}}); - -Ext.data.DirectStore=function(c){var pcfg=Ext.copyTo({},c,'paramOrder,paramsAsHash,directFn');Ext.data.DirectStore.superclass.constructor.call(this,Ext.apply(c,{proxy:new Ext.data.DirectProxy(pcfg),reader:new Ext.data.JsonReader(c,c.fields)}));};Ext.extend(Ext.data.DirectStore,Ext.data.Store); - 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;} @@ -965,6 +964,8 @@ 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={};var ptypes={};return{register:function(c){all.add(c);},unregister:function(c){all.remove(c);},get:function(id){return all.get(id);},onAvailable:function(id,fn,scope){all.on("add",function(index,o){if(o.id==id){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);},registerPlugin:function(ptype,cls){ptypes[ptype]=cls;cls.ptype=ptype;},createPlugin:function(config,defaultType){return new ptypes[config.ptype||defaultType](config);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin; + 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);} @@ -979,11 +980,8 @@ 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();} -if(this.stateful!==false){this.initStateEvents();} -this.initRef();} -return this;},initRef:function(){if(this.ref){var levels=this.ref.split('/');var last=levels.length,i=0;var t=this;while(i<last){if(t.ownerCt){t=t.ownerCt;} -i++;} -t[levels[--i]]=this;}},initState:function(config){if(Ext.state.Manager){var id=this.getStateId();if(id){var state=Ext.state.Manager.get(id);if(state){if(this.fireEvent('beforestaterestore',this,state)!==false){this.applyState(state);this.fireEvent('staterestore',this,state);}}}}},getStateId:function(){return this.stateId||((this.id.indexOf('ext-comp-')==0||this.id.indexOf('ext-gen')==0)?null:this.id);},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 id=this.getStateId();if(id){var state=this.getState();if(this.fireEvent('beforestatesave',this,state)!==false){Ext.state.Manager.set(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.stateful!==false){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.id){this.el.id=this.getId();}} if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,position);} if(this.overCls){this.el.addClassOnOver(this.overCls);}}},getAutoCreate:function(){var cfg=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!cfg.id){cfg.id=this.id;} @@ -1004,9 +1002,9 @@ return tc.xtypes;},findParentBy:function(fn){for(var p=this.ownerCt;(p!=null)&&!fn(p,this);p=p.ownerCt);return p||null;},findParentByType:function(xtype){return typeof xtype=='function'?this.findParentBy(function(p){return p.constructor===xtype;}):this.findParentBy(function(p){return p.constructor.xtype===xtype;});},getDomPositionEl:function(){return this.getPositionEl?this.getPositionEl():this.getEl();},mon:function(item,ename,fn,scope,opt){if(!this.mons){this.mons=[];this.on('beforedestroy',function(){for(var i=0,len=this.mons.length;i<len;i++){var m=this.mons[i];m.item.un(m.ename,m.fn,m.scope);}},this);} this.mons.push({item:item,ename:ename,fn:fn,scope:scope});item.on(ename,fn,scope,opt);},nextSibling:function(){if(this.ownerCt){var index=this.ownerCt.items.indexOf(this);if(index!=-1&&index+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(index+1);}} return null;},previousSibling:function(){if(this.ownerCt){var index=this.ownerCt.items.indexOf(this);if(index>0){return this.ownerCt.items.itemAt(index-1);}} -return null;},getBubbleTarget:function(){return this.ownerCt;}});Ext.reg('component',Ext.Component); +return null;}});Ext.reg('component',Ext.Component); -Ext.Action=function(config){this.initialConfig=config;this.itemId=config.itemId=(config.itemId||config.id||Ext.id());this.items=[];} +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);},execute:function(){this.initialConfig.handler.apply(this.initialConfig.scope||window,arguments);}}; (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);} @@ -1066,12 +1064,12 @@ 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){Ext.destroy(this.overlay);delete this.overlay;} +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.destroy(Ext.get(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; +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(Ext.isArray(items)){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=='object'&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type;} @@ -1081,20 +1079,20 @@ if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false]);}},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++){Ext.Container.prototype.add.call(this,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(true,'add',this,c,pos);} +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(true,'add',this,c,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(true,'remove',this,c);} +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.create(config,this.defaultType);},doLayout:function(shallow){if(this.rendered&&this.layout){this.layout.layout();} +return comp;},createComponent:function(config){return Ext.ComponentMgr.create(config,this.defaultType);},doLayout:function(shallow){if(this.rendered&&this.layout){this.layout.layout();} if(shallow!==false&&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;},beforeDestroy:function(){if(this.items){Ext.destroy.apply(Ext,this.items.items);} if(this.monitorResize){Ext.EventManager.removeResizeListener(this.doLayout,this);} @@ -1137,28 +1135,27 @@ 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&&Ext.layout.BorderLayout.WARN!==false){throw'No center region defined in BorderLayout '+ct.id;} +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);} -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)};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();}},destroy:function(){var r=['north','south','east','west'];for(var i=0;i<r.length;i++){var region=this[r[i]];if(region){if(region.destroy){region.destroy();}else if(region.split){region.split.destroy(true);}}} +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();}},destroy:function(){var r=['north','south','east','west'];for(var i=0;i<r.length;i++){var region=this[r[i]];if(region&®ion.split){region.split.destroy(true);}} Ext.layout.BorderLayout.superclass.destroy.call(this);}});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},floatingZIndex:100,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(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('<div class="x-tool x-tool-{id}"> </div>');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,id:this.panel.id+'-xcollapsed'});this.collapsedEl.enableDisplayMode('block');if(this.collapseMode=='mini'){this.collapsedEl.addClass('x-layout-cmini-'+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver('x-layout-mini-over');this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on('click',this.onExpandClick,this,{stopEvent:true});}else{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',this.floatingZIndex);},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show();} +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",this.floatingZIndex+2);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.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);} @@ -1169,25 +1166,25 @@ 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;},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);}});Ext.Container.LAYOUTS['border']=Ext.layout.BorderLayout; +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||ct.el).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;ct.labelWidth=ct.labelWidth||100;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('<div class="x-form-item {5}" tabIndex="-1">','<label for="{0}" style="{2}" class="x-form-item-label">{1}{4}</label>','<div class="x-form-element" id="x-form-el-{0}" style="{3}">','</div><div class="{6}"></div>','</div>');t.disableFormats=true;t.compile();Ext.layout.FormLayout.prototype.fieldTpl=t;}},renderItem:function(c,position,target){if(c&&!c.rendered&&(c.isFormField||c.fieldLabel)&&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.isFormField||comp.fieldLabel?(comp.hideLabel?0:this.labelAdjust):0);},isValidParent:function(c,target){return true;}});Ext.Container.LAYOUTS['form']=Ext.layout.FormLayout; +c.render('x-form-el-'+c.id);}else{Ext.layout.FormLayout.superclass.renderItem.apply(this,arguments);}},adjustWidthAnchor:function(value,comp){return value-(comp.isFormField?(comp.hideLabel?0:this.labelAdjust):0);},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&&this.activeItem!=c){c.collapsed=true;} +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;if(!ai.collapsed){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);}},setActiveItem:function(item){item=this.container.getComponent(item);this.activeItem=item;if(item){item.expand();}}});Ext.Container.LAYOUTS['accordion']=Ext.layout.Accordion; +size.height-=hh;item.setSize(size);}}});Ext.Container.LAYOUTS['accordion']=Ext.layout.Accordion; Ext.layout.TableLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:false,tableAttrs:null,setContainer:function(ct){Ext.layout.TableLayout.superclass.setContainer.call(this,ct);this.currentRow=0;this.currentColumn=0;this.cells=[];},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(Ext.apply({tag:'table',cls:'x-table-layout',cellspacing:0,cn:{tag:'tbody'}},this.tableAttrs),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 cell=this.getNextNonSpan(this.currentColumn,this.currentRow);var curCol=this.currentColumn=cell[0],curRow=this.currentRow=cell[1];for(var rowIndex=curRow;rowIndex<curRow+(c.rowspan||1);rowIndex++){if(!this.cells[rowIndex]){this.cells[rowIndex]=[];} @@ -1199,76 +1196,49 @@ this.getRow(curRow).appendChild(td);return td;},getNextNonSpan:function(colIndex,rowIndex){var cols=this.columns;while((cols&&colIndex>=cols)||(this.cells[rowIndex]&&this.cells[rowIndex][colIndex])){if(cols&&colIndex>=cols){rowIndex++;colIndex=0;}else{colIndex++;}} return[colIndex,rowIndex];},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',isForm:false,setContainer:function(ct){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,ct);if(ct.isXType('form')){this.isForm=true;}},onLayout:function(ct,target){if(this.isForm){ct.body.position();this.paddingLeft=ct.body.getPadding('r');this.paddingTop=ct.body.getPadding('t');}else{target.position();this.paddingLeft=target.getPadding('r');this.paddingTop=target.getPadding('t');} -Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,ct,target);},getAnchorViewSize:function(ct,target){return this.isForm?ct.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,ct,target);},isValidParent:function(c,target){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,c,target);},adjustWidthAnchor:function(value,comp){return value?value-comp.getPosition(true)[0]+this.paddingLeft:value;},adjustHeightAnchor:function(value,comp){return value?value-comp.getPosition(true)[1]+this.paddingTop:value;}});Ext.Container.LAYOUTS['absolute']=Ext.layout.AbsoluteLayout; +Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:'x-abs-layout-item',isForm:false,setContainer:function(ct){Ext.layout.AbsoluteLayout.superclass.setContainer.call(this,ct);if(ct.isXType('form')){this.isForm=true;}},onLayout:function(ct,target){if(this.isForm){ct.body.position();}else{target.position();} +Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,ct,target);},getAnchorViewSize:function(ct,target){return this.isForm?ct.body.getStyleSize():Ext.layout.AbsoluteLayout.superclass.getAnchorViewSize.call(this,ct,target);},isValidParent:function(c,target){return this.isForm?true:Ext.layout.AbsoluteLayout.superclass.isValidParent.call(this,c,target);},adjustWidthAnchor:function(value,comp){return value?value-comp.getPosition(true)[0]:value;},adjustHeightAnchor:function(value,comp){return value?value-comp.getPosition(true)[1]:value;}});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.layout.Box=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,scrollOffset:0,extraCls:'x-box-item',ctCls:'x-box-layout-ct',innerCls:'x-box-inner',defaultMargins:{left:0,top:0,right:0,bottom:0},padding:'0',pack:'start',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,last=len-1,cm;if(!this.innerCt){target.addClass(this.ctCls);this.innerCt=target.createChild({cls:this.innerCls});this.padding=this.parseMargins(this.padding);} -this.renderAll(ct,this.innerCt);},renderItem:function(c){if(typeof c.margins=='string'){c.margins=this.parseMargins(c.margins);}else if(!c.margins){c.margins=this.defaultMargins;} -Ext.layout.Box.superclass.renderItem.apply(this,arguments);},getTargetSize:function(target){return Ext.isIE&&target.dom!=Ext.getBody().dom?target.getStyleSize():target.getViewSize();}});Ext.layout.VBox=Ext.extend(Ext.layout.Box,{align:'left',pack:'start',onLayout:function(ct,target){Ext.layout.VBox.superclass.onLayout.call(this,ct,target);var cs=ct.items.items,len=cs.length,c,i,last=len-1,cm;var size=this.getTargetSize(target);if(size.width<1&&size.height<1){return;} -var w=size.width-target.getPadding('lr')-this.scrollOffset,h=size.height-target.getPadding('tb'),l=this.padding.left,t=this.padding.top;var stretchWidth=w-(this.padding.left+this.padding.right);var totalFlex=0;var totalHeight=0;var maxWidth=0;for(i=0;i<len;i++){c=cs[i];cm=c.margins;totalFlex+=c.flex||0;totalHeight+=c.getHeight()+cm.top+cm.bottom;maxWidth=Math.max(maxWidth,c.getWidth()+cm.left+cm.top);} -var innerCtWidth=maxWidth+this.padding.left+this.padding.right;switch(this.align){case'stretch':this.innerCt.setSize(w,h);break;case'stretchmax':case'left':case'center':this.innerCt.setSize(w=Math.max(w,innerCtWidth),h);break;} -var extraHeight=h-totalHeight-this.padding.top-this.padding.bottom;var allocated=0;var cw,ch,cl,availableWidth=w-this.padding.left-this.padding.right;if(this.pack=='center'){t+=extraHeight?extraHeight/2:0;}else if(this.pack=='end'){t+=extraHeight;} -for(i=0;i<len;i++){c=cs[i];cm=c.margins;cw=c.getWidth();ch=c.getHeight();t+=cm.top;if(this.align!='center'){cl=l+cm.left;}else{var diff=availableWidth-(cw+cm.left+cm.right);if(diff==0){cl=l+cm.left;}else{cl=l+cm.left+(diff/2);}} -c.setPosition(cl,t);if(this.pack=='start'&&c.flex){var ratio=c.flex/totalFlex;var add=Math.floor(extraHeight*ratio);allocated+=add;if(i==last){add+=(extraHeight-allocated);} -ch+=add;c.setHeight(ch);} -if(this.align=='stretch'){c.setWidth((stretchWidth-(cm.left+cm.right)).constrain(c.minWidth||0,c.maxWidth||1000000));}else if(this.align=='stretchmax'){c.setWidth((maxWidth-(cm.left+cm.right)).constrain(c.minWidth||0,c.maxWidth||1000000));} -t+=ch+cm.bottom;}}});Ext.Container.LAYOUTS['vbox']=Ext.layout.VBox;Ext.layout.HBox=Ext.extend(Ext.layout.Box,{align:'top',pack:'start',onLayout:function(ct,target){Ext.layout.HBox.superclass.onLayout.call(this,ct,target);var cs=ct.items.items,len=cs.length,c,i,last=len-1,cm;var size=this.getTargetSize(target);if(size.width<1&&size.height<1){return;} -var w=size.width-target.getPadding('lr')-this.scrollOffset,h=size.height-target.getPadding('tb'),l=this.padding.left,t=this.padding.top;var stretchHeight=h-(this.padding.top+this.padding.bottom);var totalFlex=0;var totalWidth=0;var maxHeight=0;for(i=0;i<len;i++){c=cs[i];cm=c.margins;totalFlex+=c.flex||0;totalWidth+=c.getWidth()+cm.left+cm.right;maxHeight=Math.max(maxHeight,c.getHeight()+cm.top+cm.bottom);} -var innerCtHeight=maxHeight+this.padding.top+this.padding.bottom;switch(this.align){case'stretch':this.innerCt.setSize(w,h);break;case'stretchmax':case'top':this.innerCt.setSize(w,innerCtHeight);break;case'middle':this.innerCt.setSize(w,h=Math.max(h,innerCtHeight));break;} -var extraWidth=w-totalWidth-this.padding.left-this.padding.right;var allocated=0;var cw,ch,ct,availableHeight=h-this.padding.top-this.padding.bottom;if(this.pack=='center'){l+=extraWidth?extraWidth/2:0;}else if(this.pack=='end'){l+=extraWidth;} -for(i=0;i<len;i++){c=cs[i];cm=c.margins;cw=c.getWidth();ch=c.getHeight();l+=cm.left;if(this.align!='middle'){ct=t+cm.top;}else{var diff=availableHeight-(ch+cm.top+cm.bottom);if(diff==0){ct=t+cm.top;}else{ct=t+cm.top+(diff/2);}} -c.setPosition(l,ct);if(this.pack=='start'&&c.flex){var ratio=c.flex/totalFlex;var add=Math.floor(extraWidth*ratio);allocated+=add;if(i==last){add+=(extraWidth-allocated);} -cw+=add;c.setWidth(cw);} -if(this.align=='stretch'){c.setHeight((stretchHeight-(cm.top+cm.bottom)).constrain(c.minHeight||0,c.maxHeight||1000000));}else if(this.align=='stretchmax'){c.setHeight((maxHeight-(cm.top+cm.bottom)).constrain(c.minHeight||0,c.maxHeight||1000000));} -l+=cw+cm.right;}}});Ext.Container.LAYOUTS['hbox']=Ext.layout.HBox; - -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',disabledClass:'',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.unstyled){this.baseCls='x-plain';} -if(this.tbar){this.elements+=',tbar';if(typeof this.tbar=='object'){this.topToolbar=this.tbar;} +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',disabledClass:'',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){this.elements+=',footer';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 if(btns[i].xtype){this.buttons.push(Ext.create(btns[i],'button'));}else{this.addButton(btns[i]);}}} -if(this.fbar){this.elements+=',footer';if(this.buttonAlign=='right'&&this.initialConfig.buttonAlign===undefined){this.buttonAlign='left';}} +if(this.buttons){var btns=this.buttons;this.buttons=[];for(var i=0,len=btns.length;i<len;i++){if(btns[i].render){btns[i].ownerCt=this;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));} -if(this[name+'CssClass']){this[name].addClass(this[name+'CssClass']);} -if(this[name+'Style']){this[name].applyStyles(this[name+'Style']);}}},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);} +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.padding!==undefined){this.body.setStyle('padding',this.body.addUnits(this.padding));} if(this.border===false){this.el.addClass(this.baseCls+'-noborder');this.body.addClass(this.bodyCls+'-noborder');if(this.header){this.header.addClass(this.headerCls+'-noborder');} if(this.footer){this.footer.addClass(this.footerCls+'-noborder');} if(this.tbar){this.tbar.addClass(this.tbarCls+'-noborder');} if(this.bbar){this.bbar.addClass(this.bbarCls+'-noborder');}} if(this.bodyBorder===false){this.body.addClass(this.bodyCls+'-noborder');} +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='<span class="'+this.headerTextCls+'">'+this.header.dom.innerHTML+'</span>';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){this.fbar=new Ext.Toolbar({items:this.buttons,toolbarCls:'x-panel-fbar'});} -if(this.fbar){this.fbar=Ext.create(this.fbar,'toolbar');if(this.fbar.items){this.fbar.items.each(function(c){c.minWidth=this.minButtonWidth;},this);} -this.fbar.toolbarCls='x-panel-fbar';var bct=this.footer.createChild({cls:'x-panel-btns x-panel-btns-'+this.buttonAlign});this.fbar.ownerCt=this;this.fbar.render(bct);bct.createChild({cls:'x-clear'});} -if(this.tbar&&this.topToolbar){if(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar);}else if(!this.topToolbar.events){this.topToolbar=Ext.create(this.topToolbar,'toolbar');} -this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar);} -if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);}else if(!this.bottomToolbar.events){this.bottomToolbar=Ext.create(this.bottomToolbar,'toolbar');} -this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar);}},setIconClass:function(cls){var old=this.iconCls;this.iconCls=cls;if(this.rendered&&this.header){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=[];} +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:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>'}},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(Ext.isArray(this.topToolbar)){this.topToolbar=new Ext.Toolbar(this.topToolbar);}else if(!this.topToolbar.events){this.topToolbar=Ext.ComponentMgr.create(this.topToolbar,'toolbar');} +this.topToolbar.render(this.tbar);this.topToolbar.ownerCt=this;} +if(this.bbar&&this.bottomToolbar){if(Ext.isArray(this.bottomToolbar)){this.bottomToolbar=new Ext.Toolbar(this.bottomToolbar);}else if(!this.bottomToolbar.events){this.bottomToolbar=Ext.ComponentMgr.create(this.bottomToolbar,'toolbar');} +this.bottomToolbar.render(this.bbar);this.bottomToolbar.ownerCt=this;}},setIconClass:function(cls){var old=this.iconCls;this.iconCls=cls;if(this.rendered&&this.header){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);btn.ownerCt=this;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('<div class="x-tool x-tool-{id}"> </div>');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];if(!this.tools[tc.id]){var overCls='x-tool-'+tc.id+'-over';var t=this.toolTemplate.insertFirst((tc.align!=='left')?this[this.toolTarget]:this[this.toolTarget].child('span'),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);} +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((tc.align!=='left')?this[this.toolTarget]:this[this.toolTarget].child('span'),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);}}},doLayout:function(shallow){Ext.Panel.superclass.doLayout.call(this,shallow);if(this.topToolbar){this.topToolbar.doLayout();} -if(this.bottomToolbar){this.bottomToolbar.doLayout();} -if(this.fbar){this.fbar.doLayout();}},onShow:function(){if(this.floating){return this.el.show();} +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.floating&&!this.hidden&&!this.initHidden){this.el.show();} +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);} this.setAutoScroll();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);} @@ -1281,11 +1251,10 @@ 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'){w=this.adjustBodyWidth(w-this.getFrameWidth());if(this.tbar){this.tbar.setWidth(w);if(this.topToolbar){this.topToolbar.setSize(w);}} -if(this.bbar){this.bbar.setWidth(w);if(this.bottomToolbar){this.bottomToolbar.setSize(w);}} -if(this.fbar){this.fbar.setSize(w-this.fbar.container.getFrameWidth('lr'));} -this.body.setWidth(w);}else if(w=='auto'){this.body.setWidth(w);} +Ext.Panel.superclass.onEnable.call(this);},onResize:function(w,h){if(w!==undefined||h!==undefined){if(!this.collapsed){if(typeof w=='number'){w=this.adjustBodyWidth(w-this.getFrameWidth());this.body.setWidth(w);}else if(w=='auto'){this.body.setWidth(w);} if(typeof h=='number'){h=this.adjustBodyHeight(h-this.getFrameHeight());this.body.setHeight(h);}else if(h=='auto'){this.body.setHeight(h);} +if(this.tbar){this.tbar.setWidth(w);if(this.topToolbar){this.topToolbar.setSize(w);}} +if(this.bbar){this.bbar.setWidth(w);if(this.bottomToolbar){this.bottomToolbar.setSize(w);}} if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight());}}else{this.queuedBodySize={width:w,height:h};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;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();},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');} @@ -1294,26 +1263,24 @@ (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(){if(this.header){this.header.removeAllListeners();if(this.headerAsText){Ext.Element.uncache(this.header.child('span'));}} -Ext.Element.uncache(this.header,this.tbar,this.bbar,this.footer,this.body,this.bwrap);if(this.tools){for(var k in this.tools){Ext.destroy(this.tools[k]);}} +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);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,this.fbar);Ext.Panel.superclass.beforeDestroy.call(this);},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.destroy(this.topToolbar,this.bottomToolbar);Ext.Panel.superclass.beforeDestroy.call(this);},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();this.mask.on('click',this.focus,this);}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget);} +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(){this.hide();if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,'scroll',this.doAnchor,this);} -Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask);Ext.Window.superclass.beforeDestroy.call(this);},onDestroy:function(){if(this.manager){this.manager.unregister(this);} +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,this.mask);Ext.Window.superclass.beforeDestroy.call(this);},onDestroy:function(){if(this.manager){this.manager.unregister(this);} Ext.Window.superclass.onDestroy.call(this);},initTools:function(){if(this.minimizable){this.addTool({id:'minimize',handler:this.minimize.createDelegate(this,[])});} if(this.maximizable){this.addTool({id:'maximize',handler:this.maximize.createDelegate(this,[])});this.addTool({id:'restore',handler:this.restore.createDelegate(this,[]),hidden:true});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();if(this.layout){this.doLayout();} -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'&&this.fbar){f=this.fbar.items.get(db);}else if(t=='string'){f=Ext.getCmp(db);}else{f=db;}} -f=f||this.focusEl;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.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;} @@ -1343,9 +1310,8 @@ 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){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,'scroll',this.doAnchor,this);} -this.doAnchor=function(){this.alignTo(el,alignment,offsets);};Ext.EventManager.onWindowResize(this.doAnchor,this);var tm=typeof monitorScroll;if(tm!='undefined'){Ext.EventManager.on(window,'scroll',this.doAnchor,this,{buffer:tm=='number'?monitorScroll:50});} -this.doAnchor();return this;},toFront:function(e){if(this.manager.bringToFront(this)){if(!e||!e.getTarget().focus){this.focus();}} +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();}}); @@ -1430,7 +1396,7 @@ this.sortState=state;var cs=this.view.columns,sortColumn=-1;for(var i=0,len=cs.length;i<len;i++){if(cs[i].dataIndex==state.field){sortColumn=i;break;}} if(sortColumn!=-1){var sortDir=state.direction;this.updateSortIcon(sortColumn,sortDir);}},updateSortIcon:function(col,dir){var sc=this.sortClasses;var hds=this.view.innerHd.select('em').removeClass(sc);hds.item(col).addClass(sc[dir=="DESC"?1:0]);},onHdClick:function(e){var hd=e.getTarget('em',3);if(hd&&!this.view.disableHeaders){var index=this.view.findHeaderIndex(hd);this.view.store.sort(this.view.columns[index].dataIndex);}}}); -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=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>');var el=document.createElement("div");el.id=this.getId();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");} +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=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>');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)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",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,showToday:true,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);} @@ -1462,13 +1428,13 @@ 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++){var 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]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn);}}});Ext.reg('datepicker',Ext.DatePicker); +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]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.mbtn,this.todayBtn);}}});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',activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:'__',itemCls:'x-tab-item',elements:'body',headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;Ext.TabPanel.superclass.initComponent.call(this);this.addEvents('beforetabchange','tabchange','contextmenu');this.setLayout(new Ext.layout.CardLayout({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();if(this.activeTab!==undefined&&typeof this.activeTab!='object'){this.activeTab=this.items.get(this.activeTab);}},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');} +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}});var beforeEl=(this.tabPosition=='bottom'?this.stripWrap:null);this.stripSpacer=st.createChild({cls:'x-tab-strip-spacer'},beforeEl);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:'li',cls:'x-tab-edge'});this.strip.createChild({cls:'x-clear'});this.body.addClass('x-tab-panel-body-'+this.tabPosition);if(!this.itemTpl){var tt=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>','</em></a></li>');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,{target:this});this.on('remove',this.onRemove,this,{target:this});this.strip.on('mousedown',this.onStripMouseDown,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(this.idDelimiter)[1]);if(item.disabled){return{close:null,item:null,el:null};}} +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('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(this.idDelimiter)[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){if(e.button!=0){return;} e.preventDefault();var t=this.findTargets(e);if(t.close){if(t.item.fireEvent('close',t.item)!==false){this.remove(t.item);} return;} @@ -1477,9 +1443,9 @@ if(item.iconCls){cls+=' x-tab-with-icon';} if(item.tabCls){cls+=' '+item.tabCls;} var p={id:this.id+this.idDelimiter+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.tabEl=el;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();} +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.destroy(Ext.get(this.getTabEl(item)));this.stack.remove(item);item.un('disable',this.onItemDisabled,this);item.un('enable',this.onItemEnabled,this);item.un('titlechange',this.onItemTitleChanged,this);item.un('beforeshow',this.onBeforeShowItem,this);if(item==this.activeTab){var next=this.stack.next();if(next){this.setActiveTab(next);}else{this.setActiveTab(0);}} +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);item.un('disable',this.onItemDisabled,this);item.un('enable',this.onItemEnabled,this);item.un('titlechange',this.onItemTitleChanged,this);item.un('beforeshow',this.onBeforeShowItem,this);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){var itemId=(typeof item==='number')?this.items.items[item].getItemId():item.getItemId();return document.getElementById(this.id+this.idDelimiter+itemId);},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();} this.stack.remove(item);},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;} @@ -1498,9 +1464,7 @@ 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)){wd.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');},beforeDestroy:function(){if(this.items){this.items.each(function(item){if(item&&item.tabEl){Ext.get(item.tabEl).removeAllListeners();item.tabEl=null;}},this);} -if(this.strip){this.strip.removeAllListeners();} -Ext.TabPanel.superclass.beforeDestroy.apply(this);}});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]);}} +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.BoxComponent,{hidden:false,disabled:false,pressed:false,enableToggle:false,menuAlign:"tl-bl?",type:'button',menuClassTarget:'tr:nth(2)',clickEvent:'click',handleMouseEvents:true,tooltipType:'qtip',buttonSelector:"button:first",scale:'small',iconAlign:'left',arrowAlign:'right',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);} @@ -1508,16 +1472,15 @@ return[this.text||' ',this.type,this.iconCls||'',cls,'x-btn-'+this.scale+' x-btn-icon-'+this.scale+'-'+this.iconAlign,this.getMenuClass()];},getMenuClass:function(){return this.menu?(this.arrowAlign!='bottom'?'x-btn-arrow':'x-btn-arrow-bottom'):'';},onRender:function(ct,position){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">','<tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr>','<tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i> </i></td></tr>','<tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr>',"</tbody></table>");Ext.Button.buttonTemplate.compile();} this.template=Ext.Button.buttonTemplate;} var btn,targs=this.getTemplateArgs();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);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(btn,btnEl){this.el=btn;if(this.id){this.el.dom.id=this.el.id=this.id;} -if(this.icon){btnEl.setStyle('background-image','url('+this.icon+')');} +var btnEl=btn.child(this.buttonSelector);btnEl.on('focus',this.onFocus,this);btnEl.on('blur',this.onBlur,this);this.initButtonEl(btn,btnEl);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(btn,btnEl){this.el=btn;if(this.icon){btnEl.setStyle('background-image','url('+this.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.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.doAutoWidth.defer(1,this);}else{this.doAutoWidth();}},setIconClass:function(cls){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,cls);} -this.iconCls=cls;},beforeDestroy:function(){if(this.rendered){var btnEl=this.el.child(this.buttonSelector);if(btnEl){if(this.tooltip){Ext.QuickTips.unregister(btnEl);} -btnEl.removeAllListeners();}} +this.iconCls=cls;},beforeDestroy:function(){if(this.rendered){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);}},doAutoWidth:function(){if(this.el&&this.text&&typeof this.width=='undefined'){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-mc "+this.buttonSelector).update(text);} this.doAutoWidth();},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);} @@ -1561,15 +1524,14 @@ this.cleanup(this.leftTr);this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(target);},cleanup:function(row){var cn=row.childNodes;for(var i=cn.length-1,c;i>=0&&(c=cn[i]);i--){if(!c.firstChild){row.removeChild(c);}}},insertCell:function(c,side,pos){var td=document.createElement('td');td.className='x-toolbar-cell';side.insertBefore(td,side.childNodes[pos]||null);return td;},hideItem:function(item){var h=(this.hiddens=this.hiddens||[]);h.push(item);item.xtbHidden=true;item.xtbWidth=item.getDomPositionEl().dom.parentNode.offsetWidth;item.hide();},unhideItem:function(item){item.show();item.xtbHidden=false;this.hiddens.remove(item);if(this.hiddens.length<1){delete this.hiddens;}},getItemWidth:function(c){return c.hidden?(c.xtbWidth||0):c.getDomPositionEl().dom.parentNode.offsetWidth;},fitToSize:function(t){var w=t.dom.clientWidth;var lw=this.lastWidth||0;this.lastWidth=w;var iw=t.dom.firstChild.offsetWidth;var clipWidth=w-this.triggerWidth;var hideIndex=-1;if(iw>w||(this.hiddens&&w>lw)){var i,items=this.container.items.items,len=items.length,c;var loopWidth=0;for(i=0;i<len;i++){c=items[i];if(!c.isFill){loopWidth+=this.getItemWidth(c);if(loopWidth>clipWidth){if(!c.xtbHidden){this.hideItem(c);}}else{if(c.xtbHidden){this.unhideItem(c);}}}}} if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent('overflowchange',this.container,true);this.lastOverflow=true;}}else if(this.more){this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent('overflowchange',this.container,false);this.lastOverflow=false;}}},createMenuConfig:function(c,hideOnClick){var cfg=Ext.apply({},c.initialConfig);cfg.hideOnClick=hideOnClick;delete cfg.xtype;return cfg;},addComponentToMenu:function(m,c){if(c instanceof Ext.Toolbar.Separator){m.add('-');}else if(typeof c.isXType=='function'){if(c.isXType('splitbutton')){m.add(this.createMenuConfig(c,true));}else if(c.isXType('button')){m.add(this.createMenuConfig(c,!c.menu));}else if(c.isXType('buttongroup')){m.add('-');c.items.each(function(item){this.addComponentToMenu(m,item);},this);m.add('-');}}},beforeMoreShow:function(m){m.removeAll();for(var i=0,h=this.container.items.items,len=h.length,c;i<len;i++){c=h[i];if(c.xtbHidden){this.addComponentToMenu(m,c);}} if(m.items.length<1){m.add(this.noItemsMenuText);}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({listeners:{beforeshow:this.beforeMoreShow,scope:this}});this.more=new Ext.Button({iconCls:'x-toolbar-more-icon',cls:'x-toolbar-more',menu:this.moreMenu});var td=this.insertCell(this.more,this.extrasTr,100);this.more.render(td);}}});Ext.Container.LAYOUTS['toolbar']=Ext.layout.ToolbarLayout;Ext.Toolbar=function(config){if(Ext.isArray(config)){config={items:config,layout:'toolbar'};}else{config=Ext.apply({layout:'toolbar'},config);if(config.buttons){config.items=config.buttons;}} -Ext.Toolbar.superclass.constructor.call(this,config);};(function(){var T=Ext.Toolbar;Ext.extend(T,Ext.Container,{defaultType:'button',trackMenus:true,internalDefaults:{removeMode:'container',hideParent:true},toolbarCls:'x-toolbar',initComponent:function(){T.superclass.initComponent.call(this);this.addEvents('overflowchange');},onRender:function(ct,position){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+' x-small-editor'}} -this.el=ct.createChild(Ext.apply({id:this.id},this.autoCreate),position);}},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.tag){this.addDom(el);}else if(el.tagName){this.addElement(el);}else if(typeof el=="object"){if(el.xtype){this.addItem(Ext.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(){this.addItem(new T.Fill());},addElement:function(el){var item=new T.Item({el:el});this.addItem(item);return item;},addItem:function(item){Ext.Toolbar.superclass.add.apply(this,arguments);return item;},addButton:function(config){if(Ext.isArray(config)){var buttons=[];for(var i=0,len=config.length;i<len;i++){buttons.push(this.addButton(config[i]));} +Ext.Toolbar.superclass.constructor.call(this,config);};(function(){var T=Ext.Toolbar;Ext.extend(T,Ext.Container,{defaultType:'button',trackMenus:true,internalDefaults:{removeMode:'container',hideParent:true},autoCreate:{cls:'x-toolbar x-small-editor'},initComponent:function(){T.superclass.initComponent.call(this);this.addEvents('overflowchange');},onRender:function(ct,position){this.el=ct.createChild(Ext.apply({id:this.id},this.autoCreate),position);},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.tag){this.addDom(el);}else if(el.tagName){this.addElement(el);}else if(typeof el=="object"){if(el.xtype){this.addItem(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(){this.addItem(new T.Fill());},addElement:function(el){var item=new T.Item({el:el});this.addItem(item);return item;},addItem:function(item){Ext.Toolbar.superclass.add.apply(this,arguments);return item;},addButton:function(config){if(Ext.isArray(config)){var buttons=[];for(var i=0,len=config.length;i<len;i++){buttons.push(this.addButton(config[i]));} return buttons;} var b=config;if(!b.events){b=config.split?new T.SplitButton(config):new T.Button(config);} this.initMenuTracking(b);this.addItem(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){var t=new T.TextItem(text);this.addItem(t);return t;},insertButton:function(index,item){if(Ext.isArray(item)){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);} Ext.Toolbar.superclass.insert.call(this,index,item);return item;},addDom:function(config){var item=new T.Item({autoEl:config});this.addItem(item);return item;},addField:function(field){this.addItem(field);return field;},applyDefaults:function(c){c=Ext.Toolbar.superclass.applyDefaults.call(this,c);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d);}else{Ext.applyIf(c,d);} -return c;},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg('tbitem',T.Item);T.Separator=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'span',cls:'xtb-sep'},position);}});Ext.reg('tbseparator',T.Separator);T.Spacer=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'div',cls:'xtb-spacer',style:this.width?'width:'+this.width+'px':''},position);}});Ext.reg('tbspacer',T.Spacer);T.Fill=Ext.extend(T.Item,{render:Ext.emptyFn,isFill:true});Ext.reg('tbfill',T.Fill);T.TextItem=Ext.extend(T.Item,{constructor:function(config){if(typeof config=='string'){config={autoEl:{cls:'xtb-text',html:config}};}else{config.autoEl={cls:'xtb-text',html:config.text||''};} +return c;},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg('tbitem',T.Item);T.Separator=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'span',cls:'ytb-sep'},position);}});Ext.reg('tbseparator',T.Separator);T.Spacer=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'div',cls:'ytb-spacer'},position);}});Ext.reg('tbspacer',T.Spacer);T.Fill=Ext.extend(T.Item,{render:Ext.emptyFn,isFill:true});Ext.reg('tbfill',T.Fill);T.TextItem=Ext.extend(T.Item,{constructor:function(config){if(typeof config=='string'){config={autoEl:{cls:'xtb-text',html:config}};}else{config.autoEl={cls:'xtb-text',html:config.text||''};} T.TextItem.superclass.constructor.call(this,config);},setText:function(t){if(this.rendered){this.el.dom.innerHTML=t;}else{this.autoEl.html=t;}}});Ext.reg('tbtext',T.TextItem);T.Button=Ext.extend(Ext.Button,{});T.SplitButton=Ext.extend(Ext.SplitButton,{});Ext.reg('tbbutton',T.Button);Ext.reg('tbsplit',T.SplitButton);})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:'x-btn-group',layout:'table',defaultType:'button',frame:true,internalDefaults:{removeMode:'container',hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass('x-btn-group-notitle');} this.on('afterlayout',this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this);},applyDefaults:function(c){c=Ext.ButtonGroup.superclass.applyDefaults.call(this,c);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d);}else{Ext.applyIf(c,d);} return c;},onAfterLayout:function(){var bodyWidth=this.body.getFrameWidth('lr')+this.body.dom.firstChild.offsetWidth;this.body.setWidth(bodyWidth);this.el.setWidth(bodyWidth+this.getFrameWidth());}});Ext.reg('buttongroup',Ext.ButtonGroup); @@ -1580,8 +1542,7 @@ this.cursor=(o.params&&o.params[this.paramNames.start])?o.params[this.paramNames.start]:0;var d=this.getPageData(),ap=d.activePage,ps=d.pages;this.afterTextItem.setText(String.format(this.afterPageText,d.pages));this.field.value=ap;this.first.setDisabled(ap==1);this.prev.setDisabled(ap==1);this.next.setDisabled(ap==ps);this.last.setDisabled(ap==ps);this.refresh.enable();this.updateInfo();this.fireEvent('change',this,d);},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)};},changePage:function(page){this.doLoad(((page-1)*this.pageSize).constrain(0,this.store.getTotalCount()));},onLoadError:function(){if(!this.rendered){return;} this.refresh.enable();},readPage:function(d){var v=this.field.value,pageNum;if(!v||isNaN(pageNum=parseInt(v,10))){this.field.value=d.activePage;return false;} return pageNum;},onPagingKeydown:function(e){var k=e.getKey(),d=this.getPageData(),pageNum;if(k==e.RETURN){e.stopEvent();pageNum=this.readPage(d);if(pageNum!==false){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.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.value=pageNum;}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(start){var o={},pn=this.paramNames;o[pn.start]=start;o[pn.limit]=this.pageSize;if(this.fireEvent('beforechange',this,o)!==false){this.store.load({params:o});}},onClick:function(button){var store=this.store;switch(button){case this.first:this.doLoad(0);break;case this.prev:this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case this.next:this.doLoad(this.cursor+this.pageSize);break;case this.last:var total=store.getTotalCount();var extra=total%this.pageSize;var lastStart=extra?(total-extra):total-this.pageSize;this.doLoad(lastStart);break;case this.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;this.paramNames.start=store.paramNames.start;this.paramNames.limit=store.paramNames.limit;},onDestroy:function(){if(this.store){this.unbind(this.store);} -Ext.PagingToolbar.superclass.onDestroy.call(this);}});})();Ext.reg('paging',Ext.PagingToolbar); +pageNum+=increment;if(pageNum>=1&pageNum<=d.pages){this.field.value=pageNum;}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(start){var o={},pn=this.paramNames;o[pn.start]=start;o[pn.limit]=this.pageSize;if(this.fireEvent('beforechange',this,o)!==false){this.store.load({params:o});}},onClick:function(button){var store=this.store;switch(button){case this.first:this.doLoad(0);break;case this.prev:this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case this.next:this.doLoad(this.cursor+this.pageSize);break;case this.last:var total=store.getTotalCount();var extra=total%this.pageSize;var lastStart=extra?(total-extra):total-this.pageSize;this.doLoad(lastStart);break;case this.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;this.paramNames.start=store.paramNames.start;this.paramNames.limit=store.paramNames.limit;}});})();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";}} @@ -1609,17 +1570,14 @@ 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){if(this.dd){this.dd.destroy();} -if(this.overlay){Ext.destroy(this.overlay);this.overlay=null;} -Ext.destroy(this.proxy);this.proxy=null;var ps=Ext.Resizable.positions;for(var k in ps){if(typeof ps[k]!="function"&&this[ps[k]]){this[ps[k]].destroy();}} -if(removeEl){this.el.update("");Ext.destroy(this.el);this.el=null;}},syncHandleHeight:function(){var h=this.el.getHeight(true);if(this.west){this.west.el.setHeight(h);} +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);},destroy:function(){Ext.destroy(this.el);this.el=null;}}; +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){if(field.field){this.field=Ext.create(field.field,'textfield');config=Ext.apply({},field);delete config.field;}else{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","canceledit","specialkey");},onRender:function(ct,position){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:ct,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex);} -this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!='title'){this.field.msgTarget='qtip';} +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","canceledit","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.inEditor=true;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){var key=e.getKey();if(this.completeOnEnter&&key==e.ENTER){e.stopEvent();this.completeEdit();}else if(this.cancelOnEsc&&key==e.ESC){this.cancelEdit();}else{this.fireEvent('specialkey',field,e);} @@ -1637,7 +1595,7 @@ this.fireEvent("startedit",this.boundEl,this.startValue);},deferredFocus:function(){if(this.editing){this.field.focus();}},cancelEdit:function(remainVisible){if(this.editing){var v=this.getValue();this.setValue(this.startValue);if(remainVisible!==true){this.hide();} this.fireEvent("canceledit",this,v,this.startValue);}},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(){Ext.destroy(this.field);this.field=null;}});Ext.reg('editor',Ext.Editor); +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){if(dlg.isVisible()){dlg.hide();Ext.callback(opt.fn,opt.scope||window,[button,activeTextEl.dom.value,opt],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();} @@ -1661,7 +1619,7 @@ 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,value){this.show({title:title,msg:msg,buttons:this.OKCANCEL,fn:fn,minWidth:250,scope:scope,prompt:true,multiline:multiline,value:value});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,closeAction:'hide',initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=',header';}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:'close',handler:this[this.closeAction],scope:this});}},showAt:function(xy){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!='number')){this.doAutoWidth();} +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')){this.doAutoWidth();} if(this.constrainPosition){xy=this.el.adjustForConstraints(xy);} this.setPagePosition(xy[0],xy[1]);},doAutoWidth:function(){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(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true;}},showBy:function(el,pos){if(!this.rendered){this.render(Ext.getBody());} @@ -1718,13 +1676,12 @@ return t;},delegateOut:function(e,t){if(!this.beforeEvent(e)){return;} if(e.getTarget('.x-tree-ec-icon',1)){var n=this.getNode(e);this.onIconOut(e,n);if(n==this.lastEcOver){delete this.lastEcOver;}} if((t=this.getNodeTarget(e))&&!e.within(t,true)){this.onNodeOut(e,this.getNode(e));}},delegateOver:function(e,t){if(!this.beforeEvent(e)){return;} -if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on('mouseover',this.trackExit,this);this.trackingDoc=true;} if(this.lastEcOver){this.onIconOut(e,this.lastEcOver);delete this.lastEcOver;} if(e.getTarget('.x-tree-ec-icon',1)){this.lastEcOver=this.getNode(e);this.onIconOver(e,this.lastEcOver);} -if(t=this.getNodeTarget(e)){this.onNodeOver(e,this.getNode(e));}},trackExit:function(e){if(this.lastOverNode&&!e.within(this.lastOverNode.ui.getEl())){this.onNodeOut(e,this.lastOverNode);delete this.lastOverNode;Ext.getBody().un('mouseover',this.trackExit,this);this.trackingDoc=false;}},delegateClick:function(e,t){if(!this.beforeEvent(e)){return;} +if(t=this.getNodeTarget(e)){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){this.lastOverNode=node;node.ui.onOver(e);},onNodeOut:function(e,node){node.ui.onOut(e);},onIconOver:function(e,node){node.ui.addClass('x-tree-ec-over');},onIconOut:function(e,node){node.ui.removeClass('x-tree-ec-over');},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;} +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);},onIconOver:function(e,node){node.ui.addClass('x-tree-ec-over');},onIconOut:function(e,node){node.ui.removeClass('x-tree-ec-over');},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);} @@ -1762,7 +1719,7 @@ 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?this.parentNode.getPath():this.getPath(),false,function(){var node=tree.getNodeById(this.id);tree.getTreeEl().scrollChildIntoView(node.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.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(){var node=tree.getNodeById(this.id);tree.getTreeEl().scrollChildIntoView(node.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);} @@ -1857,7 +1814,7 @@ this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[node.ui.textNode,node.text]);return false;}},bindScroll:function(){this.tree.getTreeEl().on('scroll',this.cancelEdit,this);},beforeNodeClick:function(node,e){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(node)){e.stopEvent();return this.triggerEdit(node);}},onNodeDblClick:function(node,e){clearTimeout(this.autoEditTimer);},updateNode:function(ed,value){this.tree.getTreeEl().un('scroll',this.cancelEdit,this);this.editNode.setText(value);},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui);}},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(Ext.isArray(config)){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(false,Ext.Container.prototype.getComponentId);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,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:this.zIndex||15000});},render:function(){if(this.el){return;} +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,ignoreParentClicks: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();if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this);} if(this.plain){el.addClass("x-menu-plain");} if(this.cls){el.addClass(this.cls);} @@ -1877,7 +1834,7 @@ 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.remove(item);item.destroy();},removeAll:function(){if(this.items){var f;while(f=this.items.first()){this.remove(f);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();} +return item;},remove:function(item){this.items.removeKey(item.id);item.destroy();},removeAll:function(){if(this.items){var f;while(f=this.items.first()){this.remove(f);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();} this.removeAll();if(this.ul){this.ul.removeAllListeners();} if(this.el){this.el.destroy();}},beforeDestroy:Ext.emptyFn});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;}}}); @@ -1900,9 +1857,9 @@ 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,clickHideDelay:1,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.itemId||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);} +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.clickHideDelay,this.parentMenu,[true]);}},expandMenu:function(autoActivate){},hideMenu:function(){}}); +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(cfg){if(typeof cfg=='string'){cfg={text:cfg}} Ext.menu.TextItem.superclass.constructor.call(this,cfg);};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);}}); @@ -1940,7 +1897,7 @@ 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]);},getItemCt:function(){return this.el.up('.x-form-item',4);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);} +this.el.addClass([this.fieldClass,this.cls]);},getItemCt:function(){return this.el.up('.x-form-item',4);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);} this.originalValue=this.getValue();},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();this.initValue();},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||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var o=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,o);},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);} @@ -1955,7 +1912,7 @@ this.fireEvent('valid',this);},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget];},getErrorCt:function(){return this.el.findParent('.x-form-element',5,true)||this.el.findParent('.x-form-field-wrap',5,true);},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,'tl-tr',[2,0]);},getRawValue:function(){var v=this.rendered?this.el.getValue():Ext.value(this.value,'');if(v===this.emptyText){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();}},append:function(v){this.setValue([this.getValue(),v].join(''));},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);if(this.offsetCt){var ct=this.getItemCt();s.width-=ct.getFrameWidth('lr');s.height-=ct.getFrameWidth('tb');} +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);if(this.offsetCt){var ct=this.getItemCt();s.width-=ct.getFrameWidth('lr');s.height-=ct.getFrameWidth('tb');} 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 this.inEditor?w: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;} @@ -1972,7 +1929,7 @@ 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.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this);} if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);this.el.on("keypress",this.onKeyPress,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);}},onKeyUpBuffered:function(e){if(!e.isNavKeyPress()){this.autoSize();}},onKeyUp:function(e){this.fireEvent('keyup',this,e);},onKeyDown:function(e){this.fireEvent('keydown',this,e);},onKeyPress:function(e){this.fireEvent('keypress',this,e);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass);}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue('');} +return value;},filterValidation:function(e){if(!e.isNavKeyPress()){this.validationTask.delay(this.validationDelay);}},onKeyUpBuffered:function(e){if(!e.isNavKeyPress()){this.autoSize();}},onKeyUp:function(e){this.fireEvent('keyup',this,e);},onKeyDown:function(e){this.fireEvent('keydown',this,e);},onKeyPress:function(e){this.fireEvent('keypress',this,e);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},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){if(e.ctrlKey){return;} var k=e.getKey();if(Ext.isGecko&&(e.isNavKeyPress()||k==e.BACKSPACE||(k==e.DELETE&&e.button==-1))){return;} @@ -2018,14 +1975,14 @@ Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:'x-form-date-trigger',showToday:true,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.disabledDatesRE=null;this.initDisabledDays();},initDisabledDays:function(){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=null;this.initDisabledDays();},initDisabledDays:function(){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.disabledDatesRE=new RegExp(re+")");}},setDisabledDates:function(dd){this.disabledDates=dd;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE);}},setDisabledDays:function(dd){this.disabledDays=dd;if(this.menu){this.menu.picker.setDisabledDays(dd);}},setMinValue:function(dt){this.minValue=(typeof dt=="string"?this.parseDate(dt):dt);if(this.menu){this.menu.picker.setMinDate(this.minValue);}},setMaxValue:function(dt){this.maxValue=(typeof dt=="string"?this.parseDate(dt):dt);if(this.menu){this.menu.picker.setMaxDate(this.maxValue);}},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.disabledDatesRE&&this.disabledDatesRE.test(fvalue)){this.markInvalid(String.format(this.disabledDatesText,fvalue));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||Ext.isDate(value)){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]);}} @@ -2033,13 +1990,8 @@ if(this.wrap){this.wrap.remove();} Ext.form.DateField.superclass.onDestroy.call(this);},formatDate:function(date){return Ext.isDate(date)?date.dateFormat(this.format):date;},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.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,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.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,showToday:this.showToday,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.DisplayField=Ext.extend(Ext.form.Field,{validationEvent:false,validateOnBlur:false,defaultAutoCreate:{tag:"div"},fieldClass:"x-form-display-field",htmlEncode:false,initEvents:function(){},isValid:function(){return true;},validate:function(){return true;},getRawValue:function(){var v=this.rendered?this.el.dom.innerHTML:Ext.value(this.value,'');if(v===this.emptyText){v='';} -if(this.htmlEncode){v=Ext.util.Format.htmlDecode(v);} -return v;},getValue:function(){return this.getRawValue();},setRawValue:function(v){if(this.htmlEncode){v=Ext.util.Format.htmlEncode(v);} -return this.rendered?(this.el.dom.innerHTML=(v===null||v===undefined?'':v)):(this.value=v);},setValue:function(v){this.setRawValue(v);}});Ext.reg('displayfield',Ext.form.DisplayField); - Ext.form.ComboBox=Ext.extend(Ext.form.TriggerField,{defaultAutoCreate:{tag:"input",type:"text",size:"24",autocomplete:"off"},listClass:'',selectedClass:'x-combo-selected',triggerClass:'x-form-arrow-trigger',shadow:'sides',listAlign:'tl-bl?',maxHeight:300,minHeight:90,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]);} @@ -2058,9 +2010,8 @@ 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();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this);},"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){Ext.destroy(this.view);} -if(this.list){if(this.innerList){this.innerList.un('mouseover',this.onViewOver,this);this.innerList.un('mousemove',this.onViewMove,this);} -this.list.destroy();} +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);},unsetDelayCheck:function(){delete this.delayedCheck;},fireKey:function(e){if(e.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){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'));}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false;}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true;}},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?'<div class="loading-indicator">'+this.loadingText+'</div>':'');this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){if(!this.hasFocus){return;} @@ -2129,8 +2080,8 @@ return this;},getValues:function(asString){var fs=Ext.lib.Ajax.serializeForm(this.el.dom);if(asString===true){return fs;} return Ext.urlDecode(fs);},getFieldValues:function(){var o={};this.items.each(function(f){o[f.getName()]=f.getValue();});return o;},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;},callFieldMethod:function(fnName,args){args=args||[];this.items.each(function(f){if(typeof f[fnName]=='function'){f[fnName].apply(f,args);}});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.bodyCfg={tag:'form',cls:this.baseCls+'-body',method:this.method||'POST',id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype='multipart/form-data';} -this.initItems();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.isFormField){f.add(c);}if(c.isFieldWrap){Ext.applyIf(c,{labelAlign:c.ownerCt.labelAlign,labelWidth:c.ownerCt.labelWidth,itemCls:c.ownerCt.itemCls});f.add(c.field);}else 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);}}} +Ext.FormPanel=Ext.extend(Ext.Panel,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,initComponent:function(){this.form=this.createForm();this.bodyCfg={tag:'form',cls:this.baseCls+'-body',method:this.method||'POST',id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype='multipart/form-data';} +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.isFormField){f.add(c);}if(c.isFieldWrap){Ext.applyIf(c,{labelAlign:c.ownerCt.labelAlign,labelWidth:c.ownerCt.labelWidth,itemCls:c.ownerCt.itemCls});f.add(c.field);}else 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);}}} 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);this.form.initEl(this.body);},beforeDestroy:function(){Ext.FormPanel.superclass.beforeDestroy.call(this);this.stopMonitoring();Ext.destroy(this.form);},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.items.on('remove',this.onRemove,this);this.items.on('add',this.onAdd,this);if(this.monitorValid){this.startMonitoring();}},onAdd:function(ct,c){if(c.isFormField){this.form.add(c);}},onRemove:function(c){if(c.isFormField){Ext.destroy(c.container.up('.x-form-item'));this.form.remove(c);}},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; @@ -2138,15 +2089,15 @@ 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;if(this.title||this.header||this.checkboxToggle){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']();},beforeDestroy:function(){if(this.checkbox){this.checkbox.un('click',this.onCheckClick,this);} -Ext.form.FieldSet.superclass.beforeDestroy.call(this);}});Ext.reg('fieldset',Ext.form.FieldSet); +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('<option value="',lc,'" style="font-family:',ff,';"',(this.defaultFont==lc?' selected="true">':'>'),ff,'</option>');} return buf.join('');},createToolbar:function(editor){var tipsEnabled=Ext.QuickTips&&Ext.QuickTips.isEnabled();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:tipsEnabled?editor.buttonTips[id]||undefined: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.isSafari2){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:tipsEnabled?editor.buttonTips['forecolor']||undefined: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:tipsEnabled?editor.buttonTips['backcolor']||undefined: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.isSafari2){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'<html><head><style type="text/css">body{border:0;margin:0;padding:3px;height:98%;cursor:text;}</style></head><body></body></html>';},getEditorBody:function(){return this.doc.body||this.doc.documentElement;},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document);},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name];},onRender:function(ct,position){Ext.form.HtmlEditor.superclass.onRender.call(this,ct,position);this.el.dom.style.border='0 none';this.el.dom.setAttribute('tabIndex',-1);this.el.addClass('x-hidden');if(Ext.isIE){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();}});this.tb.doLayout();this.createIFrame();if(!this.width){var sz=this.el.getSize();this.setSize(sz.width,this.height||sz.height);}},createIFrame:function(){var iframe=document.createElement('iframe');iframe.name=Ext.id();iframe.frameBorder='0';iframe.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(iframe);this.iframe=iframe;this.initFrame();if(this.autoMonitorDesignMode!==false){this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100});}},initFrame:function(){this.doc=this.getDoc();this.win=this.getWin();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);},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var doc=this.getDoc();if(!doc){return;} +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();}});this.tb.doLayout();var iframe=document.createElement('iframe');iframe.name=Ext.id();iframe.frameBorder='0';iframe.src=Ext.isIE?Ext.SSL_SECURE_URL:"javascript:;";this.wrap.dom.appendChild(iframe);this.iframe=iframe;this.initFrame();if(this.autoMonitorDesignMode!==false){this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100});} +if(!this.width){var sz=this.el.getSize();this.setSize(sz.width,this.height||sz.height);}},initFrame:function(){this.doc=this.getDoc();this.win=this.getWin();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);},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var doc=this.getDoc();if(!doc){return;} if(!doc.editorInitialized||String(doc.designMode).toLowerCase()!='on'){this.initFrame();}}},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;} @@ -2207,8 +2158,8 @@ 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[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;}} -if(this.store){var ss=this.store.getSortState();if(ss){o.sort=ss;}} +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();if(this.deferRowRender){this.view.afterRender.defer(10,this.view);}else{this.view.afterRender();} 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();} @@ -2240,12 +2191,12 @@ return this.fly(el).findParent(this.cellSelector,this.cellSelectorDepth);},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,this.rowSelectorDepth);},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));this.syncFocusEl(row);},removeRows:function(firstRow,lastRow){var bd=this.mainBody.dom;for(var rowIndex=firstRow;rowIndex<=lastRow;rowIndex++){Ext.removeNode(bd.childNodes[firstRow]);} -this.syncFocusEl(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(){this.syncHeaderScroll();var mb=this.scroller.dom;this.grid.fireEvent("bodyscroll",mb.scrollLeft,mb.scrollTop);},syncHeaderScroll:function(){var mb=this.scroller.dom;this.innerHd.scrollLeft=mb.scrollLeft;this.innerHd.scrollLeft=mb.scrollLeft;},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);} +return this.fly(el).findParent(this.rowSelector,this.rowSelectorDepth);},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));this.focusRow(row);},removeRows:function(firstRow,lastRow){var bd=this.mainBody.dom;for(var rowIndex=firstRow;rowIndex<=lastRow;rowIndex++){Ext.removeNode(bd.childNodes[firstRow]);} +this.focusRow(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(){this.syncHeaderScroll();var mb=this.scroller.dom;this.grid.fireEvent("bodyscroll",mb.scrollLeft,mb.scrollTop);},syncHeaderScroll:function(){var mb=this.scroller.dom;this.innerHd.scrollLeft=mb.scrollLeft;this.innerHd.scrollLeft=mb.scrollLeft;},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(),row,trow;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;trow=row.firstChild.rows[0];for(var j=0;j<clen;j++){trow.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(),row;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;row.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(),row;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;row.firstChild.rows[0].childNodes[col].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;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";} @@ -2254,39 +2205,35 @@ 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","");}}}},afterRender:function(){if(!this.ds||!this.cm){return;} -this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText();}},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();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(isAlt){row.className+=" x-grid3-row-alt";}else{row.className=row.className.replace("x-grid3-row-alt","");}}}},afterRender:function(){this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText();}},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();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.trackMouseOver){this.mainBody.on("mouseover",this.onRowOver,this);this.mainBody.on("mouseout",this.onRowOut,this);} if(g.enableDragDrop||g.enableDrag){this.dragZone=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();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.syncHeaderScroll();} -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=[],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);p.tooltip=this.getColumnTooltip(i);if(cm.config[i].align=='right'){p.istyle='padding-right:16px';}else{delete p.istyle;} +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);p.tooltip=this.getColumnTooltip(i);if(cm.config[i].align=='right'){p.istyle='padding-right:16px';}else{delete p.istyle;} cb[cb.length]=ct.apply(p);} return ts.header.apply({cells:cb.join(""),tstyle:'width:'+this.getTotalWidth()+';'});},getColumnTooltip:function(i){var tt=this.cm.getColumnTooltip(i);if(tt){if(Ext.QuickTips.isEnabled()){return'ext:qtip="'+tt+'"';}else{return'title="'+tt+'"';}} -return"";},beforeUpdate:function(){this.grid.stopEditing(true);},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();},focusRow:function(row){this.focusCell(row,0,false);},focusCell:function(row,col,hscroll){this.syncFocusEl(this.ensureVisible(row,col,hscroll));if(Ext.isGecko){this.focusEl.focus();}else{this.focusEl.focus.defer(1,this.focusEl);}},resolveCell:function(row,col,hscroll){if(typeof row!="number"){row=row.rowIndex;} -if(!this.ds){return null;} -if(row<0||row>=this.ds.getCount()){return null;} +return"";},beforeUpdate:function(){this.grid.stopEditing(true);},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();},focusRow:function(row){this.focusCell(row,0,false);},focusCell:function(row,col,hscroll){row=Math.min(row,Math.max(0,this.getRows().length-1));var xy=this.ensureVisible(row,col,hscroll);this.focusEl.setXY(xy||this.scroller.getXY());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(!this.ds){return;} +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);} -return{row:rowEl,cell:cellEl};},getResolvedXY:function(resolved){if(!resolved){return null;} -var s=this.scroller.dom,c=resolved.cell,r=resolved.row;return c?Ext.fly(c).getXY():[s.scrollLeft+this.el.getX(),Ext.fly(r).getY()];},syncFocusEl:function(row,col,hscroll){var xy=row;if(!Ext.isArray(xy)){row=Math.min(row,Math.max(0,this.getRows().length-1));xy=this.getResolvedXY(this.resolveCell(row,col,hscroll));} -this.focusEl.setXY(xy||this.scroller.getXY());},ensureVisible:function(row,col,hscroll){var resolved=this.resolveCell(row,col,hscroll);if(!resolved||!resolved.row){return;} -var rowEl=resolved.row,cellEl=resolved.cell;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;} +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 this.getResolvedXY(resolved);},insertRows:function(dm,firstRow,lastRow,isUpdate){if(!isUpdate&&firstRow===0&&lastRow>=dm.getCount()-1){this.refresh();}else{if(!isUpdate){this.fireEvent("beforerowsinserted",this,firstRow,lastRow);} +return cellEl?Ext.fly(cellEl).getXY():[c.scrollLeft+this.el.getX(),Ext.fly(rowEl).getY()];},insertRows:function(dm,firstRow,lastRow,isUpdate){if(!isUpdate&&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);}} -this.syncFocusEl(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;';} +this.focusRow(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,i;var tw=cm.getTotalWidth(false);var aw=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(aw<20){return;} +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;}} @@ -2296,26 +2243,26 @@ 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);} -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(true);var result=this.renderBody();this.mainBody.update(result);if(headersToo===true){this.updateHeaders();this.updateHeaderSortState();} +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(true);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('<div class="x-grid-empty">'+this.emptyText+'</div>');}},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){Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.destroy();delete this.colMenu;} -if(this.hmenu){Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.destroy();delete this.hmenu;} +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];}} -if(this.dragZone){this.dragZone.unreg();} -Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);Ext.destroy(this.resizeMarker,this.resizeProxy,this.focusEl,this.mainBody,this.scroller,this.mainHd,this.mainWrap,this.dragZone,this.splitone,this.columnDrag,this.columnDrop);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},onDenyColumnHide:function(){},render:function(){if(this.autoFill){this.fitColumns(true,true);}else if(this.forceFit){this.fitColumns(true,false);}else if(this.grid.autoExpandColumn){this.autoExpand(true);} +Ext.destroy(this.resizeMarker,this.resizeProxy);if(this.dragZone){this.dragZone.unreg();} +this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},onDenyColumnHide:function(){},render:function(){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();},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){delete this.lastViewWidth;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();this.syncFocusEl(0);},onClear:function(){this.refresh();this.syncFocusEl(0);},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);},initEvents:function(){},onHeaderClick:function(g,index){if(this.headersDisabled||!this.cm.isSortable(index)){return;} -g.stopEditing(true);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&&!e.within(this.getRow(row),true)){this.removeRowClass(row,"x-grid3-row-over");}},handleWheel:function(e){e.stopPropagation();},onRowSelect:function(row){this.addRowClass(row,this.selectedRowClass);},onRowDeselect:function(row){this.removeRowClass(row,this.selectedRowClass);},onCellSelect:function(row,col){var cell=this.getCell(row,col);if(cell){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.syncHeaderScroll();} +this.cm=cm;},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.focusRow(0);},onClear:function(){this.refresh();this.focusRow(0);},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(true);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,this.selectedRowClass);},onRowDeselect:function(row){this.removeRowClass(row,this.selectedRowClass);},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.isMenuDisabled(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)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'e-resize':'col-resize';}else if(r.right-x<=(!this.activeHdBtn?hw:2)&&this.cm.isResizable(this.activeHdIndex)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'w-resize':'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];var w=t.offsetWidth,adjust=false;if((ex-x)<=this.hw){adjust=-1;}else if((x+w)-ex<=this.hw){adjust=0;} +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.isMenuDisabled(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)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'e-resize':'col-resize';}else if(r.right-x<=(!this.activeHdBtn?hw:2)&&this.cm.isResizable(this.activeHdIndex)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'w-resize':'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){if(ci+adjust<0){return;} 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);}}); @@ -2364,9 +2311,11 @@ 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){if(config.columns){Ext.apply(this,config);this.setConfig(config.columns,true);}else{this.setConfig(config,true);} -this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","columnlockchange","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this);};Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{defaultWidth:100,defaultSortable:false,getColumnId:function(index){return this.config[index].id;},getColumnAt:function(index){return this.config[index];},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(!c.isColumn){var cls=Ext.grid.Column.types[c.xtype||'gridcolumn'];c=new cls(c);config[i]=c;} +Ext.grid.ColumnModel=function(config){this.defaultWidth=100;this.defaultSortable=false;if(config.columns){Ext.apply(this,config);this.setConfig(config.columns,true);}else{this.setConfig(config,true);} +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='xgc'+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;} @@ -2378,7 +2327,7 @@ return this.config[col].sortable;},isMenuDisabled:function(col){return!!this.config[col].menuDisabled;},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].getCellEditor(rowIndex);},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-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.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;}}); @@ -2416,9 +2365,8 @@ this.on("celldblclick",this.onCellDblClick,this);} this.getGridEl().addClass("xedit-grid");},onCellDblClick:function(g,row,col){this.startEditing(row,col);},onAutoEditClick:function(e,t){if(e.button!==0){return;} var row=this.view.findRowIndex(t);var col=this.view.findCellIndex(t);if(row!==false&&col!==false){this.stopEditing();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);var r=ed.record;var field=this.colModel.getDataIndex(ed.col);value=this.postEditValue(value,startValue,r,field);if(String(value)!==String(startValue)){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){return;} -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=this.preEditValue(r,field);ed.startEdit(this.view.getCell(row,col).firstChild,v===undefined?'':v);}).defer(50,this);}}},preEditValue:function(r,field){var value=r.data[field];return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlDecode(value):value;},postEditValue:function(value,originalValue,r,field){return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlEncode(value):value;},stopEditing:function(cancel){if(this.activeEditor){this.activeEditor[cancel===true?'cancelEdit':'completeEdit']();} +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=this.preEditValue(r,field);ed.startEdit(this.view.getCell(row,col).firstChild,v);}).defer(50,this);}}},preEditValue:function(r,field){var value=r.data[field];return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlDecode(value):value;},postEditValue:function(value,originalValue,r,field){return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlEncode(value):value;},stopEditing:function(cancel){if(this.activeEditor){this.activeEditor[cancel===true?'cancelEdit':'completeEdit']();} this.activeEditor=null;},onDestroy:function(){if(this.rendered){var cols=this.colModel.config;for(var i=0,len=cols.length;i<len;i++){var c=cols[i];Ext.destroy(c.editor);}} Ext.grid.EditorGridPanel.superclass.onDestroy.call(this);}});Ext.reg('editorgrid',Ext.grid.EditorGridPanel); @@ -2431,16 +2379,11 @@ 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(Ext.isDate(val)){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,{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.reg("propertygrid",Ext.grid.PropertyGrid); -Ext.grid.Column=function(config){Ext.apply(this,config);if(typeof this.renderer=="string"){this.renderer=Ext.util.Format[this.renderer];} +Ext.grid.Column=function(config){Ext.apply(this,config);if(typeof this.renderer=="string"){this.renderer=Ext.util.Format[c.renderer];} if(typeof this.id=="undefined"){this.id=++Ext.grid.Column.AUTO_ID;} -if(this.editor){if(this.editor.xtype&&!this.editor.events){this.editor=Ext.create(this.editor,'textfield');}}} -Ext.grid.Column.AUTO_ID=0;Ext.grid.Column.prototype={isColumn:true,renderer:function(value){if(typeof value=="string"&&value.length<1){return" ";} -return value;},getEditor:function(rowIndex){return this.editable!==false?this.editor:null;},getCellEditor:function(rowIndex){var editor=this.getEditor(rowIndex);if(editor){if(!editor.startEdit){if(!editor.gridEditor){editor.gridEditor=new Ext.grid.GridEditor(editor);} -return editor.gridEditor;}else if(editor.startEdit){return editor;}} -return null;}};Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{renderer:function(value){if(value===undefined){return" ";} -if(!value||value==='false'){return"false";} -return'true';}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:'0,000.00',constructor:function(cfg){this.supr().constructor.apply(this,arguments);this.renderer=Ext.util.Format.numberRenderer(this.format);}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:'m/d/Y',constructor:function(cfg){this.supr().constructor.apply(this,arguments);this.renderer=Ext.util.Format.dateRenderer(this.format);}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(cfg){this.supr().constructor.apply(this,arguments);var tpl=typeof this.tpl=='object'?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(value,p,r){return tpl.apply(r.data);} -this.tpl=tpl;}});Ext.grid.Column.types={gridcolumn:Ext.grid.Column,booleancolumn:Ext.grid.BooleanColumn,numbercolumn:Ext.grid.NumberColumn,datecolumn:Ext.grid.DateColumn,templatecolumn:Ext.grid.TemplateColumn}; +if(this.editor&&this.editor.isFormField){this.editor=new Ext.grid.GridEditor(this.editor);}} +Ext.grid.Column.AUTO_ID=0;Ext.grid.Column.prototype={renderer:function(value){if(typeof value=="string"&&value.length<1){return" ";} +return value;}}; 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,menuDisabled:true,dataIndex:'',id:'numberer',rowspan:undefined,renderer:function(v,p,record,rowIndex){if(this.rowspan){p.cellAttr='rowspan="'+this.rowspan+'"';} return rowIndex+1;}}; @@ -2575,7 +2518,7 @@ function updateIFrame(token){var html=['<html><body><div id="state">',token,'</div></body></html>'].join('');try{var doc=iframe.contentWindow.document;doc.open();doc.write(html);doc.close();return true;}catch(e){return false;}} function checkIFrame(){if(!iframe.contentWindow||!iframe.contentWindow.document){setTimeout(checkIFrame,10);return;} var doc=iframe.contentWindow.document;var elem=doc.getElementById("state");var token=elem?elem.innerText:null;var hash=getHash();setInterval(function(){doc=iframe.contentWindow.document;elem=doc.getElementById("state");var newtoken=elem?elem.innerText:null;var newHash=getHash();if(newtoken!==token){token=newtoken;handleStateChange(token);top.location.hash=token;hash=token;doSave();}else if(newHash!==hash){hash=newHash;updateIFrame(newHash);}},50);ready=true;Ext.History.fireEvent('ready',Ext.History);} -function startUp(){currentToken=hiddenField.value?hiddenField.value:getHash();if(Ext.isIE){checkIFrame();}else{var hash=getHash();setInterval(function(){var newHash=getHash();if(newHash!==hash){hash=newHash;handleStateChange(hash);doSave();}},50);ready=true;Ext.History.fireEvent('ready',Ext.History);}} +function startUp(){currentToken=hiddenField.value;if(Ext.isIE){checkIFrame();}else{var hash=getHash();setInterval(function(){var newHash=getHash();if(newHash!==hash){hash=newHash;handleStateChange(hash);doSave();}},50);ready=true;Ext.History.fireEvent('ready',Ext.History);}} return{fieldId:'x-history-field',iframeId:'x-history-frame',events:{},init:function(onReady,scope){if(ready){Ext.callback(onReady,scope,[this]);return;} if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(onReady,scope);});return;} hiddenField=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){iframe=Ext.getDom(Ext.History.iframeId);} Modified: mickael/trunk/ext/v3.0.0-a1/ext-core-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/ext-core-debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/ext-core-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,8 @@ * http://extjs.com/license */ + + Ext.DomHelper = function(){ var tempTableEl = null; @@ -339,6 +341,8 @@ }; }(); + + Ext.Template = function(html){ var a = arguments; @@ -495,6 +499,8 @@ }; + + Ext.DomQuery = function(){ var cache = {}, simpleCache = {}, valueCache = {}; var nonSpace = /\S/; @@ -1182,6 +1188,8 @@ Ext.query = Ext.DomQuery.select; + + Ext.util.Observable = function(){ @@ -1189,36 +1197,18 @@ this.on(this.listeners); delete this.listeners; } - if(!this.events){ - this.events = {}; - } }; Ext.util.Observable.prototype = { fireEvent : function(){ - var a = Array.prototype.slice.call(arguments, 0); - var ename = a[0]; - if(ename === true){ - a.shift(); - var c = this; - while(c){ - if(c.fireEvent.apply(c, a) === false){ - return false; - } - c = c.getBubbleTarget ? c.getBubbleTarget() : null; - } - return true; - } if(this.eventsSuspended === true){ - var q = this.suspendedEventsQueue; - if (q) { - q[q.length] = a; + if (this.suspendedEventsQueue) { + this.suspendedEventsQueue.push(arguments); } } else { - var ce = this.events[ename.toLowerCase()]; + var ce = this.events[arguments[0].toLowerCase()]; if(typeof ce == "object"){ - a.shift(); - return ce.fire.apply(ce, a); + return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); } } return true; @@ -1461,14 +1451,6 @@ }; }; - var createTargeted = function(h, o, scope){ - return function(){ - if(o.target == arguments[0]){ - h.apply(scope, Array.prototype.slice.call(arguments, 0)); - } - }; - }; - Ext.util.Event = function(obj, name){ this.name = name; this.obj = obj; @@ -1494,9 +1476,6 @@ scope = scope || this.obj; var l = {fn: fn, scope: scope, options: o}; var h = fn; - if(o.target){ - h = createTargeted(h, o, scope); - } if(o.delay){ h = createDelayed(h, o, scope); } @@ -1562,6 +1541,8 @@ } }; })(); + + Ext.EventManager = function(){ var docReadyEvent, docReadyProcId, docReadyState = false; @@ -1723,14 +1704,6 @@ }; }; - var createTargeted = function(h, o){ - return function(){ - if(o.target == Ext.EventObject.setEvent(arguments[0]).target){ - h.apply(this, Array.prototype.slice.call(arguments, 0)); - } - }; - }; - var listen = function(element, ename, opt, fn, scope){ var o = (!opt || typeof opt == "boolean") ? {} : opt; fn = fn || o.fn; scope = scope || o.scope; @@ -1769,9 +1742,6 @@ fn.call(scope || el, e, t, o); }; - if(o.target){ - h = createTargeted(h, o); - } if(o.delay){ h = createDelayed(h, o); } @@ -1838,16 +1808,13 @@ docReadyEvent.addListener(fn, scope, options); }, - // private - doResizeEvent: function(){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - }, - onWindowResize : function(fn, scope, options){ if(!resizeEvent){ resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); + resizeTask = new Ext.util.DelayedTask(function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }); E.on(window, "resize", this.fireWindowResize, this); } resizeEvent.addListener(fn, scope, options); @@ -1919,11 +1886,10 @@ var bd = document.body || document.getElementsByTagName('body')[0]; if(!bd){ return false; } var cls = [' ', - Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8')) + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') : Ext.isOpera ? "ext-opera" - : Ext.isSafari ? "ext-safari" - : Ext.isChrome ? "ext-chrome" : ""]; + : Ext.isSafari ? "ext-safari" : ""]; if(Ext.isMac){ cls.push("ext-mac"); @@ -2326,6 +2292,8 @@ return new Ext.EventObjectImpl(); }(); + + (function(){ var D = Ext.lib.Dom; @@ -2880,13 +2848,13 @@ var w, h, d = this.dom, s = d.style; if(s.width && s.width != 'auto'){ w = parseInt(s.width, 10); - if(this.isBorderBox()){ + if(Ext.isBorderBox){ w -= this.getFrameWidth('lr'); } } if(s.height && s.height != 'auto'){ h = parseInt(s.height, 10); - if(this.isBorderBox()){ + if(Ext.isBorderBox){ h -= this.getFrameWidth('tb'); } } @@ -3381,7 +3349,7 @@ getFrameWidth : function(sides, onlyContentBox){ - return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); }, @@ -3452,7 +3420,7 @@ mask : function(msg, msgCls){ if(this.getStyle("position") == "static"){ - this.addClass("x-masked-relative"); + this.setStyle("position", "relative"); } if(this._maskMsg){ this._maskMsg.remove(); @@ -3489,7 +3457,7 @@ this._mask.remove(); delete this._mask; } - this.removeClass(["x-masked", "x-masked-relative"]); + this.removeClass("x-masked"); }, @@ -3958,6 +3926,8 @@ }); })(); + + //Notifies Element that fx methods are available Ext.enableFx = true; @@ -4347,17 +4317,14 @@ var el = this.getFxEl(); o = o || {}; el.queueFx(o, function(){ - var to = o.endOpacity || 0; - arguments.callee.anim = this.fxanim({opacity:{to:to}}, + arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, o, null, .5, "easeOut", function(){ - if(to === 0){ - if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ - this.dom.style.display = "none"; - }else{ - this.dom.style.visibility = "hidden"; - } - this.clearOpacity(); + if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ + this.dom.style.display = "none"; + }else{ + this.dom.style.visibility = "hidden"; } + this.clearOpacity(); el.afterFx(o); }); }); @@ -4658,6 +4625,8 @@ Ext.Element.addMethods(Ext.Fx); + + Ext.CompositeElement = function(els){ this.elements = []; this.addElements(els); @@ -4912,6 +4881,8 @@ }; Ext.select = Ext.Element.select; + + Ext.data.Connection = function(config){ Ext.apply(this, config); @@ -5175,6 +5146,8 @@ return Ext.lib.Ajax.serializeForm(form); } }); + + Ext.Updater = Ext.extend(Ext.util.Observable, { constructor: function(el, forceNew){ @@ -5439,6 +5412,8 @@ Ext.UpdateManager = Ext.Updater; + + Ext.util.DelayedTask = function(fn, scope, args){ var id = null, d, t; Modified: mickael/trunk/ext/v3.0.0-a1/ext-core.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/ext-core.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/ext-core.js 2008-12-01 20:55:57 UTC (rev 32) @@ -129,11 +129,7 @@ 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;} -if(!this.events){this.events={};}};Ext.util.Observable.prototype={fireEvent:function(){var a=Array.prototype.slice.call(arguments,0);var ename=a[0];if(ename===true){a.shift();var c=this;while(c){if(c.fireEvent.apply(c,a)===false){return false;} -c=c.getBubbleTarget?c.getBubbleTarget():null;} -return true;} -if(this.eventsSuspended===true){var q=this.suspendedEventsQueue;if(q){q[q.length]=a;}}else{var ce=this.events[ename.toLowerCase()];if(typeof ce=="object"){a.shift();return ce.fire.apply(ce,a);}} +Ext.util.Observable=function(){if(this.listeners){this.on(this.listeners);delete this.listeners;}};Ext.util.Observable.prototype={fireEvent:function(){if(this.eventsSuspended===true){if(this.suspendedEventsQueue){this.suspendedEventsQueue.push(arguments);}}else{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;} @@ -148,8 +144,7 @@ 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);};};var createTargeted=function(h,o,scope){return function(){if(o.target==arguments[0]){h.apply(scope,Array.prototype.slice.call(arguments,0));}};};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.target){h=createTargeted(h,o,scope);} -if(o.delay){h=createDelayed(h,o,scope);} +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;}} @@ -173,15 +168,14 @@ 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("<s"+'cript id="ie-deferred-loader" defer="defer" src="/'+'/:"></s'+"cript>");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,scope){return function(e){Ext.EventManager.removeListener(el,ename,fn,scope);h(e);};};var createDelayed=function(h,o){return function(e){e=new Ext.EventObjectImpl(e);setTimeout(function(){h(e);},o.delay||10);};};var createTargeted=function(h,o){return function(){if(o.target==Ext.EventObject.setEvent(arguments[0]).target){h.apply(this,Array.prototype.slice.call(arguments,0));}};};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.';} +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,scope){return function(e){Ext.EventManager.removeListener(el,ename,fn,scope);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){if(!window[xname]){return;} 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.target){h=createTargeted(h,o);} -if(o.delay){h=createDelayed(h,o);} +fn.call(scope||el,e,t,o);};if(o.delay){h=createDelayed(h,o);} if(o.single){h=createSingle(h,el,ename,fn,scope);} if(o.buffer){h=createBuffered(h,o);} addListener(el,ename,fn,h,scope);return h;};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;} @@ -190,10 +184,10 @@ return listen(element,eventName,options,fn,scope);},removeListener:function(element,eventName,fn,scope){return removeListener(element,eventName,fn,scope);},removeAll:function(element){return removeAll(element);},onDocumentReady:function(fn,scope,options){if(docReadyState){docReadyEvent.addListener(fn,scope,options);docReadyEvent.fire();docReadyEvent.clearListeners();return;} if(!docReadyEvent){initDocReady();} options=options||{};if(!options.delay){options.delay=1;} -docReadyEvent.addListener(fn,scope,options);},doResizeEvent:function(){resizeEvent.fire(D.getViewWidth(),D.getViewHeight());},onWindowResize:function(fn,scope,options){if(!resizeEvent){resizeEvent=new Ext.util.Event();resizeTask=new Ext.util.DelayedTask(this.doResizeEvent);E.on(window,"resize",this.fireWindowResize,this);} +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;(function(){var initExtCss=function(){var bd=document.body||document.getElementsByTagName('body')[0];if(!bd){return false;} -var cls=[' ',Ext.isIE?"ext-ie "+(Ext.isIE6?'ext-ie6':(Ext.isIE7?'ext-ie7':'ext-ie8')):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?'ext-gecko2':'ext-gecko3'):Ext.isOpera?"ext-opera":Ext.isSafari?"ext-safari":Ext.isChrome?"ext-chrome":""];if(Ext.isMac){cls.push("ext-mac");} +var cls=[' ',Ext.isIE?"ext-ie "+(Ext.isIE6?'ext-ie6':'ext-ie7'):Ext.isGecko?"ext-gecko "+(Ext.isGecko2?'ext-gecko2':'ext-gecko3'):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.parentNode;if(p){p.className+=' ext-strict';}} @@ -249,8 +243,8 @@ 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(this.isBorderBox()){w-=this.getFrameWidth('lr');}} -if(s.height&&s.height!='auto'){h=parseInt(s.height,10);if(this.isBorderBox()){h-=this.getFrameWidth('tb');}} +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"));} @@ -281,18 +275,18 @@ if(typeof callback=="function"){callback();}});dom.innerHTML=html.replace(/(?:<script.*?>)((\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&&this.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"));} +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.addClass("x-masked-relative");} +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","x-masked-relative"]);},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='0';el.className='ext-shim';if(Ext.isIE&&Ext.isSecure){el.src=Ext.SSL_SECURE_URL;} +this.removeClass("x-masked");},isMasked:function(){return this._mask&&this._mask.isVisible();},createShim:function(){var el=document.createElement('iframe');el.frameBorder='0';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){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(Ext.isArray(eventName)){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;} @@ -334,9 +328,8 @@ 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(){var to=o.endOpacity||0;arguments.callee.anim=this.fxanim({opacity:{to:to}},o,null,.5,"easeOut",function(){if(to===0){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)};} +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(o.left!==undefined){a.left={to:o.left};} if(o.top!==undefined){a.top={to:o.top};} Added: mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,25 @@ +.add { + background-image: url(images/add.gif) !important; +} +.add16 { + background-image: url(images/add16.gif) !important; +} +.add24 { + background-image: url(images/add24.gif) !important; +} + +.btn-panel td { + padding-left:5px; +} + +h2 { + color:#083772 !important; + margin: 20px 0 0 !important; + padding: 5px; + background:#eee; + width:400px; +} + +h3 { + font-weight:normal !important; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.html =================================================================== --- mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.html (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.html 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,30 @@ +<html> +<head> + <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1"> + <title>Ext Buttons</title> + <link rel="stylesheet" type="text/css" href="../../resources/css/ext-all.css"/> + + <!-- GC --> + <!-- LIBS --> + <script type="text/javascript" src="../../adapter/ext/ext-base.js"></script> + <!-- ENDLIBS --> + + <script type="text/javascript" src="../../ext-all-debug.js"></script> + + <script type="text/javascript" src="../form/states.js"></script> + <script type="text/javascript" src="buttons.js"></script> + <link rel="stylesheet" type="text/css" href="buttons.css"/> + + <!-- Common Styles for the examples --> + <link rel="stylesheet" type="text/css" href="../examples.css"/> +</head> +<body id="docbody"> +<script type="text/javascript" src="../examples.js"></script> +<!-- EXAMPLES --> +<h1>Ext Buttons</h1> + +<p>The js is not minified so it is readable. See <a href="buttons.js">buttons.js</a>.</p> + +<p>For a demo of buttons in toolbars, see <a href="../toolbar/toolbars.html">the toolbar sample</a>.</p> +</body> +</html> Added: mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/learn/buttons/buttons.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,18 @@ +Ext.onReady(function(){ + +var btn = new Ext.Button({ + xtype:'button', +// baseCls: 'x-plain', + text: 'Add User', + enableToggle: true,//undefined,true + iconCls: 'add24',// + iconAlign: 'top',//'right','top','bottom' + //menu : {items: [{text:'Menu Item 1'},{text:'Menu Item 2'},{text:'Menu Item 3'}]} + scale: 'large'//'medium','large' +// split: true,//false + //arrowAlign:'bottom', + //menu: [{text: 'Ribbons are hideous'}] +}); +btn.render('docbody'); + +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add16.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add16.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add24.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/learn/buttons/images/add24.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/license.txt =================================================================== --- mickael/trunk/ext/v3.0.0-a1/license.txt (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/license.txt 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,42 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2008, Ext JS, LLC +All rights reserved. +licensing@xxxxxxxxx + +http://extjs.com/license + +Open Source License +------------------------------------------------------------------------------------------ +Ext is licensed under the terms of the Open Source GPL 3.0 license. + +http://www.gnu.org/licenses/gpl.html + +There are several FLOSS exceptions available for use with this release for +open source applications that are distributed under a license other than the GPL. + +* Open Source License Exception for Applications + + http://extjs.com/products/floss-exception.php + +* Open Source License Exception for Development + + http://extjs.com/products/ux-exception.php + + +Commercial License +------------------------------------------------------------------------------------------ +This is the appropriate option if you are creating proprietary applications and you are +not prepared to distribute and share the source code of your application under the +GPL v3 license. Please visit http://extjs.com/license for more details. + + +OEM / Reseller License +------------------------------------------------------------------------------------------ +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 +General Public License for more details. \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/package/button/button-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/button/button-debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/button/button-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,8 @@ * http://extjs.com/license */ + + Ext.Button = Ext.extend(Ext.BoxComponent, { @@ -132,9 +134,6 @@ initButtonEl : function(btn, btnEl){ this.el = btn; - if(this.id){ - this.el.dom.id = this.el.id = this.id; - } if(this.icon){ btnEl.setStyle('background-image', 'url(' +this.icon +')'); } @@ -163,6 +162,10 @@ 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 : {} @@ -194,12 +197,9 @@ // private beforeDestroy: function(){ if(this.rendered){ - var btnEl = this.el.child(this.buttonSelector); - if(btnEl){ - if(this.tooltip){ - Ext.QuickTips.unregister(btnEl); - } - btnEl.removeAllListeners(); + var btn = this.el.child(this.buttonSelector); + if(btn){ + btn.removeAllListeners(); } } if(this.menu){ @@ -499,6 +499,8 @@ }; }(); + + Ext.SplitButton = Ext.extend(Ext.Button, { // private arrowSelector : 'em', Modified: mickael/trunk/ext/v3.0.0-a1/package/button/button.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/button/button.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/button/button.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,16 +12,15 @@ return[this.text||' ',this.type,this.iconCls||'',cls,'x-btn-'+this.scale+' x-btn-icon-'+this.scale+'-'+this.iconAlign,this.getMenuClass()];},getMenuClass:function(){return this.menu?(this.arrowAlign!='bottom'?'x-btn-arrow':'x-btn-arrow-bottom'):'';},onRender:function(ct,position){if(!this.template){if(!Ext.Button.buttonTemplate){Ext.Button.buttonTemplate=new Ext.Template('<table cellspacing="0" class="x-btn {3}"><tbody class="{4}">','<tr><td class="x-btn-tl"><i> </i></td><td class="x-btn-tc"></td><td class="x-btn-tr"><i> </i></td></tr>','<tr><td class="x-btn-ml"><i> </i></td><td class="x-btn-mc"><em class="{5}" unselectable="on"><button class="x-btn-text {2}" type="{1}">{0}</button></em></td><td class="x-btn-mr"><i> </i></td></tr>','<tr><td class="x-btn-bl"><i> </i></td><td class="x-btn-bc"></td><td class="x-btn-br"><i> </i></td></tr>',"</tbody></table>");Ext.Button.buttonTemplate.compile();} this.template=Ext.Button.buttonTemplate;} var btn,targs=this.getTemplateArgs();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);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(btn,btnEl){this.el=btn;if(this.id){this.el.dom.id=this.el.id=this.id;} -if(this.icon){btnEl.setStyle('background-image','url('+this.icon+')');} +var btnEl=btn.child(this.buttonSelector);btnEl.on('focus',this.onFocus,this);btnEl.on('blur',this.onBlur,this);this.initButtonEl(btn,btnEl);Ext.ButtonToggleMgr.register(this);},initButtonEl:function(btn,btnEl){this.el=btn;if(this.icon){btnEl.setStyle('background-image','url('+this.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.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.doAutoWidth.defer(1,this);}else{this.doAutoWidth();}},setIconClass:function(cls){if(this.el){this.el.child(this.buttonSelector).replaceClass(this.iconCls,cls);} -this.iconCls=cls;},beforeDestroy:function(){if(this.rendered){var btnEl=this.el.child(this.buttonSelector);if(btnEl){if(this.tooltip){Ext.QuickTips.unregister(btnEl);} -btnEl.removeAllListeners();}} +this.iconCls=cls;},beforeDestroy:function(){if(this.rendered){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);}},doAutoWidth:function(){if(this.el&&this.text&&typeof this.width=='undefined'){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-mc "+this.buttonSelector).update(text);} this.doAutoWidth();},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);} Modified: mickael/trunk/ext/v3.0.0-a1/package/color-palette.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/color-palette.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/color-palette.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,5 +7,5 @@ */ -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=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>');var el=document.createElement("div");el.id=this.getId();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");} +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=this.tpl||new Ext.XTemplate('<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>');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); Modified: mickael/trunk/ext/v3.0.0-a1/package/data/data.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/data/data.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/data/data.js 2008-12-01 20:55:57 UTC (rev 32) @@ -19,7 +19,7 @@ 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);},isModified:function(fieldName){return!!(this.modified&&this.modified.hasOwnProperty(fieldName));}}; -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.events?id:Ext.create(id,'store')):this.get(id);},getKey:function(o){return o.storeId||o.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});} @@ -27,7 +27,7 @@ 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={};if(this.sortField){this.setDefaultSort(this.sortField,this.sortDir);}else if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);} +this.sortToggle={};if(this.sortInfo){this.setDefaultSort(this.sortInfo.field,this.sortInfo.direction);} 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;} @@ -53,11 +53,11 @@ 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;},setBaseParam:function(name,value){this.baseParams=this.baseParams||{};this.baseParams[name]=value;}});Ext.reg('store',Ext.data.Store); +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;},setBaseParam:function(name,value){this.baseParams=this.baseParams||{};this.baseParams[name]=value;}}); 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.reg('simplestore',Ext.data.SimpleStore); +Ext.data.SimpleStore.superclass.loadData.call(this,data,append);}}); Ext.data.Connection=function(config){Ext.apply(this,config);this.addEvents("beforerequest","requestcomplete","requestexception");Ext.data.Connection.superclass.constructor.call(this);};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:'_dc',request:function(o){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);} @@ -123,14 +123,12 @@ 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.idPath||this.meta.id;var totalRecords=0,success=true;if(this.meta.totalRecords){totalRecords=q.selectNumber(this.meta.totalRecords,root,0);} +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,n);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){this.arrayData=o;var s=this.meta;var sid=s?(s.idIndex||s.id):null;var recordType=this.recordType,fields=recordType.prototype.fields;var records=[];if(!this.getRoot){this.getRoot=s.root?this.getJsonAccessor(s.root):function(p){return p;};if(s.totalProperty){this.getTotal=this.getJsonAccessor(s.totalProperty);}} -var root=this.getRoot(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,n);values[f.name]=v;} +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,n);values[f.name]=v;} var record=new recordType(values,id);record.json=n;records[records.length]=record;} -var totalRecords=records.length;if(s.totalProperty){var v=parseInt(this.getTotal(o),10);if(!isNaN(v)){totalRecords=v;}} -return{records:records,totalRecords:totalRecords};}}); +return{records:records,totalRecords:records.length};}}); Modified: mickael/trunk/ext/v3.0.0-a1/package/date.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/date.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/date.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,35 +7,59 @@ */ -(function(){function xf(format){var args=Array.prototype.slice.call(arguments,1);return format.replace(/\{(\d+)\}/g,function(m,i){return args[i];});} -Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=='function'?p():p;Date.parseCodes[character]=p;} -return p?Ext.applyIf({c:p.c?xf(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}} +(function(){Date.formatCodeToRegex=function(character,currentGroup){var p=Date.parseCodes[character];if(p){p=Ext.type(p)=='function'?p():p;Date.parseCodes[character]=p;} +return p?Ext.applyIf({c:p.c?String.format(p.c,currentGroup||"{0}"):p.c},p):{g:0,c:null,s:Ext.escapeRe(character)}} var $f=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{count:0},parseRegexes:[],formatFunctions:{count:0},daysInMonth:[31,28,31,30,31,30,31,31,30,31,30,31],y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(month){return Date.monthNames[month].substring(0,3);},getShortDayName:function(day){return Date.dayNames[day].substring(0,3);},getMonthNumber:function(name){return Date.monthNumbers[name.substring(0,1).toUpperCase()+name.substring(1,3).toLowerCase()];},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"this.getFullYear()",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var c="Y-m-dTH:i:sP",code=[],i=0,l=c.length;i<l;++i){var e=c.charAt(i);code.push(e=="T"?"'T'":Date.getFormatCode(e));} return code.join(" + ");},U:"Math.round(this.getTime() / 1000)"},parseDate:function(input,format){var p=Date.parseFunctions;if(p[format]==null){Date.createParser(format);} var func=p[format];return Date[func](input);},getFormatCode:function(character){var f=Date.formatCodes[character];if(f){f=Ext.type(f)=='function'?f():f;Date.formatCodes[character]=f;} -return f||("'"+String.escape(character)+"'");},createNewFormat:function(format){var funcName="format"+Date.formatFunctions.count++,code="Date.prototype."+funcName+" = function(){return ",special=false,ch='';Date.formatFunctions[format]=funcName;for(var i=0;i<format.length;++i){ch=format.charAt(i);if(!special&&ch=="\\"){special=true;} +return f||("'"+String.escape(character)+"'");},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)+";}");},createParser:function(){var code=["Date.{0} = function(input){","var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;","input = String(input);","d = new Date();","y = d.getFullYear();","m = d.getMonth();","d = d.getDate();","var results = input.match(Date.parseRegexes[{1}]);","if(results && results.length > 0){","{2}","if(u){","v = new Date(u * 1000);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0 && ms >= 0){","v = new Date(y, m, d, h, i, s, ms);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){","v = new Date(y, m, d, h, i, s);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){","v = new Date(y, m, d, h, i);","}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){","v = new Date(y, m, d, h);","}else if (y >= 0 && m >= 0 && d > 0){","v = new Date(y, m, d);","}else if (y >= 0 && m >= 0){","v = new Date(y, m);","}else if (y >= 0){","v = new Date(y);","}","}","return (v && (z != null || o != null))?" +eval(code.substring(0,code.length-3)+";}");},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, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" ++"input = String(input);\n" ++"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);\n" ++"}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" ++"}\n}\nreturn (v && (z || o))?" +" (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" -+" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;","}"].join('\n');return function(format){var funcName="parse"+Date.parseFunctions.count++,regexNum=Date.parseRegexes.length,currentGroup=1,calc="",regex="",special=false,ch="";Date.parseFunctions[format]=funcName;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=$f(ch,currentGroup);currentGroup+=obj.g;regex+=obj.s;if(obj.g&&obj.c){calc+=obj.c;}}} -Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(xf(code,funcName,regexNum,calc));}}(),parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3})"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" ++" v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" ++"}";Date.parseRegexes[regexNum]=new RegExp("^"+regex+"$","i");eval(code);},parseCodes:{d:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},j:{g:1,c:"d = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},D:function(){for(var a=[],i=0;i<7;a.push(Date.getShortDayName(i)),++i);return{g:0,c:null,s:"(?:"+a.join("|")+")"}},l:function(){return{g:0,c:null,s:"(?:"+Date.dayNames.join("|")+")"}},N:{g:0,c:null,s:"[1-7]"},S:{g:0,c:null,s:"(?:st|nd|rd|th)"},w:{g:0,c:null,s:"[0-6]"},z:{g:0,c:null,s:"(?:\\d{1,3}"},W:{g:0,c:null,s:"(?:\\d{2})"},F:function(){return{g:1,c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n",s:"("+Date.monthNames.join("|")+")"}},M:function(){for(var a=[],i=0;i<12;a.push(Date.getShortMonthName(i)),++i);return Ext.applyIf({s:"("+a.join("|")+")"},$f("F"));},m:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{2})"},n:{g:1,c:"m = parseInt(results[{0}], 10) - 1;\n",s:"(\\d{1,2})"},t:{g:0,c:null,s:"(?:\\d{2})"},L:{g:0,c:null,s:"(?:1|0)"},o:function(){return $f("Y");},Y:{g:1,c:"y = parseInt(results[{0}], 10);\n",s:"(\\d{4})"},y:{g:1,c:"var ty = parseInt(results[{0}], 10);\n" +"y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\n" +"if (h == 12) { h = 0; }\n" +"} else { if (h < 12) { h += 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\n" +"if (h == 12) { h = 0; }\n" +"} else { if (h < 12) { h += 12; }}",s:"(AM|PM)"},g:function(){return $f("G");},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return $f("H");},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60);","var mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+\-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1);","var hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60);","var mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+\-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"z = results[{0}] * 1;\n" -+"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"},c:function(){var calc=[],arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[9] == 'Z'){","z = 0;","}else{",$f("P",9).c,"}"].join('\n')}];for(var i=0,l=arr.length;i<l;++i){calc.push(arr[i].c);} ++"z = (-43200 <= z && z <= 50400)? z : null;\n",s:"([+\-]?\\d{1,5})"},c:function(){var calc=[];var arr=[$f("Y",1),$f("m",2),$f("d",3),$f("h",4),$f("i",5),$f("s",6),{c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:"if(results[9] == 'Z'){\no = 0;\n}else{\n"+$f("P",9).c+"\n}"}];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 +"((\.|,)\\d+)?" -+"(Z|([+\-]\\d{2}:\\d{2}))"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.override(Date,{dateFormat:function(format){if(Date.formatFunctions[format]==null){Date.createNewFormat(format);} ++"("+$f("P",null).s+"|Z)"}},U:{g:1,c:"u = parseInt(results[{0}], 10);\n",s:"(-?\\d+)"}}});}());Ext.override(Date,{dateFormat:function(format){if(Date.formatFunctions[format]==null){Date.createNewFormat(format);} var func=Date.formatFunctions[format];return this[func]();},getTimezone:function(){return this.toString().replace(/^.* (?:\((.*)\)|([A-Z]{1,4})(?:[\-+][0-9]{4})?(?: -?\d+)?)$/,"$1$2").replace(/[^A-Z]/g,"");},getGMTOffset:function(colon){return(this.getTimezoneOffset()>0?"-":"+") -+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0") ++String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset()/60)),2,"0") +(colon?":":"") +String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0");},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;},getWeekOfYear:function(){var ms1d=864e5,ms7d=7*ms1d;return function(){var DC3=Date.UTC(this.getFullYear(),this.getMonth(),this.getDate()+3)/ms1d,AWN=Math.floor(DC3/7),Wyr=new Date(AWN*ms7d).getUTCFullYear();return AWN-Math.floor(Date.UTC(Wyr,0,7)/ms7d)+1;}}(),isLeapYear:function(){var year=this.getFullYear();return!!((year&3)==0&&(year%100||(year%400==0&&year)));},getFirstDayOfMonth:function(){var day=(this.getDay()-(this.getDate()-1))%7;return(day<0)?(day+7):day;},getLastDayOfMonth:function(){var day=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(day<0)?(day+7):day;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(clone){if(clone){return this.clone().clearTime();} +return num+this.getDate()-1;},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;},isLeapYear:function(){var year=this.getFullYear();return!!((year&3)==0&&(year%100||(year%400==0&&year)));},getFirstDayOfMonth:function(){var day=(this.getDay()-(this.getDate()-1))%7;return(day<0)?(day+7):day;},getLastDayOfMonth:function(){var day=(this.getDay()+(Date.daysInMonth[this.getMonth()]-this.getDate()))%7;return(day<0)?(day+7):day;},getFirstDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),1);},getLastDateOfMonth:function(){return new Date(this.getFullYear(),this.getMonth(),this.getDaysInMonth());},getDaysInMonth:function(){Date.daysInMonth[1]=this.isLeapYear()?29:28;return Date.daysInMonth[this.getMonth()];},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";}},clone:function(){return new Date(this.getTime());},clearTime:function(clone){if(clone){return this.clone().clearTime();} this.setHours(0);this.setMinutes(0);this.setSeconds(0);this.setMilliseconds(0);return this;},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;},between:function(start,end){var t=this.getTime();return start.getTime()<=t&&t<=end.getTime();}});Date.prototype.format=Date.prototype.dateFormat;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);}};} Modified: mickael/trunk/ext/v3.0.0-a1/package/datepicker/datepicker.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/datepicker/datepicker.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/datepicker/datepicker.js 2008-12-01 20:55:57 UTC (rev 32) @@ -36,4 +36,4 @@ 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++){var 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]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.leftClickRpt,this.rightClickRpt,this.monthPicker,this.eventEl,this.mbtn,this.todayBtn);}}});Ext.reg('datepicker',Ext.DatePicker); +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]);}}},beforeDestroy:function(){if(this.rendered){Ext.destroy(this.mbtn,this.todayBtn);}}});Ext.reg('datepicker',Ext.DatePicker); Modified: mickael/trunk/ext/v3.0.0-a1/package/dialog/dialogs-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/dialog/dialogs-debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/dialog/dialogs-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,8 @@ * http://extjs.com/license */ + + Ext.MessageBox = function(){ var dlg, opt, mask, waitTimer; Modified: mickael/trunk/ext/v3.0.0-a1/package/dragdrop/dragdrop.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/dragdrop/dragdrop.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/dragdrop/dragdrop.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,7 +7,7 @@ */ -(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;},moveOnly:false,unlock:function(){this.locked=false;},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(x,y){},startDrag:function(x,y){},b4Drag:function(e){},onDrag:function(e){},onDragEnter:function(e,id){},b4DragOver:function(e){},onDragOver:function(e,id){},b4DragOut:function(e){},onDragOut:function(e,id){},b4DragDrop:function(e){},onDragDrop:function(e,id){},onInvalidDrop:function(e){},b4EndDrag:function(e){},endDrag:function(e){},b4MouseDown:function(e){},onMouseDown:function(e){},onMouseUp:function(e){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(constrainTo,pad,inContent){if(typeof pad=="number"){pad={left:pad,right:pad,top:pad,bottom:pad};} +(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);} @@ -34,14 +34,13 @@ 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]&&this.ids[g][oDD.id]){delete this.ids[g][oDD.id];}} +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<len;++i){if(targets[i].id==oTargetDD.id){return true;}} return false;},isTypeOfDD:function(oDD){return(oDD&&oDD.__ygDragDrop);},isHandle:function(sDDId,sHandleId){return(this.handleIds[sDDId]&&this.handleIds[sDDId][sHandleId]);},getDDById:function(id){for(var i in this.ids){if(this.ids[i][id]){return this.ids[i][id];}} return null;},handleMouseDown:function(e,oDD){if(Ext.QuickTips){Ext.QuickTips.disable();} -if(this.dragCurrent){this.handleMouseUp(e);} this.currentTarget=e.getTarget();this.dragCurrent=oDD;var el=oDD.getEl();this.startX=e.getPageX();this.startY=e.getPageY();this.deltaX=this.startX-el.offsetLeft;this.deltaY=this.startY-el.offsetTop;this.dragThreshMet=false;this.clickTimeout=setTimeout(function(){var DDM=Ext.dd.DDM;DDM.startDrag(DDM.startX,DDM.startY);},this.clickTimeThresh);},startDrag:function(x,y){clearTimeout(this.clickTimeout);if(this.dragCurrent){this.dragCurrent.b4StartDrag(x,y);this.dragCurrent.startDrag(x,y);} this.dragThreshMet=true;},handleMouseUp:function(e){if(Ext.QuickTips){Ext.QuickTips.enable();} if(!this.dragCurrent){return;} Modified: mickael/trunk/ext/v3.0.0-a1/package/form/form-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/form/form-debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/form/form-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,8 @@ * http://extjs.com/license */ + + Ext.form.Field = Ext.extend(Ext.BoxComponent, { @@ -15,7 +17,6 @@ - invalidClass : "x-form-invalid", invalidText : "The value in this field is invalid", @@ -109,7 +110,7 @@ initValue : function(){ if(this.value !== undefined){ this.setValue(this.value); - }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){ + }else if(this.el.dom.value.length > 0 && this.el.dom.value != this.emptyText){ this.setValue(this.el.dom.value); } // reference to original value for reset @@ -310,11 +311,6 @@ } }, - // private, does not work for all fields - append :function(v){ - this.setValue([this.getValue(), v].join('')); - }, - // private adjustSize : function(w, h){ var s = Ext.form.Field.superclass.adjustSize.call(this, w, h); @@ -474,6 +470,8 @@ }; Ext.reg('field', Ext.form.Field); + + Ext.form.TextField = Ext.extend(Ext.form.Field, { @@ -615,7 +613,7 @@ }, applyEmptyText : function(){ - if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){ + if(this.rendered && this.emptyText && this.getRawValue().length < 1){ this.setRawValue(this.emptyText); this.el.addClass(this.emptyClass); } @@ -746,6 +744,8 @@ }); Ext.reg('textfield', Ext.form.TextField); + + Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { @@ -974,6 +974,8 @@ onTrigger2Click : Ext.emptyFn }); Ext.reg('trigger', Ext.form.TriggerField); + + Ext.form.TextArea = Ext.extend(Ext.form.TextField, { @@ -1062,6 +1064,8 @@ } }); Ext.reg('textarea', Ext.form.TextArea); + + Ext.form.NumberField = Ext.extend(Ext.form.TextField, { @@ -1169,6 +1173,8 @@ } }); Ext.reg('numberfield', Ext.form.NumberField); + + Ext.form.Label = Ext.extend(Ext.BoxComponent, { @@ -1199,6 +1205,8 @@ }); Ext.reg('label', Ext.form.Label); + + Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { @@ -1236,7 +1244,7 @@ if(typeof this.maxValue == "string"){ this.maxValue = this.parseDate(this.maxValue); } - this.disabledDatesRE = null; + this.ddMatch = null; this.initDisabledDays(); }, @@ -1320,7 +1328,7 @@ } } var fvalue = this.formatDate(value); - if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){ + if(this.ddMatch && this.ddMatch.test(fvalue)){ this.markInvalid(String.format(this.disabledDatesText, fvalue)); return false; } @@ -1406,7 +1414,7 @@ Ext.apply(this.menu.picker, { minDate : this.minValue, maxDate : this.maxValue, - disabledDatesRE : this.disabledDatesRE, + disabledDatesRE : this.ddMatch, disabledDatesText : this.disabledDatesText, disabledDays : this.disabledDays, disabledDaysText : this.disabledDaysText, @@ -1436,6 +1444,8 @@ }); Ext.reg('datefield', Ext.form.DateField); + + Ext.form.Checkbox = Ext.extend(Ext.form.Field, { @@ -1638,6 +1648,8 @@ }); Ext.reg('checkbox', Ext.form.Checkbox); + + Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { // private @@ -1690,6 +1702,8 @@ }); Ext.reg('radio', Ext.form.Radio); + + Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { @@ -2030,13 +2044,11 @@ // private onDestroy : function(){ if(this.view){ - Ext.destroy(this.view); + this.view.el.removeAllListeners(); + this.view.el.remove(); + this.view.purgeListeners(); } if(this.list){ - if(this.innerList){ - this.innerList.un('mouseover', this.onViewOver, this); - this.innerList.un('mousemove', this.onViewMove, this); - } this.list.destroy(); } this.bindStore(null); @@ -2455,15 +2467,11 @@ }); Ext.reg('combo', Ext.form.ComboBox); + + Ext.Editor = function(field, config){ - if(field.field){ - this.field = Ext.create(field.field, 'textfield'); - config = Ext.apply({}, field); // copy so we don't disturb original config - delete config.field; - }else{ - this.field = field; - } + this.field = field; Ext.Editor.superclass.constructor.call(this, config); }; @@ -2473,7 +2481,6 @@ - value : "", alignment: "c-c?", @@ -2515,13 +2522,10 @@ cls: "x-editor", parentEl : ct, shim : this.shim, - shadowOffset: this.shadowOffset || 4, + shadowOffset:4, id: this.id, constrain: this.constrain }); - if(this.zIndex){ - this.el.setZIndex(this.zIndex); - } this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); if(this.field.msgTarget != 'title'){ this.field.msgTarget = 'qtip'; @@ -2709,11 +2713,13 @@ }, beforeDestroy : function(){ - Ext.destroy(this.field); + this.field.destroy(); this.field = null; } }); Ext.reg('editor', Ext.Editor); + + Ext.form.BasicForm = function(el, config){ Ext.apply(this, config); @@ -3050,6 +3056,8 @@ // back compat Ext.BasicForm = Ext.form.BasicForm; + + Ext.FormPanel = Ext.extend(Ext.Panel, { @@ -3070,13 +3078,9 @@ monitorPoll : 200, - layout:'form', - // private initComponent :function(){ this.form = this.createForm(); - Ext.FormPanel.superclass.initComponent.call(this); - this.bodyCfg = { tag: 'form', cls: this.baseCls + '-body', @@ -3086,8 +3090,9 @@ if(this.fileUpload) { this.bodyCfg.enctype = 'multipart/form-data'; } - this.initItems(); - + + Ext.FormPanel.superclass.initComponent.call(this); + this.addEvents( 'clientvalidation' @@ -3249,6 +3254,8 @@ Ext.form.FormPanel = Ext.FormPanel; + + Ext.form.Action = function(form, options){ this.form = form; @@ -3481,6 +3488,8 @@ 'submit' : Ext.form.Action.Submit }; + + Ext.form.VTypes = function(){ // closure these in so they are only created once. Modified: mickael/trunk/ext/v3.0.0-a1/package/form/form.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/form/form.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/form/form.js 2008-12-01 20:55:57 UTC (rev 32) @@ -14,7 +14,7 @@ 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]);},getItemCt:function(){return this.el.up('.x-form-item',4);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);} +this.el.addClass([this.fieldClass,this.cls]);},getItemCt:function(){return this.el.up('.x-form-item',4);},initValue:function(){if(this.value!==undefined){this.setValue(this.value);}else if(this.el.dom.value.length>0&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value);} this.originalValue=this.getValue();},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();this.initValue();},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||Ext.isSafari3?"keydown":"keypress",this.fireKey,this);this.el.on("focus",this.onFocus,this);var o=this.inEditor&&Ext.isWindows&&Ext.isGecko?{buffer:10}:null;this.el.on("blur",this.onBlur,this,o);},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);} @@ -29,7 +29,7 @@ this.fireEvent('valid',this);},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget];},getErrorCt:function(){return this.el.findParent('.x-form-element',5,true)||this.el.findParent('.x-form-field-wrap',5,true);},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,'tl-tr',[2,0]);},getRawValue:function(){var v=this.rendered?this.el.getValue():Ext.value(this.value,'');if(v===this.emptyText){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();}},append:function(v){this.setValue([this.getValue(),v].join(''));},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);if(this.offsetCt){var ct=this.getItemCt();s.width-=ct.getFrameWidth('lr');s.height-=ct.getFrameWidth('tb');} +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);if(this.offsetCt){var ct=this.getItemCt();s.width-=ct.getFrameWidth('lr');s.height-=ct.getFrameWidth('tb');} 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 this.inEditor?w: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;} @@ -46,7 +46,7 @@ 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.onKeyUpBuffered,this,{buffer:50});this.el.on("click",this.autoSize,this);} if(this.enableKeyEvents){this.el.on("keyup",this.onKeyUp,this);this.el.on("keydown",this.onKeyDown,this);this.el.on("keypress",this.onKeyPress,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);}},onKeyUpBuffered:function(e){if(!e.isNavKeyPress()){this.autoSize();}},onKeyUp:function(e){this.fireEvent('keyup',this,e);},onKeyDown:function(e){this.fireEvent('keydown',this,e);},onKeyPress:function(e){this.fireEvent('keypress',this,e);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass);}},preFocus:function(){if(this.emptyText){if(this.el.dom.value==this.emptyText){this.setRawValue('');} +return value;},filterValidation:function(e){if(!e.isNavKeyPress()){this.validationTask.delay(this.validationDelay);}},onKeyUpBuffered:function(e){if(!e.isNavKeyPress()){this.autoSize();}},onKeyUp:function(e){this.fireEvent('keyup',this,e);},onKeyDown:function(e){this.fireEvent('keydown',this,e);},onKeyPress:function(e){this.fireEvent('keypress',this,e);},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText();},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){if(e.ctrlKey){return;} var k=e.getKey();if(Ext.isGecko&&(e.isNavKeyPress()||k==e.BACKSPACE||(k==e.DELETE&&e.button==-1))){return;} @@ -96,14 +96,14 @@ Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:'x-form-date-trigger',showToday:true,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.disabledDatesRE=null;this.initDisabledDays();},initDisabledDays:function(){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=null;this.initDisabledDays();},initDisabledDays:function(){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.disabledDatesRE=new RegExp(re+")");}},setDisabledDates:function(dd){this.disabledDates=dd;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE);}},setDisabledDays:function(dd){this.disabledDays=dd;if(this.menu){this.menu.picker.setDisabledDays(dd);}},setMinValue:function(dt){this.minValue=(typeof dt=="string"?this.parseDate(dt):dt);if(this.menu){this.menu.picker.setMinDate(this.minValue);}},setMaxValue:function(dt){this.maxValue=(typeof dt=="string"?this.parseDate(dt):dt);if(this.menu){this.menu.picker.setMaxDate(this.maxValue);}},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.disabledDatesRE&&this.disabledDatesRE.test(fvalue)){this.markInvalid(String.format(this.disabledDatesText,fvalue));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||Ext.isDate(value)){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]);}} @@ -111,7 +111,7 @@ if(this.wrap){this.wrap.remove();} Ext.form.DateField.superclass.onDestroy.call(this);},formatDate:function(date){return Ext.isDate(date)?date.dateFormat(this.format):date;},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.disabledDatesRE,disabledDatesText:this.disabledDatesText,disabledDays:this.disabledDays,disabledDaysText:this.disabledDaysText,format:this.format,showToday:this.showToday,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.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,showToday:this.showToday,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.Checkbox=Ext.extend(Ext.form.Field,{checkedCls:'x-form-check-checked',focusCls:'x-form-check-focus',overCls:'x-form-check-over',mouseDownCls:'x-form-check-down',tabIndex:0,checked:false,defaultAutoCreate:{tag:'input',type:'checkbox',autocomplete:'off'},baseCls:'x-form-check',initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents('check');},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.initCheckEvents();},initCheckEvents:function(){this.innerWrap.removeAllListeners();this.innerWrap.addClassOnOver(this.overCls);this.innerWrap.addClassOnClick(this.mouseDownCls);this.innerWrap.on('click',this.onClick,this);this.innerWrap.on('keyup',this.onKeyUp,this);},onRender:function(ct,position){Ext.form.Checkbox.superclass.onRender.call(this,ct,position);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue;} this.el.addClass('x-hidden');this.innerWrap=this.el.wrap({tabIndex:this.tabIndex,cls:this.baseCls+'-wrap-inner'});this.wrap=this.innerWrap.wrap({cls:this.baseCls+'-wrap'});if(this.boxLabel){this.labelEl=this.innerWrap.createChild({tag:'label',htmlFor:this.el.id,cls:'x-form-cb-label',html:this.boxLabel});} @@ -143,9 +143,8 @@ 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();this.delayedCheck=true;this.unsetDelayCheck.defer(10,this);},"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){Ext.destroy(this.view);} -if(this.list){if(this.innerList){this.innerList.un('mouseover',this.onViewOver,this);this.innerList.un('mousemove',this.onViewMove,this);} -this.list.destroy();} +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);},unsetDelayCheck:function(){delete this.delayedCheck;},fireKey:function(e){if(e.isNavKeyPress()&&!this.isExpanded()&&!this.delayedCheck){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'));}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false;}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true;}},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?'<div class="loading-indicator">'+this.loadingText+'</div>':'');this.restrictHeight();this.selectedIndex=-1;},onLoad:function(){if(!this.hasFocus){return;} @@ -167,9 +166,7 @@ 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.Editor=function(field,config){if(field.field){this.field=Ext.create(field.field,'textfield');config=Ext.apply({},field);delete config.field;}else{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","canceledit","specialkey");},onRender:function(ct,position){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:ct,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex);} -this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!='title'){this.field.msgTarget='qtip';} +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","canceledit","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.inEditor=true;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){var key=e.getKey();if(this.completeOnEnter&&key==e.ENTER){e.stopEvent();this.completeEdit();}else if(this.cancelOnEsc&&key==e.ESC){this.cancelEdit();}else{this.fireEvent('specialkey',field,e);} @@ -187,7 +184,7 @@ this.fireEvent("startedit",this.boundEl,this.startValue);},deferredFocus:function(){if(this.editing){this.field.focus();}},cancelEdit:function(remainVisible){if(this.editing){var v=this.getValue();this.setValue(this.startValue);if(remainVisible!==true){this.hide();} this.fireEvent("canceledit",this,v,this.startValue);}},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(){Ext.destroy(this.field);this.field=null;}});Ext.reg('editor',Ext.Editor); +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.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();if(!this.standardSubmit){this.el.on('submit',this.onSubmit,this);} @@ -204,8 +201,8 @@ return this;},getValues:function(asString){var fs=Ext.lib.Ajax.serializeForm(this.el.dom);if(asString===true){return fs;} return Ext.urlDecode(fs);},getFieldValues:function(){var o={};this.items.each(function(f){o[f.getName()]=f.getValue();});return o;},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;},callFieldMethod:function(fnName,args){args=args||[];this.items.each(function(f){if(typeof f[fnName]=='function'){f[fnName].apply(f,args);}});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.bodyCfg={tag:'form',cls:this.baseCls+'-body',method:this.method||'POST',id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype='multipart/form-data';} -this.initItems();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.isFormField){f.add(c);}if(c.isFieldWrap){Ext.applyIf(c,{labelAlign:c.ownerCt.labelAlign,labelWidth:c.ownerCt.labelWidth,itemCls:c.ownerCt.itemCls});f.add(c.field);}else 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);}}} +Ext.FormPanel=Ext.extend(Ext.Panel,{buttonAlign:'center',minButtonWidth:75,labelAlign:'left',monitorValid:false,monitorPoll:200,initComponent:function(){this.form=this.createForm();this.bodyCfg={tag:'form',cls:this.baseCls+'-body',method:this.method||'POST',id:this.formId||Ext.id()};if(this.fileUpload){this.bodyCfg.enctype='multipart/form-data';} +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.isFormField){f.add(c);}if(c.isFieldWrap){Ext.applyIf(c,{labelAlign:c.ownerCt.labelAlign,labelWidth:c.ownerCt.labelWidth,itemCls:c.ownerCt.itemCls});f.add(c.field);}else 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);}}} 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);this.form.initEl(this.body);},beforeDestroy:function(){Ext.FormPanel.superclass.beforeDestroy.call(this);this.stopMonitoring();Ext.destroy(this.form);},initEvents:function(){Ext.FormPanel.superclass.initEvents.call(this);this.items.on('remove',this.onRemove,this);this.items.on('add',this.onAdd,this);if(this.monitorValid){this.startMonitoring();}},onAdd:function(ct,c){if(c.isFormField){this.form.add(c);}},onRemove:function(c){if(c.isFormField){Ext.destroy(c.container.up('.x-form-item'));this.form.remove(c);}},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; Modified: mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid-debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid-debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid-debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,8 @@ * http://extjs.com/license */ + + Ext.grid.EditorGridPanel = Ext.extend(Ext.grid.GridPanel, { @@ -22,7 +24,7 @@ // private trackMouseOver: false, // causes very odd FF errors - + // private initComponent : function(){ Ext.grid.EditorGridPanel.superclass.initComponent.call(this); @@ -47,7 +49,7 @@ // private initEvents : function(){ Ext.grid.EditorGridPanel.superclass.initEvents.call(this); - + this.on("bodyscroll", this.stopEditing, this, [true]); if(this.clicksToEdit == 1){ @@ -135,9 +137,6 @@ if(this.fireEvent("beforeedit", e) !== false && !e.cancel){ this.editing = true; var ed = this.colModel.getCellEditor(col, row); - if(!ed){ - return; - } if(!ed.rendered){ ed.render(this.view.getEditorParent(ed)); } @@ -147,26 +146,25 @@ ed.record = r; ed.on("complete", this.onEditComplete, this, {single: true}); ed.on("specialkey", this.selModel.onEditorKey, this.selModel); - this.activeEditor = ed; var v = this.preEditValue(r, field); - ed.startEdit(this.view.getCell(row, col).firstChild, v === undefined ? '' : v); + ed.startEdit(this.view.getCell(row, col).firstChild, v); }).defer(50, this); } } }, - + // private preEditValue : function(r, field){ var value = r.data[field]; return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value; }, - + // private postEditValue : function(value, originalValue, r, field){ return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value; }, - + stopEditing : function(cancel){ if(this.activeEditor){ @@ -174,7 +172,7 @@ } this.activeEditor = null; }, - + // private onDestroy: function() { if(this.rendered){ @@ -188,6 +186,8 @@ } }); Ext.reg('editorgrid', Ext.grid.EditorGridPanel); + + // private // This is a support class used internally by the Grid components Ext.grid.GridEditor = function(field, config){ @@ -203,6 +203,8 @@ shim:false, shadow:false }); + + Ext.grid.PropertyRecord = Ext.data.Record.create([ {name:'name',type:'string'}, 'value' Modified: mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/grid/edit-grid.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,9 +12,8 @@ this.on("celldblclick",this.onCellDblClick,this);} this.getGridEl().addClass("xedit-grid");},onCellDblClick:function(g,row,col){this.startEditing(row,col);},onAutoEditClick:function(e,t){if(e.button!==0){return;} var row=this.view.findRowIndex(t);var col=this.view.findCellIndex(t);if(row!==false&&col!==false){this.stopEditing();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);var r=ed.record;var field=this.colModel.getDataIndex(ed.col);value=this.postEditValue(value,startValue,r,field);if(String(value)!==String(startValue)){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){return;} -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=this.preEditValue(r,field);ed.startEdit(this.view.getCell(row,col).firstChild,v===undefined?'':v);}).defer(50,this);}}},preEditValue:function(r,field){var value=r.data[field];return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlDecode(value):value;},postEditValue:function(value,originalValue,r,field){return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlEncode(value):value;},stopEditing:function(cancel){if(this.activeEditor){this.activeEditor[cancel===true?'cancelEdit':'completeEdit']();} +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=this.preEditValue(r,field);ed.startEdit(this.view.getCell(row,col).firstChild,v);}).defer(50,this);}}},preEditValue:function(r,field){var value=r.data[field];return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlDecode(value):value;},postEditValue:function(value,originalValue,r,field){return this.autoEncode&&typeof value=='string'?Ext.util.Format.htmlEncode(value):value;},stopEditing:function(cancel){if(this.activeEditor){this.activeEditor[cancel===true?'cancelEdit':'completeEdit']();} this.activeEditor=null;},onDestroy:function(){if(this.rendered){var cols=this.colModel.config;for(var i=0,len=cols.length;i<len;i++){var c=cols[i];Ext.destroy(c.editor);}} Ext.grid.EditorGridPanel.superclass.onDestroy.call(this);}});Ext.reg('editorgrid',Ext.grid.EditorGridPanel); Modified: mickael/trunk/ext/v3.0.0-a1/package/grid/grid.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/grid/grid.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/grid/grid.js 2008-12-01 20:55:57 UTC (rev 32) @@ -21,12 +21,12 @@ return this.fly(el).findParent(this.cellSelector,this.cellSelectorDepth);},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,this.rowSelectorDepth);},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));this.syncFocusEl(row);},removeRows:function(firstRow,lastRow){var bd=this.mainBody.dom;for(var rowIndex=firstRow;rowIndex<=lastRow;rowIndex++){Ext.removeNode(bd.childNodes[firstRow]);} -this.syncFocusEl(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(){this.syncHeaderScroll();var mb=this.scroller.dom;this.grid.fireEvent("bodyscroll",mb.scrollLeft,mb.scrollTop);},syncHeaderScroll:function(){var mb=this.scroller.dom;this.innerHd.scrollLeft=mb.scrollLeft;this.innerHd.scrollLeft=mb.scrollLeft;},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);} +return this.fly(el).findParent(this.rowSelector,this.rowSelectorDepth);},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));this.focusRow(row);},removeRows:function(firstRow,lastRow){var bd=this.mainBody.dom;for(var rowIndex=firstRow;rowIndex<=lastRow;rowIndex++){Ext.removeNode(bd.childNodes[firstRow]);} +this.focusRow(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(){this.syncHeaderScroll();var mb=this.scroller.dom;this.grid.fireEvent("bodyscroll",mb.scrollLeft,mb.scrollTop);},syncHeaderScroll:function(){var mb=this.scroller.dom;this.innerHd.scrollLeft=mb.scrollLeft;this.innerHd.scrollLeft=mb.scrollLeft;},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(),row,trow;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;trow=row.firstChild.rows[0];for(var j=0;j<clen;j++){trow.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(),row;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;row.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(),row;for(var i=0,len=ns.length;i<len;i++){row=ns[i];row.style.width=tw;if(row.firstChild){row.firstChild.style.width=tw;row.firstChild.rows[0].childNodes[col].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;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";} @@ -35,39 +35,35 @@ 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","");}}}},afterRender:function(){if(!this.ds||!this.cm){return;} -this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText();}},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();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(isAlt){row.className+=" x-grid3-row-alt";}else{row.className=row.className.replace("x-grid3-row-alt","");}}}},afterRender:function(){this.mainBody.dom.innerHTML=this.renderRows();this.processRows(0,true);if(this.deferEmptyText!==true){this.applyEmptyText();}},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();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.trackMouseOver){this.mainBody.on("mouseover",this.onRowOver,this);this.mainBody.on("mouseout",this.onRowOut,this);} if(g.enableDragDrop||g.enableDrag){this.dragZone=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();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.syncHeaderScroll();} -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=[],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);p.tooltip=this.getColumnTooltip(i);if(cm.config[i].align=='right'){p.istyle='padding-right:16px';}else{delete p.istyle;} +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);p.tooltip=this.getColumnTooltip(i);if(cm.config[i].align=='right'){p.istyle='padding-right:16px';}else{delete p.istyle;} cb[cb.length]=ct.apply(p);} return ts.header.apply({cells:cb.join(""),tstyle:'width:'+this.getTotalWidth()+';'});},getColumnTooltip:function(i){var tt=this.cm.getColumnTooltip(i);if(tt){if(Ext.QuickTips.isEnabled()){return'ext:qtip="'+tt+'"';}else{return'title="'+tt+'"';}} -return"";},beforeUpdate:function(){this.grid.stopEditing(true);},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();},focusRow:function(row){this.focusCell(row,0,false);},focusCell:function(row,col,hscroll){this.syncFocusEl(this.ensureVisible(row,col,hscroll));if(Ext.isGecko){this.focusEl.focus();}else{this.focusEl.focus.defer(1,this.focusEl);}},resolveCell:function(row,col,hscroll){if(typeof row!="number"){row=row.rowIndex;} -if(!this.ds){return null;} -if(row<0||row>=this.ds.getCount()){return null;} +return"";},beforeUpdate:function(){this.grid.stopEditing(true);},updateHeaders:function(){this.innerHd.firstChild.innerHTML=this.renderHeaders();},focusRow:function(row){this.focusCell(row,0,false);},focusCell:function(row,col,hscroll){row=Math.min(row,Math.max(0,this.getRows().length-1));var xy=this.ensureVisible(row,col,hscroll);this.focusEl.setXY(xy||this.scroller.getXY());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(!this.ds){return;} +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);} -return{row:rowEl,cell:cellEl};},getResolvedXY:function(resolved){if(!resolved){return null;} -var s=this.scroller.dom,c=resolved.cell,r=resolved.row;return c?Ext.fly(c).getXY():[s.scrollLeft+this.el.getX(),Ext.fly(r).getY()];},syncFocusEl:function(row,col,hscroll){var xy=row;if(!Ext.isArray(xy)){row=Math.min(row,Math.max(0,this.getRows().length-1));xy=this.getResolvedXY(this.resolveCell(row,col,hscroll));} -this.focusEl.setXY(xy||this.scroller.getXY());},ensureVisible:function(row,col,hscroll){var resolved=this.resolveCell(row,col,hscroll);if(!resolved||!resolved.row){return;} -var rowEl=resolved.row,cellEl=resolved.cell;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;} +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 this.getResolvedXY(resolved);},insertRows:function(dm,firstRow,lastRow,isUpdate){if(!isUpdate&&firstRow===0&&lastRow>=dm.getCount()-1){this.refresh();}else{if(!isUpdate){this.fireEvent("beforerowsinserted",this,firstRow,lastRow);} +return cellEl?Ext.fly(cellEl).getXY():[c.scrollLeft+this.el.getX(),Ext.fly(rowEl).getY()];},insertRows:function(dm,firstRow,lastRow,isUpdate){if(!isUpdate&&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);}} -this.syncFocusEl(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;';} +this.focusRow(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,i;var tw=cm.getTotalWidth(false);var aw=this.grid.getGridEl().getWidth(true)-this.scrollOffset;if(aw<20){return;} +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;}} @@ -77,33 +73,35 @@ 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);} -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(true);var result=this.renderBody();this.mainBody.update(result);if(headersToo===true){this.updateHeaders();this.updateHeaderSortState();} +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(true);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('<div class="x-grid-empty">'+this.emptyText+'</div>');}},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){Ext.menu.MenuMgr.unregister(this.colMenu);this.colMenu.destroy();delete this.colMenu;} -if(this.hmenu){Ext.menu.MenuMgr.unregister(this.hmenu);this.hmenu.destroy();delete this.hmenu;} +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];}} -if(this.dragZone){this.dragZone.unreg();} -Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);Ext.destroy(this.resizeMarker,this.resizeProxy,this.focusEl,this.mainBody,this.scroller,this.mainHd,this.mainWrap,this.dragZone,this.splitone,this.columnDrag,this.columnDrop);this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},onDenyColumnHide:function(){},render:function(){if(this.autoFill){this.fitColumns(true,true);}else if(this.forceFit){this.fitColumns(true,false);}else if(this.grid.autoExpandColumn){this.autoExpand(true);} +Ext.destroy(this.resizeMarker,this.resizeProxy);if(this.dragZone){this.dragZone.unreg();} +this.initData(null,null);Ext.EventManager.removeResizeListener(this.onWindowResize,this);},onDenyColumnHide:function(){},render:function(){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();},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){delete this.lastViewWidth;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();this.syncFocusEl(0);},onClear:function(){this.refresh();this.syncFocusEl(0);},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);},initEvents:function(){},onHeaderClick:function(g,index){if(this.headersDisabled||!this.cm.isSortable(index)){return;} -g.stopEditing(true);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&&!e.within(this.getRow(row),true)){this.removeRowClass(row,"x-grid3-row-over");}},handleWheel:function(e){e.stopPropagation();},onRowSelect:function(row){this.addRowClass(row,this.selectedRowClass);},onRowDeselect:function(row){this.removeRowClass(row,this.selectedRowClass);},onCellSelect:function(row,col){var cell=this.getCell(row,col);if(cell){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.syncHeaderScroll();} +this.cm=cm;},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.focusRow(0);},onClear:function(){this.refresh();this.focusRow(0);},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(true);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,this.selectedRowClass);},onRowDeselect:function(row){this.removeRowClass(row,this.selectedRowClass);},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.isMenuDisabled(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)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'e-resize':'col-resize';}else if(r.right-x<=(!this.activeHdBtn?hw:2)&&this.cm.isResizable(this.activeHdIndex)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'w-resize':'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];var w=t.offsetWidth,adjust=false;if((ex-x)<=this.hw){adjust=-1;}else if((x+w)-ex<=this.hw){adjust=0;} +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.isMenuDisabled(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)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'e-resize':'col-resize';}else if(r.right-x<=(!this.activeHdBtn?hw:2)&&this.cm.isResizable(this.activeHdIndex)){ss.cursor=Ext.isAir?'move':Ext.isSafari?'w-resize':'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){if(ci+adjust<0){return;} 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.ColumnModel=function(config){if(config.columns){Ext.apply(this,config);this.setConfig(config.columns,true);}else{this.setConfig(config,true);} -this.addEvents("widthchange","headerchange","hiddenchange","columnmoved","columnlockchange","configchange");Ext.grid.ColumnModel.superclass.constructor.call(this);};Ext.extend(Ext.grid.ColumnModel,Ext.util.Observable,{defaultWidth:100,defaultSortable:false,getColumnId:function(index){return this.config[index].id;},getColumnAt:function(index){return this.config[index];},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(!c.isColumn){var cls=Ext.grid.Column.types[c.xtype||'gridcolumn'];c=new cls(c);config[i]=c;} +Ext.grid.ColumnModel=function(config){this.defaultWidth=100;this.defaultSortable=false;if(config.columns){Ext.apply(this,config);this.setConfig(config.columns,true);}else{this.setConfig(config,true);} +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='xgc'+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;} @@ -115,7 +113,7 @@ return this.config[col].sortable;},isMenuDisabled:function(col){return!!this.config[col].menuDisabled;},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].getCellEditor(rowIndex);},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-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.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;}}); Modified: mickael/trunk/ext/v3.0.0-a1/package/menu/menus.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/menu/menus.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/menu/menus.js 2008-12-01 20:55:57 UTC (rev 32) @@ -8,7 +8,7 @@ Ext.menu.Menu=function(config){if(Ext.isArray(config)){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(false,Ext.Container.prototype.getComponentId);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,ignoreParentClicks:false,hidden:true,createEl:function(){return new Ext.Layer({cls:"x-menu",shadow:this.shadow,constrain:false,parentEl:this.parentEl||document.body,zindex:this.zIndex||15000});},render:function(){if(this.el){return;} +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,ignoreParentClicks: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();if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this);} if(this.plain){el.addClass("x-menu-plain");} if(this.cls){el.addClass(this.cls);} @@ -28,7 +28,7 @@ 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.remove(item);item.destroy();},removeAll:function(){if(this.items){var f;while(f=this.items.first()){this.remove(f);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();} +return item;},remove:function(item){this.items.removeKey(item.id);item.destroy();},removeAll:function(){if(this.items){var f;while(f=this.items.first()){this.remove(f);}}},destroy:function(){this.beforeDestroy();Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable();} this.removeAll();if(this.ul){this.ul.removeAllListeners();} if(this.el){this.el.destroy();}},beforeDestroy:Ext.emptyFn});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;}}}); @@ -51,9 +51,9 @@ 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,clickHideDelay:1,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.itemId||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);} +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.clickHideDelay,this.parentMenu,[true]);}},expandMenu:function(autoActivate){},hideMenu:function(){}}); +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(cfg){if(typeof cfg=='string'){cfg={text:cfg}} Ext.menu.TextItem.superclass.constructor.call(this,cfg);};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);}}); Modified: mickael/trunk/ext/v3.0.0-a1/package/qtips/qtips.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/qtips/qtips.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/qtips/qtips.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,7 +7,7 @@ */ -Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:'x-tip',floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:'hide',initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=',header';}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:'close',handler:this[this.closeAction],scope:this});}},showAt:function(xy){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!='number')){this.doAutoWidth();} +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')){this.doAutoWidth();} if(this.constrainPosition){xy=this.el.adjustForConstraints(xy);} this.setPagePosition(xy[0],xy[1]);},doAutoWidth:function(){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(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true;}},showBy:function(el,pos){if(!this.rendered){this.render(Ext.getBody());} Modified: mickael/trunk/ext/v3.0.0-a1/package/resizable.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/resizable.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/resizable.js 2008-12-01 20:55:57 UTC (rev 32) @@ -33,10 +33,9 @@ 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){if(this.dd){this.dd.destroy();} -if(this.overlay){Ext.destroy(this.overlay);this.overlay=null;} -Ext.destroy(this.proxy);this.proxy=null;var ps=Ext.Resizable.positions;for(var k in ps){if(typeof ps[k]!="function"&&this[ps[k]]){this[ps[k]].destroy();}} -if(removeEl){this.el.update("");Ext.destroy(this.el);this.el=null;}},syncHandleHeight:function(){var h=this.el.getHeight(true);if(this.west){this.west.el.setHeight(h);} +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);},destroy:function(){Ext.destroy(this.el);this.el=null;}}; +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);}}; Modified: mickael/trunk/ext/v3.0.0-a1/package/splitbar.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/splitbar.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/splitbar.js 2008-12-01 20:55:57 UTC (rev 32) @@ -10,9 +10,9 @@ 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){Ext.destroy(this.overlay);delete this.overlay;} +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.destroy(Ext.get(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; +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; Modified: mickael/trunk/ext/v3.0.0-a1/package/tabs/tabs.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/tabs/tabs.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/tabs/tabs.js 2008-12-01 20:55:57 UTC (rev 32) @@ -9,9 +9,9 @@ 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',activeTab:null,tabMargin:2,plain:false,wheelIncrement:20,idDelimiter:'__',itemCls:'x-tab-item',elements:'body',headerAsText:false,frame:false,hideBorders:true,initComponent:function(){this.frame=false;Ext.TabPanel.superclass.initComponent.call(this);this.addEvents('beforetabchange','tabchange','contextmenu');this.setLayout(new Ext.layout.CardLayout({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();if(this.activeTab!==undefined&&typeof this.activeTab!='object'){this.activeTab=this.items.get(this.activeTab);}},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');} +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}});var beforeEl=(this.tabPosition=='bottom'?this.stripWrap:null);this.stripSpacer=st.createChild({cls:'x-tab-strip-spacer'},beforeEl);this.strip=new Ext.Element(this.stripWrap.dom.firstChild);this.edge=this.strip.createChild({tag:'li',cls:'x-tab-edge'});this.strip.createChild({cls:'x-clear'});this.body.addClass('x-tab-panel-body-'+this.tabPosition);if(!this.itemTpl){var tt=new Ext.Template('<li class="{cls}" id="{id}"><a class="x-tab-strip-close" onclick="return false;"></a>','<a class="x-tab-right" href="#" onclick="return false;"><em class="x-tab-left">','<span class="x-tab-strip-inner"><span class="x-tab-strip-text {iconCls}">{text}</span></span>','</em></a></li>');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,{target:this});this.on('remove',this.onRemove,this,{target:this});this.strip.on('mousedown',this.onStripMouseDown,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(this.idDelimiter)[1]);if(item.disabled){return{close:null,item:null,el:null};}} +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('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(this.idDelimiter)[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){if(e.button!=0){return;} e.preventDefault();var t=this.findTargets(e);if(t.close){if(t.item.fireEvent('close',t.item)!==false){this.remove(t.item);} return;} @@ -20,9 +20,9 @@ if(item.iconCls){cls+=' x-tab-with-icon';} if(item.tabCls){cls+=' '+item.tabCls;} var p={id:this.id+this.idDelimiter+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.tabEl=el;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();} +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.destroy(Ext.get(this.getTabEl(item)));this.stack.remove(item);item.un('disable',this.onItemDisabled,this);item.un('enable',this.onItemEnabled,this);item.un('titlechange',this.onItemTitleChanged,this);item.un('beforeshow',this.onBeforeShowItem,this);if(item==this.activeTab){var next=this.stack.next();if(next){this.setActiveTab(next);}else{this.setActiveTab(0);}} +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);item.un('disable',this.onItemDisabled,this);item.un('enable',this.onItemEnabled,this);item.un('titlechange',this.onItemTitleChanged,this);item.un('beforeshow',this.onBeforeShowItem,this);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){var itemId=(typeof item==='number')?this.items.items[item].getItemId():item.getItemId();return document.getElementById(this.id+this.idDelimiter+itemId);},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();} this.stack.remove(item);},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;} @@ -41,7 +41,5 @@ 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)){wd.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');},beforeDestroy:function(){if(this.items){this.items.each(function(item){if(item&&item.tabEl){Ext.get(item.tabEl).removeAllListeners();item.tabEl=null;}},this);} -if(this.strip){this.strip.removeAllListeners();} -Ext.TabPanel.superclass.beforeDestroy.apply(this);}});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]);}} +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();}};}; Modified: mickael/trunk/ext/v3.0.0-a1/package/toolbar/toolbar.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/toolbar/toolbar.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/toolbar/toolbar.js 2008-12-01 20:55:57 UTC (rev 32) @@ -12,15 +12,14 @@ this.cleanup(this.leftTr);this.cleanup(this.rightTr);this.cleanup(this.extrasTr);this.fitToSize(target);},cleanup:function(row){var cn=row.childNodes;for(var i=cn.length-1,c;i>=0&&(c=cn[i]);i--){if(!c.firstChild){row.removeChild(c);}}},insertCell:function(c,side,pos){var td=document.createElement('td');td.className='x-toolbar-cell';side.insertBefore(td,side.childNodes[pos]||null);return td;},hideItem:function(item){var h=(this.hiddens=this.hiddens||[]);h.push(item);item.xtbHidden=true;item.xtbWidth=item.getDomPositionEl().dom.parentNode.offsetWidth;item.hide();},unhideItem:function(item){item.show();item.xtbHidden=false;this.hiddens.remove(item);if(this.hiddens.length<1){delete this.hiddens;}},getItemWidth:function(c){return c.hidden?(c.xtbWidth||0):c.getDomPositionEl().dom.parentNode.offsetWidth;},fitToSize:function(t){var w=t.dom.clientWidth;var lw=this.lastWidth||0;this.lastWidth=w;var iw=t.dom.firstChild.offsetWidth;var clipWidth=w-this.triggerWidth;var hideIndex=-1;if(iw>w||(this.hiddens&&w>lw)){var i,items=this.container.items.items,len=items.length,c;var loopWidth=0;for(i=0;i<len;i++){c=items[i];if(!c.isFill){loopWidth+=this.getItemWidth(c);if(loopWidth>clipWidth){if(!c.xtbHidden){this.hideItem(c);}}else{if(c.xtbHidden){this.unhideItem(c);}}}}} if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent('overflowchange',this.container,true);this.lastOverflow=true;}}else if(this.more){this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent('overflowchange',this.container,false);this.lastOverflow=false;}}},createMenuConfig:function(c,hideOnClick){var cfg=Ext.apply({},c.initialConfig);cfg.hideOnClick=hideOnClick;delete cfg.xtype;return cfg;},addComponentToMenu:function(m,c){if(c instanceof Ext.Toolbar.Separator){m.add('-');}else if(typeof c.isXType=='function'){if(c.isXType('splitbutton')){m.add(this.createMenuConfig(c,true));}else if(c.isXType('button')){m.add(this.createMenuConfig(c,!c.menu));}else if(c.isXType('buttongroup')){m.add('-');c.items.each(function(item){this.addComponentToMenu(m,item);},this);m.add('-');}}},beforeMoreShow:function(m){m.removeAll();for(var i=0,h=this.container.items.items,len=h.length,c;i<len;i++){c=h[i];if(c.xtbHidden){this.addComponentToMenu(m,c);}} if(m.items.length<1){m.add(this.noItemsMenuText);}},initMore:function(){if(!this.more){this.moreMenu=new Ext.menu.Menu({listeners:{beforeshow:this.beforeMoreShow,scope:this}});this.more=new Ext.Button({iconCls:'x-toolbar-more-icon',cls:'x-toolbar-more',menu:this.moreMenu});var td=this.insertCell(this.more,this.extrasTr,100);this.more.render(td);}}});Ext.Container.LAYOUTS['toolbar']=Ext.layout.ToolbarLayout;Ext.Toolbar=function(config){if(Ext.isArray(config)){config={items:config,layout:'toolbar'};}else{config=Ext.apply({layout:'toolbar'},config);if(config.buttons){config.items=config.buttons;}} -Ext.Toolbar.superclass.constructor.call(this,config);};(function(){var T=Ext.Toolbar;Ext.extend(T,Ext.Container,{defaultType:'button',trackMenus:true,internalDefaults:{removeMode:'container',hideParent:true},toolbarCls:'x-toolbar',initComponent:function(){T.superclass.initComponent.call(this);this.addEvents('overflowchange');},onRender:function(ct,position){if(!this.el){if(!this.autoCreate){this.autoCreate={cls:this.toolbarCls+' x-small-editor'}} -this.el=ct.createChild(Ext.apply({id:this.id},this.autoCreate),position);}},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.tag){this.addDom(el);}else if(el.tagName){this.addElement(el);}else if(typeof el=="object"){if(el.xtype){this.addItem(Ext.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(){this.addItem(new T.Fill());},addElement:function(el){var item=new T.Item({el:el});this.addItem(item);return item;},addItem:function(item){Ext.Toolbar.superclass.add.apply(this,arguments);return item;},addButton:function(config){if(Ext.isArray(config)){var buttons=[];for(var i=0,len=config.length;i<len;i++){buttons.push(this.addButton(config[i]));} +Ext.Toolbar.superclass.constructor.call(this,config);};(function(){var T=Ext.Toolbar;Ext.extend(T,Ext.Container,{defaultType:'button',trackMenus:true,internalDefaults:{removeMode:'container',hideParent:true},autoCreate:{cls:'x-toolbar x-small-editor'},initComponent:function(){T.superclass.initComponent.call(this);this.addEvents('overflowchange');},onRender:function(ct,position){this.el=ct.createChild(Ext.apply({id:this.id},this.autoCreate),position);},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.tag){this.addDom(el);}else if(el.tagName){this.addElement(el);}else if(typeof el=="object"){if(el.xtype){this.addItem(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(){this.addItem(new T.Fill());},addElement:function(el){var item=new T.Item({el:el});this.addItem(item);return item;},addItem:function(item){Ext.Toolbar.superclass.add.apply(this,arguments);return item;},addButton:function(config){if(Ext.isArray(config)){var buttons=[];for(var i=0,len=config.length;i<len;i++){buttons.push(this.addButton(config[i]));} return buttons;} var b=config;if(!b.events){b=config.split?new T.SplitButton(config):new T.Button(config);} this.initMenuTracking(b);this.addItem(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){var t=new T.TextItem(text);this.addItem(t);return t;},insertButton:function(index,item){if(Ext.isArray(item)){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);} Ext.Toolbar.superclass.insert.call(this,index,item);return item;},addDom:function(config){var item=new T.Item({autoEl:config});this.addItem(item);return item;},addField:function(field){this.addItem(field);return field;},applyDefaults:function(c){c=Ext.Toolbar.superclass.applyDefaults.call(this,c);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d);}else{Ext.applyIf(c,d);} -return c;},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg('tbitem',T.Item);T.Separator=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'span',cls:'xtb-sep'},position);}});Ext.reg('tbseparator',T.Separator);T.Spacer=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'div',cls:'xtb-spacer',style:this.width?'width:'+this.width+'px':''},position);}});Ext.reg('tbspacer',T.Spacer);T.Fill=Ext.extend(T.Item,{render:Ext.emptyFn,isFill:true});Ext.reg('tbfill',T.Fill);T.TextItem=Ext.extend(T.Item,{constructor:function(config){if(typeof config=='string'){config={autoEl:{cls:'xtb-text',html:config}};}else{config.autoEl={cls:'xtb-text',html:config.text||''};} +return c;},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=Ext.extend(Ext.BoxComponent,{hideParent:true,enable:Ext.emptyFn,disable:Ext.emptyFn,focus:Ext.emptyFn});Ext.reg('tbitem',T.Item);T.Separator=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'span',cls:'ytb-sep'},position);}});Ext.reg('tbseparator',T.Separator);T.Spacer=Ext.extend(T.Item,{onRender:function(ct,position){this.el=ct.createChild({tag:'div',cls:'ytb-spacer'},position);}});Ext.reg('tbspacer',T.Spacer);T.Fill=Ext.extend(T.Item,{render:Ext.emptyFn,isFill:true});Ext.reg('tbfill',T.Fill);T.TextItem=Ext.extend(T.Item,{constructor:function(config){if(typeof config=='string'){config={autoEl:{cls:'xtb-text',html:config}};}else{config.autoEl={cls:'xtb-text',html:config.text||''};} T.TextItem.superclass.constructor.call(this,config);},setText:function(t){if(this.rendered){this.el.dom.innerHTML=t;}else{this.autoEl.html=t;}}});Ext.reg('tbtext',T.TextItem);T.Button=Ext.extend(Ext.Button,{});T.SplitButton=Ext.extend(Ext.SplitButton,{});Ext.reg('tbbutton',T.Button);Ext.reg('tbsplit',T.SplitButton);})();Ext.ButtonGroup=Ext.extend(Ext.Panel,{baseCls:'x-btn-group',layout:'table',defaultType:'button',frame:true,internalDefaults:{removeMode:'container',hideParent:true},initComponent:function(){this.layoutConfig=this.layoutConfig||{};Ext.applyIf(this.layoutConfig,{columns:this.columns});if(!this.title){this.addClass('x-btn-group-notitle');} this.on('afterlayout',this.onAfterLayout,this);Ext.ButtonGroup.superclass.initComponent.call(this);},applyDefaults:function(c){c=Ext.ButtonGroup.superclass.applyDefaults.call(this,c);var d=this.internalDefaults;if(c.events){Ext.applyIf(c.initialConfig,d);Ext.apply(c,d);}else{Ext.applyIf(c,d);} return c;},onAfterLayout:function(){var bodyWidth=this.body.getFrameWidth('lr')+this.body.dom.firstChild.offsetWidth;this.body.setWidth(bodyWidth);this.el.setWidth(bodyWidth+this.getFrameWidth());}});Ext.reg('buttongroup',Ext.ButtonGroup); @@ -31,5 +30,4 @@ this.cursor=(o.params&&o.params[this.paramNames.start])?o.params[this.paramNames.start]:0;var d=this.getPageData(),ap=d.activePage,ps=d.pages;this.afterTextItem.setText(String.format(this.afterPageText,d.pages));this.field.value=ap;this.first.setDisabled(ap==1);this.prev.setDisabled(ap==1);this.next.setDisabled(ap==ps);this.last.setDisabled(ap==ps);this.refresh.enable();this.updateInfo();this.fireEvent('change',this,d);},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)};},changePage:function(page){this.doLoad(((page-1)*this.pageSize).constrain(0,this.store.getTotalCount()));},onLoadError:function(){if(!this.rendered){return;} this.refresh.enable();},readPage:function(d){var v=this.field.value,pageNum;if(!v||isNaN(pageNum=parseInt(v,10))){this.field.value=d.activePage;return false;} return pageNum;},onPagingKeydown:function(e){var k=e.getKey(),d=this.getPageData(),pageNum;if(k==e.RETURN){e.stopEvent();pageNum=this.readPage(d);if(pageNum!==false){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.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.value=pageNum;}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(start){var o={},pn=this.paramNames;o[pn.start]=start;o[pn.limit]=this.pageSize;if(this.fireEvent('beforechange',this,o)!==false){this.store.load({params:o});}},onClick:function(button){var store=this.store;switch(button){case this.first:this.doLoad(0);break;case this.prev:this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case this.next:this.doLoad(this.cursor+this.pageSize);break;case this.last:var total=store.getTotalCount();var extra=total%this.pageSize;var lastStart=extra?(total-extra):total-this.pageSize;this.doLoad(lastStart);break;case this.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;this.paramNames.start=store.paramNames.start;this.paramNames.limit=store.paramNames.limit;},onDestroy:function(){if(this.store){this.unbind(this.store);} -Ext.PagingToolbar.superclass.onDestroy.call(this);}});})();Ext.reg('paging',Ext.PagingToolbar); +pageNum+=increment;if(pageNum>=1&pageNum<=d.pages){this.field.value=pageNum;}}}},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable();}},doLoad:function(start){var o={},pn=this.paramNames;o[pn.start]=start;o[pn.limit]=this.pageSize;if(this.fireEvent('beforechange',this,o)!==false){this.store.load({params:o});}},onClick:function(button){var store=this.store;switch(button){case this.first:this.doLoad(0);break;case this.prev:this.doLoad(Math.max(0,this.cursor-this.pageSize));break;case this.next:this.doLoad(this.cursor+this.pageSize);break;case this.last:var total=store.getTotalCount();var extra=total%this.pageSize;var lastStart=extra?(total-extra):total-this.pageSize;this.doLoad(lastStart);break;case this.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;this.paramNames.start=store.paramNames.start;this.paramNames.limit=store.paramNames.limit;}});})();Ext.reg('paging',Ext.PagingToolbar); Modified: mickael/trunk/ext/v3.0.0-a1/package/tree/tree.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/tree/tree.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/tree/tree.js 2008-12-01 20:55:57 UTC (rev 32) @@ -56,13 +56,12 @@ return t;},delegateOut:function(e,t){if(!this.beforeEvent(e)){return;} if(e.getTarget('.x-tree-ec-icon',1)){var n=this.getNode(e);this.onIconOut(e,n);if(n==this.lastEcOver){delete this.lastEcOver;}} if((t=this.getNodeTarget(e))&&!e.within(t,true)){this.onNodeOut(e,this.getNode(e));}},delegateOver:function(e,t){if(!this.beforeEvent(e)){return;} -if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on('mouseover',this.trackExit,this);this.trackingDoc=true;} if(this.lastEcOver){this.onIconOut(e,this.lastEcOver);delete this.lastEcOver;} if(e.getTarget('.x-tree-ec-icon',1)){this.lastEcOver=this.getNode(e);this.onIconOver(e,this.lastEcOver);} -if(t=this.getNodeTarget(e)){this.onNodeOver(e,this.getNode(e));}},trackExit:function(e){if(this.lastOverNode&&!e.within(this.lastOverNode.ui.getEl())){this.onNodeOut(e,this.lastOverNode);delete this.lastOverNode;Ext.getBody().un('mouseover',this.trackExit,this);this.trackingDoc=false;}},delegateClick:function(e,t){if(!this.beforeEvent(e)){return;} +if(t=this.getNodeTarget(e)){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){this.lastOverNode=node;node.ui.onOver(e);},onNodeOut:function(e,node){node.ui.onOut(e);},onIconOver:function(e,node){node.ui.addClass('x-tree-ec-over');},onIconOut:function(e,node){node.ui.removeClass('x-tree-ec-over');},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;} +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);},onIconOver:function(e,node){node.ui.addClass('x-tree-ec-over');},onIconOut:function(e,node){node.ui.removeClass('x-tree-ec-over');},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.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);} @@ -123,7 +122,7 @@ 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?this.parentNode.getPath():this.getPath(),false,function(){var node=tree.getNodeById(this.id);tree.getTreeEl().scrollChildIntoView(node.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.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(){var node=tree.getNodeById(this.id);tree.getTreeEl().scrollChildIntoView(node.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);} Modified: mickael/trunk/ext/v3.0.0-a1/package/util.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/util.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/util.js 2008-12-01 20:55:57 UTC (rev 32) @@ -59,13 +59,12 @@ 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:/(?:<script.*?>)((\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);}}(),number:function(v,format){if(!format){return v;} v*=1;if(typeof v!='number'||isNaN(v)){return'';} -var comma=',';var dec='.';var i18n=false;if(format.substr(format.length-2)=='/i'){format=format.substr(0,format.length-2);i18n=true;comma='.';dec=',';} -var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,''):format.replace(/[^\d\.]/g,'')).split(dec);if(1<psplit.length){v=v.toFixed(psplit[1].length);} +var hasComma=-1<format.indexOf(','),psplit=format.replace(/[^\d\.]/g,'').split('.');if(1<psplit.length){v=v.toFixed(psplit[1].length);} else if(2<psplit.length){throw('NumberFormatException: invalid format, formats should have no more than 1 period: '+format);} else{v=v.toFixed(0);} var fnum=v.toString();if(hasComma){psplit=fnum.split('.');var cnum=psplit[0],parr=[],j=cnum.length,m=Math.floor(j/3),n=cnum.length%3||3;for(var i=0;i<j;i+=n){if(i!=0){n=3;} parr[parr.length]=cnum.substr(i,n);m-=1;} -fnum=parr.join(comma);if(psplit[1]){fnum+=dec+psplit[1];}} +fnum=parr.join(',');if(psplit[1]){fnum+='.'+psplit[1];}} return format.replace(/[\d,?\.?]+/,fnum);},numberRenderer:function(format){return function(v){return Ext.util.Format.number(v,format);};},plural:function(v,s,p){return v+' '+(v==1?s:(p?p:s+'s'));}}}(); 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);} @@ -82,7 +81,7 @@ {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,destroy:function(){Ext.destroy(this.el);this.purgeListeners();},handleMouseDown:function(){clearTimeout(this.timer);this.el.blur();if(this.pressClass){this.el.addClass(this.pressClass);} +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,this);if(this.pressClass){this.el.addClass(this.pressClass);} Modified: mickael/trunk/ext/v3.0.0-a1/package/widget-core.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/package/widget-core.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/package/widget-core.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,7 +7,7 @@ */ -Ext.ComponentMgr=function(){var all=new Ext.util.MixedCollection();var types={};var ptypes={};return{register:function(c){all.add(c);},unregister:function(c){all.remove(c);},get:function(id){return all.get(id);},onAvailable:function(id,fn,scope){all.on("add",function(index,o){if(o.id==id){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 config.render?config:new types[config.xtype||defaultType](config);},registerPlugin:function(ptype,cls){ptypes[ptype]=cls;cls.ptype=ptype;},createPlugin:function(config,defaultType){return new ptypes[config.ptype||defaultType](config);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin;Ext.create=Ext.ComponentMgr.create; +Ext.ComponentMgr=function(){var all=new Ext.util.MixedCollection();var types={};var ptypes={};return{register:function(c){all.add(c);},unregister:function(c){all.remove(c);},get:function(id){return all.get(id);},onAvailable:function(id,fn,scope){all.on("add",function(index,o){if(o.id==id){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);},registerPlugin:function(ptype,cls){ptypes[ptype]=cls;cls.ptype=ptype;},createPlugin:function(config,defaultType){return new ptypes[config.ptype||defaultType](config);}};}();Ext.reg=Ext.ComponentMgr.registerType;Ext.preg=Ext.ComponentMgr.registerPlugin; 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};} @@ -23,11 +23,8 @@ 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();} -if(this.stateful!==false){this.initStateEvents();} -this.initRef();} -return this;},initRef:function(){if(this.ref){var levels=this.ref.split('/');var last=levels.length,i=0;var t=this;while(i<last){if(t.ownerCt){t=t.ownerCt;} -i++;} -t[levels[--i]]=this;}},initState:function(config){if(Ext.state.Manager){var id=this.getStateId();if(id){var state=Ext.state.Manager.get(id);if(state){if(this.fireEvent('beforestaterestore',this,state)!==false){this.applyState(state);this.fireEvent('staterestore',this,state);}}}}},getStateId:function(){return this.stateId||((this.id.indexOf('ext-comp-')==0||this.id.indexOf('ext-gen')==0)?null:this.id);},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 id=this.getStateId();if(id){var state=this.getState();if(this.fireEvent('beforestatesave',this,state)!==false){Ext.state.Manager.set(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.stateful!==false){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.id){this.el.id=this.getId();}} if(this.el){this.el=Ext.get(this.el);if(this.allowDomMove!==false){ct.dom.insertBefore(this.el.dom,position);} if(this.overCls){this.el.addClassOnOver(this.overCls);}}},getAutoCreate:function(){var cfg=typeof this.autoCreate=="object"?this.autoCreate:Ext.apply({},this.defaultAutoCreate);if(this.id&&!cfg.id){cfg.id=this.id;} @@ -48,7 +45,7 @@ return tc.xtypes;},findParentBy:function(fn){for(var p=this.ownerCt;(p!=null)&&!fn(p,this);p=p.ownerCt);return p||null;},findParentByType:function(xtype){return typeof xtype=='function'?this.findParentBy(function(p){return p.constructor===xtype;}):this.findParentBy(function(p){return p.constructor.xtype===xtype;});},getDomPositionEl:function(){return this.getPositionEl?this.getPositionEl():this.getEl();},mon:function(item,ename,fn,scope,opt){if(!this.mons){this.mons=[];this.on('beforedestroy',function(){for(var i=0,len=this.mons.length;i<len;i++){var m=this.mons[i];m.item.un(m.ename,m.fn,m.scope);}},this);} this.mons.push({item:item,ename:ename,fn:fn,scope:scope});item.on(ename,fn,scope,opt);},nextSibling:function(){if(this.ownerCt){var index=this.ownerCt.items.indexOf(this);if(index!=-1&&index+1<this.ownerCt.items.getCount()){return this.ownerCt.items.itemAt(index+1);}} return null;},previousSibling:function(){if(this.ownerCt){var index=this.ownerCt.items.indexOf(this);if(index>0){return this.ownerCt.items.itemAt(index-1);}} -return null;},getBubbleTarget:function(){return this.ownerCt;}});Ext.reg('component',Ext.Component); +return null;}});Ext.reg('component',Ext.Component); 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;} Added: mickael/trunk/ext/v3.0.0-a1/prerelease-license.txt =================================================================== --- mickael/trunk/ext/v3.0.0-a1/prerelease-license.txt (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/prerelease-license.txt 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,12 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2008, Ext JS, LLC +All rights reserved. +licensing@xxxxxxxxx + +Pre-release code in the Ext repository is intended for development purposes +only and will not always be stable. + +Use of pre-release code is permitted with your application at your own risk +under standard Ext license terms. Public redistribution is prohibited. + +For early Ext 3.0 licensing, please contact us at licensing@xxxxxxxxx \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/borders-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/borders-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/borders-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,69 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/box-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/box-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/box-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,109 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + + + +.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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/button-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/button-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/button-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,424 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 arial,tahoma,verdana,helvetica; + padding-left:3px; + padding-right:3px; + cursor:pointer; + margin:0; + overflow:visible; + width:auto; + -moz-outline:0 none; + outline:0 none; + color:#333; +} +* html .ext-ie .x-btn button { + width:1px; +} +.ext-gecko .x-btn button { + padding-left:0; + padding-right:0; +} +.ext-gecko .x-btn button::-moz-focus-inner { + padding:0; +} +.ext-ie .x-btn button { + padding-top:2px; +} +.x-btn em { + font-style:normal; + font-weight:normal; +} +.x-btn td { + padding:0 !important; +} +.x-btn-text { + cursor:pointer; + white-space: nowrap; + padding:0; +} + + + + +.x-btn-noicon .x-btn-small .x-btn-text{ + height: 16px; +} +.x-btn-noicon .x-btn-medium .x-btn-text{ + height: 24px; +} +.x-btn-noicon .x-btn-large .x-btn-text{ + height: 32px; +} + + +.x-btn-icon .x-btn-text{ + background-position: center; + background-repeat: no-repeat; +} +.x-btn-icon .x-btn-small .x-btn-text{ + height: 16px; + width: 16px; +} +.x-btn-icon .x-btn-medium .x-btn-text{ + height: 24px; + width: 24px; +} +.x-btn-icon .x-btn-large .x-btn-text{ + height: 32px; + width: 32px; +} + + + +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:18px; + height:16px; +} +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:26px; + height:24px; +} +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text{ + background-position: 0 center; + background-repeat: no-repeat; + padding-left:34px; + height:32px; +} + +.x-btn-text-icon .x-btn-icon-small-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:18px; +} +.x-btn-text-icon .x-btn-icon-medium-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:26px; +} +.x-btn-text-icon .x-btn-icon-large-top .x-btn-text{ + background-position: center 0; + background-repeat: no-repeat; + padding-top:34px; +} + +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:18px; + height:16px; +} +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:26px; + height:24px; +} +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text{ + background-position: right center; + background-repeat: no-repeat; + padding-right:34px; + height:32px; +} + +.x-btn-text-icon .x-btn-icon-small-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:18px; +} +.x-btn-text-icon .x-btn-icon-medium-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:26px; +} +.x-btn-text-icon .x-btn-icon-large-bottom .x-btn-text{ + background-position: center bottom; + background-repeat: no-repeat; + padding-bottom:34px; +} + + +.x-btn-tr i, .x-btn-tl i, .x-btn-mr i, .x-btn-ml i, .x-btn-br i, .x-btn-bl i{ + font-size:1px; + line-height:1px; + width:3px; + display:block; + overflow:hidden; +} +.x-btn-tr i, .x-btn-tl i, .x-btn-br i, .x-btn-bl i{ + height:3px; +} +.x-btn-tl{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 0; +} +.x-btn-tr{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px 0; +} +.x-btn-tc{ + height:3px; + background:url(../images/default/button/btn.gif) repeat-x 0 -6px; +} + +.x-btn-ml{ + width:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 -24px; +} +.x-btn-mr{ + width:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px -24px; +} + +.x-btn-mc{ + background:url(../images/default/button/btn.gif) repeat-x 0 -1096px; + vertical-align: middle; + text-align:center; + padding:0 5px; + cursor:pointer; + white-space:nowrap; +} +.x-btn-bl{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat 0 -3px; +} +.x-btn-br{ + width:3px; + height:3px; + background:url(../images/default/button/btn.gif) no-repeat -3px -3px; +} +.x-btn-bc{ + height:3px; + background:url(../images/default/button/btn.gif) repeat-x 0 -15px; +} + + +.x-btn-over .x-btn-tl{ + background-position: -6px 0; +} +.x-btn-over .x-btn-tr{ + background-position: -9px 0; +} +.x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} +.x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} +.x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} +.x-btn-over .x-btn-br{ + background-position: -9px -3px; +} +.x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + + +.x-btn-click .x-btn-tl, .x-btn-menu-active .x-btn-tl, .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} +.x-btn-click .x-btn-tr, .x-btn-menu-active .x-btn-tr, .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} +.x-btn-click .x-btn-tc, .x-btn-menu-active .x-btn-tc, .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-btn-click .x-btn-ml, .x-btn-menu-active .x-btn-ml, .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} +.x-btn-click .x-btn-mr, .x-btn-menu-active .x-btn-mr, .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-btn-click .x-btn-mc, .x-btn-menu-active .x-btn-mc, .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} +.x-btn-click .x-btn-bl, .x-btn-menu-active .x-btn-bl, .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} +.x-btn-click .x-btn-br, .x-btn-menu-active .x-btn-br, .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} +.x-btn-click .x-btn-bc, .x-btn-menu-active .x-btn-bc, .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + + +.x-btn-disabled *{ + color:gray !important; + cursor:default !important; +} + + + + +.x-btn-mc em.x-btn-arrow { + display:block; + background:transparent url(../images/default/button/arrow.gif) no-repeat right center; + padding-right:10px; +} + +.x-btn-mc em.x-btn-split { + display:block; + background:transparent url(../images/default/button/s-arrow.gif) no-repeat right center; + padding-right:14px; +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + display:block; + background:transparent url(../images/default/button/s-arrow-b-noline.gif) no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-mc em.x-btn-split-bottom { + display:block; + background:transparent url(../images/default/button/s-arrow-b.gif) no-repeat center bottom; + padding-bottom:14px; +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + + +.x-btn-as-arrow .x-btn-mc em { + display:block; + background:transparent; + padding-bottom:14px; +} + + +.x-btn-group { + padding:1px; +} +.x-btn-group-header { + padding:2px; + color: #3e6aaa; + text-align:center; +} +.x-btn-group-tc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 0; + overflow:hidden; +} +.x-btn-group-tl { + background: transparent url(../images/default/button/group-cs.gif) no-repeat 0 0; + padding-left:3px; + zoom:1; +} +.x-btn-group-tr { + background: transparent url(../images/default/button/group-cs.gif) no-repeat right 0; + zoom:1; + padding-right:3px; +} +.x-btn-group-bc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 bottom; + zoom:1; +} +.x-btn-group-bc .x-panel-footer { + zoom:1; +} + +.x-btn-group-bl { + background: transparent url(../images/default/button/group-cs.gif) no-repeat 0 bottom; + padding-left:3px; + zoom:1; +} +.x-btn-group-br { + background: transparent url(../images/default/button/group-cs.gif) no-repeat right bottom; + padding-right:3px; + zoom:1; +} +.x-btn-group-mc { + border:0 none; + padding:1px 0 0 0; + margin:0; +} +.x-btn-group-mc .x-btn-group-body { + background:transparent; + border: 0 none; +} +.x-btn-group-ml { + background: transparent url(../images/default/button/group-lr.gif) repeat-y 0 0; + padding-left:3px; + zoom:1; +} +.x-btn-group-mr { + background: transparent url(../images/default/button/group-lr.gif) repeat-y right 0; + padding-right:3px; + zoom:1; +} +.x-btn-group-bc .x-btn-group-footer { + padding-bottom:6px; +} + +.x-panel-nofooter .x-btn-group-bc { + height:3px; + font-size:0; + line-height:0; +} +.x-btn-group-bwrap { + overflow:hidden; + zoom:1; +} +.x-btn-group-body { + overflow:hidden; + zoom:1; +} +.x-btn-group-notitle .x-btn-group-tc { + background: transparent url(../images/default/button/group-tb.gif) repeat-x 0 0; + overflow:hidden; + height:2px; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/combo-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/combo-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/combo-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,63 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/core-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/core-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/core-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,346 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} + +.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-history-frame { + position:absolute; + top:-1px; + left:0; + width:1px; + height:1px; + visibility:hidden; +} + +#x-history-field { + position:absolute; + top:0; + left:-1px; + width:1px; + height:1px; + visibility:hidden; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/date-picker-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/date-picker-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/date-picker-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,257 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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-tc,.x-date-middle .x-btn-tl,.x-date-middle .x-btn-tr, +.x-date-middle .x-btn-mc,.x-date-middle .x-btn-ml,.x-date-middle .x-btn-mr, +.x-date-middle .x-btn-bc,.x-date-middle .x-btn-bl,.x-date-middle .x-btn-br{ + background:transparent !important; + vertical-align:middle; +} +.x-date-middle .x-btn .x-btn-text { + color:#fff; +} +.x-date-middle .x-btn-mc em.x-btn-arrow { + 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; + width:130px; +} +.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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/dd-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/dd-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/dd-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,89 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/debug-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/debug-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/debug-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,45 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/dialog-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/dialog-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/dialog-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,77 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} +.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; +} +.ext-gecko2 .ext-mb-fix-cursor { + overflow:auto; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/editor-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/editor-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/editor-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,74 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/form-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/form-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/form-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,567 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + + +.x-form-field{ + margin: 0 0 0 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; +} +textarea.x-form-field { + padding:2px 3px; +} +.x-form-text, .ext-ie .x-form-file { + height:22px; + line-height:18px; + vertical-align:middle; +} +.ext-ie .x-form-text { + margin:-1px 0; + height:22px; + line-height:18px; +} +.ext-ie textarea.x-form-field { + margin:-1px 0; +} +.ext-strict .x-form-text { + height:18px; +} +.ext-safari.ext-mac textarea.x-form-field { + margin-bottom:-2px; +} +.ext-gecko .x-form-text { + padding-top:2px; + padding-bottom:0; +} +textarea { + resize: none; +} + + + +.x-form-select-one { + height:20px; + line-height:18px; + vertical-align:middle; + background-color:#fff; + border: 1px solid #B5B8C8; +} + + + + + + +.x-form-check-group, .x-form-radio-group { + margin-bottom: 0; +} +.x-form-check-group .x-form-invalid .x-panel-body, +.x-form-radio-group .x-form-invalid .x-panel-body { + background-color: transparent; +} +.x-form-check-wrap, .x-form-radio-wrap { + padding: 3px 0 0 0; + line-height:18px; +} +.x-form-check-group .x-form-check-wrap, +.x-form-radio-group .x-form-radio-wrap { + height: 18px; +} +.ext-ie .x-form-check-group .x-form-check-wrap, +.ext-ie .x-form-radio-group .x-form-radio-wrap { + height: 21px; +} +.ext-ie .x-form-check-wrap input, +.ext-ie .x-form-radio-wrap input { + width:15px; + height:15px; +} +.x-form-check, .x-form-radio { + height: 13px; + width: 13px; + vertical-align: bottom; +} +.x-form-radio { + margin-bottom: 3px; +} +.x-form-check, .ext-ie .x-form-radio { + margin-bottom: 2px; +} +.x-form-check-wrap-inner, .x-form-radio-wrap-inner { + display: inline; + padding: 3px 0 0 0; +} +.x-form-check { + background: url('../images/default/form/checkbox.gif') no-repeat 0 0; +} +.x-form-radio { + background: url('../images/default/form/radio.gif') no-repeat 0 0; +} +.x-form-check-focus .x-form-check, .x-form-check-over .x-form-check, +.x-form-check-focus .x-form-radio, .x-form-check-over .x-form-radio { + background-position: -13px 0; +} +.x-form-check-down .x-form-check, +.x-form-check-down .x-form-radio { + background-position:-26px 0; +} +.x-form-check-checked .x-form-check-focus .x-form-check, +.x-form-check-checked .x-form-check-over .x-form-check { + background-position:-13px -13px; +} +.x-form-check-checked .x-form-check-down .x-form-check { + background-position:-26px -13px; +} +.x-form-check-checked .x-form-check, +.x-form-check-checked .x-form-radio { + background-position:0 -13px; +} +.x-form-check-group-label { + border-bottom: 1px solid #99BBE8; + color: #15428B; + margin-bottom: 5px; + padding-left: 3px !important; + float: none !important; +} + + + +.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 { + position:relative; + left:0;top:0; + zoom:1; + white-space: nowrap; +} + +.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 #cc3300; +} +.ext-safari .x-form-invalid{ + background-color:#ffeeee; + border: 1px solid #ff7870; +} +.x-form-inner-invalid, textarea.x-form-inner-invalid{ + background:#fff url(../images/default/grid/invalid_line.gif) repeat-x bottom; +} + + +.x-editor { + visibility:hidden; + padding:0; + margin:0; +} +.x-form-check-wrap { + height: 22px; + 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; + zoom:1; +} + +.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:#c0272b; + 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-left label { + text-align:left; +} +.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; + display:block; +} +.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:10px; +} +.x-fieldset legend .x-tool-toggle { + margin-right:3px; + margin-left:0; + float:left !important; +} +.x-fieldset legend input { + margin-right:3px; + float:left !important; + height:13px; + width:13px; +} +fieldset.x-panel-collapsed { + padding-bottom:0 !important; + border-width: 1px 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 .x-toolbar .x-form-text { + position:relative; + top:-1px; +} +.x-fieldset-noborder { + border:0px none transparent; +} +.x-fieldset-noborder legend { + margin-left:-3px; +} + +.ext-ie .x-fieldset-noborder legend { + position: relative; + margin-bottom:23px; +} +.ext-ie .x-fieldset-noborder legend span { + position: absolute; + left:-5px; +} + +.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-fieldset { + overflow:hidden; +} + +.x-fieldset-bwrap { + overflow:hidden; + zoom:1; +} + +.x-fieldset-body { + overflow:hidden; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/grid-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/grid-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/grid-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,599 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + + + + + + + + +.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; +} + +.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-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; + + 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; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; +} + + +.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 #eeeeee; +} + + +.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,.x-grid3-row-checked .x-grid3-row-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-td-row-icon { + background:transparent url(../images/default/grid/grid3-special-col-bg.gif) repeat-y right; + vertical-align:top; + text-align:center; +} +.x-grid3-body .x-grid3-td-row-icon .x-grid3-cell-inner { + padding:0 !important; + background-position:center center; + background-repeat:no-repeat; + width:16px; + height:16px; + margin-left:2px; + margin-top:3px; +} + + + +.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; +} +.ext-ie .x-props-grid .x-editor .x-form-text { + position:static; + top:0; +} + +.x-grid-empty { + padding:10px; + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + + + +.ext-ie7 .x-grid-panel .x-panel-bbar { + position:relative; +} + + + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + padding-right:0; + border-right:1px solid #ededed; +} +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/layout-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/layout-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/layout-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,309 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} + + +.ext-strict .ext-ie6 .x-layout-split{ + background-color: #fff !important; + filter: alpha(opacity=1); +} + +.x-layout-split-h{ + background-image:url(../images/default/s.gif); + background-position: left; +} +.x-layout-split-v{ + background-image:url(../images/default/s.gif); + background-position: top; +} + +.x-column-layout-ct { + overflow:hidden; + + zoom:1; +} + +.x-column { + float:left; + padding:0; + margin:0; + overflow:hidden; + zoom:1; + +} +.x-column-inner { + overflow:hidden; + zoom:1; +} + + + +.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; +} + +.ext-ie input.x-abs-layout-item, .ext-ie textarea.x-abs-layout-item { + margin:0; +} + + +.x-box-layout-ct { + overflow:hidden; + zoom:1; +} +.x-box-inner { + overflow:hidden; + zoom:1; + position:relative; + left:0; + top:0; +} +.x-box-item { + position:absolute; + left:0; + top:0; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/list-view-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/list-view-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/list-view-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,97 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + + + +.x-list-header{ + background: #f9f9f9 url(../images/default/grid/grid3-hrow.gif) repeat-x 0 bottom; + cursor:default; + zoom:1; + height:22px; +} +.x-list-header-inner div { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; +} +.x-list-header-inner div em { + display:block; + border-left:1px solid #ddd; + padding:4px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + font:normal 11px arial, tahoma, helvetica, sans-serif; + line-height:14px; +} +.x-list-body { + overflow:auto; + overflow-x:hidden; + overflow-y:auto; + zoom:1; +} +.x-list-body dl { + zoom:1; +} +.x-list-body dt { + display:block; + float:left; + overflow:hidden; + -o-text-overflow: ellipsis; + text-overflow: ellipsis; + white-space: nowrap; + cursor:pointer; + zoom:1; +} +.x-list-body dt em { + display:block; + padding:3px 4px; + overflow:hidden; + -moz-user-select: none; + -khtml-user-select: none; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#DFE8F6; +} + +.x-list-resizer { + border-left:1px solid #555; + border-right:1px solid #555; + position:absolute; + left:0; + top:0; +} + +.x-list-header-inner em.sort-asc { + background: transparent url(../images/default/grid/sort-hd.gif) no-repeat center 0; + border-color: #99bbe8; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} +.x-list-header-inner em.sort-desc { + background: transparent url(../images/default/grid/sort-hd.gif) no-repeat center -23px; + border-color: #99bbe8; + border-style:solid; + border-width: 0 1px 1px; + padding-bottom:3px; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/menu-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/menu-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/menu-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,156 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + overflow:hidden; +} +.x-menu-focus { + position:absolute; + left:-1px; + top:-1px; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + overflow:hidden; + display:block; +} +.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; + 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; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/panel-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/panel-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/panel-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,431 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + position: relative; +} + +.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; +} + +.ext-strict .ext-ie7 .x-panel-tc { + overflow: visible; +} +.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, .x-panel-nofooter .x-window-bc { + height:6px; + font-size:0; + line-height:0; +} + +.x-panel-bwrap { + overflow:hidden; + zoom:1; + left:0;top:0; +} +.x-panel-body { + overflow:hidden; + zoom:1; +} + +.x-panel-collapsed .x-resizable-handle{ + display:none; +} + +.ext-gecko .x-panel-animated div { + overflow:hidden !important; +} + + +.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-tool-print { + background-position:0 -315px; +} +.x-tool-print-over { + background-position:-15px -315px; +} + + +.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; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/progress-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/progress-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/progress-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,51 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/qtips-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/qtips-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/qtips-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,147 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/reset-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,9 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/resizable-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/resizable-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/resizable-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,149 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + + + + + + +.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); +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/slider-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/slider-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/slider-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,92 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + + +.x-slider { + zoom:1; +} +.x-slider-inner { + position:relative; + left:0; + top:0; + overflow:visible; + zoom:1; +} +.x-slider-focus { + position:absolute; + left:0; + top:0; + width:1px; + height:1px; + line-height:1px; + font-size:1px; + -moz-outline:0 none; + outline:0 none; + -moz-user-select: text; + -khtml-user-select: text; + display:block; + overflow:hidden; +} + + +.x-slider-horz { + padding-left:7px; + background:transparent url(../images/default/slider/slider-bg.png) no-repeat 0 -22px; +} +.x-slider-horz .x-slider-end { + padding-right:7px; + zoom:1; + background:transparent url(../images/default/slider/slider-bg.png) no-repeat right -44px; +} +.x-slider-horz .x-slider-inner { + background:transparent url(../images/default/slider/slider-bg.png) repeat-x 0 0; + height:22px; +} +.x-slider-horz .x-slider-thumb { + width:14px; + height:15px; + position:absolute; + left:0; + top:3px; + background:transparent url(../images/default/slider/slider-thumb.png) no-repeat 0 0; +} +.x-slider-horz .x-slider-thumb-over { + background-position: -14px -15px; +} +.x-slider-horz .x-slider-thumb-drag { + background-position: -28px -30px; +} + + +.x-slider-vert { + padding-top:7px; + background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -44px 0; + width:22px; +} +.x-slider-vert .x-slider-end { + padding-bottom:7px; + zoom:1; + background:transparent url(../images/default/slider/slider-v-bg.png) no-repeat -22px bottom; +} +.x-slider-vert .x-slider-inner { + background:transparent url(../images/default/slider/slider-v-bg.png) repeat-y 0 0; +} +.x-slider-vert .x-slider-thumb { + width:15px; + height:14px; + position:absolute; + left:3px; + bottom:0; + background:transparent url(../images/default/slider/slider-v-thumb.png) no-repeat 0 0; +} +.x-slider-vert .x-slider-thumb-over { + background-position: -15px -14px; +} +.x-slider-vert .x-slider-thumb-drag { + background-position: -30px -28px; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/tabs-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/tabs-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/tabs-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,363 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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, +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border:1px solid #8db2e3; + height:2px; + background: #deecfd; + font-size:1px; + line-height:1px; +} +.x-tab-panel-header-plain .x-tab-strip-spacer { + border-top: 0 none; +} +.x-tab-panel-footer-plain .x-tab-strip-spacer { + border-bottom: 0 none; +} + +.x-tab-panel-footer-plain .x-tab-strip-bottom { + background:transparent !important; + padding-bottom:0 !important; +} +.x-tab-panel-footer-plain { + background:transparent !important; + border-width:0 !important; + padding-top:0 !important; +} + +.ext-border-box .x-tab-panel-header-plain .x-tab-strip-spacer, +.ext-border-box .x-tab-panel-footer-plain .x-tab-strip-spacer { + height:3px; +} + +ul.x-tab-strip li { + float:left; + margin-left:2px; +} + + +ul.x-tab-strip li.x-tab-edge { + float:left; + margin:0 !important; + padding:0 !important; + border:0 none !important; + font-size:1px !important; + line-height:1px !important; + overflow:hidden; + zoom:1; + background:transparent !important; + width:1px; +} + +.x-tab-strip a, .x-tab-strip span, .x-tab-strip em { + display:block; +} + +.x-tab-strip a { + text-decoration:none !important; + -moz-outline: none; + outline: none; + cursor:pointer; +} + +.x-tab-strip-inner { + overflow:hidden; + text-overflow: ellipsis; +} + +.x-tab-strip span.x-tab-strip-text { + font:normal 11px tahoma,arial,helvetica; + color:#416aa3; + white-space: nowrap; + cursor:pointer; + padding:4px 0; +} +.x-tab-strip-top .x-tab-with-icon .x-tab-right { + padding-left:6px; +} +.x-tab-strip .x-tab-with-icon span.x-tab-strip-text { + padding-left:20px; + background-position: 0 3px; + background-repeat: no-repeat; +} + +.x-tab-strip-over span.x-tab-strip-text { + color:#15428b; +} + +.x-tab-strip-active, .x-tab-strip-active a.x-tab-right { + cursor:default; +} + +.x-tab-strip-active span.x-tab-strip-text { + cursor:default; + 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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/toolbar-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/toolbar-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/toolbar-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,279 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + left:0; + top:0; + zoom:1; + overflow:hidden; +} +.x-toolbar .x-item-disabled .x-btn-icon { + opacity: .35; + -moz-opacity: .35; + filter: alpha(opacity=35); +} +.x-toolbar td { + vertical-align:middle; +} +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + white-space: nowrap; + font:normal 11px arial,tahoma, 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-toolbar-cell { + vertical-align:middle; +} + +.x-toolbar .x-btn-tl{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-tr{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-tc{ + background-position: 500px 500px; +} + +.x-toolbar .x-btn-ml{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-mr{ + background-position: 500px 500px; +} + +.x-toolbar .x-btn-mc{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-bl{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-br{ + background-position: 500px 500px; +} +.x-toolbar .x-btn-bc{ + background-position: 500px 500px; +} + + +.x-toolbar .x-btn-over .x-btn-tl{ + background-position: -6px 0; +} +.x-toolbar .x-btn-over .x-btn-tr{ + background-position: -9px 0; +} +.x-toolbar .x-btn-over .x-btn-tc{ + background-position: 0 -9px; +} + +.x-toolbar .x-btn-over .x-btn-ml{ + background-position: -6px -24px; +} +.x-toolbar .x-btn-over .x-btn-mr{ + background-position: -9px -24px; +} + +.x-toolbar .x-btn-over .x-btn-mc{ + background-position: 0 -2168px; +} +.x-toolbar .x-btn-over .x-btn-bl{ + background-position: -6px -3px; +} +.x-toolbar .x-btn-over .x-btn-br{ + background-position: -9px -3px; +} +.x-toolbar .x-btn-over .x-btn-bc{ + background-position: 0 -18px; +} + +.x-toolbar .x-btn-click .x-btn-tl, .x-toolbar .x-btn-menu-active .x-btn-tl, .x-toolbar .x-btn-pressed .x-btn-tl{ + background-position: -12px 0; +} +.x-toolbar .x-btn-click .x-btn-tr, .x-toolbar .x-btn-menu-active .x-btn-tr, .x-toolbar .x-btn-pressed .x-btn-tr{ + background-position: -15px 0; +} +.x-toolbar .x-btn-click .x-btn-tc, .x-toolbar .x-btn-menu-active .x-btn-tc, .x-toolbar .x-btn-pressed .x-btn-tc{ + background-position: 0 -12px; +} + +.x-toolbar .x-btn-click .x-btn-ml, .x-toolbar .x-btn-menu-active .x-btn-ml, .x-toolbar .x-btn-pressed .x-btn-ml{ + background-position: -12px -24px; +} +.x-toolbar .x-btn-click .x-btn-mr, .x-toolbar .x-btn-menu-active .x-btn-mr, .x-toolbar .x-btn-pressed .x-btn-mr{ + background-position: -15px -24px; +} + +.x-toolbar .x-btn-click .x-btn-mc, .x-toolbar .x-btn-menu-active .x-btn-mc, .x-toolbar .x-btn-pressed .x-btn-mc{ + background-position: 0 -3240px; +} +.x-toolbar .x-btn-click .x-btn-bl, .x-toolbar .x-btn-menu-active .x-btn-bl, .x-toolbar .x-btn-pressed .x-btn-bl{ + background-position: -12px -3px; +} +.x-toolbar .x-btn-click .x-btn-br, .x-toolbar .x-btn-menu-active .x-btn-br, .x-toolbar .x-btn-pressed .x-btn-br{ + background-position: -15px -3px; +} +.x-toolbar .x-btn-click .x-btn-bc, .x-toolbar .x-btn-menu-active .x-btn-bc, .x-toolbar .x-btn-pressed .x-btn-bc{ + background-position: 0 -21px; +} + + + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar div.xtb-text{ + padding:2px 2px 0; + line-height:16px; + display:block; +} +.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/refresh.gif) !important; +} +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/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-toolbar-ct { + width:100%; +} + +.x-toolbar-left { + +} + +.x-toolbar-right td { + text-align:left; +} + +.x-panel-tbar, .x-panel-bbar, .x-window-tbar, .x-window-bbar, .x-tab-panel-tbar, .x-tab-panel-bbar, .x-plain-tbar, .x-plain-bbar { + overflow:hidden; + zoom:1; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +} +.x-toolbar-more .x-btn-small .x-btn-text{ + height: 16px; + width: 12px; +} +.x-toolbar-more em.x-btn-arrow { + display:inline; + background:transparent; + padding-right:0; +} + +div.x-toolbar-no-items { + color:gray !important; + padding:5px 10px !important; +} + + + +.ext-border-box .x-toolbar-cell .x-form-text { + margin-top:1px !important; + margin-bottom:-1px !important; +} + +.ext-border-box .x-toolbar-cell .x-form-field-wrap .x-form-text { + margin:0 !important; +} +.ext-ie .x-toolbar-cell .x-form-field-wrap { + height:21px; +} \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/tree-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/tree-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/tree-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,260 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; +} + +.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); +} +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.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:#444444; +} +.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-arrows .x-tree-elbow{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-end{ + background:transparent; +} +.x-tree-arrows .x-tree-elbow-end-plus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat 0 0; +} +.x-tree-arrows .x-tree-elbow-end-minus{ + background:transparent url(../images/default/tree/arrows.gif) no-repeat -16px 0; +} +.x-tree-arrows .x-tree-elbow-line{ + background:transparent; +} + +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-minus{ + background-position:-48px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-plus{ + background-position:-32px 0; +} +.x-tree-arrows .x-tree-ec-over .x-tree-elbow-end-minus{ + background-position:-48px 0; +} + + + +.x-tree-elbow-plus, .x-tree-elbow-minus, .x-tree-elbow-end-plus, .x-tree-elbow-end-minus{ + cursor:pointer; +} +.ext-ie ul.x-tree-node-ct{ + font-size:0; + line-height:0; + zoom:1; +} +.x-tree-node{ + 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); +} + +.x-tree-root-ct { + zoom:1; +} Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/window-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/window-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/window-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,208 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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; + left:0;top:0; +} +.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-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 Added: mickael/trunk/ext/v3.0.0-a1/resources/build/css/xtheme-gray-min.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/build/css/xtheme-gray-min.css (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/resources/build/css/xtheme-gray-min.css 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,415 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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); +} + + +.x-tool { + background-image:url(../images/gray/panel/tool-sprites.gif); +} + + +.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; +} + + + +.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); +} + + + +.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; +} + + + +.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); +} + + + +.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); +} + + + +.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; +} + + + +.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; +} + + + +.x-html-editor-wrap { + border-color:#d0d0d0; +} + + +.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 Modified: mickael/trunk/ext/v3.0.0-a1/resources/css/combo.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/css/combo.css 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/resources/css/combo.css 2008-12-01 20:55:57 UTC (rev 32) @@ -51,6 +51,7 @@ background:#ddecfe; zoom:1; overflow:hidden; + font:normal 12px tahoma, arial, helvetica, sans-serif; } .x-combo-list-inner { overflow:auto; @@ -70,7 +71,6 @@ 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; @@ -90,6 +90,6 @@ border-bottom:0 none; } -.x-combo-list-small .x-combo-list-item { +.x-combo-list-small { font:normal 11px tahoma, arial, helvetica, sans-serif; } \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/resources/css/core.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/css/core.css 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/resources/css/core.css 2008-12-01 20:55:57 UTC (rev 32) @@ -71,7 +71,7 @@ */ .ext-el-mask { - z-index: 20000; + z-index: 100; position: absolute; top:0; left:0; Modified: mickael/trunk/ext/v3.0.0-a1/resources/css/ext-all.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/css/ext-all.css 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/resources/css/ext-all.css 2008-12-01 20:55:57 UTC (rev 32) @@ -26,7 +26,7 @@ .ext-el-mask { - z-index: 20000; + z-index: 100; position: absolute; top:0; left:0; @@ -777,70 +777,24 @@ -.x-form-check-group, .x-form-radio-group { - margin-bottom: 0; -} -.x-form-check-group .x-form-invalid .x-panel-body, -.x-form-radio-group .x-form-invalid .x-panel-body { - background-color: transparent; -} -.x-form-check-wrap, .x-form-radio-wrap { - padding: 3px 0 0 0; + + +.x-form-check-wrap { line-height:18px; } -.x-form-check-group .x-form-check-wrap, -.x-form-radio-group .x-form-radio-wrap { - height: 18px; -} -.ext-ie .x-form-check-group .x-form-check-wrap, -.ext-ie .x-form-radio-group .x-form-radio-wrap { - height: 21px; -} -.ext-ie .x-form-check-wrap input, -.ext-ie .x-form-radio-wrap input { +.ext-ie .x-form-check-wrap input { width:15px; height:15px; } -.x-form-check, .x-form-radio { - height: 13px; - width: 13px; - vertical-align: bottom; -} -.x-form-radio { - margin-bottom: 3px; +.x-editor .x-form-check-wrap { + padding:3px; } -.x-form-check, .ext-ie .x-form-radio { - margin-bottom: 2px; +.x-editor .x-form-checkbox { + height:13px; } -.x-form-check-wrap-inner, .x-form-radio-wrap-inner { - display: inline; - padding: 3px 0 0 0; -} -.x-form-check { - background: url('../images/default/form/checkbox.gif') no-repeat 0 0; -} -.x-form-radio { - background: url('../images/default/form/radio.gif') no-repeat 0 0; -} -.x-form-check-focus .x-form-check, .x-form-check-over .x-form-check, -.x-form-check-focus .x-form-radio, .x-form-check-over .x-form-radio { - background-position: -13px 0; -} -.x-form-check-down .x-form-check, -.x-form-check-down .x-form-radio { - background-position:-26px 0; -} -.x-form-check-checked .x-form-check-focus .x-form-check, -.x-form-check-checked .x-form-check-over .x-form-check { - background-position:-13px -13px; -} -.x-form-check-checked .x-form-check-down .x-form-check { - background-position:-26px -13px; -} -.x-form-check-checked .x-form-check, -.x-form-check-checked .x-form-radio { - background-position:0 -13px; -} + + + .x-form-check-group-label { border-bottom: 1px solid #99BBE8; color: #15428B; @@ -881,7 +835,7 @@ background-image: url(../images/default/form/search-trigger.gif); cursor:pointer; } -.ext-safari .x-form-field-wrap .x-form-trigger{ +.ext-safari .x-form-field-wrap .x-form-trigger,.ext-gecko .x-form-field-wrap .x-form-trigger{ right:0; } @@ -3529,16 +3483,19 @@ overflow:hidden; display:block; } + + .x-menu a.x-menu-item { display:block; line-height:16px; - padding:3px 21px 3px 3px; + padding:3px 21px 3px 27px; white-space: nowrap; text-decoration:none; color:#222; -moz-outline: 0 none; outline: 0 none; cursor:pointer; + position: relative; } .x-menu-item-active { background: #dbecf4; @@ -3561,9 +3518,14 @@ padding: 0; vertical-align: top; width: 16px; - margin: 0 8px 0 0; - background-position:center; + position: absolute; + left: 3px; + top: 3px; + margin: 0; + background-position:center; } + + .ext-ie .x-menu-item-icon { vertical-align: middle; } @@ -3770,6 +3732,7 @@ background:#ddecfe; zoom:1; overflow:hidden; + font:normal 12px tahoma, arial, helvetica, sans-serif; } .x-combo-list-inner { overflow:auto; @@ -3789,7 +3752,6 @@ 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; @@ -3809,7 +3771,7 @@ border-bottom:0 none; } -.x-combo-list-small .x-combo-list-item { +.x-combo-list-small { font:normal 11px tahoma, arial, helvetica, sans-serif; } Modified: mickael/trunk/ext/v3.0.0-a1/resources/css/form.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/css/form.css 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/resources/css/form.css 2008-12-01 20:55:57 UTC (rev 32) @@ -102,7 +102,7 @@ /* --- TODO --- */ -/* checkboxes / radios */ +/* checkboxes / radios .x-form-check-group, .x-form-radio-group { margin-bottom: 0; } @@ -167,6 +167,25 @@ .x-form-check-checked .x-form-radio { background-position:0 -13px; } +*/ +/* 2.0.2 style */ + +.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-check-group-label { border-bottom: 1px solid #99BBE8; color: #15428B; @@ -207,7 +226,7 @@ background-image: url(../images/default/form/search-trigger.gif); cursor:pointer; } -.ext-safari .x-form-field-wrap .x-form-trigger{ +.ext-safari .x-form-field-wrap .x-form-trigger,.ext-gecko .x-form-field-wrap .x-form-trigger{ right:0; } Modified: mickael/trunk/ext/v3.0.0-a1/resources/css/menu.css =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/css/menu.css 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/resources/css/menu.css 2008-12-01 20:55:57 UTC (rev 32) @@ -130,16 +130,19 @@ overflow:hidden; display:block; } + + .x-menu a.x-menu-item { display:block; line-height:16px; - padding:3px 21px 3px 3px; + padding:3px 21px 3px 27px; white-space: nowrap; text-decoration:none; color:#222; -moz-outline: 0 none; outline: 0 none; cursor:pointer; + position: relative; } .x-menu-item-active { background: #dbecf4; @@ -162,9 +165,14 @@ padding: 0; vertical-align: top; width: 16px; - margin: 0 8px 0 0; - background-position:center; + position: absolute; + left: 3px; + top: 3px; + margin: 0; + background-position:center; } + + .ext-ie .x-menu-item-icon { vertical-align: middle; } Added: mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/btn.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/btn.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/group-lr.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/group-lr.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Added: mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/group-tb.gif =================================================================== (Binary files differ) Property changes on: mickael/trunk/ext/v3.0.0-a1/resources/images/gray/button/group-tb.gif ___________________________________________________________________ Name: svn:mime-type + application/octet-stream Modified: mickael/trunk/ext/v3.0.0-a1/resources/resources.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/resources/resources.jsb 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/resources/resources.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -723,4 +723,7 @@ <file name="images\gray\button\group-cs.gif" path="images\gray\button" /> <file name="images\default\form\checkbox.gif" path="images\default\form" /> <file name="images\default\form\radio.gif" path="images\default\form" /> + <file name="images\gray\button\btn.gif" path="images\gray\button" /> + <file name="images\gray\button\group-lr.gif" path="images\gray\button" /> + <file name="images\gray\button\group-tb.gif" path="images\gray\button" /> </project> \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/adapter/ext-base.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/adapter/ext-base.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/adapter/ext-base.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + (function() { var libFlyweight; @@ -230,6 +238,11 @@ 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, fn]; var index = listeners.length; Modified: mickael/trunk/ext/v3.0.0-a1/source/adapter/jquery-bridge.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/adapter/jquery-bridge.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/adapter/jquery-bridge.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + if(typeof jQuery == "undefined"){ throw "Unable to load Ext, jQuery not found."; } Modified: mickael/trunk/ext/v3.0.0-a1/source/adapter/prototype-bridge.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/adapter/prototype-bridge.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/adapter/prototype-bridge.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + (function(){ var libFlyweight; Modified: mickael/trunk/ext/v3.0.0-a1/source/adapter/yui-bridge.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/adapter/yui-bridge.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/adapter/yui-bridge.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + if(typeof YAHOO == "undefined"){ throw "Unable to load Ext, core YUI utilities (yahoo, dom, event) not found."; } Modified: mickael/trunk/ext/v3.0.0-a1/source/core/CompositeElement.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/CompositeElement.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/CompositeElement.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.CompositeElement * Standard composite class. Creates a Ext.Element for every element in the collection. Modified: mickael/trunk/ext/v3.0.0-a1/source/core/DomHelper.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/DomHelper.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/DomHelper.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.DomHelper * Utility class for working with DOM and/or Templates. It transparently supports using HTML fragments or DOM.<br> Modified: mickael/trunk/ext/v3.0.0-a1/source/core/DomQuery.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/DomQuery.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/DomQuery.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,6 +7,14 @@ */ /* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +/* * This is code is also distributed under MIT license for use * with jQuery and prototype JavaScript libraries. */ Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.alignment.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.alignment.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.alignment.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.Element.addMethods({ /** * Gets the x,y coordinates specified by the anchor position on the element. Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.dd.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.dd.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.dd.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.Element.addMethods({ /** * Initializes a {@link Ext.dd.DD} drag drop object for this element. Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.insertion.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.insertion.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.insertion.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.Element.addMethods({ /** * Appends the passed element(s) to this element @@ -127,7 +135,7 @@ this.dom.parentNode.insertBefore(el, this.dom); } El.uncache(this.id); - Ext.removeNode(this.dom); + this.dom.parentNode.removeChild(this.dom); this.dom = el; this.id = Ext.id(el); El.cache[this.id] = this; Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Element * Represents an Element in the DOM.<br><br> @@ -863,13 +871,13 @@ var w, h, d = this.dom, s = d.style; if(s.width && s.width != 'auto'){ w = parseInt(s.width, 10); - if(this.isBorderBox()){ + if(Ext.isBorderBox){ w -= this.getFrameWidth('lr'); } } if(s.height && s.height != 'auto'){ h = parseInt(s.height, 10); - if(this.isBorderBox()){ + if(Ext.isBorderBox){ h -= this.getFrameWidth('tb'); } } @@ -1608,7 +1616,7 @@ * @return {Number} */ getFrameWidth : function(sides, onlyContentBox){ - return onlyContentBox && this.isBorderBox() ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); + return onlyContentBox && Ext.isBorderBox ? 0 : (this.getPadding(sides) + this.getBorderWidth(sides)); }, /** @@ -1705,7 +1713,7 @@ */ mask : function(msg, msgCls){ if(this.getStyle("position") == "static"){ - this.addClass("x-masked-relative"); + this.setStyle("position", "relative"); } if(this._maskMsg){ this._maskMsg.remove(); @@ -1744,7 +1752,7 @@ this._mask.remove(); delete this._mask; } - this.removeClass(["x-masked", "x-masked-relative"]); + this.removeClass("x-masked"); }, /** Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.keys.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.keys.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.keys.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.Element.addMethods({ /** * Convenience method for constructing a KeyMap Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.legacy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.legacy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.legacy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.Element.addMethods({ /** * Measures the element's content height and updates height to match. Note: this function uses setTimeout so Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Element.scroll.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Element.scroll.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Element.scroll.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.Element.addMethods({ /** * Scrolls this element into view within the passed container. @@ -71,7 +79,7 @@ */ scrollTo : function(side, value, animate){ var prop = side.toLowerCase() == "left" ? "scrollLeft" : "scrollTop"; - if(!animate){ + if(!animate || !A){ this.dom[prop] = value; }else{ var to = prop == "scrollLeft" ? [value, this.dom.scrollTop] : [this.dom.scrollLeft, value]; Modified: mickael/trunk/ext/v3.0.0-a1/source/core/EventManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/EventManager.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/EventManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 @@ -173,14 +181,6 @@ }; }; - var createTargeted = function(h, o){ - return function(){ - if(o.target == Ext.EventObject.setEvent(arguments[0]).target){ - h.apply(this, Array.prototype.slice.call(arguments, 0)); - } - }; - }; - var listen = function(element, ename, opt, fn, scope){ var o = (!opt || typeof opt == "boolean") ? {} : opt; fn = fn || o.fn; scope = scope || o.scope; @@ -219,9 +219,6 @@ fn.call(scope || el, e, t, o); }; - if(o.target){ - h = createTargeted(h, o); - } if(o.delay){ h = createDelayed(h, o); } @@ -266,8 +263,6 @@ * <li>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 <em>not</em> invoked, but the new handler is scheduled in its place.</li> - * <li>target {Element} : Only call the handler if the event was fired on the target Element, <i>not</i> - * if the event was bubbled up from a child node.</li> * </ul><br> * <p>See {@link Ext.Element#addListener} for examples of how to use these options.</p> */ @@ -335,11 +330,6 @@ docReadyEvent.addListener(fn, scope, options); }, - // private - doResizeEvent: function(){ - resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); - }, - /** * 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 @@ -349,7 +339,9 @@ onWindowResize : function(fn, scope, options){ if(!resizeEvent){ resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); + resizeTask = new Ext.util.DelayedTask(function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }); E.on(window, "resize", this.fireWindowResize, this); } resizeEvent.addListener(fn, scope, options); @@ -443,9 +435,10 @@ }(); /** * 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} options (optional) An object containing standard {@link #addListener} options + * @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 */ @@ -459,11 +452,10 @@ var bd = document.body || document.getElementsByTagName('body')[0]; if(!bd){ return false; } var cls = [' ', - Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8')) + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : 'ext-ie7') : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') : Ext.isOpera ? "ext-opera" - : Ext.isSafari ? "ext-safari" - : Ext.isChrome ? "ext-chrome" : ""]; + : Ext.isSafari ? "ext-safari" : ""]; if(Ext.isMac){ cls.push("ext-mac"); Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Ext.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Ext.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Ext.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext = {version: '3.0'}; @@ -45,14 +53,12 @@ var isStrict = document.compatMode == "CSS1Compat", isOpera = ua.indexOf("opera") > -1, - isChrome = ua.indexOf("chrome") > -1, - isSafari = !isChrome && (/webkit|khtml/).test(ua), + isSafari = (/webkit|khtml/).test(ua), isSafari3 = isSafari && ua.indexOf('webkit/5') != -1, isIE = !isOpera && ua.indexOf("msie") > -1, isIE7 = !isOpera && ua.indexOf("msie 7") > -1, - isIE8 = !isOpera && ua.indexOf("msie 8") > -1, - isGecko = !isSafari && !isChrome && ua.indexOf("gecko") > -1, - isGecko3 = isGecko && ua.indexOf("rv:1.9") > -1, + isGecko = !isSafari && ua.indexOf("gecko") > -1, + isGecko3 = !isSafari && ua.indexOf("rv:1.9") > -1, isBorderBox = isIE && !isStrict, isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1), isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1), @@ -61,7 +67,7 @@ isSecure = window.location.href.toLowerCase().indexOf("https") === 0; // remove css image flicker - if(isIE && !isIE7){ + if(isIE && !isIE7){ try{ document.execCommand("BackgroundImageCache", false, true); }catch(e){} @@ -209,7 +215,7 @@ MyGridPanel = Ext.extend(Ext.grid.GridPanel, { constructor: function(config) { // Your preprocessing here - MyGridPanel.superclass.constructor.apply(this, arguments); + MyGridPanel.superclass.constructor.apply(this, arguments); // Your postprocessing here }, @@ -252,9 +258,6 @@ sb.override = function(o){ Ext.override(sb, o); }; - sbp.superclass = sbp.supr = (function(){ - return spp; - }); sbp.override = io; Ext.override(sb, overrides); sb.extend = function(o){Ext.extend(sb, o);}; @@ -262,10 +265,6 @@ }; }(), - extendX : function(supr, fn){ - return Ext.extend(supr, fn(supr.prototype)); - }, - /** * Adds a list of functions to the prototype of an existing class, overwriting any existing methods with the same name. * Usage:<pre><code> @@ -336,12 +335,12 @@ buf.push(k, "=", encodeURIComponent(ov), "&"); }else if(Ext.isArray(ov)){ if (ov.length) { - for(var i = 0, len = ov.length; i < len; i++) { - buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&"); - } - } else { - buf.push(k, "=&"); - } + for(var i = 0, len = ov.length; i < len; i++) { + buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&"); + } + } else { + buf.push(k, "=&"); + } } } buf.pop(); @@ -478,7 +477,7 @@ * @return {Number} Value, if numeric, else defaultValue */ num : function(v, defaultValue){ - if(typeof v != 'number' || isNaN(v)){ + if(typeof v != 'number'){ return defaultValue; } return v; @@ -498,13 +497,13 @@ for(var i = 0, a = arguments, len = a.length; i < len; i++) { var as = a[i]; if(as){ - if(typeof as.destroy == 'function'){ - as.destroy(); - } - else if(as.dom){ - as.removeAllListeners(); - as.remove(); - } + if(typeof as.destroy == 'function'){ + as.destroy(); + } + else if(as.dom){ + as.removeAllListeners(); + as.remove(); + } } } }, @@ -604,36 +603,19 @@ * @param {Object} The object to test * @return {Boolean} */ - isArray : function(v){ - return v && typeof v.length == 'number' && typeof v.splice == 'function'; - }, + isArray : function(v){ + return v && typeof v.length == 'number' && typeof v.splice == 'function'; + }, - /** + /** * Returns true if the passed object is a JavaScript date object, otherwise false. * @param {Object} The object to test * @return {Boolean} */ - isDate : function(v){ - return v && typeof v.getFullYear == 'function'; - }, + isDate : function(v){ + return v && typeof v.getFullYear == 'function'; + }, - /** - * Copies a set of named properties fom the source object to the destination object. - * @param {Object} The destination object. - * @param {Object} The source object. - * @param {Array/String} Either an Array of property names, or a comma-delimited list - * of property names to copy. - * @return {Object} The modified object. - * <p>example:<pre><code> -ImageComponent = Ext.extend(Ext.BoxComponent, { - initComponent: function() { - this.autoEl = { tag: 'img' }; - MyComponent.superclass.initComponent.apply(this, arguments); - this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height'); - } -}); -</code></pre> - */ copyTo: function(dest, source, names){ if(typeof names == 'string'){ names = names.split(/[,;\s]/); @@ -647,25 +629,12 @@ return dest; }, - intercept : function(o, name, fn, scope){ - o[name] = o[name].createInterceptor(fn, scope); - }, - - sequence : function(o, name, fn, scope){ - o[name] = o[name].createSequence(fn, scope); - }, - /** * True if the detected browser is Opera. * @type Boolean */ isOpera : isOpera, /** - * True if the detected browser is Chrome. - * @type Boolean - */ - isChrome : isChrome, - /** * True if the detected browser is Safari. * @type Boolean */ @@ -689,18 +658,13 @@ * True if the detected browser is Internet Explorer 6.x. * @type Boolean */ - isIE6 : isIE && !isIE7 && !isIE8, + isIE6 : isIE && !isIE7, /** * True if the detected browser is Internet Explorer 7.x. * @type Boolean */ isIE7 : isIE7, /** - * True if the detected browser is Internet Explorer 8.x. - * @type Boolean - */ - isIE8 : isIE8, - /** * True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox). * @type Boolean */ @@ -741,11 +705,11 @@ */ isAir : isAir, - /** - * 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 - */ + /** + * 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) || (isMac && isGecko && !isGecko3)) }); @@ -754,7 +718,7 @@ })(); 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", "Ext.chart", "Ext.direct"); + "Ext.form", "Ext.menu", "Ext.state", "Ext.lib", "Ext.layout", "Ext.app", "Ext.ux", "Ext.chart"); /** @@ -1071,9 +1035,9 @@ */ indexOf : function(o){ for (var i = 0, len = this.length; i < len; i++){ - if(this[i] == o) return i; + if(this[i] == o) return i; } - return -1; + return -1; }, /** @@ -1098,5 +1062,5 @@ @member Date getElapsed */ Date.prototype.getElapsed = function(date) { - return Math.abs((date || new Date()).getTime()-this.getTime()); + return Math.abs((date || new Date()).getTime()-this.getTime()); }; Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Fx.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Fx.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Fx.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + //Notifies Element that fx methods are available Ext.enableFx = true; @@ -621,17 +629,14 @@ var el = this.getFxEl(); o = o || {}; el.queueFx(o, function(){ - var to = o.endOpacity || 0; - arguments.callee.anim = this.fxanim({opacity:{to:to}}, + arguments.callee.anim = this.fxanim({opacity:{to:o.endOpacity || 0}}, o, null, .5, "easeOut", function(){ - if(to === 0){ - if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ - this.dom.style.display = "none"; - }else{ - this.dom.style.visibility = "hidden"; - } - this.clearOpacity(); + if(this.visibilityMode == Ext.Element.DISPLAY || o.useDisplay){ + this.dom.style.display = "none"; + }else{ + this.dom.style.visibility = "hidden"; } + this.clearOpacity(); el.afterFx(o); }); }); Modified: mickael/trunk/ext/v3.0.0-a1/source/core/Template.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/Template.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/Template.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Template * Represents an HTML fragment template. Templates can be precompiled for greater performance. Modified: mickael/trunk/ext/v3.0.0-a1/source/core/UpdateManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/core/UpdateManager.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/core/UpdateManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Updater * @extends Ext.util.Observable Modified: mickael/trunk/ext/v3.0.0-a1/source/data/ArrayReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/ArrayReader.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/ArrayReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.ArrayReader * @extends Ext.data.JsonReader @@ -46,22 +54,11 @@ * a cache of Ext.data.Records. */ readRecords : function(o){ - this.arrayData = o; - var s = this.meta; - var sid = s ? (s.idIndex || s.id) : null; + var sid = this.meta ? this.meta.id : null; var recordType = this.recordType, fields = recordType.prototype.fields; var records = []; - - if(!this.getRoot){ - this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;}; - if(s.totalProperty) { - this.getTotal = this.getJsonAccessor(s.totalProperty); - } - } - - var root = this.getRoot(o); - - for(var i = 0; i < root.length; i++){ + 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); @@ -76,19 +73,9 @@ record.json = n; records[records.length] = record; } - - var totalRecords = records.length; - - if(s.totalProperty){ - var v = parseInt(this.getTotal(o), 10); - if(!isNaN(v)){ - totalRecords = v; - } - } - - return { + return { records : records, - totalRecords : totalRecords + totalRecords : records.length }; } }); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/data/Connection.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/Connection.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/Connection.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.Connection * @extends Ext.util.Observable @@ -17,7 +25,7 @@ * <a href="#request-option-success" ext:member="request-option-success" ext:cls="Ext.data.Connection">success callback</a> * in the request options object, * or an {@link #requestcomplete event listener}.</p> - * <p><h3>File Uploads</h3><a href="#request-option-isUpload" ext:member="request-option-isUpload" ext:cls="Ext.data.Connection">File uploads</a> are not performed using normal "Ajax" techniques, that + * <p><a href="#request-option-isUpload" ext:member="request-option-isUpload" ext:cls="Ext.data.Connection">File uploads</a> are not performed using normal "Ajax" techniques, that * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard * manner with the DOM <tt><form></tt> element temporarily modified to have its * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer @@ -27,8 +35,6 @@ * server is using JSON to send the return object, then the * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p> - * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode - * "<" as "&lt;", "&" as "&amp;" etc.</p> * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object * is created containing a <tt>responseText</tt> property in order to conform to the * requirements of event handlers and callbacks.</p> @@ -160,10 +166,8 @@ * Defaults to the browser window.</div></li> * <li><b>form</b> : Element/HTMLElement/String (Optional)<div class="sub-desc">The <tt><form></tt> * Element or the id of the <tt><form></tt> to pull parameters from.</div></li> - * <li><a id="request-option-isUpload"></a><b>isUpload</b> : Boolean (Optional)<div class="sub-desc"><b>Only meaningful when used - * with the <tt>form</tt> option</b>. - * <p>True if the form object is a file upload (will be set automatically if the form was - * configured with <b><tt>enctype</tt></b> "multipart/form-data").</p> + * <li><a id="request-option-isUpload"></a><b>isUpload</b> : Boolean (Optional)<div class="sub-desc">True if the form object is a + * file upload (will usually be automatically detected). * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b> * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the * DOM <tt><form></tt> element temporarily modified to have its Modified: mickael/trunk/ext/v3.0.0-a1/source/data/DataField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/DataField.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/DataField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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. Modified: mickael/trunk/ext/v3.0.0-a1/source/data/DataProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/DataProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/DataProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.DataProxy * @extends Ext.util.Observable Modified: mickael/trunk/ext/v3.0.0-a1/source/data/DataReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/DataReader.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/DataReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.DataReader * Abstract base class for reading structured data from a data source and converting Modified: mickael/trunk/ext/v3.0.0-a1/source/data/DirectProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/DirectProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/DirectProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.data.DirectProxy = function(config){ Ext.apply(this, config); if(typeof this.paramOrder == 'string'){ @@ -19,7 +27,7 @@ paramOrder: undefined, paramsAsHash: true, directFn: undefined, - + load: function(params, reader, cb, scope, arg){ if(this.fireEvent("beforeload", this, params) !== false) { var args = []; @@ -32,7 +40,7 @@ } args.push({ callback: function(result, e){ - if(!e.status){ + if(!e.success){ this.fireEvent("loadexception", this, e, result); cb.call(scope, null, arg, false); return; Modified: mickael/trunk/ext/v3.0.0-a1/source/data/DirectStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/DirectStore.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/DirectStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.data.DirectStore = function(c){ var pcfg = Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn'); Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, { Modified: mickael/trunk/ext/v3.0.0-a1/source/data/GroupingStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/GroupingStore.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/GroupingStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.GroupingStore * @extends Ext.data.Store Modified: mickael/trunk/ext/v3.0.0-a1/source/data/HttpProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/HttpProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/HttpProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.HttpProxy * @extends Ext.data.DataProxy Modified: mickael/trunk/ext/v3.0.0-a1/source/data/JsonReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/JsonReader.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/JsonReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.JsonReader * @extends Ext.data.DataReader Modified: mickael/trunk/ext/v3.0.0-a1/source/data/JsonStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/JsonStore.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/JsonStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.JsonStore * @extends Ext.data.Store @@ -52,6 +60,4 @@ reader: new Ext.data.JsonReader(c, c.fields) })); }; -Ext.extend(Ext.data.JsonStore, Ext.data.Store); - -Ext.reg('jsonstore', Ext.data.JsonStore); \ No newline at end of file +Ext.extend(Ext.data.JsonStore, Ext.data.Store); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/data/MemoryProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/MemoryProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/MemoryProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.MemoryProxy * @extends Ext.data.DataProxy @@ -36,7 +44,7 @@ * 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 + * @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 <ul> Modified: mickael/trunk/ext/v3.0.0-a1/source/data/Record.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/Record.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/Record.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.Record * Instances of this class encapsulate both Record <em>definition</em> information, and Record @@ -62,9 +70,8 @@ * <li><b>dateFormat</b> : String<div class="sub-desc">(Optional) A format string for the {@link Date#parseDate Date.parseDate} function, * or "timestamp" if the value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a * javascript millisecond timestamp.</div></li> - * <li><b>defaultValue</b> : Mixed<div class="sub-desc">(Optional) The default value used <b>when a Record is being created by a - * {@link Ext.data.Reader Reader}</b> when the item referenced by the <b><tt>mapping</tt></b> does not exist in the data object - * (i.e. undefined). (defaults to "")</div></li> + * <li><b>defaultValue</b> : Mixed<div class="sub-desc">(Optional) The default value passed to the Reader when the field does + * not exist in the data object (i.e. undefined). (defaults to "")</div></li> * </ul> * The constructor generated by this method may be used to create new Record instances. The data object must contain properties * named after the field <b>names</b>. Modified: mickael/trunk/ext/v3.0.0-a1/source/data/ScriptTagProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/ScriptTagProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/ScriptTagProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.ScriptTagProxy * @extends Ext.data.DataProxy Modified: mickael/trunk/ext/v3.0.0-a1/source/data/SimpleStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/SimpleStore.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/SimpleStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.SimpleStore * @extends Ext.data.Store @@ -36,5 +44,4 @@ } Ext.data.SimpleStore.superclass.loadData.call(this, data, append); } -}); -Ext.reg('simplestore', Ext.data.SimpleStore); \ No newline at end of file +}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/data/SortTypes.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/SortTypes.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/SortTypes.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,7 +6,15 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.SortTypes * @singleton Modified: mickael/trunk/ext/v3.0.0-a1/source/data/Store.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/Store.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/Store.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.Store * @extends Ext.util.Observable @@ -69,8 +77,8 @@ this.addEvents( /** * @event datachanged - * Fires when the data cache has changed in a bulk manner (e.g., it has been sorted, filtered, etc.) and a - * widget that is using this Store as a Record cache should refresh its view. + * 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', @@ -145,9 +153,7 @@ } this.sortToggle = {}; - if(this.sortField){ - this.setDefaultSort(this.sortField, this.sortDir); - }else if(this.sortInfo){ + if(this.sortInfo){ this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); } @@ -818,6 +824,4 @@ this.baseParams = this.baseParams || {}; this.baseParams[name] = value; } -}); - -Ext.reg('store', Ext.data.Store); \ No newline at end of file +}); \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/data/StoreMgr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/StoreMgr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/StoreMgr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.StoreMgr * @extends Ext.util.MixedCollection @@ -48,7 +56,7 @@ * @return {Ext.data.Store} */ lookup : function(id){ - return typeof id == "object" ? (id.events ? id : Ext.create(id, 'store')) : this.get(id); + return typeof id == "object" ? id : this.get(id); }, // getKey implementation for MixedCollection Modified: mickael/trunk/ext/v3.0.0-a1/source/data/Tree.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/Tree.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/Tree.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.Tree * @extends Ext.util.Observable Modified: mickael/trunk/ext/v3.0.0-a1/source/data/XmlReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/data/XmlReader.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/data/XmlReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.data.XmlReader * @extends Ext.data.DataReader @@ -50,7 +58,7 @@ * 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} idPath The DomQuery path relative from the record element to the element that contains + * @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. @@ -93,7 +101,7 @@ var root = doc.documentElement || doc; var q = Ext.DomQuery; var recordType = this.recordType, fields = recordType.prototype.fields; - var sid = this.meta.idPath || this.meta.id; + var sid = this.meta.id; var totalRecords = 0, success = true; if(this.meta.totalRecords){ totalRecords = q.selectNumber(this.meta.totalRecords, root, 0); Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/DDCore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/DDCore.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/DDCore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * These classes are derivatives of the similarly named classes in the YUI Library. * The original license: @@ -184,14 +192,6 @@ lock: function() { this.locked = true; }, /** - * When set to true, other DD objects in cooperating DDGroups do not receive - * notification events when this DD object is dragged over them. Defaults to false. - * @property moveOnly - * @type boolean - */ - moveOnly: false, - - /** * Unlock this instace * @method unlock */ @@ -1520,7 +1520,7 @@ */ _remove: function(oDD) { for (var g in oDD.groups) { - if (g && this.ids[g] && this.ids[g][oDD.id]) { + if (g && this.ids[g][oDD.id]) { delete this.ids[g][oDD.id]; } } @@ -1661,13 +1661,8 @@ if(Ext.QuickTips){ Ext.QuickTips.disable(); } - if(this.dragCurrent){ - // the original browser mouseup wasn't handled (e.g. outside FF browser window) - // so clean up first to avoid breaking the next drag - this.handleMouseUp(e); - } - this.currentTarget = e.getTarget(); + this.dragCurrent = oDD; var el = oDD.getEl(); @@ -1793,6 +1788,7 @@ if (! this.dragCurrent) { return true; } + // var button = e.which || e.button; // check for IE mouseup outside of page boundary Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/DragSource.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/DragSource.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/DragSource.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.dd.DragSource * @extends Ext.dd.DDProxy Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/DragTracker.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/DragTracker.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/DragTracker.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.dd.DragTracker = function(config){ Ext.apply(this, config); this.addEvents( @@ -43,9 +51,7 @@ 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; - if(this.preventDefault !== false){ - e.preventDefault(); - } + e.preventDefault(); var doc = Ext.getDoc(); doc.on('mouseup', this.onMouseUp, this); doc.on('mousemove', this.onMouseMove, this); Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/DragZone.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/DragZone.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/DragZone.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.dd.DragZone * @extends Ext.dd.DragSource Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/DropTarget.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/DropTarget.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/DropTarget.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.dd.DropTarget * @extends Ext.dd.DDTarget Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/DropZone.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/DropZone.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/DropZone.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.dd.DropZone * @extends Ext.dd.DropTarget Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/Registry.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/Registry.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/Registry.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/ScrollManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/ScrollManager.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/ScrollManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.dd.ScrollManager * <p>Provides automatic scrolling of overflow regions in the page during drag operations.</p> Modified: mickael/trunk/ext/v3.0.0-a1/source/dd/StatusProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/dd/StatusProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/dd/StatusProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/debug.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.debug = {}; (function(){ Added: mickael/trunk/ext/v3.0.0-a1/source/direct/Direct.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/Direct.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/Direct.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,96 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.Direct = Ext.extend(Ext.util.Observable, { + exceptions: { + TRANSPORT: 'xhr', + PARSE: 'parse', + LOGIN: 'login', + SERVER: 'exception' + }, + + constructor: function(){ + this.addEvents('event', 'exception'); + this.transactions = {}; + this.providers = {}; + }, + + addProvider : function(provider){ + var a = arguments; + if(a.length > 1){ + for(var i = 0, len = a.length; i < len; i++){ + this.addProvider(a[i]); + } + return; + } + if(!provider.events){ + provider = new Ext.Direct.PROVIDERS[provider.type](provider); + //provider = new Ext.Direct.PROVIDERS[provider.type](provider); + } + provider.id = provider.id || Ext.id; + this.providers[provider.id] = provider; + + provider.on('data', this.onProviderData, this); + provider.on('exception', this.onProviderException, this); + + if(!provider.isConnected()){ + provider.connect(); + } + + return provider; + }, + + getProvider : function(id){ + return this.providers[id]; + }, + + removeProvider : function(id){ + var provider = id.id ? id : providers[id.id]; + provider.un('data', this.onProviderData, this); + provider.un('exception', this.onProviderException, this); + delete this.providers[provider.id]; + return provider; + }, + + addTransaction: function(t){ + this.transactions[t.tid] = t; + return t; + }, + + removeTransaction: function(t){ + delete this.transactions[t.tid || t]; + return t; + }, + + getTransaction: function(tid){ + return this.transactions[tid.tid || tid]; + }, + + onProviderData : function(provider, e){ + if(Ext.isArray(e)){ + for(var i = 0, len = e.length; i < len; i++){ + this.onProviderData(provider, e[i]); + } + return; + } + if(e.name && e.name != 'event' && e.name != 'exception'){ + this.fireEvent(e.name, e); + }else if(e.type == 'exception'){ + this.fireEvent('exception', e); + } + this.fireEvent('event', e, provider); + }, + + createEvent : function(response, extraProps){ + return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps)); + } +}); +Ext.Direct = new Ext.Direct(); + +Ext.Direct.TID = 1; +Ext.Direct.PROVIDERS = {}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/source/direct/Event.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/Event.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/Event.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,36 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.Direct.Event = function(config){ + Ext.apply(this, config); +} +Ext.Direct.Event.prototype = { + status: true, + getData: function(){ + return this.data; + } +}; + +Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, { + type: 'rpc', + getTransaction: function(){ + return this.transaction || Ext.Direct.getTransaction(this.tid); + } +}); + +Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, { + status: false, + type: 'exception' +}); + +Ext.Direct.eventTypes = { + 'rpc': Ext.Direct.RemotingEvent, + 'event': Ext.Direct.Event, + 'exception': Ext.Direct.ExceptionEvent +}; + Added: mickael/trunk/ext/v3.0.0-a1/source/direct/JsonProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/JsonProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/JsonProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,43 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, { + parseResponse: function(xhr){ + if(!Ext.isEmpty(xhr.responseText)){ + if(typeof xhr.responseText == 'object'){ + return xhr.responseText; + } + return Ext.decode(xhr.responseText); + } + return null; + }, + + getEvents: function(xhr){ + var data = null; + try{ + data = this.parseResponse(xhr); + }catch(e){ + var event = new Ext.Direct.ExceptionEvent({ + data: e, + xhr: xhr, + code: Ext.Direct.exceptions.PARSE, + message: 'Error parsing json response: \n\n ' + data + }) + return [event]; + } + var events = []; + if(Ext.isArray(data)){ + for(var i = 0, len = data.length; i < len; i++){ + events.push(Ext.Direct.createEvent(data[i])); + } + }else{ + events.push(Ext.Direct.createEvent(data)); + } + return events; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/source/direct/PollingProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/PollingProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/PollingProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,75 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, { + priority: 3, + interval: 3000, + + constructor : function(config){ + Ext.direct.PollingProvider.superclass.constructor.call(this, config); + this.addEvents('beforepoll', 'poll'); + }, + + isConnected: function(){ + return !!this.pollTask; + }, + + connect: function(){ + if(this.url && !this.pollTask){ + this.pollTask = Ext.TaskMgr.start({ + run: function(){ + if(this.fireEvent('beforepoll', this) !== false){ + if(typeof this.url == 'function'){ + this.url(this.baseParams); + }else{ + Ext.Ajax.request({ + url: this.url, + callback: this.onData, + scope: this, + params: this.baseParams + }); + } + } + }, + interval: this.interval, + scope: this + }); + this.fireEvent('connect', this); + }else if(!this.url){ + throw 'Error initializing PollingProvider, no url configured.'; + } + }, + + disconnect: function(){ + if(this.pollTask){ + Ext.TaskMgr.stop(this.pollTask); + delete this.pollTask; + this.fireEvent('disconnect', this); + } + }, + + onData: function(opt, success, xhr){ + if(success){ + var events = this.getEvents(xhr); + for(var i = 0, len = events.length; i < len; i++){ + var e = events[i]; + this.fireEvent('data', this, e); + } + }else{ + var e = new Ext.Direct.ExceptionEvent({ + data: e, + code: Ext.Direct.exceptions.TRANSPORT, + message: 'Unable to connect to the server.', + xhr: xhr + }); + this.fireEvent('data', this, e); + } + } +}); + +Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/source/direct/Provider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/Provider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/Provider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,23 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.direct.Provider = Ext.extend(Ext.util.Observable, { + priority: 1, // lower is higher priority, 0 mens "duplex", aka always on + constructor : function(config){ + Ext.apply(this, config); + this.addEvents('connect', 'disconnect', 'data', 'exception'); + Ext.direct.Provider.superclass.constructor.call(this, config); + }, + + isConnected: function(){ + return false; + }, + + connect: Ext.emptyFn, + disconnect: Ext.emptyFn +}); Added: mickael/trunk/ext/v3.0.0-a1/source/direct/RemotingProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/RemotingProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/RemotingProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,244 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, { + priority: 1, + enableBuffer: 10, + maxRetries: 1, + + constructor : function(config){ + Ext.direct.RemotingProvider.superclass.constructor.call(this, config); + this.addEvents('beforecall', 'call'); + this.namespace = this.namespace || window; + this.transactions = {}; + this.callBuffer = []; + }, + + initAPI : function(){ + var o = this.actions; + for(var c in o){ + var cls = this.namespace[c] || (this.namespace[c] = {}); + var ms = o[c]; + for(var i = 0, len = ms.length; i < len; i++){ + var m = ms[i]; + cls[m.name] = this.createMethod(c, m); + } + } + }, + + isConnected: function(){ + return !!this.connected; + }, + + connect: function(){ + if(this.url){ + this.initAPI(); + this.connected = true; + this.fireEvent('connect', this); + }else if(!this.url){ + throw 'Error initializing RemotingProvider, no url configured.'; + } + }, + + disconnect: function(){ + if(this.connected){ + this.connected = false; + this.fireEvent('disconnect', this); + } + }, + + onData: function(opt, success, xhr){ + if(success){ + var events = this.getEvents(xhr); + for(var i = 0, len = events.length; i < len; i++){ + var e = events[i]; + var t = e.getTransaction(); + this.fireEvent('data', this, e); + if(t){ + this.doCallback(t, e, true); + Ext.Direct.removeTransaction(t); + } + } + }else{ + var ts = [].concat(opt.ts); + for(var i = 0, len = ts.length; i < len; i++){ + var t = this.getTransaction(opt.ts[i]); + if(t && t.retryCount < this.maxRetries){ + t.retry(); + }else{ + var e = new Ext.Direct.ExceptionEvent({ + data: e, + transaction: t, + code: Ext.Direct.exceptions.TRANSPORT, + message: 'Unable to connect to the server.', + xhr: xhr + }); + this.fireEvent('data', this, e); + if(t){ + this.doCallback(t, e, false); + Ext.Direct.removeTransaction(t); + } + } + } + } + }, + + getCallData: function(t){ + return { + action: t.action, + method: t.method, + data: t.data, + type: 'rpc', + tid: t.tid + }; + }, + + doSend : function(data){ + var o = { + url: this.url, + callback: this.onData, + scope: this + }; + + // send only needed data + var callData; + if(Ext.isArray(data)){ + callData = []; + for(var i = 0, len = data.length; i < len; i++){ + callData.push(this.getCallData(data[i])); + } + }else{ + callData = this.getCallData(data); + } + + if(this.enableUrlEncode){ + var params = {}; + params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData); + o.params = params; + }else{ + o.jsonData = callData; + } + Ext.Ajax.request(o); + }, + + combineAndSend : function(){ + var len = this.callBuffer.length; + if(len > 0){ + this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer); + this.callBuffer = []; + } + }, + + queueTransaction: function(t){ + this.callBuffer.push(t); + if(this.enableBuffer){ + if(!this.callTask){ + this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this); + } + this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10); + }else{ + this.combineAndSend(); + } + }, + + doCall : function(c, m, args){ + var data = null, hs = args[m.len], scope = args[m.len+1]; + + if(m.len !== 0){ + data = args.slice(0, m.len); + } + + var t = new Ext.Direct.Transaction({ + provider: this, + args: args, + action: c, + method: m.name, + data: data, + cb: scope && typeof hs == 'function' ? hs.createDelegate(scope) : hs + }); + + if(this.fireEvent('beforecall', this, t) !== false){ + Ext.Direct.addTransaction(t); + this.queueTransaction(t); + this.fireEvent('call', this, t); + } + }, + + doForm : function(c, m, form, callback, scope){ + var t = new Ext.Direct.Transaction({ + provider: this, + action: c, + method: m.name, + args:[form, callback, scope], + cb: scope && typeof callback == 'function' ? callback.createDelegate(scope) : callback + }); + + if(this.fireEvent('beforecall', this, t) !== false){ + Ext.Direct.addTransaction(t); + + form = Ext.getDom(form); + var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data'; + + var params = { + extTID: t.tid, + extAction: c, + extMethod: m.name, + extUpload: String(isUpload) + }; + if(callback && typeof callback == 'object'){ + Ext.apply(params, callback.params); + } + Ext.Ajax.request({ + url: this.url, + params: params, + callback: this.onData, + scope: this, + form: form, + isUpload: isUpload, + ts: t + }); + } + }, + + createMethod : function(c, m){ + var f; + if(!m.formHandler){ + f = function(){ + this.doCall(c, m, Array.prototype.slice.call(arguments, 0)); + }.createDelegate(this); + }else{ + f = function(form, callback, scope){ + this.doForm(c, m, form, callback, scope); + }.createDelegate(this); + } + f.directCfg = { + action: c, + method: m + }; + return f; + }, + + getTransaction: function(opt){ + return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null; + }, + + doCallback: function(t, e){ + var fn = e.status ? 'success' : 'failure'; + if(t && t.cb){ + var hs = t.cb; + var result = e.result || e.data; + if(typeof hs == 'function'){ + hs(result, e); + } else{ + Ext.callback(hs[fn], hs.scope, [result, e]); + Ext.callback(hs.callback, hs.scope, [result, e]); + } + } + } +}); +Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/source/direct/Transaction.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/direct/Transaction.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/direct/Transaction.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,27 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +Ext.Direct.Transaction = function(config){ + Ext.apply(this, config); + this.tid = ++Ext.Direct.TID; + this.retryCount = 0; +} +Ext.Direct.Transaction.prototype = { + send: function(){ + this.provider.queueTransaction(this); + }, + + retry: function(){ + this.retryCount++; + this.send(); + }, + + getProvider: function(){ + return this.provider; + } +}; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/ext.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/ext.jsb 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/ext.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -1,5 +1,5 @@ <?xml version="1.0" encoding="utf-8"?> -<project path="" name="Ext - JS Lib" author="Ext JS, LLC" version="3.0 Pre-alpha" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="C:\apps\www\deploy\ext-3.0-dev\" source="True" source-dir="$output\source" minify="True" min-dir="$output\build" doc="False" doc-dir="$output\docs" min-dair="$output\build"> +<project path="" name="Ext - JS Lib" author="Ext JS, LLC" version="3.0 Pre-alpha" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="C:\apps\www\deploy\ext-3.0-dev\" source="True" source-dir="$output\source" minify="True" min-dir="$output\build" doc="True" doc-dir="$output\ExtJSdocs" min-dair="$output\build"> <directory name="" /> <target name="Core" file="$output\ext-core.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> <include name="core\DomHelper.js" /> @@ -29,12 +29,12 @@ <include name="core\Fx.js" /> <include name="core\CompositeElement.js" /> <include name="data\Connection.js" /> + <include name="data\Direct.js" /> <include name="core\UpdateManager.js" /> <include name="util\Date.js" /> <include name="util\DelayedTask.js" /> <include name="util\TaskMgr.js" /> <include name="util\MixedCollection.js" /> - <include name="widgets\ComponentMgr.js" /> <include name="util\JSON.js" /> <include name="util\Format.js" /> <include name="util\XTemplate.js" /> @@ -58,27 +58,20 @@ <include name="data\Store.js" /> <include name="data\SimpleStore.js" /> <include name="data\JsonStore.js" /> - <include name="data\XmlStore.js" /> + <include name="data\DirectStore.js" /> <include name="data\DataField.js" /> <include name="data\DataReader.js" /> <include name="data\DataProxy.js" /> <include name="data\MemoryProxy.js" /> <include name="data\HttpProxy.js" /> <include name="data\ScriptTagProxy.js" /> + <include name="data\DirectProxy.js" /> <include name="data\JsonReader.js" /> <include name="data\XmlReader.js" /> <include name="data\ArrayReader.js" /> - <include name="direct\Direct.js" /> - <include name="direct\Transaction.js" /> - <include name="direct\Event.js" /> - <include name="direct\Provider.js" /> - <include name="direct\JsonProvider.js" /> - <include name="direct\PollingProvider.js" /> - <include name="direct\RemotingProvider.js" /> - <include name="data\DirectProxy.js" /> - <include name="data\DirectStore.js" /> <include name="data\Tree.js" /> <include name="data\GroupingStore.js" /> + <include name="widgets\ComponentMgr.js" /> <include name="widgets\Component.js" /> <include name="widgets\Action.js" /> <include name="widgets\Layer.js" /> @@ -97,7 +90,6 @@ <include name="widgets\layout\TableLayout.js" /> <include name="widgets\layout\AbsoluteLayout.js" /> <include name="widgets\Viewport.js" /> - <include name="widgets\layout\BoxLayout.js" /> <include name="widgets\Panel.js" /> <include name="widgets\Window.js" /> <include name="widgets\WindowManager.js" /> @@ -154,7 +146,6 @@ <include name="widgets\form\TextArea.js" /> <include name="widgets\form\NumberField.js" /> <include name="widgets\form\DateField.js" /> - <include name="widgets\form\DisplayField.js" /> <include name="widgets\form\Combo.js" /> <include name="widgets\form\Checkbox.js" /> <include name="widgets\form\CheckboxGroup.js" /> @@ -556,11 +547,9 @@ <file name="legacy\MasterTemplate.js" path="legacy" /> <file name="legacy\View.js" path="legacy" /> <file name="widgets\chart\FlashPanel.js" path="widgets\chart" /> - <file name="widgets\ListView.js" path="widgets" /> <file name="ext.jsb" path="" /> <file name="license.txt" path="" /> - <file name="data\Direct.js" path="data" /> - <file name="data\DirectProvider.js" path="data" /> + <file name="widgets\ListView.js" path="widgets" /> <file name="adapter\ext-base.js" path="adapter" /> <file name="adapter\jquery-bridge.js" path="adapter" /> <file name="adapter\prototype-bridge.js" path="adapter" /> @@ -585,6 +574,7 @@ <file name="data\DataField.js" path="data" /> <file name="data\DataProxy.js" path="data" /> <file name="data\DataReader.js" path="data" /> + <file name="data\Direct.js" path="data" /> <file name="data\DirectProxy.js" path="data" /> <file name="data\DirectStore.js" path="data" /> <file name="data\GroupingStore.js" path="data" /> @@ -600,7 +590,6 @@ <file name="data\StoreMgr.js" path="data" /> <file name="data\Tree.js" path="data" /> <file name="data\XmlReader.js" path="data" /> - <file name="data\XmlStore.js" path="data" /> <file name="dd\DDCore.js" path="dd" /> <file name="dd\DragSource.js" path="dd" /> <file name="dd\DragTracker.js" path="dd" /> @@ -610,13 +599,6 @@ <file name="dd\Registry.js" path="dd" /> <file name="dd\ScrollManager.js" path="dd" /> <file name="dd\StatusProxy.js" path="dd" /> - <file name="direct\Direct.js" path="direct" /> - <file name="direct\Event.js" path="direct" /> - <file name="direct\JsonProvider.js" path="direct" /> - <file name="direct\PollingProvider.js" path="direct" /> - <file name="direct\Provider.js" path="direct" /> - <file name="direct\RemotingProvider.js" path="direct" /> - <file name="direct\Transaction.js" path="direct" /> <file name="locale\ext-lang-af.js" path="locale" /> <file name="locale\ext-lang-bg.js" path="locale" /> <file name="locale\ext-lang-ca.js" path="locale" /> @@ -625,10 +607,9 @@ <file name="locale\ext-lang-de.js" path="locale" /> <file name="locale\ext-lang-el_GR.js" path="locale" /> <file name="locale\ext-lang-en.js" path="locale" /> - <file name="locale\ext-lang-en_GB.js" path="locale" /> + <file name="locale\ext-lang-en_UK.js" path="locale" /> <file name="locale\ext-lang-es.js" path="locale" /> <file name="locale\ext-lang-fa.js" path="locale" /> - <file name="locale\ext-lang-fi.js" path="locale" /> <file name="locale\ext-lang-fr.js" path="locale" /> <file name="locale\ext-lang-fr_CA.js" path="locale" /> <file name="locale\ext-lang-gr.js" path="locale" /> @@ -689,7 +670,6 @@ <file name="widgets\form\CheckboxGroup.js" path="widgets\form" /> <file name="widgets\form\Combo.js" path="widgets\form" /> <file name="widgets\form\DateField.js" path="widgets\form" /> - <file name="widgets\form\DisplayField.js" path="widgets\form" /> <file name="widgets\form\Field.js" path="widgets\form" /> <file name="widgets\form\FieldSet.js" path="widgets\form" /> <file name="widgets\form\Form.js" path="widgets\form" /> @@ -724,7 +704,6 @@ <file name="widgets\layout\AccordionLayout.js" path="widgets\layout" /> <file name="widgets\layout\AnchorLayout.js" path="widgets\layout" /> <file name="widgets\layout\BorderLayout.js" path="widgets\layout" /> - <file name="widgets\layout\BoxLayout.js" path="widgets\layout" /> <file name="widgets\layout\CardLayout.js" path="widgets\layout" /> <file name="widgets\layout\ColumnLayout.js" path="widgets\layout" /> <file name="widgets\layout\ContainerLayout.js" path="widgets\layout" /> Modified: mickael/trunk/ext/v3.0.0-a1/source/license.txt =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/license.txt 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/license.txt 2008-12-01 20:55:57 UTC (rev 32) @@ -7,31 +7,27 @@ Open Source License ------------------------------------------------------------------------------------------ -Ext is licensed under the terms of the Open Source GPL 3.0 license. +Ext is licensed under the terms of the Open Source GPL 3.0 license. You may wish to use +our open source license if you: + * Want to use Ext in an open source project that is compatible with the GPL + * Plan to use Ext in a personal, educational or non-profit manner http://www.gnu.org/licenses/gpl.html -There are several FLOSS exceptions available for use with this release for -open source applications that are distributed under a license other than the GPL. -* Open Source License Exception for Applications - - http://extjs.com/products/floss-exception.php - -* Open Source License Exception for Development - - http://extjs.com/products/ux-exception.php - - Commercial License ------------------------------------------------------------------------------------------ -This is the appropriate option if you are creating proprietary applications and you are -not prepared to distribute and share the source code of your application under the -GPL v3 license. Please visit http://extjs.com/license for more details. +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. -- @@ -39,4 +35,4 @@ 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 -General Public License for more details. \ No newline at end of file +Lesser General Public License for more details. \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-af.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-af.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-af.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * List compiled by mystix on the extjs.com forums. * Thank you Mystix! Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-bg.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-bg.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-bg.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Bulgarian Translation * Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ca.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ca.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ca.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Catalonian Translation by halkon_polako 6-12-2007 * December correction halkon_polako 11-12-2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-cs.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-cs.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-cs.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Czech Translations * Translated by Tomáš Korčák (72) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-da.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-da.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-da.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Danish translation * By JohnF Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-de.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-de.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-de.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * German translation * By schmidetzki and humpdi Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-el_GR.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-el_GR.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-el_GR.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Ext JS Library 2.1 * Copyright(c) 2006-2008, Ext JS, LLC. Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-en.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-en.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-en.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-es.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-es.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-es.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Spanish/Latin American Translation by genius551v 04-08-2007 * Revised by efege, 2007-04-15. Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fa.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fa.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fa.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Farsi (Persian) translation * By Mohaqa Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,23 +6,38 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * France (France) translation * By Thylia * 09-11-2007, 02:22 PM - * updated to 2.2 by disizben (22 Sep 2008) */ Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">En cours de chargement...</div>'; -if(Ext.DataView){ - Ext.DataView.prototype.emptyText = ""; +if(Ext.View){ + Ext.View.prototype.emptyText = ""; } if(Ext.grid.GridPanel){ - Ext.grid.GridPanel.prototype.ddText = "{0} ligne{1} sélectionnée{1}"; + Ext.grid.GridPanel.prototype.ddText = "{0} ligne(s) sélectionnée(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..."; } @@ -94,14 +109,6 @@ return Date.dayNames[day].substring(0, 3); }; -Date.parseCodes.S.s = "(?:er)"; - -Ext.override(Date, { - getSuffix : function() { - return (this.getDate() == 1) ? "er" : ""; - } -}); - if(Ext.MessageBox){ Ext.MessageBox.buttonText = { ok : "OK", @@ -153,10 +160,6 @@ }); } -if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "La valeur de ce champ est invalide"; -} - if(Ext.form.TextField){ Ext.apply(Ext.form.TextField.prototype, { minLengthText : "La longueur minimum de ce champ est de {0} caractères", @@ -169,8 +172,6 @@ if(Ext.form.NumberField){ Ext.apply(Ext.form.NumberField.prototype, { - decimalSeparator : ",", - decimalPrecision : 2, 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" @@ -283,10 +284,38 @@ }); } +if(Ext.form.TimeField){ + Ext.apply(Ext.form.TimeField.prototype, { + minText : "L'heure de ce champ ne peut être antérieure au {0}", + maxText : "L'heure de ce champ ne peut être postérieure au {0}", + invalidText : "{0} n'est pas une heure valide", + format : "H:i", + altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H" + }); +} + +if(Ext.form.CheckboxGroup){ + Ext.apply(Ext.form.TextField.prototype, { + blankText : "Vous devez sélectionner au moins un item du groupe" + }); +} + +if(Ext.form.RadioGroup){ + Ext.apply(Ext.form.RadioGroup.prototype, { + blankText : "Vous devez sélectionner un choix" + }); +} + +if(Ext.form.BasicForm){ + Ext.form.BasicForm.prototype.waitTitle = "Veuillez patienter..."; +} + 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" }); } @@ -313,25 +342,3 @@ collapsibleSplitTip : "Cliquer et glisser pour redimensionner le panneau. Double-cliquer pour le cacher." }); } - -if(Ext.form.TimeField){ - Ext.apply(Ext.form.TimeField.prototype, { - minText : "L'heure de ce champ ne peut être antérieure à {0}", - maxText : "L'heure de ce champ ne peut être postérieure à {0}", - invalidText : "{0} n'est pas une heure valide", - format : "H:i", - altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|h a|g a|g A|gi|hi|Hi|gia|hia|g|H" - }); -} - -if(Ext.form.CheckboxGroup){ - Ext.apply(Ext.form.CheckboxGroup.prototype, { - blankText : "Vous devez sélectionner au moins un élément dans ce groupe" - }); -} - -if(Ext.form.RadioGroup){ - Ext.apply(Ext.form.RadioGroup.prototype, { - blankText : "Vous devez sélectionner au moins un élément dans ce groupe" - }); -} Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr_CA.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr_CA.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-fr_CA.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * France (Canadian) translation * By BernardChhun Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-gr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-gr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-gr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Greek (Old Version) Translations by Vagelis * 03-June-2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-he.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-he.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-he.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Hebrew Translations * By spartacus (from forums) 06-12-2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -7,6 +7,14 @@ */ /* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +/* * Ext JS Library 2.1 * Copyright(c) 2006-2008, Ext JS, LLC. * licensing@xxxxxxxxx Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hu.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hu.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-hu.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Ext JS Library 2.1 * Copyright(c) 2006-2008, Ext JS, LLC. Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-id.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-id.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-id.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Pedoman translasi: * http://id.wikisource.org/wiki/Panduan_Pembakuan_Istilah,_Pelaksanaan_Instruksi_Presiden_Nomor_2_Tahun_2001_Tentang_Penggunaan_Komputer_Dengan_Aplikasi_Komputer_Berbahasa_Indonesia Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-it.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-it.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-it.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Italian translation * By eric_void Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ja.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ja.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ja.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Japanese translation * By tyama Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ko.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ko.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ko.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Korean Translations By nicetip * 05 September 2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lt.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lt.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lt.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Lithuanian Translations (UTF-8) * By Vladas Saulis, October 18, 2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lv.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lv.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-lv.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Latvian Translations * By salix 17 April 2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-mk.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-mk.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-mk.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Macedonia translation * By PetarD petar.dimitrijevic@xxxxxxxxxxxxxxxx (utf8 encoding) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-nl.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-nl.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-nl.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NB.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NB.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NB.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * * Norwegian translation (Bokmål: no-NB) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NN.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NN.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-no_NN.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * * Norwegian translation (Nynorsk: no-NN) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pl.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pl.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pl.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Polish Translations * By vbert 17-April-2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Portuguese/Brazil Translation by Weber Souza * 08 April 2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt_BR.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt_BR.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-pt_BR.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Ext JS Library 2.1 * Copyright(c) 2006-2008, Ext JS, LLC. Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ro.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ro.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ro.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Romanian translations for ExtJS 2.1 * First released by Lucian Lature on 2007-04-24 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ru.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ru.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ru.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Russian translation * By ZooKeeper (utf-8 encoding) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sk.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sk.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sk.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sl.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sl.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sl.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Slovenian translation by Matjaž (UTF-8 encoding) * 25 April 2007 Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Serbian Latin Translation * by Atila Hajnal (latin, utf8 encoding) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr_RS.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr_RS.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sr_RS.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Serbian Cyrillic Translation * by Čolovic Vladan (cyrillic, utf8 encoding) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sv_SE.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sv_SE.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-sv_SE.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * Swedish translation (utf8-encoding) * By Erik Andersson, Monator Technologies Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-th.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-th.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-th.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * List compiled by KillerNay on the extjs.com forums. * Thank you KillerNay! Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-tr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-tr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-tr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,16 +6,21 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! * * Turkish translation by Alper YAZGAN - * 2008-01-24, 10:29 AM - * - * Updated to 2.2 by YargicX - * 2008-10-05, 06:22 PM - */ + * 2008-01-24 , 10:29 AM +*/ Ext.UpdateManager.defaults.indicatorText = '<div class="loading-indicator">Yükleniyor ...</div>'; @@ -23,8 +28,8 @@ Ext.View.prototype.emptyText = ""; } -if(Ext.grid.Grid){ - Ext.grid.Grid.prototype.ddText = "Seçili satýr sayýsý : {0}"; +if(Ext.grid.GridPanel){ + Ext.grid.GridPanel.prototype.ddText = "Şeçili satır sayısı : {0}"; } if(Ext.TabPanelItem){ @@ -32,7 +37,7 @@ } if(Ext.form.Field){ - Ext.form.Field.prototype.invalidText = "Bu alandaki deðer geçersiz"; + Ext.form.Field.prototype.invalidText = "Bu alandaki değer geçersiz"; } if(Ext.LoadMask){ @@ -41,17 +46,17 @@ Date.monthNames = [ "Ocak", - "Þžubat", + "Şubat", "Mart", "Nisan", - "Mayýs", + "Mayıs", "Haziran", "Temmuz", - "Aðustos", + "Ağustos", "Eylül", "Ekim", - "Kasým", - "Aralýk" + "Kasım", + "Aralık" ]; Date.getShortMonthName = function(month) { @@ -80,9 +85,9 @@ Date.dayNames = [ "Pazar", "Pazartesi", - "Salý", - "LJarþŸamba", - "PerþŸembe", + "Salı", + "Çarşamba", + "Perşembe", "Cuma", "Cumartesi" ]; @@ -91,8 +96,8 @@ "Paz", "Pzt", "Sal", - "ÇrþŸ", - "Prþ", + "Çrş", + "Prş", "Cum", "Cmt" ]; @@ -104,9 +109,9 @@ if(Ext.MessageBox){ Ext.MessageBox.buttonText = { ok : "Tamam", - cancel : "İptal", + cancel : "İptal", yes : "Evet", - no : "Hayýr" + no : "Hayır" }; } @@ -128,12 +133,12 @@ monthNames : Date.monthNames, dayNames : Date.dayNames, nextText : 'Gelecek Ay (Control+Right)', - prevText : 'Önceki Ay (Control+Left)', - monthYearText : 'Bir ay sŸeçiniz (Yýlý artýrmak/azaltmak için Control+Up/Down)', - todayTip : "{0} (BoþŸluk TuþŸu - Spacebar)", + prevText : 'Önceki Ay (Control+Left)', + monthYearText : 'Bir ay şeçiniz (Yılı artırmak/azaltmak için Control+Up/Down)', + todayTip : "{0} (Boşluk Tuşu - Spacebar)", format : "d/m/Y", okText : " Tamam ", - cancelText : "İptal", + cancelText : "İptal", startDay : 1 }); } @@ -142,8 +147,8 @@ Ext.apply(Ext.PagingToolbar.prototype, { beforePageText : "Sayfa", afterPageText : " / {0}", - firstText : "İlk Sayfa", - prevText : "Önceki Sayfa", + firstText : "İlk Sayfa", + prevText : "Önceki Sayfa", nextText : "Sonraki Sayfa", lastText : "Son Sayfa", refreshText : "Yenile", @@ -154,9 +159,9 @@ if(Ext.form.TextField){ Ext.apply(Ext.form.TextField.prototype, { - minLengthText : "Girilen verinin uzunluðu en az {0} olabilir", - maxLengthText : "Girilen verinin uzunluðu en fazla {0} olabilir", - blankText : "Bu alan boþŸ býrakýlamaz", + minLengthText : "Girilen verinin uzunluğu en az {0} olabilir", + maxLengthText : "Girilen verinin uzunluğu en fazla {0} olabilir", + blankText : "Bu alan boş bırakılamaz", regexText : "", emptyText : null }); @@ -166,7 +171,7 @@ Ext.apply(Ext.form.NumberField.prototype, { minText : "En az {0} girilebilir", maxText : "En çok {0} girilebilir", - nanText : "{0} geçersiz bir sayýdýr" + nanText : "{0} geçersiz bir sayıdır" }); } @@ -174,9 +179,9 @@ Ext.apply(Ext.form.DateField.prototype, { disabledDaysText : "Disabled", disabledDatesText : "Disabled", - minText : "Bu tarih, {0} tarihinden daha sonra olmalýdýr", - maxText : "Bu tarih, {0} tarihinden daha önce olmalýdýr", - invalidText : "{0} geçersiz bir tarihdir - tarih formatý {1} þŸeklinde olmalýdýr", + minText : "Bu tarih, {0} tarihinden daha sonra olmalıdır", + maxText : "Bu tarih, {0} tarihinden daha önce olmalıdır", + invalidText : "{0} geçersiz bir tarihdir - tarih formatı {1} şeklinde olmalıdır", format : "d/m/Y", altFormats : "d.m.y|d.m.Y|d/m/y|d-m-Y|d-m-y|d.m|d/m|d-m|dm|dmY|dmy|d|Y.m.d|Y-m-d|Y/m/d" }); @@ -190,79 +195,81 @@ } if(Ext.form.VTypes){ - Ext.form.VTypes["emailText"]='Bu alan "user@xxxxxxxxxx" þŸeklinde elektronik posta formatýnda olmalýdýr'; - Ext.form.VTypes["urlText"]='Bu alan "http://www.domain.com" þŸeklinde URL adres formatýnda olmalýdýr'; - Ext.form.VTypes["alphaText"]='Bu alan sadece harf ve _ içermeli'; - Ext.form.VTypes["alphanumText"]='Bu alan sadece harf, sayý ve _ içermeli'; + Ext.apply(Ext.form.VTypes, { + emailText : 'Bu alan "user@xxxxxxxxxx" şeklinde elektronik posta formatında olmalıdır', + urlText : 'Bu alan "http://www.domain.com" şeklinde URL adres formatında olmalıdır', + 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 bu baðlantý için gerekli URL adresini giriniz:', + createLinkText : 'Lütfen bu bağlantı için gerekli URL adresini giriniz:', buttonTips : { bold : { - title: 'Kalýn(Bold) (Ctrl+B)', - text: 'Þžeçili yazýyý kalýn yapar.', + title: 'Kalın(Bold) (Ctrl+B)', + text: 'Şeçili yazıyı kalın yapar.', cls: 'x-html-editor-tip' }, italic : { - title: 'İtalik(Italic) (Ctrl+I)', - text: 'Þžeçili yazýyý italik yapar.', + title: 'İtalik(Italic) (Ctrl+I)', + text: 'Şeçili yazıyı italik yapar.', cls: 'x-html-editor-tip' }, underline : { - title: 'Alt Çizgi(Underline) (Ctrl+U)', - text: 'Þžeçili yazýnýn altýný çizer.', + title: 'Alt Çizgi(Underline) (Ctrl+U)', + text: 'Şeçili yazının altını çizer.', cls: 'x-html-editor-tip' }, increasefontsize : { title: 'Fontu büyült', - text: 'Yazý fontunu büyütür.', + text: 'Yazı fontunu büyütür.', cls: 'x-html-editor-tip' }, decreasefontsize : { title: 'Fontu küçült', - text: 'Yazý fontunu küçültür.', + text: 'Yazı fontunu küçültür.', cls: 'x-html-editor-tip' }, backcolor : { title: 'Arka Plan Rengi', - text: 'Seçili yazýnýn arka plan rengini deðiþŸtir.', + text: 'Seçili yazının arka plan rengini değiştir.', cls: 'x-html-editor-tip' }, forecolor : { - title: 'Yazý Rengi', - text: 'Seçili yazýnýn rengini deðiþŸtir.', + title: 'Yazı Rengi', + text: 'Seçili yazının rengini değiştir.', cls: 'x-html-editor-tip' }, justifyleft : { title: 'Sola Daya', - text: 'Yazýyý sola daya.', + text: 'Yazıyı sola daya.', cls: 'x-html-editor-tip' }, justifycenter : { title: 'Ortala', - text: 'Yazýyý editörde ortala.', + text: 'Yazıyı editörde ortala.', cls: 'x-html-editor-tip' }, justifyright : { - title: 'Saða daya', - text: 'Yazýyý saða daya.', + title: 'Sağa daya', + text: 'Yazıyı sağa daya.', cls: 'x-html-editor-tip' }, insertunorderedlist : { - title: 'Noktalý Liste', - text: 'Noktalý listeye baþŸla.', + title: 'Noktalı Liste', + text: 'Noktalı listeye başla.', cls: 'x-html-editor-tip' }, insertorderedlist : { - title: 'Numaralý Liste', - text: 'Numaralý lisyeye baþŸla.', + title: 'Numaralı Liste', + text: 'Numaralı lisyeye başla.', cls: 'x-html-editor-tip' }, createlink : { title: 'Web Adresi(Hyperlink)', - text: 'Seçili yazýyý web adresi(hyperlink) yap.', + text: 'Seçili yazıyı web adresi(hyperlink) yap.', cls: 'x-html-editor-tip' }, sourceedit : { @@ -276,10 +283,10 @@ if(Ext.grid.GridView){ Ext.apply(Ext.grid.GridView.prototype, { - sortAscText : "Artan sýrada sýrala", - sortDescText : "Azalan sýrada sýrala", + sortAscText : "Artan sırada sırala", + sortDescText : "Azalan sırada sırala", lockText : "Kolonu kilitle", - unlockText : "Kolon kilidini kaldýr", + unlockText : "Kolon kilidini kaldır", columnsText : "Kolonlar" }); } @@ -295,14 +302,14 @@ if(Ext.grid.PropertyColumnModel){ Ext.apply(Ext.grid.PropertyColumnModel.prototype, { nameText : "Ad", - valueText : "Deðer", + valueText : "Değer", dateFormat : "d/m/Y" }); } -if(Ext.layout.BorderLayout.SplitRegion){ +if(Ext.layout.BorderLayout && Ext.layout.BorderLayout.SplitRegion){ Ext.apply(Ext.layout.BorderLayout.SplitRegion.prototype, { - splitTip : "Yeniden boyutlandýrmak için sürükle.", - collapsibleSplitTip : "Yeniden boyutlandýrmak için sürükle. Saklamak için çift týkla." + splitTip : "Yeniden boyutlandırmak için sürükle.", + collapsibleSplitTip : "Yeniden boyutlandırmak için sürükle. Saklamak için çift tıkla." }); } Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ukr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ukr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-ukr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Ukrainian translation * By zlatko (utf-8 encoding) Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-vn.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-vn.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-vn.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * List compiled by mystix on the extjs.com forums. * Thank you Mystix! Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_CN.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_CN.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_CN.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Simplified Chinese translation * By DavidHu Modified: mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_TW.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_TW.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/locale/ext-lang-zh_TW.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /* * Traditional Chinese translation * By hata1234 Modified: mickael/trunk/ext/v3.0.0-a1/source/state/CookieProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/state/CookieProvider.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/state/CookieProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,7 +6,15 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.state.CookieProvider * @extends Ext.state.Provider Modified: mickael/trunk/ext/v3.0.0-a1/source/state/Provider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/state/Provider.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/state/Provider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.state.Provider * Abstract base class for state provider implementations. This class provides methods Modified: mickael/trunk/ext/v3.0.0-a1/source/state/StateManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/state/StateManager.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/state/StateManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/util/CSS.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/CSS.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/CSS.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.util.CSS * Utility class for manipulating CSS rules Modified: mickael/trunk/ext/v3.0.0-a1/source/util/ClickRepeater.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/ClickRepeater.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/ClickRepeater.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** @class Ext.util.ClickRepeater @extends Ext.util.Observable @@ -91,12 +99,6 @@ timer : 0, // private - destroy : function() { - Ext.destroy(this.el); - this.purgeListeners(); - }, - - // private handleMouseDown : function(){ clearTimeout(this.timer); this.el.blur(); Modified: mickael/trunk/ext/v3.0.0-a1/source/util/Cookies.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/Cookies.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/Cookies.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.util.Cookies = { set : function(name, value){ var argv = arguments; Modified: mickael/trunk/ext/v3.0.0-a1/source/util/Date.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/Date.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/Date.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Date * @@ -44,18 +52,18 @@ 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 Decimal fraction of a second Examples: - (minimum 1 digit, arbitrary number of digits allowed) 001 (i.e. 0.001s) or - 100 (i.e. 0.100s) or - 999 (i.e. 0.999s) or - 999876543210 (i.e. 0.999876543210s) + u Milliseconds, with leading zeroes (arbitrary number of digits allowed) Examples: + 001 (i.e. 1ms) or + 100 (i.e. 100ms) or + 999 (i.e. 999ms) or + 999876543210 (i.e. 999.876543210ms) 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 (note: the decimal fraction of a second, if specified, Examples: - must contain at least 1 digit. There is no limit on the maximum number 2007-04-17T15:19:21+08:00 or - of digits allowed. see http://www.w3.org/TR/NOTE-datetime for more info) 2008-03-16T16:18:22Z or + c ISO 8601 date (note: milliseconds, if present, must be specified with Examples: + at least 1 digit. There is no limit to how many digits the millisecond 2007-04-17T15:19:21+08:00 or + value may contain. see http://www.w3.org/TR/NOTE-datetime for more info) 2008-03-16T16:18:22Z or 2009-02-15T17:17:23.9+01:00 or 2010-01-14T18:16:24,999876543-07:00 U Seconds since the Unix Epoch (January 1 1970 00:00:00 GMT) 1193432466 or -2138434463 @@ -108,18 +116,6 @@ */ (function() { - -// create private copy of Ext's String.format() method -// - to remove unnecessary dependency -// - to resolve namespace conflict with M$-Ajax's implementation -function xf(format) { - var args = Array.prototype.slice.call(arguments, 1); - return format.replace(/\{(\d+)\}/g, function(m, i) { - return args[i]; - }); -} - - // private Date.formatCodeToRegex = function(character, currentGroup) { // Note: currentGroup - position in regex result array (see notes for Date.parseCodes below) @@ -131,7 +127,7 @@ } return p? Ext.applyIf({ - c: p.c? xf(p.c, currentGroup || "{0}") : p.c + c: p.c? String.format(p.c, currentGroup || "{0}") : p.c }, p) : { g:0, c:null, @@ -434,13 +430,11 @@ // private createNewFormat : function(format) { - var funcName = "format" + Date.formatFunctions.count++, - code = "Date.prototype." + funcName + " = function(){return ", - special = false, - ch = ''; - + 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 == "\\") { @@ -458,77 +452,69 @@ }, // private - createParser : function() { - var code = [ - "Date.{0} = function(input){", - "var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;", - "input = String(input);", - "d = new Date();", - "y = d.getFullYear();", - "m = d.getMonth();", - "d = d.getDate();", - "var results = input.match(Date.parseRegexes[{1}]);", - "if(results && results.length > 0){", - "{2}", - "if(u){", - "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){", - "v = new Date(y, m, d, h, i, s, ms);", - "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0 && s >= 0){", - "v = new Date(y, m, d, h, i, s);", - "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0 && i >= 0){", - "v = new Date(y, m, d, h, i);", - "}else if (y >= 0 && m >= 0 && d > 0 && h >= 0){", - "v = new Date(y, m, d, h);", - "}else if (y >= 0 && m >= 0 && d > 0){", - "v = new Date(y, m, d);", - "}else if (y >= 0 && m >= 0){", - "v = new Date(y, m);", - "}else if (y >= 0){", - "v = new Date(y);", - "}", - "}", - "return (v && (z != null || o != null))?" // favour UTC offset over GMT offset - + " (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" // reset to UTC, then add offset - + " v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;", // reset to GMT, then add offset - "}" - ].join('\n'); + createParser : function(format) { + var funcName = "parse" + Date.parseFunctions.count++; + var regexNum = Date.parseRegexes.length; + var currentGroup = 1; + Date.parseFunctions[format] = funcName; - return function(format) { - var funcName = "parse" + Date.parseFunctions.count++, - regexNum = Date.parseRegexes.length, - currentGroup = 1, - calc = "", - regex = "", - special = false, - ch = ""; + var code = "Date." + funcName + " = function(input){\n" + + "var y, m, d, h = 0, i = 0, s = 0, ms = 0, o, z, u, v;\n" + + "input = String(input);\n" + + "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 = ""; - Date.parseFunctions[format] = funcName; - - for (var i = 0; i < format.length; ++i) { - ch = format.charAt(i); - if (!special && ch == "\\") { - special = true; + 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; } - else if (special) { - special = false; - regex += String.escape(ch); - } - else { - var obj = $f(ch, currentGroup); - currentGroup += obj.g; - regex += obj.s; - if (obj.g && obj.c) { - calc += obj.c; - } - } } - - Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); - eval(xf(code, funcName, regexNum, calc)); } - }(), + code += "if (u){\n" + + "v = new Date(u * 1000);\n" // 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" + + "}\n}\nreturn (v && (z || o))?" // favour UTC offset over GMT offset + + " (Ext.type(z) == 'number' ? v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - z) :" // reset to UTC, then add offset + + " v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn))) : v;\n" // reset to GMT, then add offset + + "}"; + + Date.parseRegexes[regexNum] = new RegExp("^" + regex + "$", "i"); + eval(code); + }, + // private parseCodes : { /* @@ -580,7 +566,7 @@ z: { g:0, c:null, - s:"(?:\\d{1,3})" // day of the year (0 - 364 (365 in leap years)) + s:"(?:\\d{1,3}" // day of the year (0 - 364 (365 in leap years)) }, W: { g:0, @@ -677,7 +663,7 @@ u: { g:1, c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n", - s:"(\\d+)" // decimal fraction of a second (minimum = 1 digit, maximum = unlimited) + s:"(\\d+)" // milliseconds with leading zeroes (arbitrary number of digits allowed) e.g. 001, 100, 999, 999876543210 }, O: { g:1, @@ -713,24 +699,17 @@ s:"([+\-]?\\d{1,5})" // leading '+' sign is optional for UTC offset }, c: function() { - var calc = [], - arr = [ - $f("Y", 1), // year - $f("m", 2), // month - $f("d", 3), // day - $f("h", 4), // hour - $f("i", 5), // minute - $f("s", 6), // second - {c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // decimal fraction of a second (minimum = 1 digit, maximum = unlimited) - {c:[ // allow both "Z" (i.e. UTC) and "+08:00" (i.e. UTC offset) time zone delimiters - "if(results[9] == 'Z'){", - "z = 0;", - "}else{", - $f("P", 9).c, - "}" - ].join('\n')} - ]; - + var calc = []; + var arr = [ + $f("Y", 1), // year + $f("m", 2), // month + $f("d", 3), // day + $f("h", 4), // hour + $f("i", 5), // minute + $f("s", 6), // second + {c:"ms = (results[7] || '.0').substring(1); ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"}, // millisecond decimal fraction (with leading zeroes + arbitrary no. of digits) + {c:"if(results[9] == 'Z'){\no = 0;\n}else{\n" + $f("P", 9).c + "\n}"} // allow both "Z" (i.e. UTC) and "+08:00" (i.e. GMT) time zone delimiters + ]; for (var i = 0, l = arr.length; i < l; ++i) { calc.push(arr[i].c); } @@ -739,8 +718,8 @@ 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 - + "((\.|,)\\d+)?" // decimal fraction of a second (e.g. ",998465" or ".998465") - + "(Z|([+\-]\\d{2}:\\d{2}))" // "Z" (UTC) or "+08:00" (UTC offset) + + "((\.|,)\\d+)?" // ",998465" or ".998465" millisecond decimal fraction + + "(" + $f("P", null).s + "|Z)" // "Z" (UTC) or "GMT+08:00" (GMT offset) } }, U: { @@ -797,7 +776,7 @@ */ getGMTOffset : function(colon) { return (this.getTimezoneOffset() > 0 ? "-" : "+") - + String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset()) / 60), 2, "0") + + String.leftPad(Math.abs(Math.floor(this.getTimezoneOffset() / 60)), 2, "0") + (colon ? ":" : "") + String.leftPad(Math.abs(this.getTimezoneOffset() % 60), 2, "0"); }, @@ -822,18 +801,14 @@ */ getWeekOfYear : function() { // adapted from http://www.merlyn.demon.co.uk/weekcalc.htm - var ms1d = 864e5, // milliseconds in a day - ms7d = 7 * ms1d; // milliseconds in a week + 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; + }, - return function() { // return a closure so constants get calculated only once - var DC3 = Date.UTC(this.getFullYear(), this.getMonth(), this.getDate() + 3) / ms1d, // an Absolute Day Number - AWN = Math.floor(DC3 / 7), // an Absolute Week Number - 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. Modified: mickael/trunk/ext/v3.0.0-a1/source/util/DelayedTask.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/DelayedTask.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/DelayedTask.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.util.DelayedTask * Provides a convenient method of performing setTimeout where a new Modified: mickael/trunk/ext/v3.0.0-a1/source/util/Format.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/Format.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/Format.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.util.Format * Reusable data formatting functions @@ -231,19 +239,19 @@ } }(), - /** - * Formats the number according to the format string. + * Formats the number according to the format string; adheres to the american number standard + * where a comma is inserted after every 3 digits. note: there should be only 1 contiguous number + * in the format, where a number consists of digits, period, and commas + * any other characters can be wrapped around this number, including ?$?, ?%?, or text * <div style="margin-left:40px">examples (123456.789): * <div style="margin-left:10px"> - * 0 - (123456) show only digits, no precision<br> - * 0.00 - (123456.78) show only digits, 2 precision<br> - * 0.0000 - (123456.7890) show only digits, 4 precision<br> - * 0,000 - (123,456) show comma and digits, no precision<br> - * 0,000.00 - (123,456.78) show comma and digits, 2 precision<br> - * 0,0.00 - (123,456.78) shortcut method, show comma and digits, 2 precision<br> - * To reverse the grouping (,) and decimal (.) for international numbers, add /i to the end. - * For example: 0.000,00/i + * ?0? - (123456) show only digits, no precision<br> + * ?0.00? - (123456.78) show only digits, 2 precision<br> + * ?0.0000? - (123456.7890) show only digits, 4 precision<br> + * ?0,000? - (123,456) show comma and digits, no precision<br> + * ?0,000.00? - (123,456.78) show comma and digits, 2 precision<br> + * ?0,0.00? - (123,456.78) shortcut method, show comma and digits, 2 precision<br> * </div</div> * * @method format @@ -260,52 +268,52 @@ if(typeof v != 'number' || isNaN(v)){ return ''; } - var comma = ','; - var dec = '.'; - var i18n = false; - - if(format.substr(format.length - 2) == '/i'){ - format = format.substr(0, format.length-2); - i18n = true; - comma = '.'; - dec = ','; - } + var hasComma = -1 < format.indexOf(','), + psplit = format.replace(/[^\d\.]/g,'').split('.'); - var hasComma = format.indexOf(comma) != -1, - psplit = (i18n ? format.replace(/[^\d\,]/g,'') : format.replace(/[^\d\.]/g,'')).split(dec); - + // compute precision if (1 < psplit.length) { + // fix number precision v = v.toFixed(psplit[1].length); } + // error: too many periods else if (2 < psplit.length) { throw('NumberFormatException: invalid format, formats should have no more than 1 period: ' + format); } + // remove precision else { v = v.toFixed(0); } + // get the string now that precision is correct var fnum = v.toString(); + // format has comma, then compute commas if (hasComma) { + // remove precision for computation psplit = fnum.split('.'); var cnum = psplit[0], parr = [], j = cnum.length, m = Math.floor(j / 3), - n = cnum.length % 3 || 3; + n = cnum.length % 3 || 3; // n cannot be ZERO or causes infinite loop + // break the number into chunks of 3 digits; first chunk may be less than 3 for (var i = 0; i < j; i += n) { if (i != 0) {n = 3;} parr[parr.length] = cnum.substr(i, n); m -= 1; } - fnum = parr.join(comma); - if (psplit[1]) { - fnum += dec + psplit[1]; - } + + // put chunks back together, separated by comma + fnum = parr.join(','); + + // add the precision back in + if (psplit[1]) {fnum += '.' + psplit[1];} } + // replace the number portion of the format with fnum return format.replace(/[\d,?\.?]+/, fnum); }, Modified: mickael/trunk/ext/v3.0.0-a1/source/util/History.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/History.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/History.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.History * @extends Ext.util.Observable @@ -87,7 +95,7 @@ } function startUp() { - currentToken = hiddenField.value ? hiddenField.value : getHash(); + currentToken = hiddenField.value; if (Ext.isIE) { checkIFrame(); Modified: mickael/trunk/ext/v3.0.0-a1/source/util/JSON.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/JSON.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/JSON.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.util.JSON * Modified version of Douglas Crockford"s json.js that doesn"t Modified: mickael/trunk/ext/v3.0.0-a1/source/util/KeyMap.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/KeyMap.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/KeyMap.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.KeyMap * Handles mapping keys to actions for an element. One key map can be used for multiple actions. Modified: mickael/trunk/ext/v3.0.0-a1/source/util/KeyNav.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/KeyNav.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/KeyNav.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.KeyNav * <p>Provides a convenient wrapper for normalized keyboard navigation. KeyNav allows you to bind Modified: mickael/trunk/ext/v3.0.0-a1/source/util/MixedCollection.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/MixedCollection.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/MixedCollection.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.util.MixedCollection * @extends Ext.util.Observable @@ -300,7 +308,7 @@ /** * 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. Returns -1 if not found. + * @return {Number} index of the item. */ indexOf : function(o){ return this.items.indexOf(o); @@ -554,7 +562,7 @@ }, /** - * Creates a shallow copy of this collection + * Creates a duplicate of this collection * @return {MixedCollection} */ clone : function(){ Modified: mickael/trunk/ext/v3.0.0-a1/source/util/Observable.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/Observable.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/Observable.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.util.Observable * Abstract base class that provides a common interface for publishing events. Subclasses are expected to @@ -32,44 +40,23 @@ this.on(this.listeners); delete this.listeners; } - if(!this.events){ - this.events = {}; - } }; Ext.util.Observable.prototype = { /** * Fires the specified event with the passed parameters (minus the event name). - * @param {String} eventName The name of the event to fire. If the event is to bubble - * up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget}) then - * the first argument must be passed as <tt>true</tt>, and the event name is passed - * as the second argument. + * @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(){ - var a = Array.prototype.slice.call(arguments, 0); - var ename = a[0]; - if(ename === true){ - a.shift(); - var c = this; - while(c){ - if(c.fireEvent.apply(c, a) === false){ - return false; - } - c = c.getBubbleTarget ? c.getBubbleTarget() : null; - } - return true; - } if(this.eventsSuspended === true){ - var q = this.suspendedEventsQueue; - if (q) { - q[q.length] = a; + if (this.suspendedEventsQueue) { + this.suspendedEventsQueue.push(arguments); } } else { - var ce = this.events[ename.toLowerCase()]; + var ce = this.events[arguments[0].toLowerCase()]; if(typeof ce == "object"){ - a.shift(); - return ce.fire.apply(ce, a); + return ce.fire.apply(ce, Array.prototype.slice.call(arguments, 1)); } } return true; @@ -92,8 +79,6 @@ * <li><b>buffer</b> : Number<p class="sub-desc">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 <em>not</em> invoked, but the new handler is scheduled in its place.</p></li> - * <li>target {Observable} : Only call the handler if the event was fired on the target Observable, <i>not</i> - * if the event was bubbled up from a child Observable.</li> * </ul><br> * <p> * <b>Combining Options</b><br> @@ -423,14 +408,6 @@ }; }; - var createTargeted = function(h, o, scope){ - return function(){ - if(o.target == arguments[0]){ - h.apply(scope, Array.prototype.slice.call(arguments, 0)); - } - }; - }; - Ext.util.Event = function(obj, name){ this.name = name; this.obj = obj; @@ -456,9 +433,6 @@ scope = scope || this.obj; var l = {fn: fn, scope: scope, options: o}; var h = fn; - if(o.target){ - h = createTargeted(h, o, scope); - } if(o.delay){ h = createDelayed(h, o, scope); } Modified: mickael/trunk/ext/v3.0.0-a1/source/util/TaskMgr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/TaskMgr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/TaskMgr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 @@ -86,8 +94,6 @@ }; /** - * @member Ext.util.TaskRunner - * @method start * Starts a new task. * @param {Object} 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 @@ -116,8 +122,6 @@ }; /** - * @member Ext.util.TaskRunner - * @method stop * Stops an existing running task. * @param {Object} task The task to stop * @return {Object} The task @@ -128,8 +132,6 @@ }; /** - * @member Ext.util.TaskRunner - * @method stopAll * Stops all tasks that are currently running. */ this.stopAll = function(){ Modified: mickael/trunk/ext/v3.0.0-a1/source/util/TextMetrics.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/TextMetrics.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/TextMetrics.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/util/XTemplate.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/util/XTemplate.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/util/XTemplate.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.XTemplate * @extends Ext.Template Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Action.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Action.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Action.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Action * <p>An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it @@ -54,7 +62,6 @@ */ Ext.Action = function(config){ this.initialConfig = config; - this.itemId = config.itemId = (config.itemId || config.id || Ext.id()); this.items = []; } Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/BoxComponent.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/BoxComponent.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/BoxComponent.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,31 +6,21 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.BoxComponent * @extends Ext.Component - * <p>Base class for any visual {@link Ext.Component} that uses a box container. BoxComponent provides automatic box + * 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.</p> - * <p>A BoxComponent may be created as a custom Component which encapsulates any HTML element, either a pre-existing - * element, or one that is created to your specifications at render time. Usually, to participate in layouts, - * a Component will need to be a <b>Box</b>Component in order to have its width and height managed.</p> - * <p>To use a pre-existing element as a BoxComponent, configure it so that you preset the <b>el</b> property to the - * element to reference:<pre><code> -var pageHeader = new Ext.BoxComponent({ - el: 'my-header-div' -});</code></pre> - * This may then be {@link Ext.Container#add added} to a {@link Ext.Container Container} as a child item.</p> - * <p>To create a BoxComponent based around a HTML element to be created at render time, use the - * {@link Ext.Component#autoEl autoEl} config option which takes the form of a - * {@link Ext.DomHelper DomHelper} specification:<pre><code> -var myImage = new Ext.BoxComponent({ - autoEl: { - tag: 'img', - src: '/images/my-image.jpg' - } -});</code></pre></p> + * layout containers. * @constructor * @param {Ext.Element/String/Object} config The configuration options. */ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Button.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Button.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Button.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Button @@ -252,9 +260,6 @@ initButtonEl : function(btn, btnEl){ this.el = btn; - if(this.id){ - this.el.dom.id = this.el.id = this.id; - } if(this.icon){ btnEl.setStyle('background-image', 'url(' +this.icon +')'); } @@ -283,6 +288,10 @@ 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 : {} @@ -318,12 +327,9 @@ // private beforeDestroy: function(){ if(this.rendered){ - var btnEl = this.el.child(this.buttonSelector); - if(btnEl){ - if(this.tooltip){ - Ext.QuickTips.unregister(btnEl); - } - btnEl.removeAllListeners(); + var btn = this.el.child(this.buttonSelector); + if(btn){ + btn.removeAllListeners(); } } if(this.menu){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/ColorPalette.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/ColorPalette.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/ColorPalette.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.ColorPalette * @extends Ext.Component @@ -95,7 +103,6 @@ '<tpl for="."><a href="#" class="color-{.}" hidefocus="on"><em><span style="background:#{.}" unselectable="on"> </span></em></a></tpl>' ); var el = document.createElement("div"); - el.id = this.getId(); el.className = this.itemCls; t.overwrite(el, this.colors); container.dom.insertBefore(el, position); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Component.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Component.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Component.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Component * @extends Ext.util.Observable @@ -235,82 +243,38 @@ /** * @cfg {String} fieldLabel The label text to display next to this Component (defaults to '') * <p><b>This config is only used when this Component is rendered by a Container which has been - * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager.</b></p> - * Example use:<pre><code> -new Ext.FormPanel({ - height: 100, - renderTo: Ext.getBody(), - items: [{ - xtype: 'textfield', - fieldLabel: 'Name' - }] -}); -</code></pre> + * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager</b></p> */ /** * @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 '').<code></code>. + * container's labelStyle value if set, or ''). For example, <code>labelStyle: 'font-weight:bold;'</code>. * <p><b>This config is only used when this Component is rendered by a Container which has been - * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager.</b></p> - * Example use:<pre><code> -new Ext.FormPanel({ - height: 100, - renderTo: Ext.getBody(), - items: [{ - xtype: 'textfield', - fieldLabel: 'Name', - labelStyle: 'font-weight:bold;' - }] -}); -</code></pre> + * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager</b></p> */ /** * @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 ''. * <p><b>This config is only used when this Component is rendered by a Container which has been - * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager.</b></p> - * Example use:<pre><code> -new Ext.FormPanel({ - height: 100, - renderTo: Ext.getBody(), - items: [{ - xtype: 'textfield', - fieldLabel: 'Name', - labelSeparator: '...' - }] -}); -</code></pre> + * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager</b></p> */ /** - * @cfg {Boolean} hideLabel True to completely hide the label element (defaults to false). By default, even if - * you do not specify a {@link fieldLabel} the space will still be reserved so that the field will line up with - * other fields that do have labels. Setting this to true will cause the field to not reserve that space. + * @cfg {Boolean} hideLabel True to completely hide the label element (defaults to false) * <p><b>This config is only used when this Component is rendered by a Container which has been - * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager.</b></p> - * Example use:<pre><code> -new Ext.FormPanel({ - height: 100, - renderTo: Ext.getBody(), - items: [{ - xtype: 'textfield' - hideLabel: true - }] -}); -</code></pre> + * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager</b></p> */ /** - * @cfg {String} clearCls The CSS class used to provide field clearing (defaults to 'x-form-clear-left'). + * @cfg {String} clearCls The CSS class used to provide field clearing (defaults to 'x-form-clear-left') * <p><b>This config is only used when this Component is rendered by a Container which has been - * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager.</b></p> + * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager</b></p> */ /** - * @cfg {String} itemCls An additional CSS class to apply to the wrapper's form item element of this field (defaults - * to the container's itemCls value if set, or ''). Since it is applied to the item wrapper, it allows you to write - * standard CSS rules that can apply to the field, the label (if specified) or any other element within the markup for + * @cfg {String} itemCls An additional CSS class to apply to the wrapper's form item element of this field (defaults + * to the container's itemCls value if set, or ''). Since it is applied to the item wrapper, it allows you to write + * standard CSS rules that can apply to the field, the label (if specified) or any other element within the markup for * the field. * <p><b>This config is only used when this Component is rendered by a Container which has been - * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager.</b></p> + * configured to use the {@link Ext.form.FormLayout FormLayout} layout manager</b></p> * Example use:<pre><code> // Apply a style to the field's label: <style> @@ -319,7 +283,7 @@ new Ext.FormPanel({ height: 100, - renderTo: Ext.getBody(), + renderTo: document.body, items: [{ xtype: 'textfield', fieldLabel: 'Name', @@ -334,12 +298,7 @@ /** * @cfg {String} id - * The unique id of this component (defaults to an auto-assigned id). You should assign an id if you need to - * be able to access the component later and you do not have an object reference available (e.g., using - * {@link Ext.ComponentMgr#getCmp}). Note that this id will also be used as the element id for the containing - * HTML element that is rendered to the page for this component. This allows you to write id-based CSS rules to - * style the specific instance of this component uniquely, and also to select sub-elements using this - * component's id as the parent. + * The unique id of this component (defaults to an auto-assigned id). */ /** * @cfg {String/Object} autoEl @@ -406,7 +365,7 @@ * @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. Not all components support applyTo. Use of - * applyTo assumes all markup and elements are in the spots where they should be and the component can be rendered immediately (turns off deferred rendering). It should be used SPARINGLY. + * applyTo assumes all markup and elements are in the spots where they should be and the component can be rendered immediately (turns off deferred rendering). It should be used SPARINGLY. * For standard rendering using existing markup, use the "el" config. 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 @@ -421,14 +380,12 @@ /** * @cfg {Boolean} stateful * <p>A flag which causes the Component to attempt to restore the state of internal properties - * from a saved state on startup. The component must have either a {@link #stateId} or {@link #id} - * assigned for state to be managed. Auto-generated ids are not guaranteed to be stable across page - * loads and cannot be relied upon to save and restore the same state for a component.<p> + * from a saved state on startup.</p> * <p>For state saving to work, the state manager's provider must have been set to an implementation * of {@link Ext.state.Provider} which overrides the {@link Ext.state.Provider#set set} * and {@link Ext.state.Provider#get get} methods to save and recall name/value pairs. * A built-in implementation, {@link Ext.state.CookieProvider} is available.</p> - * <p>To set the state provider for the current page:</p> + * <p>To set the state provider for the current page:</p> * <pre><code> Ext.state.Manager.setProvider(new Ext.state.CookieProvider()); </code></pre> @@ -449,8 +406,7 @@ */ /** * @cfg {String} stateId - * The unique id for this component to use for state management purposes (defaults to the component id if one was - * set, otherwise null if the component is using a generated id). + * The unique id for this component to use for state management purposes (defaults to the component id). * <p>See {@link #stateful} for an explanation of saving and restoring Component state.</p> */ /* //internal - to be set by subclasses @@ -571,7 +527,7 @@ initComponent : Ext.emptyFn, /** - * <p>Render this Component into the passed HTML element.</p> + * <p>Render this Components into the passed HTML element.</p> * <p><b>If you are using a {@link Ext.Container Container} object to house this Component, then * do not use the render method.</b></p> * <p>A Container's child Components are rendered by that Container's @@ -589,7 +545,7 @@ * configure the Container with a layout manager which creates and manages the type of layout you * have in mind.</p> * <p><b>Omitting the Container's {@link Ext.Container#layout layout} config means that a basic - * layout manager is used which does nothing but render child components sequentially into the + * layout manager is used which does nothnig but render child components sequentially into the * Container. No sizing or positioning will be performed in this situation.</b></p> * @param {Element/HTMLElement/String} container (optional) The element this Component should be * rendered into. If it is being created from existing markup, this should be omitted. @@ -639,48 +595,24 @@ if(this.stateful !== false){ this.initStateEvents(); } - this.initRef(); } return this; }, - initRef : function(){ - if(this.ref){ - var levels = this.ref.split('/'); - var last = levels.length, i = 0; - var t = this; - while(i < last){ - if(t.ownerCt){ - t = t.ownerCt; - } - i++; - } - t[levels[--i]] = this; - } - }, - // private initState : function(config){ if(Ext.state.Manager){ - var id = this.getStateId(); - if(id){ - var state = Ext.state.Manager.get(id); - if(state){ - if(this.fireEvent('beforestaterestore', this, state) !== false){ - this.applyState(state); - this.fireEvent('staterestore', this, state); - } + 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 - getStateId : function(){ - return this.stateId || ((this.id.indexOf('ext-comp-') == 0 || this.id.indexOf('ext-gen') == 0) ? null : this.id); - }, - - // private initStateEvents : function(){ if(this.stateEvents){ for(var i = 0, e; e = this.stateEvents[i]; i++){ @@ -704,20 +636,17 @@ // private saveState : function(){ if(Ext.state.Manager){ - var id = this.getStateId(); - if(id){ - var state = this.getState(); - if(this.fireEvent('beforestatesave', this, state) !== false){ - Ext.state.Manager.set(id, state); - this.fireEvent('statesave', this, state); - } + 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 + * @param {String/HTMLElement} el */ applyToMarkup : function(el){ this.allowDomMove = false; @@ -771,7 +700,7 @@ } if(this.overCls) { this.el.addClassOnOver(this.overCls); - } + } } }, @@ -1069,7 +998,7 @@ * true, the container will be returned. The passed function is called with the arguments (container, this component). * @param {Function} fcn * @param {Object} scope (optional) - * @return {Ext.Container} The first Container for which the custom function returns true + * @return {Array} Array of Ext.Components */ findParentBy: function(fn) { for (var p = this.ownerCt; (p != null) && !fn(p, this); p = p.ownerCt); @@ -1079,7 +1008,7 @@ /** * Find a container above this component 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 {Ext.Container} The first Container which matches the given xtype or class + * @return {Container} The found container */ findParentByType: function(xtype) { return typeof xtype == 'function' ? @@ -1112,10 +1041,6 @@ item.on(ename, fn, scope, opt); }, - /** - * Returns the next component in the owning container - * @return Ext.Component - */ nextSibling : function(){ if(this.ownerCt){ var index = this.ownerCt.items.indexOf(this); @@ -1126,10 +1051,6 @@ return null; }, - /** - * Returns the previous component in the owning container - * @return Ext.Component - */ previousSibling : function(){ if(this.ownerCt){ var index = this.ownerCt.items.indexOf(this); @@ -1138,14 +1059,6 @@ } } return null; - }, - - /** - * Provides the link for Observable's fireEvent method to bubble up the ownership hierarchy. - * @return the Container which owns this Component. - */ - getBubbleTarget : function(){ - return this.ownerCt; } }); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/ComponentMgr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/ComponentMgr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/ComponentMgr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.ComponentMgr * <p>Provides a registry of all Components (instances of {@link Ext.Component} or any subclass @@ -95,10 +103,9 @@ * @param config {Object} A configuration object for the Component you wish to create. * @param defaultType {Constructor} The constructor to provide the default Component type if * the config object does not contain an xtype. (Optional if the config contains an xtype). - * @return {Ext.Component} The newly instantiated Component. */ create : function(config, defaultType){ - return config.render ? config : new types[config.xtype || defaultType](config); + return new types[config.xtype || defaultType](config); }, registerPlugin : function(ptype, cls){ @@ -121,5 +128,4 @@ * @method reg */ Ext.reg = Ext.ComponentMgr.registerType; // this will be called a lot internally, shorthand to keep the bytes down -Ext.preg = Ext.ComponentMgr.registerPlugin; -Ext.create = Ext.ComponentMgr.create; +Ext.preg = Ext.ComponentMgr.registerPlugin; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Container.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Container.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Container.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,44 +6,20 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Container * @extends Ext.BoxComponent - * <p>Base class for any {@link Ext.BoxComponent} that can contain other components. The most commonly - * used Container classes are {@link Ext.Panel}, {@link Ext.Window} and {@link Ext.TabPanel}, but you can - * create a lightweight Container to encapsulate an HTML element that is created to your - * specifications at render time by using the {@link Ext.Component#autoEl autoEl} config option - * which takes the form of a {@link Ext.DomHelper DomHelper} specification. If you do not need - * the capabilities offered by the above mentioned classes, for instance embedded - * {@link Ext.layout.ColumnLayout column} layouts inside FormPanels, then this is a useful technique.</p> - * <p>The code below illustrates both how to explicitly <i>create</i> a Container, and how to implicitly - * create one using the <b><tt>'container'</tt></b> xtype:<pre><code> -var embeddedColumns = new Ext.Container({ - autoEl: {}, - layout: 'column', - defaults: { - xtype: 'container', - autoEl: {}, - layout: 'form', - columnWidth: 0.5, - style: { - padding: '10px' - } - }, - items: [{ - items: { - xtype: 'datefield', - name: 'startDate', - fieldLabel: 'Start date' - } - }, { - items: { - xtype: 'datefield', - name: 'endDate', - fieldLabel: 'End date' - } - }] -});</code></pre></p> + * <p>Base class for any {@link Ext.BoxComponent} that can contain other components. This class is intended + * to be extended and should generally not need to be created directly via the new keyword. {@link Ext.Panel}, + * {@link Ext.Window} and {@link Ext.TabPanel} are the most commonly used Container classes.</p> * 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.</p> @@ -83,17 +59,8 @@ /** * @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. Specific config values for the chosen layout type can be specified using - * {@link #layoutConfig}. Valid values are:<ul class="mdetail-params"> - * <li>absolute</li> - * <li>accordion</li> - * <li>anchor</li> - * <li>border</li> - * <li>card</li> - * <li>column</li> - * <li>fit</li> - * <li>form</li> - * <li>table</li></ul> + * will be created and used. Valid values are: absolute, 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 @@ -159,7 +126,8 @@ /** @cfg {String} defaultType * <p>The default {@link Ext.Component xtype} of child Components to create in this Container when * a child item is specified as a raw configuration object, rather than as an instantiated Component.</p> - * <p>Defaults to 'panel'.</p> + * <p>This usually defaults to 'panel', but for {@link Ext.form.FormPanel} and {@link Ext.form.FieldSet}, + * the defaultType is 'textfield'.</p> */ defaultType: 'panel', @@ -194,7 +162,6 @@ 'beforeremove', /** * @event add - * @bubbles * 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 @@ -203,7 +170,6 @@ 'add', /** * @event remove - * @bubbles * Fires after any {@link Ext.Component} is removed from the container. * @param {Ext.Container} this * @param {Ext.Component} component The component that was removed @@ -312,8 +278,6 @@ * config property. If no xtype is configured, the Container's {@link #defaultType} * is used.<br><br> * For a list of all available xtypes, see {@link Ext.Component}. - * @param {Ext.Component/Object} component2 - * @param {Ext.Component/Object} etc * @return {Ext.Component} component The Component (or config object) that was * added with the Container's default config values applied. * <p>example:</p><pre><code> @@ -341,7 +305,7 @@ if(this.fireEvent('beforeadd', this, c, pos) !== false && this.onBeforeAdd(c) !== false){ this.items.add(c); c.ownerCt = this; - this.fireEvent(true, 'add', this, c, pos); + this.fireEvent('add', this, c, pos); } return c; }, @@ -384,7 +348,7 @@ if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ this.items.insert(index, c); c.ownerCt = this; - this.fireEvent(true, 'add', this, c, index); + this.fireEvent('add', this, c, index); } return c; }, @@ -432,7 +396,7 @@ if(this.layout && this.layout.activeItem == c){ delete this.layout.activeItem; } - this.fireEvent(true, 'remove', this, c); + this.fireEvent('remove', this, c); } return c; }, @@ -461,7 +425,7 @@ // private createComponent : function(config){ - return Ext.create(config, this.defaultType); + return Ext.ComponentMgr.create(config, this.defaultType); }, /** Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/CycleButton.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/CycleButton.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/CycleButton.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.CycleButton * @extends Ext.SplitButton Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/DataView.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/DataView.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/DataView.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.DataView * @extends Ext.BoxComponent Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/DatePicker.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/DatePicker.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/DatePicker.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.DatePicker * @extends Ext.Component @@ -707,14 +715,7 @@ // private beforeDestroy : function() { if(this.rendered){ - Ext.destroy( - this.leftClickRpt, - this.rightClickRpt, - this.monthPicker, - this.eventEl, - this.mbtn, - this.todayBtn - ); + Ext.destroy(this.mbtn, this.todayBtn); } } Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Editor.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Editor.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Editor.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,33 +6,32 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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){ - if(field.field){ - this.field = Ext.create(field.field, 'textfield'); - config = Ext.apply({}, field); // copy so we don't disturb original config - delete config.field; - }else{ - this.field = field; - } + this.field = field; Ext.Editor.superclass.constructor.call(this, config); }; Ext.extend(Ext.Editor, Ext.Component, { /** - * @cfg {Ext.form.Field} field - * The Field object (or descendant) or config object for field - */ - /** * @cfg {Boolean/String} autoSize - * True for the editor to automatically adopt the size of the element being edited, "width" to adopt the width only, + * 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) */ /** @@ -150,13 +149,10 @@ cls: "x-editor", parentEl : ct, shim : this.shim, - shadowOffset: this.shadowOffset || 4, + shadowOffset:4, id: this.id, constrain: this.constrain }); - if(this.zIndex){ - this.el.setZIndex(this.zIndex); - } this.el.setStyle("overflow", Ext.isGecko ? "auto" : "hidden"); if(this.field.msgTarget != 'title'){ this.field.msgTarget = 'qtip'; @@ -369,7 +365,7 @@ }, beforeDestroy : function(){ - Ext.destroy(this.field); + this.field.destroy(); this.field = null; } }); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Layer.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Layer.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Layer.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,448 +6,456 @@ * 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 automatically create an {@link Ext.Shadow}, or a string indicating the - * shadow's display {@link Ext.Shadow#mode}. False to disable the shadow. (defaults to false) - * @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 so = this.shadowOffset; - var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; - // only move it if it needs it - var moved = false; - // first validate right/bottom - if((x + w) > vw+s.left){ - x = vw - w - so; - moved = true; - } - if((y + h) > vh+s.top){ - y = vh - h - so; - 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); - } - } -}); +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 so = this.shadowOffset; + var w = this.dom.offsetWidth+so, h = this.dom.offsetHeight+so; + // only move it if it needs it + var moved = false; + // first validate right/bottom + if((x + w) > vw+s.left){ + x = vw - w - so; + moved = true; + } + if((y + h) > vh+s.top){ + y = vh - h - so; + 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/LoadMask.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/LoadMask.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/LoadMask.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.LoadMask * A simple utility class for generically masking elements while loading data. If the {@link #store} Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/MessageBox.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/MessageBox.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/MessageBox.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.MessageBox * <p>Utility class for generating different styles of message boxes. The alias Ext.Msg can also be used.<p/> Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/PagingToolbar.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/PagingToolbar.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/PagingToolbar.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.PagingToolbar * @extends Ext.Toolbar @@ -91,7 +99,6 @@ */ paramNames : {start: 'start', limit: 'limit'}, - // private constructor: function(config) { var pagingItems = [this.first = new T.Button({ tooltip: this.firstText, @@ -157,7 +164,6 @@ this.on('afterlayout', this.onFirstLayout, this, {single: true}); }, - // private onFirstLayout: function(ii) { this.inputItem.el.on({ keydown: {fn: this.onPagingKeydown, scope: this}, @@ -229,7 +235,6 @@ this.refresh.enable(); }, - // private readPage : function(d){ var v = this.field.value, pageNum; if (!v || isNaN(pageNum = parseInt(v, 10))) { @@ -275,7 +280,6 @@ } }, - // private doLoad : function(start){ var o = {}, pn = this.paramNames; o[pn.start] = start; @@ -334,14 +338,6 @@ this.store = store; this.paramNames.start = store.paramNames.start; this.paramNames.limit = store.paramNames.limit; - }, - - // private - onDestroy : function(){ - if(this.store){ - this.unbind(this.store); - } - Ext.PagingToolbar.superclass.onDestroy.call(this); } }); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Panel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Panel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Panel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Panel * @extends Ext.Container @@ -268,17 +276,11 @@ /** * @cfg {String/Object} html * An HTML fragment, or a {@link Ext.DomHelper DomHelper} specification to use - * as the panel's body content (defaults to ''). The HTML content is added by the Panel's - * afterRender method, and so the document will not contain this HTML at the time the render - * event is fired. This content is inserted into the body <i>before</i> any configured - * {@link #contentEl} is appended. + * 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 ''). The - * specified Element is appended to the Panel's body Element by the Panel's afterRender method - * <i>after any configured {@link #html HTML} has been inserted</i>, and so the document will - * not contain this HTML at the time the render event is fired. + * The id of an existing HTML node to use as the panel's body content (defaults to ''). */ /** * @cfg {Object/Array} keys @@ -417,10 +419,6 @@ */ minButtonWidth:75, /** - * @cfg {Boolean} unstyled - * Renders the panel unstyled - */ - /** * @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 @@ -537,10 +535,6 @@ 'deactivate' ); - if(this.unstyled){ - this.baseCls = 'x-plain'; - } - // shortcuts if(this.tbar){ this.elements += ',tbar'; @@ -570,7 +564,6 @@ } if(this.buttons){ - this.elements += ',footer'; var btns = this.buttons; /** * This Panel's Array of buttons as created from the <tt>buttons</tt> @@ -581,21 +574,13 @@ this.buttons = []; for(var i = 0, len = btns.length; i < len; i++) { if(btns[i].render){ // button instance + btns[i].ownerCt = this; this.buttons.push(btns[i]); - }else if(btns[i].xtype){ - this.buttons.push(Ext.create(btns[i], 'button')); }else{ this.addButton(btns[i]); } } } - if(this.fbar){ - this.elements += ',footer'; - // if default button align and using fbar, align left by default - if(this.buttonAlign == 'right' && this.initialConfig.buttonAlign === undefined){ - this.buttonAlign = 'left'; - } - } if(this.autoLoad){ this.on('render', this.doAutoLoad, this, {delay:10}); } @@ -616,12 +601,6 @@ el.className = this[name+'Cls']; this[name] = Ext.get(pnode.appendChild(el)); } - if(this[name+'CssClass']){ - this[name].addClass(this[name+'CssClass']); - } - if(this[name+'Style']){ - this[name].applyStyles(this[name+'Style']); - } } }, @@ -630,6 +609,7 @@ 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); @@ -699,10 +679,6 @@ } } - if(this.padding !== undefined) { - this.body.setStyle('padding', this.body.addUnits(this.padding)); - } - if(this.border === false){ this.el.addClass(this.baseCls + '-noborder'); this.body.addClass(this.bodyCls + '-noborder'); @@ -724,6 +700,10 @@ this.body.addClass(this.bodyCls + '-noborder'); } + if(this.bodyStyle){ + this.body.applyStyles(this.bodyStyle); + } + this.bwrap.enableDisplayMode('block'); if(this.header){ @@ -767,43 +747,37 @@ } if(this.buttons && this.buttons.length > 0){ - this.fbar = new Ext.Toolbar({ - items: this.buttons, - toolbarCls: 'x-panel-fbar' - }); - } - if(this.fbar){ - this.fbar = Ext.create(this.fbar, 'toolbar'); - if(this.fbar.items){ - this.fbar.items.each(function(c){ - c.minWidth = this.minButtonWidth; - }, this); + // 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:'<table cellspacing="0"><tbody><tr></tr></tbody></table><div class="x-clear"></div>' + }}, 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)); } - this.fbar.toolbarCls = 'x-panel-fbar'; - - var bct = this.footer.createChild({cls: 'x-panel-btns x-panel-btns-'+this.buttonAlign}); - this.fbar.ownerCt = this; - this.fbar.render(bct); - bct.createChild({cls:'x-clear'}); } if(this.tbar && this.topToolbar){ if(Ext.isArray(this.topToolbar)){ this.topToolbar = new Ext.Toolbar(this.topToolbar); }else if(!this.topToolbar.events){ - this.topToolbar = Ext.create(this.topToolbar, 'toolbar'); + this.topToolbar = Ext.ComponentMgr.create(this.topToolbar, 'toolbar'); } - this.topToolbar.ownerCt = this; this.topToolbar.render(this.tbar); + this.topToolbar.ownerCt = this; } if(this.bbar && this.bottomToolbar){ if(Ext.isArray(this.bottomToolbar)){ this.bottomToolbar = new Ext.Toolbar(this.bottomToolbar); }else if(!this.bottomToolbar.events){ - this.bottomToolbar = Ext.create(this.bottomToolbar, 'toolbar'); + this.bottomToolbar = Ext.ComponentMgr.create(this.bottomToolbar, 'toolbar'); } - this.bottomToolbar.ownerCt = this; this.bottomToolbar.render(this.bbar); + this.bottomToolbar.ownerCt = this; } }, @@ -884,6 +858,7 @@ Ext.apply(bc, config); } var btn = new Ext.Button(bc); + btn.ownerCt = this; if(!this.buttons){ this.buttons = []; } @@ -906,46 +881,30 @@ Ext.Panel.prototype.toolTemplate = tt; } for(var i = 0, a = arguments, len = a.length; i < len; i++) { - var tc = a[i]; - if(!this.tools[tc.id]){ - var overCls = 'x-tool-'+tc.id+'-over'; - var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), 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); + var tc = a[i], overCls = 'x-tool-'+tc.id+'-over'; + var t = this.toolTemplate.insertFirst((tc.align !== 'left') ? this[this.toolTarget] : this[this.toolTarget].child('span'), 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; } - 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); } + t.addClassOnOver(overCls); } }, - doLayout : function(shallow){ - Ext.Panel.superclass.doLayout.call(this, shallow); - if(this.topToolbar){ - this.topToolbar.doLayout(); - } - if(this.bottomToolbar){ - this.bottomToolbar.doLayout(); - } - if(this.fbar){ - this.fbar.doLayout(); - } - }, - // private onShow : function(){ if(this.floating){ @@ -975,6 +934,9 @@ // 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(); } @@ -1182,22 +1144,7 @@ if(w !== undefined || h !== undefined){ if(!this.collapsed){ if(typeof w == 'number'){ - w = this.adjustBodyWidth(w - this.getFrameWidth()); - if(this.tbar){ - this.tbar.setWidth(w); - if(this.topToolbar){ - this.topToolbar.setSize(w); - } - } - if(this.bbar){ - this.bbar.setWidth(w); - if(this.bottomToolbar){ - this.bottomToolbar.setSize(w); - } - } - if(this.fbar){ - this.fbar.setSize(w - this.fbar.container.getFrameWidth('lr')); - } + w = this.adjustBodyWidth(w - this.getFrameWidth()); this.body.setWidth(w); }else if(w == 'auto'){ this.body.setWidth(w); @@ -1205,11 +1152,24 @@ if(typeof h == 'number'){ h = this.adjustBodyHeight(h - this.getFrameHeight()); - this.body.setHeight(h); + this.body.setHeight(h); }else if(h == 'auto'){ this.body.setHeight(h); } + if(this.tbar){ + this.tbar.setWidth(w); + if(this.topToolbar){ + this.topToolbar.setSize(w); + } + } + if(this.bbar){ + this.bbar.setWidth(w); + if(this.bottomToolbar){ + this.bottomToolbar.setSize(w); + } + } + if(this.disabled && this.el._mask){ this.el._mask.setSize(this.el.dom.clientWidth, this.el.getHeight()); } @@ -1368,19 +1328,12 @@ // private beforeDestroy : function(){ - if(this.header){ - this.header.removeAllListeners(); - if(this.headerAsText){ - Ext.Element.uncache(this.header.child('span')); - } - } Ext.Element.uncache( this.header, this.tbar, this.bbar, this.footer, - this.body, - this.bwrap + this.body ); if(this.tools){ for(var k in this.tools){ @@ -1394,8 +1347,7 @@ } Ext.destroy( this.topToolbar, - this.bottomToolbar, - this.fbar + this.bottomToolbar ); Ext.Panel.superclass.beforeDestroy.call(this); }, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/PanelDD.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/PanelDD.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/PanelDD.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/ProgressBar.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/ProgressBar.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/ProgressBar.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.ProgressBar * @extends Ext.BoxComponent Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Resizable.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Resizable.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Resizable.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Resizable * @extends Ext.util.Observable @@ -606,26 +614,22 @@ * @param {Boolean} removeEl (optional) true to remove the element from the DOM */ destroy : function(removeEl){ - if(this.dd){ - this.dd.destroy(); - } + this.proxy.remove(); if(this.overlay){ - Ext.destroy(this.overlay); - this.overlay = null; + this.overlay.removeAllListeners(); + this.overlay.remove(); } - Ext.destroy(this.proxy); - this.proxy = null; - var ps = Ext.Resizable.positions; for(var k in ps){ if(typeof ps[k] != "function" && this[ps[k]]){ - this[ps[k]].destroy(); + var h = this[ps[k]]; + h.el.removeAllListeners(); + h.el.remove(); } } if(removeEl){ this.el.update(""); - Ext.destroy(this.el); - this.el = null; + this.el.remove(); } }, @@ -672,7 +676,6 @@ // private Ext.Resizable.Handle.prototype = { - // private afterResize : function(rz){ // do nothing }, @@ -687,12 +690,7 @@ // private onMouseOut : function(e){ this.rz.handleOut(this, e); - }, - // private - destroy : function(){ - Ext.destroy(this.el); - this.el = null; - } + } }; Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Shadow.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Shadow.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Shadow.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Slider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Slider.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Slider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Slider * @extends Ext.BoxComponent Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitBar.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitBar.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitBar.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.SplitBar * @extends Ext.util.Observable @@ -175,7 +183,7 @@ Ext.get(this.proxy).setDisplayed(false); var endPoint = Ext.lib.Event.getXY(e); if(this.overlay){ - Ext.destroy(this.overlay); + this.overlay.remove(); delete this.overlay; } var newSize; @@ -271,7 +279,7 @@ this.shim.remove(); } this.dd.unreg(); - Ext.destroy(Ext.get(this.proxy)); + Ext.removeNode(this.proxy); if(removeEl){ this.el.remove(); } Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitButton.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitButton.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/SplitButton.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.SplitButton * @extends Ext.Button Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/TabPanel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/TabPanel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/TabPanel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.TabPanel * <p>A basic tab container. TabPanels can be used exactly like a standard {@link Ext.Panel} for layout @@ -50,7 +58,7 @@ * <p>The server script would need to return an executable Javascript statement which, when processed * using <tt>eval()</tt> will return either a config object with an {@link Ext.Component#xtype xtype}, * or an instantiated Component. For example:</p><pre><code> -(function() { +{function() { function formatDate(value){ return value ? value.dateFormat('M d, Y') : ''; }; @@ -142,11 +150,6 @@ * @cfg {Boolean} layoutOnTabChange Set to true to do a layout of tab items as tabs are changed. */ /** - * @cfg {String} tabCls <b>This config option is used on <u>child Components</u> of ths TabPanel.</b> A CSS - * class name applied to the tab strip item representing the child Component, allowing special - * styling to be applied. - */ - /** * @cfg {Boolean} monitorResize True to automatically monitor window resize events and rerender the layout on * browser resize (defaults to true). */ @@ -155,10 +158,6 @@ * @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). - * <p>Be aware that leaving deferredRender as <b><tt>true</tt></b> means that, if the TabPanel is within - * a {@link Ext.form.FormPanel form}, then until a tab is activated, any Fields within that tab will not - * be rendered, and will therefore not be submitted and will not be available to either - * {@link Ext.form.BasicForm#getValues getValues} or {@link Ext.form.BasicForm#setValues setValues}.</p> */ deferredRender : true, /** @@ -327,9 +326,6 @@ this.stack = Ext.TabPanel.AccessStack(); } this.initItems(); - if(this.activeTab !== undefined && typeof this.activeTab != 'object'){ - this.activeTab = this.items.get(this.activeTab); - } }, // private @@ -359,7 +355,7 @@ var beforeEl = (this.tabPosition=='bottom' ? this.stripWrap : null); this.stripSpacer = st.createChild({cls:'x-tab-strip-spacer'}, beforeEl); this.strip = new Ext.Element(this.stripWrap.dom.firstChild); - + this.edge = this.strip.createChild({tag:'li', cls:'x-tab-edge'}); this.strip.createChild({cls:'x-clear'}); @@ -391,8 +387,8 @@ // private initEvents : function(){ Ext.TabPanel.superclass.initEvents.call(this); - this.on('add', this.onAdd, this, {target: this}); - this.on('remove', this.onRemove, this, {target: this}); + this.on('add', this.onAdd, this); + this.on('remove', this.onRemove, this); this.strip.on('mousedown', this.onStripMouseDown, this); this.strip.on('contextmenu', this.onStripContextMenu, this); @@ -484,7 +480,7 @@ if(item.tabCls){ cls += ' ' + item.tabCls; } - + var p = { id: this.id + this.idDelimiter + item.getItemId(), text: item.title, @@ -500,8 +496,6 @@ if(item.tabTip){ Ext.fly(el).child('span.x-tab-strip-text', true).qtip = item.tabTip; } - item.tabEl = el; - item.on('disable', this.onItemDisabled, this); item.on('enable', this.onItemEnabled, this); item.on('titlechange', this.onItemTitleChanged, this); @@ -532,7 +526,7 @@ // private onRemove : function(tp, item){ - Ext.destroy(Ext.get(this.getTabEl(item))); + Ext.removeNode(this.getTabEl(item)); this.stack.remove(item); item.un('disable', this.onItemDisabled, this); item.un('enable', this.onItemEnabled, this); @@ -586,7 +580,7 @@ * 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/Number} tab The tab component, or the tab's index + * @param {Panel} tab The tab * @return {HTMLElement} The DOM node */ getTabEl : function(item){ @@ -923,22 +917,6 @@ 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'); - }, - - // private - beforeDestroy : function() { - if(this.items){ - this.items.each(function(item){ - if(item && item.tabEl){ - Ext.get(item.tabEl).removeAllListeners(); - item.tabEl = null; - } - }, this); - } - if(this.strip){ - this.strip.removeAllListeners(); - } - Ext.TabPanel.superclass.beforeDestroy.apply(this); } /** Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Toolbar.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Toolbar.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Toolbar.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.ToolbarLayout * @extends Ext.layout.ContainerLayout @@ -233,8 +241,12 @@ trackMenus : true, internalDefaults: {removeMode: 'container', hideParent: true}, - toolbarCls: 'x-toolbar', + // private + autoCreate: { + cls:'x-toolbar x-small-editor' + }, + initComponent : function(){ T.superclass.initComponent.call(this); @@ -243,14 +255,7 @@ // private onRender : function(ct, position){ - if(!this.el){ - if(!this.autoCreate){ - this.autoCreate = { - cls: this.toolbarCls + ' x-small-editor' - } - } - this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); - } + this.el = ct.createChild(Ext.apply({ id: this.id },this.autoCreate), position); }, /** @@ -295,7 +300,7 @@ this.addElement(el); }else if(typeof el == "object"){ // must be button config? if(el.xtype){ - this.addItem(Ext.create(el, 'button')); + this.addItem(Ext.ComponentMgr.create(el, 'button')); }else{ this.addButton(el); } @@ -523,7 +528,7 @@ */ T.Separator = Ext.extend(T.Item, { onRender : function(ct, position){ - this.el = ct.createChild({tag:'span', cls:'xtb-sep'}, position); + this.el = ct.createChild({tag:'span', cls:'ytb-sep'}, position); } }); Ext.reg('tbseparator', T.Separator); @@ -546,7 +551,7 @@ */ T.Spacer = Ext.extend(T.Item, { onRender : function(ct, position){ - this.el = ct.createChild({tag:'div', cls:'xtb-spacer', style: this.width?'width:'+this.width+'px':''}, position); + this.el = ct.createChild({tag:'div', cls:'ytb-spacer'}, position); } }); Ext.reg('tbspacer', T.Spacer); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Viewport.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Viewport.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Viewport.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Viewport * @extends Ext.Container Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/Window.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/Window.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/Window.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Window * @extends Ext.Panel @@ -56,13 +64,6 @@ * Ext.emptyFn (See {@link Ext#emptyFn}). */ /** - * @cfg {Boolean} collapsed - * True to render the window collapsed, false to render it expanded (defaults to false). Note that if - * {@link #expandOnShow} is true (the default) it will override the <tt>collapsed</tt> config and the window - * will always be expanded when shown. - */ - - /** * @cfg {String} baseCls * The base CSS class to apply to this panel's element (defaults to 'x-window'). */ @@ -139,7 +140,7 @@ /** * @cfg {Boolean} expandOnShow * True to always expand the window when it is displayed, false to keep it in its current state (which may be - * {@link #collapsed}) when displayed (defaults to true). + * collapsed) when displayed (defaults to true). */ expandOnShow: true, /** @@ -242,7 +243,6 @@ this.mask = this.container.createChild({cls:"ext-el-mask"}, this.el.dom); this.mask.enableDisplayMode("block"); this.mask.hide(); - this.mask.on('click', this.focus, this); } }, @@ -302,13 +302,7 @@ // private beforeDestroy : function(){ - this.hide(); - if(this.doAnchor){ - Ext.EventManager.removeResizeListener(this.doAnchor, this); - Ext.EventManager.un(window, 'scroll', this.doAnchor, this); - } Ext.destroy( - this.focusEl, this.resizer, this.dd, this.proxy, @@ -400,15 +394,14 @@ focus : function(){ var f = this.focusEl, db = this.defaultButton, t = typeof db; if(t != 'undefined'){ - if(t == 'number' && this.fbar){ - f = this.fbar.items.get(db); + if(t == 'number'){ + f = this.buttons[db]; }else if(t == 'string'){ f = Ext.getCmp(db); }else{ f = db; } } - f = f || this.focusEl; f.focus.defer(10, f); }, @@ -779,34 +772,28 @@ * is a number, it is used as the buffer delay (defaults to 50ms). * @return {Ext.Window} this */ - anchorTo : function(el, alignment, offsets, monitorScroll){ - if(this.doAnchor){ - Ext.EventManager.removeResizeListener(this.doAnchor, this); - Ext.EventManager.un(window, 'scroll', this.doAnchor, this); - } - this.doAnchor = function(){ - this.alignTo(el, alignment, offsets); - }; - Ext.EventManager.onWindowResize(this.doAnchor, this); - - var tm = typeof monitorScroll; - if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', this.doAnchor, this, - {buffer: tm == 'number' ? monitorScroll : 50}); - } - this.doAnchor(); - 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; }, /** * Brings this window to the front of any other visible windows * @return {Ext.Window} this */ - toFront : function(e){ + toFront : function(){ if(this.manager.bringToFront(this)){ - if(!e || !e.getTarget().focus){ - this.focus(); - } + this.focus(); } return this; }, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/WindowManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/WindowManager.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/WindowManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.WindowGroup * An object that represents a group of {@link Ext.Window} instances and provides z-order management Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/Chart.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/Chart.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/Chart.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.chart.Chart = Ext.extend(Ext.FlashComponent, { url: "http:/"+"/yui.yahooapis.com/2.5.1/build/charts/assets/charts.swf", refreshBuffer: 100, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/EventProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/EventProxy.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/EventProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.FlashEventProxy = { onEvent : function(id, e){ var fp = Ext.getCmp(id); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/FlashComponent.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/FlashComponent.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/FlashComponent.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { flashVersion : '9.0.45', backgroundColor: '#ffffff', Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/swfobject.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/swfobject.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/chart/swfobject.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /*! * SWFObject v1.5: Flash Player detection and embed - http://blog.deconcept.com/swfobject/ * Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Action.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Action.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Action.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.Action * <p>The subclasses of this class provide actions to perform upon {@link Ext.form.BasicForm Form}s.</p> Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/BasicForm.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/BasicForm.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/BasicForm.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.BasicForm * @extends Ext.util.Observable @@ -89,8 +97,6 @@ * server is using JSON to send the return object, then the * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p> - * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode - * "<" as "&lt;", "&" as "&amp;" etc.</p> * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object * is created containing a <tt>responseText</tt> property in order to conform to the * requirements of event handlers and callbacks.</p> @@ -469,13 +475,7 @@ }, /** - * Add Ext.form Components to this form's Collection. This does not result in rendering of - * the passed Component, it just enables the form to validate Fields, and distribute values to - * Fields. - * <p><b>You will not usually call this function. In order to be rendered, a Field must be added - * to a {@link Ext.Container Container}, usually an {@link Ext.form.FormPanel FormPanel}. - * The FormPanel to which the field is added takes care of adding the Field to the BasicForm's - * collection.</b></p> + * Add Ext.form components to this form. * @param {Field} field1 * @param {Field} field2 (optional) * @param {Field} etc (optional) Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Checkbox.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Checkbox.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Checkbox.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.Checkbox * @extends Ext.form.Field Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/CheckboxGroup.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/CheckboxGroup.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/CheckboxGroup.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.CheckboxGroup * @extends Ext.form.Field Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Combo.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Combo.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Combo.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.ComboBox * @extends Ext.form.TriggerField @@ -521,13 +529,11 @@ // private onDestroy : function(){ if(this.view){ - Ext.destroy(this.view); + this.view.el.removeAllListeners(); + this.view.el.remove(); + this.view.purgeListeners(); } if(this.list){ - if(this.innerList){ - this.innerList.un('mouseover', this.onViewOver, this); - this.innerList.un('mousemove', this.onViewMove, this); - } this.list.destroy(); } this.bindStore(null); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DateField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DateField.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DateField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.DateField * @extends Ext.form.TriggerField @@ -114,7 +122,7 @@ if(typeof this.maxValue == "string"){ this.maxValue = this.parseDate(this.maxValue); } - this.disabledDatesRE = null; + this.ddMatch = null; this.initDisabledDays(); }, @@ -212,7 +220,7 @@ } } var fvalue = this.formatDate(value); - if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){ + if(this.ddMatch && this.ddMatch.test(fvalue)){ this.markInvalid(String.format(this.disabledDatesText, fvalue)); return false; } @@ -324,7 +332,7 @@ Ext.apply(this.menu.picker, { minDate : this.minValue, maxDate : this.maxValue, - disabledDatesRE : this.disabledDatesRE, + disabledDatesRE : this.ddMatch, disabledDatesText : this.disabledDatesText, disabledDays : this.disabledDays, disabledDaysText : this.disabledDaysText, Added: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DisplayField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DisplayField.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/DisplayField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,61 @@ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + +/** + * @class Ext.form.DisplayField + * @extends Ext.form.Field + * @constructor + * Creates a new Field + * @param {Object} config Configuration options + */ +Ext.form.DisplayField = Ext.extend(Ext.form.Field, { + validationEvent : false, + validateOnBlur : false, + defaultAutoCreate : {tag: "div"}, + fieldClass : "x-form-display-field", + htmlEncode: false, + + // private + initEvents : function(){}, + + isValid : function(){ + return true; + }, + + validate : function(){ + return true; + }, + + getRawValue : function(){ + var v = this.rendered ? this.el.dom.innerHTML : Ext.value(this.value, ''); + if(v === this.emptyText){ + v = ''; + } + if(this.htmlEncode){ + v = Ext.util.Format.htmlDecode(v); + } + return v; + }, + + getValue : function(){ + return this.getRawValue(); + }, + + setRawValue : function(v){ + if(this.htmlEncode){ + v = Ext.util.Format.htmlEncode(v); + } + return this.rendered ? (this.el.dom.innerHTML = (v === null || v === undefined ? '' : v)) : (this.value = v); + }, + + setValue : function(v){ + this.setRawValue(v); + } +}); + +Ext.reg('displayfield', Ext.form.DisplayField); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Field.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Field.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Field.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.Field * @extends Ext.BoxComponent @@ -16,12 +24,6 @@ */ Ext.form.Field = Ext.extend(Ext.BoxComponent, { /** - * @cfg {String} fieldLabel The label text to display next to this field (defaults to '') - * <p><b>A Field's label is not by default rendered as part of the Field's structure. - * The label is rendered by the {@link Ext.layout.FormLayout form layout} layout manager - * of the {@link Ext.form.Container Container} to which the Field is added.</b></p> - */ - /** * @cfg {String} inputType The type attribute for input fields -- e.g. radio, text, password, file (defaults * to "text"). The types "file" and "password" must be used to render those field types currently -- there are * no separate Ext components for those. Note that if you use <tt>inputType:'file'</tt>, {@link #emptyText} @@ -207,7 +209,7 @@ initValue : function(){ if(this.value !== undefined){ this.setValue(this.value); - }else if(!Ext.isEmpty(this.el.dom.value) && this.el.dom.value != this.emptyText){ + }else if(this.el.dom.value.length > 0 && this.el.dom.value != this.emptyText){ this.setValue(this.el.dom.value); } // reference to original value for reset @@ -438,11 +440,6 @@ } }, - // private, does not work for all fields - append :function(v){ - this.setValue([this.getValue(), v].join('')); - }, - // private adjustSize : function(w, h){ var s = Ext.form.Field.superclass.adjustSize.call(this, w, h); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/FieldSet.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/FieldSet.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/FieldSet.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.FieldSet * @extends Ext.Panel @@ -84,14 +92,6 @@ */ onCheckClick : function(){ this[this.checkbox.dom.checked ? 'expand' : 'collapse'](); - }, - - // private - beforeDestroy : function(){ - if(this.checkbox){ - this.checkbox.un('click', this.onCheckClick, this); - } - Ext.form.FieldSet.superclass.beforeDestroy.call(this); } /** Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Form.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Form.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Form.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.FormPanel * @extends Ext.Panel @@ -68,13 +76,9 @@ */ monitorPoll : 200, - layout:'form', - // private initComponent :function(){ this.form = this.createForm(); - Ext.FormPanel.superclass.initComponent.call(this); - this.bodyCfg = { tag: 'form', cls: this.baseCls + '-body', @@ -84,8 +88,9 @@ if(this.fileUpload) { this.bodyCfg.enctype = 'multipart/form-data'; } - this.initItems(); - + + Ext.FormPanel.superclass.initComponent.call(this); + this.addEvents( /** * @event clientvalidation Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Hidden.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Hidden.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Hidden.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.Hidden * @extends Ext.form.Field Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/HtmlEditor.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/HtmlEditor.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/HtmlEditor.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.HtmlEditor * @extends Ext.form.Field @@ -386,15 +394,6 @@ }); this.tb.doLayout(); - this.createIFrame(); - - if(!this.width){ - var sz = this.el.getSize(); - this.setSize(sz.width, this.height || sz.height); - } - }, - - createIFrame: function(){ var iframe = document.createElement('iframe'); iframe.name = Ext.id(); iframe.frameBorder = '0'; @@ -404,7 +403,7 @@ this.iframe = iframe; this.initFrame(); - + if(this.autoMonitorDesignMode !== false){ this.monitorTask = Ext.TaskMgr.start({ run: this.checkDesignMode, @@ -412,6 +411,11 @@ interval:100 }); } + + if(!this.width){ + var sz = this.el.getSize(); + this.setSize(sz.width, this.height || sz.height); + } }, initFrame : function(){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Label.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Label.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Label.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.Label * @extends Ext.BoxComponent Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/NumberField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/NumberField.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/NumberField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.NumberField * @extends Ext.form.TextField Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Radio.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Radio.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/Radio.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.Radio * @extends Ext.form.Checkbox Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/RadioGroup.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/RadioGroup.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/RadioGroup.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.RadioGroup * @extends Ext.form.CheckboxGroup Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextArea.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextArea.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextArea.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.TextArea * @extends Ext.form.TextField Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextField.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TextField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.TextField * @extends Ext.form.Field @@ -231,7 +239,7 @@ }, applyEmptyText : function(){ - if(this.rendered && this.emptyText && this.getRawValue().length < 1 && !this.hasFocus){ + if(this.rendered && this.emptyText && this.getRawValue().length < 1){ this.setRawValue(this.emptyText); this.el.addClass(this.emptyClass); } Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TimeField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TimeField.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TimeField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.TimeField * @extends Ext.form.ComboBox Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TriggerField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TriggerField.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/TriggerField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.TriggerField * @extends Ext.form.TextField Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/form/VTypes.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/form/VTypes.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/form/VTypes.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.form.VTypes * Overridable validation definitions. The validations provided are basic and intended to be easily customizable and extended. Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/AbstractSelectionModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/AbstractSelectionModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/AbstractSelectionModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.AbstractSelectionModel * @extends Ext.util.Observable Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CellSelectionModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CellSelectionModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CellSelectionModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.CellSelectionModel * @extends Ext.grid.AbstractSelectionModel Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CheckboxSelectionModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CheckboxSelectionModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/CheckboxSelectionModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.CheckboxSelectionModel * @extends Ext.grid.RowSelectionModel Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/Column.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/Column.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/Column.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,97 +6,35 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.grid.Column = function(config){ Ext.apply(this, config); if(typeof this.renderer == "string"){ - this.renderer = Ext.util.Format[this.renderer]; + this.renderer = Ext.util.Format[c.renderer]; } if(typeof this.id == "undefined"){ this.id = ++Ext.grid.Column.AUTO_ID; } - if(this.editor){ - if(this.editor.xtype && !this.editor.events){ - this.editor = Ext.create(this.editor, 'textfield'); - } + if(this.editor && this.editor.isFormField){ + this.editor = new Ext.grid.GridEditor(this.editor); } } Ext.grid.Column.AUTO_ID = 0; Ext.grid.Column.prototype = { - isColumn : true, renderer : function(value){ if(typeof value == "string" && value.length < 1){ return " "; } return value; - }, - - getEditor: function(rowIndex){ - return this.editable !== false ? this.editor : null; - }, - - getCellEditor: function(rowIndex){ - var editor = this.getEditor(rowIndex); - if(editor){ - if(!editor.startEdit){ - if(!editor.gridEditor){ - editor.gridEditor = new Ext.grid.GridEditor(editor); - } - return editor.gridEditor; - }else if(editor.startEdit){ - return editor; - } - } - return null; } -}; - -Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, { - renderer : function(value){ - if(value === undefined){ - return " "; - } - if(!value || value === 'false'){ - return "false"; - } - return 'true'; - } -}); - -Ext.grid.NumberColumn = Ext.extend(Ext.grid.Column, { - format : '0,000.00', - constructor: function(cfg){ - this.supr().constructor.apply(this, arguments); - this.renderer = Ext.util.Format.numberRenderer(this.format); - } -}); - -Ext.grid.DateColumn = Ext.extend(Ext.grid.Column, { - format : 'm/d/Y', - constructor: function(cfg){ - this.supr().constructor.apply(this, arguments); - this.renderer = Ext.util.Format.dateRenderer(this.format); - } -}); - -Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, { - constructor: function(cfg){ - this.supr().constructor.apply(this, arguments); - var tpl = typeof this.tpl == 'object' ? this.tpl : new Ext.XTemplate(this.tpl); - this.renderer = function(value, p, r){ - return tpl.apply(r.data); - } - this.tpl = tpl; - } -}); - - -Ext.grid.Column.types = { - gridcolumn : Ext.grid.Column, - booleancolumn: Ext.grid.BooleanColumn, - numbercolumn: Ext.grid.NumberColumn, - datecolumn: Ext.grid.DateColumn, - templatecolumn: Ext.grid.TemplateColumn }; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnDD.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnDD.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnDD.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + // private // This is a support class used internally by the Grid components Ext.grid.HeaderDragZone = function(grid, hd, hd2){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.ColumnModel * @extends Ext.util.Observable @@ -35,6 +43,18 @@ */ Ext.grid.ColumnModel = function(config){ /** + * 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; + + /** * The config passed into the constructor * @property {Array} config */ @@ -90,16 +110,6 @@ }; Ext.extend(Ext.grid.ColumnModel, Ext.util.Observable, { /** - * The width of columns which have no width specified (defaults to 100) - * @type Number - */ - defaultWidth: 100, - /** - * Default sortable of columns which have no sortable specified (defaults to false) - * @type Boolean - */ - defaultSortable: false, - /** * @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 @@ -188,10 +198,6 @@ return this.config[index].id; }, - getColumnAt : function(index){ - return this.config[index]; - }, - /** * Reconfigures this column model * @param {Array} config Array of Column configs @@ -211,11 +217,15 @@ // if no id, create one for(var i = 0, len = config.length; i < len; i++){ var c = config[i]; - if(!c.isColumn){ - var cls = Ext.grid.Column.types[c.xtype || 'gridcolumn']; - c = new cls(c); - config[i] = c; + if(typeof c.renderer == "string"){ + c.renderer = Ext.util.Format[c.renderer]; } + if(typeof c.id == "undefined"){ + c.id = 'xgc'+i; + } + if(c.editor && c.editor.isFormField){ + c.editor = new Ext.grid.GridEditor(c.editor); + } this.lookup[c.id] = c; } if(!initial){ @@ -509,7 +519,7 @@ * @return {Object} */ getCellEditor : function(colIndex, rowIndex){ - return this.config[colIndex].getCellEditor(rowIndex); + return this.config[colIndex].editor; }, /** Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnSplitDD.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnSplitDD.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/ColumnSplitDD.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + // private // This is a support class used internally by the Grid components Ext.grid.SplitDragZone = function(grid, hd, hd2){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/EditorGrid.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/EditorGrid.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/EditorGrid.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,24 +6,19 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.EditorGridPanel * @extends Ext.grid.GridPanel - * <p>This class extends the GridPanel to provide cell editing on selected columns.</p> - * The editable columns are specified by providing an {@link Ext.grid.ColumnModel#editor editor} - * in the column configuration.</p> - * <p>Editability of columns may be controlled programatically by inserting an implementation - * of {@link Ext.grid.ColumnModel#isCellEditable isCellEditable} into your ColumnModel.</p> - * <p>Editing is performed on the value of the <i>field</i> specified by the column's - * {@link Ext.grid.ColumnModel#dataIndex dataIndex} in the backing {@link Ext.data.Store Store} - * (so if you are using a {@link Ext.grid.ColumnModel#setRenderer renderer} in order to display - * transformed data, this must be accounted for).</p> - * <p>If a value-to-description mapping is used to render a column, then a {Ext.form.Field#ComboBox ComboBox} - * which uses the same {@link Ext.form.Field#valueField value}-to-{@link Ext.form.Field#displayFieldField description} - * mapping would be an appropriate editor.</p> - * If there is a more complex mismatch between the visible data in the grid, and the editable data in - * the {@link Edt.data.Store Store}, then code to transform the data both before and after editing can be - * injected using the {@link #beforeedit} and {@link #afteredit} events. + * Class for creating and editable grid. + * @constructor * @param {Object} config The config object */ @@ -52,7 +47,7 @@ */ // private trackMouseOver: false, // causes very odd FF errors - + // private initComponent : function(){ Ext.grid.EditorGridPanel.superclass.initComponent.call(this); @@ -60,9 +55,7 @@ if(!this.selModel){ /** * @cfg {Object} selModel Any subclass of AbstractSelectionModel that will provide the selection model for - * the grid (defaults to {@link Ext.grid.CellSelectionModel} if not specified). Note that the SelectionModel - * must be compatible with the model of selecting cells individually, and should support a method named - * <tt>getSelectedCell</tt> (for these reasons, {@link Ext.grid.RowSelectionModel} is not compatible). + * the grid (defaults to {@link Ext.grid.CellSelectionModel} if not specified). */ this.selModel = new Ext.grid.CellSelectionModel(); } @@ -123,7 +116,7 @@ // private initEvents : function(){ Ext.grid.EditorGridPanel.superclass.initEvents.call(this); - + this.on("bodyscroll", this.stopEditing, this, [true]); if(this.clicksToEdit == 1){ @@ -215,9 +208,6 @@ if(this.fireEvent("beforeedit", e) !== false && !e.cancel){ this.editing = true; var ed = this.colModel.getCellEditor(col, row); - if(!ed){ - return; - } if(!ed.rendered){ ed.render(this.view.getEditorParent(ed)); } @@ -227,29 +217,25 @@ ed.record = r; ed.on("complete", this.onEditComplete, this, {single: true}); ed.on("specialkey", this.selModel.onEditorKey, this.selModel); - /** - * The currently active editor or null - * @type Ext.Editor - */ this.activeEditor = ed; var v = this.preEditValue(r, field); - ed.startEdit(this.view.getCell(row, col).firstChild, v === undefined ? '' : v); + ed.startEdit(this.view.getCell(row, col).firstChild, v); }).defer(50, this); } } }, - + // private preEditValue : function(r, field){ var value = r.data[field]; return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlDecode(value) : value; }, - + // private postEditValue : function(value, originalValue, r, field){ return this.autoEncode && typeof value == 'string' ? Ext.util.Format.htmlEncode(value) : value; }, - + /** * Stops any active editing * @param {Boolean} cancel (optional) True to cancel any changes @@ -260,7 +246,7 @@ } this.activeEditor = null; }, - + // private onDestroy: function() { if(this.rendered){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridDD.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridDD.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridDD.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.GridDragZone * @extends Ext.dd.DragZone Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridEditor.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridEditor.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridEditor.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + // private // This is a support class used internally by the Grid components Ext.grid.GridEditor = function(field, config){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridPanel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridPanel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridPanel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.GridPanel * @extends Ext.Panel @@ -107,7 +115,7 @@ * <p>A cooperating {@link Ext.dd.DropZone DropZone} must be created who's implementations of * {@link Ext.dd.DropZone#onNodeEnter onNodeEnter}, {@link Ext.dd.DropZone#onNodeOver onNodeOver}, * {@link Ext.dd.DropZone#onNodeOut onNodeOut} and {@link Ext.dd.DropZone#onNodeDrop onNodeDrop}</p> are able - * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided. + * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided. */ enableDragDrop : false, /** @@ -124,10 +132,6 @@ enableHdMenu : true, /** * @cfg {Boolean} stripeRows True to stripe the rows. Default is false. - * <p>This causes the CSS class <tt><b>x-grid3-row-alt</b></tt> to be added to alternate rows of - * the grid. A default CSS rule is provided which sets a background colour, but you can override this - * with a rule which either overrides the <b>background-color</b> style using the "!important" - * modifier, or which uses a CSS selector of higher specificity. */ stripeRows : false, /** @@ -456,7 +460,7 @@ } } } - if(state.sort && this.store){ + if(state.sort){ this.store[this.store.remoteSort ? 'setDefaultSort' : 'sort'](state.sort.field, state.sort.direction); } }, @@ -472,11 +476,9 @@ o.columns[i].hidden = true; } } - if(this.store){ - var ss = this.store.getSortState(); - if(ss){ - o.sort = ss; - } + var ss = this.store.getSortState(); + if(ss){ + o.sort = ss; } return o; }, @@ -494,13 +496,8 @@ }, /** - * <p>Reconfigures the grid to use a different Store and Column Model. - * The View will be bound to the new objects and refreshed.</p> - * <p>Be aware that upon reconfiguring a GridPanel, certain existing settings <i>may</i> become - * invalidated. For example the configured {@link #autoExpandColumn} may no longer exist in the - * new ColumnModel. Also, an existing {@link Ext.PagingToolbar PagingToolbar} will still be bound - * to the old Store, and will need rebinding. Any {@link #plugins} might also need reconfiguring - * with the new data.</p> + * 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 */ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridView.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridView.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GridView.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.GridView * @extends Ext.util.Observable @@ -358,9 +366,9 @@ // getter methods for fetching elements dynamically in the grid /** - * Return the <TR> HtmlElement which represents a Grid row for the specified index. + * Return the HtmlElement which represents a Grid row for the specified index. * @param {Number} index The row index - * @return {HtmlElement} The <TR> element. + * @return {HtmlElement} The element. */ getRow : function(row){ return this.getRows()[row]; @@ -406,7 +414,7 @@ // private removeRow : function(row){ Ext.removeNode(this.getRow(row)); - this.syncFocusEl(row); + this.focusRow(row); }, // private @@ -415,7 +423,7 @@ for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ Ext.removeNode(bd.childNodes[firstRow]); } - this.syncFocusEl(firstRow); + this.focusRow(firstRow); }, // scrolling stuff @@ -478,16 +486,13 @@ hd.style.width = ws[i]; } - var ns = this.getRows(), row, trow; + var ns = this.getRows(); for(var i = 0, len = ns.length; i < len; i++){ - row = ns[i]; - row.style.width = tw; - if(row.firstChild){ - row.firstChild.style.width = tw; - trow = row.firstChild.rows[0]; - for (var j = 0; j < clen; j++) { - trow.childNodes[j].style.width = ws[j]; - } + 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]; } } @@ -503,14 +508,11 @@ var hd = this.getHeaderCell(col); hd.style.width = w; - var ns = this.getRows(), row; + var ns = this.getRows(); for(var i = 0, len = ns.length; i < len; i++){ - row = ns[i]; - row.style.width = tw; - if(row.firstChild){ - row.firstChild.style.width = tw; - row.firstChild.rows[0].childNodes[col].style.width = w; - } + 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); @@ -527,14 +529,11 @@ var hd = this.getHeaderCell(col); hd.style.display = display; - var ns = this.getRows(), row; + var ns = this.getRows(); for(var i = 0, len = ns.length; i < len; i++){ - row = ns[i]; - row.style.width = tw; - if(row.firstChild){ - row.firstChild.style.width = tw; - row.firstChild.rows[0].childNodes[col].style.display = display; - } + 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); @@ -611,9 +610,6 @@ }, afterRender: function(){ - if(!this.ds || !this.cm){ - return; - } this.mainBody.dom.innerHTML = this.renderRows(); this.processRows(0, true); @@ -677,11 +673,6 @@ //g.on("headercontextmenu", this.handleHdCtx, this); } - if(g.trackMouseOver){ - this.mainBody.on("mouseover", this.onRowOver, this); - this.mainBody.on("mouseout", this.onRowOut, this); - } - if(g.enableDragDrop || g.enableDrag){ this.dragZone = new Ext.grid.GridDragZone(g, { ddGroup : g.ddGroup || 'GridDD' @@ -705,7 +696,6 @@ if(vw < 20 || csize.height < 20){ // display: none? return; } - if(g.autoHeight){ this.scroller.dom.style.overflow = 'visible'; }else{ @@ -777,7 +767,7 @@ var cm = this.cm, ts = this.templates; var ct = ts.hcell; - var cb = [], p = {}; + var cb = [], sb = [], p = {}; for(var i = 0, len = cm.getColumnCount(); i < len; i++){ p.id = cm.getColumnId(i); @@ -831,7 +821,10 @@ * @param {Number} col The column index */ focusCell : function(row, col, hscroll){ - this.syncFocusEl(this.ensureVisible(row, col, hscroll)); + row = Math.min(row, Math.max(0, this.getRows().length-1)); + var xy = this.ensureVisible(row, col, hscroll); + this.focusEl.setXY(xy||this.scroller.getXY()); + if(Ext.isGecko){ this.focusEl.focus(); }else{ @@ -839,15 +832,16 @@ } }, - resolveCell : function(row, col, hscroll){ - if(typeof row != "number"){ + // private + ensureVisible : function(row, col, hscroll){ + if(typeof row != "number"){ row = row.rowIndex; } if(!this.ds){ - return null; + return; } if(row < 0 || row >= this.ds.getCount()){ - return null; + return; } col = (col !== undefined ? col : 0); @@ -858,37 +852,12 @@ } cellEl = this.getCell(row, col); } + if(!rowEl){ + return; + } - return {row: rowEl, cell: cellEl}; - }, + var c = this.scroller.dom; - getResolvedXY : function(resolved){ - if(!resolved){ - return null; - } - var s = this.scroller.dom, c = resolved.cell, r = resolved.row; - return c ? Ext.fly(c).getXY() : [s.scrollLeft+this.el.getX(), Ext.fly(r).getY()]; - }, - - syncFocusEl : function(row, col, hscroll){ - var xy = row; - if(!Ext.isArray(xy)){ - row = Math.min(row, Math.max(0, this.getRows().length-1)); - xy = this.getResolvedXY(this.resolveCell(row, col, hscroll)); - } - this.focusEl.setXY(xy||this.scroller.getXY()); - }, - - ensureVisible : function(row, col, hscroll){ - var resolved = this.resolveCell(row, col, hscroll); - if(!resolved || !resolved.row){ - return; - } - - var rowEl = resolved.row, cellEl = resolved.cell; - - var c = this.scroller.dom; - var ctop = 0; var p = rowEl, stop = this.el.dom; while(p && p != stop){ @@ -903,7 +872,7 @@ var stop = parseInt(c.scrollTop, 10); var sbot = stop + ch; - if(ctop < stop){ + if(ctop < stop){ c.scrollTop = ctop; }else if(cbot > sbot){ c.scrollTop = cbot-ch; @@ -921,7 +890,7 @@ c.scrollLeft = cright-c.clientWidth; } } - return this.getResolvedXY(resolved); + return cellEl ? Ext.fly(cellEl).getXY() : [c.scrollLeft+this.el.getX(), Ext.fly(rowEl).getY()]; }, // private @@ -944,7 +913,7 @@ this.processRows(firstRow); } } - this.syncFocusEl(firstRow); + this.focusRow(firstRow); }, // private @@ -991,7 +960,7 @@ // private fitColumns : function(preventRefresh, onlyExpand, omitColumn){ - var cm = this.cm, i; + var cm = this.cm, leftOver, dist, i; var tw = cm.getTotalWidth(false); var aw = this.grid.getGridEl().getWidth(true)-this.scrollOffset; @@ -1117,6 +1086,7 @@ }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); @@ -1171,13 +1141,15 @@ // private destroy : function(){ if(this.colMenu){ + this.colMenu.removeAll(); Ext.menu.MenuMgr.unregister(this.colMenu); - this.colMenu.destroy(); + this.colMenu.getEl().remove(); delete this.colMenu; } if(this.hmenu){ + this.hmenu.removeAll(); Ext.menu.MenuMgr.unregister(this.hmenu); - this.hmenu.destroy(); + this.hmenu.getEl().remove(); delete this.hmenu; } if(this.grid.enableColumnMove){ @@ -1201,16 +1173,11 @@ } } + Ext.destroy(this.resizeMarker, this.resizeProxy); + if(this.dragZone){ this.dragZone.unreg(); } - - Ext.fly(this.innerHd).removeAllListeners(); - Ext.removeNode(this.innerHd); - - Ext.destroy(this.resizeMarker, this.resizeProxy, this.focusEl, this.mainBody, - this.scroller, this.mainHd, this.mainWrap, this.dragZone, - this.splitone, this.columnDrag, this.columnDrop); this.initData(null, null); Ext.EventManager.removeResizeListener(this.onWindowResize, this); @@ -1280,13 +1247,13 @@ onDataChange : function(){ this.refresh(); this.updateHeaderSortState(); - this.syncFocusEl(0); + this.focusRow(0); }, // private onClear : function(){ this.refresh(); - this.syncFocusEl(0); + this.focusRow(0); }, // private @@ -1352,10 +1319,16 @@ // 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 @@ -1378,7 +1351,7 @@ // private onRowOut : function(e, t){ var row; - if((row = this.findRowIndex(t)) !== false && !e.within(this.getRow(row), true)){ + if((row = this.findRowIndex(t)) !== false && row !== this.findRowIndex(e.getRelatedTarget())){ this.removeRowClass(row, "x-grid3-row-over"); } }, @@ -1425,7 +1398,6 @@ this.updateAllColumnWidths(); }else{ this.updateColumnWidth(i, w); - this.syncHeaderScroll(); } this.grid.fireEvent("columnresize", i, w); @@ -1592,7 +1564,7 @@ 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]; + var exy = e.getXY(), ex = exy[0], ey = exy[1]; var w = t.offsetWidth, adjust = false; if((ex - x) <= this.hw){ adjust = -1; Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GroupingView.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GroupingView.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/GroupingView.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.grid.GroupingView * @extends Ext.grid.GridView Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/PropertyGrid.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/PropertyGrid.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/PropertyGrid.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowNumberer.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowNumberer.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowNumberer.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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 Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowSelectionModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowSelectionModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/grid/RowSelectionModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** @class Ext.grid.RowSelectionModel * @extends Ext.grid.AbstractSelectionModel Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AbsoluteLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AbsoluteLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AbsoluteLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.AbsoluteLayout * @extends Ext.layout.AnchorLayout @@ -24,15 +32,7 @@ }, onLayout : function(ct, target){ - if(this.isForm){ - ct.body.position(); - this.paddingLeft = ct.body.getPadding('r'); - this.paddingTop = ct.body.getPadding('t'); - } else { - target.position(); - this.paddingLeft = target.getPadding('r'); - this.paddingTop = target.getPadding('t'); - } + if(this.isForm){ ct.body.position(); } else { target.position(); } Ext.layout.AbsoluteLayout.superclass.onLayout.call(this, ct, target); }, @@ -48,12 +48,12 @@ // private adjustWidthAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[0] + this.paddingLeft : value; + return value ? value - comp.getPosition(true)[0] : value; }, // private adjustHeightAnchor : function(value, comp){ - return value ? value - comp.getPosition(true)[1] + this.paddingTop : value; + return value ? value - comp.getPosition(true)[1] : value; } /** * @property activeItem Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AccordionLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AccordionLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AccordionLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.Accordion * @extends Ext.layout.FitLayout @@ -53,8 +61,6 @@ /** * @cfg {Boolean} autoWidth * True to set each contained item's width to 'auto', false to use the item's current width (defaults to true). - * Note that some components, in particular the {@link Ext.grid.GridPanel grid}, will not function properly within - * layouts if they have auto width, so in such cases this config should be set to false. */ autoWidth : true, /** @@ -114,7 +120,7 @@ } if(!this.activeItem && !c.collapsed){ this.activeItem = c; - }else if(this.activeItem && this.activeItem != c){ + }else if(this.activeItem){ c.collapsed = true; } Ext.layout.Accordion.superclass.renderItem.apply(this, arguments); @@ -159,18 +165,6 @@ size.height -= hh; item.setSize(size); } - }, - - /** - * Sets the active (expanded) item in the layout. - * @param {String/Number} item The string component id or numeric index of the item to activate - */ - setActiveItem : function(item){ - item = this.container.getComponent(item); - this.activeItem = item; - if(item){ - item.expand(); - } } }); Ext.Container.LAYOUTS['accordion'] = Ext.layout.Accordion; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AnchorLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AnchorLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/AnchorLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.AnchorLayout * @extends Ext.layout.ContainerLayout Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/BorderLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/BorderLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/BorderLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.BorderLayout * @extends Ext.layout.ContainerLayout @@ -94,7 +102,7 @@ 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 && Ext.layout.BorderLayout.WARN !== false){ + if(!c){ throw 'No center region defined in BorderLayout ' + ct.id; } @@ -139,21 +147,22 @@ centerW -= totalWidth; e.applyLayout(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) - }; - c.applyLayout(centerBox); - } + + 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){ // workaround IE strict repainting issue target.repaint(); } @@ -163,12 +172,8 @@ var r = ['north', 'south', 'east', 'west']; for (var i = 0; i < r.length; i++) { var region = this[r[i]]; - if(region){ - if(region.destroy){ - region.destroy(); - }else if (region.split){ - region.split.destroy(true); - } + if (region && region.split) { + region.split.destroy(true); } } Ext.layout.BorderLayout.superclass.destroy.call(this); @@ -288,7 +293,6 @@ defaultNSCMargins : {left:5,top:5,right:5,bottom:5}, // private defaultEWCMargins : {left:5,top:0,right:5,bottom:0}, - floatingZIndex: 100, /** * True if this region is collapsed. Read-only. @@ -438,7 +442,7 @@ } c.hide(); c.dom.style.visibility = 'hidden'; - this.panel.el.setStyle('z-index', this.floatingZIndex); + this.panel.el.setStyle('z-index', 100); }, // private @@ -613,7 +617,7 @@ } this.restoreLT = [this.el.dom.style.left, this.el.dom.style.top]; this.el.alignTo(this.collapsedEl, this.getCollapseAnchor()); - this.el.setStyle("z-index", this.floatingZIndex+2); + this.el.setStyle("z-index", 102); if(this.animFloat !== false){ this.beforeSlide(); this.el.slideIn(this.getSlideAnchor(), { @@ -968,15 +972,6 @@ */ getSplitBar : function(){ return this.split; - }, - - // inherit docs - destroy : function() { - Ext.destroy( - this.miniSplitEl, - this.split, - this.splitEl - ); } }); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/CardLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/CardLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/CardLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.CardLayout * @extends Ext.layout.FitLayout Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ColumnLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ColumnLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ColumnLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.ColumnLayout * @extends Ext.layout.ContainerLayout Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ContainerLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ContainerLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/ContainerLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.ContainerLayout * Every layout is composed of one or more {@link Ext.Container} elements internally, and ContainerLayout provides @@ -153,11 +161,6 @@ }; }, - /* - * Destroys this layout. This is a template method that is empty by default, but should be implemented - * by subclasses that require explicit destruction to purge event handlers or remove DOM nodes. - * @protected - */ destroy : Ext.emptyFn }; Ext.Container.LAYOUTS['auto'] = Ext.layout.ContainerLayout; \ No newline at end of file Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FitLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FitLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FitLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.FitLayout * @extends Ext.layout.ContainerLayout Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FormLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FormLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/FormLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.FormLayout * @extends Ext.layout.AnchorLayout @@ -92,6 +100,14 @@ */ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { /** + * @cfg {String} labelStyle + * A CSS style specification string to add to each field label in this layout (defaults to ''). + */ + /** + * @cfg {String} elementStyle + * A CSS style specification string to add to each field element in this layout (defaults to ''). + */ + /** * @cfg {String} labelSeparator * The standard separator to display after the text of each form label (defaults to a colon ':'). To turn off * separators for all fields in this layout by default specify empty string '' (if the labelSeparator value is @@ -173,7 +189,7 @@ // private adjustWidthAnchor : function(value, comp){ - return value - (comp.isFormField || comp.fieldLabel ? (comp.hideLabel ? 0 : this.labelAdjust) : 0); + return value - (comp.isFormField ? (comp.hideLabel ? 0 : this.labelAdjust) : 0); }, // private Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/TableLayout.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/TableLayout.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/layout/TableLayout.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.layout.TableLayout * @extends Ext.layout.ContainerLayout Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ColumnResizer.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ColumnResizer.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ColumnResizer.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.ListView.ColumnResizer = Ext.extend(Ext.util.Observable, { minPct: .05, constructor: function(config){ Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ListView.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ListView.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/list/ListView.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.ListView = Ext.extend(Ext.DataView, { itemSelector: 'dl', selectedClass:'x-list-selected', Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/list/Sorter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/list/Sorter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/list/Sorter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.ListView.Sorter = Ext.extend(Ext.util.Observable, { /** * The CSS classes applied to a header when it is sorted. (defaults to ["sort-asc", "sort-desc"]) Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Adapter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Adapter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Adapter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.Adapter * @extends Ext.menu.BaseItem Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/BaseItem.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/BaseItem.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/BaseItem.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.BaseItem * @extends Ext.Component @@ -67,9 +75,9 @@ */ hideOnClick : true, /** - * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100) + * @cfg {Number} hideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100) */ - clickHideDelay : 1, + hideDelay : 100, // private ctype: "Ext.menu.BaseItem", @@ -86,7 +94,7 @@ */ this.parentMenu = parentMenu; Ext.menu.BaseItem.superclass.render.call(this, container); - this.container.menuItemId = this.itemId || this.id; + this.container.menuItemId = this.id; }, // private @@ -144,7 +152,7 @@ // private handleClick : function(e){ if(this.hideOnClick){ - this.parentMenu.hide.defer(this.clickHideDelay, this.parentMenu, [true]); + this.parentMenu.hide.defer(this.hideDelay, this.parentMenu, [true]); } }, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/CheckItem.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/CheckItem.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/CheckItem.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.CheckItem * @extends Ext.menu.Item Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorItem.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorItem.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorItem.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.ColorItem * @extends Ext.menu.Adapter Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorMenu.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorMenu.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/ColorMenu.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.ColorMenu * @extends Ext.menu.Menu Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateItem.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateItem.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateItem.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.DateItem * @extends Ext.menu.Adapter Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateMenu.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateMenu.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/DateMenu.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.DateMenu * @extends Ext.menu.Menu Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Item.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Item.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Item.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.Item * @extends Ext.menu.BaseItem Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Menu.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Menu.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Menu.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.Menu * @extends Ext.util.Observable @@ -87,7 +95,7 @@ * @type Ext.util.MixedCollection */ - this.items = new Ext.util.MixedCollection(false, Ext.Container.prototype.getComponentId); + this.items = new Ext.util.MixedCollection(); if(mis){ this.add.apply(this, mis); } @@ -144,7 +152,7 @@ shadow:this.shadow, constrain: false, parentEl: this.parentEl || document.body, - zindex: this.zIndex || 15000 + zindex:15000 }); }, @@ -505,7 +513,7 @@ * @param {Ext.menu.Item} item The menu item to remove */ remove : function(item){ - this.items.remove(item); + this.items.removeKey(item.id); item.destroy(); }, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/MenuMgr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/MenuMgr.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/MenuMgr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * 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. Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Separator.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Separator.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/Separator.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.Separator * @extends Ext.menu.BaseItem Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/TextItem.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/TextItem.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/menu/TextItem.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.menu.TextItem * @extends Ext.menu.BaseItem Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTip.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTip.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTip.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.QuickTip * @extends Ext.ToolTip Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTips.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTips.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/QuickTips.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.QuickTips * <p>Provides attractive and customizable tooltips for any element. The QuickTips Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/Tip.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/Tip.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/Tip.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.Tip * @extends Ext.Panel @@ -53,8 +61,6 @@ floating:{shadow:true,shim:true,useDisplay:true,constrain:false}, autoHeight:true, - closeAction: 'hide', - // private initComponent : function(){ Ext.Tip.superclass.initComponent.call(this); @@ -69,7 +75,7 @@ if(this.closable){ this.addTool({ id: 'close', - handler: this[this.closeAction], + handler: this.hide, scope: this }); } Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/ToolTip.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/ToolTip.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tips/ToolTip.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.ToolTip * @extends Ext.Tip Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/AsyncTreeNode.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/AsyncTreeNode.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/AsyncTreeNode.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.AsyncTreeNode * @extends Ext.tree.TreeNode Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDragZone.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDragZone.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDragZone.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeDragZone * @extends Ext.dd.DragZone Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDropZone.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDropZone.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeDropZone.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeDropZone * @extends Ext.dd.DropZone Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEditor.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEditor.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEditor.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeEditor * @extends Ext.Editor Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEventModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEventModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeEventModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + Ext.tree.TreeEventModel = function(tree){ this.tree = tree; this.tree.on('render', this.initEvents, this); @@ -62,10 +70,6 @@ if(!this.beforeEvent(e)){ return; } - if(Ext.isGecko && !this.trackingDoc){ // prevent hanging in FF - Ext.getBody().on('mouseover', this.trackExit, this); - this.trackingDoc = true; - } if(this.lastEcOver){ // prevent hung highlight this.onIconOut(e, this.lastEcOver); delete this.lastEcOver; @@ -79,15 +83,6 @@ } }, - trackExit : function(e){ - if(this.lastOverNode && !e.within(this.lastOverNode.ui.getEl())){ - this.onNodeOut(e, this.lastOverNode); - delete this.lastOverNode; - Ext.getBody().un('mouseover', this.trackExit, this); - this.trackingDoc = false; - } - }, - delegateClick : function(e, t){ if(!this.beforeEvent(e)){ return; @@ -121,7 +116,6 @@ }, onNodeOver : function(e, node){ - this.lastOverNode = node; node.ui.onOver(e); }, Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeFilter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeFilter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeFilter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeFilter * Note this class is experimental and doesn't update the indent (lines) or expand collapse icons of the nodes Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeLoader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeLoader.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeLoader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeLoader * @extends Ext.util.Observable Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNode.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNode.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNode.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeNode * @extends Ext.data.Node @@ -396,7 +404,7 @@ */ ensureVisible : function(callback){ var tree = this.getOwnerTree(); - tree.expandPath(this.parentNode ? this.parentNode.getPath() : this.getPath(), false, function(){ + tree.expandPath(this.parentNode.getPath(), false, function(){ var node = tree.getNodeById(this.id); // Somehow if we don't do this, we lose changes that happened to node in the meantime tree.getTreeEl().scrollChildIntoView(node.ui.anchor); Ext.callback(callback); Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNodeUI.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNodeUI.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeNodeUI.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeNodeUI * This class provides the default UI implementation for Ext TreeNodes. Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreePanel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreePanel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreePanel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreePanel * <p>The TreePanel provides tree-structured UI representation of tree-structured data.</p> Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSelectionModel.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSelectionModel.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSelectionModel.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.DefaultSelectionModel * @extends Ext.util.Observable Modified: mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSorter.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSorter.js 2008-11-21 14:33:19 UTC (rev 31) +++ mickael/trunk/ext/v3.0.0-a1/source/widgets/tree/TreeSorter.js 2008-12-01 20:55:57 UTC (rev 32) @@ -6,6 +6,14 @@ * http://extjs.com/license */ +/* + * Ext JS Library 3.0 Pre-alpha + * Copyright(c) 2006-2008, Ext JS, LLC. + * licensing@xxxxxxxxx + * + * http://extjs.com/license + */ + /** * @class Ext.tree.TreeSorter * Provides sorting of nodes in a {@link Ext.tree.TreePanel}. The TreeSorter automatically monitors events on the Added: mickael/trunk/ext/v3.0.0-a1/src/adapter/ext-base.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/adapter/ext-base.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/adapter/ext-base.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,2177 @@ +(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.isStrict && !Ext.isOpera){ + return document.body.clientWidth; + } + else if(Ext.isIE){ + return document.documentElement.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]); + } + }; + + Ext.lib.Event = function() { + var loadComplete = false; + var listeners = []; + var unloadListeners = []; + var retryCount = 0; + var onAvailStack = []; + + 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; + } + + var li = [el, eventName, fn, fn]; + + var index = listeners.length; + listeners[index] = li; + + this.doAdd(el, eventName, fn, 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) { + 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) { + 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(); + + + +/* + * 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.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){ + if (!hs || !hs['Content-Type']){ + this.initHeader('Content-Type', 'text/xml', false); + } + method = (method ? method : (options.method ? options.method : 'POST')); + data = options.xmlData; + }else if(options.jsonData){ + if (!hs || !hs['Content-Type']){ + this.initHeader('Content-Type', 'application/json', false); + } + method = (method ? method : (options.method ? options.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) { + 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; charset=UTF-8', + + 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.hasHeaders || !this.headers['Content-Type'])){ + 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 (Ext.isArray(x)) { + 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) { + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Scroll); + }, + + motion : function(el, args, duration, easing, cb, scope) { + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); + }, + + color : function(el, args, duration, easing, cb, scope) { + return 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 && !Ext.isArray(control[0])) { + control = [control]; + } else { + var tmp = []; + for (i = 0,len = control.length; i < len; ++i) { + tmp[i] = control[i]; + } + control = tmp; + } + + Ext.fly(el, '_anim').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 Added: mickael/trunk/ext/v3.0.0-a1/src/adapter/jquery-bridge.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/adapter/jquery-bridge.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/adapter/jquery-bridge.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,533 @@ +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){ + var hs = options.headers; + if(options.xmlData){ + o.data = options.xmlData; + o.processData = false; + o.type = (method ? method : (options.method ? options.method : 'POST')); + if (!hs || !hs['Content-Type']){ + 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 = (method ? method : (options.method ? options.method : 'POST')); + if (!hs || !hs['Content-Type']){ + o.contentType = 'application/json'; + } + } + if(hs){ + o.beforeSend = function(xhr){ + 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).serialize()+(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).serialize(); + } + }; +}(); + +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 (Ext.isArray(x)) { + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/adapter/prototype-bridge.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/adapter/prototype-bridge.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/adapter/prototype-bridge.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,540 @@ +(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){ + var hs = options.headers; + if(hs){ + o.requestHeaders = hs; + } + if(options.xmlData){ + method = (method ? method : (options.method ? options.method : 'POST')); + if (!hs || !hs['Content-Type']){ + o.contentType = 'text/xml'; + } + o.postBody = options.xmlData; + delete o.parameters; + } + if(options.jsonData){ + method = (method ? method : (options.method ? options.method : 'POST')); + if (!hs || !hs['Content-Type']){ + o.contentType = 'application/json'; + } + 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 (Ext.isArray(x)) { + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/adapter/yui-bridge.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/adapter/yui-bridge.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/adapter/yui-bridge.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,334 @@ +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){ + if (!hs || !hs['Content-Type']){ + CN.initHeader('Content-Type', 'text/xml', false); + } + method = (method ? method : (options.method ? options.method : 'POST')); + data = options.xmlData; + }else if(options.jsonData){ + if (!hs || !hs['Content-Type']){ + CN.initHeader('Content-Type', 'application/json', false); + } + method = (method ? method : (options.method ? options.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 Added: mickael/trunk/ext/v3.0.0-a1/src/core/CompositeElement.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/CompositeElement.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/CompositeElement.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,363 @@ +/** + * @class Ext.CompositeElement + * Standard 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> + */ +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 <i>this</i> 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 + * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection. + * @return Boolean + */ + contains : function(el){ + return this.indexOf(el) !== -1; + }, + + /** + * Find the index of the passed element within the composite collection. + * @param el {Mixed} The id of an element, or an Ext.Element, or an HtmlElement to find within the composite collection. + * @return Number The index of the passed Ext.Element in the composite collection, or -1 if not found. + */ + 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(Ext.isArray(el)){ + 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. + <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> + */ +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(Ext.isArray(els)){ + 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. <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> + * @param {Function} fn The function to call + * @param {Object} scope (optional) The <i>this</i> 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 Added: mickael/trunk/ext/v3.0.0-a1/src/core/DomHelper.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/DomHelper.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/DomHelper.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,411 @@ +/** + * @class Ext.DomHelper + * Utility 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 dh = Ext.DomHelper; +var list = dh.append('my-div', { + id: 'my-ul', 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> + * <p>Element creation specification parameters in this class may also be passed as an Array of + * specification objects. This can be used to insert multiple sibling nodes into an existing + * container very efficiently. For example, to add more list items to the example above:<pre><code> +dh.append('my-ul', [ + {tag: 'li', id: 'item5', html: 'List Item 5'}, + {tag: 'li', id: 'item6', html: 'List Item 6'} ]); +</code></pre></p> + * <p>Element creation specification parameters may also be strings. If {@link useDom} is false, then the string is used + * as innerHTML. If {@link useDom} is true, a string specification results in the creation of a text node.</p> + * 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>. + * @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 + var createHtml = function(o){ + if(typeof o == 'string'){ + return o; + } + var b = ""; + if (Ext.isArray(o)) { + for (var i = 0, l = o.length; i < l; i++) { + b += createHtml(o[i]); + } + return 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){ + b += createHtml(cn); + } else if(o.html){ + b += o.html; + } + b += "</" + o.tag + ">"; + } + return b; + }; + + // build as dom + /** @ignore */ + var createDom = function(o, parentNode){ + var el; + if (Ext.isArray(o)) { // Allow Arrays of siblings to be inserted + el = document.createDocumentFragment(); // in one shot using a DocumentFragment + for(var i = 0, l = o.length; i < l; i++) { + createDom(o[i], el); + } + } else if (typeof o == "string") { // Allow a string as a child spec. + el = document.createTextNode(o); + } else { + el = document.createElement(o.tag||'div'); + var useSet = !!el.setAttribute; // 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){ + createDom(cn, el); + } else 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 = '<table>', + te = '</table>', + tbs = ts+'<tbody>', + tbe = '</tbody>'+te, + trs = tbs + '<tr>', + tre = '</tr>'+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); + } + }; +}(); Added: mickael/trunk/ext/v3.0.0-a1/src/core/DomQuery.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/DomQuery.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/DomQuery.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,806 @@ +/* + * 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). +<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> + * @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 + * @return {String} + */ + 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. Returns the defaultValue, or 0 if none is specified. + * @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 = Ext.isArray(el); + 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 <i>c</i>= where <i>c</i> 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; Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.alignment.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.alignment.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.alignment.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,297 @@ +Ext.Element.addMethods({ + /** + * 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 = Ext.lib.Dom.getViewWidth(); h = Ext.lib.Dom.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]]; + }, + + /** + * 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; + }, + + /** + * 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(); + // 10px of margin for ie + var dw = Ext.lib.Dom.getViewWidth()-10, dh = Ext.lib.Dom.getViewHeight()-10; + + //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]; + }, + + /** + * 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> + * @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; + }, + + // 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; + }; + }() +}); Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.dd.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.dd.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.dd.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,37 @@ +Ext.Element.addMethods({ + /** + * 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); + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.insertion.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.insertion.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.insertion.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,128 @@ +Ext.Element.addMethods({ + /** + * 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; + }, + + /** + * 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 before which this element will be inserted + * @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 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 && !el.dom){ // 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(Ext.isArray(el)){ + 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 && !el.dom){ // 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; + }, + + /** + * 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 && !el.dom){ // dh config + el = this.insertSibling(el, 'before'); + }else{ + el = Ext.getDom(el); + this.dom.parentNode.insertBefore(el, this.dom); + } + El.uncache(this.id); + Ext.removeNode(this.dom); + this.dom = el; + this.id = Ext.id(el); + El.cache[this.id] = this; + return this; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,2391 @@ +/** + * @class Ext.Element + * Represents an Element in the DOM.<br><br> + * Usage:<br> +<pre><code> +// by id +var el = Ext.get("my-div"); + +// by DOM element reference +var el = Ext.get(myDivElement); +</code></pre> + * <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 {@link Ext.Fx} 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 {@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; + }, + + /** + * 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); + }, + + /** + * 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. + * @param {Number} defer (optional) Milliseconds to defer the focus + * @return {Ext.Element} this + */ + focus : function(defer) { + try{ + if(typeof defer == 'number'){ + this.focus.defer(defer, this); + }else{ + 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(Ext.isArray(className)){ + 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(Ext.isArray(className)){ + 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(this.isBorderBox()){ + w -= this.getFrameWidth('lr'); + } + } + if(s.height && s.height != 'auto'){ + h = parseInt(s.height, 10); + if(this.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 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. This function is passed + * the following parameters:<ul> + * <li>evt : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li> + * <li>t : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event. + * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li> + * <li>o : Object<div class="sub-desc">The options object from the addListener call.</div></li> + * </ul> + * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults + * to this Element. + * @param {Object} options (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 {@link Ext.util.DelayedTask} 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 {@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:<br> + * <br> + * A normalized, delayed, one-time listener that auto stops the event and adds a custom argument (forumId) to the + * options object. The options object is available as the third parameter in the handler function.<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> + * <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> + * <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> + * <p> + * Or a shorthand syntax:<br> + * Code:<pre><code> +el.on({ + 'click' : this.onClick, + 'mouseover' : this.onMouseOver, + 'mouseout' : this.onMouseOut, + scope: this +});</code></pre></p> + */ + 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: + * <pre><code> +el.removeListener('click', this.handlerFn); +// or +el.un('click', this.handlerFn); +</code></pre> + * @param {String} eventName the type of event to remove + * @param {Function} fn the method the event invokes + * @param {Object} scope (optional) The scope (The <tt>this</tt> reference) of the handler function. Defaults + * to this Element. + * @return {Ext.Element} this + */ + removeListener : function(eventName, fn, scope){ + Ext.EventManager.removeListener(this.dom, eventName, fn, scope || this); + return this; + }, + + /** + * Removes all previous added listeners from this element + * @return {Ext.Element} this + */ + removeAllListeners : function(){ + Ext.EventManager.removeAll(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"); + } + } + }, + + // private + setOverflow : function(v){ + if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug + this.dom.style.overflow = 'hidden'; + (function(){this.dom.style.overflow = 'auto';}).defer(1, this); + }else{ + this.dom.style.overflow = v; + } + }, + + /** + * 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" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "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; + }, + + // private + adjustForConstraints : function(xy, parent, offsets){ + return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; + }, + + /** + * 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 += '<span id="' + id + '"></span>'; + + E.onAvailable(id, function(){ + var hd = document.getElementsByTagName("head")[0]; + var re = /(?:<script([^>]*)?>)((\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(/(?:<script.*?>)((\n|\r|.)*?)(?:<\/script>)/ig, ""); + return this; + }, + + /** + * Direct access to the Updater {@link Ext.Updater#update} method. The method takes the same object + * parameter as {@link Ext.Updater#update} + * @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 && this.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.addClass("x-masked-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", "x-masked-relative"]); + }, + + /** + * 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 = '0'; + 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 + * @return {Ext.Element} this + */ + addClassOnOver : function(className){ + 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(Ext.isArray(eventName)){ + 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; + }, + + /** + * 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); + }, + + /** + * 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; + }, + + /** + * Inserts an html fragment into this element + * @param {String} where Where to insert the html in relation to this element - beforeBegin, afterBegin, beforeEnd, afterEnd. + * @param {String} html The HTML fragment + * @param {Boolean} returnEl (optional) True to return an Ext.Element (defaults to false) + * @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; + }, + + /** + * 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 (optional) The page y, required if x is not an array + * @return {Object} An object with left and top properties. e.g. {left: (value), top: (value)} + */ + translatePoints : function(x, y){ + if(typeof x == 'object' || Ext.isArray(x)){ + 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: + * <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> + * @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('<div class="{0}">'+El.boxMarkup+'</div>', 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]; + } +}; + +var ep = El.prototype; + +El.addMethods = function(o){ + Ext.apply(ep, o); +}; + +/** + * 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; + +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 = '<div class="{0}-tl"><div class="{0}-tr"><div class="{0}-tc"></div></div></div><div class="{0}-ml"><div class="{0}-mr"><div class="{0}-mc"></div></div></div><div class="{0}-bl"><div class="{0}-br"><div class="{0}-bc"></div></div></div>'; +/** + * 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 Ext.Element objects. + * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method + * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by + * its ID, use {@link Ext.ComponentMgr#get}.</p> + * <p>Uses simple caching to consistently return the same object. + * Automatically fixes if an object was recreated with the same id via AJAX or DOM.</p> + * @param {Mixed} el The id of the node, a DOM Node or an existing Element. + * @return {Element} The {@link Ext.Element 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(Ext.isArray(el)){ + 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){ + Ext.EventManager.removeAll(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]; +}; + +/** + * Retrieves Ext.Element objects. + * <p><b>This method does not retrieve {@link Ext.Component Component}s.</b> This method + * retrieves Ext.Element objects which encapsulate DOM elements. To retrieve a Component by + * its ID, use {@link Ext.ComponentMgr#get}.</p> + * <p>Uses simple caching to consistently return the same object. + * Automatically fixes if an object was recreated with the same id via AJAX or DOM.</p> + * Shorthand of {@link Ext.Element#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; +}); +})(); Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.keys.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.keys.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.keys.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,39 @@ +Ext.Element.addMethods({ + /** + * 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" || Ext.isArray(key)){ + 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); + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.legacy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.legacy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.legacy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,33 @@ +Ext.Element.addMethods({ + /** + * 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; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/core/Element.scroll.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Element.scroll.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Element.scroll.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,133 @@ +Ext.Element.addMethods({ + /** + * Scrolls this element into view within the passed container. + * @param {Mixed} container (optional) The container element to scroll (defaults to document.body). Should be a + * string (id), dom node, or Ext.Element. + * @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); + }, + + /** + * 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){ + 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" (or "left"), "r" (or "right"), "t" (or "top", or "up"), "b" (or "bottom", or "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; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/core/EventManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/EventManager.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/EventManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,938 @@ +/** + * @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; + // fix parser confusion + var xname = 'Ex' + 't'; + + var elHash = {}; + + var addListener = function(el, ename, fn, wrap, scope){ + var id = Ext.id(el); + if(!elHash[id]){ + elHash[id] = {}; + } + var es = elHash[id]; + if(!es[ename]){ + es[ename] = []; + } + var ls = es[ename]; + ls.push({ + id: id, + ename: ename, + fn: fn, + wrap: wrap, + scope: scope + }); + + E.on(el, ename, wrap); + + if(ename == "mousewheel" && el.addEventListener){ // workaround for jQuery + el.addEventListener("DOMMouseScroll", wrap, false); + E.on(window, 'unload', function(){ + el.removeEventListener("DOMMouseScroll", wrap, false); + }); + } + if(ename == "mousedown" && el == document){ // fix stopped mousedowns on the document + Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); + } + } + + var removeListener = function(el, ename, fn, scope){ + el = Ext.getDom(el); + + var id = Ext.id(el), es = elHash[id], wrap; + if(es){ + var ls = es[ename], l; + if(ls){ + for(var i = 0, len = ls.length; i < len; i++){ + l = ls[i]; + if(l.fn == fn && (!scope || l.scope == scope)){ + wrap = l.wrap; + E.un(el, ename, wrap); + ls.splice(i, 1); + break; + } + } + } + } + if(ename == "mousewheel" && el.addEventListener && wrap){ + el.removeEventListener("DOMMouseScroll", wrap, false); + } + if(ename == "mousedown" && el == document && wrap){ // fix stopped mousedowns on the document + Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); + } + } + + var removeAll = function(el){ + el = Ext.getDom(el); + var id = Ext.id(el), es = elHash[id], ls; + if(es){ + for(var ename in es){ + if(es.hasOwnProperty(ename)){ + ls = es[ename]; + for(var i = 0, len = ls.length; i < len; i++){ + E.un(el, ename, ls[i].wrap); + ls[i] = null; + } + } + es[ename] = null; + } + delete elHash[id]; + } + } + + + 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("<s"+'cript id="ie-deferred-loader" defer="defer" src="/'+'/:"></s'+"cript>"); + 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, scope){ + return function(e){ + Ext.EventManager.removeListener(el, ename, fn, scope); + 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 createTargeted = function(h, o){ + return function(){ + if(o.target == Ext.EventObject.setEvent(arguments[0]).target){ + h.apply(this, Array.prototype.slice.call(arguments, 0)); + } + }; + }; + + 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){ + // prevent errors while unload occurring + if(!window[xname]){ + return; + } + 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.target){ + h = createTargeted(h, o); + } + if(o.delay){ + h = createDelayed(h, o); + } + if(o.single){ + h = createSingle(h, el, ename, fn, scope); + } + if(o.buffer){ + h = createBuffered(h, o); + } + + addListener(el, ename, fn, h, scope); + return h; + }; + + 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 This function is passed + * the following parameters:<ul> + * <li>evt : EventObject<div class="sub-desc">The {@link Ext.EventObject EventObject} describing the event.</div></li> + * <li>t : Element<div class="sub-desc">The {@link Ext.Element Element} which was the target of the event. + * Note that this may be filtered by using the <tt>delegate</tt> option.</div></li> + * <li>o : Object<div class="sub-desc">The options object from the addListener call.</div></li> + * </ul> + * @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:<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 {@link Ext.util.DelayedTask} 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> + * <li>target {Element} : Only call the handler if the event was fired on the target Element, <i>not</i> + * if the event was bubbled up from a child node.</li> + * </ul><br> + * <p>See {@link Ext.Element#addListener} for examples of how to use these options.</p> + */ + 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 + */ + removeListener : function(element, eventName, fn, scope){ + return removeListener(element, eventName, fn, scope); + }, + + /** + * Removes all event handers from an element. Typically you will use {@link Ext.Element#removeAllListeners} + * 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 + */ + removeAll : function(element){ + return removeAll(element); + }, + + /** + * 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(); + } + options = options || {}; + if(!options.delay){ + options.delay = 1; + } + docReadyEvent.addListener(fn, scope, options); + }, + + // private + doResizeEvent: function(){ + resizeEvent.fire(D.getViewWidth(), D.getViewHeight()); + }, + + /** + * 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(this.doResizeEvent); + 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} options (optional) An object containing standard {@link #addListener} options + * @member Ext + * @method onReady + */ +Ext.onReady = Ext.EventManager.onDocumentReady; + + +// Initialize doc classes +(function(){ + var initExtCss = function(){ + // find the body element + var bd = document.body || document.getElementsByTagName('body')[0]; + if(!bd){ return false; } + var cls = [' ', + Ext.isIE ? "ext-ie " + (Ext.isIE6 ? 'ext-ie6' : (Ext.isIE7 ? 'ext-ie7' : 'ext-ie8')) + : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') + : Ext.isOpera ? "ext-opera" + : Ext.isSafari ? "ext-safari" + : Ext.isChrome ? "ext-chrome" : ""]; + + 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.parentNode; + if(p){ + p.className += ' ext-strict'; + } + } + bd.className += cls.join(' '); + return true; + } + + if(!initExtCss()){ + Ext.onReady(initExtCss); + } +})(); + +/** + * @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: + * <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> + * @singleton + */ +Ext.EventObject = function(){ + + var E = Ext.lib.Event; + + // safari keypress events for special keys return bad keycodes + var safariKeys = { + 3 : 13, // enter + 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 */ + NUM_CENTER: 12, + /** Key constant @type Number */ + ENTER: 13, + /** Key constant @type Number */ + RETURN: 13, + /** Key constant @type Number */ + SHIFT: 16, + /** Key constant @type Number */ + CTRL: 17, + CONTROL : 17, // legacy + /** Key constant @type Number */ + ALT: 18, + /** Key constant @type Number */ + PAUSE: 19, + /** Key constant @type Number */ + CAPS_LOCK: 20, + /** Key constant @type Number */ + ESC: 27, + /** Key constant @type Number */ + SPACE: 32, + /** Key constant @type Number */ + PAGE_UP: 33, + PAGEUP : 33, // legacy + /** Key constant @type Number */ + PAGE_DOWN: 34, + PAGEDOWN : 34, // legacy + /** 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 */ + PRINT_SCREEN: 44, + /** Key constant @type Number */ + INSERT: 45, + /** Key constant @type Number */ + DELETE: 46, + /** Key constant @type Number */ + ZERO: 48, + /** Key constant @type Number */ + ONE: 49, + /** Key constant @type Number */ + TWO: 50, + /** Key constant @type Number */ + THREE: 51, + /** Key constant @type Number */ + FOUR: 52, + /** Key constant @type Number */ + FIVE: 53, + /** Key constant @type Number */ + SIX: 54, + /** Key constant @type Number */ + SEVEN: 55, + /** Key constant @type Number */ + EIGHT: 56, + /** Key constant @type Number */ + NINE: 57, + /** Key constant @type Number */ + A: 65, + /** Key constant @type Number */ + B: 66, + /** Key constant @type Number */ + C: 67, + /** Key constant @type Number */ + D: 68, + /** Key constant @type Number */ + E: 69, + /** Key constant @type Number */ + F: 70, + /** Key constant @type Number */ + G: 71, + /** Key constant @type Number */ + H: 72, + /** Key constant @type Number */ + I: 73, + /** Key constant @type Number */ + J: 74, + /** Key constant @type Number */ + K: 75, + /** Key constant @type Number */ + L: 76, + /** Key constant @type Number */ + M: 77, + /** Key constant @type Number */ + N: 78, + /** Key constant @type Number */ + O: 79, + /** Key constant @type Number */ + P: 80, + /** Key constant @type Number */ + Q: 81, + /** Key constant @type Number */ + R: 82, + /** Key constant @type Number */ + S: 83, + /** Key constant @type Number */ + T: 84, + /** Key constant @type Number */ + U: 85, + /** Key constant @type Number */ + V: 86, + /** Key constant @type Number */ + W: 87, + /** Key constant @type Number */ + X: 88, + /** Key constant @type Number */ + Y: 89, + /** Key constant @type Number */ + Z: 90, + /** Key constant @type Number */ + CONTEXT_MENU: 93, + /** Key constant @type Number */ + NUM_ZERO: 96, + /** Key constant @type Number */ + NUM_ONE: 97, + /** Key constant @type Number */ + NUM_TWO: 98, + /** Key constant @type Number */ + NUM_THREE: 99, + /** Key constant @type Number */ + NUM_FOUR: 100, + /** Key constant @type Number */ + NUM_FIVE: 101, + /** Key constant @type Number */ + NUM_SIX: 102, + /** Key constant @type Number */ + NUM_SEVEN: 103, + /** Key constant @type Number */ + NUM_EIGHT: 104, + /** Key constant @type Number */ + NUM_NINE: 105, + /** Key constant @type Number */ + NUM_MULTIPLY: 106, + /** Key constant @type Number */ + NUM_PLUS: 107, + /** Key constant @type Number */ + NUM_MINUS: 109, + /** Key constant @type Number */ + NUM_PERIOD: 110, + /** Key constant @type Number */ + NUM_DIVISION: 111, + /** Key constant @type Number */ + F1: 112, + /** Key constant @type Number */ + F2: 113, + /** Key constant @type Number */ + F3: 114, + /** Key constant @type Number */ + F4: 115, + /** Key constant @type Number */ + F5: 116, + /** Key constant @type Number */ + F6: 117, + /** Key constant @type Number */ + F7: 118, + /** Key constant @type Number */ + F8: 119, + /** Key constant @type Number */ + F9: 120, + /** Key constant @type Number */ + F10: 121, + /** Key constant @type Number */ + F11: 122, + /** Key constant @type Number */ + F12: 123, + + /** @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 character 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){ + return selector ? Ext.fly(this.target).findParent(selector, maxDepth, returnEl) : (returnEl ? Ext.get(this.target) : 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 is a child of el. If the target is el, it returns false. + * Example usage:<pre><code> +// Handle click on any child of an element +Ext.getBody().on('click', function(e){ + if(e.within('some-el')){ + alert('Clicked on a child of some-el!'); + } +}); + +// Handle click directly on an element, ignoring clicks on child nodes +Ext.getBody().on('click', function(e,t){ + if((t.id == 'some-el') && !e.within(t, true)){ + alert('Clicked directly on some-el!'); + } +}); +</code></pre> + * @param {Mixed} el The id, DOM element or Ext.Element to check + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/core/Ext.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Ext.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Ext.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,1094 @@ + +Ext = {version: '3.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, + isChrome = ua.indexOf("chrome") > -1, + isSafari = !isChrome && (/webkit|khtml/).test(ua), + isSafari3 = isSafari && ua.indexOf('webkit/5') != -1, + isIE = !isOpera && ua.indexOf("msie") > -1, + isIE7 = !isOpera && ua.indexOf("msie 7") > -1, + isIE8 = !isOpera && ua.indexOf("msie 8") > -1, + isGecko = !isSafari && !isChrome && ua.indexOf("gecko") > -1, + isGecko3 = isGecko && ua.indexOf("rv:1.9") > -1, + isBorderBox = isIE && !isStrict, + isWindows = (ua.indexOf("windows") != -1 || ua.indexOf("win32") != -1), + isMac = (ua.indexOf("macintosh") != -1 || ua.indexOf("mac os x") != -1), + isAir = (ua.indexOf("adobeair") != -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 (standards-compliant) mode, as opposed to quirks 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. +<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> + * @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. + * * <p> + * This function also supports a 2-argument call in which the subclass's constructor is + * not passed as an argument. In this form, the parameters are as follows:</p><p> + * <div class="mdetail-params"><ul> + * <li><code>superclass</code> + * <div class="sub-desc">The class being extended</div></li> + * <li><code>overrides</code> + * <div class="sub-desc">A literal with members which are copied into the subclass's + * prototype, and are therefore shared among all instances of the new class.<p> + * This may contain a special member named <tt><b>constructor</b></tt>. This is used + * to define the constructor of the new class, and is returned. If this property is + * <i>not</i> specified, a constructor is generated and returned which just calls the + * superclass's constructor passing on its parameters.</p></div></li> + * </ul></div></p><p> + * For example, to create a subclass of the Ext GridPanel: + * <pre><code> + MyGridPanel = Ext.extend(Ext.grid.GridPanel, { + constructor: function(config) { + // Your preprocessing here + MyGridPanel.superclass.constructor.apply(this, arguments); + // Your postprocessing here + }, + + yourMethod: function() { + // etc. + } + }); +</code></pre> + * </p> + * @param {Function} subclass The class inheriting the functionality + * @param {Function} superclass The class being extended + * @param {Object} overrides (optional) A literal with members which are copied into the subclass's + * prototype, and are therefore shared between all instances of the new class. + * @return {Function} The subclass constructor. + * @method extend + */ + extend : function(){ + // inline overrides + var io = function(o){ + for(var m in o){ + this[m] = o[m]; + } + }; + var oc = Object.prototype.constructor; + + return function(sb, sp, overrides){ + if(typeof sp == 'object'){ + overrides = sp; + sp = sb; + sb = overrides.constructor != oc ? overrides.constructor : 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 == oc){ + spp.constructor=sp; + } + sb.override = function(o){ + Ext.override(sb, o); + }; + sbp.superclass = sbp.supr = (function(){ + return spp; + }); + sbp.override = io; + Ext.override(sb, overrides); + sb.extend = function(o){Ext.extend(sb, o);}; + return sb; + }; + }(), + + extendX : function(supr, fn){ + return Ext.extend(supr, fn(supr.prototype)); + }, + + /** + * Adds 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> + * @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: + * <pre><code> +Ext.namespace('Company', 'Company.data'); +Company.Widget = function() { ... } +Company.data.CustomStore = function(config) { ... } +</code></pre> + * @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<a.length; ++i) { + d=a[i].split("."); + rt = d[0]; + eval('if (typeof ' + rt + ' == "undefined"){' + rt + ' = {};} o = ' + rt + ';'); + for (j=1; j<d.length; ++j) { + o[d[j]]=o[d[j]] || {}; + o=o[d[j]]; + } + } + }, + + /** + * 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. + * @param {Object} o + * @return {String} + */ + urlEncode : function(o){ + if(!o){ + return ""; + } + var buf = []; + for(var key in o){ + var ov = o[key], k = encodeURIComponent(key); + var type = typeof ov; + if(type == 'undefined'){ + buf.push(k, "=&"); + }else if(type != "function" && type != "object"){ + buf.push(k, "=", encodeURIComponent(ov), "&"); + }else if(Ext.isArray(ov)){ + if (ov.length) { + for(var i = 0, len = ov.length; i < len; i++) { + buf.push(k, "=", encodeURIComponent(ov[i] === undefined ? '' : ov[i]), "&"); + } + } else { + buf.push(k, "=&"); + } + } + } + buf.pop(); + return buf.join(""); + }, + + /** + * 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]}. + * @param {String} string + * @param {Boolean} overwrite (optional) Items of the same name will overwrite previous values instead of creating an an array (Defaults to false). + * @return {Object} A literal with members + */ + urlDecode : function(string, overwrite){ + if(!string || !string.length){ + return {}; + } + var obj = {}; + var pairs = string.split('&'); + var pair, name, value; + for(var i = 0, len = pairs.length; i < len; i++){ + pair = pairs[i].split('='); + name = decodeURIComponent(pair[0]); + value = decodeURIComponent(pair[1]); + if(overwrite !== true){ + if(typeof obj[name] == "undefined"){ + obj[name] = value; + }else if(typeof obj[name] == "string"){ + obj[name] = [obj[name]]; + obj[name].push(value); + }else{ + obj[name].push(value); + } + }else{ + obj[name] = value; + } + } + return obj; + }, + + /** + * 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). + * @param {Array/NodeList/Mixed} array + * @param {Function} fn + * @param {Object} scope + */ + each : function(array, fn, scope){ + if(typeof array.length == "undefined" || typeof array == "string"){ + array = [array]; + } + for(var i = 0, len = array.length; i < len; i++){ + if(fn.call(scope || array[i], array[i], i, array) === false){ return i; }; + } + }, + + // deprecated + combine : function(){ + var as = arguments, l = as.length, r = []; + for(var i = 0; i < l; i++){ + var a = as[i]; + if(Ext.isArray(a)){ + r = r.concat(a); + }else if(a.length !== undefined && !a.substr){ + r = r.concat(Array.prototype.slice.call(a, 0)); + }else{ + r.push(a); + } + } + return r; + }, + + /** + * Escapes the passed string for use in a regular expression + * @param {String} str + * @return {String} + */ + escapeRe : function(s) { + return s.replace(/([.*+?^${}()|[\]\/\\])/g, "\\$1"); + }, + + // internal + callback : function(cb, scope, args, delay){ + if(typeof cb == "function"){ + if(delay){ + cb.defer(delay, scope, args || []); + }else{ + cb.apply(scope, args || []); + } + } + }, + + /** + * Return the dom node for the passed string (id), dom node, or Ext.Element + * @param {Mixed} el + * @return HTMLElement + */ + getDom : function(el){ + if(!el || !document){ + return null; + } + return el.dom ? el.dom : (typeof el == 'string' ? document.getElementById(el) : el); + }, + + /** + * Returns the current HTML document object as an {@link Ext.Element}. + * @return Ext.Element The document + */ + getDoc : function(){ + return Ext.get(document); + }, + + /** + * Returns the current document body as an {@link Ext.Element}. + * @return Ext.Element The document body + */ + getBody : function(){ + return Ext.get(document.body || document.documentElement); + }, + + /** + * Shorthand for {@link Ext.ComponentMgr#get} + * @param {String} id + * @return Ext.Component + */ + getCmp : function(id){ + return Ext.ComponentMgr.get(id); + }, + + /** + * Utility method for validating that a value is numeric, returning the specified default value if it is not. + * @param {Mixed} value Should be a number, but any type will be handled appropriately + * @param {Number} defaultValue The value to return if the original value is non-numeric + * @return {Number} Value, if numeric, else defaultValue + */ + num : function(v, defaultValue){ + if(typeof v != 'number' || isNaN(v)){ + return defaultValue; + } + return v; + }, + + /** + * Attempts 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 {@link Ext.Element} and {@link Ext.Component}, but any subclass of + * {@link Ext.util.Observable} can be passed in. Any number of elements and/or components can be + * passed into this function in a single call as separate arguments. + * @param {Mixed} arg1 An {@link Ext.Element} or {@link Ext.Component} to destroy + * @param {Mixed} arg2 (optional) + * @param {Mixed} etc... (optional) + */ + destroy : function(){ + for(var i = 0, a = arguments, len = a.length; i < len; i++) { + var as = a[i]; + if(as){ + if(typeof as.destroy == 'function'){ + as.destroy(); + } + else if(as.dom){ + as.removeAllListeners(); + as.remove(); + } + } + } + }, + + /** + * Attempts to destroy and then remove a set of named properties of the passed object. + * @param {Object} o The object (most likely a Component) who's properties you wish to destroy. + * @param {Mixed} arg1 The name of the property to destroy and remove from the object. + * @param {Mixed} etc... More property names to destroy and remove. + */ + destroyMembers : function(o, arg1, arg2, etc){ + for(var i = 1, a = arguments, len = a.length; i < len; i++) { + Ext.destroy(o[a[i]]); + delete o[a[i]]; + } + }, + + /** + * Removes a DOM node from the document. The body node will be ignored if passed in. + * @param {HTMLElement} node The node to remove + */ + removeNode : isIE ? function(){ + var d; + return function(n){ + if(n && n.tagName != 'BODY'){ + d = d || document.createElement('div'); + d.appendChild(n); + d.innerHTML = ''; + } + } + }() : function(n){ + if(n && n.parentNode && n.tagName != 'BODY'){ + n.parentNode.removeChild(n); + } + }, + + // inpired by a similar function in mootools library + /** + * 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> + * @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; + }, + + /** + * Returns true if the passed object is a JavaScript array, otherwise false. + * @param {Object} The object to test + * @return {Boolean} + */ + isArray : function(v){ + return v && typeof v.length == 'number' && typeof v.splice == 'function'; + }, + + /** + * Returns true if the passed object is a JavaScript date object, otherwise false. + * @param {Object} The object to test + * @return {Boolean} + */ + isDate : function(v){ + return v && typeof v.getFullYear == 'function'; + }, + + /** + * Copies a set of named properties fom the source object to the destination object. + * @param {Object} The destination object. + * @param {Object} The source object. + * @param {Array/String} Either an Array of property names, or a comma-delimited list + * of property names to copy. + * @return {Object} The modified object. + * <p>example:<pre><code> +ImageComponent = Ext.extend(Ext.BoxComponent, { + initComponent: function() { + this.autoEl = { tag: 'img' }; + MyComponent.superclass.initComponent.apply(this, arguments); + this.initialBox = Ext.copyTo({}, this.initialConfig, 'x,y,width,height'); + } +}); +</code></pre> + */ + copyTo: function(dest, source, names){ + if(typeof names == 'string'){ + names = names.split(/[,;\s]/); + } + for(var i = 0, len = names.length; i< len; i++){ + var n = names[i]; + if(source.hasOwnProperty(n)){ + dest[n] = source[n]; + } + } + return dest; + }, + + intercept : function(o, name, fn, scope){ + o[name] = o[name].createInterceptor(fn, scope); + }, + + sequence : function(o, name, fn, scope){ + o[name] = o[name].createSequence(fn, scope); + }, + + /** + * True if the detected browser is Opera. + * @type Boolean + */ + isOpera : isOpera, + /** + * True if the detected browser is Chrome. + * @type Boolean + */ + isChrome : isChrome, + /** + * True if the detected browser is Safari. + * @type Boolean + */ + isSafari : isSafari, + /** + * True if the detected browser is Safari 3.x. + * @type Boolean + */ + isSafari3 : isSafari3, + /** + * True if the detected browser is Safari 2.x. + * @type Boolean + */ + isSafari2 : isSafari && !isSafari3, + /** + * True if the detected browser is Internet Explorer. + * @type Boolean + */ + isIE : isIE, + /** + * True if the detected browser is Internet Explorer 6.x. + * @type Boolean + */ + isIE6 : isIE && !isIE7 && !isIE8, + /** + * True if the detected browser is Internet Explorer 7.x. + * @type Boolean + */ + isIE7 : isIE7, + /** + * True if the detected browser is Internet Explorer 8.x. + * @type Boolean + */ + isIE8 : isIE8, + /** + * True if the detected browser uses the Gecko layout engine (e.g. Mozilla, Firefox). + * @type Boolean + */ + isGecko : isGecko, + /** + * True if the detected browser uses a pre-Gecko 1.9 layout engine (e.g. Firefox 2.x). + * @type Boolean + */ + isGecko2 : isGecko && !isGecko3, + /** + * True if the detected browser uses a Gecko 1.9+ layout engine (e.g. Firefox 3.x). + * @type Boolean + */ + isGecko3 : isGecko3, + /** + * True if the detected browser is Internet Explorer running in non-strict mode. + * @type Boolean + */ + isBorderBox : isBorderBox, + /** + * True if the detected platform is Linux. + * @type Boolean + */ + isLinux : isLinux, + /** + * True if the detected platform is Windows. + * @type Boolean + */ + isWindows : isWindows, + /** + * True if the detected platform is Mac OS. + * @type Boolean + */ + isMac : isMac, + /** + * True if the detected platform is Adobe Air. + * @type Boolean + */ + isAir : isAir, + + /** + * 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) || (isMac && isGecko && !isGecko3)) + }); + + // 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", "Ext.chart", "Ext.direct"); + + +/** + * @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: <code>myFunction.createCallback(arg1, arg2)</code> + * Will create a function that is bound to those 2 args. <b>If a specific scope is required in the + * callback, use {@link #createDelegate} instead.</b> The function returned by createCallback always + * executes in the window scope. + * <p>This method is required when you want to pass arguments to a callback function. If no arguments + * are needed, you can simply pass a reference to the function as a callback (e.g., callback: myFn). + * However, if you tried to pass a function with arguments (e.g., callback: myFn(arg1, arg2)) the function + * would simply execute immediately when the code is parsed. Example usage: + * <pre><code> +var sayHi = function(name){ + alert('Hi, ' + name); +} + +// clicking the button alerts "Hi, Fred" +new Ext.Button({ + text: 'Say Hi', + renderTo: Ext.getBody(), + handler: sayHi.createCallback('Fred') +}); +</code></pre> + * @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: <code>this.myFunction.createDelegate(this, [arg1, arg2])</code> + * Will create a function that is automatically scoped to obj so that the <tt>this</tt> variable inside the + * callback points to obj. Example usage: + * <pre><code> +var sayHi = function(name){ + // Note this use of "this.text" here. This function expects to + // execute within a scope that contains a text property. In this + // example, the "this" variable is pointing to the btn object that + // was passed in createDelegate below. + alert('Hi, ' + name + '. You clicked the "' + this.text + '" button.'); +} + +var btn = new Ext.Button({ + text: 'Say Hi', + renderTo: Ext.getBody() +}); + +// This callback will execute in the scope of the +// button instance. Clicking the button alerts +// "Hi, Fred. You clicked the "Say Hi" button." +btn.on('click', sayHi.createDelegate(btn, ['Fred'])); +</code></pre> + * @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, optionally in a specific scope. Example usage: + * <pre><code> +var sayHi = function(name){ + alert('Hi, ' + name); +} + +// executes immediately: +sayHi('Fred'); + +// executes after 2 seconds: +sayHi.defer(2000, this, ['Fred']); + +// this syntax is sometimes useful for deferring +// execution of an anonymous function: +(function(){ + alert('Anonymous'); +}).defer(100); +</code></pre> + * @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. Example usage: + * <pre><code> +var sayHi = function(name){ + alert('Hi, ' + name); +} + +sayHi('Fred'); // alerts "Hi, Fred" + +var sayGoodbye = sayHi.createSequence(function(name){ + alert('Bye, ' + name); +}); + +sayGoodbye('Fred'); // both alerts show +</code></pre> + * @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. Example usage: + * <pre><code> +var sayHi = function(name){ + alert('Hi, ' + name); +} + +sayHi('Fred'); // alerts "Hi, Fred" + +// create a new function that validates input without +// directly modifying the original function: +var sayHiToFriend = sayHi.createInterceptor(function(name){ + return name == 'Brian'; +}); + +sayHiToFriend('Fred'); // no alert +sayHiToFriend('Brian'); // alerts "Hi, Brian" +</code></pre> + * @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: + * <pre><code> +var s = String.leftPad('123', 5, '0'); +// s now contains the string: '00123' +</code></pre> + * @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) { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result.toString(); + }, + + /** + * 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> + * @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. + * <pre><code> +// alternate sort directions +sort = sort.toggle('ASC', 'DESC'); + +// instead of conditional logic: +sort = (sort == 'ASC' ? 'DESC' : 'ASC'); +</code></pre> + * @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: + * <pre><code> +var s = ' foo bar '; +alert('-' + s + '-'); //alerts "- foo bar -" +alert('-' + s.trim() + '-'); //alerts "-foo bar-" +</code></pre> + * @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; + } +}); + +// here to prevent dependency on Date.js +/** + 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()); +}; Added: mickael/trunk/ext/v3.0.0-a1/src/core/Fx.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Fx.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Fx.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,1012 @@ + +//Notifies Element that fx methods are available +Ext.enableFx = true; + +/** + * @class Ext.Fx + * <p>A class to provide basic animation and visual effects support. <b>Note:</b> 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 <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> + * + * @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. The Element being operated upon is passed as the first parameter. + * @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 <i>display</i> CSS property instead of <i>visibility</i> 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: + *<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> + * @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: + *<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> + * @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: + *<pre><code> +// default +el.puff(); + +// common config options shown with default values +el.puff({ + easing: 'easeOut', + duration: .5, + remove: false, + useDisplay: false +}); +</code></pre> + * @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: + *<pre><code> +// default +el.switchOff(); + +// all config options shown with default values +el.switchOff({ + easing: 'easeIn', + duration: .3, + remove: false, + useDisplay: false +}); +</code></pre> + * @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: +<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> + * @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: +<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> + * @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: +<pre><code> +el.pause(1); +</code></pre> + * @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: +<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> + * @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: +<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> + * @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(){ + var to = o.endOpacity || 0; + arguments.callee.anim = this.fxanim({opacity:{to:to}}, + o, null, .5, "easeOut", function(){ + if(to === 0){ + 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: +<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> + * @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: +<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> + * @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(o.left !== undefined){ + a.left = {to: o.left}; + } + if(o.top !== undefined){ + a.top = {to: o.top}; + } + if(o.right !== undefined){ + a.right = {to: o.right}; + } + if(o.bottom !== undefined){ + a.bottom = {to: o.bottom}; + } + 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: + *<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> + * @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.Element.addMethods(Ext.Fx); Added: mickael/trunk/ext/v3.0.0-a1/src/core/Template.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/Template.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/Template.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,231 @@ +/** +* @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}.<br /> +* Usage: +<pre><code> +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'}); +</code></pre> +* @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(Ext.isArray(html)){ + 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} + * 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 + * @member Ext.Template + * @method apply + */ +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; + +/** + * Creates a template from the passed element's value (<i>display:none</i> 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 Added: mickael/trunk/ext/v3.0.0-a1/src/core/UpdateManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/core/UpdateManager.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/core/UpdateManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,514 @@ +/** + * @class Ext.Updater + * @extends Ext.util.Observable + * Provides AJAX-style update capabilities for Element objects. Updater can be used to {@link #update} an Element once, + * or you can use {@link #startAutoRefresh} to set up an auto-updating Element on a specific interval.<br><br> + * Usage:<br> + * <pre><code> + * // 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"); + * <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: "param1=foo&param2=bar", + text: "Loading Foo..." + * }); + * </code></pre> + * @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 = Ext.extend(Ext.util.Observable, { + constructor: 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" + ); + + Ext.apply(this, Ext.Updater.defaults); + /** + * Blank page URL to use with SSL file uploads (defaults to {@link Ext.Updater.defaults#sslBlankUrl}). + * @property sslBlankUrl + * @type String + */ + /** + * Whether to append unique parameter on get request to disable caching (defaults to {@link Ext.Updater.defaults#disableCaching}). + * @property disableCaching + * @type Boolean + */ + /** + * Text for loading indicator (defaults to {@link Ext.Updater.defaults#indicatorText}). + * @property indicatorText + * @type String + */ + /** + * Whether to show indicatorText when loading (defaults to {@link Ext.Updater.defaults#showLoadIndicator}). + * @property showLoadIndicator + * @type String + */ + /** + * Timeout for requests or form posts in seconds (defaults to {@link Ext.Updater.defaults#timeout}). + * @property timeout + * @type Number + */ + /** + * True to process scripts in the output (defaults to {@link Ext.Updater.defaults#loadScripts}). + * @property loadScripts + * @type Boolean + */ + + /** + * Transaction object of the current executing transaction, or null if there is no active transaction. + */ + this.transaction = 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 = this.getDefaultRenderer(); + } + Ext.Updater.superclass.constructor.call(this); + }, + /** + * This is an overrideable method which returns a reference to a default + * renderer class if none is specified when creating the Ext.Updater. + * Defaults to {@link Ext.Updater.BasicRenderer} + */ + getDefaultRenderer: function() { + return new Ext.Updater.BasicRenderer(); + }, + /** + * Get the Element this Updater is bound to + * @return {Ext.Element} The element + */ + getEl : function(){ + return this.el; + }, + + /** + * Performs an <b>asynchronous</b> request, updating this element with the response. + * If params are specified it uses POST, otherwise it uses GET.<br><br> + * <b>Note:</b> Due to the asynchronous nature of remote server requests, the Element + * will not have been fully updated when the function returns. To post-process the returned + * data, use the callback option, or an <b><tt>update</tt></b> event handler. + * @param {Object} options A config object containing any of the following options:<ul> + * <li>url : <b>String/Function</b><p class="sub-desc">The URL to request or a function which + * <i>returns</i> the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).</p></li> + * <li>method : <b>String</b><p class="sub-desc">The HTTP method to + * use. Defaults to POST if the <tt>params</tt> argument is present, otherwise GET.</p></li> + * <li>params : <b>String/Object/Function</b><p class="sub-desc">The + * parameters to pass to the server (defaults to none). These may be specified as a url-encoded + * string, or as an object containing properties which represent parameters, + * or as a function, which returns such an object.</p></li> + * <li>scripts : <b>Boolean</b><p class="sub-desc">If <tt>true</tt> + * any <script> tags embedded in the response text will be extracted + * and executed (defaults to {@link Ext.Updater.defaults#loadScripts}). If this option is specified, + * the callback will be called <i>after</i> the execution of the scripts.</p></li> + * <li>callback : <b>Function</b><p class="sub-desc">A function to + * be called when the response from the server arrives. The following + * parameters are passed:<ul> + * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li> + * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li> + * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li> + * <li><b>options</b> : Object<p class="sub-desc">The config object passed to the update call.</p></li></ul> + * </p></li> + * <li>scope : <b>Object</b><p class="sub-desc">The scope in which + * to execute the callback (The callback's <tt>this</tt> reference.) If the + * <tt>params</tt> argument is a function, this scope is used for that function also.</p></li> + * <li>discardUrl : <b>Boolean</b><p class="sub-desc">By default, the URL of this request becomes + * the default URL for this Updater object, and will be subsequently used in {@link #refresh} + * calls. To bypass this behavior, pass <tt>discardUrl:true</tt> (defaults to false).</p></li> + * <li>timeout : <b>Number</b><p class="sub-desc">The number of seconds to wait for a response before + * timing out (defaults to {@link Ext.Updater.defaults#timeout}).</p></li> + * <li>text : <b>String</b><p class="sub-desc">The text to use as the innerHTML of the + * {@link Ext.Updater.defaults#indicatorText} div (defaults to 'Loading...'). To replace the entire div, not + * just the text, override {@link Ext.Updater.defaults#indicatorText} directly.</p></li> + * <li>nocache : <b>Boolean</b><p class="sub-desc">Only needed for GET + * requests, this option causes an extra, auto-generated parameter to be appended to the request + * to defeat caching (defaults to {@link Ext.Updater.defaults#disableCaching}).</p></li></ul> + * <p> + * For example: +<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: true, + nocache: true, + text: "Loading...", + timeout: 60, + scripts: false // Save time by avoiding RegExp execution. +}); +</code></pre> + */ + update : function(url, params, callback, discardUrl){ + if(this.fireEvent("beforeupdate", this.el, url, params) !== false){ + var 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.nocache != "undefined"){this.disableCaching = cfg.nocache;}; + if(typeof cfg.text != "undefined"){this.indicatorText = '<div class="loading-indicator">'+cfg.text+"</div>";}; + 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); + } + + var o = Ext.apply({}, { + 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), + disableCaching: this.disableCaching, + argument: { + "options": cfg, + "url": url, + "form": null, + "callback": callback, + "scope": callerScope || window, + "params": params + } + }, cfg); + + 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:<ul> + * <li><b>el</b> : Ext.Element<p class="sub-desc">The Element being updated.</p></li> + * <li><b>success</b> : Boolean<p class="sub-desc">True for success, false for failure.</p></li> + * <li><b>response</b> : XMLHttpRequest<p class="sub-desc">The XMLHttpRequest which processed the update.</p></li></ul> + */ + 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. Can be canceled by calling {@link #stopAutoRefresh}. + * @param {Number} interval How often to update (in seconds). + * @param {String/Object/Function} url (optional) The url for this request, a config object in the same format + * supported by {@link #load}, or a function to call to get the url (defaults to the last used url). Note that while + * the url used in a load call can be reused by this method, other load config options will not be reused and must be + * sepcified as part of a config object passed as this paramter if needed. + * @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; + } + }, + + /** + * Returns true if the Updater is currently set to auto refresh its content (see {@link #startAutoRefresh}), otherwise false. + */ + isAutoRefreshing : function(){ + return this.autoRefreshProcId ? true : false; + }, + + /** + * Display the element's "loading" state. By default, the element is updated with {@link #indicatorText}. This + * method may be overridden to perform a custom action while this Updater is actively updating its contents. + */ + showLoading : function(){ + if(this.showLoadIndicator){ + this.el.update(this.indicatorText); + } + }, + + // 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); + } + }, + + // private + 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); + } + }, + + /** + * Sets 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; + }, + + /** + * Returns the current content renderer for this Updater. See {@link Ext.Updater.BasicRenderer#render} for more details. + * @return {Object} + */ + getRenderer : function(){ + return this.renderer; + }, + + /** + * Sets the default URL 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 currently executing transaction, if any. + */ + abort : function(){ + if(this.transaction){ + Ext.Ajax.abort(this.transaction); + } + }, + + /** + * Returns true if an update is in progress, otherwise false. + * @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 to 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 {@link Ext#SSL_SECURE_URL} if set, or "javascript:false"). + * @type String + */ + sslBlankUrl : (Ext.SSL_SECURE_URL || "javascript:false"), + /** + * True to append a unique parameter to GET requests to disable caching (defaults to false). + * @type Boolean + */ + disableCaching : false, + /** + * Whether or not to show {@link #indicatorText} during loading (defaults to true). + * @type Boolean + */ + showLoadIndicator : true, + /** + * Text for loading indicator (defaults to '<div class="loading-indicator">Loading...</div>'). + * @type String + */ + indicatorText : '<div class="loading-indicator">Loading...</div>' + }; + +/** + * Static convenience method. <b>This method is deprecated in favor of el.load({url:'foo.php', ...})</b>. + * Usage: + * <pre><code>Ext.Updater.updateElement("my-div", "stuff.php");</code></pre> + * @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); +}; +/** + * @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; Added: mickael/trunk/ext/v3.0.0-a1/src/data/ArrayReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/ArrayReader.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/ArrayReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,86 @@ +/** + * @class Ext.data.ArrayReader + * @extends Ext.data.JsonReader + * Data reader class to create an Array of {@link 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> + * @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 Array. + * @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){ + this.arrayData = o; + var s = this.meta; + var sid = s ? (s.idIndex || s.id) : null; + var recordType = this.recordType, fields = recordType.prototype.fields; + var records = []; + + if(!this.getRoot){ + this.getRoot = s.root ? this.getJsonAccessor(s.root) : function(p){return p;}; + if(s.totalProperty) { + this.getTotal = this.getJsonAccessor(s.totalProperty); + } + } + + var root = this.getRoot(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, n); + values[f.name] = v; + } + var record = new recordType(values, id); + record.json = n; + records[records.length] = record; + } + + var totalRecords = records.length; + + if(s.totalProperty){ + var v = parseInt(this.getTotal(o), 10); + if(!isNaN(v)){ + totalRecords = v; + } + } + + return { + records : records, + totalRecords : totalRecords + }; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/Connection.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/Connection.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/Connection.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,509 @@ +/** + * @class Ext.data.Connection + * @extends Ext.util.Observable + * <p>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.</p> + * <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 {@link #request} call. + * To process returned data, use a + * <a href="#request-option-success" ext:member="request-option-success" ext:cls="Ext.data.Connection">success callback</a> + * in the request options object, + * or an {@link #requestcomplete event listener}.</p> + * <p><h3>File Uploads</h3><a href="#request-option-isUpload" ext:member="request-option-isUpload" ext:cls="Ext.data.Connection">File uploads</a> are not performed using normal "Ajax" techniques, that + * is they are <b>not</b> performed using XMLHttpRequests. Instead the form is submitted in the standard + * manner with the DOM <tt><form></tt> element temporarily modified to have its + * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer + * to a dynamically generated, hidden <tt><iframe></tt> which is inserted into the document + * but removed after the return data has been gathered.</p> + * <p>The server response is parsed by the browser to create the document for the IFRAME. If the + * server is using JSON to send the return object, then the + * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header + * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p> + * <p>Characters which are significant to an HTML parser must be sent as HTML entities, so encode + * "<" as "&lt;", "&" as "&amp;" etc.</p> + * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object + * is created containing a <tt>responseText</tt> property in order to conform to the + * requirements of event handlers and callbacks.</p> + * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a> + * and some server technologies (notably JEE) may require some custom processing in order to + * retrieve parameter names and parameter values from the packet content.</p> + * @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 <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a> + * 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 <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html">HTTP Status Code Definitions</a> + * for details of HTTP status codes. + * @param {Connection} conn This Connection object. + * @param {Object} response The XHR object containing the response data. + * See <a href="http://www.w3.org/TR/XMLHttpRequest/">The XMLHttpRequest Object</a> + * 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 {@link #request} params are present, POST will be used; + * otherwise, GET will be used.) + */ + /** + * @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, + + /** + * @cfg {String} disableCachingParam (Optional) Change the parameter which is sent went disabling caching + * through a cache buster. Defaults to '_dc' + * @type String + */ + disableCachingParam: '_dc', + + /** + * <p>Sends an HTTP request to a remote server.</p> + * <p><b>Important:</b> Ajax server requests are asynchronous, and this call will + * return before the response has been received. Process any returned data + * in a callback function.</p> + * <p>To execute a callback function in the correct scope, use the <tt>scope</tt> option.</p> + * @param {Object} options An object which may contain the following properties:<ul> + * <li><b>url</b> : String/Function (Optional)<div class="sub-desc">The URL to + * which to send the request, or a function to call which returns a URL string. The scope of the + * function is specified by the <tt>scope</tt> option. Defaults to configured URL.</div></li> + * <li><b>params</b> : Object/String/Function (Optional)<div class="sub-desc"> + * An object containing properties which are used as parameters to the + * request, a url encoded string or a function to call to get either. The scope of the function + * is specified by the <tt>scope</tt> option.</div></li> + * <li><b>method</b> : String (Optional)<div class="sub-desc">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. Note that + * the method name is case-sensitive and should be all caps.</div></li> + * <li><b>callback</b> : Function (Optional)<div class="sub-desc">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><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li> + * <li><b>success</b> : Boolean<div class="sub-desc">True if the request succeeded.</div></li> + * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data. + * See <a href="http://www.w3.org/TR/XMLHttpRequest/">http://www.w3.org/TR/XMLHttpRequest/</a> for details about + * accessing elements of the response.</div></li> + * </ul></div></li> + * <li><a id="request-option-success"></a><b>success</b> : Function (Optional)<div class="sub-desc">The function + * to be called upon success of the request. The callback is passed the following + * parameters:<ul> + * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li> + * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li> + * </ul></div></li> + * <li><b>failure</b> : Function (Optional)<div class="sub-desc">The function + * to be called upon failure of the request. The callback is passed the + * following parameters:<ul> + * <li><b>response</b> : Object<div class="sub-desc">The XMLHttpRequest object containing the response data.</div></li> + * <li><b>options</b> : Object<div class="sub-desc">The parameter to the request call.</div></li> + * </ul></div></li> + * <li><b>scope</b> : Object (Optional)<div class="sub-desc">The scope in + * which to execute the callbacks: The "this" object for the callback function. If the <tt>url</tt>, or <tt>params</tt> options were + * specified as functions from which to draw values, then this also serves as the scope for those function calls. + * Defaults to the browser window.</div></li> + * <li><b>form</b> : Element/HTMLElement/String (Optional)<div class="sub-desc">The <tt><form></tt> + * Element or the id of the <tt><form></tt> to pull parameters from.</div></li> + * <li><a id="request-option-isUpload"></a><b>isUpload</b> : Boolean (Optional)<div class="sub-desc"><b>Only meaningful when used + * with the <tt>form</tt> option</b>. + * <p>True if the form object is a file upload (will be set automatically if the form was + * configured with <b><tt>enctype</tt></b> "multipart/form-data").</p> + * <p>File uploads are not performed using normal "Ajax" techniques, that is they are <b>not</b> + * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the + * DOM <tt><form></tt> element temporarily modified to have its + * <a href="http://www.w3.org/TR/REC-html40/present/frames.html#adef-target">target</a> set to refer + * to a dynamically generated, hidden <tt><iframe></tt> which is inserted into the document + * but removed after the return data has been gathered.</p> + * <p>The server response is parsed by the browser to create the document for the IFRAME. If the + * server is using JSON to send the return object, then the + * <a href="http://www.w3.org/Protocols/rfc2616/rfc2616-sec14.html#sec14.17">Content-Type</a> header + * must be set to "text/html" in order to tell the browser to insert the text unchanged into the document body.</p> + * <p>The response text is retrieved from the document, and a fake XMLHttpRequest object + * is created containing a <tt>responseText</tt> property in order to conform to the + * requirements of event handlers and callbacks.</p> + * <p>Be aware that file upload packets are sent with the content type <a href="http://www.faqs.org/rfcs/rfc2388.html">multipart/form</a> + * and some server technologies (notably JEE) may require some custom processing in order to + * retrieve parameter names and parameter values from the packet content.</p> + * </div></li> + * <li><b>headers</b> : Object (Optional)<div class="sub-desc">Request + * headers to set for the request.</div></li> + * <li><b>xmlData</b> : Object (Optional)<div class="sub-desc">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.</div></li> + * <li><b>jsonData</b> : Object/String (Optional)<div class="sub-desc">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.</div></li> + * <li><b>disableCaching</b> : Boolean (Optional)<div class="sub-desc">True + * to add a unique cache-buster param to GET requests.</div></li> + * </ul></p> + * <p>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.</p> + * @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 : o.timeout || this.timeout + }; + + var method = o.method||this.method||((p || o.xmlData || o.jsonData) ? "POST" : "GET"); + + if(method == 'GET' && (this.disableCaching && o.disableCaching !== false) || o.disableCaching === true){ + var dcp = o.disableCachingParam || this.disableCachingParam; + url += (url.indexOf('?') != -1 ? '&' : '?') + dcp + '=' + (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' || o.xmlData || o.jsonData) && p){ + 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){ + var fc = doc.body.firstChild; + if(fc && String(fc.tagName).toLowerCase() == 'textarea'){ // json response wrapped in textarea + r.responseText = fc.value; + }else{ + 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]); + + if(!this.debugUploads){ + 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: + * <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> + * @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. Note that this is case-sensitive and should be all caps (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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/DataField.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/DataField.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/DataField.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,99 @@ +// 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(Ext.isDate(v)){ + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/DataProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/DataProxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/DataProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,35 @@ +/** + * @class Ext.data.DataProxy + * @extends Ext.util.Observable + * This 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 + * {@link Ext.data.Records} to an {@link Ext.data.Store}.<br> + * <p> + * 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 + * @param {Object} params The params object passed to the {@link #load} function + */ + 'beforeload', + /** + * @event load + * Fires before the load method's callback is called. + * @param {Object} this + * @param {Object} o The data object + * @param {Object} arg The callback's arg object passed to the {@link #load} function + */ + 'load' + ); + Ext.data.DataProxy.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.DataProxy, Ext.util.Observable); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/DataReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/DataReader.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/DataReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,27 @@ +/** + * @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 = Ext.isArray(recordType) ? + Ext.data.Record.create(recordType) : recordType; +}; + +Ext.data.DataReader.prototype = { + +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/DirectProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/DirectProxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/DirectProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,52 @@ +Ext.data.DirectProxy = function(config){ + Ext.apply(this, config); + if(typeof this.paramOrder == 'string'){ + this.paramOrder = this.paramOrder.split(/[\s,|]/); + } + Ext.data.DirectProxy.superclass.constructor.call(this); +}; + +Ext.extend(Ext.data.DirectProxy, Ext.data.DataProxy, { + + paramOrder: undefined, + paramsAsHash: true, + directFn: undefined, + + load: function(params, reader, cb, scope, arg){ + if(this.fireEvent("beforeload", this, params) !== false) { + var args = []; + if(this.paramOrder){ + for(var i = 0, len = this.paramOrder.length; i < len; i++){ + args.push(params[this.paramOrder[i]]); + } + }else if(this.paramsAsHash){ + args.push(params); + } + args.push({ + callback: function(result, e){ + if(!e.status){ + this.fireEvent("loadexception", this, e, result); + cb.call(scope, null, arg, false); + return; + } + var rs; + try { + rs = reader.readRecords(result); + }catch(ex){ + this.fireEvent("loadexception", this, e, result, ex); + cb.call(scope, null, arg, false); + return; + } + this.fireEvent("load", this, e, arg); + cb.call(scope, rs, arg, true); + }, + + scope: this + }); + + this.directFn.apply(window, args); + } else { + cb.call(scope || this, null, arg, false); + } + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/DirectStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/DirectStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/DirectStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,8 @@ +Ext.data.DirectStore = function(c){ + var pcfg = Ext.copyTo({}, c, 'paramOrder,paramsAsHash,directFn'); + Ext.data.DirectStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: new Ext.data.DirectProxy(pcfg), + reader: new Ext.data.JsonReader(c, c.fields) + })); +}; +Ext.extend(Ext.data.DirectStore, Ext.data.Store); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/GroupingStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/GroupingStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/GroupingStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,108 @@ +/** + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/HttpProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/HttpProxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/HttpProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,135 @@ +/** + * @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.<br> + * <p> + * <b>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> + * <p> + * For cross-domain access to remote data, use a {@link Ext.data.ScriptTagProxy ScriptTagProxy}.</b><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". + * @constructor + * @param {Object} conn an {@link Ext.data.Connection} object, or options parameter to {@link Ext.Ajax#request}. + * <p>Note that if this HttpProxy is being used by a (@link Ext.data.Store Store}, then the Store's call to + * {@link #load} will override any specified <tt>callback</tt> and <tt>params</tt> options. In this + * case, use the Store's {@link Ext.data.Store#events events} to modify parameters, or react to loading events. + * The Store's {@link Ext.data.Store#baseParams baseParams} may also be used to pass parameters known at + * instantiation time.</p> + * <p>If an options parameter is passed, the singleton {@link Ext.Ajax} object will be used to make the request.</p> + */ +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; + + /** + * @event loadexception + * Fires if an exception occurs in the Proxy during data loading. This event can be fired for one of two reasons: + * <ul><li><b>The load call returned success: false.</b> This means the server logic returned a failure + * status and there is no data to read. In this case, this event will be raised and the + * fourth parameter (read error) will be null.</li> + * <li><b>The load succeeded but the reader could not read the response.</b> This means the server returned + * data, but the configured Reader threw an error while reading the data. In this case, this event will be + * raised and the caught error will be passed along as the fourth parameter of this event.</li></ul> + * Note that this event is also relayed through {@link Ext.data.Store}, so you can listen for it directly + * on any Store instance. + * @param {Object} this + * @param {Object} options The loading options that were specified (see {@link #load} for details) + * @param {Object} response The XMLHttpRequest object containing the response data + * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data. + * If the load call returned success: false, this parameter will be null. + */ +}; + +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 <ul> + * <li>The Record block object</li> + * <li>The "arg" argument from the load function</li> + * <li>A boolean success indicator</li> + * </ul> + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/JsonReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/JsonReader.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/JsonReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,217 @@ +/** + * @class Ext.data.JsonReader + * @extends Ext.data.DataReader + * Data reader class to create an Array of {@link Ext.data.Record} objects from a JSON response + * based on mappings in a provided {@link Ext.data.Record} constructor.<br> + * <p> + * Example code: + * <pre><code> +var Employee = Ext.data.Record.create([ + {name: 'firstname'}, // Map the Record's "firstname" field to the row object's key of the same name + {name: 'job', mapping: 'occupation'} // Map the "job" field to the row object's "occupation" key +]); +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 object of the form: + * <pre><code> +{ + results: 2, + rows: [ + { id: 1, firstname: 'Bill', occupation: 'Gardener' }, // a row object + { id: 2, firstname: 'Ben' , occupation: 'Horticulturalist' } // another row object + ] +} +</code></pre> + * <p>It is possible to change a JsonReader's metadata at any time by including a + * <b><tt>metaData</tt></b> 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.</p> + * <p>The <b><tt>metaData</tt></b> property may contain any of the configuration + * options for this class. Additionally, it may contain a <b><tt>fields</tt></b> + * property which the JsonReader will use as an argument to {@link Ext.data.Record#create} + * to configure the layout of the Records which it will produce.<p> + * Using the <b><tt>metaData</tt></b> 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 <b><tt>metaData</tt></b> property (which + * may contain any user-defined properties needed) and the <b><tt>metaData.fields</tt></b> + * property to perform any configuration required.</p> + * <p>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:</p><pre><code> +var myReader = new Ext.data.JsonReader(); +</code></pre> + * <p>The first data packet from the server would configure the reader by + * containing a metaData property as well as the data:</p><pre><code> +{ + 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' } + ] +} +</code></pre> + * @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 <b><tt>metaData</tt></b> 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"}; + } + 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; + 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); + } + 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 || s.idProperty) { + var g = this.getJsonAccessor(s.id || s.idProperty); + 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, n); + } + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/JsonStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/JsonStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/JsonStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,49 @@ +/** + * @class Ext.data.JsonStore + * @extends Ext.data.Store + * Small helper class to make creating Stores for remotely-loaded JSON data easier. JsonStore is pre-configured + * with a built-in {@link Ext.data.HttpProxy} and {@link Ext.data.JsonReader}. If you require some other proxy/reader + * combination then you'll have to create a basic {@link Ext.data.Store} configured as needed.<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> + * This would consume a returned object of the form: +<pre><code> +{ + 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)} + ] +} +</code></pre> + * An object literal of this form could also be used as the {@link #data} config option. + * <b>Note: Although they are not listed, this class inherits all of the config options of Store, + * JsonReader.</b> + * @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 by 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){ + /** + * @cfg {Ext.data.DataReader} reader @hide + */ + /** + * @cfg {Ext.data.DataProxy} proxy @hide + */ + Ext.data.JsonStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: 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.reg('jsonstore', Ext.data.JsonStore); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/MemoryProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/MemoryProxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/MemoryProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,59 @@ +/** + * @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, { + /** + * @event loadexception + * Fires if an exception occurs in the Proxy during data loading. Note that this event is also relayed + * through {@link Ext.data.Store}, so you can listen for it directly on any Store instance. + * @param {Object} this + * @param {Object} arg The callback's arg object passed to the {@link #load} function + * @param {Object} null This parameter does not apply and will always be null for MemoryProxy + * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data + */ + + /** + * 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 <ul> + * <li>The Record block object</li> + * <li>The "arg" argument from the load function</li> + * <li>A boolean success indicator</li> + * </ul> + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/Record.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/Record.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/Record.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,284 @@ +/** +* @class Ext.data.Record + * Instances of this class encapsulate both Record <em>definition</em> information, and Record + * <em>value</em> 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.<br> + * <p> + * 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.<br> + * <p> + * 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 object, the properties of which provide values for the new Record's fields. + * @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: <ul> + * <li><b>name</b> : String<div class="sub-desc">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 {@link Ext.grid.ColumnModel}</div></li> + * <li><b>mapping</b> : String<div class="sub-desc">(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.</div></li> + * <li><b>type</b> : String<div class="sub-desc">(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></div></li> + * <li><b>sortType</b> : Mixed<div class="sub-desc">(Optional) A member of {@link Ext.data.SortTypes}.</div></li> + * <li><b>sortDir</b> : String<div class="sub-desc">(Optional) Initial direction to sort. "ASC" or "DESC"</div></li> + * <li><b>convert</b> : Function<div class="sub-desc">(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<div class="sub-desc">The data value as read by the Reader.</div></li> + * <li><b>rec</b> : Mixed<div class="sub-desc">The data object containing the row as read by the Reader. + * Depending on Reader type, this could be an Array, an object, or an XML element.</div></li> + * </ul></div></li> + * <li><b>dateFormat</b> : String<div class="sub-desc">(Optional) A format string for the {@link Date#parseDate Date.parseDate} function, + * or "timestamp" if the value provided by the Reader is a UNIX timestamp, or "time" if the value provided by the Reader is a + * javascript millisecond timestamp.</div></li> + * <li><b>defaultValue</b> : Mixed<div class="sub-desc">(Optional) The default value used <b>when a Record is being created by a + * {@link Ext.data.Reader Reader}</b> when the item referenced by the <b><tt>mapping</tt></b> does not exist in the data object + * (i.e. undefined). (defaults to "")</div></li> + * </ul> + * The constructor generated by this method may be used to create new Record instances. The data object must contain properties + * named after the field <b>names</b>. + * <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> + * <p>In the simplest case, if no properties other than <tt>name</tt> are required, a field definition + * may consist of just a field name string.</p> + * @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 = { + /** + * An object hash representing the data for this Record. + * @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){ + /** + * The {@link Ext.data.Store} to which this Record belongs. + * @property store + * @type {Ext.data.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){ + 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. + * <p> + * 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. + * <p> + * 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); + }, + + /** + * Returns true if the field passed has been modified since the load or last commit. + * @param {String} fieldName + * @return {Boolean} + */ + isModified : function(fieldName){ + return !!(this.modified && this.modified.hasOwnProperty(fieldName)); + } +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/ScriptTagProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/ScriptTagProxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/ScriptTagProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,210 @@ +/** + * @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.<br> + * <p> + * <b>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.</b><br> + * <p> + * The content passed back from a server resource requested by a ScriptTagProxy <b>must</b> be executable JavaScript + * source code because it is used as the source inside a <script> tag.<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(");"); +} +</code></pre> + * + * @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]; + + /** + * @event loadexception + * Fires if an exception occurs in the Proxy during data loading. This event can be fired for one of two reasons: + * <ul><li><b>The load call timed out.</b> This means the load callback did not execute within the time limit + * specified by {@link #timeout}. In this case, this event will be raised and the + * fourth parameter (read error) will be null.</li> + * <li><b>The load succeeded but the reader could not read the response.</b> This means the server returned + * data, but the configured Reader threw an error while reading the data. In this case, this event will be + * raised and the caught error will be passed along as the fourth parameter of this event.</li></ul> + * Note that this event is also relayed through {@link Ext.data.Store}, so you can listen for it directly + * on any Store instance. + * @param {Object} this + * @param {Object} options The loading options that were specified (see {@link #load} for details). If the load + * call timed out, this parameter will be null. + * @param {Object} arg The callback's arg object passed to the {@link #load} function + * @param {Error} e The JavaScript Error object caught if the configured Reader could not read the data. + * If the load call returned success: false, this parameter will be null. + */ +}; + +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".<p>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 caching 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 <ul> + * <li>The Record block object</li> + * <li>The "arg" argument from the load function</li> + * <li>A boolean success indicator</li> + * </ul> + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/SimpleStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/SimpleStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/SimpleStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,32 @@ +/** + * @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); + } +}); +Ext.reg('simplestore', Ext.data.SimpleStore); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/SortTypes.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/SortTypes.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/SortTypes.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,87 @@ + +/** + * @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(Ext.isDate(s)){ + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/Store.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/Store.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/Store.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,815 @@ +/** + * @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}</p> + * <p>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.</p> + * <p>A Store object has no knowledge of the format of the data returned by the Proxy.</p> + * <p>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.</p> + * @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 in a bulk manner (e.g., it has been sorted, filtered, etc.) and a + * widget that 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: + * <pre><code> + Ext.data.Record.EDIT + Ext.data.Record.REJECT + Ext.data.Record.COMMIT + * </code></pre> + */ + '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 = {}; + if(this.sortField){ + this.setDefaultSort(this.sortField, this.sortDir); + }else if(this.sortInfo){ + this.setDefaultSort(this.sortInfo.field, this.sortInfo.direction); + } + + 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.DataReader} reader The DataReader object which processes the data object and returns + * an Array of Ext.data.Record objects which are cached keyed by their <em>id</em> 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"}. The direction + * property is case-sensitive. + */ + /** + * @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). + * <p>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: + * <div class="mdetail-params"><ul> + * <li><b>sort</b> : String<p class="sub-desc">The name (as specified in + * the Record's Field definition) of the field to sort on.</p></li> + * <li><b>dir</b> : String<p class="sub-desc">The direction of the sort, "ASC" or "DESC" (case-sensitive).</p></li> + * </ul></div></p> + */ + 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 {@link #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 Record into 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 {@link #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 {@link #clear} event. + */ + removeAll : function(){ + this.data.clear(); + if(this.snapshot){ + this.snapshot.clear(); + } + if(this.pruneModifiedRecords){ + this.modified = []; + } + this.fireEvent("clear", this); + }, + + /** + * Inserts Records into the Store at the given index and fires the {@link #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 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. + * <p>If using remote paging, then the first load call must specify the <tt>start</tt> + * and <tt>limit</tt> 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> + * <p><b>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.</b></p> + * @param {Object} options An object containing properties which control loading options:<ul> + * <li><b>params</b> :Object<p class="sub-desc">An object containing properties to pass as HTTP parameters to a remote data source.</p></li> + * <li><b>callback</b> : Function<p class="sub-desc">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></p></li> + * <li><b>scope</b> : Object<p class="sub-desc">Scope with which to call the callback (defaults to the Store object)</p></li> + * <li><b>add</b> : Boolean<p class="sub-desc">Indicator to append loaded records rather than replace the current cache.</p></li> + * </ul> + * @return {Boolean} Whether the load fired (if beforeload failed). + */ + 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); + return true; + } else { + return false; + } + }, + + /** + * 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 and fires the {@link #load} event. 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} add (Optional) True to add the new Records rather than replace the existing cache. <b>Remember that + * Records in a Store are keyed by their {@link Ext.data.Record#id id}, so added Records with ids which are already present in + * the Store will <i>replace</i> existing Records. Records with new, unique ids will be added.</b> + */ + loadData : function(o, append){ + var r = this.reader.readRecords(o); + this.loadRecords(r, {add: append}, true); + }, + + /** + * Gets the number of cached records. + * <p>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.</p> + * @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. + * <p>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.</p> + * @return {Number} The number of Records as specified in the data object passed to the Reader + * by the Proxy + * <p><b>This value is not updated when changing the contents of the Store locally.</b></p> + */ + 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:<ul> + * <li><b>field : String<p class="sub-desc">The name of the field by which the Records are sorted.</p></li> + * <li><b>direction : String<p class="sub-desc">The sort order, "ASC" or "DESC" (case-sensitive).</p></li> + * </ul> + */ + 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" (case-sensitive, 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" (case-sensitive, 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; + } + } + var st = (this.sortToggle) ? this.sortToggle[f.name] : null; + var si = (this.sortInfo) ? this.sortInfo : null; + + this.sortToggle[f.name] = dir; + this.sortInfo = {field: f.name, direction: dir}; + if(!this.remoteSort){ + this.applySort(); + this.fireEvent("datachanged", this); + }else{ + if (!this.load(this.lastOptions)) { + if (st) { + this.sortToggle[f.name] = st; + } + if (si) { + this.sortInfo = si; + } + } + } + }, + + /** + * 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 <tt>false</tt> 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 <i>property</i> 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 begin 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 <tt>true</tt> the Record is included, + * otherwise it is filtered out. + * @param {Function} fn The function to be called. It will be passed the following parameters:<ul> + * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record} + * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li> + * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li> + * </ul> + * @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 begin 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 <tt>true</tt> the record is + * included in the results. + * @param {Function} fn The function to be called. It will be passed the following parameters:<ul> + * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record} + * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li> + * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li> + * </ul> + * @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 a string that the property value + * should begin 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 <tt>true</tt> it is considered a match. + * @param {Function} fn The function to be called. It will be passed the following parameters:<ul> + * <li><b>record</b> : Ext.data.Record<p class="sub-desc">The {@link Ext.data.Record record} + * to test for filtering. Access field values using {@link Ext.data.Record#get}.</p></li> + * <li><b>id</b> : Object<p class="sub-desc">The ID of the Record passed.</p></li> + * </ul> + * @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; + }, + + setBaseParam : function (name, value){ + this.baseParams = this.baseParams || {}; + this.baseParams[name] = value; + } +}); + +Ext.reg('store', Ext.data.Store); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/StoreMgr.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/StoreMgr.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/StoreMgr.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,50 @@ +/** + * @class Ext.StoreMgr + * @extends Ext.util.MixedCollection + * The default global group of stores. + * @singleton + */ +Ext.StoreMgr = Ext.apply(new Ext.util.MixedCollection(), { + /** + * @cfg {Object} listeners @hide + */ + + /** + * Registers one or more Stores with the StoreMgr. You do not normally need to register stores + * manually. Any store initialized with a {@link Ext.data.Store#storeId} will be auto-registered. + * @param {Ext.data.Store} store1 A Store instance + * @param {Ext.data.Store} store2 (optional) + * @param {Ext.data.Store} etc... (optional) + */ + register : function(){ + for(var i = 0, s; s = arguments[i]; i++){ + this.add(s); + } + }, + + /** + * Unregisters one or more Stores with the StoreMgr + * @param {String/Object} id1 The id of the Store, or a Store instance + * @param {String/Object} id2 (optional) + * @param {String/Object} etc... (optional) + */ + 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 instance + * @return {Ext.data.Store} + */ + lookup : function(id){ + return typeof id == "object" ? (id.events ? id : Ext.create(id, 'store')) : this.get(id); + }, + + // getKey implementation for MixedCollection + getKey : function(o){ + return o.storeId || o.id; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/data/Tree.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/Tree.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/Tree.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,755 @@ +/** + * @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); + }, + + /** + * Returns true if this node has one or more child nodes, else false. + * @return {Boolean} + */ + hasChildNodes : function(){ + return !this.isLeaf() && this.childNodes.length > 0; + }, + + /** + * Returns true if this node has one or more child nodes, or if the <tt>expandable</tt> + * node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false. + * @return {Boolean} + */ + isExpandable : function(){ + return this.attributes.expandable || this.hasChildNodes(); + }, + + /** + * 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(Ext.isArray(node)){ + 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 (<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. + * @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 (<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. + * @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 (<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. + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/XmlReader.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/XmlReader.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/XmlReader.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,121 @@ +/** + * @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 {@link 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" or "application/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> +<?xml version="1.0" encoding="UTF-8"?> +<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> +</code></pre> + * @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} idPath 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 <tt>responseXML</tt> 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.idPath || 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, n); + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/data/XmlStore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/data/XmlStore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/data/XmlStore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +Ext.data.XmlStore = function(c){ + /** + * @cfg {Ext.data.DataReader} reader @hide + */ + /** + * @cfg {Ext.data.DataProxy} proxy @hide + */ + Ext.data.XmlStore.superclass.constructor.call(this, Ext.apply(c, { + proxy: c.proxy || (!c.data ? new Ext.data.HttpProxy({url: c.url}) : undefined), + reader: new Ext.data.XmlReader(c, c.fields) + })); +}; +Ext.extend(Ext.data.XmlStore, Ext.data.Store); + +Ext.reg('xmlstore', Ext.data.XmlStore); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/dd/DDCore.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/DDCore.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/DDCore.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,2978 @@ +/* + * 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: + * <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 {@link Ext.dd.DD}. setDragElId() lets you define + * a separate element that would be moved, as in {@link Ext.dd.DDProxy}. + * </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) { + * alert("dd was dropped on " + id); + * } + * </pre> + * @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 object who's property names identify HTML tags to be considered invalid as drag handles. + * A non-null property value identifies the tag as invalid. Defaults to the + * following value which prevents drag operations from being initiated by <a> elements:<pre><code> +{ + A: "A" +}</code></pre> + * @property invalidHandleTypes + * @type Object + */ + invalidHandleTypes: null, + + /** + * An object who's property names identify the IDs of elements to be considered invalid as drag handles. + * A non-null property value identifies the ID as invalid. For example, to prevent + * dragging from being initiated on element ID "foo", use:<pre><code> +{ + foo: true +}</code></pre> + * @property invalidHandleIds + * @type Object + */ + invalidHandleIds: null, + + /** + * An Array of CSS class names for elements to be considered in valid as drag handles. + * @property invalidHandleClasses + * @type Array + */ + 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; }, + + /** + * When set to true, other DD objects in cooperating DDGroups do not receive + * notification events when this DD object is dragged over them. Defaults to false. + * @property moveOnly + * @type boolean + */ + moveOnly: false, + + /** + * 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: + <pre><code> + var dd = new Ext.dd.DDProxy("dragDiv1", "proxytest", + { dragElId: "existingProxyDiv" }); + dd.startDrag = function(){ + this.constrainTo("parent-id"); + }; + </code></pre> + * Or you can initalize it using the {@link Ext.Element} object: + <pre><code> + Ext.get("dragDiv1").initDDProxy("proxytest", {dragElId: "existingProxyDiv"}, { + startDrag : function(){ + this.constrainTo("parent-id"); + } + }); + </code></pre> + * @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<len; ++i) { + if (this.invalidHandleClasses[i] == cssClass) { + delete this.invalidHandleClasses[i]; + } + } + }, + + /** + * Checks the tag exclusion list to see if this click should be ignored + * @method isValidHandleChild + * @param {HTMLElement} node the HTMLElement to evaluate + * @return {boolean} true if this is a valid tag type, false if not + */ + isValidHandleChild: function(node) { + + var valid = true; + // var n = (node.nodeName == "#text") ? node.parentNode : node; + var nodeName; + try { + nodeName = node.nodeName.toUpperCase(); + } catch(e) { + nodeName = node.nodeName; + } + valid = valid && !this.invalidHandleTypes[nodeName]; + valid = valid && !this.invalidHandleIds[node.id]; + + for (var i=0, len=this.invalidHandleClasses.length; valid && i<len; ++i) { + valid = !Ext.fly(node).hasClass(this.invalidHandleClasses[i]); + } + + + return valid; + + }, + + /** + * Create the array of horizontal tick marks if an interval was specified + * in setXConstraint(). + * @method setXTicks + * @private + */ + setXTicks: function(iStartX, iTickSize) { + this.xTicks = []; + this.xTickSize = iTickSize; + + var tickMap = {}; + + for (var i = this.initPageX; 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<len; ++i) { + var next = i + 1; + if (tickArray[next] && tickArray[next] >= 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 + */ + initialized: 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 interaction is 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] && 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<len;++i) { + if (targets[i].id == oTargetDD.id) { + return true; + } + } + + return false; + }, + + /** + * 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. + * @method isTypeOfDD + * @param {Object} the object to evaluate + * @return {boolean} true if typeof oDD = DragDrop + * @static + */ + isTypeOfDD: function (oDD) { + return (oDD && oDD.__ygDragDrop); + }, + + /** + * Utility function to determine if a given element has been + * registered as a drag drop handle for the given Drag Drop object. + * @method isHandle + * @param {String} id the element id to check + * @return {boolean} true if this element is a DragDrop handle, false + * otherwise + * @static + */ + isHandle: function(sDDId, sHandleId) { + return ( this.handleIds[sDDId] && + this.handleIds[sDDId][sHandleId] ); + }, + + /** + * Returns the DragDrop instance for a given id + * @method getDDById + * @param {String} id the id of the DragDrop object + * @return {DragDrop} the drag drop object, null if it is not found + * @static + */ + getDDById: function(id) { + for (var i in this.ids) { + if (this.ids[i][id]) { + return this.ids[i][id]; + } + } + return null; + }, + + /** + * Fired after a registered DragDrop object gets the mousedown event. + * Sets up the events required to track the object being dragged + * @method handleMouseDown + * @param {Event} e the event + * @param oDD the DragDrop object being dragged + * @private + * @static + */ + handleMouseDown: function(e, oDD) { + if(Ext.QuickTips){ + Ext.QuickTips.disable(); + } + if(this.dragCurrent){ + // the original browser mouseup wasn't handled (e.g. outside FF browser window) + // so clean up first to avoid breaking the next drag + this.handleMouseUp(e); + } + + this.currentTarget = e.getTarget(); + this.dragCurrent = oDD; + + var el = oDD.getEl(); + + // track start position + this.startX = e.getPageX(); + this.startY = e.getPageY(); + + this.deltaX = this.startX - el.offsetLeft; + this.deltaY = this.startY - el.offsetTop; + + this.dragThreshMet = false; + + this.clickTimeout = setTimeout( + function() { + var DDM = Ext.dd.DDM; + DDM.startDrag(DDM.startX, DDM.startY); + }, + this.clickTimeThresh ); + }, + + /** + * Fired when either the drag pixel threshol or the mousedown hold + * time threshold has been met. + * @method startDrag + * @param x {int} the X position of the original mousedown + * @param y {int} the Y position of the original mousedown + * @static + */ + startDrag: function(x, y) { + clearTimeout(this.clickTimeout); + if (this.dragCurrent) { + this.dragCurrent.b4StartDrag(x, y); + this.dragCurrent.startDrag(x, y); + } + this.dragThreshMet = true; + }, + + /** + * Internal function to handle the mouseup event. Will be invoked + * from the context of the document. + * @method handleMouseUp + * @param {Event} e the event + * @private + * @static + */ + handleMouseUp: function(e) { + + if(Ext.QuickTips){ + Ext.QuickTips.enable(); + } + if (! this.dragCurrent) { + return; + } + + clearTimeout(this.clickTimeout); + + if (this.dragThreshMet) { + this.fireEvents(e, true); + } else { + } + + this.stopDrag(e); + + this.stopEvent(e); + }, + + /** + * Utility to stop event propagation and event default, if these + * features are turned on. + * @method stopEvent + * @param {Event} e the event as returned by this.getEvent() + * @static + */ + stopEvent: function(e){ + if(this.stopPropagation) { + e.stopPropagation(); + } + + if (this.preventDefault) { + e.preventDefault(); + } + }, + + /** + * Internal function to clean up event handlers after the drag + * operation is complete + * @method stopDrag + * @param {Event} e the event + * @private + * @static + */ + stopDrag: function(e) { + // Fire the drag end event for the item that was dragged + if (this.dragCurrent) { + if (this.dragThreshMet) { + this.dragCurrent.b4EndDrag(e); + this.dragCurrent.endDrag(e); + } + + this.dragCurrent.onMouseUp(e); + } + + this.dragCurrent = null; + this.dragOvers = {}; + }, + + /** + * Internal function to handle the mousemove event. Will be invoked + * from the context of the html element. + * + * @TODO figure out what we can do about mouse events lost when the + * user drags objects beyond the window boundary. Currently we can + * detect this in internet explorer by verifying that the mouse is + * down during the mousemove event. Firefox doesn't give us the + * button state on the mousemove event. + * @method handleMouseMove + * @param {Event} e the event + * @private + * @static + */ + handleMouseMove: function(e) { + if (! this.dragCurrent) { + return true; + } + // var button = e.which || e.button; + + // check for IE mouseup outside of page boundary + if (Ext.isIE && (e.button !== 0 && e.button !== 1 && e.button !== 2)) { + this.stopEvent(e); + return this.handleMouseUp(e); + } + + if (!this.dragThreshMet) { + var diffX = Math.abs(this.startX - e.getPageX()); + var diffY = Math.abs(this.startY - e.getPageY()); + if (diffX > 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<len; ++i) { + dc.b4DragOut(e, outEvts[i].id); + dc.onDragOut(e, outEvts[i].id); + } + + // fire enter events + for (i=0,len=enterEvts.length; i<len; ++i) { + // dc.b4DragEnter(e, oDD.id); + dc.onDragEnter(e, enterEvts[i].id); + } + + // fire over events + for (i=0,len=overEvts.length; i<len; ++i) { + dc.b4DragOver(e, overEvts[i].id); + dc.onDragOver(e, overEvts[i].id); + } + + // fire drop events + for (i=0, len=dropEvts.length; i<len; ++i) { + dc.b4DragDrop(e, dropEvts[i].id); + dc.onDragDrop(e, dropEvts[i].id); + } + + } + + // notify about a drop that did not find a target + if (isDrop && !dropEvts.length) { + dc.onInvalidDrop(e); + } + + }, + + /** + * 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. + * @method getBestMatch + * @param {DragDrop[]} dds The array of drag and drop objects + * targeted + * @return {DragDrop} The best single match + * @static + */ + getBestMatch: function(dds) { + var winner = null; + // Return null if the input is not what we expect + //if (!dds || !dds.length || dds.length == 0) { + // winner = null; + // If there is only one item, it wins + //} else if (dds.length == 1) { + + var len = dds.length; + + if (len == 1) { + winner = dds[0]; + } else { + // Loop through the targeted items + for (var i=0; i<len; ++i) { + var dd = dds[i]; + // If the cursor is over the object, it wins. If the + // cursor is over multiple matches, the first one we come + // to wins. + if (dd.cursorIsOver) { + winner = dd; + break; + // Otherwise the object with the most overlap wins + } else { + if (!winner || + winner.overlap.getArea() < dd.overlap.getArea()) { + winner = dd; + } + } + } + } + + return winner; + }, + + /** + * 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. + * @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 when 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); + } +}); Added: mickael/trunk/ext/v3.0.0-a1/src/dd/DragSource.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/DragSource.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/DragSource.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,359 @@ +/** + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/DragTracker.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/DragTracker.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/DragTracker.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,154 @@ +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; + if(this.preventDefault !== false){ + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/DragZone.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/DragZone.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/DragZone.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,127 @@ +/** + * @class Ext.dd.DragZone + * @extends Ext.dd.DragSource + * <p>This class provides a container DD instance that allows dragging of multiple child source nodes.</p> + * <p>This class does not move the drag target nodes, but a proxy element which may contain + * any DOM structure you wish. The DOM element to show in the proxy is provided by either a + * provided implementation of {@link #getDragData}, or by registered draggables registered with {@link Ext.dd.Registry}</p> + * <p>If you wish to provide draggability for an arbitrary number of DOM nodes, each of which represent some + * application object (For example nodes in a {@link Ext.DataView DataView}) then use of this class + * is the most efficient way to "activate" those nodes.</p> + * <p>By default, this class requires that draggable child nodes are registered with {@link Ext.dd.Registry}. + * However a simpler way to allow a DragZone to manage any number of draggable elements is to configure + * the DragZone with an implementation of the {@link #getDragData} method which interrogates the passed + * mouse event to see if it has taken place within an element, or class of elements. This is easily done + * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a + * {@link Ext.DomQuery} selector. For example, to make the nodes of a DataView draggable, use the following + * technique. Knowledge of the use of the DataView is required:</p><pre><code> +myDataView.on('render', function() { + myDataView.dragZone = new Ext.dd.DragZone(myDataView.getEl(), { + +// On receipt of a mousedown event, see if it is within a DataView node. +// Return a drag data object if so. + getDragData: function(e) { + +// Use the DataView's own itemSelector (a mandatory property) to +// test if the mousedown is within one of the DataView's nodes. + var sourceEl = e.getTarget(myDataView.itemSelector, 10); + +// If the mousedown is within a DataView node, clone the node to produce +// a ddel element for use by the drag proxy. Also add application data +// to the returned data object. + if (sourceEl) { + d = sourceEl.cloneNode(true); + d.id = Ext.id(); + return { + ddel: d, + sourceEl: sourceEl, + repairXY: Ext.fly(sourceEl).getXY(), + sourceStore: myDataView.store, + draggedRecord: v.getRecord(sourceEl) + } + } + }, + +// Provide coordinates for the proxy to slide back to on failed drag. +// This is the original XY coordinates of the draggable element captured +// in the getDragData method. + getRepairXY: function() { + return this.dragData.repairXY; + } + }); +});</code></pre> + * See the {@link Ext.dd.DropZone DropZone} documentation for details about building a DropZone which + * cooperates with this DragZone. + * @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, { + /** + * This property contains the data representing the dragged object. This data is set up by the implementation + * of the {@link #getDragData} method. It must contain a <tt>ddel</tt> property, but can contain + * any other data according to the application's needs. + * @type Object + * @property dragData + */ + /** + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/DropTarget.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/DropTarget.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/DropTarget.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,109 @@ +/** + * @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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/DropZone.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/DropZone.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/DropZone.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,256 @@ +/** + * @class Ext.dd.DropZone + * @extends Ext.dd.DropTarget + * <p>This class provides a container DD instance that allows dropping on multiple child target nodes.</p> + * <p>By default, this class requires that child nodes accepting drop are registered with {@link Ext.dd.Registry}. + * However a simpler way to allow a DropZone to manage any number of target elements is to configure the + * DropZone with an implementation of {@link #getTargetFromEvent} which interrogates the passed + * mouse event to see if it has taken place within an element, or class of elements. This is easily done + * by using the event's {@link Ext.EventObject#getTarget getTarget} method to identify a node based on a + * {@link Ext.DomQuery} selector.</p> + * <p>Once the DropZone has detected through calling getTargetFromEvent, that the mouse is over + * a drop target, that target is passed as the first parameter to {@link #onNodeEnter}, {@link #onNodeOver}, + * {@link #onNodeOut}, {@link #onNodeDrop}. You may configure the instance of DropZone with implementations + * of these methods to provide application-specific behaviour for these events to update both + * application state, and UI state.</p> + * <p>For example to make a GridPanel a cooperating target with the example illustrated in + * {@link Ext.dd.DragZone DragZone}, the following technique might be used:</p><pre><code> +myGridPanel.on('render', function() { + myGridPanel.dropZone = new Ext.dd.DropZone(myGridPanel.getView().scroller, { + +// If the mouse is over a grid row, return that node. This is +// provided as the "target" parameter in all "onNodeXXXX" node event handling functions + getTargetFromEvent: function(e) { + return e.getTarget(myGridPanel.getView().rowSelector); + }, + +// On entry into a target node, highlight that node. + onNodeEnter : function(target, dd, e, data){ + Ext.fly(target).addClass('my-row-highlight-class'); + }, + +// On exit from a target node, unhighlight that node. + onNodeOut : function(target, dd, e, data){ + Ext.fly(target).removeClass('my-row-highlight-class'); + }, + +// While over a target node, return the default drop allowed class which +// places a "tick" icon into the drag proxy. + onNodeOver : function(target, dd, e, data){ + return Ext.dd.DropZone.prototype.dropAllowed; + }, + +// On node drop we can interrogate the target to find the underlying +// application object that is the real target of the dragged data. +// In this case, it is a Record in the GridPanel's Store. +// We can use the data set up by the DragZone's getDragData method to read +// any data we decided to attach in the DragZone's getDragData method. + onNodeDrop : function(target, dd, e, data){ + var rowIndex = myGridPanel.getView().findRowIndex(target); + var r = myGridPanel.getStore().getAt(rowIndex); + Ext.Msg.alert('Drop gesture', 'Dropped Record id ' + data.draggedRecord.id + + ' on Record id ' + r.id); + return true; + } + }); +} +</code></pre> + * See the {@link Ext.dd.DragZone DragZone} documentation for details about building a DragZone which + * cooperates with this DropZone. + * @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 when the DropZone determines that a {@link Ext.dd.DragSource} has entered a drop node + * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}. + * 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 while the DropZone determines that a {@link Ext.dd.DragSource} is over a drop node + * that has either been registered or detected by a configured implementation of {@link #getTargetFromEvent}. + * 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 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 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 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 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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/Registry.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/Registry.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/Registry.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,121 @@ +/** + * @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): + * <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> + */ + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/ScrollManager.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/ScrollManager.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/ScrollManager.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,195 @@ +/** + * @class Ext.dd.ScrollManager + * <p>Provides automatic scrolling of overflow regions in the page during drag operations.</p> + * <p>The ScrollManager configs will be used as the defaults for any scroll container registered with it, + * but you can also override most of the configs per scroll container by adding a + * <tt>ddScrollConfig</tt> object to the target element that contains these properties: {@link #hthresh}, + * {@link #vthresh}, {@link #increment} and {@link #frequency}. Example usage: + * <pre><code> +var el = Ext.get('scroll-ct'); +el.ddScrollConfig = { + vthresh: 50, + hthresh: -1, + frequency: 100, + increment: 200 +}; +Ext.dd.ScrollManager.register(el); +</code></pre> + * <b>Note: This class uses "Point Mode" and is untested in "Intersect Mode".</b> + * @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; + var freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) ? + el.ddScrollConfig.frequency : Ext.dd.ScrollManager.frequency; + proc.id = setInterval(doScroll, freq); + }; + + var onFire = function(e, isDrop){ + if(isDrop || !ddm.dragCurrent){ return; } + var dds = Ext.dd.ScrollManager; + if(!dragEl || dragEl != ddm.dragCurrent){ + dragEl = ddm.dragCurrent; + // 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(Ext.isArray(el)){ + 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(Ext.isArray(el)){ + 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 Added: mickael/trunk/ext/v3.0.0-a1/src/dd/StatusProxy.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/dd/StatusProxy.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/dd/StatusProxy.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,165 @@ +/** + * @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/HTMLElement} html The html that will replace the current innerHTML of the ghost element, or a + * DOM node to append as the child of the ghost element (in which case the innerHTML will be cleared first). + */ + update : function(html){ + if(typeof html == "string"){ + this.ghost.update(html); + }else{ + this.ghost.update(""); + html.style.margin = "0"; + this.ghost.dom.appendChild(html); + } + var el = this.ghost.dom.firstChild; + if(el){ + Ext.fly(el).setStyle(Ext.isIE ? 'styleFloat' : 'cssFloat', 'none'); + } + }, + + /** + * 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 Added: mickael/trunk/ext/v3.0.0-a1/src/debug.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/debug.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/debug.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,483 @@ +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' || Ext.isDate(o)){ + Ext.log(o); + }else if(!o){ + Ext.log("null"); + }else if(typeof o != "object"){ + Ext.log('Unknown return type'); + }else if(Ext.isArray(o)){ + 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 = [ '<div style="padding:5px !important;border-bottom:1px solid #ccc;">', + Ext.util.Format.htmlEncode(Array.prototype.join.call(arguments, ', ')).replace(/\n/g, '<br />').replace(/\s/g, ' '), + '</div>'].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<len; i++){ + var st = cl[i]; + var v = s[st] || fly.getStyle(st); + if(v != undefined && v !== null && v !== ''){ + props[st] = v; + } + } + } + }else{ + for(var a in dom){ + var v = dom[a]; + if((isNaN(a+10)) && v != undefined && v !== null && v !== '' && !(Ext.isGecko && a[0] == a[0].toUpperCase())){ + props[a] = v; + } + } + } + }else{ + if(inspecting){ + return; + } + addStyle.disable(); + reload.disabled(); + } + stylesGrid.setSource(props); + stylesGrid.treeNode = n; + stylesGrid.view.fitColumns(); + } + + this.loader = new Ext.tree.TreeLoader(); + this.loader.load = function(n, cb){ + var isBody = n.htmlNode == document.body; + var cn = n.htmlNode.childNodes; + for(var i = 0, c; c = cn[i]; i++){ + if(isBody && c.id == 'x-debug-browser'){ + continue; + } + if(c.nodeType == 1){ + n.appendChild(new Ext.debug.HtmlNode(c)); + }else if(c.nodeType == 3 && !nonSpace.test(c.nodeValue)){ + n.appendChild(new Ext.tree.TreeNode({ + text:'<em>' + ellipsis(html(String(c.nodeValue)), 35) + '</em>', + 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 + '="<i>' + html(v) +'</i>"'; + } + } + var style = n.style ? n.style.cssText : ''; + if(style){ + s += ' style="<i>' + html(style.toLowerCase()) +'</i>"'; + } + if(leaf && n.childNodes.length > 0){ + s+='><em>' + ellipsis(html(String(n.innerHTML)), 35) + '</em></'+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; +}(); + + Added: mickael/trunk/ext/v3.0.0-a1/src/direct/Direct.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/Direct.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/Direct.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,88 @@ +Ext.Direct = Ext.extend(Ext.util.Observable, { + exceptions: { + TRANSPORT: 'xhr', + PARSE: 'parse', + LOGIN: 'login', + SERVER: 'exception' + }, + + constructor: function(){ + this.addEvents('event', 'exception'); + this.transactions = {}; + this.providers = {}; + }, + + addProvider : function(provider){ + var a = arguments; + if(a.length > 1){ + for(var i = 0, len = a.length; i < len; i++){ + this.addProvider(a[i]); + } + return; + } + if(!provider.events){ + provider = new Ext.Direct.PROVIDERS[provider.type](provider); + //provider = new Ext.Direct.PROVIDERS[provider.type](provider); + } + provider.id = provider.id || Ext.id; + this.providers[provider.id] = provider; + + provider.on('data', this.onProviderData, this); + provider.on('exception', this.onProviderException, this); + + if(!provider.isConnected()){ + provider.connect(); + } + + return provider; + }, + + getProvider : function(id){ + return this.providers[id]; + }, + + removeProvider : function(id){ + var provider = id.id ? id : providers[id.id]; + provider.un('data', this.onProviderData, this); + provider.un('exception', this.onProviderException, this); + delete this.providers[provider.id]; + return provider; + }, + + addTransaction: function(t){ + this.transactions[t.tid] = t; + return t; + }, + + removeTransaction: function(t){ + delete this.transactions[t.tid || t]; + return t; + }, + + getTransaction: function(tid){ + return this.transactions[tid.tid || tid]; + }, + + onProviderData : function(provider, e){ + if(Ext.isArray(e)){ + for(var i = 0, len = e.length; i < len; i++){ + this.onProviderData(provider, e[i]); + } + return; + } + if(e.name && e.name != 'event' && e.name != 'exception'){ + this.fireEvent(e.name, e); + }else if(e.type == 'exception'){ + this.fireEvent('exception', e); + } + this.fireEvent('event', e, provider); + }, + + createEvent : function(response, extraProps){ + return new Ext.Direct.eventTypes[response.type](Ext.apply(response, extraProps)); + } +}); +Ext.Direct = new Ext.Direct(); + +Ext.Direct.TID = 1; +Ext.Direct.PROVIDERS = {}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/direct/Event.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/Event.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/Event.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,28 @@ +Ext.Direct.Event = function(config){ + Ext.apply(this, config); +} +Ext.Direct.Event.prototype = { + status: true, + getData: function(){ + return this.data; + } +}; + +Ext.Direct.RemotingEvent = Ext.extend(Ext.Direct.Event, { + type: 'rpc', + getTransaction: function(){ + return this.transaction || Ext.Direct.getTransaction(this.tid); + } +}); + +Ext.Direct.ExceptionEvent = Ext.extend(Ext.Direct.RemotingEvent, { + status: false, + type: 'exception' +}); + +Ext.Direct.eventTypes = { + 'rpc': Ext.Direct.RemotingEvent, + 'event': Ext.Direct.Event, + 'exception': Ext.Direct.ExceptionEvent +}; + Added: mickael/trunk/ext/v3.0.0-a1/src/direct/JsonProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/JsonProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/JsonProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,35 @@ +Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, { + parseResponse: function(xhr){ + if(!Ext.isEmpty(xhr.responseText)){ + if(typeof xhr.responseText == 'object'){ + return xhr.responseText; + } + return Ext.decode(xhr.responseText); + } + return null; + }, + + getEvents: function(xhr){ + var data = null; + try{ + data = this.parseResponse(xhr); + }catch(e){ + var event = new Ext.Direct.ExceptionEvent({ + data: e, + xhr: xhr, + code: Ext.Direct.exceptions.PARSE, + message: 'Error parsing json response: \n\n ' + data + }) + return [event]; + } + var events = []; + if(Ext.isArray(data)){ + for(var i = 0, len = data.length; i < len; i++){ + events.push(Ext.Direct.createEvent(data[i])); + } + }else{ + events.push(Ext.Direct.createEvent(data)); + } + return events; + } +}); \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/direct/PollingProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/PollingProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/PollingProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,67 @@ +Ext.direct.PollingProvider = Ext.extend(Ext.direct.JsonProvider, { + priority: 3, + interval: 3000, + + constructor : function(config){ + Ext.direct.PollingProvider.superclass.constructor.call(this, config); + this.addEvents('beforepoll', 'poll'); + }, + + isConnected: function(){ + return !!this.pollTask; + }, + + connect: function(){ + if(this.url && !this.pollTask){ + this.pollTask = Ext.TaskMgr.start({ + run: function(){ + if(this.fireEvent('beforepoll', this) !== false){ + if(typeof this.url == 'function'){ + this.url(this.baseParams); + }else{ + Ext.Ajax.request({ + url: this.url, + callback: this.onData, + scope: this, + params: this.baseParams + }); + } + } + }, + interval: this.interval, + scope: this + }); + this.fireEvent('connect', this); + }else if(!this.url){ + throw 'Error initializing PollingProvider, no url configured.'; + } + }, + + disconnect: function(){ + if(this.pollTask){ + Ext.TaskMgr.stop(this.pollTask); + delete this.pollTask; + this.fireEvent('disconnect', this); + } + }, + + onData: function(opt, success, xhr){ + if(success){ + var events = this.getEvents(xhr); + for(var i = 0, len = events.length; i < len; i++){ + var e = events[i]; + this.fireEvent('data', this, e); + } + }else{ + var e = new Ext.Direct.ExceptionEvent({ + data: e, + code: Ext.Direct.exceptions.TRANSPORT, + message: 'Unable to connect to the server.', + xhr: xhr + }); + this.fireEvent('data', this, e); + } + } +}); + +Ext.Direct.PROVIDERS['polling'] = Ext.direct.PollingProvider; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/direct/Provider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/Provider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/Provider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,15 @@ +Ext.direct.Provider = Ext.extend(Ext.util.Observable, { + priority: 1, // lower is higher priority, 0 mens "duplex", aka always on + constructor : function(config){ + Ext.apply(this, config); + this.addEvents('connect', 'disconnect', 'data', 'exception'); + Ext.direct.Provider.superclass.constructor.call(this, config); + }, + + isConnected: function(){ + return false; + }, + + connect: Ext.emptyFn, + disconnect: Ext.emptyFn +}); Added: mickael/trunk/ext/v3.0.0-a1/src/direct/RemotingProvider.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/RemotingProvider.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/RemotingProvider.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,236 @@ +Ext.direct.RemotingProvider = Ext.extend(Ext.direct.JsonProvider, { + priority: 1, + enableBuffer: 10, + maxRetries: 1, + + constructor : function(config){ + Ext.direct.RemotingProvider.superclass.constructor.call(this, config); + this.addEvents('beforecall', 'call'); + this.namespace = this.namespace || window; + this.transactions = {}; + this.callBuffer = []; + }, + + initAPI : function(){ + var o = this.actions; + for(var c in o){ + var cls = this.namespace[c] || (this.namespace[c] = {}); + var ms = o[c]; + for(var i = 0, len = ms.length; i < len; i++){ + var m = ms[i]; + cls[m.name] = this.createMethod(c, m); + } + } + }, + + isConnected: function(){ + return !!this.connected; + }, + + connect: function(){ + if(this.url){ + this.initAPI(); + this.connected = true; + this.fireEvent('connect', this); + }else if(!this.url){ + throw 'Error initializing RemotingProvider, no url configured.'; + } + }, + + disconnect: function(){ + if(this.connected){ + this.connected = false; + this.fireEvent('disconnect', this); + } + }, + + onData: function(opt, success, xhr){ + if(success){ + var events = this.getEvents(xhr); + for(var i = 0, len = events.length; i < len; i++){ + var e = events[i]; + var t = e.getTransaction(); + this.fireEvent('data', this, e); + if(t){ + this.doCallback(t, e, true); + Ext.Direct.removeTransaction(t); + } + } + }else{ + var ts = [].concat(opt.ts); + for(var i = 0, len = ts.length; i < len; i++){ + var t = this.getTransaction(opt.ts[i]); + if(t && t.retryCount < this.maxRetries){ + t.retry(); + }else{ + var e = new Ext.Direct.ExceptionEvent({ + data: e, + transaction: t, + code: Ext.Direct.exceptions.TRANSPORT, + message: 'Unable to connect to the server.', + xhr: xhr + }); + this.fireEvent('data', this, e); + if(t){ + this.doCallback(t, e, false); + Ext.Direct.removeTransaction(t); + } + } + } + } + }, + + getCallData: function(t){ + return { + action: t.action, + method: t.method, + data: t.data, + type: 'rpc', + tid: t.tid + }; + }, + + doSend : function(data){ + var o = { + url: this.url, + callback: this.onData, + scope: this + }; + + // send only needed data + var callData; + if(Ext.isArray(data)){ + callData = []; + for(var i = 0, len = data.length; i < len; i++){ + callData.push(this.getCallData(data[i])); + } + }else{ + callData = this.getCallData(data); + } + + if(this.enableUrlEncode){ + var params = {}; + params[typeof this.enableUrlEncode == 'string' ? this.enableUrlEncode : 'data'] = Ext.encode(callData); + o.params = params; + }else{ + o.jsonData = callData; + } + Ext.Ajax.request(o); + }, + + combineAndSend : function(){ + var len = this.callBuffer.length; + if(len > 0){ + this.doSend(len == 1 ? this.callBuffer[0] : this.callBuffer); + this.callBuffer = []; + } + }, + + queueTransaction: function(t){ + this.callBuffer.push(t); + if(this.enableBuffer){ + if(!this.callTask){ + this.callTask = new Ext.util.DelayedTask(this.combineAndSend, this); + } + this.callTask.delay(typeof this.enableBuffer == 'number' ? this.enableBuffer : 10); + }else{ + this.combineAndSend(); + } + }, + + doCall : function(c, m, args){ + var data = null, hs = args[m.len], scope = args[m.len+1]; + + if(m.len !== 0){ + data = args.slice(0, m.len); + } + + var t = new Ext.Direct.Transaction({ + provider: this, + args: args, + action: c, + method: m.name, + data: data, + cb: scope && typeof hs == 'function' ? hs.createDelegate(scope) : hs + }); + + if(this.fireEvent('beforecall', this, t) !== false){ + Ext.Direct.addTransaction(t); + this.queueTransaction(t); + this.fireEvent('call', this, t); + } + }, + + doForm : function(c, m, form, callback, scope){ + var t = new Ext.Direct.Transaction({ + provider: this, + action: c, + method: m.name, + args:[form, callback, scope], + cb: scope && typeof callback == 'function' ? callback.createDelegate(scope) : callback + }); + + if(this.fireEvent('beforecall', this, t) !== false){ + Ext.Direct.addTransaction(t); + + form = Ext.getDom(form); + var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data'; + + var params = { + extTID: t.tid, + extAction: c, + extMethod: m.name, + extUpload: String(isUpload) + }; + if(callback && typeof callback == 'object'){ + Ext.apply(params, callback.params); + } + Ext.Ajax.request({ + url: this.url, + params: params, + callback: this.onData, + scope: this, + form: form, + isUpload: isUpload, + ts: t + }); + } + }, + + createMethod : function(c, m){ + var f; + if(!m.formHandler){ + f = function(){ + this.doCall(c, m, Array.prototype.slice.call(arguments, 0)); + }.createDelegate(this); + }else{ + f = function(form, callback, scope){ + this.doForm(c, m, form, callback, scope); + }.createDelegate(this); + } + f.directCfg = { + action: c, + method: m + }; + return f; + }, + + getTransaction: function(opt){ + return opt && opt.tid ? Ext.Direct.getTransaction(opt.tid) : null; + }, + + doCallback: function(t, e){ + var fn = e.status ? 'success' : 'failure'; + if(t && t.cb){ + var hs = t.cb; + var result = e.result || e.data; + if(typeof hs == 'function'){ + hs(result, e); + } else{ + Ext.callback(hs[fn], hs.scope, [result, e]); + Ext.callback(hs.callback, hs.scope, [result, e]); + } + } + } +}); +Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/direct/Transaction.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/direct/Transaction.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/direct/Transaction.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,19 @@ +Ext.Direct.Transaction = function(config){ + Ext.apply(this, config); + this.tid = ++Ext.Direct.TID; + this.retryCount = 0; +} +Ext.Direct.Transaction.prototype = { + send: function(){ + this.provider.queueTransaction(this); + }, + + retry: function(){ + this.retryCount++; + this.send(); + }, + + getProvider: function(){ + return this.provider; + } +}; \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/ext.jsb =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/ext.jsb (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/ext.jsb 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,794 @@ +<?xml version="1.0" encoding="utf-8"?> +<project path="" name="Ext - JS Lib" author="Ext JS, LLC" version="3.0 Pre-alpha" copyright="Ext JS Library $version
Copyright(c) 2006-2008, $author.
licensing@xxxxxxxxx

http://extjs.com/license" output="C:\apps\www\deploy\ext-3.0-dev\" source="True" source-dir="$output\source" minify="True" min-dir="$output\build" doc="False" doc-dir="$output\docs" min-dair="$output\build"> + <directory name="" /> + <target name="Core" file="$output\ext-core.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="core\DomHelper.js" /> + <include name="core\Template.js" /> + <include name="core\DomQuery.js" /> + <include name="util\Observable.js" /> + <include name="core\EventManager.js" /> + <include name="core\Element.js" /> + <include name="core\Fx.js" /> + <include name="core\CompositeElement.js" /> + <include name="data\Connection.js" /> + <include name="core\UpdateManager.js" /> + <include name="util\DelayedTask.js" /> + </target> + <target name="Everything" file="$output\ext-all.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="core\DomHelper.js" /> + <include name="core\Template.js" /> + <include name="core\DomQuery.js" /> + <include name="util\Observable.js" /> + <include name="core\EventManager.js" /> + <include name="core\Element.js" /> + <include name="core\Element.scroll.js" /> + <include name="core\Element.keys.js" /> + <include name="core\Element.insertion.js" /> + <include name="core\Element.dd.js" /> + <include name="core\Element.alignment.js" /> + <include name="core\Fx.js" /> + <include name="core\CompositeElement.js" /> + <include name="data\Connection.js" /> + <include name="core\UpdateManager.js" /> + <include name="util\Date.js" /> + <include name="util\DelayedTask.js" /> + <include name="util\TaskMgr.js" /> + <include name="util\MixedCollection.js" /> + <include name="widgets\ComponentMgr.js" /> + <include name="util\JSON.js" /> + <include name="util\Format.js" /> + <include name="util\XTemplate.js" /> + <include name="util\CSS.js" /> + <include name="util\ClickRepeater.js" /> + <include name="util\KeyNav.js" /> + <include name="util\KeyMap.js" /> + <include name="util\TextMetrics.js" /> + <include name="dd\DDCore.js" /> + <include name="dd\DragTracker.js" /> + <include name="dd\ScrollManager.js" /> + <include name="dd\Registry.js" /> + <include name="dd\StatusProxy.js" /> + <include name="dd\DragSource.js" /> + <include name="dd\DropTarget.js" /> + <include name="dd\DragZone.js" /> + <include name="dd\DropZone.js" /> + <include name="data\SortTypes.js" /> + <include name="data\Record.js" /> + <include name="data\StoreMgr.js" /> + <include name="data\Store.js" /> + <include name="data\SimpleStore.js" /> + <include name="data\JsonStore.js" /> + <include name="data\XmlStore.js" /> + <include name="data\DataField.js" /> + <include name="data\DataReader.js" /> + <include name="data\DataProxy.js" /> + <include name="data\MemoryProxy.js" /> + <include name="data\HttpProxy.js" /> + <include name="data\ScriptTagProxy.js" /> + <include name="data\JsonReader.js" /> + <include name="data\XmlReader.js" /> + <include name="data\ArrayReader.js" /> + <include name="direct\Direct.js" /> + <include name="direct\Transaction.js" /> + <include name="direct\Event.js" /> + <include name="direct\Provider.js" /> + <include name="direct\JsonProvider.js" /> + <include name="direct\PollingProvider.js" /> + <include name="direct\RemotingProvider.js" /> + <include name="data\DirectProxy.js" /> + <include name="data\DirectStore.js" /> + <include name="data\Tree.js" /> + <include name="data\GroupingStore.js" /> + <include name="widgets\Component.js" /> + <include name="widgets\Action.js" /> + <include name="widgets\Layer.js" /> + <include name="widgets\Shadow.js" /> + <include name="widgets\BoxComponent.js" /> + <include name="widgets\SplitBar.js" /> + <include name="widgets\Container.js" /> + <include name="widgets\layout\ContainerLayout.js" /> + <include name="widgets\layout\FitLayout.js" /> + <include name="widgets\layout\CardLayout.js" /> + <include name="widgets\layout\AnchorLayout.js" /> + <include name="widgets\layout\ColumnLayout.js" /> + <include name="widgets\layout\BorderLayout.js" /> + <include name="widgets\layout\FormLayout.js" /> + <include name="widgets\layout\AccordionLayout.js" /> + <include name="widgets\layout\TableLayout.js" /> + <include name="widgets\layout\AbsoluteLayout.js" /> + <include name="widgets\Viewport.js" /> + <include name="widgets\layout\BoxLayout.js" /> + <include name="widgets\Panel.js" /> + <include name="widgets\Window.js" /> + <include name="widgets\WindowManager.js" /> + <include name="widgets\PanelDD.js" /> + <include name="state\Provider.js" /> + <include name="state\StateManager.js" /> + <include name="state\CookieProvider.js" /> + <include name="widgets\DataView.js" /> + <include name="widgets\list\ListView.js" /> + <include name="widgets\list\ColumnResizer.js" /> + <include name="widgets\list\Sorter.js" /> + <include name="widgets\ColorPalette.js" /> + <include name="widgets\DatePicker.js" /> + <include name="widgets\TabPanel.js" /> + <include name="widgets\Button.js" /> + <include name="widgets\SplitButton.js" /> + <include name="widgets\CycleButton.js" /> + <include name="widgets\Toolbar.js" /> + <include name="widgets\PagingToolbar.js" /> + <include name="widgets\Resizable.js" /> + <include name="widgets\Editor.js" /> + <include name="widgets\MessageBox.js" /> + <include name="widgets\tips\Tip.js" /> + <include name="widgets\tips\ToolTip.js" /> + <include name="widgets\tips\QuickTip.js" /> + <include name="widgets\tips\QuickTips.js" /> + <include name="widgets\tree\TreePanel.js" /> + <include name="widgets\tree\TreeEventModel.js" /> + <include name="widgets\tree\TreeSelectionModel.js" /> + <include name="widgets\tree\TreeNode.js" /> + <include name="widgets\tree\AsyncTreeNode.js" /> + <include name="widgets\tree\TreeNodeUI.js" /> + <include name="widgets\tree\TreeLoader.js" /> + <include name="widgets\tree\TreeFilter.js" /> + <include name="widgets\tree\TreeSorter.js" /> + <include name="widgets\tree\TreeDropZone.js" /> + <include name="widgets\tree\TreeDragZone.js" /> + <include name="widgets\tree\TreeEditor.js" /> + <include name="widgets\menu\Menu.js" /> + <include name="widgets\menu\MenuMgr.js" /> + <include name="widgets\menu\BaseItem.js" /> + <include name="widgets\menu\TextItem.js" /> + <include name="widgets\menu\Separator.js" /> + <include name="widgets\menu\Item.js" /> + <include name="widgets\menu\CheckItem.js" /> + <include name="widgets\menu\Adapter.js" /> + <include name="widgets\menu\DateItem.js" /> + <include name="widgets\menu\ColorItem.js" /> + <include name="widgets\menu\DateMenu.js" /> + <include name="widgets\menu\ColorMenu.js" /> + <include name="widgets\form\Field.js" /> + <include name="widgets\form\TextField.js" /> + <include name="widgets\form\TriggerField.js" /> + <include name="widgets\form\TextArea.js" /> + <include name="widgets\form\NumberField.js" /> + <include name="widgets\form\DateField.js" /> + <include name="widgets\form\DisplayField.js" /> + <include name="widgets\form\Combo.js" /> + <include name="widgets\form\Checkbox.js" /> + <include name="widgets\form\CheckboxGroup.js" /> + <include name="widgets\form\Radio.js" /> + <include name="widgets\form\RadioGroup.js" /> + <include name="widgets\form\Hidden.js" /> + <include name="widgets\form\BasicForm.js" /> + <include name="widgets\form\Form.js" /> + <include name="widgets\form\FieldSet.js" /> + <include name="widgets\form\HtmlEditor.js" /> + <include name="widgets\form\TimeField.js" /> + <include name="widgets\form\Label.js" /> + <include name="widgets\form\Action.js" /> + <include name="widgets\form\VTypes.js" /> + <include name="widgets\grid\GridPanel.js" /> + <include name="widgets\grid\GridView.js" /> + <include name="widgets\grid\GroupingView.js" /> + <include name="widgets\grid\ColumnDD.js" /> + <include name="widgets\grid\ColumnSplitDD.js" /> + <include name="widgets\grid\GridDD.js" /> + <include name="widgets\grid\ColumnModel.js" /> + <include name="widgets\grid\AbstractSelectionModel.js" /> + <include name="widgets\grid\RowSelectionModel.js" /> + <include name="widgets\grid\CellSelectionModel.js" /> + <include name="widgets\grid\EditorGrid.js" /> + <include name="widgets\grid\GridEditor.js" /> + <include name="widgets\grid\PropertyGrid.js" /> + <include name="widgets\grid\Column.js" /> + <include name="widgets\grid\RowNumberer.js" /> + <include name="widgets\grid\CheckboxSelectionModel.js" /> + <include name="widgets\LoadMask.js" /> + <include name="widgets\ProgressBar.js" /> + <include name="debug.js" /> + <include name="widgets\chart\swfobject.js" /> + <include name="widgets\chart\FlashComponent.js" /> + <include name="widgets\chart\EventProxy.js" /> + <include name="widgets\Slider.js" /> + <include name="util\Cookies.js" /> + <include name="widgets\chart\Chart.js" /> + <include name="util\History.js" /> + </target> + <file name="layout\LayoutRegionLite.js" path="layout" /> + <file name="DDScrollManager.js" path="" /> + <file name="grid\AbstractColumnModel.js" path="grid" /> + <file name="data\ArrayAdapter.js" path="data" /> + <file name="data\DataAdapter.js" path="data" /> + <file name="data\HttpAdapter.js" path="data" /> + <file name="data\JsonAdapter.js" path="data" /> + <file name="data\ArrayProxy.js" path="data" /> + <file name="widgets\SimpleMenu.js" path="widgets" /> + <file name="CSS.js" path="" /> + <file name="CustomTagReader.js" path="" /> + <file name="Format.js" path="" /> + <file name="JSON.js" path="" /> + <file name="MixedCollection.js" path="" /> + <file name="data\DataSource.js" path="data" /> + <file name="yui-ext-dl.jsb" path="" /> + <file name="yui-ext.jsb" path="" /> + <file name="form\FloatingEditor.js" path="form" /> + <file name="anim\Actor.js" path="anim" /> + <file name="anim\Animator.js" path="anim" /> + <file name="data\AbstractDataModel.js" path="data" /> + <file name="data\DataModel.js" path="data" /> + <file name="data\DataSet.js" path="data" /> + <file name="data\DataStore.js" path="data" /> + <file name="data\DefaultDataModel.js" path="data" /> + <file name="data\JSONDataModel.js" path="data" /> + <file name="data\LoadableDataModel.js" path="data" /> + <file name="data\Set.js" path="data" /> + <file name="data\TableModel.js" path="data" /> + <file name="data\XMLDataModel.js" path="data" /> + <file name="form\DateField.js" path="form" /> + <file name="form\Field.js" path="form" /> + <file name="form\FieldGroup.js" path="form" /> + <file name="form\Form.js" path="form" /> + <file name="form\NumberField.js" path="form" /> + <file name="form\Select.js" path="form" /> + <file name="form\TextArea.js" path="form" /> + <file name="form\TextField.js" path="form" /> + <file name="grid\editor\CellEditor.js" path="grid\editor" /> + <file name="grid\editor\CheckboxEditor.js" path="grid\editor" /> + <file name="grid\editor\DateEditor.js" path="grid\editor" /> + <file name="grid\editor\NumberEditor.js" path="grid\editor" /> + <file name="grid\editor\SelectEditor.js" path="grid\editor" /> + <file name="grid\editor\TextEditor.js" path="grid\editor" /> + <file name="grid\AbstractGridView.js" path="grid" /> + <file name="grid\AbstractSelectionModel.js" path="grid" /> + <file name="grid\CellSelectionModel.js" path="grid" /> + <file name="grid\DefaultColumnModel.js" path="grid" /> + <file name="grid\EditorGrid.js" path="grid" /> + <file name="grid\EditorSelectionModel.js" path="grid" /> + <file name="grid\Grid.js" path="grid" /> + <file name="grid\GridDD.js" path="grid" /> + <file name="grid\GridEditor.js" path="grid" /> + <file name="grid\GridView.js" path="grid" /> + <file name="grid\GridViewLite.js" path="grid" /> + <file name="grid\PagedGridView.js" path="grid" /> + <file name="grid\RowSelectionModel.js" path="grid" /> + <file name="grid\SelectionModel.js" path="grid" /> + <file name="layout\BasicLayoutRegion.js" path="layout" /> + <file name="layout\BorderLayout.js" path="layout" /> + <file name="layout\BorderLayoutRegions.js" path="layout" /> + <file name="layout\ContentPanels.js" path="layout" /> + <file name="layout\LayoutManager.js" path="layout" /> + <file name="layout\LayoutRegion.js" path="layout" /> + <file name="layout\LayoutStateManager.js" path="layout" /> + <file name="layout\SplitLayoutRegion.js" path="layout" /> + <file name="menu\Adapter.js" path="menu" /> + <file name="menu\BaseItem.js" path="menu" /> + <file name="menu\CheckItem.js" path="menu" /> + <file name="menu\ColorItem.js" path="menu" /> + <file name="menu\DateItem.js" path="menu" /> + <file name="menu\DateMenu.js" path="menu" /> + <file name="menu\Item.js" path="menu" /> + <file name="menu\Menu.js" path="menu" /> + <file name="menu\MenuMgr.js" path="menu" /> + <file name="menu\Separator.js" path="menu" /> + <file name="menu\TextItem.js" path="menu" /> + <file name="tree\AsyncTreeNode.js" path="tree" /> + <file name="tree\TreeDragZone.js" path="tree" /> + <file name="tree\TreeDropZone.js" path="tree" /> + <file name="tree\TreeFilter.js" path="tree" /> + <file name="tree\TreeLoader.js" path="tree" /> + <file name="tree\TreeNode.js" path="tree" /> + <file name="tree\TreeNodeUI.js" path="tree" /> + <file name="tree\TreePanel.js" path="tree" /> + <file name="tree\TreeSelectionModel.js" path="tree" /> + <file name="tree\TreeSorter.js" path="tree" /> + <file name="widgets\BasicDialog2.js" path="widgets" /> + <file name="widgets\InlineEditor.js" path="widgets" /> + <file name="widgets\TaskPanel.js" path="widgets" /> + <file name="widgets\TemplateView.js" path="widgets" /> + <file name="Anims.js" path="" /> + <file name="Bench.js" path="" /> + <file name="compat.js" path="" /> + <file name="CompositeElement.js" path="" /> + <file name="Date.js" path="" /> + <file name="DomHelper.js" path="" /> + <file name="DomQuery.js" path="" /> + <file name="Element.js" path="" /> + <file name="EventManager.js" path="" /> + <file name="Ext.js" path="" /> + <file name="Fx.js" path="" /> + <file name="KeyMap.js" path="" /> + <file name="KeyNav.js" path="" /> + <file name="Layer.js" path="" /> + <file name="State.js" path="" /> + <file name="Template.js" path="" /> + <file name="UpdateManager.js" path="" /> + <file name="yutil.js" path="" /> + <file name=".DS_Store" path="" /> + <file name="widgets\form\Select.js" path="widgets\form" /> + <file name="widgets\Notifier.js" path="widgets" /> + <file name="yui\dragdrop.js" path="yui" /> + <file name="yui-overrides.js" path="" /> + <target name="YUI" file="$output\adapter\yui\ext-yui-adapter.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="core\Ext.js" /> + <include name="adapter\yui-bridge.js" /> + </target> + <target name="Menus" file="$output\package\menu\menus.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\menu\Menu.js" /> + <include name="widgets\menu\MenuMgr.js" /> + <include name="widgets\menu\BaseItem.js" /> + <include name="widgets\menu\TextItem.js" /> + <include name="widgets\menu\Separator.js" /> + <include name="widgets\menu\Item.js" /> + <include name="widgets\menu\CheckItem.js" /> + <include name="widgets\menu\Adapter.js" /> + <include name="widgets\menu\DateItem.js" /> + <include name="widgets\menu\ColorItem.js" /> + <include name="widgets\menu\DateMenu.js" /> + <include name="widgets\menu\ColorMenu.js" /> + </target> + <target name="Tree" file="$output\package\tree\tree.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="data\Tree.js" /> + <include name="widgets\tree\TreeEventModel.js" /> + <include name="widgets\tree\TreePanel.js" /> + <include name="widgets\tree\TreeSelectionModel.js" /> + <include name="widgets\tree\TreeNode.js" /> + <include name="widgets\tree\AsyncTreeNode.js" /> + <include name="widgets\tree\TreeNodeUI.js" /> + <include name="widgets\tree\TreeLoader.js" /> + <include name="widgets\tree\TreeFilter.js" /> + <include name="widgets\tree\TreeSorter.js" /> + <include name="widgets\tree\TreeDropZone.js" /> + <include name="widgets\tree\TreeDragZone.js" /> + <include name="widgets\tree\TreeEditor.js" /> + </target> + <target name="Grid" file="$output\package\grid\grid.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\grid\Grid.js" /> + <include name="widgets\grid\AbstractGridView.js" /> + <include name="widgets\grid\GridView.js" /> + <include name="widgets\grid\ColumnModel.js" /> + <include name="widgets\grid\AbstractSelectionModel.js" /> + <include name="widgets\grid\RowSelectionModel.js" /> + <include name="widgets\grid\CellSelectionModel.js" /> + <include name="widgets\grid\ColumnDD.js" /> + <include name="widgets\grid\ColumnSplitDD.js" /> + <include name="widgets\grid\GridDD.js" /> + </target> + <target name="Dialog" file="$output\package\dialog\dialogs.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\BasicDialog.js" /> + <include name="widgets\MessageBox.js" /> + </target> + <target name="Form" file="$output\package\form\form.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\form\Field.js" /> + <include name="widgets\form\TextField.js" /> + <include name="widgets\form\TriggerField.js" /> + <include name="widgets\form\TextArea.js" /> + <include name="widgets\form\NumberField.js" /> + <include name="widgets\form\Label.js" /> + <include name="widgets\form\DateField.js" /> + <include name="widgets\form\Checkbox.js" /> + <include name="widgets\form\Radio.js" /> + <include name="widgets\form\Combo.js" /> + <include name="widgets\Editor.js" /> + <include name="widgets\form\BasicForm.js" /> + <include name="widgets\form\Form.js" /> + <include name="widgets\form\Action.js" /> + <include name="widgets\form\VTypes.js" /> + </target> + <target name="Button" file="$output\package\button\button.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\Button.js" /> + <include name="widgets\SplitButton.js" /> + </target> + <target name="Grid - Edit" file="$output\package\grid\edit-grid.js" debug="True" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\grid\EditorGrid.js" /> + <include name="widgets\grid\GridEditor.js" /> + <include name="widgets\grid\PropertyGrid.js" /> + </target> + <target name="JQUERY" file="$output\adapter\jquery\ext-jquery-adapter.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="core\Ext.js" /> + <include name="adapter\jquery-bridge.js" /> + </target> + <target name="Utilities" file="$output\package\util.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="util\DelayedTask.js" /> + <include name="util\MixedCollection.js" /> + <include name="util\JSON.js" /> + <include name="util\Format.js" /> + <include name="util\CSS.js" /> + <include name="util\ClickRepeater.js" /> + <include name="util\KeyNav.js" /> + <include name="util\KeyMap.js" /> + <include name="util\TextMetrics.js" /> + </target> + <target name="Drag Drop" file="$output\package\dragdrop\dragdrop.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="dd\DDCore.js" /> + <include name="dd\ScrollManager.js" /> + <include name="dd\Registry.js" /> + <include name="dd\StatusProxy.js" /> + <include name="dd\DragSource.js" /> + <include name="dd\DropTarget.js" /> + <include name="dd\DragZone.js" /> + <include name="dd\DropZone.js" /> + </target> + <target name="Data" file="$output\package\data\data.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="data\SortTypes.js" /> + <include name="data\Record.js" /> + <include name="data\StoreMgr.js" /> + <include name="data\Store.js" /> + <include name="data\SimpleStore.js" /> + <include name="data\Connection.js" /> + <include name="data\DataField.js" /> + <include name="data\DataReader.js" /> + <include name="data\DataProxy.js" /> + <include name="data\MemoryProxy.js" /> + <include name="data\HttpProxy.js" /> + <include name="data\ScriptTagProxy.js" /> + <include name="data\JsonReader.js" /> + <include name="data\XmlReader.js" /> + <include name="data\ArrayReader.js" /> + </target> + <target name="Widget Core" file="$output\package\widget-core.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\ComponentMgr.js" /> + <include name="widgets\Component.js" /> + <include name="widgets\BoxComponent.js" /> + <include name="widgets\Layer.js" /> + <include name="widgets\Shadow.js" /> + </target> + <target name="color-palette" file="$output\package\color-palette.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\ColorPalette.js" /> + </target> + <target name="Date Picker" file="$output\package\datepicker\datepicker.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\DatePicker.js" /> + </target> + <target name="Tabs" file="$output\package\tabs\tabs.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\TabPanel.js" /> + </target> + <target name="Toolbar" file="$output\package\toolbar\toolbar.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\Toolbar.js" /> + <include name="widgets\PagingToolbar.js" /> + </target> + <target name="Resizable" file="$output\package\resizable.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\Resizable.js" /> + </target> + <target name="SplitBar" file="$output\package\splitbar.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\SplitBar.js" /> + </target> + <target name="QTips" file="$output\package\qtips\qtips.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="widgets\tips\Tip.js" /> + <include name="widgets\tips\ToolTip.js" /> + <include name="widgets\tips\QuickTip.js" /> + <include name="widgets\tips\QuickTips.js" /> + </target> + <file name="util\CustomTagReader.js" path="util" /> + <target name="Date" file="$output\package\date.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="util\Date.js" /> + </target> + <file name="widgets\Combo.js" path="widgets" /> + <target name="Prototype" file="$output\adapter\prototype\ext-prototype-adapter.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="core\Ext.js" /> + <include name="adapter\prototype-bridge.js" /> + </target> + <file name="widgets\form\Validators.js" path="widgets\form" /> + <file name="experimental\ext-lang-en.js" path="experimental" /> + <file name="experimental\jquery-bridge.js" path="experimental" /> + <file name="experimental\prototype-bridge.js" path="experimental" /> + <file name="experimental\yui-bridge.js" path="experimental" /> + <file name="widgets\Frame.js" path="widgets" /> + <file name="widgets\.DS_Store" path="widgets" /> + <file name="widgets\layout\AutoLayout.js" path="widgets\layout" /> + <file name="widgets\TabPanel2.js" path="widgets" /> + <file name="widgets\panel\ButtonPanel.js" path="widgets\panel" /> + <file name="widgets\._.DS_Store" path="widgets" /> + <file name="._.DS_Store" path="" /> + <file name="experimental\Ajax.js" path="experimental" /> + <file name="experimental\Anims.js" path="experimental" /> + <file name="experimental\BasicDialog2.js" path="experimental" /> + <file name="experimental\BasicGridView.js" path="experimental" /> + <file name="experimental\GridView3.js" path="experimental" /> + <file name="experimental\GridViewUI.js" path="experimental" /> + <file name="experimental\ModelEventHandler.js" path="experimental" /> + <file name="experimental\TaskPanel.js" path="experimental" /> + <file name="experimental\UIEventHandler.js" path="experimental" /> + <file name="legacy\Actor.js" path="legacy" /> + <file name="legacy\Animator.js" path="legacy" /> + <file name="legacy\compat.js" path="legacy" /> + <file name="legacy\InlineEditor.js" path="legacy" /> + <file name="widgets\grid\Grid.js" path="widgets\grid" /> + <file name="widgets\panel\AutoLayout.js" path="widgets\panel" /> + <file name="widgets\panel\BorderLayout.js" path="widgets\panel" /> + <file name="widgets\panel\Container.js" path="widgets\panel" /> + <file name="widgets\panel\ContainerLayout.js" path="widgets\panel" /> + <file name="widgets\panel\Grid.js" path="widgets\panel" /> + <file name="widgets\panel\Panel.js" path="widgets\panel" /> + <file name="widgets\panel\TabPanel.js" path="widgets\panel" /> + <file name="widgets\panel\TreePanel.js" path="widgets\panel" /> + <file name="widgets\panel\Viewport.js" path="widgets\panel" /> + <file name="widgets\panel\Window.js" path="widgets\panel" /> + <file name="widgets\panel\WindowManager.js" path="widgets\panel" /> + <file name="widgets\BasicDialog.js" path="widgets" /> + <file name="experimental\GridExtensions.js" path="experimental" /> + <file name="widgets\layout\BasicLayoutRegion.js" path="widgets\layout" /> + <file name="widgets\layout\BorderLayoutRegions.js" path="widgets\layout" /> + <file name="widgets\layout\ContentPanels.js" path="widgets\layout" /> + <file name="widgets\layout\LayoutManager.js" path="widgets\layout" /> + <file name="widgets\layout\LayoutRegion.js" path="widgets\layout" /> + <file name="widgets\layout\LayoutStateManager.js" path="widgets\layout" /> + <file name="widgets\layout\ReaderLayout.js" path="widgets\layout" /> + <file name="widgets\layout\SplitLayoutRegion.js" path="widgets\layout" /> + <target name="Ext Base" file="$output\adapter\ext\ext-base.js" debug="False" shorthand="False" shorthand-list="YAHOO.util.Dom.setStyle
YAHOO.util.Dom.getStyle
YAHOO.util.Dom.getRegion
YAHOO.util.Dom.getViewportHeight
YAHOO.util.Dom.getViewportWidth
YAHOO.util.Dom.get
YAHOO.util.Dom.getXY
YAHOO.util.Dom.setXY
YAHOO.util.CustomEvent
YAHOO.util.Event.addListener
YAHOO.util.Event.getEvent
YAHOO.util.Event.getTarget
YAHOO.util.Event.preventDefault
YAHOO.util.Event.stopEvent
YAHOO.util.Event.stopPropagation
YAHOO.util.Event.stopEvent
YAHOO.util.Anim
YAHOO.util.Motion
YAHOO.util.Connect.asyncRequest
YAHOO.util.Connect.setForm
YAHOO.util.Dom
YAHOO.util.Event"> + <include name="core\Ext.js" /> + <include name="adapter\ext-base.js" /> + </target> + <file name="widgets\form\Editor.js" path="widgets\form" /> + <file name="experimental\ext-base.js" path="experimental" /> + <file name="widgets\ViewPanel.js" path="widgets" /> + <file name="util\MasterTemplate.js" path="util" /> + <file name="widgets\form\Layout.js" path="widgets\form" /> + <file name="widgets\BorderLayout.js" path="widgets" /> + <file name="widgets\ColumnLayout.js" path="widgets" /> + <file name="widgets\ContainerLayout.js" path="widgets" /> + <file name="widgets\JsonView.js" path="widgets" /> + <file name="widgets\MenuButton.js" path="widgets" /> + <file name="widgets\View.js" path="widgets" /> + <file name="widgets\grid\AbstractGridView.js" path="widgets\grid" /> + <file name="state\State.js" path="state" /> + <file name="widgets\layout\AccordianLayout.js" path="widgets\layout" /> + <file name="widgets\QuickTips.js" path="widgets" /> + <file name="locale\ext-lang-sp.js" path="locale" /> + <file name="locale\ext-lang-no.js" path="locale" /> + <file name="widgets\layout\AbsoluteForm.js" path="widgets\layout" /> + <file name="widgets\layout\AbsoluteFormLayout.js" path="widgets\layout" /> + <file name="widgets\grid\GridColumn.js" path="widgets\grid" /> + <file name="widgets\chart\Base.js" path="widgets\chart" /> + <file name="legacy\layout\BasicLayoutRegion.js" path="legacy\layout" /> + <file name="legacy\layout\BorderLayout.js" path="legacy\layout" /> + <file name="legacy\layout\BorderLayoutRegions.js" path="legacy\layout" /> + <file name="legacy\layout\ContentPanels.js" path="legacy\layout" /> + <file name="legacy\layout\LayoutManager.js" path="legacy\layout" /> + <file name="legacy\layout\LayoutRegion.js" path="legacy\layout" /> + <file name="legacy\layout\LayoutStateManager.js" path="legacy\layout" /> + <file name="legacy\layout\ReaderLayout.js" path="legacy\layout" /> + <file name="legacy\layout\SplitLayoutRegion.js" path="legacy\layout" /> + <file name="legacy\AbstractGridView.js" path="legacy" /> + <file name="legacy\BasicDialog.js" path="legacy" /> + <file name="legacy\GridView2.js" path="legacy" /> + <file name="legacy\JsonView.js" path="legacy" /> + <file name="legacy\MasterTemplate.js" path="legacy" /> + <file name="legacy\View.js" path="legacy" /> + <file name="widgets\chart\FlashPanel.js" path="widgets\chart" /> + <file name="widgets\ListView.js" path="widgets" /> + <file name="ext.jsb" path="" /> + <file name="license.txt" path="" /> + <file name="data\Direct.js" path="data" /> + <file name="data\DirectProvider.js" path="data" /> + <file name="adapter\ext-base.js" path="adapter" /> + <file name="adapter\jquery-bridge.js" path="adapter" /> + <file name="adapter\prototype-bridge.js" path="adapter" /> + <file name="adapter\yui-bridge.js" path="adapter" /> + <file name="core\CompositeElement.js" path="core" /> + <file name="core\DomHelper.js" path="core" /> + <file name="core\DomQuery.js" path="core" /> + <file name="core\Element.alignment.js" path="core" /> + <file name="core\Element.dd.js" path="core" /> + <file name="core\Element.insertion.js" path="core" /> + <file name="core\Element.js" path="core" /> + <file name="core\Element.keys.js" path="core" /> + <file name="core\Element.legacy.js" path="core" /> + <file name="core\Element.scroll.js" path="core" /> + <file name="core\EventManager.js" path="core" /> + <file name="core\Ext.js" path="core" /> + <file name="core\Fx.js" path="core" /> + <file name="core\Template.js" path="core" /> + <file name="core\UpdateManager.js" path="core" /> + <file name="data\ArrayReader.js" path="data" /> + <file name="data\Connection.js" path="data" /> + <file name="data\DataField.js" path="data" /> + <file name="data\DataProxy.js" path="data" /> + <file name="data\DataReader.js" path="data" /> + <file name="data\DirectProxy.js" path="data" /> + <file name="data\DirectStore.js" path="data" /> + <file name="data\GroupingStore.js" path="data" /> + <file name="data\HttpProxy.js" path="data" /> + <file name="data\JsonReader.js" path="data" /> + <file name="data\JsonStore.js" path="data" /> + <file name="data\MemoryProxy.js" path="data" /> + <file name="data\Record.js" path="data" /> + <file name="data\ScriptTagProxy.js" path="data" /> + <file name="data\SimpleStore.js" path="data" /> + <file name="data\SortTypes.js" path="data" /> + <file name="data\Store.js" path="data" /> + <file name="data\StoreMgr.js" path="data" /> + <file name="data\Tree.js" path="data" /> + <file name="data\XmlReader.js" path="data" /> + <file name="data\XmlStore.js" path="data" /> + <file name="dd\DDCore.js" path="dd" /> + <file name="dd\DragSource.js" path="dd" /> + <file name="dd\DragTracker.js" path="dd" /> + <file name="dd\DragZone.js" path="dd" /> + <file name="dd\DropTarget.js" path="dd" /> + <file name="dd\DropZone.js" path="dd" /> + <file name="dd\Registry.js" path="dd" /> + <file name="dd\ScrollManager.js" path="dd" /> + <file name="dd\StatusProxy.js" path="dd" /> + <file name="direct\Direct.js" path="direct" /> + <file name="direct\Event.js" path="direct" /> + <file name="direct\JsonProvider.js" path="direct" /> + <file name="direct\PollingProvider.js" path="direct" /> + <file name="direct\Provider.js" path="direct" /> + <file name="direct\RemotingProvider.js" path="direct" /> + <file name="direct\Transaction.js" path="direct" /> + <file name="locale\ext-lang-af.js" path="locale" /> + <file name="locale\ext-lang-bg.js" path="locale" /> + <file name="locale\ext-lang-ca.js" path="locale" /> + <file name="locale\ext-lang-cs.js" path="locale" /> + <file name="locale\ext-lang-da.js" path="locale" /> + <file name="locale\ext-lang-de.js" path="locale" /> + <file name="locale\ext-lang-el_GR.js" path="locale" /> + <file name="locale\ext-lang-en.js" path="locale" /> + <file name="locale\ext-lang-en_GB.js" path="locale" /> + <file name="locale\ext-lang-es.js" path="locale" /> + <file name="locale\ext-lang-fa.js" path="locale" /> + <file name="locale\ext-lang-fi.js" path="locale" /> + <file name="locale\ext-lang-fr.js" path="locale" /> + <file name="locale\ext-lang-fr_CA.js" path="locale" /> + <file name="locale\ext-lang-gr.js" path="locale" /> + <file name="locale\ext-lang-he.js" path="locale" /> + <file name="locale\ext-lang-hr.js" path="locale" /> + <file name="locale\ext-lang-hu.js" path="locale" /> + <file name="locale\ext-lang-id.js" path="locale" /> + <file name="locale\ext-lang-it.js" path="locale" /> + <file name="locale\ext-lang-ja.js" path="locale" /> + <file name="locale\ext-lang-ko.js" path="locale" /> + <file name="locale\ext-lang-lt.js" path="locale" /> + <file name="locale\ext-lang-lv.js" path="locale" /> + <file name="locale\ext-lang-mk.js" path="locale" /> + <file name="locale\ext-lang-nl.js" path="locale" /> + <file name="locale\ext-lang-no_NB.js" path="locale" /> + <file name="locale\ext-lang-no_NN.js" path="locale" /> + <file name="locale\ext-lang-pl.js" path="locale" /> + <file name="locale\ext-lang-pt.js" path="locale" /> + <file name="locale\ext-lang-pt_BR.js" path="locale" /> + <file name="locale\ext-lang-ro.js" path="locale" /> + <file name="locale\ext-lang-ru.js" path="locale" /> + <file name="locale\ext-lang-sk.js" path="locale" /> + <file name="locale\ext-lang-sl.js" path="locale" /> + <file name="locale\ext-lang-sr.js" path="locale" /> + <file name="locale\ext-lang-sr_RS.js" path="locale" /> + <file name="locale\ext-lang-sv_SE.js" path="locale" /> + <file name="locale\ext-lang-th.js" path="locale" /> + <file name="locale\ext-lang-tr.js" path="locale" /> + <file name="locale\ext-lang-ukr.js" path="locale" /> + <file name="locale\ext-lang-vn.js" path="locale" /> + <file name="locale\ext-lang-zh_CN.js" path="locale" /> + <file name="locale\ext-lang-zh_TW.js" path="locale" /> + <file name="state\CookieProvider.js" path="state" /> + <file name="state\Provider.js" path="state" /> + <file name="state\StateManager.js" path="state" /> + <file name="util\ClickRepeater.js" path="util" /> + <file name="util\Cookies.js" path="util" /> + <file name="util\CSS.js" path="util" /> + <file name="util\Date.js" path="util" /> + <file name="util\DelayedTask.js" path="util" /> + <file name="util\Format.js" path="util" /> + <file name="util\History.js" path="util" /> + <file name="util\JSON.js" path="util" /> + <file name="util\KeyMap.js" path="util" /> + <file name="util\KeyNav.js" path="util" /> + <file name="util\MixedCollection.js" path="util" /> + <file name="util\Observable.js" path="util" /> + <file name="util\TaskMgr.js" path="util" /> + <file name="util\TextMetrics.js" path="util" /> + <file name="util\XTemplate.js" path="util" /> + <file name="widgets\chart\Chart.js" path="widgets\chart" /> + <file name="widgets\chart\EventProxy.js" path="widgets\chart" /> + <file name="widgets\chart\FlashComponent.js" path="widgets\chart" /> + <file name="widgets\chart\swfobject.js" path="widgets\chart" /> + <file name="widgets\form\Action.js" path="widgets\form" /> + <file name="widgets\form\BasicForm.js" path="widgets\form" /> + <file name="widgets\form\Checkbox.js" path="widgets\form" /> + <file name="widgets\form\CheckboxGroup.js" path="widgets\form" /> + <file name="widgets\form\Combo.js" path="widgets\form" /> + <file name="widgets\form\DateField.js" path="widgets\form" /> + <file name="widgets\form\DisplayField.js" path="widgets\form" /> + <file name="widgets\form\Field.js" path="widgets\form" /> + <file name="widgets\form\FieldSet.js" path="widgets\form" /> + <file name="widgets\form\Form.js" path="widgets\form" /> + <file name="widgets\form\Hidden.js" path="widgets\form" /> + <file name="widgets\form\HtmlEditor.js" path="widgets\form" /> + <file name="widgets\form\Label.js" path="widgets\form" /> + <file name="widgets\form\NumberField.js" path="widgets\form" /> + <file name="widgets\form\Radio.js" path="widgets\form" /> + <file name="widgets\form\RadioGroup.js" path="widgets\form" /> + <file name="widgets\form\TextArea.js" path="widgets\form" /> + <file name="widgets\form\TextField.js" path="widgets\form" /> + <file name="widgets\form\TimeField.js" path="widgets\form" /> + <file name="widgets\form\TriggerField.js" path="widgets\form" /> + <file name="widgets\form\VTypes.js" path="widgets\form" /> + <file name="widgets\grid\AbstractSelectionModel.js" path="widgets\grid" /> + <file name="widgets\grid\CellSelectionModel.js" path="widgets\grid" /> + <file name="widgets\grid\CheckboxSelectionModel.js" path="widgets\grid" /> + <file name="widgets\grid\Column.js" path="widgets\grid" /> + <file name="widgets\grid\ColumnDD.js" path="widgets\grid" /> + <file name="widgets\grid\ColumnModel.js" path="widgets\grid" /> + <file name="widgets\grid\ColumnSplitDD.js" path="widgets\grid" /> + <file name="widgets\grid\EditorGrid.js" path="widgets\grid" /> + <file name="widgets\grid\GridDD.js" path="widgets\grid" /> + <file name="widgets\grid\GridEditor.js" path="widgets\grid" /> + <file name="widgets\grid\GridPanel.js" path="widgets\grid" /> + <file name="widgets\grid\GridView.js" path="widgets\grid" /> + <file name="widgets\grid\GroupingView.js" path="widgets\grid" /> + <file name="widgets\grid\PropertyGrid.js" path="widgets\grid" /> + <file name="widgets\grid\RowNumberer.js" path="widgets\grid" /> + <file name="widgets\grid\RowSelectionModel.js" path="widgets\grid" /> + <file name="widgets\layout\AbsoluteLayout.js" path="widgets\layout" /> + <file name="widgets\layout\AccordionLayout.js" path="widgets\layout" /> + <file name="widgets\layout\AnchorLayout.js" path="widgets\layout" /> + <file name="widgets\layout\BorderLayout.js" path="widgets\layout" /> + <file name="widgets\layout\BoxLayout.js" path="widgets\layout" /> + <file name="widgets\layout\CardLayout.js" path="widgets\layout" /> + <file name="widgets\layout\ColumnLayout.js" path="widgets\layout" /> + <file name="widgets\layout\ContainerLayout.js" path="widgets\layout" /> + <file name="widgets\layout\FitLayout.js" path="widgets\layout" /> + <file name="widgets\layout\FormLayout.js" path="widgets\layout" /> + <file name="widgets\layout\TableLayout.js" path="widgets\layout" /> + <file name="widgets\list\ColumnResizer.js" path="widgets\list" /> + <file name="widgets\list\ListView.js" path="widgets\list" /> + <file name="widgets\list\Sorter.js" path="widgets\list" /> + <file name="widgets\menu\Adapter.js" path="widgets\menu" /> + <file name="widgets\menu\BaseItem.js" path="widgets\menu" /> + <file name="widgets\menu\CheckItem.js" path="widgets\menu" /> + <file name="widgets\menu\ColorItem.js" path="widgets\menu" /> + <file name="widgets\menu\ColorMenu.js" path="widgets\menu" /> + <file name="widgets\menu\DateItem.js" path="widgets\menu" /> + <file name="widgets\menu\DateMenu.js" path="widgets\menu" /> + <file name="widgets\menu\Item.js" path="widgets\menu" /> + <file name="widgets\menu\Menu.js" path="widgets\menu" /> + <file name="widgets\menu\MenuMgr.js" path="widgets\menu" /> + <file name="widgets\menu\Separator.js" path="widgets\menu" /> + <file name="widgets\menu\TextItem.js" path="widgets\menu" /> + <file name="widgets\tips\QuickTip.js" path="widgets\tips" /> + <file name="widgets\tips\QuickTips.js" path="widgets\tips" /> + <file name="widgets\tips\Tip.js" path="widgets\tips" /> + <file name="widgets\tips\ToolTip.js" path="widgets\tips" /> + <file name="widgets\tree\AsyncTreeNode.js" path="widgets\tree" /> + <file name="widgets\tree\TreeDragZone.js" path="widgets\tree" /> + <file name="widgets\tree\TreeDropZone.js" path="widgets\tree" /> + <file name="widgets\tree\TreeEditor.js" path="widgets\tree" /> + <file name="widgets\tree\TreeEventModel.js" path="widgets\tree" /> + <file name="widgets\tree\TreeFilter.js" path="widgets\tree" /> + <file name="widgets\tree\TreeLoader.js" path="widgets\tree" /> + <file name="widgets\tree\TreeNode.js" path="widgets\tree" /> + <file name="widgets\tree\TreeNodeUI.js" path="widgets\tree" /> + <file name="widgets\tree\TreePanel.js" path="widgets\tree" /> + <file name="widgets\tree\TreeSelectionModel.js" path="widgets\tree" /> + <file name="widgets\tree\TreeSorter.js" path="widgets\tree" /> + <file name="widgets\Action.js" path="widgets" /> + <file name="widgets\BoxComponent.js" path="widgets" /> + <file name="widgets\Button.js" path="widgets" /> + <file name="widgets\ColorPalette.js" path="widgets" /> + <file name="widgets\Component.js" path="widgets" /> + <file name="widgets\ComponentMgr.js" path="widgets" /> + <file name="widgets\Container.js" path="widgets" /> + <file name="widgets\CycleButton.js" path="widgets" /> + <file name="widgets\DataView.js" path="widgets" /> + <file name="widgets\DatePicker.js" path="widgets" /> + <file name="widgets\Editor.js" path="widgets" /> + <file name="widgets\Layer.js" path="widgets" /> + <file name="widgets\LoadMask.js" path="widgets" /> + <file name="widgets\MessageBox.js" path="widgets" /> + <file name="widgets\PagingToolbar.js" path="widgets" /> + <file name="widgets\Panel.js" path="widgets" /> + <file name="widgets\PanelDD.js" path="widgets" /> + <file name="widgets\ProgressBar.js" path="widgets" /> + <file name="widgets\Resizable.js" path="widgets" /> + <file name="widgets\Shadow.js" path="widgets" /> + <file name="widgets\Slider.js" path="widgets" /> + <file name="widgets\SplitBar.js" path="widgets" /> + <file name="widgets\SplitButton.js" path="widgets" /> + <file name="widgets\TabPanel.js" path="widgets" /> + <file name="widgets\Toolbar.js" path="widgets" /> + <file name="widgets\Viewport.js" path="widgets" /> + <file name="widgets\Window.js" path="widgets" /> + <file name="widgets\WindowManager.js" path="widgets" /> + <file name="debug.js" path="" /> +</project> \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/license.txt =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/license.txt (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/license.txt 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,42 @@ +Ext JS - JavaScript Library +Copyright (c) 2006-2008, Ext JS, LLC +All rights reserved. +licensing@xxxxxxxxx + +http://extjs.com/license + +Open Source License +------------------------------------------------------------------------------------------ +Ext is licensed under the terms of the Open Source GPL 3.0 license. + +http://www.gnu.org/licenses/gpl.html + +There are several FLOSS exceptions available for use with this release for +open source applications that are distributed under a license other than the GPL. + +* Open Source License Exception for Applications + + http://extjs.com/products/floss-exception.php + +* Open Source License Exception for Development + + http://extjs.com/products/ux-exception.php + + +Commercial License +------------------------------------------------------------------------------------------ +This is the appropriate option if you are creating proprietary applications and you are +not prepared to distribute and share the source code of your application under the +GPL v3 license. Please visit http://extjs.com/license for more details. + + +OEM / Reseller License +------------------------------------------------------------------------------------------ +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 +General Public License for more details. \ No newline at end of file Added: mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-af.js =================================================================== --- mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-af.js (rev 0) +++ mickael/trunk/ext/v3.0.0-a1/src/locale/ext-lang-af.js 2008-12-01 20:55:57 UTC (rev 32) @@ -0,0 +1,178 @@ +/* + * 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 = '<div class="loading-indicator">Besig om te laai...</div>'; + +/* Ext single string translations */ +if(Ext.View){ + Ext.View.prototype.emptyText = ""; +} + +if(Ext.grid.GridPanel){ + Ext.grid.GridPanel.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@xxxxxxxxx'", + urlText : "Hierdie veld moet 'n