From 101ad99c148196abd75c9294fbbf620e99626219 Mon Sep 17 00:00:00 2001 From: Damien Churchill Date: Mon, 9 Jan 2012 22:34:47 +0000 Subject: [PATCH] web: update to extjs 3.4.0 There are numerous fixes to the framework between 3.1.1 and 3.4.0 and since there are no obvious bugs introduced it's only sensible to pull the update in to the stable branch --- deluge/ui/web/css/deluge.css | 2 +- deluge/ui/web/css/ext-all-notheme.css | 430 +- deluge/ui/web/css/ext-extensions-debug.css | 122 + deluge/ui/web/js/deluge-all/Statusbar.js | 18 +- deluge/ui/web/js/ext-all-debug.js | 27029 ++++++++++------ deluge/ui/web/js/ext-all.js | 19 +- deluge/ui/web/js/ext-base-debug.js | 3577 +- deluge/ui/web/js/ext-base.js | 10 +- deluge/ui/web/js/ext-extensions/StatusBar.js | 21 +- deluge/ui/web/themes/css/xtheme-access.css | 2170 +- deluge/ui/web/themes/css/xtheme-blue.css | 1981 +- deluge/ui/web/themes/css/xtheme-gray.css | 1975 +- .../access/form/date-trigger - Copy.gif | Bin 1998 -> 0 bytes .../access/form/search-trigger - Copy.gif | Bin 2106 -> 0 bytes .../images/access/form/search-trigger.gif | Bin 2134 -> 1534 bytes .../images/access/form/search-trigger.psd | Bin 47157 -> 49761 bytes .../images/access/form/trigger - Copy.gif | Bin 1877 -> 0 bytes .../access/panel/tool-sprites - Copy.gif | Bin 1705 -> 0 bytes .../images/access/panel/tool-sprites.gif | Bin 1822 -> 1981 bytes .../images/access/tabs/tab-btm-left-bg.gif | Bin 117 -> 512 bytes .../images/access/tabs/tab-btm-right-bg.gif | Bin 512 -> 117 bytes .../images/default/form/trigger-square.gif | Bin 0 -> 1810 bytes .../images/default/form/trigger-square.psd | Bin 0 -> 36542 bytes .../themes/images/default/form/trigger.gif | Bin 1688 -> 1816 bytes .../themes/images/default/form/trigger.psd | Bin 10829 -> 37599 bytes .../images/default/grid/grid3-rowheader.gif | Bin 0 -> 43 bytes .../images/default/grid/refresh-disabled.gif | Bin 0 -> 577 bytes .../images/default/panel/tool-sprites.gif | Bin 4392 -> 5421 bytes .../images/gray/form/trigger-square.gif | Bin 0 -> 1071 bytes .../web/themes/images/gray/form/trigger.gif | Bin 1080 -> 1080 bytes .../web/themes/images/gray/grid/sort-hd.gif | Bin 0 -> 2731 bytes .../themes/images/gray/panel/tool-sprites.gif | Bin 4464 -> 5835 bytes .../themes/images/gray/sizer/ne-handle.gif | Bin 114 -> 128 bytes .../images/gray/window/left-corners.png | Bin 325 -> 293 bytes .../images/gray/window/left-corners.pspimage | Bin 4385 -> 0 bytes .../themes/images/gray/window/left-right.png | Bin 2815 -> 136 bytes .../images/gray/window/right-corners.png | Bin 344 -> 293 bytes .../themes/images/gray/window/top-bottom.png | Bin 2860 -> 210 bytes .../ui/web/themes/images/yourtheme/README.txt | 2 + .../images/yourtheme/box/corners-blue.gif | Bin 0 -> 1010 bytes .../themes/images/yourtheme/box/corners.gif | Bin 0 -> 1005 bytes .../themes/images/yourtheme/box/l-blue.gif | Bin 0 -> 810 bytes .../ui/web/themes/images/yourtheme/box/l.gif | Bin 0 -> 810 bytes .../themes/images/yourtheme/box/r-blue.gif | Bin 0 -> 810 bytes .../ui/web/themes/images/yourtheme/box/r.gif | Bin 0 -> 810 bytes .../themes/images/yourtheme/box/tb-blue.gif | Bin 0 -> 851 bytes .../ui/web/themes/images/yourtheme/box/tb.gif | Bin 0 -> 839 bytes .../themes/images/yourtheme/button/arrow.gif | Bin 0 -> 828 bytes .../themes/images/yourtheme/button/btn.gif | Bin 0 -> 4298 bytes .../images/yourtheme/button/group-cs.gif | Bin 0 -> 2459 bytes .../images/yourtheme/button/group-lr.gif | Bin 0 -> 861 bytes .../images/yourtheme/button/group-tb.gif | Bin 0 -> 846 bytes .../yourtheme/button/s-arrow-b-noline.gif | Bin 0 -> 898 bytes .../images/yourtheme/button/s-arrow-b.gif | Bin 0 -> 937 bytes .../images/yourtheme/button/s-arrow-bo.gif | Bin 0 -> 139 bytes .../yourtheme/button/s-arrow-noline.gif | Bin 0 -> 863 bytes .../images/yourtheme/button/s-arrow-o.gif | Bin 0 -> 937 bytes .../images/yourtheme/button/s-arrow.gif | Bin 0 -> 937 bytes .../themes/images/yourtheme/dd/drop-add.gif | Bin 0 -> 1001 bytes .../themes/images/yourtheme/dd/drop-no.gif | Bin 0 -> 949 bytes .../themes/images/yourtheme/dd/drop-yes.gif | Bin 0 -> 1016 bytes .../images/yourtheme/editor/tb-sprite.gif | Bin 0 -> 2072 bytes .../themes/images/yourtheme/form/checkbox.gif | Bin 0 -> 2061 bytes .../images/yourtheme/form/clear-trigger.gif | Bin 0 -> 1988 bytes .../images/yourtheme/form/clear-trigger.psd | Bin 0 -> 11804 bytes .../images/yourtheme/form/date-trigger.gif | Bin 0 -> 1603 bytes .../images/yourtheme/form/date-trigger.psd | Bin 0 -> 12377 bytes .../yourtheme/form/error-tip-corners.gif | Bin 0 -> 4183 bytes .../images/yourtheme/form/exclamation.gif | Bin 0 -> 996 bytes .../themes/images/yourtheme/form/radio.gif | Bin 0 -> 1746 bytes .../images/yourtheme/form/search-trigger.gif | Bin 0 -> 2182 bytes .../images/yourtheme/form/search-trigger.psd | Bin 0 -> 15601 bytes .../themes/images/yourtheme/form/text-bg.gif | Bin 0 -> 819 bytes .../images/yourtheme/form/trigger-square.gif | Bin 0 -> 1810 bytes .../images/yourtheme/form/trigger-square.psd | Bin 0 -> 36542 bytes .../images/yourtheme/form/trigger-tpl.gif | Bin 0 -> 1487 bytes .../themes/images/yourtheme/form/trigger.gif | Bin 0 -> 1816 bytes .../themes/images/yourtheme/form/trigger.psd | Bin 0 -> 37599 bytes .../themes/images/yourtheme/gradient-bg.gif | Bin 0 -> 1472 bytes .../yourtheme/grid/arrow-left-white.gif | Bin 0 -> 825 bytes .../yourtheme/grid/arrow-right-white.gif | Bin 0 -> 825 bytes .../images/yourtheme/grid/col-move-bottom.gif | Bin 0 -> 868 bytes .../images/yourtheme/grid/col-move-top.gif | Bin 0 -> 869 bytes .../themes/images/yourtheme/grid/columns.gif | Bin 0 -> 962 bytes .../themes/images/yourtheme/grid/dirty.gif | Bin 0 -> 832 bytes .../web/themes/images/yourtheme/grid/done.gif | Bin 0 -> 133 bytes .../themes/images/yourtheme/grid/drop-no.gif | Bin 0 -> 947 bytes .../themes/images/yourtheme/grid/drop-yes.gif | Bin 0 -> 860 bytes .../images/yourtheme/grid/footer-bg.gif | Bin 0 -> 834 bytes .../images/yourtheme/grid/grid-blue-hd.gif | Bin 0 -> 829 bytes .../images/yourtheme/grid/grid-blue-split.gif | Bin 0 -> 817 bytes .../images/yourtheme/grid/grid-hrow.gif | Bin 0 -> 855 bytes .../images/yourtheme/grid/grid-loading.gif | Bin 0 -> 701 bytes .../images/yourtheme/grid/grid-split.gif | Bin 0 -> 817 bytes .../images/yourtheme/grid/grid-vista-hd.gif | Bin 0 -> 829 bytes .../images/yourtheme/grid/grid3-hd-btn.gif | Bin 0 -> 1229 bytes .../images/yourtheme/grid/grid3-hrow-over.gif | Bin 0 -> 823 bytes .../images/yourtheme/grid/grid3-hrow.gif | Bin 0 -> 836 bytes .../yourtheme/grid/grid3-special-col-bg.gif | Bin 0 -> 837 bytes .../grid/grid3-special-col-sel-bg.gif | Bin 0 -> 843 bytes .../themes/images/yourtheme/grid/group-by.gif | Bin 0 -> 917 bytes .../images/yourtheme/grid/group-collapse.gif | Bin 0 -> 881 bytes .../yourtheme/grid/group-expand-sprite.gif | Bin 0 -> 955 bytes .../images/yourtheme/grid/group-expand.gif | Bin 0 -> 884 bytes .../themes/images/yourtheme/grid/hd-pop.gif | Bin 0 -> 839 bytes .../images/yourtheme/grid/hmenu-asc.gif | Bin 0 -> 931 bytes .../images/yourtheme/grid/hmenu-desc.gif | Bin 0 -> 930 bytes .../images/yourtheme/grid/hmenu-lock.gif | Bin 0 -> 955 bytes .../images/yourtheme/grid/hmenu-lock.png | Bin 0 -> 648 bytes .../images/yourtheme/grid/hmenu-unlock.gif | Bin 0 -> 971 bytes .../images/yourtheme/grid/hmenu-unlock.png | Bin 0 -> 697 bytes .../images/yourtheme/grid/invalid_line.gif | Bin 0 -> 815 bytes .../themes/images/yourtheme/grid/loading.gif | Bin 0 -> 771 bytes .../themes/images/yourtheme/grid/mso-hd.gif | Bin 0 -> 875 bytes .../themes/images/yourtheme/grid/nowait.gif | Bin 0 -> 884 bytes .../yourtheme/grid/page-first-disabled.gif | Bin 0 -> 925 bytes .../images/yourtheme/grid/page-first.gif | Bin 0 -> 925 bytes .../yourtheme/grid/page-last-disabled.gif | Bin 0 -> 923 bytes .../images/yourtheme/grid/page-last.gif | Bin 0 -> 923 bytes .../yourtheme/grid/page-next-disabled.gif | Bin 0 -> 875 bytes .../images/yourtheme/grid/page-next.gif | Bin 0 -> 875 bytes .../yourtheme/grid/page-prev-disabled.gif | Bin 0 -> 879 bytes .../images/yourtheme/grid/page-prev.gif | Bin 0 -> 879 bytes .../images/yourtheme/grid/pick-button.gif | Bin 0 -> 1036 bytes .../themes/images/yourtheme/grid/refresh.gif | Bin 0 -> 977 bytes .../yourtheme/grid/row-check-sprite.gif | Bin 0 -> 1083 bytes .../yourtheme/grid/row-expand-sprite.gif | Bin 0 -> 955 bytes .../themes/images/yourtheme/grid/row-over.gif | Bin 0 -> 823 bytes .../themes/images/yourtheme/grid/row-sel.gif | Bin 0 -> 823 bytes .../themes/images/yourtheme/grid/sort-hd.gif | Bin 0 -> 1473 bytes .../themes/images/yourtheme/grid/sort_asc.gif | Bin 0 -> 830 bytes .../images/yourtheme/grid/sort_desc.gif | Bin 0 -> 833 bytes .../web/themes/images/yourtheme/grid/wait.gif | Bin 0 -> 1100 bytes .../images/yourtheme/layout/collapse.gif | Bin 0 -> 842 bytes .../themes/images/yourtheme/layout/expand.gif | Bin 0 -> 842 bytes .../images/yourtheme/layout/gradient-bg.gif | Bin 0 -> 1472 bytes .../images/yourtheme/layout/mini-bottom.gif | Bin 0 -> 856 bytes .../images/yourtheme/layout/mini-left.gif | Bin 0 -> 871 bytes .../images/yourtheme/layout/mini-right.gif | Bin 0 -> 872 bytes .../images/yourtheme/layout/mini-top.gif | Bin 0 -> 856 bytes .../images/yourtheme/layout/ns-collapse.gif | Bin 0 -> 842 bytes .../images/yourtheme/layout/ns-expand.gif | Bin 0 -> 843 bytes .../images/yourtheme/layout/panel-close.gif | Bin 0 -> 829 bytes .../yourtheme/layout/panel-title-bg.gif | Bin 0 -> 838 bytes .../yourtheme/layout/panel-title-light-bg.gif | Bin 0 -> 835 bytes .../themes/images/yourtheme/layout/stick.gif | Bin 0 -> 874 bytes .../themes/images/yourtheme/layout/stuck.gif | Bin 0 -> 92 bytes .../images/yourtheme/layout/tab-close-on.gif | Bin 0 -> 880 bytes .../images/yourtheme/layout/tab-close.gif | Bin 0 -> 859 bytes .../themes/images/yourtheme/menu/checked.gif | Bin 0 -> 959 bytes .../images/yourtheme/menu/group-checked.gif | Bin 0 -> 891 bytes .../images/yourtheme/menu/item-over.gif | Bin 0 -> 820 bytes .../images/yourtheme/menu/menu-parent.gif | Bin 0 -> 854 bytes .../web/themes/images/yourtheme/menu/menu.gif | Bin 0 -> 834 bytes .../images/yourtheme/menu/unchecked.gif | Bin 0 -> 941 bytes .../images/yourtheme/panel/corners-sprite.gif | Bin 0 -> 1418 bytes .../images/yourtheme/panel/left-right.gif | Bin 0 -> 815 bytes .../images/yourtheme/panel/light-hd.gif | Bin 0 -> 827 bytes .../yourtheme/panel/tool-sprite-tpl.gif | Bin 0 -> 971 bytes .../images/yourtheme/panel/tool-sprites.gif | Bin 0 -> 4392 bytes .../yourtheme/panel/tools-sprites-trans.gif | Bin 0 -> 2843 bytes .../images/yourtheme/panel/top-bottom.gif | Bin 0 -> 875 bytes .../images/yourtheme/panel/top-bottom.png | Bin 0 -> 218 bytes .../yourtheme/panel/white-corners-sprite.gif | Bin 0 -> 1366 bytes .../yourtheme/panel/white-left-right.gif | Bin 0 -> 815 bytes .../yourtheme/panel/white-top-bottom.gif | Bin 0 -> 872 bytes .../images/yourtheme/progress/progress-bg.gif | Bin 0 -> 834 bytes .../web/themes/images/yourtheme/qtip/bg.gif | Bin 0 -> 1091 bytes .../themes/images/yourtheme/qtip/close.gif | Bin 0 -> 972 bytes .../yourtheme/qtip/tip-anchor-sprite.gif | Bin 0 -> 951 bytes .../images/yourtheme/qtip/tip-sprite.gif | Bin 0 -> 4271 bytes deluge/ui/web/themes/images/yourtheme/s.gif | Bin 0 -> 43 bytes .../web/themes/images/yourtheme/shadow-c.png | Bin 0 -> 118 bytes .../web/themes/images/yourtheme/shadow-lr.png | Bin 0 -> 135 bytes .../ui/web/themes/images/yourtheme/shadow.png | Bin 0 -> 311 bytes .../images/yourtheme/shared/blue-loading.gif | Bin 0 -> 3236 bytes .../images/yourtheme/shared/calendar.gif | Bin 0 -> 979 bytes .../images/yourtheme/shared/glass-bg.gif | Bin 0 -> 873 bytes .../images/yourtheme/shared/hd-sprite.gif | Bin 0 -> 1099 bytes .../images/yourtheme/shared/large-loading.gif | Bin 0 -> 3236 bytes .../images/yourtheme/shared/left-btn.gif | Bin 0 -> 870 bytes .../images/yourtheme/shared/loading-balls.gif | Bin 0 -> 2118 bytes .../images/yourtheme/shared/right-btn.gif | Bin 0 -> 871 bytes .../images/yourtheme/shared/warning.gif | Bin 0 -> 960 bytes .../images/yourtheme/sizer/e-handle-dark.gif | Bin 0 -> 1062 bytes .../images/yourtheme/sizer/e-handle.gif | Bin 0 -> 1586 bytes .../images/yourtheme/sizer/ne-handle-dark.gif | Bin 0 -> 839 bytes .../images/yourtheme/sizer/ne-handle.gif | Bin 0 -> 854 bytes .../images/yourtheme/sizer/nw-handle-dark.gif | Bin 0 -> 839 bytes .../images/yourtheme/sizer/nw-handle.gif | Bin 0 -> 853 bytes .../images/yourtheme/sizer/s-handle-dark.gif | Bin 0 -> 1060 bytes .../images/yourtheme/sizer/s-handle.gif | Bin 0 -> 1318 bytes .../images/yourtheme/sizer/se-handle-dark.gif | Bin 0 -> 838 bytes .../images/yourtheme/sizer/se-handle.gif | Bin 0 -> 853 bytes .../themes/images/yourtheme/sizer/square.gif | Bin 0 -> 864 bytes .../images/yourtheme/sizer/sw-handle-dark.gif | Bin 0 -> 839 bytes .../images/yourtheme/sizer/sw-handle.gif | Bin 0 -> 855 bytes .../images/yourtheme/slider/slider-bg.png | Bin 0 -> 300 bytes .../images/yourtheme/slider/slider-thumb.png | Bin 0 -> 933 bytes .../images/yourtheme/slider/slider-v-bg.png | Bin 0 -> 288 bytes .../yourtheme/slider/slider-v-thumb.png | Bin 0 -> 883 bytes .../images/yourtheme/tabs/scroll-left.gif | Bin 0 -> 1295 bytes .../images/yourtheme/tabs/scroll-right.gif | Bin 0 -> 1300 bytes .../images/yourtheme/tabs/scroller-bg.gif | Bin 0 -> 1100 bytes .../tabs/tab-btm-inactive-left-bg.gif | Bin 0 -> 886 bytes .../tabs/tab-btm-inactive-right-bg.gif | Bin 0 -> 1386 bytes .../images/yourtheme/tabs/tab-btm-left-bg.gif | Bin 0 -> 1402 bytes .../yourtheme/tabs/tab-btm-over-left-bg.gif | Bin 0 -> 191 bytes .../yourtheme/tabs/tab-btm-over-right-bg.gif | Bin 0 -> 638 bytes .../yourtheme/tabs/tab-btm-right-bg.gif | Bin 0 -> 863 bytes .../images/yourtheme/tabs/tab-close.gif | Bin 0 -> 896 bytes .../images/yourtheme/tabs/tab-strip-bg.gif | Bin 0 -> 835 bytes .../images/yourtheme/tabs/tab-strip-bg.png | Bin 0 -> 259 bytes .../yourtheme/tabs/tab-strip-btm-bg.gif | Bin 0 -> 826 bytes .../images/yourtheme/tabs/tabs-sprite.gif | Bin 0 -> 2120 bytes .../themes/images/yourtheme/toolbar/bg.gif | Bin 0 -> 904 bytes .../yourtheme/toolbar/btn-arrow-light.gif | Bin 0 -> 916 bytes .../images/yourtheme/toolbar/btn-arrow.gif | Bin 0 -> 919 bytes .../images/yourtheme/toolbar/btn-over-bg.gif | Bin 0 -> 837 bytes .../images/yourtheme/toolbar/gray-bg.gif | Bin 0 -> 832 bytes .../themes/images/yourtheme/toolbar/more.gif | Bin 0 -> 845 bytes .../themes/images/yourtheme/toolbar/tb-bg.gif | Bin 0 -> 862 bytes .../yourtheme/toolbar/tb-btn-sprite.gif | Bin 0 -> 1127 bytes .../yourtheme/toolbar/tb-xl-btn-sprite.gif | Bin 0 -> 1663 bytes .../images/yourtheme/toolbar/tb-xl-sep.gif | Bin 0 -> 810 bytes .../themes/images/yourtheme/tree/arrows.gif | Bin 0 -> 617 bytes .../themes/images/yourtheme/tree/drop-add.gif | Bin 0 -> 1001 bytes .../images/yourtheme/tree/drop-between.gif | Bin 0 -> 907 bytes .../themes/images/yourtheme/tree/drop-no.gif | Bin 0 -> 949 bytes .../images/yourtheme/tree/drop-over.gif | Bin 0 -> 911 bytes .../images/yourtheme/tree/drop-under.gif | Bin 0 -> 911 bytes .../themes/images/yourtheme/tree/drop-yes.gif | Bin 0 -> 1016 bytes .../yourtheme/tree/elbow-end-minus-nl.gif | Bin 0 -> 898 bytes .../images/yourtheme/tree/elbow-end-minus.gif | Bin 0 -> 905 bytes .../yourtheme/tree/elbow-end-plus-nl.gif | Bin 0 -> 900 bytes .../images/yourtheme/tree/elbow-end-plus.gif | Bin 0 -> 907 bytes .../images/yourtheme/tree/elbow-end.gif | Bin 0 -> 844 bytes .../images/yourtheme/tree/elbow-line.gif | Bin 0 -> 846 bytes .../images/yourtheme/tree/elbow-minus-nl.gif | Bin 0 -> 898 bytes .../images/yourtheme/tree/elbow-minus.gif | Bin 0 -> 908 bytes .../images/yourtheme/tree/elbow-plus-nl.gif | Bin 0 -> 900 bytes .../images/yourtheme/tree/elbow-plus.gif | Bin 0 -> 910 bytes .../themes/images/yourtheme/tree/elbow.gif | Bin 0 -> 850 bytes .../images/yourtheme/tree/folder-open.gif | Bin 0 -> 956 bytes .../themes/images/yourtheme/tree/folder.gif | Bin 0 -> 952 bytes .../web/themes/images/yourtheme/tree/leaf.gif | Bin 0 -> 945 bytes .../themes/images/yourtheme/tree/loading.gif | Bin 0 -> 771 bytes .../ui/web/themes/images/yourtheme/tree/s.gif | Bin 0 -> 43 bytes .../images/yourtheme/window/icon-error.gif | Bin 0 -> 1669 bytes .../images/yourtheme/window/icon-info.gif | Bin 0 -> 1586 bytes .../images/yourtheme/window/icon-question.gif | Bin 0 -> 1607 bytes .../images/yourtheme/window/icon-warning.gif | Bin 0 -> 1483 bytes .../images/yourtheme/window/left-corners.png | Bin 0 -> 200 bytes .../images/yourtheme/window/left-corners.psd | Bin 0 -> 15576 bytes .../images/yourtheme/window/left-right.png | Bin 0 -> 152 bytes .../images/yourtheme/window/left-right.psd | Bin 0 -> 24046 bytes .../images/yourtheme/window/right-corners.png | Bin 0 -> 256 bytes .../images/yourtheme/window/right-corners.psd | Bin 0 -> 15530 bytes .../images/yourtheme/window/top-bottom.png | Bin 0 -> 180 bytes .../images/yourtheme/window/top-bottom.psd | Bin 0 -> 32128 bytes 260 files changed, 22761 insertions(+), 14595 deletions(-) delete mode 100644 deluge/ui/web/themes/images/access/form/date-trigger - Copy.gif delete mode 100644 deluge/ui/web/themes/images/access/form/search-trigger - Copy.gif delete mode 100644 deluge/ui/web/themes/images/access/form/trigger - Copy.gif delete mode 100644 deluge/ui/web/themes/images/access/panel/tool-sprites - Copy.gif create mode 100644 deluge/ui/web/themes/images/default/form/trigger-square.gif create mode 100644 deluge/ui/web/themes/images/default/form/trigger-square.psd create mode 100644 deluge/ui/web/themes/images/default/grid/grid3-rowheader.gif create mode 100644 deluge/ui/web/themes/images/default/grid/refresh-disabled.gif create mode 100644 deluge/ui/web/themes/images/gray/form/trigger-square.gif create mode 100644 deluge/ui/web/themes/images/gray/grid/sort-hd.gif delete mode 100644 deluge/ui/web/themes/images/gray/window/left-corners.pspimage create mode 100644 deluge/ui/web/themes/images/yourtheme/README.txt create mode 100644 deluge/ui/web/themes/images/yourtheme/box/corners-blue.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/corners.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/l-blue.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/l.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/r-blue.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/r.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/tb-blue.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/box/tb.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/arrow.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/btn.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/group-cs.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/group-lr.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/group-tb.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/s-arrow-b-noline.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/s-arrow-b.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/s-arrow-bo.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/s-arrow-noline.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/s-arrow-o.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/button/s-arrow.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/dd/drop-add.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/dd/drop-no.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/dd/drop-yes.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/editor/tb-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/checkbox.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/clear-trigger.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/clear-trigger.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/form/date-trigger.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/date-trigger.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/form/error-tip-corners.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/exclamation.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/radio.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/search-trigger.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/search-trigger.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/form/text-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/trigger-square.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/trigger-square.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/form/trigger-tpl.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/trigger.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/form/trigger.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/gradient-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/arrow-left-white.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/arrow-right-white.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/col-move-bottom.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/col-move-top.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/columns.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/dirty.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/done.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/drop-no.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/drop-yes.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/footer-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid-blue-hd.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid-blue-split.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid-hrow.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid-loading.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid-split.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid-vista-hd.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid3-hd-btn.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid3-hrow-over.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid3-hrow.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid3-special-col-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/grid3-special-col-sel-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/group-by.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/group-collapse.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/group-expand-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/group-expand.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hd-pop.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hmenu-asc.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hmenu-desc.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hmenu-lock.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hmenu-lock.png create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hmenu-unlock.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/hmenu-unlock.png create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/invalid_line.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/loading.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/mso-hd.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/nowait.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-first-disabled.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-first.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-last-disabled.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-last.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-next-disabled.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-next.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-prev-disabled.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/page-prev.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/pick-button.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/refresh.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/row-check-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/row-expand-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/row-over.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/row-sel.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/sort-hd.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/sort_asc.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/sort_desc.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/grid/wait.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/collapse.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/expand.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/gradient-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/mini-bottom.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/mini-left.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/mini-right.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/mini-top.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/ns-collapse.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/ns-expand.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/panel-close.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/panel-title-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/panel-title-light-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/stick.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/stuck.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/tab-close-on.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/layout/tab-close.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/menu/checked.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/menu/group-checked.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/menu/item-over.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/menu/menu-parent.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/menu/menu.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/menu/unchecked.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/corners-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/left-right.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/light-hd.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/tool-sprite-tpl.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/tool-sprites.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/tools-sprites-trans.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/top-bottom.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/top-bottom.png create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/white-corners-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/white-left-right.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/panel/white-top-bottom.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/progress/progress-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/qtip/bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/qtip/close.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/qtip/tip-anchor-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/qtip/tip-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/s.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shadow-c.png create mode 100644 deluge/ui/web/themes/images/yourtheme/shadow-lr.png create mode 100644 deluge/ui/web/themes/images/yourtheme/shadow.png create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/blue-loading.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/calendar.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/glass-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/hd-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/large-loading.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/left-btn.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/loading-balls.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/right-btn.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/shared/warning.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/e-handle-dark.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/e-handle.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/ne-handle-dark.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/ne-handle.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/nw-handle-dark.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/nw-handle.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/s-handle-dark.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/s-handle.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/se-handle-dark.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/se-handle.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/square.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/sw-handle-dark.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/sizer/sw-handle.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/slider/slider-bg.png create mode 100644 deluge/ui/web/themes/images/yourtheme/slider/slider-thumb.png create mode 100644 deluge/ui/web/themes/images/yourtheme/slider/slider-v-bg.png create mode 100644 deluge/ui/web/themes/images/yourtheme/slider/slider-v-thumb.png create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/scroll-left.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/scroll-right.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/scroller-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-inactive-left-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-inactive-right-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-left-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-over-left-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-over-right-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-right-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-close.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-bg.png create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-btm-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tabs/tabs-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/btn-arrow-light.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/btn-arrow.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/btn-over-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/gray-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/more.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/tb-bg.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/tb-btn-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/tb-xl-btn-sprite.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/toolbar/tb-xl-sep.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/arrows.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/drop-add.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/drop-between.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/drop-no.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/drop-over.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/drop-under.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/drop-yes.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-end-minus-nl.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-end-minus.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-end-plus-nl.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-end-plus.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-end.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-line.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-minus-nl.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-minus.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-plus-nl.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow-plus.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/elbow.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/folder-open.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/folder.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/leaf.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/loading.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/tree/s.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/window/icon-error.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/window/icon-info.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/window/icon-question.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/window/icon-warning.gif create mode 100644 deluge/ui/web/themes/images/yourtheme/window/left-corners.png create mode 100644 deluge/ui/web/themes/images/yourtheme/window/left-corners.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/window/left-right.png create mode 100644 deluge/ui/web/themes/images/yourtheme/window/left-right.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/window/right-corners.png create mode 100644 deluge/ui/web/themes/images/yourtheme/window/right-corners.psd create mode 100644 deluge/ui/web/themes/images/yourtheme/window/top-bottom.png create mode 100644 deluge/ui/web/themes/images/yourtheme/window/top-bottom.psd diff --git a/deluge/ui/web/css/deluge.css b/deluge/ui/web/css/deluge.css index 095eba180..4701d7e66 100644 --- a/deluge/ui/web/css/deluge.css +++ b/deluge/ui/web/css/deluge.css @@ -204,7 +204,7 @@ dl.singleline dd { } .x-connected { - background-image: transparent !important; + background-image: none !important; } /* Styles for renderered progress bars */ diff --git a/deluge/ui/web/css/ext-all-notheme.css b/deluge/ui/web/css/ext-all-notheme.css index a0f6906a5..fef77840c 100644 --- a/deluge/ui/web/css/ext-all-notheme.css +++ b/deluge/ui/web/css/ext-all-notheme.css @@ -1,10 +1,17 @@ /*! - * Ext JS Library 3.1.0 - * Copyright(c) 2006-2009 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ -html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';}.ext-el-mask { +html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,blockquote,th,td{margin:0;padding:0;}img,body,html{border:0;}address,caption,cite,code,dfn,em,strong,th,var{font-style:normal;font-weight:normal;}ol,ul {list-style:none;}caption,th {text-align:left;}h1,h2,h3,h4,h5,h6{font-size:100%;}q:before,q:after{content:'';} + +.ext-forced-border-box, .ext-forced-border-box * { + -moz-box-sizing: border-box; + -ms-box-sizing: border-box; + -webkit-box-sizing: border-box; +} +.ext-el-mask { z-index: 100; position: absolute; top:0; @@ -68,6 +75,16 @@ html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,bloc display:none !important; } +.x-hide-nosize, +.x-hide-nosize * /* Emulate display:none for children */ + { + height:0px!important; + width:0px!important; + visibility:hidden!important; + border:none!important; + zoom:1; +} + .x-hide-visibility { visibility:hidden !important; } @@ -97,6 +114,7 @@ html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,bloc zoom: 1; background-color: transparent; -moz-outline: none; + outline: none; } .x-item-disabled { @@ -110,6 +128,10 @@ html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,bloc cursor: default !important; } +.x-form-radio-group .x-item-disabled { + filter: none; +} + .x-splitbar-proxy { position: absolute; visibility: hidden; @@ -219,7 +241,7 @@ html,body,div,dl,dt,dd,ul,ol,li,h1,h2,h3,h4,h5,h6,pre,form,fieldset,input,p,bloc .x-shadow .xsmc { float: left; height: 100%; - background: transparent; + background-color: transparent; } .x-shadow .xst, .x-shadow .xsb { @@ -637,9 +659,28 @@ ul.x-tab-strip li.x-tab-edge { /* * Horrible hack for IE8 in quirks mode */ -.ext-border-box .ext-ie8 .x-tab-strip .x-tab-right{ +.ext-ie8 .x-tab-strip li { + position: relative; +} +.ext-border-box .ext-ie8 .x-tab-strip-top .x-tab-right { top: 1px; } +.ext-ie8 .x-tab-strip-top { + padding-top: 1; +} +.ext-border-box .ext-ie8 .x-tab-strip-top { + padding-top: 0; +} +.ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:3px; +} +.ext-border-box .ext-ie8 .x-tab-strip .x-tab-strip-closable a.x-tab-strip-close { + top:4px; +} +.ext-ie8 .x-tab-strip-bottom .x-tab-right{ + top:0; +} + .x-tab-strip-top .x-tab-strip-active .x-tab-right span.x-tab-strip-text { padding-bottom:5px; @@ -700,14 +741,15 @@ ul.x-tab-strip li.x-tab-edge { } .x-tab-strip-bottom .x-tab-strip-active .x-tab-right { - background: no-repeat bottom left; -} - -.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { background: no-repeat bottom right; } +.x-tab-strip-bottom .x-tab-strip-active .x-tab-left { + background: no-repeat bottom left; +} + .x-tab-strip-bottom .x-tab-left { + margin-right: 3px; padding:0 10px; } @@ -864,6 +906,26 @@ textarea.x-form-field { line-height:18px; } +.x-quirks .ext-ie9 .x-form-text { + height: 22px; + padding-top: 3px; + padding-bottom: 0px; +} + +/* Ugly hacks for the bogus 1px margin bug in IE9 quirks */ +.x-quirks .ext-ie9 .x-input-wrapper .x-form-text, +.x-quirks .ext-ie9 .x-form-field-trigger-wrap .x-form-text { + margin-top: -1px; + margin-bottom: -1px; +} +.x-quirks .ext-ie9 .x-input-wrapper .x-form-element { + margin-bottom: -1px; +} + +.ext-ie6 .x-form-field-wrap .x-form-file-btn, .ext-ie7 .x-form-field-wrap .x-form-file-btn { + top: -1px; /* because of all these margin hacks, these buttons are off by one pixel in IE6,7 */ +} + .ext-ie6 textarea.x-form-field, .ext-ie7 textarea.x-form-field { margin:-1px 0; /* ie bogus margin bug */ } @@ -876,15 +938,21 @@ textarea.x-form-field { margin-bottom:-2px; /* another bogus margin bug, safari/mac only */ } +/* .ext-strict .ext-ie8 .x-form-text, .ext-strict .ext-ie8 textarea.x-form-field { - margin-bottom: 1px; + margin-bottom: 1px; } +*/ .ext-gecko .x-form-text , .ext-ie8 .x-form-text { padding-top:2px; /* FF won't center the text vertically */ padding-bottom:0; } +.ext-ie6 .x-form-composite .x-form-text.x-box-item, .ext-ie7 .x-form-composite .x-form-text.x-box-item { + margin: 0 !important; /* clear ie bogus margin bug fix */ +} + textarea { resize: none; /* Disable browser resizable textarea */ } @@ -904,7 +972,7 @@ textarea { /* 2.0.2 style */ .x-form-check-wrap { line-height:18px; - height: 22px; + height: auto; } .ext-ie .x-form-check-wrap input { @@ -947,10 +1015,6 @@ textarea { cursor:pointer; } -.ext-webkit .x-form-field-wrap .x-form-trigger{ - right:0; -} - .x-form-field-wrap .x-form-twin-triggers .x-form-trigger{ position:static; top:auto; @@ -960,10 +1024,15 @@ textarea { .x-form-field-wrap { position:relative; left:0;top:0; + text-align: left; zoom:1; white-space: nowrap; } +.ext-strict .ext-ie8 .x-toolbar-cell .x-form-field-trigger-wrap .x-form-trigger { + right: 0; /* IE8 Strict mode trigger bug */ +} + .x-form-field-wrap .x-form-trigger-over{ background-position:-17px 0; } @@ -1004,21 +1073,17 @@ textarea { /* field focus style */ .x-form-focus, textarea.x-form-focus{ - border: 1px solid; + border: 1px solid; } /* invalid fields */ .x-form-invalid, textarea.x-form-invalid{ - background:repeat-x bottom; - border: 1px solid; -} - -.ext-webkit .x-form-invalid{ - border: 1px solid; + background:repeat-x bottom; + border: 1px solid; } .x-form-inner-invalid, textarea.x-form-inner-invalid{ - background:repeat-x bottom; + background:repeat-x bottom; } /* editors */ @@ -1030,11 +1095,11 @@ textarea { .x-form-grow-sizer { left: -10000px; - padding: 8px 3px; + padding: 8px 3px; position: absolute; visibility:hidden; top: -10000px; - white-space: pre-wrap; + white-space: pre-wrap; white-space: -moz-pre-wrap; white-space: -pre-wrap; white-space: -o-pre-wrap; @@ -1149,6 +1214,10 @@ textarea { .ext-webkit .x-small-editor .x-form-text{padding-top:3px;font-size:100%;} +.ext-strict .ext-webkit .x-small-editor .x-form-text{ + height:14px !important; +} + .x-form-clear { clear:both; height:0; @@ -1165,7 +1234,7 @@ textarea { } .ext-ie6 .x-form-check-wrap input, .ext-border-box .x-form-check-wrap input{ - margin-top: 3px; + margin-top: 3px; } .x-form-cb-label { @@ -1209,59 +1278,59 @@ textarea { /* buttons */ .x-form .x-form-btns-ct .x-btn{ - float:right; - clear:none; + float:right; + clear:none; } .x-form .x-form-btns-ct .x-form-btns td { - border:0; - padding:0; + border:0; + padding:0; } .x-form .x-form-btns-ct .x-form-btns-right table{ - float:right; - clear:none; + float:right; + clear:none; } .x-form .x-form-btns-ct .x-form-btns-left table{ - float:left; - clear:none; + float:left; + clear:none; } .x-form .x-form-btns-ct .x-form-btns-center{ - text-align:center; /*ie*/ + text-align:center; /*ie*/ } .x-form .x-form-btns-ct .x-form-btns-center table{ - margin:0 auto; /*everyone else*/ + margin:0 auto; /*everyone else*/ } .x-form .x-form-btns-ct table td.x-form-btn-td{ - padding:3px; + padding:3px; } .x-form .x-form-btns-ct .x-btn-focus .x-btn-left{ - background-position:0 -147px; + background-position:0 -147px; } .x-form .x-form-btns-ct .x-btn-focus .x-btn-right{ - background-position:0 -168px; + background-position:0 -168px; } .x-form .x-form-btns-ct .x-btn-focus .x-btn-center{ - background-position:0 -189px; + background-position:0 -189px; } .x-form .x-form-btns-ct .x-btn-click .x-btn-center{ - background-position:0 -126px; + background-position:0 -126px; } .x-form .x-form-btns-ct .x-btn-click .x-btn-right{ - background-position:0 -84px; + background-position:0 -84px; } .x-form .x-form-btns-ct .x-btn-click .x-btn-left{ - background-position:0 -63px; + background-position:0 -63px; } .x-form-invalid-icon { @@ -1286,12 +1355,16 @@ textarea { /* make top of checkbox/tools visible in webkit */ .ext-webkit .x-fieldset-header { padding-top: 1px; -} +} .ext-ie .x-fieldset legend { margin-bottom:10px; } +.ext-strict .ext-ie9 .x-fieldset legend.x-fieldset-header { + padding-top: 1px; +} + .ext-ie .x-fieldset { padding-top: 0; padding-bottom:10px; @@ -1315,8 +1388,8 @@ fieldset.x-panel-collapsed { border-width: 1px 1px 0 1px !important; border-left-color: transparent; border-right-color: transparent; -} - +} + .ext-ie6 fieldset.x-panel-collapsed{ padding-bottom:0 !important; border-width: 1px 0 0 0 !important; @@ -1343,7 +1416,7 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { margin-left:-3px; } -/* IE legend positioing bug */ +/* IE legend positioning bug */ .ext-ie .x-fieldset-noborder legend { position: relative; margin-bottom:23px; @@ -1352,14 +1425,20 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { position: absolute; left:16px; } - + .ext-gecko .x-window-body .x-form-item { -moz-outline: none; + outline: none; overflow: auto; } +.ext-mac.ext-gecko .x-window-body .x-form-item { + overflow:hidden; +} + .ext-gecko .x-form-item { -moz-outline: none; + outline: none; } .x-hide-label label.x-form-item-label { @@ -1386,8 +1465,6 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { .x-fieldset-body { overflow:hidden; } - - .x-btn{ cursor:pointer; white-space: nowrap; @@ -1395,7 +1472,7 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { .x-btn button{ border:0 none; - background:transparent; + background-color:transparent; padding-left:3px; padding-right:3px; cursor:pointer; @@ -1410,7 +1487,7 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { width:1px; } -.ext-gecko .x-btn button { +.ext-gecko .x-btn button, .ext-webkit .x-btn button { padding-left:0; padding-right:0; } @@ -1727,7 +1804,7 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { /* height adjustment class */ .x-btn-as-arrow .x-btn-mc em { display:block; - background:transparent; + background-color:transparent; padding-bottom:14px; } @@ -1786,7 +1863,7 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { } .x-btn-group-mc .x-btn-group-body { - background:transparent; + background-color:transparent; border: 0 none; } @@ -2011,7 +2088,7 @@ fieldset.x-panel-collapsed .x-fieldset-bwrap { .x-toolbar-more em.x-btn-arrow { display:inline; - background:transparent; + background-color:transparent; padding-right:0; } @@ -2090,6 +2167,7 @@ div.x-toolbar-no-items { .x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ -moz-outline: none; + outline: none; -moz-user-focus: normal; } @@ -2132,6 +2210,16 @@ div.x-toolbar-no-items { white-space: nowrap; } +/* ActionColumn, reduce padding to accommodate 16x16 icons in normal row height */ +.x-action-col-cell .x-grid3-cell-inner { + padding-top: 1px; + padding-bottom: 1px; +} + +.x-action-col-icon { + cursor: pointer; +} + .x-grid3-hd-inner { position:relative; cursor:inherit; @@ -2409,7 +2497,7 @@ td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-as .x-grid3-col-dd { border:0 none; padding:0; - background:transparent; + background-color:transparent; } .x-dd-drag-ghost .x-grid3-dd-wrap { @@ -2502,10 +2590,18 @@ a.x-grid3-hd-btn:hover { } .x-grid3-hd-checker { + background-position:2px 1px; +} + +.ext-border-box .x-grid3-hd-checker { background-position:2px 3px; } .x-grid3-hd-checker-on .x-grid3-hd-checker { + background-position:-23px 1px; +} + +.ext-border-box .x-grid3-hd-checker-on .x-grid3-hd-checker { background-position:-23px 3px; } @@ -2611,17 +2707,83 @@ a.x-grid3-hd-btn:hover { position: static; } - .ext-ie6 .x-grid3-header { position: relative; } +/* Fix WebKit bug in Grids */ +.ext-webkit .x-grid-panel .x-panel-bwrap{ + -webkit-user-select:none; +} +.ext-webkit .x-tbar-page-number{ + -webkit-user-select:ignore; +} +/* end*/ + /* column lines */ .x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { padding-right:0; border-right:1px solid; } -.x-dd-drag-proxy{ +.x-pivotgrid .x-grid3-header-offset table { + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-header-offset table td { + padding: 4px 3px 4px 5px; + text-align: center; + white-space: nowrap; + overflow: hidden; + text-overflow: ellipsis; + font-size: 11px; + line-height: 13px; + font-family: tahoma; +} + +.x-pivotgrid .x-grid3-row-headers { + display: block; + float: left; +} + +.x-pivotgrid .x-grid3-row-headers table { + height: 100%; + width: 100%; + border-collapse: collapse; +} + +.x-pivotgrid .x-grid3-row-headers table td { + height: 18px; + padding: 2px 7px 0 0; + text-align: right; + text-overflow: ellipsis; + font-size: 11px; + font-family: tahoma; +} + +.ext-gecko .x-pivotgrid .x-grid3-row-headers table td { + height: 21px; +} + +.x-grid3-header-title { + top: 0%; + left: 0%; + position: absolute; + text-align: center; + vertical-align: middle; + font-family: tahoma; + font-size: 11px; + padding: auto 1px; + display: table-cell; +} + +.x-grid3-header-title span { + position: absolute; + top: 50%; + left: 0%; + width: 100%; + margin-top: -6px; +}.x-dd-drag-proxy{ position:absolute; left:0; top:0; @@ -2746,20 +2908,20 @@ input.x-tree-node-cb { /* No line styles */ .x-tree-no-lines .x-tree-elbow{ - background:transparent; + background-color:transparent; } .x-tree-no-lines .x-tree-elbow-end{ - background:transparent; + background-color:transparent; } .x-tree-no-lines .x-tree-elbow-line{ - background:transparent; + background-color:transparent; } /* Arrows */ .x-tree-arrows .x-tree-elbow{ - background:transparent; + background-color:transparent; } .x-tree-arrows .x-tree-elbow-plus{ @@ -2771,7 +2933,7 @@ input.x-tree-node-cb { } .x-tree-arrows .x-tree-elbow-end{ - background:transparent; + background-color:transparent; } .x-tree-arrows .x-tree-elbow-end-plus{ @@ -2783,7 +2945,7 @@ input.x-tree-node-cb { } .x-tree-arrows .x-tree-elbow-line{ - background:transparent; + background-color:transparent; } .x-tree-arrows .x-tree-ec-over .x-tree-elbow-plus{ @@ -2844,7 +3006,7 @@ input.x-tree-node-cb { } .x-tree-node .x-tree-node-inline-icon{ - background:transparent; + background-color:transparent; } .x-tree-node a:hover, .x-dd-drag-ghost a:hover{ @@ -3156,7 +3318,7 @@ td.x-date-mp-sep { top: 0; left:0; visibility: hidden; - z-index: 20000; + z-index: 20002; border:0 none; } @@ -3318,7 +3480,7 @@ td.x-date-mp-sep { .x-menu-list{ padding: 2px; - background:transparent; + background-color:transparent; border:0 none; overflow:hidden; overflow-y: hidden; @@ -3440,7 +3602,7 @@ a.x-menu-item { } .x-menu-group-item .x-menu-item-icon{ - background: transparent; + background-color: transparent; } .x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ @@ -3475,6 +3637,24 @@ a.x-menu-item { padding:0 !important; } +/* + * fixes separator visibility problem in IE 6 + */ +.ext-strict .ext-ie6 .x-menu-sep-li { + padding: 3px 4px; +} +.ext-strict .ext-ie6 .x-menu-sep { + margin: 0; + height: 1px; +} + +/* + * Fixes an issue with "fat" separators in webkit + */ +.ext-webkit .x-menu-sep{ + height: 1px; +} + /* * Ugly mess to remove the white border under the picker */ @@ -3517,8 +3697,7 @@ a.x-menu-item { .x-menu-list-item-indent{ padding-left: 27px; -} -/* +}/* Creates rounded, raised boxes like on the Ext website - the markup isn't pretty:
@@ -3674,7 +3853,7 @@ a.x-menu-item { .x-panel-tl .x-panel-header { padding:5px 0 4px 0; border:0 none; - background:transparent; + background:transparent no-repeat; } .x-panel-tl .x-panel-icon, .x-window-tl .x-panel-icon { @@ -3747,7 +3926,7 @@ a.x-menu-item { } .x-panel-mc .x-panel-body { - background:transparent; + background-color:transparent; border: 0 none; } @@ -3885,6 +4064,22 @@ a.x-menu-item { background-position:-15px -90px; } +.x-tool-prev { + background-position:0 -105px; +} + +.x-tool-prev-over { + background-position:-15px -105px; +} + +.x-tool-next { + background-position:0 -120px; +} + +.x-tool-next-over { + background-position:-15px -120px; +} + .x-tool-pin { background-position:0 -135px; } @@ -3917,14 +4112,6 @@ a.x-menu-item { 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; } @@ -3933,6 +4120,14 @@ a.x-menu-item { background-position:-15px -195px; } +.x-tool-up { + background-position:0 -210px; +} + +.x-tool-up-over { + background-position:-15px -210px; +} + .x-tool-refresh { background-position:0 -225px; } @@ -3941,14 +4136,6 @@ a.x-menu-item { 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; } @@ -3957,6 +4144,14 @@ a.x-menu-item { background-position:-15px -240px; } +.x-tool-minus { + background-position:0 -255px; +} + +.x-tool-minus-over { + background-position:-15px -255px; +} + .x-tool-search { background-position:0 -270px; } @@ -3989,6 +4184,38 @@ a.x-menu-item { background-position:-15px -315px; } +.x-tool-expand { + background-position:0 -330px; +} + +.x-tool-expand-over { + background-position:-15px -330px; +} + +.x-tool-collapse { + background-position:0 -345px; +} + +.x-tool-collapse-over { + background-position:-15px -345px; +} + +.x-tool-resize { + background-position:0 -360px; +} + +.x-tool-resize-over { + background-position:-15px -360px; +} + +.x-tool-move { + background-position:0 -375px; +} + +.x-tool-move-over { + background-position:-15px -375px; +} + /* Ghosting */ .x-panel-ghost { z-index:12000; @@ -4187,7 +4414,7 @@ a.x-menu-item { .x-panel-reset .x-panel-body :before, .x-panel-reset .x-panel-body :after { white-space: pre-line } .x-panel-reset .x-panel-body center { text-align: center } .x-panel-reset .x-panel-body :link, .x-panel-reset .x-panel-body :visited { text-decoration: underline } -.x-panel-reset .x-panel-body :focus { outline: thin dotted invert } +.x-panel-reset .x-panel-body :focus { outline: invert dotted thin } /* Begin bidirectionality settings (do not change) */ .x-panel-reset .x-panel-body BDO[DIR="ltr"] { direction: ltr; unicode-bidi: bidi-override } @@ -4196,7 +4423,7 @@ a.x-menu-item { zoom:1; } -.x-window .x-resizable-handle { +.x-window .x-window-handle { opacity:0; -moz-opacity:0; filter:alpha(opacity=0); @@ -4342,7 +4569,7 @@ a.x-menu-item { } .x-window-body { - background:transparent; + background-color:transparent; } .x-panel-ghost .x-window-tl { @@ -4357,7 +4584,7 @@ a.x-menu-item { overflow:hidden; } -.x-window-maximized .x-resizable-handle { +.x-window-maximized .x-window-handle { display:none; } @@ -4619,7 +4846,7 @@ body.ext-ie6.x-body-masked .x-window select { .x-tool-expand-east, .x-tool-expand-west { float:none; - margin:3px auto; + margin:3px 2px; } .x-accordion-hd .x-tool-toggle { @@ -4783,14 +5010,14 @@ body.ext-ie6.x-body-masked .x-window select { border:0 none; width:5px !important; padding:0; - background:transparent; + background-color:transparent; } .x-layout-cmini-north, .x-layout-cmini-south { border:0 none; height:5px !important; padding:0; - background:transparent; + background-color:transparent; } .x-viewport, .x-viewport body { @@ -5085,12 +5312,9 @@ body.ext-ie6.x-body-masked .x-window select { height:32px; } -.ext-ie .x-window-dlg .ext-mb-icon { - width:44px; /* 3px IE margin issue */ -} - .x-window-dlg .x-dlg-icon .ext-mb-content{ - zoom: 1; margin-left: 47px; + zoom: 1; + margin-left: 47px; } .x-window-dlg .ext-mb-info, .x-window-dlg .ext-mb-warning, .x-window-dlg .ext-mb-question, .x-window-dlg .ext-mb-error { @@ -5099,4 +5323,4 @@ body.ext-ie6.x-body-masked .x-window select { .ext-gecko2 .ext-mb-fix-cursor { overflow:auto; -} +} \ No newline at end of file diff --git a/deluge/ui/web/css/ext-extensions-debug.css b/deluge/ui/web/css/ext-extensions-debug.css index d100d8f56..c161be721 100644 --- a/deluge/ui/web/css/ext-extensions-debug.css +++ b/deluge/ui/web/css/ext-extensions-debug.css @@ -137,3 +137,125 @@ .x-form-uxspinner .x-form-field-wrap { height: 24px; } + +/*! + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license + */ +/* StatusBar - structure */ +.x-statusbar .x-status-text { + cursor: default; +/* + height: 21px; + line-height: 21px; + padding: 0 4px; +*/ +} +.x-statusbar .x-status-busy { + padding-left: 25px !important; + background: transparent no-repeat 3px 2px; +} + +.x-toolbar div.xtb-text + +.x-statusbar .x-status-text-panel { + border-top: 1px solid; + border-right: 1px solid; + border-bottom: 1px solid; + border-left: 1px solid; + padding: 2px 8px 2px 5px; +} + +/* StatusBar word processor example styles */ + +#word-status .x-status-text-panel .spacer { + width: 60px; + font-size:0; + line-height:0; +} +#word-status .x-status-busy { + padding-left: 25px !important; + background: transparent no-repeat 3px 2px; +} +#word-status .x-status-saved { + padding-left: 25px !important; + background: transparent no-repeat 3px 2px; +} + +/* StatusBar form validation example styles */ + +.x-statusbar .x-status-error { + cursor: pointer; + padding-left: 25px !important; + background: transparent no-repeat 3px 2px; +} +.x-statusbar .x-status-valid { + padding-left: 25px !important; + background: transparent no-repeat 3px 2px; +} +.x-status-error-list { + font: 11px tahoma,arial,verdana,sans-serif; + position: absolute; + z-index: 9999; + border-top: 1px solid; + border-right: 1px solid; + border-bottom: 1px solid; + border-left: 1px solid; + padding: 5px 10px; +} +.x-status-error-list li { + cursor: pointer; + list-style: disc; + margin-left: 10px; +} +.x-status-error-list li a { + text-decoration: none; +} +.x-status-error-list li a:hover { + text-decoration: underline; +} + + +/* *********************************************************** */ +/* *********************************************************** */ +/* *********************************************************** */ + + +/* StatusBar - visual */ + +.x-statusbar .x-status-busy { + background-image: url(../images/loading.gif); +} +.x-statusbar .x-status-text-panel { + border-color: #99bbe8 #fff #fff #99bbe8; +} + +/* StatusBar word processor example styles */ + +#word-status .x-status-text { + color: #777; +} +#word-status .x-status-busy { + background-image: url(../images/saving.gif); +} +#word-status .x-status-saved { + background-image: url(../images/saved.png); +} + +/* StatusBar form validation example styles */ + +.x-statusbar .x-status-error { + color: #C33; + background-image: url(../images/exclamation.gif); +} +.x-statusbar .x-status-valid { + background-image: url(../images/accept.png); +} +.x-status-error-list { + border-color: #C33; +} +.x-status-error-list li a { + color: #15428B; +} diff --git a/deluge/ui/web/js/deluge-all/Statusbar.js b/deluge/ui/web/js/deluge-all/Statusbar.js index 4f1c48f86..1066883f3 100644 --- a/deluge/ui/web/js/deluge-all/Statusbar.js +++ b/deluge/ui/web/js/deluge-all/Statusbar.js @@ -1,6 +1,6 @@ /*! * Deluge.Statusbar.js - * + * * Copyright (c) Damien Churchill 2009-2010 * * This program is free software; you can redistribute it and/or modify @@ -40,14 +40,14 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, { }, config); Deluge.Statusbar.superclass.constructor.call(this, config); }, - + initComponent: function() { Deluge.Statusbar.superclass.initComponent.call(this); - + deluge.events.on('connect', this.onConnect, this); deluge.events.on('disconnect', this.onDisconnect, this); }, - + createButtons: function() { this.buttons = this.add({ id: 'statusbar-connections', @@ -221,7 +221,7 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, { }); this.created = true; }, - + onConnect: function() { this.setStatus({ iconCls: 'x-connected', @@ -246,12 +246,12 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, { }); this.doLayout(); }, - + update: function(stats) { if (!stats) return; - + function addSpeed(val) {return val + ' KiB/s'} - + var updateStat = function(name, config) { var item = this.items.get('statusbar-' + name); if (config.limit.value > 0) { @@ -266,7 +266,7 @@ Deluge.Statusbar = Ext.extend(Ext.ux.StatusBar, { if (!item.menu) return; item.menu.setValue(config.limit.value); }.createDelegate(this); - + updateStat('connections', { value: {value: stats.num_connections}, limit: {value: stats.max_num_connections}, diff --git a/deluge/ui/web/js/ext-all-debug.js b/deluge/ui/web/js/ext-all-debug.js index 342be20ca..effa07771 100644 --- a/deluge/ui/web/js/ext-all-debug.js +++ b/deluge/ui/web/js/ext-all-debug.js @@ -1,9 +1,531 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ +(function(){ + +var EXTUTIL = Ext.util, + EACH = Ext.each, + TRUE = true, + FALSE = false; +/** + * @class Ext.util.Observable + * Base class that provides a common interface for publishing events. Subclasses are expected to + * to have a property "events" with all the events defined, and, optionally, a property "listeners" + * with configured listeners defined.
+ * For example: + *

+Employee = Ext.extend(Ext.util.Observable, {
+    constructor: function(config){
+        this.name = config.name;
+        this.addEvents({
+            "fired" : true,
+            "quit" : true
+        });
+
+        // Copy configured listeners into *this* object so that the base class's
+        // constructor will add them.
+        this.listeners = config.listeners;
+
+        // Call our superclass constructor to complete construction process.
+        Employee.superclass.constructor.call(this, config)
+    }
+});
+
+ * This could then be used like this:

+var newEmployee = new Employee({
+    name: employeeName,
+    listeners: {
+        quit: function() {
+            // By default, "this" will be the object that fired the event.
+            alert(this.name + " has quit!");
+        }
+    }
+});
+
+ */ +EXTUTIL.Observable = function(){ + /** + * @cfg {Object} listeners (optional)

A config object containing one or more event handlers to be added to this + * object during initialization. This should be a valid listeners config object as specified in the + * {@link #addListener} example for attaching multiple handlers at once.

+ *

DOM events from ExtJs {@link Ext.Component Components}

+ *

While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this + * is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}'s + * {@link Ext.DataView#click click} event passing the node clicked on. To access DOM + * events directly from a Component's HTMLElement, listeners must be added to the {@link Ext.Component#getEl Element} after the Component + * has been rendered. A plugin can simplify this step:


+// Plugin is configured with a listeners config object.
+// The Component is appended to the argument list of all handler functions.
+Ext.DomObserver = Ext.extend(Object, {
+    constructor: function(config) {
+        this.listeners = config.listeners ? config.listeners : config;
+    },
+
+    // Component passes itself into plugin's init method
+    init: function(c) {
+        var p, l = this.listeners;
+        for (p in l) {
+            if (Ext.isFunction(l[p])) {
+                l[p] = this.createHandler(l[p], c);
+            } else {
+                l[p].fn = this.createHandler(l[p].fn, c);
+            }
+        }
+
+        // Add the listeners to the Element immediately following the render call
+        c.render = c.render.{@link Function#createSequence createSequence}(function() {
+            var e = c.getEl();
+            if (e) {
+                e.on(l);
+            }
+        });
+    },
+
+    createHandler: function(fn, c) {
+        return function(e) {
+            fn.call(this, e, c);
+        };
+    }
+});
+
+var combo = new Ext.form.ComboBox({
+
+    // Collapse combo when its element is clicked on
+    plugins: [ new Ext.DomObserver({
+        click: function(evt, comp) {
+            comp.collapse();
+        }
+    })],
+    store: myStore,
+    typeAhead: true,
+    mode: 'local',
+    triggerAction: 'all'
+});
+     * 

+ */ + var me = this, e = me.events; + if(me.listeners){ + me.on(me.listeners); + delete me.listeners; + } + me.events = e || {}; +}; + +EXTUTIL.Observable.prototype = { + // private + filterOptRe : /^(?:scope|delay|buffer|single)$/, + + /** + *

Fires the specified event with the passed parameters (minus the event name).

+ *

An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget}) + * by calling {@link #enableBubble}.

+ * @param {String} eventName The name of the event to fire. + * @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), + ename = a[0].toLowerCase(), + me = this, + ret = TRUE, + ce = me.events[ename], + cc, + q, + c; + if (me.eventsSuspended === TRUE) { + if (q = me.eventQueue) { + q.push(a); + } + } + else if(typeof ce == 'object') { + if (ce.bubble){ + if(ce.fire.apply(ce, a.slice(1)) === FALSE) { + return FALSE; + } + c = me.getBubbleTarget && me.getBubbleTarget(); + if(c && c.enableBubble) { + cc = c.events[ename]; + if(!cc || typeof cc != 'object' || !cc.bubble) { + c.enableBubble(ename); + } + return c.fireEvent.apply(c, a); + } + } + else { + a.shift(); + ret = ce.fire.apply(ce, a); + } + } + return ret; + }, + + /** + * Appends an event handler to this object. + * @param {String} eventName The name of the event to listen for. + * @param {Function} handler The method the event invokes. + * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. + * If omitted, defaults to the object which fired the event. + * @param {Object} options (optional) An object containing handler configuration. + * properties. This may contain any of the following properties:
    + *
  • scope : Object
    The scope (this reference) in which the handler function is executed. + * If omitted, defaults to the object which fired the event.
  • + *
  • delay : Number
    The number of milliseconds to delay the invocation of the handler after the event fires.
  • + *
  • single : Boolean
    True to add a handler to handle just the next firing of the event, and then remove itself.
  • + *
  • buffer : Number
    Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed + * by the specified number of milliseconds. If the event fires again within that time, the original + * handler is not invoked, but the new handler is scheduled in its place.
  • + *
  • target : Observable
    Only call the handler if the event was fired on the target Observable, not + * if the event was bubbled up from a child Observable.
  • + *

+ *

+ * Combining Options
+ * Using the options argument, it is possible to combine different types of listeners:
+ *
+ * A delayed, one-time listener. + *


+myDataView.on('click', this.onClick, this, {
+single: true,
+delay: 100
+});
+ *

+ * Attaching multiple handlers in 1 call
+ * The method also allows for a single argument to be passed which is a config object containing properties + * which specify multiple handlers. + *

+ *


+myGridPanel.on({
+'click' : {
+    fn: this.onClick,
+    scope: this,
+    delay: 100
+},
+'mouseover' : {
+    fn: this.onMouseOver,
+    scope: this
+},
+'mouseout' : {
+    fn: this.onMouseOut,
+    scope: this
+}
+});
+ *

+ * Or a shorthand syntax:
+ *


+myGridPanel.on({
+'click' : this.onClick,
+'mouseover' : this.onMouseOver,
+'mouseout' : this.onMouseOut,
+ scope: this
+});
+ */ + addListener : function(eventName, fn, scope, o){ + var me = this, + e, + oe, + ce; + + if (typeof eventName == 'object') { + o = eventName; + for (e in o) { + oe = o[e]; + if (!me.filterOptRe.test(e)) { + me.addListener(e, oe.fn || oe, oe.scope || o.scope, oe.fn ? oe : o); + } + } + } else { + eventName = eventName.toLowerCase(); + ce = me.events[eventName] || TRUE; + if (typeof ce == 'boolean') { + me.events[eventName] = ce = new EXTUTIL.Event(me, eventName); + } + ce.addListener(fn, scope, typeof o == 'object' ? o : {}); + } + }, + + /** + * Removes an event handler. + * @param {String} eventName The type of event the handler was associated with. + * @param {Function} handler The handler to remove. This must be a reference to the function passed into the {@link #addListener} call. + * @param {Object} scope (optional) The scope originally specified for the handler. + */ + removeListener : function(eventName, fn, scope){ + var ce = this.events[eventName.toLowerCase()]; + if (typeof ce == 'object') { + ce.removeListener(fn, scope); + } + }, + + /** + * Removes all listeners for this object + */ + purgeListeners : function(){ + var events = this.events, + evt, + key; + for(key in events){ + evt = events[key]; + if(typeof evt == 'object'){ + evt.clearListeners(); + } + } + }, + + /** + * Adds the specified events to the list of events which this Observable may fire. + * @param {Object|String} o Either an object with event names as properties with a value of true + * or the first event name string if multiple event names are being passed as separate parameters. + * @param {string} Optional. Event name if multiple event names are being passed as separate parameters. + * Usage:

+this.addEvents('storeloaded', 'storecleared');
+
+ */ + addEvents : function(o){ + var me = this; + me.events = me.events || {}; + if (typeof o == 'string') { + var a = arguments, + i = a.length; + while(i--) { + me.events[a[i]] = me.events[a[i]] || TRUE; + } + } else { + Ext.applyIf(me.events, o); + } + }, + + /** + * Checks to see if this object has any listeners for a specified event + * @param {String} eventName The name of the event to check for + * @return {Boolean} True if the event is being listened for, else false + */ + hasListener : function(eventName){ + var e = this.events[eventName.toLowerCase()]; + return typeof e == 'object' && e.listeners.length > 0; + }, + + /** + * Suspend the firing of all events. (see {@link #resumeEvents}) + * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired + * after the {@link #resumeEvents} call instead of discarding all suspended events; + */ + suspendEvents : function(queueSuspended){ + this.eventsSuspended = TRUE; + if(queueSuspended && !this.eventQueue){ + this.eventQueue = []; + } + }, + + /** + * Resume firing events. (see {@link #suspendEvents}) + * If events were suspended using the queueSuspended parameter, then all + * events fired during event suspension will be sent to any listeners now. + */ + resumeEvents : function(){ + var me = this, + queued = me.eventQueue || []; + me.eventsSuspended = FALSE; + delete me.eventQueue; + EACH(queued, function(e) { + me.fireEvent.apply(me, e); + }); + } +}; + +var OBSERVABLE = EXTUTIL.Observable.prototype; +/** + * Appends an event handler to this object (shorthand for {@link #addListener}.) + * @param {String} eventName The type of event to listen for + * @param {Function} handler The method the event invokes + * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. + * If omitted, defaults to the object which fired the event. + * @param {Object} options (optional) An object containing handler configuration. + * @method + */ +OBSERVABLE.on = OBSERVABLE.addListener; +/** + * Removes an event handler (shorthand for {@link #removeListener}.) + * @param {String} eventName The type of event the handler was associated with. + * @param {Function} handler The handler to remove. This must be a reference to the function passed into the {@link #addListener} call. + * @param {Object} scope (optional) The scope originally specified for the handler. + * @method + */ +OBSERVABLE.un = OBSERVABLE.removeListener; + +/** + * Removes all added captures from the Observable. + * @param {Observable} o The Observable to release + * @static + */ +EXTUTIL.Observable.releaseCapture = function(o){ + o.fireEvent = OBSERVABLE.fireEvent; +}; + +function createTargeted(h, o, scope){ + return function(){ + if(o.target == arguments[0]){ + h.apply(scope, Array.prototype.slice.call(arguments, 0)); + } + }; +}; + +function createBuffered(h, o, l, scope){ + l.task = new EXTUTIL.DelayedTask(); + return function(){ + l.task.delay(o.buffer, h, scope, Array.prototype.slice.call(arguments, 0)); + }; +}; + +function createSingle(h, e, fn, scope){ + return function(){ + e.removeListener(fn, scope); + return h.apply(scope, arguments); + }; +}; + +function createDelayed(h, o, l, scope){ + return function(){ + var task = new EXTUTIL.DelayedTask(), + args = Array.prototype.slice.call(arguments, 0); + if(!l.tasks) { + l.tasks = []; + } + l.tasks.push(task); + task.delay(o.delay || 10, function(){ + l.tasks.remove(task); + h.apply(scope, args); + }, scope); + }; +}; + +EXTUTIL.Event = function(obj, name){ + this.name = name; + this.obj = obj; + this.listeners = []; +}; + +EXTUTIL.Event.prototype = { + addListener : function(fn, scope, options){ + var me = this, + l; + scope = scope || me.obj; + if(!me.isListening(fn, scope)){ + l = me.createListener(fn, scope, options); + if(me.firing){ // if we are currently firing this event, don't disturb the listener loop + me.listeners = me.listeners.slice(0); + } + me.listeners.push(l); + } + }, + + createListener: function(fn, scope, o){ + o = o || {}; + scope = scope || this.obj; + var l = { + fn: fn, + scope: scope, + options: o + }, h = fn; + if(o.target){ + h = createTargeted(h, o, scope); + } + if(o.delay){ + h = createDelayed(h, o, l, scope); + } + if(o.single){ + h = createSingle(h, this, fn, scope); + } + if(o.buffer){ + h = createBuffered(h, o, l, scope); + } + l.fireFn = h; + return l; + }, + + findListener : function(fn, scope){ + var list = this.listeners, + i = list.length, + l; + + scope = scope || this.obj; + while(i--){ + l = list[i]; + if(l){ + 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, + l, + k, + me = this, + ret = FALSE; + if((index = me.findListener(fn, scope)) != -1){ + if (me.firing) { + me.listeners = me.listeners.slice(0); + } + l = me.listeners[index]; + if(l.task) { + l.task.cancel(); + delete l.task; + } + k = l.tasks && l.tasks.length; + if(k) { + while(k--) { + l.tasks[k].cancel(); + } + delete l.tasks; + } + me.listeners.splice(index, 1); + ret = TRUE; + } + return ret; + }, + + // Iterate to stop any buffered/delayed events + clearListeners : function(){ + var me = this, + l = me.listeners, + i = l.length; + while(i--) { + me.removeListener(l[i].fn, l[i].scope); + } + }, + + fire : function(){ + var me = this, + listeners = me.listeners, + len = listeners.length, + i = 0, + l; + + if(len > 0){ + me.firing = TRUE; + var args = Array.prototype.slice.call(arguments, 0); + for (; i < len; i++) { + l = listeners[i]; + if(l && l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) { + return (me.firing = FALSE); + } + } + } + me.firing = FALSE; + return TRUE; + } + +}; +})(); /** * @class Ext.DomHelper *

The DomHelper class provides a layer of abstraction from DOM and transparently supports creating @@ -136,6 +658,10 @@ Ext.DomHelper = function(){ var tempTableEl = null, emptyTags = /^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i, tableRe = /^table|tbody|tr|td$/i, + confRe = /tag|children|cn|html$/i, + tableElRe = /td|tr|tbody/i, + cssRe = /([a-z0-9-]+)\s*:\s*([^;\s]+(?:\s*[^;\s]+)*);?/gi, + endRe = /end/i, pub, // kill repeat to save bytes afterbegin = 'afterbegin', @@ -161,10 +687,9 @@ Ext.DomHelper = function(){ attr, val, key, - keyVal, cn; - if(Ext.isString(o)){ + if(typeof o == "string"){ b = o; } else if (Ext.isArray(o)) { for (var i=0; i < o.length; i++) { @@ -174,19 +699,20 @@ Ext.DomHelper = function(){ }; } else { b += '<' + (o.tag = o.tag || 'div'); - Ext.iterate(o, function(attr, val){ - if(!/tag|children|cn|html$/i.test(attr)){ - if (Ext.isObject(val)) { + for (attr in o) { + val = o[attr]; + if(!confRe.test(attr)){ + if (typeof val == "object") { b += ' ' + attr + '="'; - Ext.iterate(val, function(key, keyVal){ - b += key + ':' + keyVal + ';'; - }); + for (key in val) { + b += key + ':' + val[key] + ';'; + }; b += '"'; }else{ b += ' ' + ({cls : 'class', htmlFor : 'for'}[attr] || attr) + '="' + val + '"'; } } - }); + }; // Now either just close the tag or try to add children and close the tag. if (emptyTags.test(o.tag)) { b += '/>'; @@ -235,7 +761,7 @@ Ext.DomHelper = function(){ tempTableEl = tempTableEl || document.createElement('div'); if(tag == 'td' && (where == afterbegin || where == beforeend) || - !/td|tr|tbody/i.test(tag) && (where == beforebegin || where == afterend)) { + !tableElRe.test(tag) && (where == beforebegin || where == afterend)) { return; } before = where == beforebegin ? el : @@ -258,6 +784,26 @@ Ext.DomHelper = function(){ return node; } + /** + * @ignore + * Fix for IE9 createContextualFragment missing method + */ + function createContextualFragment(html){ + var div = document.createElement("div"), + fragment = document.createDocumentFragment(), + i = 0, + length, childNodes; + + div.innerHTML = html; + childNodes = div.childNodes; + length = childNodes.length; + + for (; i < length; i++) { + fragment.appendChild(childNodes[i].cloneNode(true)); + } + + return fragment; + } pub = { /** @@ -268,7 +814,7 @@ Ext.DomHelper = function(){ markup : function(o){ return createHtml(o); }, - + /** * Applies a style specification to an element. * @param {String/HTMLElement} el The element to apply styles to @@ -276,26 +822,29 @@ Ext.DomHelper = function(){ * a function which returns such a specification. */ applyStyles : function(el, styles){ - if(styles){ - var i = 0, - len, - style; + if (styles) { + var matches; el = Ext.fly(el); - if(Ext.isFunction(styles)){ + if (typeof styles == "function") { styles = styles.call(); } - if(Ext.isString(styles)){ - styles = styles.trim().split(/\s*(?::|;)\s*/); - for(len = styles.length; i < len;){ - el.setStyle(styles[i++], styles[i++]); + if (typeof styles == "string") { + /** + * Since we're using the g flag on the regex, we need to set the lastIndex. + * This automatically happens on some implementations, but not others, see: + * http://stackoverflow.com/questions/2645273/javascript-regular-expression-literal-persists-between-function-calls + * http://blog.stevenlevithan.com/archives/fixing-javascript-regexp + */ + cssRe.lastIndex = 0; + while ((matches = cssRe.exec(styles))) { + el.setStyle(matches[1], matches[2]); } - }else if (Ext.isObject(styles)){ + } else if (typeof styles == "object") { el.setStyle(styles); } } }, - /** * Inserts an HTML fragment into the DOM. * @param {String} where Where to insert the html in relation to el - beforeBegin, afterBegin, beforeEnd, afterEnd. @@ -306,10 +855,10 @@ Ext.DomHelper = function(){ insertHtml : function(where, el, html){ var hash = {}, hashVal, - setStart, range, - frag, rangeEl, + setStart, + frag, rs; where = where.toLowerCase(); @@ -330,17 +879,27 @@ Ext.DomHelper = function(){ } } else { range = el.ownerDocument.createRange(); - setStart = 'setStart' + (/end/i.test(where) ? 'After' : 'Before'); + setStart = 'setStart' + (endRe.test(where) ? 'After' : 'Before'); if (hash[where]) { range[setStart](el); - frag = range.createContextualFragment(html); + if (!range.createContextualFragment) { + frag = createContextualFragment(html); + } + else { + frag = range.createContextualFragment(html); + } el.parentNode.insertBefore(frag, where == beforebegin ? el : el.nextSibling); return el[(where == beforebegin ? 'previous' : 'next') + 'Sibling']; } else { rangeEl = (where == afterbegin ? 'first' : 'last') + 'Child'; if (el.firstChild) { range[setStart](el[rangeEl]); - frag = range.createContextualFragment(html); + if (!range.createContextualFragment) { + frag = createContextualFragment(html); + } + else { + frag = range.createContextualFragment(html); + } if(where == afterbegin){ el.insertBefore(frag, el.firstChild); }else{ @@ -415,157 +974,13 @@ Ext.DomHelper = function(){ createHtml : createHtml }; return pub; -}();/** - * @class Ext.DomHelper - */ -Ext.apply(Ext.DomHelper, -function(){ - var pub, - afterbegin = 'afterbegin', - afterend = 'afterend', - beforebegin = 'beforebegin', - beforeend = 'beforeend'; - - // private - function doInsert(el, o, returnElement, pos, sibling, append){ - el = Ext.getDom(el); - var newNode; - if (pub.useDom) { - newNode = createDom(o, null); - if (append) { - el.appendChild(newNode); - } else { - (sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el); - } - } else { - newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o)); - } - return returnElement ? Ext.get(newNode, true) : newNode; - } - - // build as dom - /** @ignore */ - function createDom(o, parentNode){ - var el, - doc = document, - useSet, - attr, - val, - cn; - - if (Ext.isArray(o)) { // Allow Arrays of siblings to be inserted - el = doc.createDocumentFragment(); // in one shot using a DocumentFragment - Ext.each(o, function(v) { - createDom(v, el); - }); - } else if (Ext.isString(o)) { // Allow a string as a child spec. - el = doc.createTextNode(o); - } else { - el = doc.createElement( o.tag || 'div' ); - useSet = !!el.setAttribute; // In IE some elements don't have setAttribute - Ext.iterate(o, function(attr, val){ - if(!/tag|children|cn|html|style/.test(attr)){ - if(attr == 'cls'){ - el.className = val; - }else{ - if(useSet){ - el.setAttribute(attr, val); - }else{ - el[attr] = val; - } - } - } - }); - Ext.DomHelper.applyStyles(el, o.style); - - if ((cn = o.children || o.cn)) { - createDom(cn, el); - } else if (o.html) { - el.innerHTML = o.html; - } - } - if(parentNode){ - parentNode.appendChild(el); - } - return el; - } - - pub = { - /** - * 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 = Ext.DomHelper.createHtml(o); - return new Ext.Template(html); - }, - - /** True to force the use of DOM instead of html fragments @type Boolean */ - useDom : false, - - /** - * 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 - * @hide (repeat) - */ - insertBefore : function(el, o, returnElement){ - return 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 - * @hide (repeat) - */ - insertAfter : function(el, o, returnElement){ - return 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 - * @hide (repeat) - */ - insertFirst : function(el, o, returnElement){ - return doInsert(el, o, returnElement, afterbegin, 'firstChild'); - }, - - /** - * 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 - * @hide (repeat) - */ - append: function(el, o, returnElement){ - return doInsert(el, o, returnElement, beforeend, '', true); - }, - - /** - * Creates new DOM element(s) without inserting them to the document. - * @param {Object/String} o The DOM object spec (and children) or raw HTML blob - * @return {HTMLElement} The new uninserted node - */ - createDom: createDom - }; - return pub; -}());/** +}(); +/** * @class Ext.Template *

Represents an HTML fragment template. Templates may be {@link #compile precompiled} * for greater performance.

*

For example usage {@link #Template see the constructor}.

- * + * * @constructor * An instance of this class may be created by passing to the constructor either * a single argument, or multiple arguments: @@ -601,7 +1016,7 @@ var t = new Ext.Template( { compiled: true, // {@link #compile} immediately disableFormats: true // See Notes below. - } + } ); * *

Notes:

@@ -617,19 +1032,21 @@ var t = new Ext.Template( */ Ext.Template = function(html){ var me = this, - a = arguments, - buf = []; + a = arguments, + buf = [], + v; if (Ext.isArray(html)) { html = html.join(""); } else if (a.length > 1) { - Ext.each(a, function(v) { - if (Ext.isObject(v)) { + for(var i = 0, len = a.length; i < len; i++){ + v = a[i]; + if(typeof v == 'object'){ Ext.apply(me, v); } else { buf.push(v); } - }); + }; html = buf.join(''); } @@ -648,11 +1065,11 @@ Ext.Template.prototype = { /** * @cfg {RegExp} re The regular expression used to match template variables. * Defaults to:

-     * re : /\{([\w-]+)\}/g                                     // for Ext Core
-     * re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g      // for Ext JS
+     * re : /\{([\w\-]+)\}/g                                     // for Ext Core
+     * re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g      // for Ext JS
      * 
*/ - re : /\{([\w-]+)\}/g, + re : /\{([\w\-]+)\}/g, /** * See {@link #re}. * @type RegExp @@ -667,14 +1084,14 @@ Ext.Template.prototype = { * @return {String} The HTML fragment */ applyTemplate : function(values){ - var me = this; + var me = this; return me.compiled ? - me.compiled(values) : - me.html.replace(me.re, function(m, name){ - return values[name] !== undefined ? values[name] : ""; - }); - }, + me.compiled(values) : + me.html.replace(me.re, function(m, name){ + return values[name] !== undefined ? values[name] : ""; + }); + }, /** * Sets the HTML used as the template and optionally compiles it. @@ -683,7 +1100,7 @@ Ext.Template.prototype = { * @return {Ext.Template} this */ set : function(html, compile){ - var me = this; + var me = this; me.html = html; me.compiled = null; return compile ? me.compile() : me; @@ -695,13 +1112,13 @@ Ext.Template.prototype = { */ compile : function(){ var me = this, - sep = Ext.isGecko ? "+" : ","; + sep = Ext.isGecko ? "+" : ","; - function fn(m, name){ - name = "values['" + name + "']"; - return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'"; + function fn(m, name){ + name = "values['" + name + "']"; + return "'"+ sep + '(' + name + " == undefined ? '' : " + name + ')' + sep + "'"; } - + eval("this.compiled = function(values){ return " + (Ext.isGecko ? "'" : "['") + me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + (Ext.isGecko ? "';};" : "'].join('');};")); @@ -797,133 +1214,8 @@ Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; Ext.Template.from = function(el, config){ el = Ext.getDom(el); return new Ext.Template(el.value || el.innerHTML, config || ''); -};/** - * @class Ext.Template - */ -Ext.apply(Ext.Template.prototype, { - /** - * @cfg {Boolean} disableFormats Specify true to disable format - * functions in the template. If the template does not contain - * {@link Ext.util.Format format functions}, setting disableFormats - * to true will reduce {@link #apply} time. Defaults to false. - *

-var t = new Ext.Template(
-    '<div name="{id}">',
-        '<span class="{cls}">{name} {value}</span>',
-    '</div>',
-    {
-        compiled: true,      // {@link #compile} immediately
-        disableFormats: true // reduce {@link #apply} time since no formatting
-    }    
-);
-     * 
- * For a list of available format functions, see {@link Ext.util.Format}. - */ - disableFormats : false, - /** - * See {@link #disableFormats}. - * @type Boolean - * @property disableFormats - */ - - /** - * The regular expression used to match template variables - * @type RegExp - * @property - * @hide repeat doc - */ - re : /\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, - - /** - * 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 - * @hide repeat doc - */ - applyTemplate : function(values){ - var me = this, - useF = me.disableFormats !== true, - fm = Ext.util.Format, - tpl = me; - - if(me.compiled){ - return me.compiled(values); - } - function fn(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 me.html.replace(me.re, fn); - }, - - /** - * Compiles the template into an internal function, eliminating the RegEx overhead. - * @return {Ext.Template} this - * @hide repeat doc - */ - compile : function(){ - var me = this, - fm = Ext.util.Format, - useF = me.disableFormats !== true, - sep = Ext.isGecko ? "+" : ",", - body; - - function fn(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+"'"; - } - - // branched to use + in gecko and [].join() in others - if(Ext.isGecko){ - body = "this.compiled = function(values){ return '" + - me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn) + - "';};"; - }else{ - body = ["this.compiled = function(values){ return ['"]; - body.push(me.html.replace(/\\/g, '\\\\').replace(/(\r\n|\n)/g, '\\n').replace(/'/g, "\\'").replace(this.re, fn)); - body.push("'].join('');};"); - body = body.join(''); - } - eval(body); - return me; - }, - - // private function used to call members - call : function(fnName, value, allValues){ - return this[fnName](value, allValues); - } -}); -Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; /* +}; +/* * This is code is also distributed under MIT license for use * with jQuery and prototype JavaScript libraries. */ @@ -954,7 +1246,7 @@ All selectors, attribute filters and pseudos below can be combined infinitely in
  • E[foo$=bar] has an attribute "foo" that ends with "bar"
  • E[foo*=bar] has an attribute "foo" that contains the substring "bar"
  • E[foo%=2] has an attribute "foo" that is evenly divisible by 2
  • -
  • E[foo!=bar] has an attribute "foo" that does not equal "bar"
  • +
  • E[foo!=bar] attribute "foo" does not equal "bar"
  • Pseudo Classes:

      @@ -997,7 +1289,7 @@ Ext.DomQuery = function(){ trimRe = /^\s+|\s+$/g, tplRe = /\{(\d+)\}/g, modeRe = /^(\s?[\/>+~]\s?|\s|$)/, - tagTokenRe = /^(#)?([\w-\*]+)/, + tagTokenRe = /^(#)?([\w\-\*]+)/, nthRe = /(\d*)n\+?(\d*)/, nthRe2 = /\D/, // This is for IE MSXML which does not support expandos. @@ -1205,17 +1497,23 @@ Ext.DomQuery = function(){ ri = -1, useGetStyle = custom == "{", fn = Ext.DomQuery.operators[op], - a, - innerHTML; + a, + xml, + hasXml; + for(var i = 0, ci; ci = cs[i]; i++){ // skip non-element nodes. if(ci.nodeType != 1){ continue; } + // only need to do this for the first node + if(!hasXml){ + xml = Ext.DomQuery.isXml(ci); + hasXml = true; + } - innerHTML = ci.innerHTML; // we only need to change the property names if we're dealing with html nodes, not XML - if(innerHTML !== null && innerHTML !== undefined){ + if(!xml){ if(useGetStyle){ a = Ext.DomQuery.getStyle(ci, attr); } else if (attr == "class" || attr == "className"){ @@ -1357,8 +1655,8 @@ Ext.DomQuery = function(){ // setup fn preamble var fn = ["var f = function(root){\n var mode; ++batch; var n = root || document;\n"], - mode, - lastPath, + mode, + lastPath, matchers = Ext.DomQuery.matchers, matchersLn = matchers.length, modeMatch, @@ -1577,19 +1875,19 @@ Ext.DomQuery = function(){ * statement as specified by their index. */ matchers : [{ - re: /^\.([\w-]+)/, + re: /^\.([\w\-]+)/, select: 'n = byClassName(n, " {1} ");' }, { - re: /^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, + re: /^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/, select: 'n = byPseudo(n, "{1}", "{2}");' },{ - re: /^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/, - select: 'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");' + re: /^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/, + select: 'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");' }, { - re: /^#([\w-]+)/, + re: /^#([\w\-]+)/, select: 'n = byId(n, "{1}");' },{ - re: /^@([\w-]+)/, + re: /^@([\w\-]+)/, select: 'return {firstChild:{nodeValue:attrValue(n, "{1}")}};' } ], @@ -1906,1838 +2204,7 @@ Ext.util.DelayedTask = function(fn, scope, args){ id = null; } }; -};(function(){ - -var EXTUTIL = Ext.util, - TOARRAY = Ext.toArray, - EACH = Ext.each, - ISOBJECT = Ext.isObject, - TRUE = true, - FALSE = false; -/** - * @class Ext.util.Observable - * Base class that provides a common interface for publishing events. Subclasses are expected to - * to have a property "events" with all the events defined, and, optionally, a property "listeners" - * with configured listeners defined.
      - * For example: - *
      
      -Employee = Ext.extend(Ext.util.Observable, {
      -    constructor: function(config){
      -        this.name = config.name;
      -        this.addEvents({
      -            "fired" : true,
      -            "quit" : true
      -        });
      -
      -        // Copy configured listeners into *this* object so that the base class's
      -        // constructor will add them.
      -        this.listeners = config.listeners;
      -
      -        // Call our superclass constructor to complete construction process.
      -        Employee.superclass.constructor.call(config)
      -    }
      -});
      -
      - * This could then be used like this:
      
      -var newEmployee = new Employee({
      -    name: employeeName,
      -    listeners: {
      -        quit: function() {
      -            // By default, "this" will be the object that fired the event.
      -            alert(this.name + " has quit!");
      -        }
      -    }
      -});
      -
      - */ -EXTUTIL.Observable = function(){ - /** - * @cfg {Object} listeners (optional)

      A config object containing one or more event handlers to be added to this - * object during initialization. This should be a valid listeners config object as specified in the - * {@link #addListener} example for attaching multiple handlers at once.

      - *

      DOM events from ExtJs {@link Ext.Component Components}

      - *

      While some ExtJs Component classes export selected DOM events (e.g. "click", "mouseover" etc), this - * is usually only done when extra value can be added. For example the {@link Ext.DataView DataView}'s - * {@link Ext.DataView#click click} event passing the node clicked on. To access DOM - * events directly from a Component's HTMLElement, listeners must be added to the {@link Ext.Component#getEl Element} after the Component - * has been rendered. A plugin can simplify this step:

      
      -// Plugin is configured with a listeners config object.
      -// The Component is appended to the argument list of all handler functions.
      -Ext.DomObserver = Ext.extend(Object, {
      -    constructor: function(config) {
      -        this.listeners = config.listeners ? config.listeners : config;
      -    },
      -
      -    // Component passes itself into plugin's init method
      -    init: function(c) {
      -        var p, l = this.listeners;
      -        for (p in l) {
      -            if (Ext.isFunction(l[p])) {
      -                l[p] = this.createHandler(l[p], c);
      -            } else {
      -                l[p].fn = this.createHandler(l[p].fn, c);
      -            }
      -        }
      -
      -        // Add the listeners to the Element immediately following the render call
      -        c.render = c.render.{@link Function#createSequence createSequence}(function() {
      -            var e = c.getEl();
      -            if (e) {
      -                e.on(l);
      -            }
      -        });
      -    },
      -
      -    createHandler: function(fn, c) {
      -        return function(e) {
      -            fn.call(this, e, c);
      -        };
      -    }
      -});
      -
      -var combo = new Ext.form.ComboBox({
      -
      -    // Collapse combo when its element is clicked on
      -    plugins: [ new Ext.DomObserver({
      -        click: function(evt, comp) {
      -            comp.collapse();
      -        }
      -    })],
      -    store: myStore,
      -    typeAhead: true,
      -    mode: 'local',
      -    triggerAction: 'all'
      -});
      -     * 

      - */ - var me = this, e = me.events; - if(me.listeners){ - me.on(me.listeners); - delete me.listeners; - } - me.events = e || {}; -}; - -EXTUTIL.Observable.prototype = { - // private - filterOptRe : /^(?:scope|delay|buffer|single)$/, - - /** - *

      Fires the specified event with the passed parameters (minus the event name).

      - *

      An event may be set to bubble up an Observable parent hierarchy (See {@link Ext.Component#getBubbleTarget}) - * by calling {@link #enableBubble}.

      - * @param {String} eventName The name of the event to fire. - * @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 = TOARRAY(arguments), - ename = a[0].toLowerCase(), - me = this, - ret = TRUE, - ce = me.events[ename], - q, - c; - if (me.eventsSuspended === TRUE) { - if (q = me.eventQueue) { - q.push(a); - } - } - else if(ISOBJECT(ce) && ce.bubble){ - if(ce.fire.apply(ce, a.slice(1)) === FALSE) { - return FALSE; - } - c = me.getBubbleTarget && me.getBubbleTarget(); - if(c && c.enableBubble) { - if(!c.events[ename] || !Ext.isObject(c.events[ename]) || !c.events[ename].bubble) { - c.enableBubble(ename); - } - return c.fireEvent.apply(c, a); - } - } - else { - if (ISOBJECT(ce)) { - a.shift(); - ret = ce.fire.apply(ce, a); - } - } - return ret; - }, - - /** - * Appends an event handler to this object. - * @param {String} eventName The name of the event to listen for. - * @param {Function} handler The method the event invokes. - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * If omitted, defaults to the object which fired the event. - * @param {Object} options (optional) An object containing handler configuration. - * properties. This may contain any of the following properties:
        - *
      • scope : Object
        The scope (this reference) in which the handler function is executed. - * If omitted, defaults to the object which fired the event.
      • - *
      • delay : Number
        The number of milliseconds to delay the invocation of the handler after the event fires.
      • - *
      • single : Boolean
        True to add a handler to handle just the next firing of the event, and then remove itself.
      • - *
      • buffer : Number
        Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed - * by the specified number of milliseconds. If the event fires again within that time, the original - * handler is not invoked, but the new handler is scheduled in its place.
      • - *
      • target : Observable
        Only call the handler if the event was fired on the target Observable, not - * if the event was bubbled up from a child Observable.
      • - *

      - *

      - * Combining Options
      - * Using the options argument, it is possible to combine different types of listeners:
      - *
      - * A delayed, one-time listener. - *

      
      -myDataView.on('click', this.onClick, this, {
      -single: true,
      -delay: 100
      -});
      - *

      - * Attaching multiple handlers in 1 call
      - * The method also allows for a single argument to be passed which is a config object containing properties - * which specify multiple handlers. - *

      - *

      
      -myGridPanel.on({
      -'click' : {
      -    fn: this.onClick,
      -    scope: this,
      -    delay: 100
      -},
      -'mouseover' : {
      -    fn: this.onMouseOver,
      -    scope: this
      -},
      -'mouseout' : {
      -    fn: this.onMouseOut,
      -    scope: this
      -}
      -});
      - *

      - * Or a shorthand syntax:
      - *

      
      -myGridPanel.on({
      -'click' : this.onClick,
      -'mouseover' : this.onMouseOver,
      -'mouseout' : this.onMouseOut,
      - scope: this
      -});
      - */ - addListener : function(eventName, fn, scope, o){ - var me = this, - e, - oe, - isF, - ce; - if (ISOBJECT(eventName)) { - o = eventName; - for (e in o){ - oe = o[e]; - if (!me.filterOptRe.test(e)) { - me.addListener(e, oe.fn || oe, oe.scope || o.scope, oe.fn ? oe : o); - } - } - } else { - eventName = eventName.toLowerCase(); - ce = me.events[eventName] || TRUE; - if (Ext.isBoolean(ce)) { - me.events[eventName] = ce = new EXTUTIL.Event(me, eventName); - } - ce.addListener(fn, scope, ISOBJECT(o) ? o : {}); - } - }, - - /** - * Removes an event handler. - * @param {String} eventName The type of event the handler was associated with. - * @param {Function} handler The handler to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope (optional) The scope originally specified for the handler. - */ - removeListener : function(eventName, fn, scope){ - var ce = this.events[eventName.toLowerCase()]; - if (ISOBJECT(ce)) { - ce.removeListener(fn, scope); - } - }, - - /** - * Removes all listeners for this object - */ - purgeListeners : function(){ - var events = this.events, - evt, - key; - for(key in events){ - evt = events[key]; - if(ISOBJECT(evt)){ - evt.clearListeners(); - } - } - }, - - /** - * Adds the specified events to the list of events which this Observable may fire. - * @param {Object|String} o Either an object with event names as properties with a value of true - * or the first event name string if multiple event names are being passed as separate parameters. - * @param {string} Optional. Event name if multiple event names are being passed as separate parameters. - * Usage:
      
      -this.addEvents('storeloaded', 'storecleared');
      -
      - */ - addEvents : function(o){ - var me = this; - me.events = me.events || {}; - if (Ext.isString(o)) { - var a = arguments, - i = a.length; - while(i--) { - me.events[a[i]] = me.events[a[i]] || TRUE; - } - } else { - Ext.applyIf(me.events, o); - } - }, - - /** - * Checks to see if this object has any listeners for a specified event - * @param {String} eventName The name of the event to check for - * @return {Boolean} True if the event is being listened for, else false - */ - hasListener : function(eventName){ - var e = this.events[eventName]; - return ISOBJECT(e) && e.listeners.length > 0; - }, - - /** - * Suspend the firing of all events. (see {@link #resumeEvents}) - * @param {Boolean} queueSuspended Pass as true to queue up suspended events to be fired - * after the {@link #resumeEvents} call instead of discarding all suspended events; - */ - suspendEvents : function(queueSuspended){ - this.eventsSuspended = TRUE; - if(queueSuspended && !this.eventQueue){ - this.eventQueue = []; - } - }, - - /** - * Resume firing events. (see {@link #suspendEvents}) - * If events were suspended using the queueSuspended parameter, then all - * events fired during event suspension will be sent to any listeners now. - */ - resumeEvents : function(){ - var me = this, - queued = me.eventQueue || []; - me.eventsSuspended = FALSE; - delete me.eventQueue; - EACH(queued, function(e) { - me.fireEvent.apply(me, e); - }); - } -}; - -var OBSERVABLE = EXTUTIL.Observable.prototype; -/** - * Appends an event handler to this object (shorthand for {@link #addListener}.) - * @param {String} eventName The type of event to listen for - * @param {Function} handler The method the event invokes - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. - * If omitted, defaults to the object which fired the event. - * @param {Object} options (optional) An object containing handler configuration. - * @method - */ -OBSERVABLE.on = OBSERVABLE.addListener; -/** - * Removes an event handler (shorthand for {@link #removeListener}.) - * @param {String} eventName The type of event the handler was associated with. - * @param {Function} handler The handler to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope (optional) The scope originally specified for the handler. - * @method - */ -OBSERVABLE.un = OBSERVABLE.removeListener; - -/** - * Removes all added captures from the Observable. - * @param {Observable} o The Observable to release - * @static - */ -EXTUTIL.Observable.releaseCapture = function(o){ - o.fireEvent = OBSERVABLE.fireEvent; -}; - -function createTargeted(h, o, scope){ - return function(){ - if(o.target == arguments[0]){ - h.apply(scope, TOARRAY(arguments)); - } - }; -}; - -function createBuffered(h, o, l, scope){ - l.task = new EXTUTIL.DelayedTask(); - return function(){ - l.task.delay(o.buffer, h, scope, TOARRAY(arguments)); - }; -}; - -function createSingle(h, e, fn, scope){ - return function(){ - e.removeListener(fn, scope); - return h.apply(scope, arguments); - }; -}; - -function createDelayed(h, o, l, scope){ - return function(){ - var task = new EXTUTIL.DelayedTask(); - if(!l.tasks) { - l.tasks = []; - } - l.tasks.push(task); - task.delay(o.delay || 10, h, scope, TOARRAY(arguments)); - }; -}; - -EXTUTIL.Event = function(obj, name){ - this.name = name; - this.obj = obj; - this.listeners = []; -}; - -EXTUTIL.Event.prototype = { - addListener : function(fn, scope, options){ - var me = this, - l; - scope = scope || me.obj; - if(!me.isListening(fn, scope)){ - l = me.createListener(fn, scope, options); - if(me.firing){ // if we are currently firing this event, don't disturb the listener loop - me.listeners = me.listeners.slice(0); - } - me.listeners.push(l); - } - }, - - createListener: function(fn, scope, o){ - o = o || {}, scope = scope || this.obj; - var l = { - fn: fn, - scope: scope, - options: o - }, h = fn; - if(o.target){ - h = createTargeted(h, o, scope); - } - if(o.delay){ - h = createDelayed(h, o, l, scope); - } - if(o.single){ - h = createSingle(h, this, fn, scope); - } - if(o.buffer){ - h = createBuffered(h, o, l, scope); - } - l.fireFn = h; - return l; - }, - - findListener : function(fn, scope){ - var list = this.listeners, - i = list.length, - l, - s; - while(i--) { - l = list[i]; - if(l) { - s = l.scope; - if(l.fn == fn && (s == scope || s == this.obj)){ - return i; - } - } - } - return -1; - }, - - isListening : function(fn, scope){ - return this.findListener(fn, scope) != -1; - }, - - removeListener : function(fn, scope){ - var index, - l, - k, - me = this, - ret = FALSE; - if((index = me.findListener(fn, scope)) != -1){ - if (me.firing) { - me.listeners = me.listeners.slice(0); - } - l = me.listeners[index]; - if(l.task) { - l.task.cancel(); - delete l.task; - } - k = l.tasks && l.tasks.length; - if(k) { - while(k--) { - l.tasks[k].cancel(); - } - delete l.tasks; - } - me.listeners.splice(index, 1); - ret = TRUE; - } - return ret; - }, - - // Iterate to stop any buffered/delayed events - clearListeners : function(){ - var me = this, - l = me.listeners, - i = l.length; - while(i--) { - me.removeListener(l[i].fn, l[i].scope); - } - }, - - fire : function(){ - var me = this, - args = TOARRAY(arguments), - listeners = me.listeners, - len = listeners.length, - i = 0, - l; - - if(len > 0){ - me.firing = TRUE; - for (; i < len; i++) { - l = listeners[i]; - if(l && l.fireFn.apply(l.scope || me.obj || window, args) === FALSE) { - return (me.firing = FALSE); - } - } - } - me.firing = FALSE; - return TRUE; - } -}; -})();/** - * @class Ext.util.Observable - */ -Ext.apply(Ext.util.Observable.prototype, function(){ - // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?) - // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call - // private - function getMethodEvent(method){ - var e = (this.methodEvents = this.methodEvents || - {})[method], returnValue, v, cancel, obj = this; - - if (!e) { - this.methodEvents[method] = e = {}; - e.originalFn = this[method]; - e.methodName = method; - e.before = []; - e.after = []; - - var makeCall = function(fn, scope, args){ - if (!Ext.isEmpty(v = fn.apply(scope || obj, args))) { - if (Ext.isObject(v)) { - returnValue = !Ext.isEmpty(v.returnValue) ? v.returnValue : v; - cancel = !!v.cancel; - } - else - if (v === false) { - cancel = true; - } - else { - returnValue = v; - } - } - }; - - this[method] = function(){ - var args = Ext.toArray(arguments); - returnValue = v = undefined; - cancel = false; - - Ext.each(e.before, function(b){ - makeCall(b.fn, b.scope, args); - if (cancel) { - return returnValue; - } - }); - - if (!Ext.isEmpty(v = e.originalFn.apply(obj, args))) { - returnValue = v; - } - Ext.each(e.after, function(a){ - makeCall(a.fn, a.scope, args); - if (cancel) { - return returnValue; - } - }); - return returnValue; - }; - } - return e; - } - - return { - // these are considered experimental - // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call - // adds an 'interceptor' called before the original method - beforeMethod : function(method, fn, scope){ - getMethodEvent.call(this, method).before.push({ - fn: fn, - scope: scope - }); - }, - - // adds a 'sequence' called after the original method - afterMethod : function(method, fn, scope){ - getMethodEvent.call(this, method).after.push({ - fn: fn, - scope: scope - }); - }, - - removeMethodListener: function(method, fn, scope){ - var e = getMethodEvent.call(this, method), found = false; - Ext.each(e.before, function(b, i, arr){ - if (b.fn == fn && b.scope == scope) { - arr.splice(i, 1); - found = true; - return false; - } - }); - if (!found) { - Ext.each(e.after, function(a, i, arr){ - if (a.fn == fn && a.scope == scope) { - arr.splice(i, 1); - return false; - } - }); - } - }, - - /** - * Relays selected events from the specified Observable as if the events were fired by this. - * @param {Object} o The Observable whose events this object is to relay. - * @param {Array} events Array of event names to relay. - */ - relayEvents : function(o, events){ - var me = this; - function createHandler(ename){ - return function(){ - return me.fireEvent.apply(me, [ename].concat(Ext.toArray(arguments))); - }; - } - Ext.each(events, function(ename){ - me.events[ename] = me.events[ename] || true; - o.on(ename, createHandler(ename), me); - }); - }, - - /** - *

      Enables events fired by this Observable to bubble up an owner hierarchy by calling - * this.getBubbleTarget() if present. There is no implementation in the Observable base class.

      - *

      This is commonly used by Ext.Components to bubble events to owner Containers. See {@link Ext.Component.getBubbleTarget}. The default - * implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to - * access the required target more quickly.

      - *

      Example:

      
      -Ext.override(Ext.form.Field, {
      -    //  Add functionality to Field's initComponent to enable the change event to bubble
      -    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
      -        this.enableBubble('change');
      -    }),
      -
      -    //  We know that we want Field's events to bubble directly to the FormPanel.
      -    getBubbleTarget : function() {
      -        if (!this.formPanel) {
      -            this.formPanel = this.findParentByType('form');
      -        }
      -        return this.formPanel;
      -    }
      -});
      -
      -var myForm = new Ext.formPanel({
      -    title: 'User Details',
      -    items: [{
      -        ...
      -    }],
      -    listeners: {
      -        change: function() {
      -            // Title goes red if form has been modified.
      -            myForm.header.setStyle('color', 'red');
      -        }
      -    }
      -});
      -
      - * @param {String/Array} events The event name to bubble, or an Array of event names. - */ - enableBubble : function(events){ - var me = this; - if(!Ext.isEmpty(events)){ - events = Ext.isArray(events) ? events : Ext.toArray(arguments); - Ext.each(events, function(ename){ - ename = ename.toLowerCase(); - var ce = me.events[ename] || true; - if (Ext.isBoolean(ce)) { - ce = new Ext.util.Event(me, ename); - me.events[ename] = ce; - } - ce.bubble = true; - }); - } - } - }; -}()); - - -/** - * Starts capture on the specified Observable. All events will be passed - * to the supplied function with the event name + standard signature of the event - * before the event is fired. If the supplied function returns false, - * the event will not fire. - * @param {Observable} o The Observable to capture events from. - * @param {Function} fn The function to call when an event is fired. - * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the Observable firing the event. - * @static - */ -Ext.util.Observable.capture = function(o, fn, scope){ - o.fireEvent = o.fireEvent.createInterceptor(fn, scope); -}; - - -/** - * Sets observability on the passed class constructor.

      - *

      This makes any event fired on any instance of the passed class also fire a single event through - * the class allowing for central handling of events on many instances at once.

      - *

      Usage:

      
      -Ext.util.Observable.observeClass(Ext.data.Connection);
      -Ext.data.Connection.on('beforerequest', function(con, options) {
      -    console.log('Ajax request made to ' + options.url);
      -});
      - * @param {Function} c The class constructor to make observable. - * @param {Object} listeners An object containing a series of listeners to add. See {@link #addListener}. - * @static - */ -Ext.util.Observable.observeClass = function(c, listeners){ - if(c){ - if(!c.fireEvent){ - Ext.apply(c, new Ext.util.Observable()); - Ext.util.Observable.capture(c.prototype, c.fireEvent, c); - } - if(Ext.isObject(listeners)){ - c.on(listeners); - } - return c; - } };/** - * @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, - E = Ext.lib.Event, - D = Ext.lib.Dom, - DOC = document, - WINDOW = window, - IEDEFERED = "ie-deferred-loader", - DOMCONTENTLOADED = "DOMContentLoaded", - propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, - /* - * This cache is used to hold special js objects, the document and window, that don't have an id. We need to keep - * a reference to them so we can look them up at a later point. - */ - specialElCache = []; - - function getId(el){ - var id = false, - i = 0, - len = specialElCache.length, - id = false, - skip = false, - o; - if(el){ - if(el.getElementById || el.navigator){ - // look up the id - for(; i < len; ++i){ - o = specialElCache[i]; - if(o.el === el){ - id = o.id; - break; - } - } - if(!id){ - // for browsers that support it, ensure that give the el the same id - id = Ext.id(el); - specialElCache.push({ - id: id, - el: el - }); - skip = true; - } - }else{ - id = Ext.id(el); - } - if(!Ext.elCache[id]){ - Ext.Element.addToCache(new Ext.Element(el), id); - if(skip){ - Ext.elCache[id].skipGC = true; - } - } - } - return id; - }; - - /// There is some jquery work around stuff here that isn't needed in Ext Core. - function addListener(el, ename, fn, task, wrap, scope){ - el = Ext.getDom(el); - var id = getId(el), - es = Ext.elCache[id].events, - wfn; - - wfn = E.on(el, ename, wrap); - es[ename] = es[ename] || []; - - /* 0 = Original Function, - 1 = Event Manager Wrapped Function, - 2 = Scope, - 3 = Adapter Wrapped Function, - 4 = Buffered Task - */ - es[ename].push([fn, wrap, scope, wfn, task]); - - // this is a workaround for jQuery and should somehow be removed from Ext Core in the future - // without breaking ExtJS. - - // workaround for jQuery - if(el.addEventListener && ename == "mousewheel"){ - var args = ["DOMMouseScroll", wrap, false]; - el.addEventListener.apply(el, args); - Ext.EventManager.addListener(WINDOW, 'unload', function(){ - el.removeEventListener.apply(el, args); - }); - } - - // fix stopped mousedowns on the document - if(el == DOC && ename == "mousedown"){ - Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); - } - }; - - function fireDocReady(){ - if(!docReadyState){ - Ext.isReady = docReadyState = true; - if(docReadyProcId){ - clearInterval(docReadyProcId); - } - if(Ext.isGecko || Ext.isOpera) { - DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false); - } - if(Ext.isIE){ - var defer = DOC.getElementById(IEDEFERED); - if(defer){ - defer.onreadystatechange = null; - defer.parentNode.removeChild(defer); - } - } - if(docReadyEvent){ - docReadyEvent.fire(); - docReadyEvent.listeners = []; // clearListeners no longer compatible. Force single: true? - } - } - }; - - function initDocReady(){ - var COMPLETE = "complete"; - - docReadyEvent = new Ext.util.Event(); - if (Ext.isGecko || Ext.isOpera) { - DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false); - } else if (Ext.isIE){ - DOC.write(""); - DOC.getElementById(IEDEFERED).onreadystatechange = function(){ - if(this.readyState == COMPLETE){ - fireDocReady(); - } - }; - } else if (Ext.isWebKit){ - docReadyProcId = setInterval(function(){ - if(DOC.readyState == COMPLETE) { - fireDocReady(); - } - }, 10); - } - // no matter what, make sure it fires on load - E.on(WINDOW, "load", fireDocReady); - }; - - function createTargeted(h, o){ - return function(){ - var args = Ext.toArray(arguments); - if(o.target == Ext.EventObject.setEvent(args[0]).target){ - h.apply(this, args); - } - }; - }; - - function createBuffered(h, o, task){ - return function(e){ - // create new event object impl so new events don't wipe out properties - task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]); - }; - }; - - function createSingle(h, el, ename, fn, scope){ - return function(e){ - Ext.EventManager.removeListener(el, ename, fn, scope); - h(e); - }; - }; - - function createDelayed(h, o, fn){ - return function(e){ - var task = new Ext.util.DelayedTask(h); - if(!fn.tasks) { - fn.tasks = []; - } - fn.tasks.push(task); - task.delay(o.delay || 10, h, null, [new Ext.EventObjectImpl(e)]); - }; - }; - - function listen(element, ename, opt, fn, scope){ - var o = !Ext.isObject(opt) ? {} : opt, - el = Ext.getDom(element), task; - - fn = fn || o.fn; - scope = scope || o.scope; - - if(!el){ - throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; - } - function h(e){ - // prevent errors while unload occurring - if(!Ext){// !window[xname]){ ==> can't we do this? - return; - } - e = Ext.EventObject.setEvent(e); - var t; - if (o.delegate) { - if(!(t = e.getTarget(o.delegate, el))){ - return; - } - } else { - t = e.target; - } - if (o.stopEvent) { - e.stopEvent(); - } - if (o.preventDefault) { - e.preventDefault(); - } - if (o.stopPropagation) { - e.stopPropagation(); - } - if (o.normalized) { - 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); - } - if(o.single){ - h = createSingle(h, el, ename, fn, scope); - } - if(o.buffer){ - task = new Ext.util.DelayedTask(h); - h = createBuffered(h, o, task); - } - - addListener(el, ename, fn, task, h, scope); - return h; - }; - - 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 name of the event to listen for. - * @param {Function} handler The handler function the event invokes. This function is passed - * the following parameters:
        - *
      • evt : EventObject
        The {@link Ext.EventObject EventObject} describing the event.
      • - *
      • t : Element
        The {@link Ext.Element Element} which was the target of the event. - * Note that this may be filtered by using the delegate option.
      • - *
      • o : Object
        The options object from the addListener call.
      • - *
      - * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. Defaults to the Element. - * @param {Object} options (optional) An object containing handler configuration properties. - * This may contain any of the following properties:
        - *
      • scope : Object
        The scope (this reference) in which the handler function is executed. Defaults to the Element.
      • - *
      • delegate : String
        A simple selector to filter the target or look for a descendant of the target
      • - *
      • stopEvent : Boolean
        True to stop the event. That is stop propagation, and prevent the default action.
      • - *
      • preventDefault : Boolean
        True to prevent the default action
      • - *
      • stopPropagation : Boolean
        True to prevent event propagation
      • - *
      • normalized : Boolean
        False to pass a browser event to the handler function instead of an Ext.EventObject
      • - *
      • delay : Number
        The number of milliseconds to delay the invocation of the handler after te event fires.
      • - *
      • single : Boolean
        True to add a handler to handle just the next firing of the event, and then remove itself.
      • - *
      • buffer : Number
        Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed - * by the specified number of milliseconds. If the event fires again within that time, the original - * handler is not invoked, but the new handler is scheduled in its place.
      • - *
      • target : Element
        Only call the handler if the event was fired on the target Element, not if the event was bubbled up from a child node.
      • - *

      - *

      See {@link Ext.Element#addListener} for examples of how to use these options.

      - */ - addListener : function(element, eventName, fn, scope, options){ - if(Ext.isObject(eventName)){ - var o = eventName, e, val; - for(e in o){ - val = o[e]; - if(!propRe.test(e)){ - if(Ext.isFunction(val)){ - // shared options - listen(element, e, o, val, o.scope); - }else{ - // individual options - listen(element, e, val); - } - } - } - } else { - 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 listener. - * @param {String} eventName The name of the event. - * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. - * @param {Object} scope If a scope (this reference) was specified when the listener was added, - * then this must refer to the same object. - */ - removeListener : function(el, eventName, fn, scope){ - el = Ext.getDom(el); - var id = getId(el), - f = el && (Ext.elCache[id].events)[eventName] || [], - wrap, i, l, k, len, fnc; - - for (i = 0, len = f.length; i < len; i++) { - - /* 0 = Original Function, - 1 = Event Manager Wrapped Function, - 2 = Scope, - 3 = Adapter Wrapped Function, - 4 = Buffered Task - */ - if (Ext.isArray(fnc = f[i]) && fnc[0] == fn && (!scope || fnc[2] == scope)) { - if(fnc[4]) { - fnc[4].cancel(); - } - k = fn.tasks && fn.tasks.length; - if(k) { - while(k--) { - fn.tasks[k].cancel(); - } - delete fn.tasks; - } - wrap = fnc[1]; - E.un(el, eventName, E.extAdapter ? fnc[3] : wrap); - - // jQuery workaround that should be removed from Ext Core - if(wrap && el.addEventListener && eventName == "mousewheel"){ - el.removeEventListener("DOMMouseScroll", wrap, false); - } - - // fix stopped mousedowns on the document - if(wrap && el == DOC && eventName == "mousedown"){ - Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); - } - - f.splice(i, 1); - if (f.length === 0) { - delete Ext.elCache[id].events[eventName]; - } - for (k in Ext.elCache[id].events) { - return false; - } - Ext.elCache[id].events = {}; - return false; - } - } - }, - - /** - * 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 all event handlers. - */ - removeAll : function(el){ - el = Ext.getDom(el); - var id = getId(el), - ec = Ext.elCache[id] || {}, - es = ec.events || {}, - f, i, len, ename, fn, k, wrap; - - for(ename in es){ - if(es.hasOwnProperty(ename)){ - f = es[ename]; - /* 0 = Original Function, - 1 = Event Manager Wrapped Function, - 2 = Scope, - 3 = Adapter Wrapped Function, - 4 = Buffered Task - */ - for (i = 0, len = f.length; i < len; i++) { - fn = f[i]; - if(fn[4]) { - fn[4].cancel(); - } - if(fn[0].tasks && (k = fn[0].tasks.length)) { - while(k--) { - fn[0].tasks[k].cancel(); - } - delete fn.tasks; - } - wrap = fn[1]; - E.un(el, ename, E.extAdapter ? fn[3] : wrap); - - // jQuery workaround that should be removed from Ext Core - if(el.addEventListener && wrap && ename == "mousewheel"){ - el.removeEventListener("DOMMouseScroll", wrap, false); - } - - // fix stopped mousedowns on the document - if(wrap && el == DOC && ename == "mousedown"){ - Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); - } - } - } - } - if (Ext.elCache[id]) { - Ext.elCache[id].events = {}; - } - }, - - getListeners : function(el, eventName) { - el = Ext.getDom(el); - var id = getId(el), - ec = Ext.elCache[id] || {}, - es = ec.events || {}, - results = []; - if (es && es[eventName]) { - return es[eventName]; - } else { - return null; - } - }, - - purgeElement : function(el, recurse, eventName) { - el = Ext.getDom(el); - var id = getId(el), - ec = Ext.elCache[id] || {}, - es = ec.events || {}, - i, f, len; - if (eventName) { - if (es && es.hasOwnProperty(eventName)) { - f = es[eventName]; - for (i = 0, len = f.length; i < len; i++) { - Ext.EventManager.removeListener(el, eventName, f[i][0]); - } - } - } else { - Ext.EventManager.removeAll(el); - } - if (recurse && el && el.childNodes) { - for (i = 0, len = el.childNodes.length; i < len; i++) { - Ext.EventManager.purgeElement(el.childNodes[i], recurse, eventName); - } - } - }, - - _unload : function() { - var el; - for (el in Ext.elCache) { - Ext.EventManager.removeAll(el); - } - delete Ext.elCache; - delete Ext.Element._flyweights; - }, - /** - * Adds a listener to be notified 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) The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options - * {single: true} be used so that the handler is removed on first invocation. - */ - onDocumentReady : function(fn, scope, options){ - if(docReadyState){ // if it already fired - docReadyEvent.addListener(fn, scope, options); - docReadyEvent.fire(); - docReadyEvent.listeners = []; // clearListeners no longer compatible. Force single: true? - } else { - if(!docReadyEvent) initDocReady(); - options = options || {}; - options.delay = options.delay || 1; - docReadyEvent.addListener(fn, scope, options); - } - } - }; - /** - * 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 name of the event to listen for. - * @param {Function} handler The handler function the event invokes. - * @param {Object} scope (optional) (this reference) in which the handler function executes. Defaults to the Element. - * @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 listener. - * @param {String} eventName The name of the event. - * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #on} call. - * @param {Object} scope If a scope (this reference) was specified when the listener was added, - * then this must refer to the same object. - * @member Ext.EventManager - * @method un - */ - pub.un = pub.removeListener; - - pub.stoppedMouseDownEvent = new Ext.util.Event(); - return pub; -}(); -/** - * Adds a listener to be notified 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 (optional) The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options - * {single: true} be used so that the handler is removed on first invocation. - * @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.isWebKit ? "ext-webkit" : ""]; - - if(Ext.isSafari){ - cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4'))); - }else if(Ext.isChrome){ - cls.push("ext-chrome"); - } - - if(Ext.isMac){ - cls.push("ext-mac"); - } - if(Ext.isLinux){ - cls.push("ext-linux"); - } - - if(Ext.isStrict || Ext.isBorderBox){ // add to the parent to allow for selectors like ".ext-strict .ext-ie" - var p = bd.parentNode; - if(p){ - p.className += Ext.isStrict ? ' ext-strict' : ' ext-border-box'; - } - } - bd.className += cls.join(' '); - return true; - } - - if(!initExtCss()){ - Ext.onReady(initExtCss); - } -})(); - - -/** - * @class Ext.EventObject - * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject - * wraps the browser's native event-object normalizing cross-browser differences, - * such as which mouse button is clicked, keys pressed, mechanisms to stop - * event-propagation along with a method to prevent default actions from taking place. - *

      For example:

      - *
      
      -function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
      -    e.preventDefault();
      -    var target = e.getTarget(); // same as t (the target HTMLElement)
      -    ...
      -}
      -var myDiv = {@link Ext#get Ext.get}("myDiv");  // get reference to an {@link Ext.Element}
      -myDiv.on(         // 'on' is shorthand for addListener
      -    "click",      // perform an action on click of myDiv
      -    handleClick   // reference to the action handler
      -);
      -// other methods to do the same:
      -Ext.EventManager.on("myDiv", 'click', handleClick);
      -Ext.EventManager.addListener("myDiv", 'click', handleClick);
      - 
      - * @singleton - */ -Ext.EventObject = function(){ - var E = Ext.lib.Event, - // safari keypress events for special keys return bad keycodes - 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 - btnMap = Ext.isIE ? {1:0,4:1,2:2} : - (Ext.isWebKit ? {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 = { - /** @private */ - setEvent : function(e){ - var me = this; - if(e == me || (e && e.browserEvent)){ // already wrapped - return e; - } - me.browserEvent = e; - if(e){ - // normalize buttons - me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1); - if(e.type == 'click' && me.button == -1){ - me.button = 0; - } - me.type = e.type; - me.shiftKey = e.shiftKey; - // mac metaKey behaves like ctrlKey - me.ctrlKey = e.ctrlKey || e.metaKey || false; - me.altKey = e.altKey; - // in getKey these will be normalized for the mac - me.keyCode = e.keyCode; - me.charCode = e.charCode; - // cache the target for the delayed and or buffered events - me.target = E.getTarget(e); - // same for XY - me.xy = E.getXY(e); - }else{ - me.button = -1; - me.shiftKey = false; - me.ctrlKey = false; - me.altKey = false; - me.keyCode = 0; - me.charCode = 0; - me.target = null; - me.xy = [0, 0]; - } - return me; - }, - - /** - * Stop the event (preventDefault and stopPropagation) - */ - stopEvent : function(){ - var me = this; - if(me.browserEvent){ - if(me.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(me); - } - E.stopEvent(me.browserEvent); - } - }, - - /** - * Prevents the browsers default handling of the event. - */ - preventDefault : function(){ - if(this.browserEvent){ - E.preventDefault(this.browserEvent); - } - }, - - /** - * Cancels bubbling of the event. - */ - stopPropagation : function(){ - var me = this; - if(me.browserEvent){ - if(me.browserEvent.type == 'mousedown'){ - Ext.EventManager.stoppedMouseDownEvent.fire(me); - } - E.stopPropagation(me.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(){ - return this.normalizeKey(this.keyCode || this.charCode) - }, - - // private - normalizeKey: function(k){ - 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 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(){ - return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : 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 target of this event is a child of el. Unless the allowEl parameter is set, it will return false if if the target is el. - * Example usage:
      
      -        // 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!');
      -            }
      -        });
      -        
      - * @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 - * @param {Boolean} allowEl {optional} true to also check if the passed element is the target or related target - * @return {Boolean} - */ - within : function(el, related, allowEl){ - if(el){ - var t = this[related ? "getRelatedTarget" : "getTarget"](); - return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t)); - } - return false; - } - }; - - return new Ext.EventObjectImpl(); -}(); -/** -* @class Ext.EventManager -*/ -Ext.apply(Ext.EventManager, function(){ - var resizeEvent, - resizeTask, - textEvent, - textSize, - D = Ext.lib.Dom, - propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, - curWidth = 0, - curHeight = 0, - // note 1: IE fires ONLY the keydown event on specialkey autorepeat - // note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat - // (research done by @Jan Wolter at http://unixpapa.com/js/key.html) - useKeydown = Ext.isWebKit ? - Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]) >= 525 : - !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera); - - return { - // private - doResizeEvent: function(){ - var h = D.getViewHeight(), - w = D.getViewWidth(); - - //whacky problem in IE where the resize event will fire even though the w/h are the same. - if(curHeight != h || curWidth != w){ - resizeEvent.fire(curWidth = w, curHeight = h); - } - }, - - /** - * Adds a listener to be notified when the browser window is resized and provides resize event buffering (100 milliseconds), - * passes new viewport width and height to handlers. - * @param {Function} fn The handler function the window resize event invokes. - * @param {Object} scope The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options Options object as passed to {@link Ext.Element#addListener} - */ - onWindowResize : function(fn, scope, options){ - if(!resizeEvent){ - resizeEvent = new Ext.util.Event(); - resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); - Ext.EventManager.on(window, "resize", this.fireWindowResize, this); - } - resizeEvent.addListener(fn, scope, options); - }, - - // exposed only to allow manual firing - fireWindowResize : function(){ - if(resizeEvent){ - resizeTask.delay(100); - } - }, - - /** - * Adds a listener to be notified 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 function the event invokes. - * @param {Object} scope The scope (this reference) in which the handler function executes. Defaults to the browser window. - * @param {boolean} options Options object as passed to {@link Ext.Element#addListener} - */ - 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()); - } - }, - - /** - * The frequency, in milliseconds, to check for text resize events (defaults to 50) - */ - textResizeInterval : 50, - - /** - * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL) - */ - ieDeferSrc : false, - - // protected for use inside the framework - // detects whether we should use keydown or keypress based on the browser. - useKeydown: useKeydown - }; -}()); - -Ext.EventManager.on = Ext.EventManager.addListener; - - -Ext.apply(Ext.EventObjectImpl.prototype, { - /** 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 */ - isNavKeyPress : function(){ - var me = this, - k = this.normalizeKey(me.keyCode); - return (k >= 33 && k <= 40) || // Page Up/Down, End, Home, Left, Up, Right, Down - k == me.RETURN || - k == me.TAB || - k == me.ESC; - }, - - isSpecialKey : function(){ - var k = this.normalizeKey(this.keyCode); - return (this.type == 'keypress' && this.ctrlKey) || - this.isNavKeyPress() || - (k == this.BACKSPACE) || // Backspace - (k >= 16 && k <= 20) || // Shift, Ctrl, Alt, Pause, Caps Lock - (k >= 44 && k <= 45); // Print Screen, Insert - }, - - getPoint : function(){ - return new Ext.lib.Point(this.xy[0], this.xy[1]); - }, - - /** - * 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); - } -});/** * @class Ext.Element *

      Encapsulates a DOM element, adding simple DOM manipulation facilities, normalizing for browser differences.

      *

      All instances of this class inherit the methods of {@link Ext.Fx} making visual effects easily available to all DOM elements.

      @@ -3835,10 +2302,7 @@ Ext.Element = function(element, forceNew){ this.id = id || Ext.id(dom); }; -var D = Ext.lib.Dom, - DH = Ext.DomHelper, - E = Ext.lib.Event, - A = Ext.lib.Anim, +var DH = Ext.DomHelper, El = Ext.Element, EC = Ext.elCache; @@ -3855,7 +2319,7 @@ El.prototype = { val, useSet = (useSet !== false) && !!el.setAttribute; - for(attr in o){ + for (attr in o) { if (o.hasOwnProperty(attr)) { val = o[attr]; if (attr == 'style') { @@ -4368,7 +2832,7 @@ el.un('click', this.handlerFn); * @return {Boolean} */ isBorderBox : function(){ - return noBoxAdjust[(this.dom.tagName || "").toLowerCase()] || Ext.isBorderBox; + return Ext.isBorderBox || Ext.isForcedBorderBox || noBoxAdjust[(this.dom.tagName || "").toLowerCase()]; }, /** @@ -4425,18 +2889,62 @@ el.un('click', this.handlerFn); * @param {String} namespace (optional) The namespace in which to look for the attribute * @return {String} The attribute value */ - getAttribute : Ext.isIE ? function(name, ns){ - var d = this.dom, - type = typeof d[ns + ":" + name]; + getAttribute: (function(){ + var test = document.createElement('table'), + isBrokenOnTable = false, + hasGetAttribute = 'getAttribute' in test, + unknownRe = /undefined|unknown/; - if(['undefined', 'unknown'].indexOf(type) == -1){ - return d[ns + ":" + name]; + if (hasGetAttribute) { + + try { + test.getAttribute('ext:qtip'); + } catch (e) { + isBrokenOnTable = true; + } + + return function(name, ns) { + var el = this.dom, + value; + + if (el.getAttributeNS) { + value = el.getAttributeNS(ns, name) || null; + } + + if (value == null) { + if (ns) { + if (isBrokenOnTable && el.tagName.toUpperCase() == 'TABLE') { + try { + value = el.getAttribute(ns + ':' + name); + } catch (e) { + value = ''; + } + } else { + value = el.getAttribute(ns + ':' + name); + } + } else { + value = el.getAttribute(name) || el[name]; + } + } + return value || ''; + }; + } else { + return function(name, ns) { + var el = this.om, + value, + attribute; + + if (ns) { + attribute = el[ns + ':' + name]; + value = unknownRe.test(typeof attribute) ? undefined : attribute; + } else { + value = el[name]; + } + return value || ''; + }; } - return d[name]; - } : function(name, ns){ - var d = this.dom; - return d.getAttributeNS(ns, name) || d.getAttribute(ns + ":" + name) || d.getAttribute(name) || d[name]; - }, + test = null; + })(), /** * Update the innerHTML of this element @@ -4535,8 +3043,15 @@ El.get = function(el){ return ex; } else if (el instanceof El) { if(el != docEl){ - el.dom = DOC.getElementById(el.id) || el.dom; // refresh dom element in case no longer valid, - // catch case where it hasn't been appended + // refresh dom element in case no longer valid, + // catch case where it hasn't been appended + + // If an el instance is passed, don't pass to getElementById without some kind of id + if (Ext.isIE && (el.id == undefined || el.id == '')) { + el.dom = el.dom; + } else { + el.dom = DOC.getElementById(el.id) || el.dom; + } } return el; } else if(el.isComposite) { @@ -4712,598 +3227,6 @@ if(Ext.isIE || Ext.isGecko){ } })(); -/** - * @class Ext.Element - */ -Ext.Element.addMethods({ - /** - * Stops the specified event(s) from bubbling and optionally prevents the default action - * @param {String/Array} eventName an event / array of events to stop from bubbling - * @param {Boolean} preventDefault (optional) true to prevent the default action too - * @return {Ext.Element} this - */ - swallowEvent : function(eventName, preventDefault){ - var me = this; - function fn(e){ - e.stopPropagation(); - if(preventDefault){ - e.preventDefault(); - } - } - if(Ext.isArray(eventName)){ - Ext.each(eventName, function(e) { - me.on(e, fn); - }); - return me; - } - me.on(eventName, fn); - return me; - }, - - /** - * 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); - }); - }, - - /** - * 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){ - var me = this, - dom = me.dom, - n = dom.firstChild, - ni = -1; - - if(Ext.Element.data(dom, 'isCleaned') && forceReclean !== true){ - return me; - } - - while(n){ - var nx = n.nextSibling; - if(n.nodeType == 3 && !/\S/.test(n.nodeValue)){ - dom.removeChild(n); - }else{ - n.nodeIndex = ++ni; - } - n = nx; - } - Ext.Element.data(dom, 'isCleaned', true); - return me; - }, - - /** - * 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 {@link Ext.Updater Updater} - * @return {Ext.Updater} The Updater - */ - getUpdater : function(){ - return this.updateManager || (this.updateManager = new Ext.Updater(this)); - }, - - /** - * 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 (!this.dom) { - return this; - } - html = html || ""; - - if(loadScripts !== true){ - this.dom.innerHTML = html; - if(Ext.isFunction(callback)){ - callback(); - } - return this; - } - - var id = Ext.id(), - dom = this.dom; - - html += ''; - - Ext.lib.Event.onAvailable(id, function(){ - var DOC = document, - hd = DOC.getElementsByTagName("head")[0], - re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig, - srcRe = /\ssrc=([\'\"])(.*?)\1/i, - typeRe = /\stype=([\'\"])(.*?)\1/i, - match, - attrs, - srcMatch, - typeMatch, - el, - s; - - while((match = re.exec(html))){ - attrs = match[1]; - srcMatch = attrs ? attrs.match(srcRe) : false; - if(srcMatch && srcMatch[2]){ - s = DOC.createElement("script"); - s.src = srcMatch[2]; - typeMatch = attrs.match(typeRe); - if(typeMatch && typeMatch[2]){ - s.type = typeMatch[2]; - } - hd.appendChild(s); - }else if(match[2] && match[2].length > 0){ - if(window.execScript) { - window.execScript(match[2]); - } else { - window.eval(match[2]); - } - } - } - el = DOC.getElementById(id); - if(el){Ext.removeNode(el);} - if(Ext.isFunction(callback)){ - callback(); - } - }); - dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); - return this; - }, - - // inherit docs, overridden so we can add removeAnchor - removeAllListeners : function(){ - this.removeAnchor(); - Ext.EventManager.removeAll(this.dom); - return this; - }, - - /** - * 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 = Ext.isObject(config) ? config : {tag : "div", cls: config}; - - var me = this, - proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) : - Ext.DomHelper.insertBefore(me.dom, config, true); - - if(matchBox && me.setBox && me.getBox){ // check to make sure Element.position.js is loaded - proxy.setBox(me.getBox()); - } - return proxy; - } -}); - -Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater; -/** - * @class Ext.Element - */ -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. - anchor = (anchor || "tl").toLowerCase(); - s = s || {}; - - var me = this, - vp = me.dom == document.body || me.dom == document, - w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(), - h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(), - xy, - r = Math.round, - o = me.getXY(), - scroll = me.getScroll(), - extraX = vp ? scroll.left : !local ? o[0] : 0, - extraY = vp ? scroll.top : !local ? o[1] : 0, - hash = { - c : [r(w * 0.5), r(h * 0.5)], - t : [r(w * 0.5), 0], - l : [0, r(h * 0.5)], - r : [w, r(h * 0.5)], - b : [r(w * 0.5), h], - tl : [0, 0], - bl : [0, h], - br : [w, h], - tr : [w, 0] - }; - - xy = hash[anchor]; - return [xy[0] + extraX, xy[1] + extraY]; - }, - - /** - * 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 me = this, - dom = me.dom, - scroll = !Ext.isEmpty(monitorScroll), - action = function(){ - Ext.fly(dom).alignTo(el, alignment, offsets, animate); - Ext.callback(callback, Ext.fly(dom)); - }, - anchor = this.getAnchor(); - - // previous listener anchor, remove it - this.removeAnchor(); - Ext.apply(anchor, { - fn: action, - scroll: scroll - }); - - Ext.EventManager.onWindowResize(action, null); - - if(scroll){ - Ext.EventManager.on(window, 'scroll', action, null, - {buffer: !isNaN(monitorScroll) ? monitorScroll : 50}); - } - action.call(me); // align immediately - return me; - }, - - /** - * Remove any anchor to this element. See {@link #anchorTo}. - * @return {Ext.Element} this - */ - removeAnchor : function(){ - var me = this, - anchor = this.getAnchor(); - - if(anchor && anchor.fn){ - Ext.EventManager.removeResizeListener(anchor.fn); - if(anchor.scroll){ - Ext.EventManager.un(window, 'scroll', anchor.fn); - } - delete anchor.fn; - } - return me; - }, - - // private - getAnchor : function(){ - var data = Ext.Element.data, - dom = this.dom; - if (!dom) { - return; - } - var anchor = data(dom, '_anchor'); - - if(!anchor){ - anchor = data(dom, '_anchor', {}); - } - return anchor; - }, - - /** - * 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 (optional, defaults to "tl-bl?") 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"; - } - - o = o || [0,0]; - p = (!p || p == "?" ? "tl-bl?" : (!/-/.test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase(); - - var me = this, - d = me.dom, - a1, - a2, - x, - y, - //constrain the aligned el to viewport if necessary - w, - h, - r, - dw = Ext.lib.Dom.getViewWidth() -10, // 10px of margin for ie - dh = Ext.lib.Dom.getViewHeight()-10, // 10px of margin for ie - p1y, - p1x, - p2y, - p2x, - swapY, - swapX, - doc = document, - docElement = doc.documentElement, - docBody = doc.body, - scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5, - scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5, - c = false, //constrain to viewport - p1 = "", - p2 = "", - m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); - - if(!m){ - throw "Element.alignTo with an invalid alignment " + p; - } - - p1 = m[1]; - p2 = m[2]; - 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 - a1 = me.getAnchorXY(p1, true); - a2 = el.getAnchorXY(p2, false); - - x = a2[0] - a1[0] + o[0]; - y = a2[1] - a1[1] + o[1]; - - if(c){ - w = me.getWidth(); - h = me.getHeight(); - r = el.getRegion(); - //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. - p1y = p1.charAt(0); - p1x = p1.charAt(p1.length-1); - p2y = p2.charAt(0); - p2x = p2.charAt(p2.length-1); - swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); - swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); - - - 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: - *
        - *
      • Blank: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").
      • - *
      • One anchor (deprecated): The passed anchor position is used as the target element's anchor point. - * The element being aligned will position its top-left corner (tl) to that point. This method has been - * deprecated in favor of the newer two anchor syntax below.
      • - *
      • Two anchors: If two values from the table below are passed separated by a dash, the first value is used as the - * element's anchor point, and the second value is used as the target's anchor point.
      • - *
      - * In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of - * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to - * the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than - * that specified in order to enforce the viewport constraints. - * Following are all of the supported anchor positions: -
      -Value  Description
      ------  -----------------------------
      -tl     The top left corner (default)
      -t      The center of the top edge
      -tr     The top right corner
      -l      The center of the left edge
      -c      In the center of the element
      -r      The center of the right edge
      -bl     The bottom left corner
      -b      The center of the bottom edge
      -br     The bottom right corner
      -
      -Example Usage: -
      
      -// align el to other-el using the default positioning ("tl-bl", non-constrained)
      -el.alignTo("other-el");
      -
      -// align the top left corner of el with the top right corner of other-el (constrained to viewport)
      -el.alignTo("other-el", "tr?");
      -
      -// align the bottom right corner of el with the center left edge of other-el
      -el.alignTo("other-el", "br-l?");
      -
      -// align the center of el with the bottom left corner of other-el and
      -// adjust the x position by -6 pixels (and the y position by 0)
      -el.alignTo("other-el", "c-bl", [-6, 0]);
      -
      - * @param {Mixed} element The element to align to. - * @param {String} position (optional, defaults to "tl-bl?") 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 me = this; - return me.setXY(me.getAlignToXY(element, position, offsets), - me.preanim && !!animate ? me.preanim(arguments, 3) : false); - }, - - // private ==> used outside of core - adjustForConstraints : function(xy, parent, offsets){ - return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; - }, - - // private ==> used outside of core - getConstrainToXY : function(el, local, offsets, proposedXY){ - 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; - }; - }(), - - - -// el = Ext.get(el); -// offsets = Ext.applyIf(offsets || {}, {top : 0, left : 0, bottom : 0, right : 0}); - -// var me = this, -// doc = document, -// s = el.getScroll(), -// vxy = el.getXY(), -// vx = offsets.left + s.left, -// vy = offsets.top + s.top, -// vw = -offsets.right, -// vh = -offsets.bottom, -// vr, -// vb, -// xy = proposedXY || (!local ? me.getXY() : [me.getLeft(true), me.getTop(true)]), -// x = xy[0], -// y = xy[1], -// w = me.dom.offsetWidth, h = me.dom.offsetHeight, -// moved = false; // only move it if it needs it -// -// -// if(el.dom == doc.body || el.dom == doc){ -// vw += Ext.lib.Dom.getViewWidth(); -// vh += Ext.lib.Dom.getViewHeight(); -// }else{ -// vw += el.dom.clientWidth; -// vh += el.dom.clientHeight; -// if(!local){ -// vx += vxy[0]; -// vy += vxy[1]; -// } -// } - -// // first validate right/bottom -// if(x + w > vx + vw){ -// x = vx + vw - w; -// moved = true; -// } -// if(y + h > vy + vh){ -// y = vy + vh - 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; -// }, - - /** - * 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){ - return this.alignTo(centerIn || document, 'c-c'); - } -}); /** * @class Ext.Element */ @@ -5313,7 +3236,7 @@ Ext.Element.addMethods(function(){ PREVIOUSSIBLING = 'previousSibling', DQ = Ext.DomQuery, GET = Ext.get; - + return { /** * 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) @@ -5324,9 +3247,9 @@ Ext.Element.addMethods(function(){ */ findParent : function(simpleSelector, maxDepth, returnEl){ var p = this.dom, - b = document.body, - depth = 0, - stopEl; + b = document.body, + depth = 0, + stopEl; if(Ext.isGecko && Object.prototype.toString.call(p) == '[object XULElement]') { return null; } @@ -5344,7 +3267,7 @@ Ext.Element.addMethods(function(){ } 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 @@ -5357,7 +3280,7 @@ Ext.Element.addMethods(function(){ 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. @@ -5369,7 +3292,7 @@ Ext.Element.addMethods(function(){ up : function(simpleSelector, maxDepth){ return this.findParentNode(simpleSelector, maxDepth, 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 @@ -5378,7 +3301,7 @@ Ext.Element.addMethods(function(){ select : function(selector){ return Ext.Element.select(selector, this.dom); }, - + /** * Selects child nodes based on the passed CSS selector (the selector should not contain an id). * @param {String} selector The CSS selector @@ -5387,7 +3310,7 @@ Ext.Element.addMethods(function(){ query : function(selector){ return DQ.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 @@ -5398,7 +3321,7 @@ Ext.Element.addMethods(function(){ var n = DQ.selectNode(selector, this.dom); return returnDom ? n : 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 @@ -5409,7 +3332,7 @@ Ext.Element.addMethods(function(){ var n = DQ.selectNode(" > " + selector, this.dom); return returnDom ? n : GET(n); }, - + /** * 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 @@ -5419,7 +3342,7 @@ Ext.Element.addMethods(function(){ 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 @@ -5429,7 +3352,7 @@ Ext.Element.addMethods(function(){ 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 @@ -5439,8 +3362,8 @@ Ext.Element.addMethods(function(){ 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 @@ -5450,7 +3373,7 @@ Ext.Element.addMethods(function(){ 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 @@ -5460,7 +3383,7 @@ Ext.Element.addMethods(function(){ last : function(selector, returnDom){ return this.matchNode(PREVIOUSSIBLING, 'lastChild', selector, returnDom); }, - + matchNode : function(dir, start, selector, returnDom){ var n = this.dom[start]; while(n){ @@ -5470,60 +3393,47 @@ Ext.Element.addMethods(function(){ n = n[dir]; } return null; - } - } + } + }; }());/** * @class Ext.Element */ -Ext.Element.addMethods({ - /** - * 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 Ext.Element.select(selector, unique, this.dom); - } -});/** - * @class Ext.Element - */ Ext.Element.addMethods( function() { var GETDOM = Ext.getDom, GET = Ext.get, DH = Ext.DomHelper; - + return { /** * Appends the passed element(s) to this element * @param {String/HTMLElement/Array/Element/CompositeElement} el * @return {Ext.Element} this */ - appendChild: function(el){ - return GET(el).appendTo(this); + appendChild: function(el){ + return GET(el).appendTo(this); }, - + /** * Appends this element to the passed element * @param {Mixed} el The new parent element * @return {Ext.Element} this */ - appendTo: function(el){ - GETDOM(el).appendChild(this.dom); + appendTo: function(el){ + GETDOM(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){ + insertBefore: function(el){ (el = GETDOM(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 @@ -5533,7 +3443,7 @@ function() { (el = GETDOM(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 @@ -5549,7 +3459,7 @@ function() { return this.createChild(el, this.dom.firstChild, returnDom); } }, - + /** * Replaces the passed element with this element * @param {Mixed} el The element to replace @@ -5561,7 +3471,7 @@ function() { 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 @@ -5569,21 +3479,21 @@ function() { */ replaceWith: function(el){ var me = this; - + if(el.nodeType || el.dom || typeof el == 'string'){ el = GETDOM(el); me.dom.parentNode.insertBefore(el, me.dom); }else{ el = DH.insertBefore(me.dom, el); } - + delete Ext.elCache[me.id]; - Ext.removeNode(me.dom); + Ext.removeNode(me.dom); me.id = Ext.id(me.dom = el); - Ext.Element.addToCache(me.isFlyweight ? new Ext.Element(me.dom) : me); + Ext.Element.addToCache(me.isFlyweight ? new Ext.Element(me.dom) : me); return me; }, - + /** * 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 @@ -5594,23 +3504,23 @@ function() { */ createChild: function(config, insertBefore, returnDom){ config = config || {tag:'div'}; - return insertBefore ? - DH.insertBefore(insertBefore, config, returnDom !== true) : - DH[!this.dom.firstChild ? 'overwrite' : 'append'](this.dom, config, returnDom !== true); + return insertBefore ? + DH.insertBefore(insertBefore, config, returnDom !== true) : + DH[!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){ + wrap: function(config, returnDom){ var newEl = DH.insertBefore(this.dom, config || {tag: "div"}, !returnDom); newEl.dom ? newEl.dom.appendChild(this.dom) : newEl.appendChild(this.dom); return newEl; }, - + /** * Inserts an html fragment into this element * @param {String} where Where to insert the html in relation to this element - beforeBegin, afterBegin, beforeEnd, afterEnd. @@ -5622,70 +3532,21 @@ function() { var el = DH.insertHtml(where, this.dom, html); return returnEl ? Ext.get(el) : el; } - } -}());/** - * @class Ext.Element - */ -Ext.apply(Ext.Element.prototype, function() { - var GETDOM = Ext.getDom, - GET = Ext.get, - DH = Ext.DomHelper; - - return { - /** - * 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. If an array is passed, the last inserted element is returned. - */ - insertSibling: function(el, where, returnDom){ - var me = this, - rt, - isAfter = (where || 'before').toLowerCase() == 'after', - insertEl; - - if(Ext.isArray(el)){ - insertEl = me; - Ext.each(el, function(e) { - rt = Ext.fly(insertEl, '_internal').insertSibling(e, where, returnDom); - if(isAfter){ - insertEl = rt; - } - }); - return rt; - } - - el = el || {}; - - if(el.nodeType || el.dom){ - rt = me.dom.parentNode.insertBefore(GETDOM(el), isAfter ? me.dom.nextSibling : me.dom); - if (!returnDom) { - rt = GET(rt); - } - }else{ - if (isAfter && !me.dom.nextSibling) { - rt = DH.append(me.dom.parentNode, el, !returnDom); - } else { - rt = DH[isAfter ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom); - } - } - return rt; - } - }; + }; }());/** * @class Ext.Element */ Ext.Element.addMethods(function(){ // local style camelizing for speed - var propCache = {}, + var supports = Ext.supports, + propCache = {}, camelRe = /(-[a-z])/gi, - classReCache = {}, view = document.defaultView, - propFloat = Ext.isIE ? 'styleFloat' : 'cssFloat', opacityRe = /alpha\(opacity=(.*)\)/i, trimRe = /^\s+|\s+$/g, EL = Ext.Element, + spacesRe = /\s+/, + wordsRe = /\w/g, PADDING = "padding", MARGIN = "margin", BORDER = "border", @@ -5714,14 +3575,14 @@ Ext.Element.addMethods(function(){ } function chkCache(prop) { - return propCache[prop] || (propCache[prop] = prop == 'float' ? propFloat : prop.replace(camelRe, camelFn)); + return propCache[prop] || (propCache[prop] = prop == 'float' ? (supports.cssFloat ? 'cssFloat' : 'styleFloat') : prop.replace(camelRe, camelFn)); } return { // private ==> used by Fx adjustWidth : function(width) { var me = this; - var isNum = Ext.isNumber(width); + var isNum = (typeof width == "number"); if(isNum && me.autoBoxAdjust && !me.isBorderBox()){ width -= (me.getBorderWidth("lr") + me.getPadding("lr")); } @@ -5731,7 +3592,7 @@ Ext.Element.addMethods(function(){ // private ==> used by Fx adjustHeight : function(height) { var me = this; - var isNum = Ext.isNumber(height); + var isNum = (typeof height == "number"); if(isNum && me.autoBoxAdjust && !me.isBorderBox()){ height -= (me.getBorderWidth("tb") + me.getPadding("tb")); } @@ -5745,14 +3606,60 @@ Ext.Element.addMethods(function(){ * @return {Ext.Element} this */ addClass : function(className){ - var me = this, i, len, v; - className = Ext.isArray(className) ? className : [className]; - for (i=0, len = className.length; i < len; i++) { - v = className[i]; - if (v) { - me.dom.className += (!me.hasClass(v) && v ? " " + v : ""); - }; - }; + var me = this, + i, + len, + v, + cls = []; + // Separate case is for speed + if (!Ext.isArray(className)) { + if (typeof className == 'string' && !this.hasClass(className)) { + me.dom.className += " " + className; + } + } + else { + for (i = 0, len = className.length; i < len; i++) { + v = className[i]; + if (typeof v == 'string' && (' ' + me.dom.className + ' ').indexOf(' ' + v + ' ') == -1) { + cls.push(v); + } + } + if (cls.length) { + me.dom.className += " " + cls.join(" "); + } + } + return me; + }, + + /** + * 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){ + var me = this, + i, + idx, + len, + cls, + elClasses; + if (!Ext.isArray(className)){ + className = [className]; + } + if (me.dom && me.dom.className) { + elClasses = me.dom.className.replace(trimRe, '').split(spacesRe); + for (i = 0, len = className.length; i < len; i++) { + cls = className[i]; + if (typeof cls == 'string') { + cls = cls.replace(trimRe, ''); + idx = elClasses.indexOf(cls); + if (idx != -1) { + elClasses.splice(idx, 1); + } + } + } + me.dom.className = elClasses.join(" "); + } return me; }, @@ -5762,38 +3669,20 @@ Ext.Element.addMethods(function(){ * @return {Ext.Element} this */ radioClass : function(className){ - var cn = this.dom.parentNode.childNodes, v; + var cn = this.dom.parentNode.childNodes, + v, + i, + len; className = Ext.isArray(className) ? className : [className]; - for (var i=0, len = cn.length; i < len; i++) { + for (i = 0, len = cn.length; i < len; i++) { v = cn[i]; - if(v && v.nodeType == 1) { + if (v && v.nodeType == 1) { Ext.fly(v, '_internal').removeClass(className); } }; return this.addClass(className); }, - /** - * 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){ - var me = this, v; - className = Ext.isArray(className) ? className : [className]; - if (me.dom && me.dom.className) { - for (var i=0, len=className.length; i < len; i++) { - v = className[i]; - if(v) { - me.dom.className = me.dom.className.replace( - classReCache[v] = classReCache[v] || new RegExp('(?:^|\\s+)' + v + '(?:\\s+|$)', "g"), " " - ); - } - }; - } - return me; - }, - /** * 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 @@ -5838,29 +3727,26 @@ Ext.Element.addMethods(function(){ v, cs, out, - display, - wk = Ext.isWebKit, display; - + if(el == document){ return null; } prop = chkCache(prop); - // Fix bug caused by this: https://bugs.webkit.org/show_bug.cgi?id=13343 - if(wk && /marginRight/.test(prop)){ - display = this.getStyle('display'); - el.style.display = 'inline-block'; - } out = (v = el.style[prop]) ? v : (cs = view.getComputedStyle(el, "")) ? cs[prop] : null; - // Webkit returns rgb values for transparent. - if(wk){ - if(out == 'rgba(0, 0, 0, 0)'){ - out = 'transparent'; - }else if(display){ - el.style.display = display; - } + // Ignore cases when the margin is correctly reported as 0, the bug only shows + // numbers larger. + if(prop == 'marginRight' && out != '0px' && !supports.correctRightMargin){ + display = el.style.display; + el.style.display = 'inline-block'; + out = view.getComputedStyle(el, '').marginRight; + el.style.display = display; + } + + if(prop == 'backgroundColor' && out == 'rgba(0, 0, 0, 0)' && !supports.correctTransparentColor){ + out = 'transparent'; } return out; } : @@ -5896,10 +3782,10 @@ Ext.Element.addMethods(function(){ */ getColor : function(attr, defaultValue, prefix){ var v = this.getStyle(attr), - color = Ext.isDefined(prefix) ? prefix : '#', + color = (typeof prefix != 'undefined') ? prefix : '#', h; - if(!v || /transparent|inherit/.test(v)){ + if(!v || (/transparent|inherit/.test(v))) { return defaultValue; } if(/^r/.test(v)){ @@ -5921,10 +3807,9 @@ Ext.Element.addMethods(function(){ * @return {Ext.Element} this */ setStyle : function(prop, value){ - var tmp, - style, - camel; - if (!Ext.isObject(prop)) { + var tmp, style; + + if (typeof prop != 'object') { tmp = {}; tmp[prop] = value; prop = tmp; @@ -6125,376 +4010,26 @@ Ext.fly('elId').setHeight(150, { // private addStyles : function(sides, styles){ - var val = 0, - m = sides.match(/\w/g), - s; - for (var i=0, len=m.length; i used by ext full - setOverflow : function(v){ - var dom = this.dom; - if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug - dom.style.overflow = 'hidden'; - (function(){dom.style.overflow = 'auto';}).defer(1); - }else{ - dom.style.overflow = v; - } - }, - - /** - *

      Wraps the specified element with a special 9 element markup/CSS block that renders by default as - * a gray container with a gradient background, rounded corners and a 4-way shadow.

      - *

      This special markup is used throughout Ext when box wrapping elements ({@link Ext.Button}, - * {@link Ext.Panel} when {@link Ext.Panel#frame frame=true}, {@link Ext.Window}). The markup - * is of this form:

      - *
      
      -    Ext.Element.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>';
      -        * 
      - *

      Example usage:

      - *
      
      -    // Basic box wrap
      -    Ext.get("foo").boxWrap();
      -
      -    // You can also add a custom class and use CSS inheritance rules to customize the box look.
      -    // 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
      -    // for how to create a custom box wrap style.
      -    Ext.get("foo").boxWrap().addClass("x-box-blue");
      -        * 
      - * @param {String} class (optional) A base CSS class to apply to the containing wrapper element - * (defaults to 'x-box'). Note that there are a number of CSS rules that are dependent on - * this name to make the overall effect work, so if you supply an alternate base class, make sure you - * also supply all of the necessary rules. - * @return {Ext.Element} The outermost wrapping element of the created box structure. - */ - boxWrap : function(cls){ - cls = cls || 'x-box'; - var el = Ext.get(this.insertHtml("beforeBegin", "
      " + String.format(Ext.Element.boxMarkup, cls) + "
      ")); //String.format('
      '+Ext.Element.boxMarkup+'
      ', cls))); - Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom); - return el; - }, - - /** - * Set the size of this Element. If animation is true, both width and height will be animated concurrently. - * @param {Mixed} width The new width. This may be one of:
        - *
      • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS width style. Animation may not be used. - *
      • A size object in the format {width: widthValue, height: heightValue}.
      • - *
      - * @param {Mixed} height The new height. This may be one of:
        - *
      • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels).
      • - *
      • A String used to set the CSS height style. Animation may not be used.
      • - *
      - * @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){ - var me = this; - if(Ext.isObject(width)){ // in case of object from getSize() - height = width.height; - width = width.width; - } - width = me.adjustWidth(width); - height = me.adjustHeight(height); - if(!animate || !me.anim){ - me.dom.style.width = me.addUnits(width); - me.dom.style.height = me.addUnits(height); - }else{ - me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2)); - } - return me; - }, - - /** - * 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 me = this, - h = Math.max(me.dom.offsetHeight, me.dom.clientHeight); - if(!h){ - h = parseFloat(me.getStyle('height')) || 0; - if(!me.isBorderBox()){ - h += me.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 = parseFloat(this.getStyle('width')) || 0; - if(!this.isBorderBox()){ - w += this.getFrameWidth('lr'); - } - } - return w; - }, - - /** - * 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 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(), - fn = function(){ - Ext.fly(dom, INTERNAL).removeClass(className); - d.removeListener("mouseup", fn); - }; - d.on("mouseup", fn); - }); - return this; - }, - - /** - *

      Returns the dimensions of the element available to lay content out in.

      - *

      If the element (or any ancestor element) has CSS style display : none, the dimensions will be zero.

      - * example:
      
      -        var vpSize = Ext.getBody().getViewSize();
      -
      -        // all Windows created afterwards will have a default value of 90% height and 95% width
      -        Ext.Window.override({
      -            width: vpSize.width * 0.9,
      -            height: vpSize.height * 0.95
      -        });
      -        // To handle window resizing you would have to hook onto onWindowResize.
      -        * 
      - * - * getViewSize utilizes clientHeight/clientWidth which excludes sizing of scrollbars. - * To obtain the size including scrollbars, use getStyleSize - * - * Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. - */ - - getViewSize : function(){ - var doc = document, - d = this.dom, - isDoc = (d == doc || d == doc.body); - - // If the body, use Ext.lib.Dom - if (isDoc) { - var extdom = Ext.lib.Dom; - return { - width : extdom.getViewWidth(), - height : extdom.getViewHeight() - } - - // Else use clientHeight/clientWidth - } else { - return { - width : d.clientWidth, - height : d.clientHeight - } - } - }, - - /** - *

      Returns the dimensions of the element available to lay content out in.

      - * - * getStyleSize utilizes prefers style sizing if present, otherwise it chooses the larger of offsetHeight/clientHeight and offsetWidth/clientWidth. - * To obtain the size excluding scrollbars, use getViewSize - * - * Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. - */ - - getStyleSize : function(){ - var me = this, - w, h, - doc = document, - d = this.dom, - isDoc = (d == doc || d == doc.body), - s = d.style; - - // If the body, use Ext.lib.Dom - if (isDoc) { - var extdom = Ext.lib.Dom; - return { - width : extdom.getViewWidth(), - height : extdom.getViewHeight() - } - } - // Use Styles if they are set - if(s.width && s.width != 'auto'){ - w = parseFloat(s.width); - if(me.isBorderBox()){ - w -= me.getFrameWidth('lr'); - } - } - // Use Styles if they are set - if(s.height && s.height != 'auto'){ - h = parseFloat(s.height); - if(me.isBorderBox()){ - h -= me.getFrameWidth('tb'); - } - } - // Use getWidth/getHeight if style not set. - return {width: w || me.getWidth(true), height: h || me.getHeight(true)}; - }, - - /** - * 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)}; - }, - - /** - * Forces the browser to repaint this element - * @return {Ext.Element} this - */ - repaint : function(){ - var dom = this.dom; - this.addClass("x-repaint"); - setTimeout(function(){ - Ext.fly(dom).removeClass("x-repaint"); - }, 1); - return this; - }, - - /** - * Disables text selection for this element (normalized across browsers) - * @return {Ext.Element} this - */ - unselectable : function(){ - this.dom.unselectable = "on"; - return this.swallowEvent("selectstart", true). - applyStyles("-moz-user-select:none;-khtml-user-select:none;"). - addClass("x-unselectable"); - }, - - /** - * 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){ - var me = this, - key, - hash = {t:"top", l:"left", r:"right", b: "bottom"}, - o = {}; - - if (!side) { - for (key in me.margins){ - o[hash[key]] = parseFloat(me.getStyle(me.margins[key])) || 0; - } - return o; - } else { - return me.addStyles.call(me, side, me.margins); - } - } - }; -}()); /** * @class Ext.Element */ @@ -6542,7 +4077,7 @@ Ext.Element.addMethods({ */ getOffsetsTo : function(el){ var o = this.getXY(), - e = Ext.fly(el, '_internal').getXY(); + e = Ext.fly(el, '_internal').getXY(); return [o[0]-e[0],o[1]-e[1]]; }, @@ -6552,7 +4087,7 @@ Ext.Element.addMethods({ * @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){ + setX : function(x, animate){ return this.setXY([x, this.getY()], this.animTest(arguments, animate, 1)); }, @@ -6562,7 +4097,7 @@ Ext.Element.addMethods({ * @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){ + setY : function(y, animate){ return this.setXY([this.getX(), y], this.animTest(arguments, animate, 1)); }, @@ -6644,9 +4179,9 @@ Ext.Element.addMethods({ * @return {Ext.Element} this */ moveTo : function(x, y, animate){ - return this.setXY([x, y], this.animTest(arguments, animate, 2)); - }, - + return this.setXY([x, y], this.animTest(arguments, animate, 2)); + }, + /** * Gets the left X coordinate * @param {Boolean} local True to get the local css position instead of page coordinate @@ -6695,9 +4230,9 @@ Ext.Element.addMethods({ */ position : function(pos, zIndex, x, y){ var me = this; - - if(!pos && me.isStyle(POSITION, STATIC)){ - me.setStyle(POSITION, RELATIVE); + + if(!pos && me.isStyle(POSITION, STATIC)){ + me.setStyle(POSITION, RELATIVE); } else if(pos) { me.setStyle(POSITION, pos); } @@ -6742,7 +4277,7 @@ Ext.Element.addMethods({ "z-index" : this.getStyle(ZINDEX) }; }, - + /** * Set positioning with an object returned by getPositioning(). * @param {Object} posCfg @@ -6750,41 +4285,41 @@ Ext.Element.addMethods({ */ setPositioning : function(pc){ var me = this, - style = me.dom.style; - + style = me.dom.style; + me.setStyle(pc); - + if(pc.right == AUTO){ style.right = ""; } if(pc.bottom == AUTO){ style.bottom = ""; } - + return me; - }, - + }, + /** * 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){ + translatePoints : function(x, y){ y = isNaN(x[1]) ? y : x[1]; x = isNaN(x[0]) ? x : x[0]; var me = this, - relative = me.isStyle(POSITION, RELATIVE), - o = me.getXY(), - l = parseInt(me.getStyle(LEFT), 10), - t = parseInt(me.getStyle(TOP), 10); - - l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft); - t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop); + relative = me.isStyle(POSITION, RELATIVE), + o = me.getXY(), + l = parseInt(me.getStyle(LEFT), 10), + t = parseInt(me.getStyle(TOP), 10); - return {left: (x - o[0] + l), top: (y - o[1] + t)}; + l = !isNaN(l) ? l : (relative ? 0 : me.dom.offsetLeft); + t = !isNaN(t) ? t : (relative ? 0 : me.dom.offsetTop); + + return {left: (x - o[0] + l), top: (y - o[1] + t)}; }, - + animTest : function(args, animate, i) { return !!animate && this.preanim ? this.preanim(args, i) : false; } @@ -6792,175 +4327,6 @@ Ext.Element.addMethods({ })();/** * @class Ext.Element */ -Ext.Element.addMethods({ - /** - * 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 me = this, - w = box.width, - h = box.height; - if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){ - w -= (me.getBorderWidth("lr") + me.getPadding("lr")); - h -= (me.getBorderWidth("tb") + me.getPadding("tb")); - } - me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2)); - return me; - }, - - /** - * Return an object defining the area of this Element which can be passed to {@link #setBox} to - * set another Element's 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: <Element's X position>,
      -    y: <Element's Y position>,
      -    width: <Element's width>,
      -    height: <Element's height>,
      -    bottom: <Element's lower bound>,
      -    right: <Element's rightmost bound>
      -}
      -
      - * The returned object may also be addressed as an Array where index 0 contains the X position - * and index 1 contains the Y position. So the result may also be used for {@link #setXY} - */ - getBox : function(contentBox, local) { - var me = this, - xy, - left, - top, - getBorderWidth = me.getBorderWidth, - getPadding = me.getPadding, - l, - r, - t, - b; - if(!local){ - xy = me.getXY(); - }else{ - left = parseInt(me.getStyle("left"), 10) || 0; - top = parseInt(me.getStyle("top"), 10) || 0; - xy = [left, top]; - } - var el = me.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{ - l = getBorderWidth.call(me, "l") + getPadding.call(me, "l"); - r = getBorderWidth.call(me, "r") + getPadding.call(me, "r"); - t = getBorderWidth.call(me, "t") + getPadding.call(me, "t"); - b = getBorderWidth.call(me, "b") + getPadding.call(me, "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; - }, - - /** - * 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 me = this, - xy = me.getXY(), - x = xy[0], - y = xy[1], - left = [x - distance, y], - right = [x + distance, y], - top = [x, y - distance], - bottom = [x, y + distance], - hash = { - l : left, - left : left, - r : right, - right : right, - t : top, - top : top, - up : top, - b : bottom, - bottom : bottom, - down : bottom - }; - - direction = direction.toLowerCase(); - me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2)); - }, - - /** - * 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){ - var me = this, - style = me.dom.style; - style.left = me.addUnits(left); - style.top = me.addUnits(top); - return me; - }, - - /** - * 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 Ext.lib.Dom.getRegion(this.dom); - }, - - /** - * 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 {Mixed} width The new width. This may be one of:
        - *
      • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels)
      • - *
      • A String used to set the CSS width style. Animation may not be used. - *
      - * @param {Mixed} height The new height. This may be one of:
        - *
      • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels)
      • - *
      • A String used to set the CSS height style. Animation may not be used.
      • - *
      - * @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){ - var me = this; - if (!animate || !me.anim) { - me.setSize(width, height); - me.setLocation(x, y); - } else { - me.anim({points: {to: [x, y]}, - width: {to: me.adjustWidth(width)}, - height: {to: me.adjustHeight(height)}}, - me.preanim(arguments, 4), - 'motion'); - } - return me; - }, - - /** - * 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) { - return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1)); - } -});/** - * @class Ext.Element - */ Ext.Element.addMethods({ /** * Returns true if this element is scrollable. @@ -6987,7 +4353,7 @@ Ext.Element.addMethods({ * @return {Object} An object containing the scroll position in the format {left: (scrollLeft), top: (scrollTop)} */ getScroll : function(){ - var d = this.dom, + var d = this.dom, doc = document, body = doc.body, docElement = doc.documentElement, @@ -6997,7 +4363,7 @@ Ext.Element.addMethods({ if(d == doc || d == body){ if(Ext.isIE && Ext.isStrict){ - l = docElement.scrollLeft; + l = docElement.scrollLeft; t = docElement.scrollTop; }else{ l = window.pageXOffset; @@ -7012,111 +4378,6 @@ Ext.Element.addMethods({ });/** * @class Ext.Element */ -Ext.Element.addMethods({ - /** - * 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 top = /top/i.test(side), //check if we're scrolling top or left - me = this, - dom = me.dom, - prop; - if (!animate || !me.anim) { - prop = 'scroll' + (top ? 'Top' : 'Left'), // just setting the value, so grab the direction - dom[prop] = value; - }else{ - prop = 'scroll' + (top ? 'Left' : 'Top'), // if scrolling top, we need to grab scrollLeft, if left, scrollTop - me.anim({scroll: {to: top ? [dom[prop], value] : [value, dom[prop]]}}, - me.preanim(arguments, 2), 'scroll'); - } - return me; - }, - - /** - * 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, - el = this.dom, - o = this.getOffsetsTo(c), - l = o[0] + c.scrollLeft, - t = o[1] + c.scrollTop, - b = t + el.offsetHeight, - r = l + el.offsetWidth, - ch = c.clientHeight, - ct = parseInt(c.scrollTop, 10), - cl = parseInt(c.scrollLeft, 10), - cb = ct + ch, - 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); - }, - - /** - * 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, - l = el.scrollLeft, t = el.scrollTop, - w = el.scrollWidth, h = el.scrollHeight, - cw = el.clientWidth, ch = el.clientHeight, - scrolled = false, v, - hash = { - l: Math.min(l + distance, w-cw), - r: v = Math.max(l - distance, 0), - t: Math.max(t - distance, 0), - b: Math.min(t + distance, h-ch) - }; - hash.d = hash.b; - hash.u = hash.t; - - direction = direction.substr(0, 1); - if((v = hash[direction]) > -1){ - scrolled = true; - this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2)); - } - return scrolled; - } -});/** - * @class Ext.Element - */ /** * Visibility mode constant for use with {@link #setVisibilityMode}. Use visibility to hide element * @static @@ -7130,15 +4391,38 @@ Ext.Element.VISIBILITY = 1; */ Ext.Element.DISPLAY = 2; +/** + * Visibility mode constant for use with {@link #setVisibilityMode}. Use offsets (x and y positioning offscreen) + * to hide element. + * @static + * @type Number + */ +Ext.Element.OFFSETS = 3; + + +Ext.Element.ASCLASS = 4; + +/** + * Defaults to 'x-hide-nosize' + * @static + * @type String + */ +Ext.Element.visibilityCls = 'x-hide-nosize'; + Ext.Element.addMethods(function(){ - var VISIBILITY = "visibility", + var El = Ext.Element, + OPACITY = "opacity", + VISIBILITY = "visibility", DISPLAY = "display", HIDDEN = "hidden", - NONE = "none", + OFFSETS = "offsets", + ASCLASS = "asclass", + NONE = "none", + NOSIZE = 'nosize', ORIGINALDISPLAY = 'originalDisplay', VISMODE = 'visibilityMode', - ELDISPLAY = Ext.Element.DISPLAY, - data = Ext.Element.data, + ISVISIBLE = 'isVisible', + data = El.data, getDisplay = function(dom){ var d = data(dom, ORIGINALDISPLAY); if(d === undefined){ @@ -7149,11 +4433,11 @@ Ext.Element.addMethods(function(){ getVisMode = function(dom){ var m = data(dom, VISMODE); if(m === undefined){ - data(dom, VISMODE, m = 1) + data(dom, VISMODE, m = 1); } return m; }; - + return { /** * The element's default display mode (defaults to "") @@ -7161,23 +4445,23 @@ Ext.Element.addMethods(function(){ */ originalDisplay : "", visibilityMode : 1, - + /** * 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 {Number} visMode Ext.Element.VISIBILITY or Ext.Element.DISPLAY * @return {Ext.Element} this */ - setVisibilityMode : function(visMode){ + setVisibilityMode : function(visMode){ data(this.dom, VISMODE, visMode); return this; }, - + /** * Perform custom animation on this element. *
        *
      • Animation Properties
      • - * + * *

        The Animation Control Object enables gradual transitions for any member of an * element's style object that takes a numeric value including but not limited to * these properties:

          @@ -7189,10 +4473,10 @@ Ext.Element.addMethods(function(){ *
        • fontSize
        • *
        • lineHeight
        • *
        - * - * + * + * *
      • Animation Property Attributes
      • - * + * *

        Each Animation Property is a config object with optional properties:

        *
          *
        • by* : relative change - start at current value, change by this value
        • @@ -7201,9 +4485,9 @@ Ext.Element.addMethods(function(){ *
        • unit : any allowable unit specification
        • *

          * do not specify both to and by for an animation property

          *
        - * + * *
      • Animation Types
      • - * + * *

        The supported animation types:

          *
        • 'run' : Default *
          
          @@ -7220,7 +4504,7 @@ el.animate(
               0.35,      // animation duration
               null,      // callback
               'easeOut', // easing method
          -    'run'      // animation type ('run','color','motion','scroll')    
          +    'run'      // animation type ('run','color','motion','scroll')
           );
                    * 
          *
        • @@ -7236,11 +4520,11 @@ el.animate( 0.35, // animation duration null, // callback 'easeOut', // easing method - 'color' // animation type ('run','color','motion','scroll') + 'color' // animation type ('run','color','motion','scroll') ); - * + * * - * + * *
        • 'motion' *

          Animates the motion of an element to/from specific points using optional bezier * way points during transit.

          @@ -7264,9 +4548,9 @@ el.animate( 3000, // animation duration (milliseconds!) null, // callback 'easeOut', // easing method - 'motion' // animation type ('run','color','motion','scroll') + 'motion' // animation type ('run','color','motion','scroll') ); - * + * *
        • *
        • 'scroll' *

          Animate horizontal or vertical scrolling of an overflowing page element.

          @@ -7279,14 +4563,14 @@ el.animate( 0.35, // animation duration null, // callback 'easeOut', // easing method - 'scroll' // animation type ('run','color','motion','scroll') + 'scroll' // animation type ('run','color','motion','scroll') ); - * + * *
        • *
        - * + * *
      - * + * * @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 @@ -7295,20 +4579,20 @@ el.animate( * 'motion', or 'scroll' * @return {Ext.Element} this */ - animate : function(args, duration, onComplete, easing, animType){ + 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 me = this, + var me = this, anim = Ext.lib.Anim[animType]( - me.dom, + me.dom, args, (opt.duration || defaultDur) || .35, (opt.easing || defaultEase) || 'easeOut', @@ -7321,20 +4605,33 @@ el.animate( opt.anim = anim; return anim; }, - + // private legacy anim prep preanim : function(a, i){ - return !a[i] ? false : (Ext.isObject(a[i]) ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]}); + return !a[i] ? false : (typeof a[i] == 'object' ? a[i]: {duration: a[i+1], callback: a[i+2], easing: a[i+3]}); }, - + /** - * Checks whether the element is currently visible using both visibility and display properties. + * Checks whether the element is currently visible using both visibility and display properties. * @return {Boolean} True if the element is currently visible, else false */ isVisible : function() { - return !this.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE); + var me = this, + dom = me.dom, + visible = data(dom, ISVISIBLE); + + if(typeof visible == 'boolean'){ //return the cached value if registered + return visible; + } + //Determine the current state based on display states + visible = !me.isStyle(VISIBILITY, HIDDEN) && + !me.isStyle(DISPLAY, NONE) && + !((getVisMode(dom) == El.ASCLASS) && me.hasClass(me.visibilityCls || El.visibilityCls)); + + data(dom, ISVISIBLE, visible); + return visible; }, - + /** * 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. @@ -7342,20 +4639,62 @@ el.animate( * @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){ - var me = this, + setVisible : function(visible, animate){ + var me = this, isDisplay, isVisibility, isOffsets, isNosize, dom = me.dom, - isDisplay = getVisMode(this.dom) == ELDISPLAY; - + visMode = getVisMode(dom); + + + // hideMode string override + if (typeof animate == 'string'){ + switch (animate) { + case DISPLAY: + visMode = El.DISPLAY; + break; + case VISIBILITY: + visMode = El.VISIBILITY; + break; + case OFFSETS: + visMode = El.OFFSETS; + break; + case NOSIZE: + case ASCLASS: + visMode = El.ASCLASS; + break; + } + me.setVisibilityMode(visMode); + animate = false; + } + if (!animate || !me.anim) { - if(isDisplay){ - me.setDisplayed(visible); + if(visMode == El.ASCLASS ){ + + me[visible?'removeClass':'addClass'](me.visibilityCls || El.visibilityCls); + + } else if (visMode == El.DISPLAY){ + + return me.setDisplayed(visible); + + } else if (visMode == El.OFFSETS){ + + if (!visible){ + me.hideModeStyles = { + position: me.getStyle('position'), + top: me.getStyle('top'), + left: me.getStyle('left') + }; + me.applyStyles({position: 'absolute', top: '-10000px', left: '-10000px'}); + } else { + me.applyStyles(me.hideModeStyles || {position: '', top: '', left: ''}); + delete me.hideModeStyles; + } + }else{ me.fixDisplay(); dom.style.visibility = visible ? "visible" : HIDDEN; } }else{ - // closure for composites + // closure for composites if(visible){ me.setOpacity(.01); me.setVisible(true); @@ -7366,15 +4705,24 @@ el.animate( .35, 'easeIn', function(){ - if(!visible){ - dom.style[isDisplay ? DISPLAY : VISIBILITY] = (isDisplay) ? NONE : HIDDEN; - Ext.fly(dom).setOpacity(1); - } + visible || me.setVisible(false).setOpacity(1); }); } + data(dom, ISVISIBLE, visible); //set logical visibility state return me; }, - + + + /** + * @private + * Determine if the Element has a relevant height and width available based + * upon current logical visibility state + */ + hasMetrics : function(){ + var dom = this.dom; + return this.isVisible() || (getVisMode(dom) == El.VISIBILITY); + }, + /** * 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 @@ -7385,20 +4733,20 @@ el.animate( me.setVisible(!me.isVisible(), me.preanim(arguments, 0)); return me; }, - + /** * 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) { + setDisplayed : function(value) { if(typeof value == "boolean"){ value = value ? getDisplay(this.dom) : NONE; } this.setStyle(DISPLAY, value); return this; }, - + // private fixDisplay : function(){ var me = this; @@ -7410,212 +4758,38 @@ el.animate( } } }, - + /** * 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){ + // hideMode override + if (typeof animate == 'string'){ + this.setVisible(false, animate); + return this; + } 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){ + // hideMode override + if (typeof animate == 'string'){ + this.setVisible(true, animate); + return this; + } this.setVisible(true, this.preanim(arguments, 0)); return this; } - } -}());/** - * @class Ext.Element - */ -Ext.Element.addMethods( -function(){ - var VISIBILITY = "visibility", - DISPLAY = "display", - HIDDEN = "hidden", - NONE = "none", - XMASKED = "x-masked", - XMASKEDRELATIVE = "x-masked-relative", - data = Ext.Element.data; - - return { - /** - * 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.isStyle(VISIBILITY,HIDDEN) && !this.isStyle(DISPLAY,NONE), - p = this.dom.parentNode; - if(deep !== true || !vis){ - return vis; - } - while(p && !/^body/i.test(p.tagName)){ - if(!Ext.fly(p, '_isVisible').isVisible()){ - return false; - } - p = p.parentNode; - } - return true; - }, - - /** - * Returns true if display is not "none" - * @return {Boolean} - */ - isDisplayed : function() { - return !this.isStyle(DISPLAY, NONE); - }, - - /** - * 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(Ext.Element.DISPLAY); - if(!Ext.isEmpty(display)){ - data(this.dom, 'originalDisplay', display); - } - return this; - }, - - /** - * 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){ - var me = this, - dom = me.dom, - dh = Ext.DomHelper, - EXTELMASKMSG = "ext-el-mask-msg", - el, - mask; - - if(me.getStyle("position") == "static"){ - me.addClass(XMASKEDRELATIVE); - } - if((el = data(dom, 'maskMsg'))){ - el.remove(); - } - if((el = data(dom, 'mask'))){ - el.remove(); - } - - mask = dh.append(dom, {cls : "ext-el-mask"}, true); - data(dom, 'mask', mask); - - me.addClass(XMASKED); - mask.setDisplayed(true); - if(typeof msg == 'string'){ - var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true); - data(dom, 'maskMsg', mm); - mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG; - mm.dom.firstChild.innerHTML = msg; - mm.setDisplayed(true); - mm.center(me); - } - if(Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto'){ // ie will not expand full height automatically - mask.setSize(undefined, me.getHeight()); - } - return mask; - }, - - /** - * Removes a previously applied mask. - */ - unmask : function(){ - var me = this, - dom = me.dom, - mask = data(dom, 'mask'), - maskMsg = data(dom, 'maskMsg'); - if(mask){ - if(maskMsg){ - maskMsg.remove(); - data(dom, 'maskMsg', undefined); - } - mask.remove(); - data(dom, 'mask', undefined); - } - me.removeClass([XMASKED, XMASKEDRELATIVE]); - }, - - /** - * Returns true if this element is masked - * @return {Boolean} - */ - isMasked : function(){ - var m = data(this.dom, 'mask'); - return m && m.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'), - shim; - el.frameBorder = '0'; - el.className = 'ext-shim'; - el.src = Ext.SSL_SECURE_URL; - shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); - shim.autoBoxAdjust = false; - return shim; - } }; -}());/** - * @class Ext.Element - */ -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 (this reference) in which the specified function is executed. Defaults to this Element. - * @return {Ext.KeyMap} The KeyMap created - */ - addKeyListener : function(key, fn, scope){ - var config; - if(!Ext.isObject(key) || 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); - } -});(function(){ +}());(function(){ // contants var NULL = null, UNDEFINED = undefined, @@ -7662,7 +4836,7 @@ Ext.Element.addMethods({ setQueue = function(id, value){ queues[id] = value; }; - + //Notifies Element that fx methods are available Ext.enableFx = TRUE; @@ -7672,7 +4846,7 @@ Ext.enableFx = TRUE; * to the {@link Ext.Element} interface when included, so all effects calls should be performed via {@link Ext.Element}. * Conversely, since the effects are not actually defined in {@link Ext.Element}, Ext.Fx must be * {@link Ext#enableFx included} in order for the Element effects to work.


      - * + * *

      Method Chaining

      *

      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 @@ -7698,7 +4872,7 @@ br The bottom right corner * Note: some Fx methods accept specific custom config parameters. The options shown in the Config Options * section below are common options that can be passed to any Fx method unless otherwise noted. - * + * * @cfg {Function} callback A function called when the effect is finished. Note that effects are queued internally by the * Fx class, so a callback is not required to specify another effect -- effects can simply be chained together * and called in sequence (see note for Method Chaining above), for example:

      
      @@ -7706,9 +4880,9 @@ br     The bottom right corner
        * 
      * 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 (this reference) in which the {@link #callback} function is executed. Defaults to the browser window. - * + * * @cfg {String} easing A valid Ext.lib.Easing value for the effect:

        *
      • backBoth
      • *
      • backIn
      • @@ -7730,12 +4904,12 @@ br The bottom right corner * * @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 {Number} endOpacity Only applicable for {@link #fadeIn} or {@link #fadeOut}, a number between * 0 and 1 inclusive to configure the ending opacity value. - * + * * @cfg {Boolean} remove Whether the Element should be removed from the DOM and destroyed after the effect finishes - * @cfg {Boolean} useDisplay Whether to use the display CSS property instead of visibility when hiding Elements (only applies to + * @cfg {Boolean} useDisplay Whether to use the display CSS property instead of visibility when hiding Elements (only applies to * effects that end with the element being visually hidden, ignored otherwise) * @cfg {String/Object/Function} afterStyle A style specification string, e.g. "width:100px", or an object * in the form {width:"100px"}, or a function which returns such a specification that will be applied to the @@ -7745,13 +4919,13 @@ br The bottom right corner * @cfg {Boolean} stopFx Whether preceding effects should be stopped and removed before running current effect (only applies to non blocking effects) */ Ext.Fx = { - + // private - calls the function taking arguments from the argHash based on the key. Returns the return value of the function. // this is useful for replacing switch statements (for example). switchStatements : function(key, fn, argHash){ return fn.apply(this, argHash[key]); }, - + /** * 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 @@ -7774,44 +4948,44 @@ el.slideIn('t', { * @param {Object} options (optional) Object literal with any of the Fx config options * @return {Ext.Element} The Element */ - slideIn : function(anchor, o){ + slideIn : function(anchor, o){ o = getObject(o); var me = this, dom = me.dom, st = dom.style, xy, r, - b, - wrap, + b, + wrap, after, st, - args, + args, pt, bw, bh; anchor = anchor || "t"; - me.queueFx(o, function(){ + me.queueFx(o, function(){ xy = fly(dom).getXY(); // fix display to visibility - fly(dom).fixDisplay(); + fly(dom).fixDisplay(); // restore values after effect - r = fly(dom).getFxRestore(); + r = fly(dom).getFxRestore(); b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight}; b.right = b.x + b.width; b.bottom = b.y + b.height; - + // fixed size for slide - fly(dom).setWidth(b.width).setHeight(b.height); - + fly(dom).setWidth(b.width).setHeight(b.height); + // wrap if needed wrap = fly(dom).fxWrap(r.pos, o, HIDDEN); - + st.visibility = VISIBLE; st.position = ABSOLUTE; - + // clear out temp styles after slide and unwrap function after(){ fly(dom).fxUnwrap(wrap, r.pos, o); @@ -7819,22 +4993,22 @@ el.slideIn('t', { st.height = r.height; fly(dom).afterFx(o); } - - // time to calculate the positions - pt = {to: [b.x, b.y]}; + + // time to calculate the positions + pt = {to: [b.x, b.y]}; bw = {to: b.width}; bh = {to: b.height}; - - function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){ + + function argCalc(wrap, style, ww, wh, sXY, sXYval, s1, s2, w, h, p){ var ret = {}; fly(wrap).setWidth(ww).setHeight(wh); if(fly(wrap)[sXY]){ - fly(wrap)[sXY](sXYval); + fly(wrap)[sXY](sXYval); } - style[s1] = style[s2] = "0"; + style[s1] = style[s2] = "0"; if(w){ - ret.width = w - }; + ret.width = w; + } if(h){ ret.height = h; } @@ -7854,7 +5028,7 @@ el.slideIn('t', { br : [wrap, st, 0, 0, SETXY, [b.right, b.bottom], LEFT, TOP, bw, bh, pt], tr : [wrap, st, 0, 0, SETX, b.x + b.width, LEFT, BOTTOM, bw, bh, pt] }); - + st.visibility = VISIBLE; fly(wrap).show(); @@ -7862,7 +5036,7 @@ el.slideIn('t', { o, MOTION, .5, - EASEOUT, + EASEOUT, after); }); return me; @@ -7870,9 +5044,9 @@ el.slideIn('t', { /** * 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 = + * 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 + * 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: *
        
        @@ -7904,51 +5078,51 @@ el.slideOut('t', {
                     r,
                     b,
                     a,
        -            zero = {to: 0}; 
        -                    
        +            zero = {to: 0};
        +
                 anchor = anchor || "t";
         
                 me.queueFx(o, function(){
                     
                     // restore values after effect
        -            r = fly(dom).getFxRestore(); 
        +            r = fly(dom).getFxRestore();
                     b = {x: xy[0], y: xy[1], 0: xy[0], 1: xy[1], width: dom.offsetWidth, height: dom.offsetHeight};
                     b.right = b.x + b.width;
                     b.bottom = b.y + b.height;
        -                
        -            // fixed size for slide   
        +
        +            // fixed size for slide
                     fly(dom).setWidth(b.width).setHeight(b.height);
         
                     // wrap if needed
                     wrap = fly(dom).fxWrap(r.pos, o, VISIBLE);
        -                
        +
                     st.visibility = VISIBLE;
                     st.position = ABSOLUTE;
        -            fly(wrap).setWidth(b.width).setHeight(b.height);            
        +            fly(wrap).setWidth(b.width).setHeight(b.height);
         
                     function after(){
        -                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                
        +                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
                         fly(dom).fxUnwrap(wrap, r.pos, o);
                         st.width = r.width;
                         st.height = r.height;
                         fly(dom).afterFx(o);
        -            }            
        -            
        -            function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){                    
        +            }
        +
        +            function argCalc(style, s1, s2, p1, v1, p2, v2, p3, v3){
                         var ret = {};
        -                
        +
                         style[s1] = style[s2] = "0";
        -                ret[p1] = v1;               
        +                ret[p1] = v1;
                         if(p2){
        -                    ret[p2] = v2;               
        +                    ret[p2] = v2;
                         }
                         if(p3){
                             ret[p3] = v3;
                         }
        -                
        +
                         return ret;
                     };
        -            
        +
                     a = fly(dom).switchStatements(anchor.toLowerCase(), argCalc, {
                         t  : [st, LEFT, BOTTOM, HEIGHT, zero],
                         l  : [st, RIGHT, TOP, WIDTH, zero],
        @@ -7959,20 +5133,20 @@ el.slideOut('t', {
                         br : [st, LEFT, TOP, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.x + b.width, b.bottom]}],
                         tr : [st, LEFT, BOTTOM, WIDTH, zero, HEIGHT, zero, POINTS, {to : [b.right, b.y]}]
                     });
        -            
        +
                     arguments.callee.anim = fly(wrap).fxanim(a,
                         o,
                         MOTION,
                         .5,
        -                EASEOUT, 
        +                EASEOUT,
                         after);
                 });
                 return me;
             },
         
             /**
        -     * 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. 
        +     * 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:
              *
        
        @@ -8006,17 +5180,17 @@ el.puff({
                     fly(dom).show();
         
                     // restore values after effect
        -            r = fly(dom).getFxRestore();                   
        -            
        +            r = fly(dom).getFxRestore();
        +
                     function after(){
        -                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();                  
        -                fly(dom).clearOpacity();  
        +                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
        +                fly(dom).clearOpacity();
                         fly(dom).setPositioning(r.pos);
                         st.width = r.width;
                         st.height = r.height;
                         st.fontSize = '';
                         fly(dom).afterFx(o);
        -            }   
        +            }
         
                     arguments.callee.anim = fly(dom).fxanim({
                             width : {to : fly(dom).adjustWidth(width * 2)},
        @@ -8036,7 +5210,7 @@ el.puff({
         
             /**
              * 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 
        +     * 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:
              *
        
        @@ -8067,32 +5241,32 @@ el.switchOff({
         
                     // restore values after effect
                     r = fly(dom).getFxRestore();
        -                
        +
                     function after(){
        -                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();  
        +                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
                         fly(dom).clearOpacity();
                         fly(dom).setPositioning(r.pos);
                         st.width = r.width;
        -                st.height = r.height;   
        +                st.height = r.height;
                         fly(dom).afterFx(o);
                     };
         
        -            fly(dom).fxanim({opacity : {to : 0.3}}, 
        -                NULL, 
        -                NULL, 
        -                .1, 
        -                NULL, 
        -                function(){                                 
        +            fly(dom).fxanim({opacity : {to : 0.3}},
        +                NULL,
        +                NULL,
        +                .1,
        +                NULL,
        +                function(){
                             fly(dom).clearOpacity();
        -                        (function(){                            
        +                        (function(){
                                     fly(dom).fxanim({
                                         height : {to : 1},
                                         points : {by : [0, fly(dom).getHeight() * .5]}
        -                            }, 
        -                            o, 
        -                            MOTION, 
        -                            0.3, 
        -                            'easeIn', 
        +                            },
        +                            o,
        +                            MOTION,
        +                            0.3,
        +                            'easeIn',
                                     after);
                                 }).defer(100);
                         });
        @@ -8123,7 +5297,7 @@ el.highlight("ffff9c", {
              * @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){
                 o = getObject(o);
                 var me = this,
        @@ -8139,14 +5313,14 @@ el.highlight("ffff9c", {
                     function after(){
                         dom.style[attr] = restore;
                         fly(dom).afterFx(o);
        -            }            
        +            }
                     restore = dom.style[attr];
                     a[attr] = {from: color || "ffff9c", to: o.endColor || fly(dom).getColor(attr) || "ffffff"};
                     arguments.callee.anim = fly(dom).fxanim(a,
                         o,
                         'color',
                         1,
        -                'easeIn', 
        +                'easeIn',
                         after);
                 });
                 return me;
        @@ -8184,7 +5358,7 @@ el.frame("C3DAF9", 1, {
                     color = color || '#C3DAF9';
                     if(color.length == 6){
                         color = '#' + color;
        -            }            
        +            }
                     count = count || 1;
                     fly(dom).show();
         
        @@ -8200,8 +5374,8 @@ el.frame("C3DAF9", 1, {
                             });
                             return proxy.queueFx({}, animFn);
                         };
        -            
        -            
        +
        +
                     arguments.callee.anim = {
                         isAnimated: true,
                         stop: function() {
        @@ -8209,7 +5383,7 @@ el.frame("C3DAF9", 1, {
                             proxy.stopFx();
                         }
                     };
        -            
        +
                     function animFn(){
                         var scale = Ext.isBorderBox ? 2 : 1;
                         active = proxy.anim({
        @@ -8248,7 +5422,7 @@ el.pause(1);
             * @param {Number} seconds The length of time to pause (in seconds)
             * @return {Ext.Element} The Element
             */
        -    pause : function(seconds){        
        +    pause : function(seconds){
                 var dom = this.dom,
                     t;
         
        @@ -8293,7 +5467,7 @@ el.fadeIn({
                 var me = this,
                     dom = me.dom,
                     to = o.endOpacity || 1;
        -        
        +
                 me.queueFx(o, function(){
                     fly(dom).setOpacity(0);
                     fly(dom).fixDisplay();
        @@ -8338,21 +5512,21 @@ el.fadeOut({
                 var me = this,
                     dom = me.dom,
                     style = dom.style,
        -            to = o.endOpacity || 0;         
        -        
        -        me.queueFx(o, function(){  
        -            arguments.callee.anim = fly(dom).fxanim({ 
        +            to = o.endOpacity || 0;
        +
        +        me.queueFx(o, function(){
        +            arguments.callee.anim = fly(dom).fxanim({
                         opacity : {to : to}},
        -                o, 
        -                NULL, 
        -                .5, 
        -                EASEOUT, 
        +                o,
        +                NULL,
        +                .5,
        +                EASEOUT,
                         function(){
                             if(to == 0){
        -                        Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ? 
        +                        Ext.Element.data(dom, 'visibilityMode') == Ext.Element.DISPLAY || o.useDisplay ?
                                     style.display = "none" :
                                     style.visibility = HIDDEN;
        -                            
        +
                                 fly(dom).clearOpacity();
                             }
                             fly(dom).afterFx(o);
        @@ -8394,7 +5568,7 @@ el.scale(
         
            /**
             * 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 
        +    * 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:
        @@ -8420,28 +5594,28 @@ el.shift({
                 o = getObject(o);
                 var dom = this.dom,
                     a = {};
        -                
        +
                 this.queueFx(o, function(){
                     for (var prop in o) {
        -                if (o[prop] != UNDEFINED) {                                                 
        -                    a[prop] = {to : o[prop]};                   
        +                if (o[prop] != UNDEFINED) {
        +                    a[prop] = {to : o[prop]};
                         }
        -            } 
        -            
        +            }
        +
                     a.width ? a.width.to = fly(dom).adjustWidth(o.width) : a;
        -            a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;   
        -            
        +            a.height ? a.height.to = fly(dom).adjustWidth(o.height) : a;
        +
                     if (a.x || a.y || a.xy) {
        -                a.points = a.xy || 
        +                a.points = a.xy ||
                                    {to : [ a.x ? a.x.to : fly(dom).getX(),
        -                                   a.y ? a.y.to : fly(dom).getY()]};                  
        +                                   a.y ? a.y.to : fly(dom).getY()]};
                     }
         
                     arguments.callee.anim = fly(dom).fxanim(a,
        -                o, 
        -                MOTION, 
        -                .35, 
        -                EASEOUT, 
        +                o,
        +                MOTION,
        +                .35,
        +                EASEOUT,
                         function(){
                             fly(dom).afterFx(o);
                         });
        @@ -8450,7 +5624,7 @@ el.shift({
             },
         
             /**
        -     * Slides the element while fading it out of view.  An anchor point can be optionally passed to set the 
        +     * 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:
              *
        
        @@ -8482,7 +5656,7 @@ el.ghost('b', {
                     r,
                     w,
                     h;
        -            
        +
                 anchor = anchor || "b";
         
                 me.queueFx(o, function(){
        @@ -8490,9 +5664,9 @@ el.ghost('b', {
                     r = fly(dom).getFxRestore();
                     w = fly(dom).getWidth();
                     h = fly(dom).getHeight();
        -            
        +
                     function after(){
        -                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();   
        +                o.useDisplay ? fly(dom).setDisplayed(FALSE) : fly(dom).hide();
                         fly(dom).clearOpacity();
                         fly(dom).setPositioning(r.pos);
                         st.width = r.width;
        @@ -8508,9 +5682,9 @@ el.ghost('b', {
                        tl : [-w, -h],
                        bl : [-w, h],
                        br : [w, h],
        -               tr : [w, -h] 
        +               tr : [w, -h]
                     });
        -                
        +
                     arguments.callee.anim = fly(dom).fxanim(a,
                         o,
                         MOTION,
        @@ -8551,7 +5725,7 @@ el.ghost('b', {
             },
         
             /* @private */
        -    nextFx : function(){        
        +    nextFx : function(){
                 var ef = getQueue(this.dom.id)[0];
                 if(ef){
                     ef.call(this);
        @@ -8632,11 +5806,11 @@ el.ghost('b', {
             },
         
             /* @private */
        -    fxWrap : function(pos, o, vis){ 
        +    fxWrap : function(pos, o, vis){
                 var dom = this.dom,
                     wrap,
                     wrapXY;
        -        if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){            
        +        if(!o.wrap || !(wrap = Ext.getDom(o.wrap))){
                     if(o.fixPosition){
                         wrapXY = fly(dom).getXY();
                     }
        @@ -8658,13 +5832,13 @@ el.ghost('b', {
             },
         
             /* @private */
        -    fxUnwrap : function(wrap, pos, o){      
        +    fxUnwrap : function(wrap, pos, o){
                 var dom = this.dom;
                 fly(dom).clearPositioning();
                 fly(dom).setPositioning(pos);
                 if(!o.wrap){
                     var pn = fly(wrap).dom.parentNode;
        -            pn.insertBefore(dom, wrap); 
        +            pn.insertBefore(dom, wrap);
                     fly(wrap).remove();
                 }
             },
        @@ -8680,7 +5854,7 @@ el.ghost('b', {
                 var dom = this.dom,
                     id = dom.id;
                 if(o.afterStyle){
        -            fly(dom).setStyle(o.afterStyle);            
        +            fly(dom).setStyle(o.afterStyle);
                 }
                 if(o.afterCls){
                     fly(dom).addClass(o.afterCls);
        @@ -8702,11 +5876,11 @@ el.ghost('b', {
                 animType = animType || 'run';
                 opt = opt || {};
                 var anim = Ext.lib.Anim[animType](
        -                this.dom, 
        +                this.dom,
                         args,
                         (opt.duration || defaultDur) || .35,
                         (opt.easing || defaultEase) || EASEOUT,
        -                cb,            
        +                cb,
                         this
                     );
                 opt.anim = anim;
        @@ -8772,8 +5946,8 @@ Ext.override(Ext.CompositeElementLite, {
         };
         
         Ext.CompositeElementLite.prototype = {
        -    isComposite: true,    
        -    
        +    isComposite: true,
        +
             // private
             getElement : function(el){
                 // Set the shared flyweight dom property to the current element
        @@ -8782,19 +5956,19 @@ Ext.CompositeElementLite.prototype = {
                 e.id = el.id;
                 return e;
             },
        -    
        +
             // private
             transformElement : function(el){
                 return Ext.getDom(el);
             },
        -    
        +
             /**
              * Returns the number of elements in this Composite.
              * @return Number
              */
             getCount : function(){
                 return this.elements.length;
        -    },    
        +    },
             /**
              * Adds elements to this Composite object.
              * @param {Mixed} els Either an Array of DOM elements to add, or another Composite object who's elements should be added.
        @@ -8806,27 +5980,27 @@ Ext.CompositeElementLite.prototype = {
                 if(!els){
                     return this;
                 }
        -        if(Ext.isString(els)){
        +        if(typeof els == "string"){
                     els = Ext.Element.selectorFunction(els, root);
                 }else if(els.isComposite){
                     els = els.elements;
                 }else if(!Ext.isIterable(els)){
                     els = [els];
                 }
        -        
        +
                 for(var i = 0, len = els.length; i < len; ++i){
                     elements.push(me.transformElement(els[i]));
                 }
                 return me;
             },
        -    
        +
             invoke : function(fn, args){
                 var me = this,
                     els = me.elements,
        -            len = els.length, 
        -            e, 
        +            len = els.length,
        +            e,
                     i;
        -            
        +
                 for(i = 0; i < len; i++) {
                     e = els[i];
                     if(e){
        @@ -8856,7 +6030,7 @@ Ext.CompositeElementLite.prototype = {
                 var els = this.elements,
                     len = els.length,
                     i, e;
        -        
        +
                 for(i = 0; ithis reference) in which the function is executed. (defaults to the Element)
              * @return {CompositeElement} this
              */
        -    each : function(fn, scope){       
        +    each : function(fn, scope){
                 var me = this,
                     els = me.elements,
                     len = els.length,
                     i, e;
        -        
        +
                 for(i = 0; iThis class encapsulates a collection of DOM elements, providing methods to filter
        - * members, or to perform collective actions upon the whole set.

        - *

        Although they are not listed, this class supports all of the methods of {@link Ext.Element} and - * {@link Ext.Fx}. The methods from these classes will be performed on all the elements in this collection.

        - *

        All methods return this and can be chained.

        - * Usage: -
        
        -var els = Ext.select("#some-el div.some-class", true);
        -// or select directly from an existing element
        -var el = Ext.get('some-el');
        -el.select('div.some-class', true);
        -
        -els.setWidth(100); // all elements become 100 width
        -els.hide(true); // all elements fade out and hide
        -// or
        -els.setWidth(100).hide(true);
        -
        - */ -Ext.CompositeElement = function(els, root){ - this.elements = []; - this.add(els, root); -}; - -Ext.extend(Ext.CompositeElement, Ext.CompositeElementLite, { - - // private - getElement : function(el){ - // In this case just return it, since we already have a reference to it - return el; - }, - - // private - transformElement : function(el){ - return Ext.get(el); - } - - /** - * Adds elements to this composite. - * @param {String/Array} els A string CSS selector, an array of elements or an element - * @return {CompositeElement} this - */ - - /** - * Returns the Element object at the specified index - * @param {Number} index - * @return {Ext.Element} - */ - - /** - * Iterates each element in this composite - * calling the supplied function using {@link Ext#each}. - * @param {Function} fn The function to be called with each - * element. If the supplied function returns false, - * iteration stops. This function is called with the following arguments: - *
          - *
        • element : Ext.Element
          The element at the current index - * in the composite
        • - *
        • composite : Object
          This composite.
        • - *
        • index : Number
          The current index within the composite
        • - *
        - * @param {Object} scope (optional) The scope ( reference) in which the specified function is executed. - * Defaults to the element at the current index - * within the composite. - * @return {CompositeElement} this - */ -}); - -/** - * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods - * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or - * {@link Ext.CompositeElementLite CompositeElementLite} object. - * @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.Element - * @method 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"; - } - - return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els); -}; - -/** - * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods - * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or - * {@link Ext.CompositeElementLite CompositeElementLite} object. - * @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.Element - * @method select - */ -Ext.select = Ext.Element.select;(function(){ +Ext.select = Ext.Element.select; +(function(){ var BEFOREREQUEST = "beforerequest", REQUESTCOMPLETE = "requestcomplete", REQUESTEXCEPTION = "requestexception", @@ -9242,6 +6250,7 @@ Ext.select = Ext.Element.select;(function(){ *

        Be aware that file upload packets are sent with the content type multipart/form * and some server technologies (notably JEE) may require some custom processing in order to * retrieve parameter names and parameter values from the packet content.

        + *

        Also note that it's not possible to check the response code of the hidden iframe, so the success handler will ALWAYS fire.

        * @constructor * @param {Object} config a configuration object. */ @@ -9442,7 +6451,7 @@ Ext.Ajax.request({ failure: me.handleFailure, scope: me, argument: {options: o}, - timeout : o.timeout || me.timeout + timeout : Ext.num(o.timeout, me.timeout) }, form, serForm; @@ -9460,7 +6469,7 @@ Ext.Ajax.request({ if((form = Ext.getDom(o.form))){ url = url || form.action; - if(o.isUpload || /multipart\/form-data/i.test(form.getAttribute("enctype"))) { + if(o.isUpload || (/multipart\/form-data/i.test(form.getAttribute("enctype")))) { return me.doFormUpload.call(me, o, p, url); } serForm = Ext.lib.Ajax.serializeForm(form); @@ -9474,7 +6483,7 @@ Ext.Ajax.request({ url = Ext.urlAppend(url, dcp + '=' + (new Date().getTime())); } - o.headers = Ext.apply(o.headers || {}, me.defaultHeaders || {}); + o.headers = Ext.applyIf(o.headers || {}, me.defaultHeaders || {}); if(o.autoAbort === true || me.autoAbort) { me.abort(); @@ -9554,20 +6563,20 @@ Ext.Ajax.request({ action: form.action }; + /* + * Originally this behaviour was modified for Opera 10 to apply the secure URL after + * the frame had been added to the document. It seems this has since been corrected in + * Opera so the behaviour has been reverted, the URL will be set before being added. + */ Ext.fly(frame).set({ id: id, name: id, - cls: 'x-hidden' - + cls: 'x-hidden', + src: Ext.SSL_SECURE_URL }); doc.body.appendChild(frame); - //Reset the Frame to neutral domain - Ext.fly(frame).set({ - src : Ext.SSL_SECURE_URL - }); - // This is required so that IE doesn't pop the response up in a new window. if(Ext.isIE){ document.frames[id].name = id; @@ -9780,6 +6789,4724 @@ Ext.Ajax = new Ext.data.Connection({ } }); /** + * @class Ext.util.JSON + * Modified version of Douglas Crockford"s json.js that doesn"t + * mess with the Object prototype + * http://www.json.org/js.html + * @singleton + */ +Ext.util.JSON = new (function(){ + var useHasOwn = !!{}.hasOwnProperty, + isNative = function() { + var useNative = null; + + return function() { + if (useNative === null) { + useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]'; + } + + return useNative; + }; + }(), + pad = function(n) { + return n < 10 ? "0" + n : n; + }, + doDecode = function(json){ + return json ? eval("(" + json + ")") : ""; + }, + doEncode = function(o){ + if(!Ext.isDefined(o) || o === null){ + return "null"; + }else if(Ext.isArray(o)){ + return encodeArray(o); + }else if(Ext.isDate(o)){ + return Ext.util.JSON.encodeDate(o); + }else if(Ext.isString(o)){ + return encodeString(o); + }else if(typeof o == "number"){ + //don't use isNumber here, since finite checks happen inside isNumber + return isFinite(o) ? String(o) : "null"; + }else if(Ext.isBoolean(o)){ + return String(o); + }else { + var a = ["{"], b, i, v; + for (i in o) { + // don't encode DOM objects + if(!o.getElementsByTagName){ + if(!useHasOwn || o.hasOwnProperty(i)) { + v = o[i]; + switch (typeof v) { + case "undefined": + case "function": + case "unknown": + break; + default: + if(b){ + a.push(','); + } + a.push(doEncode(i), ":", + v === null ? "null" : doEncode(v)); + b = true; + } + } + } + } + a.push("}"); + return a.join(""); + } + }, + m = { + "\b": '\\b', + "\t": '\\t', + "\n": '\\n', + "\f": '\\f', + "\r": '\\r', + '"' : '\\"', + "\\": '\\\\' + }, + encodeString = function(s){ + if (/["\\\x00-\x1f]/.test(s)) { + return '"' + s.replace(/([\x00-\x1f\\"])/g, function(a, b) { + var c = m[b]; + if(c){ + return c; + } + c = b.charCodeAt(); + return "\\u00" + + Math.floor(c / 16).toString(16) + + (c % 16).toString(16); + }) + '"'; + } + return '"' + s + '"'; + }, + encodeArray = function(o){ + var a = ["["], b, i, l = o.length, v; + for (i = 0; i < 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(""); + }; + + /** + *

        Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression. + * The returned value includes enclosing double quotation marks.

        + *

        The default return format is "yyyy-mm-ddThh:mm:ss".

        + *

        To override this:

        
        +Ext.util.JSON.encodeDate = function(d) {
        +    return d.format('"Y-m-d"');
        +};
        +
        + * @param {Date} d The Date to encode + * @return {String} The string literal to use in a JSON string. + */ + this.encodeDate = function(o){ + return '"' + o.getFullYear() + "-" + + pad(o.getMonth() + 1) + "-" + + pad(o.getDate()) + "T" + + pad(o.getHours()) + ":" + + pad(o.getMinutes()) + ":" + + pad(o.getSeconds()) + '"'; + }; + + /** + * Encodes an Object, Array or other value + * @param {Mixed} o The variable to encode + * @return {String} The JSON string + */ + this.encode = function() { + var ec; + return function(o) { + if (!ec) { + // setup encoding function on first access + ec = isNative() ? JSON.stringify : doEncode; + } + return ec(o); + }; + }(); + + + /** + * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set. + * @param {String} json The JSON string + * @return {Object} The resulting object + */ + this.decode = function() { + var dc; + return function(json) { + if (!dc) { + // setup decoding function on first access + dc = isNative() ? JSON.parse : doDecode; + } + return dc(json); + }; + }(); + +})(); +/** + * Shorthand for {@link Ext.util.JSON#encode} + * @param {Mixed} o The variable to encode + * @return {String} The JSON string + * @member Ext + * @method encode + */ +Ext.encode = Ext.util.JSON.encode; +/** + * Shorthand for {@link Ext.util.JSON#decode} + * @param {String} json The JSON string + * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid. + * @return {Object} The resulting object + * @member Ext + * @method decode + */ +Ext.decode = Ext.util.JSON.decode; +/** + * @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, + DETECT_NATIVE = Ext.isGecko || Ext.isWebKit || Ext.isSafari, + E = Ext.lib.Event, + D = Ext.lib.Dom, + DOC = document, + WINDOW = window, + DOMCONTENTLOADED = "DOMContentLoaded", + COMPLETE = 'complete', + propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, + /* + * This cache is used to hold special js objects, the document and window, that don't have an id. We need to keep + * a reference to them so we can look them up at a later point. + */ + specialElCache = []; + + function getId(el){ + var id = false, + i = 0, + len = specialElCache.length, + skip = false, + o; + + if (el) { + if (el.getElementById || el.navigator) { + // look up the id + for(; i < len; ++i){ + o = specialElCache[i]; + if(o.el === el){ + id = o.id; + break; + } + } + if(!id){ + // for browsers that support it, ensure that give the el the same id + id = Ext.id(el); + specialElCache.push({ + id: id, + el: el + }); + skip = true; + } + }else{ + id = Ext.id(el); + } + if(!Ext.elCache[id]){ + Ext.Element.addToCache(new Ext.Element(el), id); + if(skip){ + Ext.elCache[id].skipGC = true; + } + } + } + return id; + } + + /// There is some jquery work around stuff here that isn't needed in Ext Core. + function addListener(el, ename, fn, task, wrap, scope){ + el = Ext.getDom(el); + var id = getId(el), + es = Ext.elCache[id].events, + wfn; + + wfn = E.on(el, ename, wrap); + es[ename] = es[ename] || []; + + /* 0 = Original Function, + 1 = Event Manager Wrapped Function, + 2 = Scope, + 3 = Adapter Wrapped Function, + 4 = Buffered Task + */ + es[ename].push([fn, wrap, scope, wfn, task]); + + // this is a workaround for jQuery and should somehow be removed from Ext Core in the future + // without breaking ExtJS. + + // workaround for jQuery + if(el.addEventListener && ename == "mousewheel"){ + var args = ["DOMMouseScroll", wrap, false]; + el.addEventListener.apply(el, args); + Ext.EventManager.addListener(WINDOW, 'unload', function(){ + el.removeEventListener.apply(el, args); + }); + } + + // fix stopped mousedowns on the document + if(el == DOC && ename == "mousedown"){ + Ext.EventManager.stoppedMouseDownEvent.addListener(wrap); + } + } + + function doScrollChk(){ + /* Notes: + 'doScroll' will NOT work in a IFRAME/FRAMESET. + The method succeeds but, a DOM query done immediately after -- FAILS. + */ + if(window != top){ + return false; + } + + try{ + DOC.documentElement.doScroll('left'); + }catch(e){ + return false; + } + + fireDocReady(); + return true; + } + /** + * @return {Boolean} True if the document is in a 'complete' state (or was determined to + * be true by other means). If false, the state is evaluated again until canceled. + */ + function checkReadyState(e){ + + if(Ext.isIE && doScrollChk()){ + return true; + } + if(DOC.readyState == COMPLETE){ + fireDocReady(); + return true; + } + docReadyState || (docReadyProcId = setTimeout(arguments.callee, 2)); + return false; + } + + var styles; + function checkStyleSheets(e){ + styles || (styles = Ext.query('style, link[rel=stylesheet]')); + if(styles.length == DOC.styleSheets.length){ + fireDocReady(); + return true; + } + docReadyState || (docReadyProcId = setTimeout(arguments.callee, 2)); + return false; + } + + function OperaDOMContentLoaded(e){ + DOC.removeEventListener(DOMCONTENTLOADED, arguments.callee, false); + checkStyleSheets(); + } + + function fireDocReady(e){ + if(!docReadyState){ + docReadyState = true; //only attempt listener removal once + + if(docReadyProcId){ + clearTimeout(docReadyProcId); + } + if(DETECT_NATIVE) { + DOC.removeEventListener(DOMCONTENTLOADED, fireDocReady, false); + } + if(Ext.isIE && checkReadyState.bindIE){ //was this was actually set ?? + DOC.detachEvent('onreadystatechange', checkReadyState); + } + E.un(WINDOW, "load", arguments.callee); + } + if(docReadyEvent && !Ext.isReady){ + Ext.isReady = true; + docReadyEvent.fire(); + docReadyEvent.listeners = []; + } + + } + + function initDocReady(){ + docReadyEvent || (docReadyEvent = new Ext.util.Event()); + if (DETECT_NATIVE) { + DOC.addEventListener(DOMCONTENTLOADED, fireDocReady, false); + } + /* + * Handle additional (exceptional) detection strategies here + */ + if (Ext.isIE){ + //Use readystatechange as a backup AND primary detection mechanism for a FRAME/IFRAME + //See if page is already loaded + if(!checkReadyState()){ + checkReadyState.bindIE = true; + DOC.attachEvent('onreadystatechange', checkReadyState); + } + + }else if(Ext.isOpera ){ + /* Notes: + Opera needs special treatment needed here because CSS rules are NOT QUITE + available after DOMContentLoaded is raised. + */ + + //See if page is already loaded and all styleSheets are in place + (DOC.readyState == COMPLETE && checkStyleSheets()) || + DOC.addEventListener(DOMCONTENTLOADED, OperaDOMContentLoaded, false); + + }else if (Ext.isWebKit){ + //Fallback for older Webkits without DOMCONTENTLOADED support + checkReadyState(); + } + // no matter what, make sure it fires on load + E.on(WINDOW, "load", fireDocReady); + } + + function createTargeted(h, o){ + return function(){ + var args = Ext.toArray(arguments); + if(o.target == Ext.EventObject.setEvent(args[0]).target){ + h.apply(this, args); + } + }; + } + + function createBuffered(h, o, task){ + return function(e){ + // create new event object impl so new events don't wipe out properties + task.delay(o.buffer, h, null, [new Ext.EventObjectImpl(e)]); + }; + } + + function createSingle(h, el, ename, fn, scope){ + return function(e){ + Ext.EventManager.removeListener(el, ename, fn, scope); + h(e); + }; + } + + function createDelayed(h, o, fn){ + return function(e){ + var task = new Ext.util.DelayedTask(h); + if(!fn.tasks) { + fn.tasks = []; + } + fn.tasks.push(task); + task.delay(o.delay || 10, h, null, [new Ext.EventObjectImpl(e)]); + }; + } + + function listen(element, ename, opt, fn, scope){ + var o = (!opt || typeof opt == "boolean") ? {} : opt, + el = Ext.getDom(element), task; + + fn = fn || o.fn; + scope = scope || o.scope; + + if(!el){ + throw "Error listening for \"" + ename + '\". Element "' + element + '" doesn\'t exist.'; + } + function h(e){ + // prevent errors while unload occurring + if(!Ext){// !window[xname]){ ==> can't we do this? + return; + } + e = Ext.EventObject.setEvent(e); + var t; + if (o.delegate) { + if(!(t = e.getTarget(o.delegate, el))){ + return; + } + } else { + t = e.target; + } + if (o.stopEvent) { + e.stopEvent(); + } + if (o.preventDefault) { + e.preventDefault(); + } + if (o.stopPropagation) { + 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); + } + if(o.single){ + h = createSingle(h, el, ename, fn, scope); + } + if(o.buffer){ + task = new Ext.util.DelayedTask(h); + h = createBuffered(h, o, task); + } + + addListener(el, ename, fn, task, h, scope); + return h; + } + + 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 name of the event to listen for. + * @param {Function} handler The handler function the event invokes. This function is passed + * the following parameters:
          + *
        • evt : EventObject
          The {@link Ext.EventObject EventObject} describing the event.
        • + *
        • t : Element
          The {@link Ext.Element Element} which was the target of the event. + * Note that this may be filtered by using the delegate option.
        • + *
        • o : Object
          The options object from the addListener call.
        • + *
        + * @param {Object} scope (optional) The scope (this reference) in which the handler function is executed. Defaults to the Element. + * @param {Object} options (optional) An object containing handler configuration properties. + * This may contain any of the following properties:
          + *
        • scope : Object
          The scope (this reference) in which the handler function is executed. Defaults to the Element.
        • + *
        • delegate : String
          A simple selector to filter the target or look for a descendant of the target
        • + *
        • stopEvent : Boolean
          True to stop the event. That is stop propagation, and prevent the default action.
        • + *
        • preventDefault : Boolean
          True to prevent the default action
        • + *
        • stopPropagation : Boolean
          True to prevent event propagation
        • + *
        • normalized : Boolean
          False to pass a browser event to the handler function instead of an Ext.EventObject
        • + *
        • delay : Number
          The number of milliseconds to delay the invocation of the handler after te event fires.
        • + *
        • single : Boolean
          True to add a handler to handle just the next firing of the event, and then remove itself.
        • + *
        • buffer : Number
          Causes the handler to be scheduled to run in an {@link Ext.util.DelayedTask} delayed + * by the specified number of milliseconds. If the event fires again within that time, the original + * handler is not invoked, but the new handler is scheduled in its place.
        • + *
        • target : Element
          Only call the handler if the event was fired on the target Element, not if the event was bubbled up from a child node.
        • + *

        + *

        See {@link Ext.Element#addListener} for examples of how to use these options.

        + */ + addListener : function(element, eventName, fn, scope, options){ + if(typeof eventName == 'object'){ + var o = eventName, e, val; + for(e in o){ + val = o[e]; + if(!propRe.test(e)){ + if(Ext.isFunction(val)){ + // shared options + listen(element, e, o, val, o.scope); + }else{ + // individual options + listen(element, e, val); + } + } + } + } else { + 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 listener. + * @param {String} eventName The name of the event. + * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #addListener} call. + * @param {Object} scope If a scope (this reference) was specified when the listener was added, + * then this must refer to the same object. + */ + removeListener : function(el, eventName, fn, scope){ + el = Ext.getDom(el); + var id = getId(el), + f = el && (Ext.elCache[id].events)[eventName] || [], + wrap, i, l, k, len, fnc; + + for (i = 0, len = f.length; i < len; i++) { + + /* 0 = Original Function, + 1 = Event Manager Wrapped Function, + 2 = Scope, + 3 = Adapter Wrapped Function, + 4 = Buffered Task + */ + if (Ext.isArray(fnc = f[i]) && fnc[0] == fn && (!scope || fnc[2] == scope)) { + if(fnc[4]) { + fnc[4].cancel(); + } + k = fn.tasks && fn.tasks.length; + if(k) { + while(k--) { + fn.tasks[k].cancel(); + } + delete fn.tasks; + } + wrap = fnc[1]; + E.un(el, eventName, E.extAdapter ? fnc[3] : wrap); + + // jQuery workaround that should be removed from Ext Core + if(wrap && el.addEventListener && eventName == "mousewheel"){ + el.removeEventListener("DOMMouseScroll", wrap, false); + } + + // fix stopped mousedowns on the document + if(wrap && el == DOC && eventName == "mousedown"){ + Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); + } + + f.splice(i, 1); + if (f.length === 0) { + delete Ext.elCache[id].events[eventName]; + } + for (k in Ext.elCache[id].events) { + return false; + } + Ext.elCache[id].events = {}; + return false; + } + } + }, + + /** + * 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 all event handlers. + */ + removeAll : function(el){ + el = Ext.getDom(el); + var id = getId(el), + ec = Ext.elCache[id] || {}, + es = ec.events || {}, + f, i, len, ename, fn, k, wrap; + + for(ename in es){ + if(es.hasOwnProperty(ename)){ + f = es[ename]; + /* 0 = Original Function, + 1 = Event Manager Wrapped Function, + 2 = Scope, + 3 = Adapter Wrapped Function, + 4 = Buffered Task + */ + for (i = 0, len = f.length; i < len; i++) { + fn = f[i]; + if(fn[4]) { + fn[4].cancel(); + } + if(fn[0].tasks && (k = fn[0].tasks.length)) { + while(k--) { + fn[0].tasks[k].cancel(); + } + delete fn.tasks; + } + wrap = fn[1]; + E.un(el, ename, E.extAdapter ? fn[3] : wrap); + + // jQuery workaround that should be removed from Ext Core + if(el.addEventListener && wrap && ename == "mousewheel"){ + el.removeEventListener("DOMMouseScroll", wrap, false); + } + + // fix stopped mousedowns on the document + if(wrap && el == DOC && ename == "mousedown"){ + Ext.EventManager.stoppedMouseDownEvent.removeListener(wrap); + } + } + } + } + if (Ext.elCache[id]) { + Ext.elCache[id].events = {}; + } + }, + + getListeners : function(el, eventName) { + el = Ext.getDom(el); + var id = getId(el), + ec = Ext.elCache[id] || {}, + es = ec.events || {}, + results = []; + if (es && es[eventName]) { + return es[eventName]; + } else { + return null; + } + }, + + purgeElement : function(el, recurse, eventName) { + el = Ext.getDom(el); + var id = getId(el), + ec = Ext.elCache[id] || {}, + es = ec.events || {}, + i, f, len; + if (eventName) { + if (es && es.hasOwnProperty(eventName)) { + f = es[eventName]; + for (i = 0, len = f.length; i < len; i++) { + Ext.EventManager.removeListener(el, eventName, f[i][0]); + } + } + } else { + Ext.EventManager.removeAll(el); + } + if (recurse && el && el.childNodes) { + for (i = 0, len = el.childNodes.length; i < len; i++) { + Ext.EventManager.purgeElement(el.childNodes[i], recurse, eventName); + } + } + }, + + _unload : function() { + var el; + for (el in Ext.elCache) { + Ext.EventManager.removeAll(el); + } + delete Ext.elCache; + delete Ext.Element._flyweights; + + // Abort any outstanding Ajax requests + var c, + conn, + tid, + ajax = Ext.lib.Ajax; + (typeof ajax.conn == 'object') ? conn = ajax.conn : conn = {}; + for (tid in conn) { + c = conn[tid]; + if (c) { + ajax.abort({conn: c, tId: tid}); + } + } + }, + /** + * Adds a listener to be notified 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) The scope (this reference) in which the handler function executes. Defaults to the browser window. + * @param {boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options + * {single: true} be used so that the handler is removed on first invocation. + */ + onDocumentReady : function(fn, scope, options){ + if (Ext.isReady) { // if it already fired or document.body is present + docReadyEvent || (docReadyEvent = new Ext.util.Event()); + docReadyEvent.addListener(fn, scope, options); + docReadyEvent.fire(); + docReadyEvent.listeners = []; + } else { + if (!docReadyEvent) { + initDocReady(); + } + options = options || {}; + options.delay = options.delay || 1; + docReadyEvent.addListener(fn, scope, options); + } + }, + + /** + * Forces a document ready state transition for the framework. Used when Ext is loaded + * into a DOM structure AFTER initial page load (Google API or other dynamic load scenario. + * Any pending 'onDocumentReady' handlers will be fired (if not already handled). + */ + fireDocReady : fireDocReady + }; + /** + * 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 name of the event to listen for. + * @param {Function} handler The handler function the event invokes. + * @param {Object} scope (optional) (this reference) in which the handler function executes. Defaults to the Element. + * @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 listener. + * @param {String} eventName The name of the event. + * @param {Function} fn The handler function to remove. This must be a reference to the function passed into the {@link #on} call. + * @param {Object} scope If a scope (this reference) was specified when the listener was added, + * then this must refer to the same object. + * @member Ext.EventManager + * @method un + */ + pub.un = pub.removeListener; + + pub.stoppedMouseDownEvent = new Ext.util.Event(); + return pub; +}(); +/** + * Adds a listener to be notified 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 (optional) The scope (this reference) in which the handler function executes. Defaults to the browser window. + * @param {boolean} options (optional) Options object as passed to {@link Ext.Element#addListener}. It is recommended that the options + * {single: true} be used so that the handler is removed on first invocation. + * @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.isIE8 ? 'ext-ie8' : 'ext-ie9'))) + : Ext.isGecko ? "ext-gecko " + (Ext.isGecko2 ? 'ext-gecko2' : 'ext-gecko3') + : Ext.isOpera ? "ext-opera" + : Ext.isWebKit ? "ext-webkit" : ""]; + + if (Ext.isSafari) { + cls.push("ext-safari " + (Ext.isSafari2 ? 'ext-safari2' : (Ext.isSafari3 ? 'ext-safari3' : 'ext-safari4'))); + } else if(Ext.isChrome) { + cls.push("ext-chrome"); + } + + if (Ext.isMac) { + cls.push("ext-mac"); + } + if (Ext.isLinux) { + cls.push("ext-linux"); + } + + // add to the parent to allow for selectors like ".ext-strict .ext-ie" + if (Ext.isStrict || Ext.isBorderBox) { + var p = bd.parentNode; + if (p) { + if (!Ext.isStrict) { + Ext.fly(p, '_internal').addClass('x-quirks'); + if (Ext.isIE && !Ext.isStrict) { + Ext.isIEQuirks = true; + } + } + Ext.fly(p, '_internal').addClass(((Ext.isStrict && Ext.isIE ) || (!Ext.enableForcedBoxModel && !Ext.isIE)) ? ' ext-strict' : ' ext-border-box'); + } + } + // Forced border box model class applied to all elements. Bypassing javascript based box model adjustments + // in favor of css. This is for non-IE browsers. + if (Ext.enableForcedBoxModel && !Ext.isIE) { + Ext.isForcedBorderBox = true; + cls.push("ext-forced-border-box"); + } + + Ext.fly(bd, '_internal').addClass(cls); + return true; + }; + + if (!initExtCss()) { + Ext.onReady(initExtCss); + } +})(); + +/** + * Code used to detect certain browser feature/quirks/bugs at startup. + */ +(function(){ + var supports = Ext.apply(Ext.supports, { + /** + * In Webkit, there is an issue with getting the margin right property, see + * https://bugs.webkit.org/show_bug.cgi?id=13343 + */ + correctRightMargin: true, + + /** + * Webkit browsers return rgba(0, 0, 0) when a transparent color is used + */ + correctTransparentColor: true, + + /** + * IE uses styleFloat, not cssFloat for the float property. + */ + cssFloat: true + }); + + var supportTests = function(){ + var div = document.createElement('div'), + doc = document, + view, + last; + + div.innerHTML = '
        '; + doc.body.appendChild(div); + last = div.lastChild; + + if((view = doc.defaultView)){ + if(view.getComputedStyle(div.firstChild.firstChild, null).marginRight != '0px'){ + supports.correctRightMargin = false; + } + if(view.getComputedStyle(last, null).backgroundColor != 'transparent'){ + supports.correctTransparentColor = false; + } + } + supports.cssFloat = !!last.style.cssFloat; + doc.body.removeChild(div); + }; + + if (Ext.isReady) { + supportTests(); + } else { + Ext.onReady(supportTests); + } +})(); + + +/** + * @class Ext.EventObject + * Just as {@link Ext.Element} wraps around a native DOM node, Ext.EventObject + * wraps the browser's native event-object normalizing cross-browser differences, + * such as which mouse button is clicked, keys pressed, mechanisms to stop + * event-propagation along with a method to prevent default actions from taking place. + *

        For example:

        + *
        
        +function handleClick(e, t){ // e is not a standard event object, it is a Ext.EventObject
        +    e.preventDefault();
        +    var target = e.getTarget(); // same as t (the target HTMLElement)
        +    ...
        +}
        +var myDiv = {@link Ext#get Ext.get}("myDiv");  // get reference to an {@link Ext.Element}
        +myDiv.on(         // 'on' is shorthand for addListener
        +    "click",      // perform an action on click of myDiv
        +    handleClick   // reference to the action handler
        +);
        +// other methods to do the same:
        +Ext.EventManager.on("myDiv", 'click', handleClick);
        +Ext.EventManager.addListener("myDiv", 'click', handleClick);
        + 
        + * @singleton + */ +Ext.EventObject = function(){ + var E = Ext.lib.Event, + clickRe = /(dbl)?click/, + // safari keypress events for special keys return bad keycodes + 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 + btnMap = Ext.isIE ? {1:0,4:1,2:2} : {0:0,1:1,2:2}; + + Ext.EventObjectImpl = function(e){ + if(e){ + this.setEvent(e.browserEvent || e); + } + }; + + Ext.EventObjectImpl.prototype = { + /** @private */ + setEvent : function(e){ + var me = this; + if(e == me || (e && e.browserEvent)){ // already wrapped + return e; + } + me.browserEvent = e; + if(e){ + // normalize buttons + me.button = e.button ? btnMap[e.button] : (e.which ? e.which - 1 : -1); + if(clickRe.test(e.type) && me.button == -1){ + me.button = 0; + } + me.type = e.type; + me.shiftKey = e.shiftKey; + // mac metaKey behaves like ctrlKey + me.ctrlKey = e.ctrlKey || e.metaKey || false; + me.altKey = e.altKey; + // in getKey these will be normalized for the mac + me.keyCode = e.keyCode; + me.charCode = e.charCode; + // cache the target for the delayed and or buffered events + me.target = E.getTarget(e); + // same for XY + me.xy = E.getXY(e); + }else{ + me.button = -1; + me.shiftKey = false; + me.ctrlKey = false; + me.altKey = false; + me.keyCode = 0; + me.charCode = 0; + me.target = null; + me.xy = [0, 0]; + } + return me; + }, + + /** + * Stop the event (preventDefault and stopPropagation) + */ + stopEvent : function(){ + var me = this; + if(me.browserEvent){ + if(me.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(me); + } + E.stopEvent(me.browserEvent); + } + }, + + /** + * Prevents the browsers default handling of the event. + */ + preventDefault : function(){ + if(this.browserEvent){ + E.preventDefault(this.browserEvent); + } + }, + + /** + * Cancels bubbling of the event. + */ + stopPropagation : function(){ + var me = this; + if(me.browserEvent){ + if(me.browserEvent.type == 'mousedown'){ + Ext.EventManager.stoppedMouseDownEvent.fire(me); + } + E.stopPropagation(me.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(){ + return this.normalizeKey(this.keyCode || this.charCode); + }, + + // private + normalizeKey: function(k){ + 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 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(){ + return this.browserEvent ? E.getRelatedTarget(this.browserEvent) : 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 target of this event is a child of el. Unless the allowEl parameter is set, it will return false if if the target is el. + * Example usage:
        
        +        // 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!');
        +            }
        +        });
        +        
        + * @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 + * @param {Boolean} allowEl {optional} true to also check if the passed element is the target or related target + * @return {Boolean} + */ + within : function(el, related, allowEl){ + if(el){ + var t = this[related ? "getRelatedTarget" : "getTarget"](); + return t && ((allowEl ? (t == Ext.getDom(el)) : false) || Ext.fly(el).contains(t)); + } + return false; + } + }; + + return new Ext.EventObjectImpl(); +}();/** + * @class Ext.Loader + * @singleton + * Simple class to help load JavaScript files on demand + */ +Ext.Loader = Ext.apply({}, { + /** + * Loads a given set of .js files. Calls the callback function when all files have been loaded + * Set preserveOrder to true to ensure non-parallel loading of files if load order is important + * @param {Array} fileList Array of all files to load + * @param {Function} callback Callback to call after all files have been loaded + * @param {Object} scope The scope to call the callback in + * @param {Boolean} preserveOrder True to make files load in serial, one after the other (defaults to false) + */ + load: function(fileList, callback, scope, preserveOrder) { + var scope = scope || this, + head = document.getElementsByTagName("head")[0], + fragment = document.createDocumentFragment(), + numFiles = fileList.length, + loadedFiles = 0, + me = this; + + /** + * Loads a particular file from the fileList by index. This is used when preserving order + */ + var loadFileIndex = function(index) { + head.appendChild( + me.buildScriptTag(fileList[index], onFileLoaded) + ); + }; + + /** + * Callback function which is called after each file has been loaded. This calls the callback + * passed to load once the final file in the fileList has been loaded + */ + var onFileLoaded = function() { + loadedFiles ++; + + //if this was the last file, call the callback, otherwise load the next file + if (numFiles == loadedFiles && typeof callback == 'function') { + callback.call(scope); + } else { + if (preserveOrder === true) { + loadFileIndex(loadedFiles); + } + } + }; + + if (preserveOrder === true) { + loadFileIndex.call(this, 0); + } else { + //load each file (most browsers will do this in parallel) + Ext.each(fileList, function(file, index) { + fragment.appendChild( + this.buildScriptTag(file, onFileLoaded) + ); + }, this); + + head.appendChild(fragment); + } + }, + + /** + * @private + * Creates and returns a script tag, but does not place it into the document. If a callback function + * is passed, this is called when the script has been loaded + * @param {String} filename The name of the file to create a script tag for + * @param {Function} callback Optional callback, which is called when the script has been loaded + * @return {Element} The new script ta + */ + buildScriptTag: function(filename, callback) { + var script = document.createElement('script'); + script.type = "text/javascript"; + script.src = filename; + + //IE has a different way of handling <script> loads, so we need to check for it here + if (script.readyState) { + script.onreadystatechange = function() { + if (script.readyState == "loaded" || script.readyState == "complete") { + script.onreadystatechange = null; + callback(); + } + }; + } else { + script.onload = callback; + } + + return script; + } +}); +/** + * @class Ext + */ + +Ext.ns("Ext.grid", "Ext.list", "Ext.dd", "Ext.tree", "Ext.form", "Ext.menu", + "Ext.state", "Ext.layout.boxOverflow", "Ext.app", "Ext.ux", "Ext.chart", "Ext.direct", "Ext.slider"); + /** + * Namespace alloted for extensions to the framework. + * @property ux + * @type Object + */ + +Ext.apply(Ext, function(){ + var E = Ext, + idSeed = 0, + scrollWidth = null; + + return { + /** + * A reusable empty function + * @property + * @type Function + */ + emptyFn : function(){}, + + /** + * URL to a 1x1 transparent gif image used by Ext to create inline icons with CSS background images. + * In older versions of IE, this defaults to "http://extjs.com/s.gif" and you should change this to a URL on your server. + * For other browsers it uses an inline data URL. + * @type String + */ + BLANK_IMAGE_URL : Ext.isIE6 || Ext.isIE7 || Ext.isAir ? + 'http:/' + '/www.extjs.com/s.gif' : + 'data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==', + + extendX : function(supr, fn){ + return Ext.extend(supr, fn(supr.prototype)); + }, + + /** + * Returns the current HTML document object as an {@link Ext.Element}. + * @return Ext.Element The document + */ + getDoc : function(){ + return Ext.get(document); + }, + + /** + * 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){ + v = Number(Ext.isEmpty(v) || Ext.isArray(v) || typeof v == 'boolean' || (typeof v == 'string' && v.trim().length == 0) ? NaN : v); + return isNaN(v) ? defaultValue : v; + }, + + /** + *

        Utility method for returning a default value if the passed value is empty.

        + *

        The value is deemed to be empty if it is

          + *
        • null
        • + *
        • undefined
        • + *
        • an empty array
        • + *
        • a zero length string (Unless the allowBlank parameter is true)
        • + *
        + * @param {Mixed} value The value to test + * @param {Mixed} defaultValue The value to return if the original value is empty + * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false) + * @return {Mixed} value, if non-empty, else defaultValue + */ + value : function(v, defaultValue, allowBlank){ + return Ext.isEmpty(v, allowBlank) ? defaultValue : v; + }, + + /** + * Escapes the passed string for use in a regular expression + * @param {String} str + * @return {String} + */ + escapeRe : function(s) { + return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1"); + }, + + sequence : function(o, name, fn, scope){ + o[name] = o[name].createSequence(fn, scope); + }, + + /** + * Applies event listeners to elements by selectors when the document is ready. + * The event name is specified with an @ suffix. + *
        
        +Ext.addBehaviors({
        +    // add a listener for click on all anchors in element with id foo
        +    '#foo a@click' : function(e, t){
        +        // do something
        +    },
        +
        +    // add the same listener to multiple selectors (separated by comma BEFORE the @)
        +    '#foo a, #bar span.some-class@mouseover' : function(){
        +        // do something
        +    }
        +});
        +         * 
        + * @param {Object} obj The list of behaviors to apply + */ + addBehaviors : function(o){ + if(!Ext.isReady){ + Ext.onReady(function(){ + Ext.addBehaviors(o); + }); + } else { + var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times + parts, + b, + s; + for (b in o) { + if ((parts = b.split('@'))[1]) { // for Object prototype breakers + s = parts[0]; + if(!cache[s]){ + cache[s] = Ext.select(s); + } + cache[s].on(parts[1], o[b]); + } + } + cache = null; + } + }, + + /** + * Utility method for getting the width of the browser scrollbar. This can differ depending on + * operating system settings, such as the theme or font size. + * @param {Boolean} force (optional) true to force a recalculation of the value. + * @return {Number} The width of the scrollbar. + */ + getScrollBarWidth: function(force){ + if(!Ext.isReady){ + return 0; + } + + if(force === true || scrollWidth === null){ + // Append our div, do our calculation and then remove it + var div = Ext.getBody().createChild('
        '), + child = div.child('div', true); + var w1 = child.offsetWidth; + div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll'); + var w2 = child.offsetWidth; + div.remove(); + // Need to add 2 to ensure we leave enough space + scrollWidth = w1 - w2 + 2; + } + return scrollWidth; + }, + + + // 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; + }, + + /** + * Copies a set of named properties fom the source object to the destination object. + *

        example:

        
        +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');
        +    }
        +});
        +         * 
        + * @param {Object} dest The destination object. + * @param {Object} source The source object. + * @param {Array/String} names Either an Array of property names, or a comma-delimited list + * of property names to copy. + * @return {Object} The modified object. + */ + copyTo : function(dest, source, names){ + if(typeof names == 'string'){ + names = names.split(/[,;\s]/); + } + Ext.each(names, function(name){ + if(source.hasOwnProperty(name)){ + dest[name] = source[name]; + } + }, this); + return dest; + }, + + /** + * 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}, {@link Ext.Component}, or an Array of either of these to destroy + * @param {Mixed} arg2 (optional) + * @param {Mixed} etc... (optional) + */ + destroy : function(){ + Ext.each(arguments, function(arg){ + if(arg){ + if(Ext.isArray(arg)){ + this.destroy.apply(this, arg); + }else if(typeof arg.destroy == 'function'){ + arg.destroy(); + }else if(arg.dom){ + arg.remove(); + } + } + }, this); + }, + + /** + * 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]]; + } + }, + + /** + * Creates a copy of the passed Array with falsy values removed. + * @param {Array/NodeList} arr The Array from which to remove falsy values. + * @return {Array} The new, compressed Array. + */ + clean : function(arr){ + var ret = []; + Ext.each(arr, function(v){ + if(!!v){ + ret.push(v); + } + }); + return ret; + }, + + /** + * Creates a copy of the passed Array, filtered to contain only unique values. + * @param {Array} arr The Array to filter + * @return {Array} The new Array containing unique values. + */ + unique : function(arr){ + var ret = [], + collect = {}; + + Ext.each(arr, function(v) { + if(!collect[v]){ + ret.push(v); + } + collect[v] = true; + }); + return ret; + }, + + /** + * Recursively flattens into 1-d Array. Injects Arrays inline. + * @param {Array} arr The array to flatten + * @return {Array} The new, flattened array. + */ + flatten : function(arr){ + var worker = []; + function rFlatten(a) { + Ext.each(a, function(v) { + if(Ext.isArray(v)){ + rFlatten(v); + }else{ + worker.push(v); + } + }); + return worker; + } + return rFlatten(arr); + }, + + /** + * Returns the minimum value in the Array. + * @param {Array|NodeList} arr The Array from which to select the minimum value. + * @param {Function} comp (optional) a function to perform the comparision which determines minimization. + * If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1 + * @return {Object} The minimum value in the Array. + */ + min : function(arr, comp){ + var ret = arr[0]; + comp = comp || function(a,b){ return a < b ? -1 : 1; }; + Ext.each(arr, function(v) { + ret = comp(ret, v) == -1 ? ret : v; + }); + return ret; + }, + + /** + * Returns the maximum value in the Array + * @param {Array|NodeList} arr The Array from which to select the maximum value. + * @param {Function} comp (optional) a function to perform the comparision which determines maximization. + * If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1 + * @return {Object} The maximum value in the Array. + */ + max : function(arr, comp){ + var ret = arr[0]; + comp = comp || function(a,b){ return a > b ? 1 : -1; }; + Ext.each(arr, function(v) { + ret = comp(ret, v) == 1 ? ret : v; + }); + return ret; + }, + + /** + * Calculates the mean of the Array + * @param {Array} arr The Array to calculate the mean value of. + * @return {Number} The mean. + */ + mean : function(arr){ + return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined; + }, + + /** + * Calculates the sum of the Array + * @param {Array} arr The Array to calculate the sum value of. + * @return {Number} The sum. + */ + sum : function(arr){ + var ret = 0; + Ext.each(arr, function(v) { + ret += v; + }); + return ret; + }, + + /** + * Partitions the set into two sets: a true set and a false set. + * Example: + * Example2: + *
        
        +// Example 1:
        +Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
        +
        +// Example 2:
        +Ext.partition(
        +    Ext.query("p"),
        +    function(val){
        +        return val.className == "class1"
        +    }
        +);
        +// true are those paragraph elements with a className of "class1",
        +// false set are those that do not have that className.
        +         * 
        + * @param {Array|NodeList} arr The array to partition + * @param {Function} truth (optional) a function to determine truth. If this is omitted the element + * itself must be able to be evaluated for its truthfulness. + * @return {Array} [true,false] + */ + partition : function(arr, truth){ + var ret = [[],[]]; + Ext.each(arr, function(v, i, a) { + ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v); + }); + return ret; + }, + + /** + * Invokes a method on each item in an Array. + *
        
        +// Example:
        +Ext.invoke(Ext.query("p"), "getAttribute", "id");
        +// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
        +         * 
        + * @param {Array|NodeList} arr The Array of items to invoke the method on. + * @param {String} methodName The method name to invoke. + * @param {...*} args Arguments to send into the method invocation. + * @return {Array} The results of invoking the method on each item in the array. + */ + invoke : function(arr, methodName){ + var ret = [], + args = Array.prototype.slice.call(arguments, 2); + Ext.each(arr, function(v,i) { + if (v && typeof v[methodName] == 'function') { + ret.push(v[methodName].apply(v, args)); + } else { + ret.push(undefined); + } + }); + return ret; + }, + + /** + * Plucks the value of a property from each item in the Array + *
        
        +// Example:
        +Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
        +         * 
        + * @param {Array|NodeList} arr The Array of items to pluck the value from. + * @param {String} prop The property name to pluck from each element. + * @return {Array} The value from each item in the Array. + */ + pluck : function(arr, prop){ + var ret = []; + Ext.each(arr, function(v) { + ret.push( v[prop] ); + }); + return ret; + }, + + /** + *

        Zips N sets together.

        + *
        
        +// Example 1:
        +Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
        +// Example 2:
        +Ext.zip(
        +    [ "+", "-", "+"],
        +    [  12,  10,  22],
        +    [  43,  15,  96],
        +    function(a, b, c){
        +        return "$" + a + "" + b + "." + c
        +    }
        +); // ["$+12.43", "$-10.15", "$+22.96"]
        +         * 
        + * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values. + * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together. + * @return {Array} The zipped set. + */ + zip : function(){ + var parts = Ext.partition(arguments, function( val ){ return typeof val != 'function'; }), + arrs = parts[0], + fn = parts[1][0], + len = Ext.max(Ext.pluck(arrs, "length")), + ret = []; + + for (var i = 0; i < len; i++) { + ret[i] = []; + if(fn){ + ret[i] = fn.apply(fn, Ext.pluck(arrs, i)); + }else{ + for (var j = 0, aLen = arrs.length; j < aLen; j++){ + ret[i].push( arrs[j][i] ); + } + } + } + return ret; + }, + + /** + * This is shorthand reference to {@link Ext.ComponentMgr#get}. + * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id} + * @param {String} id The component {@link Ext.Component#id id} + * @return Ext.Component The Component, undefined if not found, or null if a + * Class was found. + */ + getCmp : function(id){ + return Ext.ComponentMgr.get(id); + }, + + /** + * 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: E.isIE6 || (E.isMac && E.isGecko2), + + // 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:
          + *
        • string: If the object passed is a string
        • + *
        • number: If the object passed is a number
        • + *
        • boolean: If the object passed is a boolean value
        • + *
        • date: If the object passed is a Date object
        • + *
        • function: If the object passed is a function reference
        • + *
        • object: If the object passed is an object
        • + *
        • array: If the object passed is an array
        • + *
        • regexp: If the object passed is a regular expression
        • + *
        • element: If the object passed is a DOM Element
        • + *
        • nodelist: If the object passed is a DOM NodeList
        • + *
        • textnode: If the object passed is a DOM text node and contains something other than whitespace
        • + *
        • whitespace: If the object passed is a DOM text node and contains only whitespace
        • + *
        + * @param {Mixed} object + * @return {String} + */ + type : function(o){ + if(o === undefined || o === null){ + return false; + } + if(o.htmlElement){ + return 'element'; + } + var t = typeof o; + if(t == 'object' && o.nodeName) { + switch(o.nodeType) { + case 1: return 'element'; + case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace'; + } + } + if(t == 'object' || t == 'function') { + switch(o.constructor) { + case Array: return 'array'; + case RegExp: return 'regexp'; + case Date: return 'date'; + } + if(typeof o.length == 'number' && typeof o.item == 'function') { + return 'nodelist'; + } + } + return t; + }, + + intercept : function(o, name, fn, scope){ + o[name] = o[name].createInterceptor(fn, scope); + }, + + // internal + callback : function(cb, scope, args, delay){ + if(typeof cb == 'function'){ + if(delay){ + cb.defer(delay, scope, args || []); + }else{ + cb.apply(scope, args || []); + } + } + } + }; +}()); + +/** + * @class Function + * These functions are available on every Function object (any JavaScript function). + */ +Ext.apply(Function.prototype, { + /** + * Create a combined function call sequence of the original function + the passed function. + * The resulting function returns the results of the original function. + * The passed fcn is called with the parameters of the original function. Example usage: + *
        
        +var sayHi = function(name){
        +    alert('Hi, ' + name);
        +}
        +
        +sayHi('Fred'); // alerts "Hi, Fred"
        +
        +var sayGoodbye = sayHi.createSequence(function(name){
        +    alert('Bye, ' + name);
        +});
        +
        +sayGoodbye('Fred'); // both alerts show
        +
        + * @param {Function} fcn The function to sequence + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + */ + createSequence : function(fcn, scope){ + var method = this; + return (typeof fcn != 'function') ? + this : + function(){ + var retval = method.apply(this || window, arguments); + fcn.apply(scope || this || window, arguments); + return retval; + }; + } +}); + + +/** + * @class String + * These functions are available as static methods on the JavaScript String object. + */ +Ext.applyIf(String, { + + /** + * Escapes the passed string for ' and \ + * @param {String} string The string to escape + * @return {String} The escaped string + * @static + */ + escape : function(string) { + return string.replace(/('|\\)/g, "\\$1"); + }, + + /** + * Pads the left side of a string with a specified character. This is especially useful + * for normalizing number and date strings. Example usage: + *
        
        +var s = String.leftPad('123', 5, '0');
        +// s now contains the string: '00123'
        +     * 
        + * @param {String} string The original string + * @param {Number} size The total length of the output string + * @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ") + * @return {String} The padded string + * @static + */ + leftPad : function (val, size, ch) { + var result = String(val); + if(!ch) { + ch = " "; + } + while (result.length < size) { + result = ch + result; + } + return result; + } +}); + +/** + * Utility function that allows you to easily switch a string between two alternating values. The passed value + * is compared to the current string, and if they are equal, the other value that was passed in is returned. If + * they are already different, the first value passed in is returned. Note that this method returns the new value + * but does not change the current string. + *
        
        +// alternate sort directions
        +sort = sort.toggle('ASC', 'DESC');
        +
        +// instead of conditional logic:
        +sort = (sort == 'ASC' ? 'DESC' : 'ASC');
        +
        + * @param {String} value The value to compare to the current string + * @param {String} other The new value to use if the string already equals the first value passed in + * @return {String} The new value + */ +String.prototype.toggle = function(value, other){ + return this == value ? other : value; +}; + +/** + * Trims whitespace from either end of a string, leaving spaces within the string intact. Example: + *
        
        +var s = '  foo bar  ';
        +alert('-' + s + '-');         //alerts "- foo bar -"
        +alert('-' + s.trim() + '-');  //alerts "-foo bar-"
        +
        + * @return {String} The trimmed string + */ +String.prototype.trim = function(){ + var re = /^\s+|\s+$/g; + return function(){ return this.replace(re, ""); }; +}(); + +// 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()); +}; + + +/** + * @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); + } +}); +Ext.lib.Dom.getRegion = function(el) { + return Ext.lib.Region.getRegion(el); +}; Ext.lib.Region = function(t, r, b, l) { + var me = this; + me.top = t; + me[1] = t; + me.right = r; + me.bottom = b; + me.left = l; + me[0] = l; + }; + + Ext.lib.Region.prototype = { + contains : function(region) { + var me = this; + return ( region.left >= me.left && + region.right <= me.right && + region.top >= me.top && + region.bottom <= me.bottom ); + + }, + + getArea : function() { + var me = this; + return ( (me.bottom - me.top) * (me.right - me.left) ); + }, + + intersect : function(region) { + var me = this, + t = Math.max(me.top, region.top), + r = Math.min(me.right, region.right), + b = Math.min(me.bottom, region.bottom), + l = Math.max(me.left, region.left); + + if (b >= t && r >= l) { + return new Ext.lib.Region(t, r, b, l); + } + }, + + union : function(region) { + var me = this, + t = Math.min(me.top, region.top), + r = Math.max(me.right, region.right), + b = Math.max(me.bottom, region.bottom), + l = Math.min(me.left, region.left); + + return new Ext.lib.Region(t, r, b, l); + }, + + constrainTo : function(r) { + var me = this; + me.top = me.top.constrain(r.top, r.bottom); + me.bottom = me.bottom.constrain(r.top, r.bottom); + me.left = me.left.constrain(r.left, r.right); + me.right = me.right.constrain(r.left, r.right); + return me; + }, + + adjust : function(t, l, b, r) { + var me = this; + me.top += t; + me.left += l; + me.right += r; + me.bottom += b; + return me; + } + }; + + Ext.lib.Region.getRegion = function(el) { + var p = Ext.lib.Dom.getXY(el), + t = p[1], + r = p[0] + el.offsetWidth, + b = p[1] + el.offsetHeight, + 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]; + } + var me = this; + me.x = me.right = me.left = me[0] = x; + me.y = me.top = me.bottom = me[1] = y; + }; + + Ext.lib.Point.prototype = new Ext.lib.Region(); +/** + * @class Ext.DomHelper + */ +Ext.apply(Ext.DomHelper, +function(){ + var pub, + afterbegin = 'afterbegin', + afterend = 'afterend', + beforebegin = 'beforebegin', + beforeend = 'beforeend', + confRe = /tag|children|cn|html$/i; + + // private + function doInsert(el, o, returnElement, pos, sibling, append){ + el = Ext.getDom(el); + var newNode; + if (pub.useDom) { + newNode = createDom(o, null); + if (append) { + el.appendChild(newNode); + } else { + (sibling == 'firstChild' ? el : el.parentNode).insertBefore(newNode, el[sibling] || el); + } + } else { + newNode = Ext.DomHelper.insertHtml(pos, el, Ext.DomHelper.createHtml(o)); + } + return returnElement ? Ext.get(newNode, true) : newNode; + } + + // build as dom + /** @ignore */ + function createDom(o, parentNode){ + var el, + doc = document, + useSet, + attr, + val, + cn; + + if (Ext.isArray(o)) { // Allow Arrays of siblings to be inserted + el = doc.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 = doc.createTextNode(o); + } else { + el = doc.createElement( o.tag || 'div' ); + useSet = !!el.setAttribute; // In IE some elements don't have setAttribute + for (var attr in o) { + if(!confRe.test(attr)){ + val = o[attr]; + if(attr == 'cls'){ + el.className = val; + }else{ + if(useSet){ + el.setAttribute(attr, val); + }else{ + el[attr] = val; + } + } + } + } + Ext.DomHelper.applyStyles(el, o.style); + + if ((cn = o.children || o.cn)) { + createDom(cn, el); + } else if (o.html) { + el.innerHTML = o.html; + } + } + if(parentNode){ + parentNode.appendChild(el); + } + return el; + } + + pub = { + /** + * 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 = Ext.DomHelper.createHtml(o); + return new Ext.Template(html); + }, + + /** True to force the use of DOM instead of html fragments @type Boolean */ + useDom : false, + + /** + * 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 + * @hide (repeat) + */ + insertBefore : function(el, o, returnElement){ + return 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 + * @hide (repeat) + */ + insertAfter : function(el, o, returnElement){ + return 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 + * @hide (repeat) + */ + insertFirst : function(el, o, returnElement){ + return doInsert(el, o, returnElement, afterbegin, 'firstChild'); + }, + + /** + * 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 + * @hide (repeat) + */ + append: function(el, o, returnElement){ + return doInsert(el, o, returnElement, beforeend, '', true); + }, + + /** + * Creates new DOM element(s) without inserting them to the document. + * @param {Object/String} o The DOM object spec (and children) or raw HTML blob + * @return {HTMLElement} The new uninserted node + */ + createDom: createDom + }; + return pub; +}()); +/** + * @class Ext.Template + */ +Ext.apply(Ext.Template.prototype, { + /** + * @cfg {Boolean} disableFormats Specify true to disable format + * functions in the template. If the template does not contain + * {@link Ext.util.Format format functions}, setting disableFormats + * to true will reduce {@link #apply} time. Defaults to false. + *
        
        +var t = new Ext.Template(
        +    '<div name="{id}">',
        +        '<span class="{cls}">{name} {value}</span>',
        +    '</div>',
        +    {
        +        compiled: true,      // {@link #compile} immediately
        +        disableFormats: true // reduce {@link #apply} time since no formatting
        +    }
        +);
        +     * 
        + * For a list of available format functions, see {@link Ext.util.Format}. + */ + disableFormats : false, + /** + * See {@link #disableFormats}. + * @type Boolean + * @property disableFormats + */ + + /** + * The regular expression used to match template variables + * @type RegExp + * @property + * @hide repeat doc + */ + re : /\{([\w\-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g, + argsRe : /^\s*['"](.*)["']\s*$/, + compileARe : /\\/g, + compileBRe : /(\r\n|\n)/g, + compileCRe : /'/g, + + /** + * 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 + * @hide repeat doc + */ + applyTemplate : function(values){ + var me = this, + useF = me.disableFormats !== true, + fm = Ext.util.Format, + tpl = me; + + if(me.compiled){ + return me.compiled(values); + } + function fn(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 = me.argsRe; + 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 me.html.replace(me.re, fn); + }, + + /** + * Compiles the template into an internal function, eliminating the RegEx overhead. + * @return {Ext.Template} this + * @hide repeat doc + */ + compile : function(){ + var me = this, + fm = Ext.util.Format, + useF = me.disableFormats !== true, + sep = Ext.isGecko ? "+" : ",", + body; + + function fn(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+"'"; + } + + // branched to use + in gecko and [].join() in others + if(Ext.isGecko){ + body = "this.compiled = function(values){ return '" + + me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn) + + "';};"; + }else{ + body = ["this.compiled = function(values){ return ['"]; + body.push(me.html.replace(me.compileARe, '\\\\').replace(me.compileBRe, '\\n').replace(me.compileCRe, "\\'").replace(me.re, fn)); + body.push("'].join('');};"); + body = body.join(''); + } + eval(body); + return me; + }, + + // private function used to call members + call : function(fnName, value, allValues){ + return this[fnName](value, allValues); + } +}); +Ext.Template.prototype.apply = Ext.Template.prototype.applyTemplate; +/** + * @class Ext.util.Functions + * @singleton + */ +Ext.util.Functions = { + /** + * Creates an interceptor function. The passed function 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 function is called with the parameters of the original function. Example usage: + *
        
        +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 = Ext.createInterceptor(sayHi, function(name){
        +    return name == 'Brian';
        +});
        +
        +sayHiToFriend('Fred');  // no alert
        +sayHiToFriend('Brian'); // alerts "Hi, Brian"
        +       
        + * @param {Function} origFn The original function. + * @param {Function} newFn The function to call before the original + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + */ + createInterceptor: function(origFn, newFn, scope) { + var method = origFn; + if (!Ext.isFunction(newFn)) { + return origFn; + } + else { + return function() { + var me = this, + args = arguments; + newFn.target = me; + newFn.method = origFn; + return (newFn.apply(scope || me || window, args) !== false) ? + origFn.apply(me || window, args) : + null; + }; + } + }, + + /** + * Creates a delegate (callback) that sets the scope to obj. + * Call directly on any function. Example: Ext.createDelegate(this.myFunction, this, [arg1, arg2]) + * Will create a function that is automatically scoped to obj so that the this variable inside the + * callback points to obj. Example usage: + *
        
        +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', Ext.createDelegate(sayHi, btn, ['Fred']));
        +       
        + * @param {Function} fn The function to delegate. + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @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(fn, obj, args, appendArgs) { + if (!Ext.isFunction(fn)) { + return fn; + } + return function() { + var callArgs = args || arguments; + if (appendArgs === true) { + callArgs = Array.prototype.slice.call(arguments, 0); + callArgs = callArgs.concat(args); + } + else if (Ext.isNumber(appendArgs)) { + 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 fn.apply(obj || window, callArgs); + }; + }, + + /** + * Calls this function after the number of millseconds specified, optionally in a specific scope. Example usage: + *
        
        +var sayHi = function(name){
        +    alert('Hi, ' + name);
        +}
        +
        +// executes immediately:
        +sayHi('Fred');
        +
        +// executes after 2 seconds:
        +Ext.defer(sayHi, 2000, this, ['Fred']);
        +
        +// this syntax is sometimes useful for deferring
        +// execution of an anonymous function:
        +Ext.defer(function(){
        +    alert('Anonymous');
        +}, 100);
        +       
        + * @param {Function} fn The function to defer. + * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @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(fn, millis, obj, args, appendArgs) { + fn = Ext.util.Functions.createDelegate(fn, obj, args, appendArgs); + if (millis > 0) { + 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: + * + +var sayHi = function(name){ + alert('Hi, ' + name); +} + +sayHi('Fred'); // alerts "Hi, Fred" + +var sayGoodbye = Ext.createSequence(sayHi, function(name){ + alert('Bye, ' + name); +}); + +sayGoodbye('Fred'); // both alerts show + + * @param {Function} origFn The original function. + * @param {Function} newFn The function to sequence + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + */ + createSequence: function(origFn, newFn, scope) { + if (!Ext.isFunction(newFn)) { + return origFn; + } + else { + return function() { + var retval = origFn.apply(this || window, arguments); + newFn.apply(scope || this || window, arguments); + return retval; + }; + } + } +}; + +/** + * Shorthand for {@link Ext.util.Functions#defer} + * @param {Function} fn The function to defer. + * @param {Number} millis The number of milliseconds for the setTimeout call (if less than or equal to 0 the function is executed immediately) + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @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 + * @member Ext + * @method defer + */ + +Ext.defer = Ext.util.Functions.defer; + +/** + * Shorthand for {@link Ext.util.Functions#createInterceptor} + * @param {Function} origFn The original function. + * @param {Function} newFn The function to call before the original + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + * @member Ext + * @method defer + */ + +Ext.createInterceptor = Ext.util.Functions.createInterceptor; + +/** + * Shorthand for {@link Ext.util.Functions#createSequence} + * @param {Function} origFn The original function. + * @param {Function} newFn The function to sequence + * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. + * If omitted, defaults to the scope in which the original function is called or the browser window. + * @return {Function} The new function + * @member Ext + * @method defer + */ + +Ext.createSequence = Ext.util.Functions.createSequence; + +/** + * Shorthand for {@link Ext.util.Functions#createDelegate} + * @param {Function} fn The function to delegate. + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. + * If omitted, defaults to the browser window. + * @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 + * @member Ext + * @method defer + */ +Ext.createDelegate = Ext.util.Functions.createDelegate; +/** + * @class Ext.util.Observable + */ +Ext.apply(Ext.util.Observable.prototype, function(){ + // this is considered experimental (along with beforeMethod, afterMethod, removeMethodListener?) + // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call + // private + function getMethodEvent(method){ + var e = (this.methodEvents = this.methodEvents || + {})[method], returnValue, v, cancel, obj = this; + + if (!e) { + this.methodEvents[method] = e = {}; + e.originalFn = this[method]; + e.methodName = method; + e.before = []; + e.after = []; + + 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; + } + cancel = !!v.cancel; + } + else + if (v === false) { + cancel = true; + } + else { + returnValue = v; + } + } + }; + + this[method] = function(){ + var args = Array.prototype.slice.call(arguments, 0), + b; + returnValue = v = undefined; + cancel = false; + + for(var i = 0, len = e.before.length; i < len; i++){ + b = e.before[i]; + makeCall(b.fn, b.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++){ + b = e.after[i]; + makeCall(b.fn, b.scope, args); + if (cancel) { + return returnValue; + } + } + return returnValue; + }; + } + return e; + } + + return { + // these are considered experimental + // allows for easier interceptor and sequences, including cancelling and overwriting the return value of the call + // adds an 'interceptor' called before the original method + beforeMethod : function(method, fn, scope){ + getMethodEvent.call(this, method).before.push({ + fn: fn, + scope: scope + }); + }, + + // adds a 'sequence' called after the original method + afterMethod : function(method, fn, scope){ + getMethodEvent.call(this, method).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; + } + } + }, + + /** + * Relays selected events from the specified Observable as if the events were fired by this. + * @param {Object} o The Observable whose events this object is to relay. + * @param {Array} events Array of event names to relay. + */ + relayEvents : function(o, events){ + var me = this; + function createHandler(ename){ + return function(){ + return me.fireEvent.apply(me, [ename].concat(Array.prototype.slice.call(arguments, 0))); + }; + } + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + me.events[ename] = me.events[ename] || true; + o.on(ename, createHandler(ename), me); + } + }, + + /** + *

        Enables events fired by this Observable to bubble up an owner hierarchy by calling + * this.getBubbleTarget() if present. There is no implementation in the Observable base class.

        + *

        This is commonly used by Ext.Components to bubble events to owner Containers. See {@link Ext.Component.getBubbleTarget}. The default + * implementation in Ext.Component returns the Component's immediate owner. But if a known target is required, this can be overridden to + * access the required target more quickly.

        + *

        Example:

        
        +Ext.override(Ext.form.Field, {
        +    //  Add functionality to Field's initComponent to enable the change event to bubble
        +    initComponent : Ext.form.Field.prototype.initComponent.createSequence(function() {
        +        this.enableBubble('change');
        +    }),
        +
        +    //  We know that we want Field's events to bubble directly to the FormPanel.
        +    getBubbleTarget : function() {
        +        if (!this.formPanel) {
        +            this.formPanel = this.findParentByType('form');
        +        }
        +        return this.formPanel;
        +    }
        +});
        +
        +var myForm = new Ext.formPanel({
        +    title: 'User Details',
        +    items: [{
        +        ...
        +    }],
        +    listeners: {
        +        change: function() {
        +            // Title goes red if form has been modified.
        +            myForm.header.setStyle('color', 'red');
        +        }
        +    }
        +});
        +
        + * @param {String/Array} events The event name to bubble, or an Array of event names. + */ + enableBubble : function(events){ + var me = this; + if(!Ext.isEmpty(events)){ + events = Ext.isArray(events) ? events : Array.prototype.slice.call(arguments, 0); + for(var i = 0, len = events.length; i < len; i++){ + var ename = events[i]; + ename = ename.toLowerCase(); + var ce = me.events[ename] || true; + if (typeof ce == 'boolean') { + ce = new Ext.util.Event(me, ename); + me.events[ename] = ce; + } + ce.bubble = true; + } + } + } + }; +}()); + + +/** + * Starts capture on the specified Observable. All events will be passed + * to the supplied function with the event name + standard signature of the event + * before the event is fired. If the supplied function returns false, + * the event will not fire. + * @param {Observable} o The Observable to capture events from. + * @param {Function} fn The function to call when an event is fired. + * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the Observable firing the event. + * @static + */ +Ext.util.Observable.capture = function(o, fn, scope){ + o.fireEvent = o.fireEvent.createInterceptor(fn, scope); +}; + + +/** + * Sets observability on the passed class constructor.

        + *

        This makes any event fired on any instance of the passed class also fire a single event through + * the class allowing for central handling of events on many instances at once.

        + *

        Usage:

        
        +Ext.util.Observable.observeClass(Ext.data.Connection);
        +Ext.data.Connection.on('beforerequest', function(con, options) {
        +    console.log('Ajax request made to ' + options.url);
        +});
        + * @param {Function} c The class constructor to make observable. + * @param {Object} listeners An object containing a series of listeners to add. See {@link #addListener}. + * @static + */ +Ext.util.Observable.observeClass = function(c, listeners){ + if(c){ + if(!c.fireEvent){ + Ext.apply(c, new Ext.util.Observable()); + Ext.util.Observable.capture(c.prototype, c.fireEvent, c); + } + if(typeof listeners == 'object'){ + c.on(listeners); + } + return c; + } +}; +/** +* @class Ext.EventManager +*/ +Ext.apply(Ext.EventManager, function(){ + var resizeEvent, + resizeTask, + textEvent, + textSize, + D = Ext.lib.Dom, + propRe = /^(?:scope|delay|buffer|single|stopEvent|preventDefault|stopPropagation|normalized|args|delegate)$/, + unload = Ext.EventManager._unload, + curWidth = 0, + curHeight = 0, + // note 1: IE fires ONLY the keydown event on specialkey autorepeat + // note 2: Safari < 3.1, Gecko (Mac/Linux) & Opera fire only the keypress event on specialkey autorepeat + // (research done by @Jan Wolter at http://unixpapa.com/js/key.html) + useKeydown = Ext.isWebKit ? + Ext.num(navigator.userAgent.match(/AppleWebKit\/(\d+)/)[1]) >= 525 : + !((Ext.isGecko && !Ext.isWindows) || Ext.isOpera); + + return { + _unload: function(){ + Ext.EventManager.un(window, "resize", this.fireWindowResize, this); + unload.call(Ext.EventManager); + }, + + // private + doResizeEvent: function(){ + var h = D.getViewHeight(), + w = D.getViewWidth(); + + //whacky problem in IE where the resize event will fire even though the w/h are the same. + if(curHeight != h || curWidth != w){ + resizeEvent.fire(curWidth = w, curHeight = h); + } + }, + + /** + * Adds a listener to be notified when the browser window is resized and provides resize event buffering (100 milliseconds), + * passes new viewport width and height to handlers. + * @param {Function} fn The handler function the window resize event invokes. + * @param {Object} scope The scope (this reference) in which the handler function executes. Defaults to the browser window. + * @param {boolean} options Options object as passed to {@link Ext.Element#addListener} + */ + onWindowResize : function(fn, scope, options){ + if(!resizeEvent){ + resizeEvent = new Ext.util.Event(); + resizeTask = new Ext.util.DelayedTask(this.doResizeEvent); + Ext.EventManager.on(window, "resize", this.fireWindowResize, this); + } + resizeEvent.addListener(fn, scope, options); + }, + + // exposed only to allow manual firing + fireWindowResize : function(){ + if(resizeEvent){ + resizeTask.delay(100); + } + }, + + /** + * Adds a listener to be notified 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 function the event invokes. + * @param {Object} scope The scope (this reference) in which the handler function executes. Defaults to the browser window. + * @param {boolean} options Options object as passed to {@link Ext.Element#addListener} + */ + 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()); + } + }, + + /** + * The frequency, in milliseconds, to check for text resize events (defaults to 50) + */ + textResizeInterval : 50, + + /** + * Url used for onDocumentReady with using SSL (defaults to Ext.SSL_SECURE_URL) + */ + ieDeferSrc : false, + + // protected, short accessor for useKeydown + getKeyEvent : function(){ + return useKeydown ? 'keydown' : 'keypress'; + }, + + // protected for use inside the framework + // detects whether we should use keydown or keypress based on the browser. + useKeydown: useKeydown + }; +}()); + +Ext.EventManager.on = Ext.EventManager.addListener; + + +Ext.apply(Ext.EventObjectImpl.prototype, { + /** 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 */ + isNavKeyPress : function(){ + var me = this, + k = this.normalizeKey(me.keyCode); + return (k >= 33 && k <= 40) || // Page Up/Down, End, Home, Left, Up, Right, Down + k == me.RETURN || + k == me.TAB || + k == me.ESC; + }, + + isSpecialKey : function(){ + var k = this.normalizeKey(this.keyCode); + return (this.type == 'keypress' && this.ctrlKey) || + this.isNavKeyPress() || + (k == this.BACKSPACE) || // Backspace + (k >= 16 && k <= 20) || // Shift, Ctrl, Alt, Pause, Caps Lock + (k >= 44 && k <= 46); // Print Screen, Insert, Delete + }, + + getPoint : function(){ + return new Ext.lib.Point(this.xy[0], this.xy[1]); + }, + + /** + * 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); + } +});/** + * @class Ext.Element + */ +Ext.Element.addMethods({ + /** + * Stops the specified event(s) from bubbling and optionally prevents the default action + * @param {String/Array} eventName an event / array of events to stop from bubbling + * @param {Boolean} preventDefault (optional) true to prevent the default action too + * @return {Ext.Element} this + */ + swallowEvent : function(eventName, preventDefault) { + var me = this; + function fn(e) { + e.stopPropagation(); + if (preventDefault) { + e.preventDefault(); + } + } + + if (Ext.isArray(eventName)) { + Ext.each(eventName, function(e) { + me.on(e, fn); + }); + return me; + } + me.on(eventName, fn); + return me; + }, + + /** + * 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); + }); + }, + + /** + * 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) { + var me = this, + dom = me.dom, + n = dom.firstChild, + ni = -1; + + if (Ext.Element.data(dom, 'isCleaned') && forceReclean !== true) { + return me; + } + + while (n) { + var nx = n.nextSibling; + if (n.nodeType == 3 && !(/\S/.test(n.nodeValue))) { + dom.removeChild(n); + } else { + n.nodeIndex = ++ni; + } + n = nx; + } + + Ext.Element.data(dom, 'isCleaned', true); + return me; + }, + + /** + * 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 updateManager = this.getUpdater(); + updateManager.update.apply(updateManager, arguments); + + return this; + }, + + /** + * Gets this element's {@link Ext.Updater Updater} + * @return {Ext.Updater} The Updater + */ + getUpdater : function() { + return this.updateManager || (this.updateManager = new Ext.Updater(this)); + }, + + /** + * 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 (!this.dom) { + return this; + } + html = html || ""; + + if (loadScripts !== true) { + this.dom.innerHTML = html; + if (typeof callback == 'function') { + callback(); + } + return this; + } + + var id = Ext.id(), + dom = this.dom; + + html += ''; + + Ext.lib.Event.onAvailable(id, function() { + var DOC = document, + hd = DOC.getElementsByTagName("head")[0], + re = /(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig, + srcRe = /\ssrc=([\'\"])(.*?)\1/i, + typeRe = /\stype=([\'\"])(.*?)\1/i, + match, + attrs, + srcMatch, + typeMatch, + el, + s; + + while ((match = re.exec(html))) { + attrs = match[1]; + srcMatch = attrs ? attrs.match(srcRe) : false; + if (srcMatch && srcMatch[2]) { + s = DOC.createElement("script"); + s.src = srcMatch[2]; + typeMatch = attrs.match(typeRe); + if (typeMatch && typeMatch[2]) { + s.type = typeMatch[2]; + } + hd.appendChild(s); + } else if (match[2] && match[2].length > 0) { + if (window.execScript) { + window.execScript(match[2]); + } else { + window.eval(match[2]); + } + } + } + + el = DOC.getElementById(id); + if (el) { + Ext.removeNode(el); + } + + if (typeof callback == 'function') { + callback(); + } + }); + dom.innerHTML = html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig, ""); + return this; + }, + + // inherit docs, overridden so we can add removeAnchor + removeAllListeners : function() { + this.removeAnchor(); + Ext.EventManager.removeAll(this.dom); + return this; + }, + + /** + * 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 me = this, + proxy = renderTo ? Ext.DomHelper.append(renderTo, config, true) : + Ext.DomHelper.insertBefore(me.dom, config, true); + + if (matchBox && me.setBox && me.getBox) { // check to make sure Element.position.js is loaded + proxy.setBox(me.getBox()); + } + return proxy; + } +}); + +Ext.Element.prototype.getUpdateManager = Ext.Element.prototype.getUpdater; +/** + * @class Ext.Element + */ +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. + anchor = (anchor || "tl").toLowerCase(); + s = s || {}; + + var me = this, + vp = me.dom == document.body || me.dom == document, + w = s.width || vp ? Ext.lib.Dom.getViewWidth() : me.getWidth(), + h = s.height || vp ? Ext.lib.Dom.getViewHeight() : me.getHeight(), + xy, + r = Math.round, + o = me.getXY(), + scroll = me.getScroll(), + extraX = vp ? scroll.left : !local ? o[0] : 0, + extraY = vp ? scroll.top : !local ? o[1] : 0, + hash = { + c : [r(w * 0.5), r(h * 0.5)], + t : [r(w * 0.5), 0], + l : [0, r(h * 0.5)], + r : [w, r(h * 0.5)], + b : [r(w * 0.5), h], + tl : [0, 0], + bl : [0, h], + br : [w, h], + tr : [w, 0] + }; + + xy = hash[anchor]; + return [xy[0] + extraX, xy[1] + extraY]; + }, + + /** + * 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 me = this, + dom = me.dom, + scroll = !Ext.isEmpty(monitorScroll), + action = function(){ + Ext.fly(dom).alignTo(el, alignment, offsets, animate); + Ext.callback(callback, Ext.fly(dom)); + }, + anchor = this.getAnchor(); + + // previous listener anchor, remove it + this.removeAnchor(); + Ext.apply(anchor, { + fn: action, + scroll: scroll + }); + + Ext.EventManager.onWindowResize(action, null); + + if(scroll){ + Ext.EventManager.on(window, 'scroll', action, null, + {buffer: !isNaN(monitorScroll) ? monitorScroll : 50}); + } + action.call(me); // align immediately + return me; + }, + + /** + * Remove any anchor to this element. See {@link #anchorTo}. + * @return {Ext.Element} this + */ + removeAnchor : function(){ + var me = this, + anchor = this.getAnchor(); + + if(anchor && anchor.fn){ + Ext.EventManager.removeResizeListener(anchor.fn); + if(anchor.scroll){ + Ext.EventManager.un(window, 'scroll', anchor.fn); + } + delete anchor.fn; + } + return me; + }, + + // private + getAnchor : function(){ + var data = Ext.Element.data, + dom = this.dom; + if (!dom) { + return; + } + var anchor = data(dom, '_anchor'); + + if(!anchor){ + anchor = data(dom, '_anchor', {}); + } + return anchor; + }, + + /** + * 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 (optional, defaults to "tl-bl?") 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"; + } + + o = o || [0,0]; + p = (!p || p == "?" ? "tl-bl?" : (!(/-/).test(p) && p !== "" ? "tl-" + p : p || "tl-bl")).toLowerCase(); + + var me = this, + d = me.dom, + a1, + a2, + x, + y, + //constrain the aligned el to viewport if necessary + w, + h, + r, + dw = Ext.lib.Dom.getViewWidth() -10, // 10px of margin for ie + dh = Ext.lib.Dom.getViewHeight()-10, // 10px of margin for ie + p1y, + p1x, + p2y, + p2x, + swapY, + swapX, + doc = document, + docElement = doc.documentElement, + docBody = doc.body, + scrollX = (docElement.scrollLeft || docBody.scrollLeft || 0)+5, + scrollY = (docElement.scrollTop || docBody.scrollTop || 0)+5, + c = false, //constrain to viewport + p1 = "", + p2 = "", + m = p.match(/^([a-z]+)-([a-z]+)(\?)?$/); + + if(!m){ + throw "Element.alignTo with an invalid alignment " + p; + } + + p1 = m[1]; + p2 = m[2]; + 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 + a1 = me.getAnchorXY(p1, true); + a2 = el.getAnchorXY(p2, false); + + x = a2[0] - a1[0] + o[0]; + y = a2[1] - a1[1] + o[1]; + + if(c){ + w = me.getWidth(); + h = me.getHeight(); + r = el.getRegion(); + //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. + p1y = p1.charAt(0); + p1x = p1.charAt(p1.length-1); + p2y = p2.charAt(0); + p2x = p2.charAt(p2.length-1); + swapY = ((p1y=="t" && p2y=="b") || (p1y=="b" && p2y=="t")); + swapX = ((p1x=="r" && p2x=="l") || (p1x=="l" && p2x=="r")); + + + 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: + *
          + *
        • Blank: Defaults to aligning the element's top-left corner to the target's bottom-left corner ("tl-bl").
        • + *
        • One anchor (deprecated): The passed anchor position is used as the target element's anchor point. + * The element being aligned will position its top-left corner (tl) to that point. This method has been + * deprecated in favor of the newer two anchor syntax below.
        • + *
        • Two anchors: If two values from the table below are passed separated by a dash, the first value is used as the + * element's anchor point, and the second value is used as the target's anchor point.
        • + *
        + * In addition to the anchor points, the position parameter also supports the "?" character. If "?" is passed at the end of + * the position string, the element will attempt to align as specified, but the position will be adjusted to constrain to + * the viewport if necessary. Note that the element being aligned might be swapped to align to a different position than + * that specified in order to enforce the viewport constraints. + * Following are all of the supported anchor positions: +
        +Value  Description
        +-----  -----------------------------
        +tl     The top left corner (default)
        +t      The center of the top edge
        +tr     The top right corner
        +l      The center of the left edge
        +c      In the center of the element
        +r      The center of the right edge
        +bl     The bottom left corner
        +b      The center of the bottom edge
        +br     The bottom right corner
        +
        +Example Usage: +
        
        +// align el to other-el using the default positioning ("tl-bl", non-constrained)
        +el.alignTo("other-el");
        +
        +// align the top left corner of el with the top right corner of other-el (constrained to viewport)
        +el.alignTo("other-el", "tr?");
        +
        +// align the bottom right corner of el with the center left edge of other-el
        +el.alignTo("other-el", "br-l?");
        +
        +// align the center of el with the bottom left corner of other-el and
        +// adjust the x position by -6 pixels (and the y position by 0)
        +el.alignTo("other-el", "c-bl", [-6, 0]);
        +
        + * @param {Mixed} element The element to align to. + * @param {String} position (optional, defaults to "tl-bl?") 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 me = this; + return me.setXY(me.getAlignToXY(element, position, offsets), + me.preanim && !!animate ? me.preanim(arguments, 3) : false); + }, + + // private ==> used outside of core + adjustForConstraints : function(xy, parent, offsets){ + return this.getConstrainToXY(parent || document, false, offsets, xy) || xy; + }, + + // private ==> used outside of core + getConstrainToXY : function(el, local, offsets, proposedXY){ + 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, + vb = vy + vh, + xy = proposedXY || (!local ? this.getXY() : [this.getLeft(true), this.getTop(true)]), + x = xy[0], y = xy[1], + offset = this.getConstrainOffset(), + w = this.dom.offsetWidth + offset, + h = this.dom.offsetHeight + offset; + + // 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; + }; + }(), + + + +// el = Ext.get(el); +// offsets = Ext.applyIf(offsets || {}, {top : 0, left : 0, bottom : 0, right : 0}); + +// var me = this, +// doc = document, +// s = el.getScroll(), +// vxy = el.getXY(), +// vx = offsets.left + s.left, +// vy = offsets.top + s.top, +// vw = -offsets.right, +// vh = -offsets.bottom, +// vr, +// vb, +// xy = proposedXY || (!local ? me.getXY() : [me.getLeft(true), me.getTop(true)]), +// x = xy[0], +// y = xy[1], +// w = me.dom.offsetWidth, h = me.dom.offsetHeight, +// moved = false; // only move it if it needs it +// +// +// if(el.dom == doc.body || el.dom == doc){ +// vw += Ext.lib.Dom.getViewWidth(); +// vh += Ext.lib.Dom.getViewHeight(); +// }else{ +// vw += el.dom.clientWidth; +// vh += el.dom.clientHeight; +// if(!local){ +// vx += vxy[0]; +// vy += vxy[1]; +// } +// } + +// // first validate right/bottom +// if(x + w > vx + vw){ +// x = vx + vw - w; +// moved = true; +// } +// if(y + h > vy + vh){ +// y = vy + vh - h; +// moved = true; +// } +// // then make sure top/left isn't negative +// if(x < vx){ +// x = vx; +// moved = true; +// } +// if(y < vy){ +// y = vy; +// moved = true; +// } +// return moved ? [x, y] : false; +// }, + + // private, used internally + getConstrainOffset : function(){ + return 0; + }, + + /** + * 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){ + return this.alignTo(centerIn || document, 'c-c'); + } +}); +/** + * @class Ext.Element + */ +Ext.Element.addMethods({ + /** + * 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 Ext.Element.select(selector, unique, this.dom); + } +});/** + * @class Ext.Element + */ +Ext.apply(Ext.Element.prototype, function() { + var GETDOM = Ext.getDom, + GET = Ext.get, + DH = Ext.DomHelper; + + return { + /** + * 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. If an array is passed, the last inserted element is returned. + */ + insertSibling: function(el, where, returnDom){ + var me = this, + rt, + isAfter = (where || 'before').toLowerCase() == 'after', + insertEl; + + if(Ext.isArray(el)){ + insertEl = me; + Ext.each(el, function(e) { + rt = Ext.fly(insertEl, '_internal').insertSibling(e, where, returnDom); + if(isAfter){ + insertEl = rt; + } + }); + return rt; + } + + el = el || {}; + + if(el.nodeType || el.dom){ + rt = me.dom.parentNode.insertBefore(GETDOM(el), isAfter ? me.dom.nextSibling : me.dom); + if (!returnDom) { + rt = GET(rt); + } + }else{ + if (isAfter && !me.dom.nextSibling) { + rt = DH.append(me.dom.parentNode, el, !returnDom); + } else { + rt = DH[isAfter ? 'insertAfter' : 'insertBefore'](me.dom, el, !returnDom); + } + } + return rt; + } + }; +}());/** + * @class Ext.Element + */ + +// special markup used throughout Ext when box wrapping elements +Ext.Element.boxMarkup = '
        '; + +Ext.Element.addMethods(function(){ + var INTERNAL = "_internal", + pxMatch = /(\d+\.?\d+)px/; + return { + /** + * 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; + }, + + /** + * 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 ret = {}; + Ext.each(arguments, function(v) { + ret[v] = this.getStyle(v); + }, + this); + return ret; + }, + + // private ==> used by ext full + setOverflow : function(v){ + var dom = this.dom; + if(v=='auto' && Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug + dom.style.overflow = 'hidden'; + (function(){dom.style.overflow = 'auto';}).defer(1); + }else{ + dom.style.overflow = v; + } + }, + + /** + *

        Wraps the specified element with a special 9 element markup/CSS block that renders by default as + * a gray container with a gradient background, rounded corners and a 4-way shadow.

        + *

        This special markup is used throughout Ext when box wrapping elements ({@link Ext.Button}, + * {@link Ext.Panel} when {@link Ext.Panel#frame frame=true}, {@link Ext.Window}). The markup + * is of this form:

        + *
        
        +    Ext.Element.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>';
        +        * 
        + *

        Example usage:

        + *
        
        +    // Basic box wrap
        +    Ext.get("foo").boxWrap();
        +
        +    // You can also add a custom class and use CSS inheritance rules to customize the box look.
        +    // 'x-box-blue' is a built-in alternative -- look at the related CSS definitions as an example
        +    // for how to create a custom box wrap style.
        +    Ext.get("foo").boxWrap().addClass("x-box-blue");
        +        * 
        + * @param {String} class (optional) A base CSS class to apply to the containing wrapper element + * (defaults to 'x-box'). Note that there are a number of CSS rules that are dependent on + * this name to make the overall effect work, so if you supply an alternate base class, make sure you + * also supply all of the necessary rules. + * @return {Ext.Element} The outermost wrapping element of the created box structure. + */ + boxWrap : function(cls){ + cls = cls || 'x-box'; + var el = Ext.get(this.insertHtml("beforeBegin", "
        " + String.format(Ext.Element.boxMarkup, cls) + "
        ")); //String.format('
        '+Ext.Element.boxMarkup+'
        ', cls))); + Ext.DomQuery.selectNode('.' + cls + '-mc', el.dom).appendChild(this.dom); + return el; + }, + + /** + * Set the size of this Element. If animation is true, both width and height will be animated concurrently. + * @param {Mixed} width The new width. This may be one of:
          + *
        • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels).
        • + *
        • A String used to set the CSS width style. Animation may not be used. + *
        • A size object in the format {width: widthValue, height: heightValue}.
        • + *
        + * @param {Mixed} height The new height. This may be one of:
          + *
        • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels).
        • + *
        • A String used to set the CSS height style. Animation may not be used.
        • + *
        + * @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){ + var me = this; + if(typeof width == 'object'){ // in case of object from getSize() + height = width.height; + width = width.width; + } + width = me.adjustWidth(width); + height = me.adjustHeight(height); + if(!animate || !me.anim){ + me.dom.style.width = me.addUnits(width); + me.dom.style.height = me.addUnits(height); + }else{ + me.anim({width: {to: width}, height: {to: height}}, me.preanim(arguments, 2)); + } + return me; + }, + + /** + * 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 me = this, + h = Math.max(me.dom.offsetHeight, me.dom.clientHeight); + if(!h){ + h = parseFloat(me.getStyle('height')) || 0; + if(!me.isBorderBox()){ + h += me.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 = parseFloat(this.getStyle('width')) || 0; + if(!this.isBorderBox()){ + w += this.getFrameWidth('lr'); + } + } + return w; + }, + + /** + * 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 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(), + fn = function(){ + Ext.fly(dom, INTERNAL).removeClass(className); + d.removeListener("mouseup", fn); + }; + d.on("mouseup", fn); + }); + return this; + }, + + /** + *

        Returns the dimensions of the element available to lay content out in.

        + *

        If the element (or any ancestor element) has CSS style display : none, the dimensions will be zero.

        + * example:
        
        +        var vpSize = Ext.getBody().getViewSize();
        +
        +        // all Windows created afterwards will have a default value of 90% height and 95% width
        +        Ext.Window.override({
        +            width: vpSize.width * 0.9,
        +            height: vpSize.height * 0.95
        +        });
        +        // To handle window resizing you would have to hook onto onWindowResize.
        +        * 
        + * + * getViewSize utilizes clientHeight/clientWidth which excludes sizing of scrollbars. + * To obtain the size including scrollbars, use getStyleSize + * + * Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. + */ + + getViewSize : function(){ + var doc = document, + d = this.dom, + isDoc = (d == doc || d == doc.body); + + // If the body, use Ext.lib.Dom + if (isDoc) { + var extdom = Ext.lib.Dom; + return { + width : extdom.getViewWidth(), + height : extdom.getViewHeight() + }; + + // Else use clientHeight/clientWidth + } else { + return { + width : d.clientWidth, + height : d.clientHeight + }; + } + }, + + /** + *

        Returns the dimensions of the element available to lay content out in.

        + * + * getStyleSize utilizes prefers style sizing if present, otherwise it chooses the larger of offsetHeight/clientHeight and offsetWidth/clientWidth. + * To obtain the size excluding scrollbars, use getViewSize + * + * Sizing of the document body is handled at the adapter level which handles special cases for IE and strict modes, etc. + */ + + getStyleSize : function(){ + var me = this, + w, h, + doc = document, + d = this.dom, + isDoc = (d == doc || d == doc.body), + s = d.style; + + // If the body, use Ext.lib.Dom + if (isDoc) { + var extdom = Ext.lib.Dom; + return { + width : extdom.getViewWidth(), + height : extdom.getViewHeight() + }; + } + // Use Styles if they are set + if(s.width && s.width != 'auto'){ + w = parseFloat(s.width); + if(me.isBorderBox()){ + w -= me.getFrameWidth('lr'); + } + } + // Use Styles if they are set + if(s.height && s.height != 'auto'){ + h = parseFloat(s.height); + if(me.isBorderBox()){ + h -= me.getFrameWidth('tb'); + } + } + // Use getWidth/getHeight if style not set. + return {width: w || me.getWidth(true), height: h || me.getHeight(true)}; + }, + + /** + * 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)}; + }, + + /** + * Forces the browser to repaint this element + * @return {Ext.Element} this + */ + repaint : function(){ + var dom = this.dom; + this.addClass("x-repaint"); + setTimeout(function(){ + Ext.fly(dom).removeClass("x-repaint"); + }, 1); + return this; + }, + + /** + * Disables text selection for this element (normalized across browsers) + * @return {Ext.Element} this + */ + unselectable : function(){ + this.dom.unselectable = "on"; + return this.swallowEvent("selectstart", true). + applyStyles("-moz-user-select:none;-khtml-user-select:none;"). + addClass("x-unselectable"); + }, + + /** + * 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){ + var me = this, + key, + hash = {t:"top", l:"left", r:"right", b: "bottom"}, + o = {}; + + if (!side) { + for (key in me.margins){ + o[hash[key]] = parseFloat(me.getStyle(me.margins[key])) || 0; + } + return o; + } else { + return me.addStyles.call(me, side, me.margins); + } + } + }; +}()); +/** + * @class Ext.Element + */ +Ext.Element.addMethods({ + /** + * 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 me = this, + w = box.width, + h = box.height; + if((adjust && !me.autoBoxAdjust) && !me.isBorderBox()){ + w -= (me.getBorderWidth("lr") + me.getPadding("lr")); + h -= (me.getBorderWidth("tb") + me.getPadding("tb")); + } + me.setBounds(box.x, box.y, w, h, me.animTest.call(me, arguments, animate, 2)); + return me; + }, + + /** + * Return an object defining the area of this Element which can be passed to {@link #setBox} to + * set another Element's 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: <Element's X position>,
        +    y: <Element's Y position>,
        +    width: <Element's width>,
        +    height: <Element's height>,
        +    bottom: <Element's lower bound>,
        +    right: <Element's rightmost bound>
        +}
        +
        + * The returned object may also be addressed as an Array where index 0 contains the X position + * and index 1 contains the Y position. So the result may also be used for {@link #setXY} + */ + getBox : function(contentBox, local) { + var me = this, + xy, + left, + top, + getBorderWidth = me.getBorderWidth, + getPadding = me.getPadding, + l, + r, + t, + b; + if(!local){ + xy = me.getXY(); + }else{ + left = parseInt(me.getStyle("left"), 10) || 0; + top = parseInt(me.getStyle("top"), 10) || 0; + xy = [left, top]; + } + var el = me.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{ + l = getBorderWidth.call(me, "l") + getPadding.call(me, "l"); + r = getBorderWidth.call(me, "r") + getPadding.call(me, "r"); + t = getBorderWidth.call(me, "t") + getPadding.call(me, "t"); + b = getBorderWidth.call(me, "b") + getPadding.call(me, "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; + }, + + /** + * 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 me = this, + xy = me.getXY(), + x = xy[0], + y = xy[1], + left = [x - distance, y], + right = [x + distance, y], + top = [x, y - distance], + bottom = [x, y + distance], + hash = { + l : left, + left : left, + r : right, + right : right, + t : top, + top : top, + up : top, + b : bottom, + bottom : bottom, + down : bottom + }; + + direction = direction.toLowerCase(); + me.moveTo(hash[direction][0], hash[direction][1], me.animTest.call(me, arguments, animate, 2)); + }, + + /** + * 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){ + var me = this, + style = me.dom.style; + style.left = me.addUnits(left); + style.top = me.addUnits(top); + return me; + }, + + /** + * 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 Ext.lib.Dom.getRegion(this.dom); + }, + + /** + * 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 {Mixed} width The new width. This may be one of:
          + *
        • A Number specifying the new width in this Element's {@link #defaultUnit}s (by default, pixels)
        • + *
        • A String used to set the CSS width style. Animation may not be used. + *
        + * @param {Mixed} height The new height. This may be one of:
          + *
        • A Number specifying the new height in this Element's {@link #defaultUnit}s (by default, pixels)
        • + *
        • A String used to set the CSS height style. Animation may not be used.
        • + *
        + * @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){ + var me = this; + if (!animate || !me.anim) { + me.setSize(width, height); + me.setLocation(x, y); + } else { + me.anim({points: {to: [x, y]}, + width: {to: me.adjustWidth(width)}, + height: {to: me.adjustHeight(height)}}, + me.preanim(arguments, 4), + 'motion'); + } + return me; + }, + + /** + * 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) { + return this.setBounds(region.left, region.top, region.right-region.left, region.bottom-region.top, this.animTest.call(this, arguments, animate, 1)); + } +});/** + * @class Ext.Element + */ +Ext.Element.addMethods({ + /** + * 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) { + //check if we're scrolling top or left + var top = /top/i.test(side), + me = this, + dom = me.dom, + prop; + if (!animate || !me.anim) { + // just setting the value, so grab the direction + prop = 'scroll' + (top ? 'Top' : 'Left'); + dom[prop] = value; + } + else { + // if scrolling top, we need to grab scrollLeft, if left, scrollTop + prop = 'scroll' + (top ? 'Left' : 'Top'); + me.anim({scroll: {to: top ? [dom[prop], value] : [value, dom[prop]]}}, me.preanim(arguments, 2), 'scroll'); + } + return me; + }, + + /** + * 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, + el = this.dom, + o = this.getOffsetsTo(c), + l = o[0] + c.scrollLeft, + t = o[1] + c.scrollTop, + b = t + el.offsetHeight, + r = l + el.offsetWidth, + ch = c.clientHeight, + ct = parseInt(c.scrollTop, 10), + cl = parseInt(c.scrollLeft, 10), + cb = ct + ch, + cr = cl + c.clientWidth; + + if (el.offsetHeight > ch || t < ct) { + c.scrollTop = t; + } + else if (b > cb) { + c.scrollTop = b-ch; + } + // corrects IE, other browsers will ignore + 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; + }, + + // private + scrollChildIntoView : function(child, hscroll) { + Ext.fly(child, '_scrollChildIntoView').scrollIntoView(this, hscroll); + }, + + /** + * 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 false; + } + var el = this.dom, + l = el.scrollLeft, t = el.scrollTop, + w = el.scrollWidth, h = el.scrollHeight, + cw = el.clientWidth, ch = el.clientHeight, + scrolled = false, v, + hash = { + l: Math.min(l + distance, w-cw), + r: v = Math.max(l - distance, 0), + t: Math.max(t - distance, 0), + b: Math.min(t + distance, h-ch) + }; + hash.d = hash.b; + hash.u = hash.t; + + direction = direction.substr(0, 1); + if ((v = hash[direction]) > -1) { + scrolled = true; + this.scrollTo(direction == 'l' || direction == 'r' ? 'left' : 'top', v, this.preanim(arguments, 2)); + } + return scrolled; + } +});/** + * @class Ext.Element + */ +Ext.Element.addMethods( + function() { + var VISIBILITY = "visibility", + DISPLAY = "display", + HIDDEN = "hidden", + NONE = "none", + XMASKED = "x-masked", + XMASKEDRELATIVE = "x-masked-relative", + data = Ext.Element.data; + + return { + /** + * 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.isStyle(VISIBILITY, HIDDEN) && !this.isStyle(DISPLAY, NONE), + p = this.dom.parentNode; + + if (deep !== true || !vis) { + return vis; + } + + while (p && !(/^body/i.test(p.tagName))) { + if (!Ext.fly(p, '_isVisible').isVisible()) { + return false; + } + p = p.parentNode; + } + return true; + }, + + /** + * Returns true if display is not "none" + * @return {Boolean} + */ + isDisplayed : function() { + return !this.isStyle(DISPLAY, NONE); + }, + + /** + * 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(Ext.Element.DISPLAY); + + if (!Ext.isEmpty(display)) { + data(this.dom, 'originalDisplay', display); + } + + return this; + }, + + /** + * 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) { + var me = this, + dom = me.dom, + dh = Ext.DomHelper, + EXTELMASKMSG = "ext-el-mask-msg", + el, + mask; + + if (!/^body/i.test(dom.tagName) && me.getStyle('position') == 'static') { + me.addClass(XMASKEDRELATIVE); + } + if (el = data(dom, 'maskMsg')) { + el.remove(); + } + if (el = data(dom, 'mask')) { + el.remove(); + } + + mask = dh.append(dom, {cls : "ext-el-mask"}, true); + data(dom, 'mask', mask); + + me.addClass(XMASKED); + mask.setDisplayed(true); + + if (typeof msg == 'string') { + var mm = dh.append(dom, {cls : EXTELMASKMSG, cn:{tag:'div'}}, true); + data(dom, 'maskMsg', mm); + mm.dom.className = msgCls ? EXTELMASKMSG + " " + msgCls : EXTELMASKMSG; + mm.dom.firstChild.innerHTML = msg; + mm.setDisplayed(true); + mm.center(me); + } + + // ie will not expand full height automatically + if (Ext.isIE && !(Ext.isIE7 && Ext.isStrict) && me.getStyle('height') == 'auto') { + mask.setSize(undefined, me.getHeight()); + } + + return mask; + }, + + /** + * Removes a previously applied mask. + */ + unmask : function() { + var me = this, + dom = me.dom, + mask = data(dom, 'mask'), + maskMsg = data(dom, 'maskMsg'); + + if (mask) { + if (maskMsg) { + maskMsg.remove(); + data(dom, 'maskMsg', undefined); + } + + mask.remove(); + data(dom, 'mask', undefined); + me.removeClass([XMASKED, XMASKEDRELATIVE]); + } + }, + + /** + * Returns true if this element is masked + * @return {Boolean} + */ + isMasked : function() { + var m = data(this.dom, 'mask'); + return m && m.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'), + shim; + + el.frameBorder = '0'; + el.className = 'ext-shim'; + el.src = Ext.SSL_SECURE_URL; + shim = Ext.get(this.dom.parentNode.insertBefore(el, this.dom)); + shim.autoBoxAdjust = false; + return shim; + } + }; + }() +);/** + * @class Ext.Element + */ +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 (this reference) in which the specified function is executed. Defaults to this Element. + * @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); + } +}); + +//Import the newly-added Ext.Element functions into CompositeElementLite. We call this here because +//Element.keys.js is the last extra Ext.Element include in the ext-all.js build +Ext.CompositeElementLite.importElementMethods();/** + * @class Ext.CompositeElementLite + */ +Ext.apply(Ext.CompositeElementLite.prototype, { + addElements : function(els, root){ + if(!els){ + return this; + } + if(typeof els == "string"){ + els = Ext.Element.selectorFunction(els, root); + } + var yels = this.elements; + Ext.each(els, function(e) { + yels.push(Ext.get(e)); + }); + return this; + }, + + /** + * 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.getCount()-1); + }, + + /** + * 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; + }, + + /** + * 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(keys, removeDom){ + var me = this, + els = this.elements, + el; + Ext.each(keys, function(val){ + if ((el = (els[val] || els[val = me.indexOf(val)]))) { + if(removeDom){ + if(el.dom){ + el.remove(); + }else{ + Ext.removeNode(el); + } + } + els.splice(val, 1); + } + }); + return this; + } +}); +/** + * @class Ext.CompositeElement + * @extends Ext.CompositeElementLite + *

        This class encapsulates a collection of DOM elements, providing methods to filter + * members, or to perform collective actions upon the whole set.

        + *

        Although they are not listed, this class supports all of the methods of {@link Ext.Element} and + * {@link Ext.Fx}. The methods from these classes will be performed on all the elements in this collection.

        + *

        All methods return this and can be chained.

        + * Usage: +
        
        +var els = Ext.select("#some-el div.some-class", true);
        +// or select directly from an existing element
        +var el = Ext.get('some-el');
        +el.select('div.some-class', true);
        +
        +els.setWidth(100); // all elements become 100 width
        +els.hide(true); // all elements fade out and hide
        +// or
        +els.setWidth(100).hide(true);
        +
        + */ +Ext.CompositeElement = Ext.extend(Ext.CompositeElementLite, { + + constructor : function(els, root){ + this.elements = []; + this.add(els, root); + }, + + // private + getElement : function(el){ + // In this case just return it, since we already have a reference to it + return el; + }, + + // private + transformElement : function(el){ + return Ext.get(el); + } + + /** + * Adds elements to this composite. + * @param {String/Array} els A string CSS selector, an array of elements or an element + * @return {CompositeElement} this + */ + + /** + * Returns the Element object at the specified index + * @param {Number} index + * @return {Ext.Element} + */ + + /** + * Iterates each element in this composite + * calling the supplied function using {@link Ext#each}. + * @param {Function} fn The function to be called with each + * element. If the supplied function returns false, + * iteration stops. This function is called with the following arguments: + *
          + *
        • element : Ext.Element
          The element at the current index + * in the composite
        • + *
        • composite : Object
          This composite.
        • + *
        • index : Number
          The current index within the composite
        • + *
        + * @param {Object} scope (optional) The scope ( reference) in which the specified function is executed. + * Defaults to the element at the current index + * within the composite. + * @return {CompositeElement} this + */ +}); + +/** + * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods + * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or + * {@link Ext.CompositeElementLite CompositeElementLite} object. + * @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.Element + * @method 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"; + } + + return (unique === true) ? new Ext.CompositeElement(els) : new Ext.CompositeElementLite(els); +}; + +/** + * Selects elements based on the passed CSS selector to enable {@link Ext.Element Element} methods + * to be applied to many related elements in one statement through the returned {@link Ext.CompositeElement CompositeElement} or + * {@link Ext.CompositeElementLite CompositeElementLite} object. + * @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;/** * @class Ext.Updater * @extends Ext.util.Observable * Provides AJAX-style update capabilities for Element objects. Updater can be used to {@link #update} @@ -9818,15 +11545,15 @@ Ext.Ajax = new Ext.data.Connection({ * @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.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, +Ext.UpdateManager = Ext.Updater = Ext.extend(Ext.util.Observable, function() { - var BEFOREUPDATE = "beforeupdate", - UPDATE = "update", - FAILURE = "failure"; - - // private - function processSuccess(response){ - var me = this; + var BEFOREUPDATE = "beforeupdate", + UPDATE = "update", + FAILURE = "failure"; + + // private + function processSuccess(response){ + var me = this; me.transaction = null; if (response.argument.form && response.argument.reset) { try { // put in try/catch since some older FF releases had problems with this @@ -9841,7 +11568,7 @@ function() { updateComplete.call(me, response); } } - + // private function updateComplete(response, type, success){ this.fireEvent(type || UPDATE, this.el, response); @@ -9851,385 +11578,385 @@ function() { } // private - function processFailure(response){ + function processFailure(response){ updateComplete.call(this, response, FAILURE, !!(this.transaction = null)); } - - return { - constructor: function(el, forceNew){ - var me = this; - el = Ext.get(el); - if(!forceNew && el.updateManager){ - return el.updateManager; - } - /** - * The Element object - * @type Ext.Element - */ - me.el = el; - /** - * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. - * @type String - */ - me.defaultUrl = null; - - me.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(me, 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. - */ - me.transaction = null; - /** - * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments - * @type Function - */ - me.refreshDelegate = me.refresh.createDelegate(me); - /** - * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments - * @type Function - */ - me.updateDelegate = me.update.createDelegate(me); - /** - * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments - * @type Function - */ - me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me); - - /** - * The renderer for this Updater (defaults to {@link Ext.Updater.BasicRenderer}). - */ - me.renderer = me.renderer || me.getDefaultRenderer(); - - Ext.Updater.superclass.constructor.call(me); - }, - - /** - * 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; - }, - /** - * 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(); - }, - - /** - * 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; - }, - - /** - * Get the Element this Updater is bound to - * @return {Ext.Element} The element - */ - getEl : function(){ - return this.el; - }, - - /** - * Performs an asynchronous request, updating this element with the response. - * If params are specified it uses POST, otherwise it uses GET.

        - * Note: 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 update event handler. - * @param {Object} options A config object containing any of the following options:
          - *
        • url : String/Function

          The URL to request or a function which - * returns the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).

        • - *
        • method : String

          The HTTP method to - * use. Defaults to POST if the params argument is present, otherwise GET.

        • - *
        • params : String/Object/Function

          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.

        • - *
        • scripts : Boolean

          If true - * 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 after the execution of the scripts.

        • - *
        • callback : Function

          A function to - * be called when the response from the server arrives. The following - * parameters are passed:

            - *
          • el : Ext.Element

            The Element being updated.

          • - *
          • success : Boolean

            True for success, false for failure.

          • - *
          • response : XMLHttpRequest

            The XMLHttpRequest which processed the update.

          • - *
          • options : Object

            The config object passed to the update call.

          - *

        • - *
        • scope : Object

          The scope in which - * to execute the callback (The callback's this reference.) If the - * params argument is a function, this scope is used for that function also.

        • - *
        • discardUrl : Boolean

          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 discardUrl:true (defaults to false).

        • - *
        • timeout : Number

          The number of seconds to wait for a response before - * timing out (defaults to {@link Ext.Updater.defaults#timeout}).

        • - *
        • text : String

          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.

        • - *
        • nocache : Boolean

          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}).

        - *

        - * For example: -

        
        -	um.update({
        -	    url: "your-url.php",
        -	    params: {param1: "foo", param2: "bar"}, // or a URL encoded string
        -	    callback: yourFunction,
        -	    scope: yourObject, //(optional scope)
        -	    discardUrl: true,
        -	    nocache: true,
        -	    text: "Loading...",
        -	    timeout: 60,
        -	    scripts: false // Save time by avoiding RegExp execution.
        -	});
        -	
        - */ - update : function(url, params, callback, discardUrl){ - var me = this, - cfg, - callerScope; - - if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){ - if(Ext.isObject(url)){ // 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(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;}; - if(!Ext.isEmpty(cfg.text)){me.indicatorText = '
        '+cfg.text+"
        ";}; - if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;}; - if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;}; - } - me.showLoading(); - - if(!discardUrl){ - me.defaultUrl = url; - } - if(Ext.isFunction(url)){ - url = url.call(me); - } - - var o = Ext.apply({}, { - url : url, - params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params, - success: processSuccess, - failure: processFailure, - scope: me, - callback: undefined, - timeout: (me.timeout*1000), - disableCaching: me.disableCaching, - argument: { - "options": cfg, - "url": url, - "form": null, - "callback": callback, - "scope": callerScope || window, - "params": params - } - }, cfg); - - me.transaction = Ext.Ajax.request(o); - } - }, + return { + constructor: function(el, forceNew){ + var me = this; + el = Ext.get(el); + if(!forceNew && el.updateManager){ + return el.updateManager; + } + /** + * The Element object + * @type Ext.Element + */ + me.el = el; + /** + * Cached url to use for refreshes. Overwritten every time update() is called unless "discardUrl" param is set to true. + * @type String + */ + me.defaultUrl = null; - /** - *

        Performs an asynchronous 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.

        - *

        File uploads are not performed using normal "Ajax" techniques, that is they are not - * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the - * DOM <form> element temporarily modified to have its - * target set to refer - * to a dynamically generated, hidden <iframe> which is inserted into the document - * but removed after the return data has been gathered.

        - *

        Be aware that file upload packets, sent with the content type multipart/form-data - * and some server technologies (notably JEE) may require some custom processing in order to - * retrieve parameter names and parameter values from the packet content.

        - * @param {String/HTMLElement} form The form Id or form element - * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used. - * @param {Boolean} reset (optional) Whether to try to reset the form after the update - * @param {Function} callback (optional) Callback when transaction is complete. The following - * parameters are passed:
          - *
        • el : Ext.Element

          The Element being updated.

        • - *
        • success : Boolean

          True for success, false for failure.

        • - *
        • response : XMLHttpRequest

          The XMLHttpRequest which processed the update.

        - */ - formUpdate : function(form, url, reset, callback){ - var me = this; - if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){ - if(Ext.isFunction(url)){ - url = url.call(me); - } - form = Ext.getDom(form) - me.transaction = Ext.Ajax.request({ - form: form, - url:url, - success: processSuccess, - failure: processFailure, - scope: me, - timeout: (me.timeout*1000), - argument: { - "url": url, - "form": form, - "callback": callback, - "reset": reset - } - }); - me.showLoading.defer(1, me); - } - }, - - /** - * 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){ - var me = this; - if(refreshNow){ - me.update(url || me.defaultUrl, params, callback, true); - } - if(me.autoRefreshProcId){ - clearInterval(me.autoRefreshProcId); - } - me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.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; - }, - - /** - * 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.dom.innerHTML = this.indicatorText; - } - }, - - /** - * 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(){ - return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false; - }, - - /** - * 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){ - this.update(this.defaultUrl, null, callback, true); - } - } - } + me.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(me, 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. + */ + me.transaction = null; + /** + * Delegate for refresh() prebound to "this", use myUpdater.refreshDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + me.refreshDelegate = me.refresh.createDelegate(me); + /** + * Delegate for update() prebound to "this", use myUpdater.updateDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + me.updateDelegate = me.update.createDelegate(me); + /** + * Delegate for formUpdate() prebound to "this", use myUpdater.formUpdateDelegate.createCallback(arg1, arg2) to bind arguments + * @type Function + */ + me.formUpdateDelegate = (me.formUpdate || function(){}).createDelegate(me); + + /** + * The renderer for this Updater (defaults to {@link Ext.Updater.BasicRenderer}). + */ + me.renderer = me.renderer || me.getDefaultRenderer(); + + Ext.Updater.superclass.constructor.call(me); + }, + + /** + * 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; + }, + + /** + * 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(); + }, + + /** + * 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; + }, + + /** + * Get the Element this Updater is bound to + * @return {Ext.Element} The element + */ + getEl : function(){ + return this.el; + }, + + /** + * Performs an asynchronous request, updating this element with the response. + * If params are specified it uses POST, otherwise it uses GET.

        + * Note: 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 update event handler. + * @param {Object} options A config object containing any of the following options:
          + *
        • url : String/Function

          The URL to request or a function which + * returns the URL (defaults to the value of {@link Ext.Ajax#url} if not specified).

        • + *
        • method : String

          The HTTP method to + * use. Defaults to POST if the params argument is present, otherwise GET.

        • + *
        • params : String/Object/Function

          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.

        • + *
        • scripts : Boolean

          If true + * 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 after the execution of the scripts.

        • + *
        • callback : Function

          A function to + * be called when the response from the server arrives. The following + * parameters are passed:

            + *
          • el : Ext.Element

            The Element being updated.

          • + *
          • success : Boolean

            True for success, false for failure.

          • + *
          • response : XMLHttpRequest

            The XMLHttpRequest which processed the update.

          • + *
          • options : Object

            The config object passed to the update call.

          + *

        • + *
        • scope : Object

          The scope in which + * to execute the callback (The callback's this reference.) If the + * params argument is a function, this scope is used for that function also.

        • + *
        • discardUrl : Boolean

          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 discardUrl:true (defaults to false).

        • + *
        • timeout : Number

          The number of seconds to wait for a response before + * timing out (defaults to {@link Ext.Updater.defaults#timeout}).

        • + *
        • text : String

          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.

        • + *
        • nocache : Boolean

          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}).

        + *

        + * For example: +

        
        +    um.update({
        +        url: "your-url.php",
        +        params: {param1: "foo", param2: "bar"}, // or a URL encoded string
        +        callback: yourFunction,
        +        scope: yourObject, //(optional scope)
        +        discardUrl: true,
        +        nocache: true,
        +        text: "Loading...",
        +        timeout: 60,
        +        scripts: false // Save time by avoiding RegExp execution.
        +    });
        +    
        + */ + update : function(url, params, callback, discardUrl){ + var me = this, + cfg, + callerScope; + + if(me.fireEvent(BEFOREUPDATE, me.el, url, params) !== false){ + if(Ext.isObject(url)){ // 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(!Ext.isEmpty(cfg.nocache)){me.disableCaching = cfg.nocache;}; + if(!Ext.isEmpty(cfg.text)){me.indicatorText = '
        '+cfg.text+"
        ";}; + if(!Ext.isEmpty(cfg.scripts)){me.loadScripts = cfg.scripts;}; + if(!Ext.isEmpty(cfg.timeout)){me.timeout = cfg.timeout;}; + } + me.showLoading(); + + if(!discardUrl){ + me.defaultUrl = url; + } + if(Ext.isFunction(url)){ + url = url.call(me); + } + + var o = Ext.apply({}, { + url : url, + params: (Ext.isFunction(params) && callerScope) ? params.createDelegate(callerScope) : params, + success: processSuccess, + failure: processFailure, + scope: me, + callback: undefined, + timeout: (me.timeout*1000), + disableCaching: me.disableCaching, + argument: { + "options": cfg, + "url": url, + "form": null, + "callback": callback, + "scope": callerScope || window, + "params": params + } + }, cfg); + + me.transaction = Ext.Ajax.request(o); + } + }, + + /** + *

        Performs an asynchronous 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.

        + *

        File uploads are not performed using normal "Ajax" techniques, that is they are not + * performed using XMLHttpRequests. Instead the form is submitted in the standard manner with the + * DOM <form> element temporarily modified to have its + * target set to refer + * to a dynamically generated, hidden <iframe> which is inserted into the document + * but removed after the return data has been gathered.

        + *

        Be aware that file upload packets, sent with the content type multipart/form-data + * and some server technologies (notably JEE) may require some custom processing in order to + * retrieve parameter names and parameter values from the packet content.

        + * @param {String/HTMLElement} form The form Id or form element + * @param {String} url (optional) The url to pass the form to. If omitted the action attribute on the form will be used. + * @param {Boolean} reset (optional) Whether to try to reset the form after the update + * @param {Function} callback (optional) Callback when transaction is complete. The following + * parameters are passed:
          + *
        • el : Ext.Element

          The Element being updated.

        • + *
        • success : Boolean

          True for success, false for failure.

        • + *
        • response : XMLHttpRequest

          The XMLHttpRequest which processed the update.

        + */ + formUpdate : function(form, url, reset, callback){ + var me = this; + if(me.fireEvent(BEFOREUPDATE, me.el, form, url) !== false){ + if(Ext.isFunction(url)){ + url = url.call(me); + } + form = Ext.getDom(form); + me.transaction = Ext.Ajax.request({ + form: form, + url:url, + success: processSuccess, + failure: processFailure, + scope: me, + timeout: (me.timeout*1000), + argument: { + "url": url, + "form": form, + "callback": callback, + "reset": reset + } + }); + me.showLoading.defer(1, me); + } + }, + + /** + * 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){ + var me = this; + if(refreshNow){ + me.update(url || me.defaultUrl, params, callback, true); + } + if(me.autoRefreshProcId){ + clearInterval(me.autoRefreshProcId); + } + me.autoRefreshProcId = setInterval(me.update.createDelegate(me, [url || me.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; + }, + + /** + * 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.dom.innerHTML = this.indicatorText; + } + }, + + /** + * 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(){ + return this.transaction ? Ext.Ajax.isLoading(this.transaction) : false; + }, + + /** + * 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){ + this.update(this.defaultUrl, null, callback, true); + } + } + }; }()); /** @@ -10241,7 +11968,7 @@ Ext.Updater.defaults = { * Timeout for requests or form posts in seconds (defaults to 30 seconds). * @type Number */ - timeout : 30, + timeout : 30, /** * True to append a unique parameter to GET requests to disable caching (defaults to false). * @type Boolean @@ -10266,7 +11993,7 @@ Ext.Updater.defaults = { * 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 + sslBlankUrl : Ext.SSL_SECURE_URL }; @@ -10305,7 +12032,7 @@ Ext.Updater.BasicRenderer.prototype = { * @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){ + render : function(el, response, updateManager, callback){ el.update(response.responseText, updateManager.loadScripts, callback); } };/** @@ -10456,14 +12183,14 @@ Date.formatCodeToRegex = function(character, currentGroup) { Date.parseCodes[character] = p; // reassign function result to prevent repeated execution } - return p? Ext.applyIf({ - c: p.c? xf(p.c, currentGroup || "{0}") : p.c + return p ? Ext.applyIf({ + c: p.c ? xf(p.c, currentGroup || "{0}") : p.c }, p) : { g:0, c:null, s:Ext.escapeRe(character) // treat unrecognised characters as literals - } -} + }; +}; // private shorthand for Date.formatCodeToRegex since we'll be using it fairly often var $f = Date.formatCodeToRegex; @@ -10511,7 +12238,7 @@ Date.parseFunctions['x-date-format'] = myDateParser; * may be used as a format string to {@link #format}. Example:

        
         Date.formatFunctions['x-date-format'] = myDateFormatter;
         
        - *

        A formatting function should return a string repesentation of the passed Date object:

          + *

          A formatting function should return a string representation of the passed Date object, and is passed the following parameters:

            *
          • date : Date
            The Date to format.
          • *

          *

          To enable date strings to also be parsed according to that format, a corresponding @@ -10724,6 +12451,20 @@ Date.monthNumbers = { return Date.monthNumbers[name.substring(0, 1).toUpperCase() + name.substring(1, 3).toLowerCase()]; }, + /** + * Checks if the specified format contains hour information + * @param {Object} format The format to check + * @return {Boolean} True if the format contains hour information + * @static + */ + formatContainsHourInfo : (function(){ + var stripEscapeRe = /(\\.)/g, + hourInfoRe = /([gGhHisucUOPZ]|M\$)/; + return function(format){ + return hourInfoRe.test(format.replace(stripEscapeRe, '')); + }; + })(), + /** * The base format-code to formatting-function hashmap used by the {@link #format} method. * Formatting functions are strings (or functions which return strings) which @@ -10756,7 +12497,7 @@ Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')"; 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: "String.leftPad(this.getFullYear(), 4, '0')", y: "('' + this.getFullYear()).substring(2, 4)", a: "(this.getHours() < 12 ? 'am' : 'pm')", A: "(this.getHours() < 12 ? 'AM' : 'PM')", @@ -10816,7 +12557,8 @@ Date.formatCodes.x = "String.leftPad(this.getDate(), 2, '0')"; s = s || 0; ms = ms || 0; - var dt = new Date(y, m - 1, d, h, i, s, ms); + // Special handling for year < 100 + var dt = new Date(y < 100 ? 100 : y, m - 1, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0); return y == dt.getFullYear() && m == dt.getMonth() + 1 && @@ -10893,7 +12635,7 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null special = false; code.push("'" + String.escape(ch) + "'"); } else { - code.push(Date.getFormatCode(ch)) + code.push(Date.getFormatCode(ch)); } } Date.formatFunctions[format] = new Function("return " + code.join('+')); @@ -10933,7 +12675,8 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null // these 2 values alone provide sufficient info to create a full date object // create Date object representing January 1st for the given year - "v = new Date(y, 0, 1, h, i, s, ms);", + // handle years < 100 appropriately + "v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);", // then add day of year, checking for Date "rollover" if necessary "v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);", @@ -10941,7 +12684,8 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null "v = null;", // invalid date, so return null "}else{", // plain old Date object - "v = new Date(y, m, d, h, i, s, ms);", + // handle years < 100 properly + "v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);", "}", "}", "}", @@ -10966,9 +12710,12 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null calc = [], regex = [], special = false, - ch = ""; + ch = "", + i = 0, + obj, + last; - for (var i = 0; i < format.length; ++i) { + for (; i < format.length; ++i) { ch = format.charAt(i); if (!special && ch == "\\") { special = true; @@ -10976,18 +12723,26 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null special = false; regex.push(String.escape(ch)); } else { - var obj = $f(ch, currentGroup); + obj = $f(ch, currentGroup); currentGroup += obj.g; regex.push(obj.s); if (obj.g && obj.c) { - calc.push(obj.c); + if (obj.calcLast) { + last = obj.c; + } else { + calc.push(obj.c); + } } } } - Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", "i"); + if (last) { + calc.push(last); + } + + Date.parseRegexes[regexNum] = new RegExp("^" + regex.join('') + "$", 'i'); Date.parseFunctions[format] = new Function("input", "strict", xf(code, regexNum, calc.join(''))); - } + }; }(), // private @@ -11014,14 +12769,14 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null g:0, c:null, s:"(?:" + a.join("|") +")" - } + }; }, l: function() { return { g:0, c:null, s:"(?:" + Date.dayNames.join("|") + ")" - } + }; }, N: { g:0, @@ -11053,7 +12808,7 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null g:1, c:"m = parseInt(Date.getMonthNumber(results[{0}]), 10);\n", // get localised month number s:"(" + Date.monthNames.join("|") + ")" - } + }; }, M: function() { for (var a = [], i = 0; i < 12; a.push(Date.getShortMonthName(i)), ++i); // get localised short month names @@ -11095,19 +12850,22 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null + "y = ty > Date.y2kYear ? 1900 + ty : 2000 + ty;\n", // 2-digit year s:"(\\d{1,2})" }, - a: { - g:1, - c:"if (results[{0}] == 'am') {\n" - + "if (!h || h == 12) { h = 0; }\n" - + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", - s:"(am|pm)" + /** + * In the am/pm parsing routines, we allow both upper and lower case + * even though it doesn't exactly match the spec. It gives much more flexibility + * in being able to specify case insensitive regexes. + */ + a: function(){ + return $f("A"); }, A: { + // We need to calculate the hour before we apply AM/PM when parsing + calcLast: true, g:1, - c:"if (results[{0}] == 'AM') {\n" + c:"if (/(am)/i.test(results[{0}])) {\n" + "if (!h || h == 12) { h = 0; }\n" + "} else { if (!h || h < 12) { h = (h || 0) + 12; }}", - s:"(AM|PM)" + s:"(AM|PM|am|pm)" }, g: function() { return $f("G"); @@ -11217,7 +12975,7 @@ dt = Date.parseDate("2006-02-29 03:20:01", "Y-m-d H:i:s", true); // returns null ")?", ")?" ].join("") - } + }; }, U: { g:1, @@ -11309,7 +13067,7 @@ Ext.apply(Date.prototype, { Wyr = new Date(AWN * ms7d).getUTCFullYear(); return AWN - Math.floor(Date.UTC(Wyr, 0, 7) / ms7d) + 1; - } + }; }(), /** @@ -11380,7 +13138,7 @@ document.write(Date.dayNames[dt.getLastDayOfMonth()]); //output: 'Wednesday' var m = this.getMonth(); return m == 1 && this.isLeapYear() ? 29 : daysInMonth[m]; - } + }; }(), /** @@ -11618,7 +13376,8 @@ console.group('ISO-8601 Granularity Test (see http://www.w3.org/TR/NOTE-datetime console.log('Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)= %o', Date.parseDate("1997-13-16T19:20:30.45+01:00", "c", true)); // strict date parsing with invalid month value console.groupEnd(); -//*//** +*/ +/** * @class Ext.util.MixedCollection * @extends Ext.util.Observable * A Collection class that maintains both numeric indexes and keys and exposes events. @@ -11947,7 +13706,7 @@ mc.add(otherEl); item : function(key){ var mk = this.map[key], item = mk !== undefined ? mk : (typeof key == 'number') ? this.items[key] : undefined; - return !Ext.isFunction(item) || this.allowFunctions ? item : null; // for prototype! + return typeof item != 'function' || this.allowFunctions ? item : null; // for prototype! }, /** @@ -12015,23 +13774,38 @@ mc.add(otherEl); /** * @private + * Performs the actual sorting based on a direction and a sorting function. Internally, + * this creates a temporary array of all items in the MixedCollection, sorts it and then writes + * the sorted array data back into this.items and this.keys * @param {String} property Property to sort by ('key', 'value', or 'index') * @param {String} dir (optional) Direction to sort 'ASC' or 'DESC'. Defaults to 'ASC'. * @param {Function} fn (optional) Comparison function that defines the sort order. * Defaults to sorting by numeric value. */ _sort : function(property, dir, fn){ - var i, - len, - dsc = String(dir).toUpperCase() == 'DESC' ? -1 : 1, - c = [], k = this.keys, items = this.items; + var i, len, + dsc = String(dir).toUpperCase() == 'DESC' ? -1 : 1, - fn = fn || function(a, b){ - return a-b; + //this is a temporary array used to apply the sorting function + c = [], + keys = this.keys, + items = this.items; + + //default to a simple sorter function if one is not provided + fn = fn || function(a, b) { + return a - b; }; + + //copy all the items into a temporary array, which we will sort for(i = 0, len = items.length; i < len; i++){ - c[c.length] = {key: k[i], value: items[i], index: i}; + c[c.length] = { + key : keys[i], + value: items[i], + index: i + }; } + + //sort the temporary array c.sort(function(a, b){ var v = fn(a[property], b[property]) * dsc; if(v === 0){ @@ -12039,10 +13813,13 @@ mc.add(otherEl); } return v; }); + + //copy the temporary array back into the main this.items and this.keys objects for(i = 0, len = c.length; i < len; i++){ items[i] = c[i].value; - k[i] = c[i].key; + keys[i] = c[i].key; } + this.fireEvent('sort', this); }, @@ -12056,6 +13833,45 @@ mc.add(otherEl); this._sort('value', dir, fn); }, + /** + * Reorders each of the items based on a mapping from old index to new index. Internally this + * just translates into a sort. The 'sort' event is fired whenever reordering has occured. + * @param {Object} mapping Mapping from old item index to new item index + */ + reorder: function(mapping) { + this.suspendEvents(); + + var items = this.items, + index = 0, + length = items.length, + order = [], + remaining = [], + oldIndex; + + //object of {oldPosition: newPosition} reversed to {newPosition: oldPosition} + for (oldIndex in mapping) { + order[mapping[oldIndex]] = items[oldIndex]; + } + + for (index = 0; index < length; index++) { + if (mapping[index] == undefined) { + remaining.push(items[index]); + } + } + + for (index = 0; index < length; index++) { + if (order[index] == undefined) { + order[index] = remaining.shift(); + } + } + + this.clear(); + this.addAll(order); + + this.resumeEvents(); + this.fireEvent('sort', this); + }, + /** * Sorts this collection by keys. * @param {String} direction (optional) 'ASC' or 'DESC'. Defaults to 'ASC'. @@ -12173,11 +13989,20 @@ mc.add(otherEl); return -1; }, - // private + /** + * Returns a regular expression based on the given value and matching options. This is used internally for finding and filtering, + * and by Ext.data.Store#filter + * @private + * @param {String} value The value to create the regex for. This is escaped using Ext.escapeRe + * @param {Boolean} anyMatch True to allow any match - no regex start/end line anchors will be added. Defaults to false + * @param {Boolean} caseSensitive True to make the regex case sensitive (adds 'i' switch to regex). Defaults to false. + * @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true. + */ createValueMatcher : function(value, anyMatch, caseSensitive, exactMatch) { if (!value.exec) { // not a regex var er = Ext.escapeRe; value = String(value); + if (anyMatch === true) { value = er(value); } else { @@ -12215,201 +14040,123 @@ mc.add(otherEl); * not found, returns undefined. If an item was found, but is a Class, * returns null. */ -Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item;/** - * @class Ext.util.JSON - * Modified version of Douglas Crockford"s json.js that doesn"t - * mess with the Object prototype - * http://www.json.org/js.html - * @singleton +Ext.util.MixedCollection.prototype.get = Ext.util.MixedCollection.prototype.item; +/** + * @class Ext.AbstractManager + * @extends Object + * Base Manager class - extended by ComponentMgr and PluginMgr */ -Ext.util.JSON = new (function(){ - var useHasOwn = !!{}.hasOwnProperty, - isNative = function() { - var useNative = null; +Ext.AbstractManager = Ext.extend(Object, { + typeName: 'type', - return function() { - if (useNative === null) { - useNative = Ext.USE_NATIVE_JSON && window.JSON && JSON.toString() == '[object JSON]'; - } + constructor: function(config) { + Ext.apply(this, config || {}); - return useNative; - }; - }(), - pad = function(n) { - return n < 10 ? "0" + n : n; - }, - doDecode = function(json){ - return eval("(" + json + ')'); - }, - doEncode = function(o){ - if(!Ext.isDefined(o) || o === null){ - return "null"; - }else if(Ext.isArray(o)){ - return encodeArray(o); - }else if(Ext.isDate(o)){ - return Ext.util.JSON.encodeDate(o); - }else if(Ext.isString(o)){ - return encodeString(o); - }else if(typeof o == "number"){ - //don't use isNumber here, since finite checks happen inside isNumber - return isFinite(o) ? String(o) : "null"; - }else if(Ext.isBoolean(o)){ - return String(o); - }else { - var a = ["{"], b, i, v; - for (i in o) { - // don't encode DOM objects - if(!o.getElementsByTagName){ - if(!useHasOwn || o.hasOwnProperty(i)) { - v = o[i]; - switch (typeof v) { - case "undefined": - case "function": - case "unknown": - break; - default: - if(b){ - a.push(','); - } - a.push(doEncode(i), ":", - v === null ? "null" : doEncode(v)); - b = true; - } - } - } - } - a.push("}"); - return a.join(""); - } - }, - m = { - "\b": '\\b', - "\t": '\\t', - "\n": '\\n', - "\f": '\\f', - "\r": '\\r', - '"' : '\\"', - "\\": '\\\\' - }, - encodeString = function(s){ - if (/["\\\x00-\x1f]/.test(s)) { - return '"' + s.replace(/([\x00-\x1f\\"])/g, function(a, b) { - var c = m[b]; - if(c){ - return c; - } - c = b.charCodeAt(); - return "\\u00" + - Math.floor(c / 16).toString(16) + - (c % 16).toString(16); - }) + '"'; - } - return '"' + s + '"'; - }, - encodeArray = function(o){ - var a = ["["], b, i, l = o.length, v; - for (i = 0; i < 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(""); - }; + /** + * Contains all of the items currently managed + * @property all + * @type Ext.util.MixedCollection + */ + this.all = new Ext.util.MixedCollection(); + + this.types = {}; + }, /** - *

          Encodes a Date. This returns the actual string which is inserted into the JSON string as the literal expression. - * The returned value includes enclosing double quotation marks.

          - *

          The default return format is "yyyy-mm-ddThh:mm:ss".

          - *

          To override this:

          
          -Ext.util.JSON.encodeDate = function(d) {
          -    return d.format('"Y-m-d"');
          -};
          -
          - * @param {Date} d The Date to encode - * @return {String} The string literal to use in a JSON string. + * Returns a component by {@link Ext.Component#id id}. + * For additional details see {@link Ext.util.MixedCollection#get}. + * @param {String} id The component {@link Ext.Component#id id} + * @return Ext.Component The Component, undefined if not found, or null if a + * Class was found. */ - this.encodeDate = function(o){ - return '"' + o.getFullYear() + "-" + - pad(o.getMonth() + 1) + "-" + - pad(o.getDate()) + "T" + - pad(o.getHours()) + ":" + - pad(o.getMinutes()) + ":" + - pad(o.getSeconds()) + '"'; - }; + get : function(id){ + return this.all.get(id); + }, /** - * Encodes an Object, Array or other value - * @param {Mixed} o The variable to encode - * @return {String} The JSON string + * Registers an item to be managed + * @param {Mixed} item The item to register */ - this.encode = function() { - var ec; - return function(o) { - if (!ec) { - // setup encoding function on first access - ec = isNative() ? JSON.stringify : doEncode; - } - return ec(o); - }; - }(); - + register: function(item) { + this.all.add(item); + }, /** - * Decodes (parses) a JSON string to an object. If the JSON is invalid, this function throws a SyntaxError unless the safe option is set. - * @param {String} json The JSON string - * @return {Object} The resulting object + * Unregisters a component by removing it from this manager + * @param {Mixed} item The item to unregister */ - this.decode = function() { - var dc; - return function(json) { - if (!dc) { - // setup decoding function on first access - dc = isNative() ? JSON.parse : doDecode; - } - return dc(json); - }; - }(); + unregister: function(item) { + this.all.remove(item); + }, -})(); -/** - * Shorthand for {@link Ext.util.JSON#encode} - * @param {Mixed} o The variable to encode - * @return {String} The JSON string - * @member Ext - * @method encode - */ -Ext.encode = Ext.util.JSON.encode; -/** - * Shorthand for {@link Ext.util.JSON#decode} - * @param {String} json The JSON string - * @param {Boolean} safe (optional) Whether to return null or throw an exception if the JSON is invalid. - * @return {Object} The resulting object - * @member Ext - * @method decode - */ -Ext.decode = Ext.util.JSON.decode; -/** + /** + *

          Registers a new Component constructor, keyed by a new + * {@link Ext.Component#xtype}.

          + *

          Use this method (or its alias {@link Ext#reg Ext.reg}) to register new + * subclasses of {@link Ext.Component} so that lazy instantiation may be used when specifying + * child Components. + * see {@link Ext.Container#items}

          + * @param {String} xtype The mnemonic string by which the Component class may be looked up. + * @param {Constructor} cls The new Component class. + */ + registerType : function(type, cls){ + this.types[type] = cls; + cls[this.typeName] = type; + }, + + /** + * Checks if a Component type is registered. + * @param {Ext.Component} xtype The mnemonic string by which the Component class may be looked up + * @return {Boolean} Whether the type is registered. + */ + isRegistered : function(type){ + return this.types[type] !== undefined; + }, + + /** + * Creates and returns an instance of whatever this manager manages, based on the supplied type and config object + * @param {Object} config The config object + * @param {String} defaultType If no type is discovered in the config object, we fall back to this type + * @return {Mixed} The instance of whatever this manager is managing + */ + create: function(config, defaultType) { + var type = config[this.typeName] || config.type || defaultType, + Constructor = this.types[type]; + + if (Constructor == undefined) { + throw new Error(String.format("The '{0}' type has not been registered with this manager", type)); + } + + return new Constructor(config); + }, + + /** + * Registers a function that will be called when a Component with the specified id is added to the manager. This will happen on instantiation. + * @param {String} id The component {@link Ext.Component#id id} + * @param {Function} fn The callback function + * @param {Object} scope The scope (this reference) in which the callback is executed. Defaults to the Component. + */ + onAvailable : function(id, fn, scope){ + var all = this.all; + + all.on("add", function(index, o){ + if (o.id == id) { + fn.call(scope || o, o); + all.un("add", fn, scope); + } + }); + } +});/** * @class Ext.util.Format * Reusable data formatting functions * @singleton */ -Ext.util.Format = function(){ - var trimRe = /^\s+|\s+$/g, - stripTagsRE = /<\/?[^>]+>/gi, +Ext.util.Format = function() { + var trimRe = /^\s+|\s+$/g, + stripTagsRE = /<\/?[^>]+>/gi, stripScriptsRe = /(?:)((\n|\r|.)*?)(?:<\/script>)/ig, - nl2brRe = /\r?\n/g; - + nl2brRe = /\r?\n/g; + return { /** * Truncate a string and add an ellipsis ('...') to the end if it exceeds the specified length @@ -12418,17 +14165,17 @@ Ext.util.Format = function(){ * @param {Boolean} word True to try to find a common work break * @return {String} The converted text */ - ellipsis : function(value, len, word){ - if(value && value.length > len){ - if(word){ - var vs = value.substr(0, len - 2), + ellipsis : function(value, len, word) { + if (value && value.length > len) { + if (word) { + var vs = value.substr(0, len - 2), index = Math.max(vs.lastIndexOf(' '), vs.lastIndexOf('.'), vs.lastIndexOf('!'), vs.lastIndexOf('?')); - if(index == -1 || index < (len - 15)){ + if (index == -1 || index < (len - 15)) { return value.substr(0, len - 3) + "..."; - }else{ + } else { return vs.substr(0, index) + "..."; } - } else{ + } else { return value.substr(0, len - 3) + "..."; } } @@ -12440,7 +14187,7 @@ Ext.util.Format = function(){ * @param {Mixed} value Reference to check * @return {Mixed} Empty string if converted, otherwise the original value */ - undef : function(value){ + undef : function(value) { return value !== undefined ? value : ""; }, @@ -12450,7 +14197,7 @@ Ext.util.Format = function(){ * @param {String} defaultValue The value to insert of it's undefined (defaults to "") * @return {String} */ - defaultValue : function(value, defaultValue){ + defaultValue : function(value, defaultValue) { return value !== undefined && value !== '' ? value : defaultValue; }, @@ -12459,7 +14206,7 @@ Ext.util.Format = function(){ * @param {String} value The string to encode * @return {String} The encoded text */ - htmlEncode : function(value){ + htmlEncode : function(value) { return !value ? value : String(value).replace(/&/g, "&").replace(/>/g, ">").replace(/").replace(/</g, "<").replace(/"/g, '"').replace(/&/g, "&"); }, @@ -12477,7 +14224,7 @@ Ext.util.Format = function(){ * @param {String} value The text to trim * @return {String} The trimmed text */ - trim : function(value){ + trim : function(value) { return String(value).replace(trimRe, ""); }, @@ -12488,7 +14235,7 @@ Ext.util.Format = function(){ * @param {Number} length The length of the substring * @return {String} The substring */ - substr : function(value, start, length){ + substr : function(value, start, length) { return String(value).substr(start, length); }, @@ -12497,7 +14244,7 @@ Ext.util.Format = function(){ * @param {String} value The text to convert * @return {String} The converted text */ - lowercase : function(value){ + lowercase : function(value) { return String(value).toLowerCase(); }, @@ -12506,7 +14253,7 @@ Ext.util.Format = function(){ * @param {String} value The text to convert * @return {String} The converted text */ - uppercase : function(value){ + uppercase : function(value) { return String(value).toUpperCase(); }, @@ -12515,17 +14262,17 @@ Ext.util.Format = function(){ * @param {String} value The text to convert * @return {String} The converted text */ - capitalize : function(value){ + capitalize : function(value) { return !value ? value : value.charAt(0).toUpperCase() + value.substr(1).toLowerCase(); }, // private - call : function(value, fn){ - if(arguments.length > 2){ + 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{ + } else { return eval(fn).call(window, value); } }, @@ -12535,7 +14282,7 @@ Ext.util.Format = function(){ * @param {Number/String} value The numeric value to format * @return {String} The formatted currency string */ - usMoney : function(v){ + 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); @@ -12547,7 +14294,7 @@ Ext.util.Format = function(){ whole = whole.replace(r, '$1' + ',' + '$2'); } v = whole + sub; - if(v.charAt(0) == '-'){ + if (v.charAt(0) == '-') { return '-$' + v.substr(1); } return "$" + v; @@ -12559,11 +14306,11 @@ Ext.util.Format = function(){ * @param {String} format (optional) Any valid date format string (defaults to 'm/d/Y') * @return {String} The formatted date string */ - date : function(v, format){ - if(!v){ + date : function(v, format) { + if (!v) { return ""; } - if(!Ext.isDate(v)){ + if (!Ext.isDate(v)) { v = new Date(Date.parse(v)); } return v.dateFormat(format || "m/d/Y"); @@ -12574,18 +14321,18 @@ Ext.util.Format = function(){ * @param {String} format Any valid date format string * @return {Function} The date formatting function */ - dateRenderer : function(format){ - return function(v){ + dateRenderer : function(format) { + return function(v) { return Ext.util.Format.date(v, format); }; }, - + /** * Strips all HTML tags * @param {Mixed} value The text from which to strip tags * @return {String} The stripped text */ - stripTags : function(v){ + stripTags : function(v) { return !v ? v : String(v).replace(stripTagsRE, ""); }, @@ -12594,7 +14341,7 @@ Ext.util.Format = function(){ * @param {Mixed} value The text from which to strip script tags * @return {String} The stripped text */ - stripScripts : function(v){ + stripScripts : function(v) { return !v ? v : String(v).replace(stripScriptsRe, ""); }, @@ -12603,10 +14350,10 @@ Ext.util.Format = function(){ * @param {Number/String} size The numeric value to format * @return {String} The formatted file size */ - fileSize : function(size){ - if(size < 1024) { + fileSize : function(size) { + if (size < 1024) { return size + " bytes"; - } else if(size < 1048576) { + } else if (size < 1048576) { return (Math.round(((size*10) / 1024))/10) + " KB"; } else { return (Math.round(((size*10) / 1048576))/10) + " MB"; @@ -12621,12 +14368,13 @@ Ext.util.Format = function(){ */ math : function(){ var fns = {}; + return function(v, a){ - if(!fns[a]){ + if (!fns[a]) { fns[a] = new Function('v', 'return v ' + a + ';'); } return fns[a](v); - } + }; }(), /** @@ -12662,57 +14410,68 @@ Ext.util.Format = function(){ * @return {String} The formatted number. */ number: function(v, format) { - if(!format){ - return v; - } - v = Ext.num(v, NaN); - if (isNaN(v)){ + if (!format) { + return v; + } + v = Ext.num(v, NaN); + if (isNaN(v)) { return ''; } - var comma = ',', - dec = '.', - i18n = false, - neg = v < 0; - - v = Math.abs(v); - if(format.substr(format.length - 2) == '/i'){ - format = format.substr(0, format.length - 2); - i18n = true; - comma = '.'; - dec = ','; - } - - var hasComma = format.indexOf(comma) != -1, - psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec); - - if(1 < 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]; - } - } - - return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum); + var comma = ',', + dec = '.', + i18n = false, + neg = v < 0; + + v = Math.abs(v); + if (format.substr(format.length - 2) == '/i') { + format = format.substr(0, format.length - 2); + i18n = true; + comma = '.'; + dec = ','; + } + + var hasComma = format.indexOf(comma) != -1, + psplit = (i18n ? format.replace(/[^\d\,]/g, '') : format.replace(/[^\d\.]/g, '')).split(dec); + + if (1 < 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(); + + psplit = fnum.split('.'); + + if (hasComma) { + var cnum = psplit[0], + parr = [], + j = cnum.length, + m = Math.floor(j / 3), + n = cnum.length % 3 || 3, + i; + + for (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]; + } + } else { + if (psplit[1]) { + fnum = psplit[0] + dec + psplit[1]; + } + } + + return (neg ? '-' : '') + format.replace(/[\d,?\.?]+/, fnum); }, /** @@ -12720,8 +14479,8 @@ Ext.util.Format = function(){ * @param {String} format Any valid number format string for {@link #number} * @return {Function} The number formatting function */ - numberRenderer : function(format){ - return function(v){ + numberRenderer : function(format) { + return function(v) { return Ext.util.Format.number(v, format); }; }, @@ -12734,19 +14493,19 @@ Ext.util.Format = function(){ * @param {String} singular The singular form of the word * @param {String} plural (optional) The plural form of the word (defaults to the singular with an "s") */ - plural : function(v, s, p){ + plural : function(v, s, p) { return v +' ' + (v == 1 ? s : (p ? p : s+'s')); }, - + /** * Converts newline characters to the HTML tag <br/> * @param {String} The string value to format. * @return {String} The string with embedded <br/> tags in place of newlines. */ - nl2br : function(v){ + nl2br : function(v) { return Ext.isEmpty(v) ? '' : v.replace(nl2brRe, '
          '); } - } + }; }(); /** * @class Ext.XTemplate @@ -12770,17 +14529,17 @@ Ext.util.Format = function(){ *
        • {@link Ext.layout.MenuLayout}
        • *
        • {@link Ext.ColorPalette}
        • *

        - * - *

        For example usage {@link #XTemplate see the constructor}.

        - * + * + *

        For example usage {@link #XTemplate see the constructor}.

        + * * @constructor * The {@link Ext.Template#Template Ext.Template constructor} describes * the acceptable parameters to pass to the constructor. The following * examples demonstrate all of the supported features.

        - * + * *
          - * - *
        • Sample Data + * + *
        • Sample Data *
          *

          This is the data object used for reference in each code example:

          *
          
          @@ -12808,9 +14567,9 @@ var data = {
            * 
          *
          *
        • - * - * - *
        • Auto filling of arrays + * + * + *
        • Auto filling of arrays *
          *

          The tpl tag and the for operator are used * to process the provided data object: @@ -12881,9 +14640,9 @@ tpl.overwrite(panel.body, data); *

        *
      * - * - * - *
    • Conditional processing with basic comparison operators + * + * + *
    • Conditional processing with basic comparison operators *
      *

      The tpl tag and the if operator are used * to provide conditional checks for deciding whether or not to render specific @@ -12918,9 +14677,9 @@ tpl.overwrite(panel.body, data); * *

      *
    • - * - * - *
    • Basic math support + * + * + *
    • Basic math support *
      *

      The following basic math operators may be applied directly on numeric * data values:

      @@ -12944,8 +14703,8 @@ tpl.overwrite(panel.body, data);
        * 
      *
    • * - * - *
    • Execute arbitrary inline code with special built-in template variables + * + *
    • Execute arbitrary inline code with special built-in template variables *
      *

      Anything between {[ ... ]} is considered code to be executed * in the scope of the template. There are some special variables available in that code: @@ -12976,8 +14735,8 @@ tpl.overwrite(panel.body, data); * *

      *
    • - * - *
    • Template member functions + * + *
    • Template member functions *
      *

      One or more member functions can be specified in a configuration * object passed into the XTemplate constructor for more complex processing:

      @@ -13014,40 +14773,40 @@ tpl.overwrite(panel.body, data); * *
      *
    • - * + * *
    - * + * * @param {Mixed} config */ Ext.XTemplate = function(){ Ext.XTemplate.superclass.constructor.apply(this, arguments); var me = this, - s = me.html, - re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/, - nameRe = /^]*?for="(.*?)"/, - ifRe = /^]*?if="(.*?)"/, - execRe = /^]*?exec="(.*?)"/, - m, - id = 0, - tpls = [], - VALUES = 'values', - PARENT = 'parent', - XINDEX = 'xindex', - XCOUNT = 'xcount', - RETURN = 'return ', - WITHVALUES = 'with(values){ '; + s = me.html, + re = /]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/, + nameRe = /^]*?for="(.*?)"/, + ifRe = /^]*?if="(.*?)"/, + execRe = /^]*?exec="(.*?)"/, + m, + id = 0, + tpls = [], + VALUES = 'values', + PARENT = 'parent', + XINDEX = 'xindex', + XCOUNT = 'xcount', + RETURN = 'return ', + WITHVALUES = 'with(values){ '; s = ['', s, ''].join(''); while((m = s.match(re))){ - var m2 = m[0].match(nameRe), - m3 = m[0].match(ifRe), - m4 = m[0].match(execRe), - exp = null, - fn = null, - exec = null, - name = m2 && m2[1] ? m2[1] : ''; + var m2 = m[0].match(nameRe), + m3 = m[0].match(ifRe), + m4 = m[0].match(execRe), + exp = null, + fn = null, + exec = null, + name = m2 && m2[1] ? m2[1] : ''; if (m3) { exp = m3 && m3[1] ? m3[1] : null; @@ -13078,25 +14837,25 @@ Ext.XTemplate = function(){ s = s.replace(m[0], '{xtpl'+ id + '}'); ++id; } - Ext.each(tpls, function(t) { - me.compileTpl(t); - }); + for(var i = tpls.length-1; i >= 0; --i){ + me.compileTpl(tpls[i]); + } me.master = tpls[tpls.length-1]; me.tpls = tpls; }; Ext.extend(Ext.XTemplate, Ext.Template, { // private - re : /\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g, + re : /\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g, // private codeRe : /\{\[((?:\\\]|.|\n)*?)\]\}/g, // private applySubTemplate : function(id, values, parent, xindex, xcount){ var me = this, - len, - t = me.tpls[id], - vs, - buf = []; + len, + t = me.tpls[id], + vs, + buf = []; if ((t.test && !t.test.call(me, values, parent, xindex, xcount)) || (t.exec && t.exec.call(me, values, parent, xindex, xcount))) { return ''; @@ -13105,9 +14864,9 @@ Ext.extend(Ext.XTemplate, Ext.Template, { len = vs.length; parent = t.target ? values : parent; if(t.target && Ext.isArray(vs)){ - Ext.each(vs, function(v, i) { - buf[buf.length] = t.compiled.call(me, v, parent, i+1, len); - }); + for(var i = 0, len = vs.length; i < len; i++){ + buf[buf.length] = t.compiled.call(me, vs[i], parent, i+1, len); + } return buf.join(''); } return t.compiled.call(me, vs, parent, xindex, xcount); @@ -13116,7 +14875,7 @@ Ext.extend(Ext.XTemplate, Ext.Template, { // private compileTpl : function(tpl){ var fm = Ext.util.Format, - useF = this.disableFormats !== true, + useF = this.disableFormats !== true, sep = Ext.isGecko ? "+" : ",", body; @@ -13219,7 +14978,8 @@ Ext.XTemplate.prototype.apply = Ext.XTemplate.prototype.applyTemplate; Ext.XTemplate.from = function(el){ el = Ext.getDom(el); return new Ext.XTemplate(el.value || el.innerHTML); -};/** +}; +/** * @class Ext.util.CSS * Utility class for manipulating CSS rules * @singleton @@ -13402,48 +15162,51 @@ Ext.util.CSS = function(){ @param {Mixed} el The element to listen on @param {Object} config */ -Ext.util.ClickRepeater = function(el, config) -{ - this.el = Ext.get(el); - this.el.unselectable(); +Ext.util.ClickRepeater = Ext.extend(Ext.util.Observable, { - Ext.apply(this, config); + constructor : function(el, config){ + this.el = Ext.get(el); + this.el.unselectable(); - this.addEvents( - /** - * @event mousedown - * Fires when the mouse button is depressed. - * @param {Ext.util.ClickRepeater} this - */ + Ext.apply(this, config); + + this.addEvents( + /** + * @event mousedown + * Fires when the mouse button is depressed. + * @param {Ext.util.ClickRepeater} this + * @param {Ext.EventObject} e + */ "mousedown", - /** - * @event click - * Fires on a specified interval during the time the element is pressed. - * @param {Ext.util.ClickRepeater} this - */ + /** + * @event click + * Fires on a specified interval during the time the element is pressed. + * @param {Ext.util.ClickRepeater} this + * @param {Ext.EventObject} e + */ "click", - /** - * @event mouseup - * Fires when the mouse key is released. - * @param {Ext.util.ClickRepeater} this - */ + /** + * @event mouseup + * Fires when the mouse key is released. + * @param {Ext.util.ClickRepeater} this + * @param {Ext.EventObject} e + */ "mouseup" - ); + ); - if(!this.disabled){ - this.disabled = true; - this.enable(); - } + if(!this.disabled){ + this.disabled = true; + this.enable(); + } - // allow inline handler - if(this.handler){ - this.on("click", this.handler, this.scope || this); - } + // allow inline handler + if(this.handler){ + this.on("click", this.handler, this.scope || this); + } - Ext.util.ClickRepeater.superclass.constructor.call(this); -}; + Ext.util.ClickRepeater.superclass.constructor.call(this); + }, -Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { interval : 20, delay: 250, preventDefault : true, @@ -13456,13 +15219,16 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { enable: function(){ if(this.disabled){ this.el.on('mousedown', this.handleMouseDown, this); + if (Ext.isIE){ + this.el.on('dblclick', this.handleDblClick, this); + } if(this.preventDefault || this.stopDefault){ this.el.on('click', this.eventOptions, this); } } this.disabled = false; }, - + /** * Disables the repeater and stops events from firing. */ @@ -13477,33 +15243,41 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { } this.disabled = true; }, - + /** * Convenience function for setting disabled/enabled by boolean. * @param {Boolean} disabled */ setDisabled: function(disabled){ - this[disabled ? 'disable' : 'enable'](); + this[disabled ? 'disable' : 'enable'](); }, - + eventOptions: function(e){ if(this.preventDefault){ e.preventDefault(); } if(this.stopDefault){ e.stopEvent(); - } + } }, - + // private destroy : function() { this.disable(true); Ext.destroy(this.el); this.purgeListeners(); }, - + + handleDblClick : function(e){ + clearTimeout(this.timer); + this.el.blur(); + + this.fireEvent("mousedown", this, e); + this.fireEvent("click", this, e); + }, + // private - handleMouseDown : function(){ + handleMouseDown : function(e){ clearTimeout(this.timer); this.el.blur(); if(this.pressClass){ @@ -13514,25 +15288,25 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { Ext.getDoc().on("mouseup", this.handleMouseUp, this); this.el.on("mouseout", this.handleMouseOut, this); - this.fireEvent("mousedown", this); - this.fireEvent("click", this); + this.fireEvent("mousedown", this, e); + this.fireEvent("click", this, e); -// Do not honor delay or interval if acceleration wanted. + // Do not honor delay or interval if acceleration wanted. if (this.accelerate) { this.delay = 400; - } - this.timer = this.click.defer(this.delay || this.interval, this); + } + this.timer = this.click.defer(this.delay || this.interval, this, [e]); }, // private - click : function(){ - this.fireEvent("click", this); + click : function(e){ + this.fireEvent("click", this, e); this.timer = this.click.defer(this.accelerate ? this.easeOutExpo(this.mousedownTime.getElapsed(), 400, -390, 12000) : - this.interval, this); + this.interval, this, [e]); }, easeOutExpo : function (t, b, c, d) { @@ -13558,13 +15332,13 @@ Ext.extend(Ext.util.ClickRepeater, Ext.util.Observable, { }, // private - handleMouseUp : function(){ + handleMouseUp : function(e){ clearTimeout(this.timer); this.el.un("mouseover", this.handleMouseReturn, this); this.el.un("mouseout", this.handleMouseOut, this); Ext.getDoc().un("mouseup", this.handleMouseUp, this); this.el.removeClass(this.pressClass); - this.fireEvent("mouseup", this); + this.fireEvent("mouseup", this, e); } });/** * @class Ext.KeyNav @@ -13623,8 +15397,8 @@ Ext.KeyNav.prototype = { // private relay : function(e){ - var k = e.getKey(); - var h = this.keyToHandler[k]; + var k = e.getKey(), + h = this.keyToHandler[k]; if(h && this[h]){ if(this.doRelay(e, this[h], h) !== true){ e[this.defaultEventAction](); @@ -13634,7 +15408,7 @@ Ext.KeyNav.prototype = { // private doRelay : function(e, h, hname){ - return h.call(this.scope || this, e); + return h.call(this.scope || this, e, hname); }, // possible handlers @@ -13650,6 +15424,7 @@ Ext.KeyNav.prototype = { del : false, home : false, end : false, + space : false, // quick lookup hash keyToHandler : { @@ -13664,7 +15439,8 @@ Ext.KeyNav.prototype = { 35 : "end", 13 : "enter", 27 : "esc", - 9 : "tab" + 9 : "tab", + 32 : "space" }, stopKeyUp: function(e) { @@ -14226,7 +16002,8 @@ function generateError(data) { Ext.Error = function(message) { // Try to read the message from Ext.Error.lang this.message = (this.lang[message]) ? this.lang[message] : message; -} +}; + Ext.Error.prototype = new Error(); Ext.apply(Ext.Error.prototype, { // protected. Extensions place their error-strings here. @@ -14255,7 +16032,6 @@ Ext.apply(Ext.Error.prototype, { return Ext.encode(this); } }); - /** * @class Ext.ComponentMgr *

    Provides a registry of all Components (instances of {@link Ext.Component} or any subclass @@ -14478,10 +16254,11 @@ editorgrid {@link Ext.grid.EditorGridPanel} flash {@link Ext.FlashComponent} grid {@link Ext.grid.GridPanel} listview {@link Ext.ListView} +multislider {@link Ext.slider.MultiSlider} panel {@link Ext.Panel} progress {@link Ext.ProgressBar} propertygrid {@link Ext.grid.PropertyGrid} -slider {@link Ext.Slider} +slider {@link Ext.slider.SingleSlider} spacer {@link Ext.Spacer} splitbutton {@link Ext.SplitButton} tabpanel {@link Ext.TabPanel} @@ -14518,6 +16295,7 @@ form {@link Ext.form.FormPanel} checkbox {@link Ext.form.Checkbox} checkboxgroup {@link Ext.form.CheckboxGroup} combo {@link Ext.form.ComboBox} +compositefield {@link Ext.form.CompositeField} datefield {@link Ext.form.DateField} displayfield {@link Ext.form.DisplayField} field {@link Ext.form.Field} @@ -15278,6 +17056,14 @@ new Ext.Panel({ * update the content area of the Component. */ + /** + * @cfg {Array} bubbleEvents + *

    An array of events that, when fired, should be bubbled to any parent container. + * See {@link Ext.util.Observable#enableBubble}. + * Defaults to []. + */ + bubbleEvents: [], + // private ctype : 'Ext.Component', @@ -15331,7 +17117,22 @@ Ext.Foo = Ext.extend(Ext.Bar, { } */ - initComponent : Ext.emptyFn, + initComponent : function(){ + /* + * this is double processing, however it allows people to be able to do + * Ext.apply(this, { + * listeners: { + * //here + * } + * }); + * MyClass.superclass.initComponent.call(this); + */ + if(this.listeners){ + this.on(this.listeners); + delete this.listeners; + } + this.enableBubble(this.bubbleEvents); + }, /** *

    Render this Component into the passed HTML element.

    @@ -15706,6 +17507,10 @@ var myGrid = new Ext.grid.EditorGridPanel({ this.container.remove(); } } + // Stop any buffered tasks + if(this.focusTask && this.focusTask.cancel){ + this.focusTask.cancel(); + } this.onDestroy(); Ext.ComponentMgr.unregister(this); this.fireEvent('destroy', this); @@ -15788,10 +17593,11 @@ new Ext.Panel({ */ focus : function(selectText, delay){ if(delay){ - this.focus.defer(Ext.isNumber(delay) ? delay : 10, this, [selectText, false]); - return; + this.focusTask = new Ext.util.DelayedTask(this.focus, this, [selectText, false]); + this.focusTask.delay(Ext.isNumber(delay) ? delay : 10); + return this; } - if(this.rendered){ + if(this.rendered && !this.isDestroyed){ this.el.focus(); if(selectText === true){ this.el.dom.select(); @@ -15972,7 +17778,13 @@ var isText = t.isXType('textfield'); // true var isBoxSubclass = t.isXType('box'); // true, descended from BoxComponent var isBoxInstance = t.isXType('box', true); // false, not a direct BoxComponent instance - * @param {String} xtype The xtype to check for this Component + * @param {String/Ext.Component/Class} xtype The xtype to check for this Component. Note that the the component can either be an instance + * or a component class: + *
    
    +var c = new Ext.Component();
    +console.log(c.isXType(c));
    +console.log(c.isXType(Ext.Component));
    +
    * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is * the default), or true to check whether this Component is directly of the specified xtype. * @return {Boolean} True if this component descends from the specified xtype, false otherwise. @@ -16027,17 +17839,37 @@ alert(t.getXTypes()); // alerts 'component/box/field/textfield' /** * 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 + * @param {String/Ext.Component/Class} xtype The xtype to check for this Component. Note that the the component can either be an instance + * or a component class: + * @param {Boolean} shallow (optional) False to check whether this Component is descended from the xtype (this is + * the default), or true to check whether this Component is directly of the specified xtype. * @return {Ext.Container} The first Container which matches the given xtype or class */ - findParentByType : function(xtype) { - return Ext.isFunction(xtype) ? - this.findParentBy(function(p){ - return p.constructor === xtype; - }) : - this.findParentBy(function(p){ - return p.constructor.xtype === xtype; - }); + findParentByType : function(xtype, shallow){ + return this.findParentBy(function(c){ + return c.isXType(xtype, shallow); + }); + }, + + /** + * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of + * function call will be the scope provided or the current component. The arguments to the function + * will be the args provided or the current component. If the function returns false at any point, + * the bubble is stopped. + * @param {Function} fn The function to call + * @param {Object} scope (optional) The scope of the function (defaults to current node) + * @param {Array} args (optional) The args to call the function with (default to passing the current component) + * @return {Ext.Component} this + */ + bubble : function(fn, scope, args){ + var p = this; + while(p){ + if(fn.apply(scope || p, args || [p]) === false){ + break; + } + p = p.ownerCt; + } + return this; }, // protected @@ -16183,7 +18015,8 @@ myGridPanel.mon(myGridPanel.getSelectionModel(), { } }); -Ext.reg('component', Ext.Component);/** +Ext.reg('component', Ext.Component); +/** * @class Ext.Action *

    An Action is a piece of reusable functionality that can be abstracted out of any particular component so that it * can be usefully shared among multiple components. Actions let you share handlers, configuration options and UI @@ -16453,9 +18286,10 @@ Ext.Action = Ext.extend(Object, { (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){ + var dh = Ext.DomHelper, + cp = config.parentEl, pel = cp ? Ext.getDom(cp) : document.body; + + if (existingEl) { this.dom = Ext.getDom(existingEl); } if(!this.dom){ @@ -16542,8 +18376,10 @@ Ext.extend(Ext.Layer, Ext.Element, { enableShadow : function(show){ if(this.shadow){ this.shadowDisabled = false; - this.shadowOffset = this.lastShadowOffset; - delete this.lastShadowOffset; + if(Ext.isDefined(this.lastShadowOffset)) { + this.shadowOffset = this.lastShadowOffset; + delete this.lastShadowOffset; + } if(show){ this.sync(true); } @@ -16554,41 +18390,39 @@ Ext.extend(Ext.Layer, Ext.Element, { // 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), + var shadow = this.shadow; + if(!this.updating && this.isVisible() && (shadow || this.useShim)){ + var shim = this.getShim(), + w = this.getWidth(), + h = this.getHeight(), + l = this.getLeft(true), t = this.getTop(true); - if(sw && !this.shadowDisabled){ - if(doShow && !sw.isVisible()){ - sw.show(this); + if(shadow && !this.shadowDisabled){ + if(doShow && !shadow.isVisible()){ + shadow.show(this); }else{ - sw.realign(l, t, w, h); + shadow.realign(l, t, w, h); } - if(sh){ + if(shim){ if(doShow){ - sh.show(); + shim.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'; + var shadowAdj = shadow.el.getXY(), shimStyle = shim.dom.style, + shadowSize = shadow.el.getSize(); + shimStyle.left = (shadowAdj[0])+'px'; + shimStyle.top = (shadowAdj[1])+'px'; + shimStyle.width = (shadowSize.width)+'px'; + shimStyle.height = (shadowSize.height)+'px'; } - }else if(sh){ + }else if(shim){ if(doShow){ - sh.show(); + shim.show(); } - sh.setSize(w, h); - sh.setLeftTop(l, t); + shim.setSize(w, h); + shim.setLeftTop(l, t); } - } }, @@ -16673,6 +18507,10 @@ Ext.extend(Ext.Layer, Ext.Element, { return this; }, + getConstrainOffset : function(){ + return this.shadowOffset; + }, + isVisible : function(){ return this.visible; }, @@ -16899,19 +18737,23 @@ Ext.extend(Ext.Layer, Ext.Element, { * Create a new Shadow * @param {Object} config The config object */ -Ext.Shadow = function(config){ +Ext.Shadow = function(config) { Ext.apply(this, config); - if(typeof this.mode != "string"){ + if (typeof this.mode != "string") { this.mode = this.defaultMode; } - var o = this.offset, a = {h: 0}; - var rad = Math.floor(this.offset/2); - switch(this.mode.toLowerCase()){ // all this hideous nonsense calculates the various offsets for shadows + var o = this.offset, + a = { + h: 0 + }, + rad = Math.floor(this.offset / 2); + switch (this.mode.toLowerCase()) { + // all this hideous nonsense calculates the various offsets for shadows case "drop": a.w = 0; a.l = a.t = o; a.t -= 1; - if(Ext.isIE){ + if (Ext.isIE) { a.l -= this.offset + rad; a.t -= this.offset + rad; a.w -= rad; @@ -16920,24 +18762,24 @@ Ext.Shadow = function(config){ } break; case "sides": - a.w = (o*2); + a.w = (o * 2); a.l = -o; - a.t = o-1; - if(Ext.isIE){ + 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 -= (this.offset - rad) * 2; a.w -= rad + 1; a.h -= 1; } break; case "frame": - a.w = a.h = (o*2); + a.w = a.h = (o * 2); a.l = a.t = -o; a.t += 1; a.h -= 2; - if(Ext.isIE){ + if (Ext.isIE) { a.l -= (this.offset - rad); a.t -= (this.offset - rad); a.l += 1; @@ -16973,23 +18815,23 @@ Ext.Shadow.prototype = { * Displays the shadow under the target element * @param {Mixed} targetEl The id or element under which the shadow should display */ - show : function(target){ + show: function(target) { target = Ext.get(target); - if(!this.el){ + if (!this.el) { this.el = Ext.Shadow.Pool.pull(); - if(this.el.dom.nextSibling != target.dom){ + 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.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() + target.getLeft(true), + target.getTop(true), + target.getWidth(), + target.getHeight() ); this.el.dom.style.display = "block"; }, @@ -16997,8 +18839,8 @@ Ext.Shadow.prototype = { /** * Returns true if the shadow is visible, else false */ - isVisible : function(){ - return this.el ? true : false; + isVisible: function() { + return this.el ? true: false; }, /** @@ -17009,25 +18851,32 @@ Ext.Shadow.prototype = { * @param {Number} width The target element width * @param {Number} height The target element height */ - realign : function(l, t, w, h){ - if(!this.el){ + 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){ + var a = this.adjusts, + d = this.el.dom, + s = d.style, + iea = 0, + sw = (w + a.w), + sh = (h + a.h), + sws = sw + "px", + shs = sh + "px", + cn, + sww; + s.left = (l + a.l) + "px"; + s.top = (t + a.t) + "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"; + if (!Ext.isIE) { + cn = d.childNodes; + 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"; + cn[1].style.height = Math.max(0, (sh - 12)) + "px"; } } }, @@ -17035,8 +18884,8 @@ Ext.Shadow.prototype = { /** * Hides this shadow */ - hide : function(){ - if(this.el){ + hide: function() { + if (this.el) { this.el.dom.style.display = "none"; Ext.Shadow.Pool.push(this.el); delete this.el; @@ -17047,31 +18896,31 @@ Ext.Shadow.prototype = { * Adjust the z-index of this shadow * @param {Number} zindex The new z-index */ - setZIndex : function(z){ + setZIndex: function(z) { this.zIndex = z; - if(this.el){ + if (this.el) { this.el.setStyle("z-index", z); } } }; // Private utility class that manages the internal Shadow cache -Ext.Shadow.Pool = function(){ - var p = []; - var markup = Ext.isIE ? - '

    ' : - '
    '; +Ext.Shadow.Pool = function() { + var p = [], + markup = Ext.isIE ? + '
    ': + '
    '; return { - pull : function(){ + pull: function() { var sh = p.shift(); - if(!sh){ + if (!sh) { sh = Ext.get(Ext.DomHelper.insertHtml("beforeBegin", document.body.firstChild, markup)); sh.autoBoxAdjust = false; } return sh; }, - push : function(sh){ + push: function(sh) { p.push(sh); } }; @@ -17350,7 +19199,8 @@ var myPanel = new Ext.Panel({ // support for standard size objects if(typeof w == 'object'){ - h = w.height, w = w.width; + h = w.height; + w = w.width; } if (Ext.isDefined(w) && Ext.isDefined(this.boxMinWidth) && (w < this.boxMinWidth)) { w = this.boxMinWidth; @@ -17366,7 +19216,8 @@ var myPanel = new Ext.Panel({ } // not rendered if(!this.boxReady){ - this.width = w, this.height = h; + this.width = w; + this.height = h; return this; } @@ -17396,8 +19247,8 @@ var myPanel = new Ext.Panel({ /** * Sets the width of the component. This method fires the {@link #resize} event. - * @param {Number} width The new width to setThis may be one of:
      - *
    • A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).
    • + * @param {Mixed} width The new width to set. This may be one of:
        + *
      • A Number specifying the new width in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit defaultUnit}s (by default, pixels).
      • *
      • A String used to set the CSS width style.
      • *
      * @return {Ext.BoxComponent} this @@ -17408,8 +19259,8 @@ var myPanel = new Ext.Panel({ /** * Sets the height of the component. This method fires the {@link #resize} event. - * @param {Number} height The new height to set. This may be one of:
        - *
      • A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit}s (by default, pixels).
      • + * @param {Mixed} height The new height to set. This may be one of:
          + *
        • A Number specifying the new height in the {@link #getEl Element}'s {@link Ext.Element#defaultUnit defaultUnit}s (by default, pixels).
        • *
        • A String used to set the CSS height style.
        • *
        • undefined to leave the height unchanged.
        • *
        @@ -18359,7 +20210,6 @@ layoutConfig: { * the frequency it calculates and does a re-layout of components. This is useful for heavy containers or containers * with a large quantity of sub-components for which frequent layout calls would be expensive. Defaults to 50. */ - // Deprecated - will be removed in 3.2.x bufferResize: 50, /** @@ -18524,8 +20374,6 @@ items: [ 'remove' ); - this.enableBubble(this.bubbleEvents); - /** * The collection of components in this container as a {@link Ext.util.MixedCollection} * @type MixedCollection @@ -18551,8 +20399,8 @@ items: [ if(this.layout && this.layout != layout){ this.layout.setContainer(null); } - this.initItems(); this.layout = layout; + this.initItems(); layout.setContainer(this); }, @@ -18573,7 +20421,7 @@ items: [ this.setLayout(this.layout); // If a CardLayout, the active item set - if(this.activeItem !== undefined){ + if(this.activeItem !== undefined && this.layout.setActiveItem){ var item = this.activeItem; delete this.activeItem; this.layout.setActiveItem(item); @@ -18633,12 +20481,10 @@ tb.{@link #doLayout}(); // refresh the layout * may not be removed or added. See the Notes for {@link Ext.layout.BorderLayout BorderLayout} * for more details. *
      - * @param {Object/Array} component - *

      Either a single component or an Array of components to add. See + * @param {...Object/Array} component + *

      Either one or more Components to add or an Array of Components to add. See * {@link #items} for additional information.

      - * @param {Object} (Optional) component_2 - * @param {Object} (Optional) component_n - * @return {Ext.Component} component The Component (or config object) that was added. + * @return {Ext.Component/Array} The Components that were added. */ add : function(comp){ this.initItems(); @@ -18696,20 +20542,26 @@ tb.{@link #doLayout}(); // refresh the layout * @return {Ext.Component} component The Component (or config object) that was * inserted with the Container's default config values applied. */ - insert : function(index, comp){ + insert : function(index, comp) { + var args = arguments, + length = args.length, + result = [], + i, c; + this.initItems(); - var a = arguments, len = a.length; - if(len > 2){ - var result = []; - for(var i = len-1; i >= 1; --i) { - result.push(this.insert(index, a[i])); + + if (length > 2) { + for (i = length - 1; i >= 1; --i) { + result.push(this.insert(index, args[i])); } return result; } - var c = this.lookupComponent(this.applyDefaults(comp)); + + c = this.lookupComponent(this.applyDefaults(comp)); index = Math.min(index, this.items.length); - if(this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false){ - if(c.ownerCt == this){ + + if (this.fireEvent('beforeadd', this, c, index) !== false && this.onBeforeAdd(c) !== false) { + if (c.ownerCt == this) { this.items.remove(c); } this.items.insert(index, c); @@ -18717,6 +20569,7 @@ tb.{@link #doLayout}(); // refresh the layout this.onAdd(c); this.fireEvent('add', this, c, index); } + return c; }, @@ -18731,7 +20584,7 @@ tb.{@link #doLayout}(); // refresh the layout c = Ext.ComponentMgr.get(c); Ext.apply(c, d); }else if(!c.events){ - Ext.applyIf(c, d); + Ext.applyIf(c.isAction ? c.initialConfig : c, d); }else{ Ext.apply(c, d); } @@ -18844,21 +20697,24 @@ tb.{@link #doLayout}(); // refresh the layout // private createComponent : function(config, defaultType){ + if (config.render) { + return config; + } // add in ownerCt at creation time but then immediately // remove so that onBeforeAdd can handle it - var c = config.render ? config : Ext.create(Ext.apply({ + var c = Ext.create(Ext.apply({ ownerCt: this }, config), defaultType || this.defaultType); + delete c.initialConfig.ownerCt; delete c.ownerCt; return c; }, /** - * We can only lay out if there is a view area in which to layout. - * display:none on the layout target, *or any of its parent elements* will mean it has no view area. - */ - - // private + * @private + * We can only lay out if there is a view area in which to layout. + * display:none on the layout target, *or any of its parent elements* will mean it has no view area. + */ canLayout : function() { var el = this.getVisibilityEl(); return el && el.dom && !el.isStyle("display", "none"); @@ -18954,7 +20810,7 @@ tb.{@link #doLayout}(); // refresh the layout */ getLayout : function(){ if(!this.layout){ - var layout = new Ext.layout.ContainerLayout(this.layoutConfig); + var layout = new Ext.layout.AutoLayout(this.layoutConfig); this.setLayout(layout); } return this.layout; @@ -18975,27 +20831,6 @@ tb.{@link #doLayout}(); // refresh the layout Ext.Container.superclass.beforeDestroy.call(this); }, - /** - * Bubbles up the component/container heirarchy, calling the specified function with each component. The scope (this) of - * function call will be the scope provided or the current component. The arguments to the function - * will be the args provided or the current component. If the function returns false at any point, - * the bubble is stopped. - * @param {Function} fn The function to call - * @param {Object} scope (optional) The scope of the function (defaults to current node) - * @param {Array} args (optional) The args to call the function with (default to passing the current component) - * @return {Ext.Container} this - */ - bubble : function(fn, scope, args){ - var p = this; - while(p){ - if(fn.apply(scope || p, args || [p]) === false){ - break; - } - p = p.ownerCt; - } - return this; - }, - /** * Cascades down the component/container heirarchy from this component (called first), calling the specified function with * each component. The scope (this) of @@ -19026,17 +20861,20 @@ tb.{@link #doLayout}(); // refresh the layout /** * Find a component under this container at any level by id * @param {String} id + * @deprecated Fairly useless method, since you can just use Ext.getCmp. Should be removed for 4.0 + * If you need to test if an id belongs to a container, you can use getCmp and findParent*. * @return Ext.Component */ findById : function(id){ - var m, ct = this; + var m = null, + ct = this; this.cascade(function(c){ if(ct != c && c.id === id){ m = c; return false; } }); - return m || null; + return m; }, /** @@ -19084,10 +20922,11 @@ tb.{@link #doLayout}(); // refresh the layout /** * Get a component contained by this container (alias for items.get(key)) * @param {String/Number} key The index or id of the component + * @deprecated Should be removed in 4.0, since getComponent does the same thing. * @return {Ext.Component} Ext.Component */ get : function(key){ - return this.items.get(key); + return this.getComponent(key); } }); @@ -19204,19 +21043,27 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { } }, - // private + /** + * @private + * Renders the given Component into the target Element. If the Component is already rendered, + * it is moved to the provided target instead. + * @param {Ext.Component} c The Component to render + * @param {Number} position The position within the target to render the item to + * @param {Ext.Element} target The target Element + */ renderItem : function(c, position, target){ - if(c){ - if(!c.rendered){ + if (c) { + if (!c.rendered) { c.render(target, position); - this.configureItem(c, position); - }else if(!this.isValidParent(c, target)){ - if(Ext.isNumber(position)){ + this.configureItem(c); + } else if (!this.isValidParent(c, target)) { + if (Ext.isNumber(position)) { position = target.dom.childNodes[position]; } + target.dom.insertBefore(c.getPositionEl().dom, position || null); c.container = target; - this.configureItem(c, position); + this.configureItem(c); } } }, @@ -19226,21 +21073,25 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { getRenderedItems: function(ct){ var t = ct.getLayoutTarget(), cti = ct.items.items, len = cti.length, i, c, items = []; for (i = 0; i < len; i++) { - if((c = cti[i]).rendered && this.isValidParent(c, t)){ + if((c = cti[i]).rendered && this.isValidParent(c, t) && c.shouldLayout !== false){ items.push(c); } }; return items; }, - // private - configureItem: function(c, position){ - if(this.extraCls){ + /** + * @private + * Applies extraCls and hides the item if renderHidden is true + */ + configureItem: function(c){ + if (this.extraCls) { var t = c.getPositionEl ? c.getPositionEl() : c; t.addClass(this.extraCls); } + // If we are forcing a layout, do so *before* we hide so elements have height/width - if(c.doLayout && this.forceLayout){ + if (c.doLayout && this.forceLayout) { c.doLayout(); } if (this.renderHidden && c != this.activeItem) { @@ -19249,10 +21100,10 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { }, onRemove: function(c){ - if(this.activeItem == c){ + if(this.activeItem == c){ delete this.activeItem; - } - if(c.rendered && this.extraCls){ + } + if(c.rendered && this.extraCls){ var t = c.getPositionEl ? c.getPositionEl() : c; t.removeClass(this.extraCls); } @@ -19272,16 +21123,13 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { if(ct.collapsed){ return; } - if(b = ct.bufferResize){ - // Only allow if we should buffer the layout - if(ct.shouldBufferLayout()){ - if(!this.resizeTask){ - this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this); - this.resizeBuffer = Ext.isNumber(b) ? b : 50; - } - ct.layoutPending = true; - this.resizeTask.delay(this.resizeBuffer); + if(b = ct.bufferResize && ct.shouldBufferLayout()){ + if(!this.resizeTask){ + this.resizeTask = new Ext.util.DelayedTask(this.runLayout, this); + this.resizeBuffer = Ext.isNumber(b) ? b : 50; } + ct.layoutPending = true; + this.resizeTask.delay(this.resizeBuffer); }else{ this.runLayout(); } @@ -19289,27 +21137,20 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { runLayout: function(){ var ct = this.container; - // AutoLayout is known to require the recursive doLayout call, others need this currently (BorderLayout for example) - // but shouldn't. A more extensive review will take place for 3.2 which requires a ContainerMgr with hierarchy lookups. - //this.layout(); - //ct.onLayout(); - ct.doLayout(); + this.layout(); + ct.onLayout(); delete ct.layoutPending; }, // private setContainer : function(ct){ - if (!Ext.LayoutManager) { - Ext.LayoutManager = {}; - } - - /* This monitorResize flag will be renamed soon as to avoid confusion - * with the Container version which hooks onWindowResize to doLayout - * - * monitorResize flag in this context attaches the resize event between - * a container and it's layout - */ - + /** + * This monitorResize flag will be renamed soon as to avoid confusion + * with the Container version which hooks onWindowResize to doLayout + * + * monitorResize flag in this context attaches the resize event between + * a container and it's layout + */ if(this.monitorResize && ct != this.container){ var old = this.container; if(old){ @@ -19322,26 +21163,33 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { this.container = ct; }, - // private + /** + * Parses a number or string representing margin sizes into an object. Supports CSS-style margin declarations + * (e.g. 10, "10", "10 10", "10 10 10" and "10 10 10 10" are all valid options and would return the same result) + * @param {Number|String} v The encoded margins + * @return {Object} An object with margin sizes for top, right, bottom and left + */ parseMargins : function(v){ - if(Ext.isNumber(v)){ + if (Ext.isNumber(v)) { v = v.toString(); } - var ms = v.split(' '); - var len = ms.length; - if(len == 1){ + var ms = v.split(' '), + len = ms.length; + + if (len == 1) { ms[1] = ms[2] = ms[3] = ms[0]; - } else if(len == 2){ + } else if(len == 2) { ms[2] = ms[0]; ms[3] = ms[1]; - } else if(len == 3){ + } else if(len == 3) { ms[3] = ms[1]; } + return { - top:parseInt(ms[0], 10) || 0, - right:parseInt(ms[1], 10) || 0, + top :parseInt(ms[0], 10) || 0, + right :parseInt(ms[1], 10) || 0, bottom:parseInt(ms[2], 10) || 0, - left:parseInt(ms[3], 10) || 0 + left :parseInt(ms[3], 10) || 0 }; }, @@ -19372,6 +21220,13 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { * @protected */ destroy : function(){ + // Stop any buffered layout tasks + if(this.resizeTask && this.resizeTask.cancel){ + this.resizeTask.cancel(); + } + if(this.container) { + this.container.un(this.container.resizeEvent, this.onResize, this); + } if(!Ext.isEmpty(this.targetCls)){ var target = this.container.getLayoutTarget(); if(target){ @@ -19383,16 +21238,24 @@ Ext.layout.ContainerLayout = Ext.extend(Object, { * @class Ext.layout.AutoLayout *

      The AutoLayout is the default layout manager delegated by {@link Ext.Container} to * render any child Components when no {@link Ext.Container#layout layout} is configured into - * a {@link Ext.Container Container}. ContainerLayout provides the basic foundation for all other layout - * classes in Ext. It simply renders all child Components into the Container, performing no sizing or - * positioning services. To utilize a layout that provides sizing and positioning of child Components, - * specify an appropriate {@link Ext.Container#layout layout}.

      + * a {@link Ext.Container Container}.. AutoLayout provides only a passthrough of any layout calls + * to any child containers.

      */ Ext.layout.AutoLayout = Ext.extend(Ext.layout.ContainerLayout, { - runLayout: function(){ - var ct = this.container; - ct.doLayout(); - delete ct.layoutPending; + type: 'auto', + + monitorResize: true, + + onLayout : function(ct, target){ + Ext.layout.AutoLayout.superclass.onLayout.call(this, ct, target); + var cs = this.getRenderedItems(ct), len = cs.length, i, c; + for(i = 0; i < len; i++){ + c = cs[i]; + if (c.doLayout){ + // Shallow layout children + c.doLayout(true); + } + } } }); @@ -19537,10 +21400,6 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { type: 'card', - constructor: function(config){ - Ext.layout.CardLayout.superclass.constructor.call(this, config); - }, - /** * Sets the active (visible) item in the layout. * @param {String/Number} item The string component id or numeric index of the item to activate @@ -19561,6 +21420,9 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { } ai.fireEvent('deactivate', ai); } + + var layout = item.doLayout && (this.layoutOnCardChange || !item.rendered); + // Change activeItem reference this.activeItem = item; @@ -19573,7 +21435,7 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { this.layout(); - if(item.doLayout){ + if(layout){ item.doLayout(); } item.fireEvent('activate', item); @@ -19589,7 +21451,8 @@ Ext.layout.CardLayout = Ext.extend(Ext.layout.FitLayout, { } } }); -Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout;/** +Ext.Container.LAYOUTS['card'] = Ext.layout.CardLayout; +/** * @class Ext.layout.AnchorLayout * @extends Ext.layout.ContainerLayout *

      This is a layout that enables anchoring of contained elements relative to the container's dimensions. @@ -19676,95 +21539,157 @@ anchor: '-50 75%' */ // private - monitorResize:true, - type: 'anchor', + monitorResize : true, + + type : 'anchor', + + /** + * @cfg {String} defaultAnchor + * + * default anchor for all child container items applied if no anchor or specific width is set on the child item. Defaults to '100%'. + * + */ + defaultAnchor : '100%', + + parseAnchorRE : /^(r|right|b|bottom)$/i, + getLayoutTargetSize : function() { - var target = this.container.getLayoutTarget(); - if (!target) { - return {}; + var target = this.container.getLayoutTarget(), ret = {}; + if (target) { + ret = target.getViewSize(); + + // IE in strict mode will return a width of 0 on the 1st pass of getViewSize. + // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly + // with getViewSize + if (Ext.isIE && Ext.isStrict && ret.width == 0){ + ret = target.getStyleSize(); + } + ret.width -= target.getPadding('lr'); + ret.height -= target.getPadding('tb'); } - // Style Sized (scrollbars not included) - return target.getStyleSize(); + return ret; }, // private - onLayout : function(ct, target){ - Ext.layout.AnchorLayout.superclass.onLayout.call(this, ct, target); - var size = this.getLayoutTargetSize(); + onLayout : function(container, target) { + Ext.layout.AnchorLayout.superclass.onLayout.call(this, container, target); - var w = size.width, h = size.height; + var size = this.getLayoutTargetSize(), + containerWidth = size.width, + containerHeight = size.height, + overflow = target.getStyle('overflow'), + components = this.getRenderedItems(container), + len = components.length, + boxes = [], + box, + anchorWidth, + anchorHeight, + component, + anchorSpec, + calcWidth, + calcHeight, + anchorsArray, + totalHeight = 0, + i, + el; - if(w < 20 && h < 20){ + if(containerWidth < 20 && containerHeight < 20){ return; } // find the container anchoring size - var aw, ah; - if(ct.anchorSize){ - if(typeof ct.anchorSize == 'number'){ - aw = ct.anchorSize; - }else{ - aw = ct.anchorSize.width; - ah = ct.anchorSize.height; + if(container.anchorSize) { + if(typeof container.anchorSize == 'number') { + anchorWidth = container.anchorSize; + } else { + anchorWidth = container.anchorSize.width; + anchorHeight = container.anchorSize.height; } - }else{ - aw = ct.initialConfig.width; - ah = ct.initialConfig.height; + } else { + anchorWidth = container.initialConfig.width; + anchorHeight = container.initialConfig.height; } - var cs = this.getRenderedItems(ct), len = cs.length, i, c, a, cw, ch, el, vs; - for(i = 0; i < len; i++){ - c = cs[i]; - el = c.getPositionEl(); - if(c.anchor){ - a = c.anchorSpec; - if(!a){ // cache all anchor values - 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) + for(i = 0; i < len; i++) { + component = components[i]; + el = component.getPositionEl(); + + // If a child container item has no anchor and no specific width, set the child to the default anchor size + if (!component.anchor && component.items && !Ext.isNumber(component.width) && !(Ext.isIE6 && Ext.isStrict)){ + component.anchor = this.defaultAnchor; + } + + if(component.anchor) { + anchorSpec = component.anchorSpec; + // cache all anchor values + if(!anchorSpec){ + anchorsArray = component.anchor.split(' '); + component.anchorSpec = anchorSpec = { + right: this.parseAnchor(anchorsArray[0], component.initialConfig.width, anchorWidth), + bottom: this.parseAnchor(anchorsArray[1], component.initialConfig.height, anchorHeight) }; } - cw = a.right ? this.adjustWidthAnchor(a.right(w) - el.getMargins('lr'), c) : undefined; - ch = a.bottom ? this.adjustHeightAnchor(a.bottom(h) - el.getMargins('tb'), c) : undefined; + calcWidth = anchorSpec.right ? this.adjustWidthAnchor(anchorSpec.right(containerWidth) - el.getMargins('lr'), component) : undefined; + calcHeight = anchorSpec.bottom ? this.adjustHeightAnchor(anchorSpec.bottom(containerHeight) - el.getMargins('tb'), component) : undefined; - if(cw || ch){ - c.setSize(cw || undefined, ch || undefined); + if(calcWidth || calcHeight) { + boxes.push({ + component: component, + width: calcWidth || undefined, + height: calcHeight || undefined + }); } } } + for (i = 0, len = boxes.length; i < len; i++) { + box = boxes[i]; + box.component.setSize(box.width, box.height); + } + + if (overflow && overflow != 'hidden' && !this.adjustmentPass) { + var newTargetSize = this.getLayoutTargetSize(); + if (newTargetSize.width != size.width || newTargetSize.height != size.height){ + this.adjustmentPass = true; + this.onLayout(container, target); + } + } + + delete this.adjustmentPass; }, // private - parseAnchor : function(a, start, cstart){ - if(a && a != 'none'){ + parseAnchor : function(a, start, cstart) { + if (a && a != 'none') { var last; - if(/^(r|right|b|bottom)$/i.test(a)){ // standard anchor + // standard anchor + if (this.parseAnchorRE.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; // percentage + }; + // percentage + } 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{ + }; + // simple offset adjustment + } else { a = parseInt(a, 10); - if(!isNaN(a)){ // simple offset adjustment - return function(v){ - if(v !== last){ + if (!isNaN(a)) { + return function(v) { + if (v !== last) { last = v; return v + a; } - } + }; } } } @@ -19867,6 +21792,14 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { var target = this.container.getLayoutTarget(), ret; if (target) { ret = target.getViewSize(); + + // IE in strict mode will return a width of 0 on the 1st pass of getViewSize. + // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly + // with getViewSize + if (Ext.isIE && Ext.isStrict && ret.width == 0){ + ret = target.getStyleSize(); + } + ret.width -= target.getPadding('lr'); ret.height -= target.getPadding('tb'); } @@ -19885,7 +21818,12 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { // private onLayout : function(ct, target){ - var cs = ct.items.items, len = cs.length, c, i; + var cs = ct.items.items, + len = cs.length, + c, + i, + m, + margins = []; this.renderAll(ct, target); @@ -19906,8 +21844,10 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { for(i = 0; i < len; i++){ c = cs[i]; + m = c.getPositionEl().getMargins('lr'); + margins[i] = m; if(!c.columnWidth){ - pw -= (c.getWidth() + c.getPositionEl().getMargins('lr')); + pw -= (c.getWidth() + m); } } @@ -19915,8 +21855,9 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { for(i = 0; i < len; i++){ c = cs[i]; + m = margins[i]; if(c.columnWidth){ - c.setSize(Math.floor(c.columnWidth * pw) - c.getPositionEl().getMargins('lr')); + c.setSize(Math.floor(c.columnWidth * pw) - m); } } @@ -19940,7 +21881,8 @@ Ext.layout.ColumnLayout = Ext.extend(Ext.layout.ContainerLayout, { */ }); -Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout;/** +Ext.Container.LAYOUTS['column'] = Ext.layout.ColumnLayout; +/** * @class Ext.layout.BorderLayout * @extends Ext.layout.ContainerLayout *

      This is a multi-pane, application-oriented UI layout style that supports multiple @@ -20427,7 +22369,7 @@ Ext.layout.BorderLayout.Region.prototype = { this.collapsedEl.on('click', this.onExpandClick, this, {stopEvent:true}); }else { if(this.collapsible !== false && !this.hideCollapseTool) { - var t = this.toolTemplate.append( + var t = this.expandToolEl = this.toolTemplate.append( this.collapsedEl.dom, {id:'expand-'+this.position}, true); t.addClassOnOver('x-tool-expand-'+this.position+'-over'); @@ -20624,15 +22566,15 @@ Ext.layout.BorderLayout.Region.prototype = { initAutoHide : function(){ if(this.autoHide !== false){ if(!this.autoHideHd){ - var st = new Ext.util.DelayedTask(this.slideIn, this); + this.autoHideSlideTask = new Ext.util.DelayedTask(this.slideIn, this); this.autoHideHd = { "mouseout": function(e){ if(!e.within(this.el, true)){ - st.delay(500); + this.autoHideSlideTask.delay(500); } }, "mouseover" : function(e){ - st.cancel(); + this.autoHideSlideTask.cancel(); }, scope : this }; @@ -20843,7 +22785,10 @@ Ext.layout.BorderLayout.Region.prototype = { }, destroy : function(){ - Ext.destroy(this.miniCollapsedEl, this.collapsedEl); + if (this.autoHideSlideTask && this.autoHideSlideTask.cancel){ + this.autoHideSlideTask.cancel(); + } + Ext.destroyMembers(this, 'miniCollapsedEl', 'collapsedEl', 'expandToolEl'); } }; @@ -21081,7 +23026,8 @@ Ext.extend(Ext.layout.BorderLayout.SplitRegion, Ext.layout.BorderLayout.Region, } }); -Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout;/** +Ext.Container.LAYOUTS['border'] = Ext.layout.BorderLayout; +/** * @class Ext.layout.FormLayout * @extends Ext.layout.AnchorLayout *

      This layout manager is specifically designed for rendering and managing child Components of @@ -21194,13 +23140,12 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { /** * @cfg {Boolean} trackLabels - * True to show/hide the field label when the field is hidden. Defaults to false. + * True to show/hide the field label when the field is hidden. Defaults to true. */ - trackLabels: false, + trackLabels: true, type: 'form', - onRemove: function(c){ Ext.layout.FormLayout.superclass.onRemove.call(this, c); if(this.trackLabels){ @@ -21209,14 +23154,14 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { } // check for itemCt, since we may be removing a fieldset or something similar var el = c.getPositionEl(), - ct = c.getItemCt && c.getItemCt(); - if(c.rendered && ct){ + ct = c.getItemCt && c.getItemCt(); + if (c.rendered && ct) { if (el && el.dom) { el.insertAfter(ct); } Ext.destroy(ct); Ext.destroyMembers(c, 'label', 'itemCt'); - if(c.customItemCt){ + if (c.customItemCt) { Ext.destroyMembers(c, 'getItemCt', 'customItemCt'); } } @@ -21236,7 +23181,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { labelAdjust: 0 }); }else{ - this.labelSeparator = ct.labelSeparator || this.labelSeparator; + this.labelSeparator = Ext.isDefined(ct.labelSeparator) ? ct.labelSeparator : this.labelSeparator; ct.labelWidth = ct.labelWidth || 100; if(Ext.isNumber(ct.labelWidth)){ var pad = Ext.isNumber(ct.labelPad) ? ct.labelPad : 5; @@ -21263,6 +23208,11 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { onFieldShow: function(c){ c.getItemCt().removeClass('x-hide-' + c.hideMode); + + // Composite fields will need to layout after the container is made visible + if (c.isComposite) { + c.doLayout(); + } }, onFieldHide: function(c){ @@ -21276,7 +23226,7 @@ Ext.layout.FormLayout = Ext.extend(Ext.layout.AnchorLayout, { if (items[i]){ ls += items[i]; if (ls.substr(-1, 1) != ';'){ - ls += ';' + ls += ';'; } } } @@ -21317,7 +23267,10 @@ new Ext.Template( *

      Also see {@link #getTemplateArgs}

      */ - // private + /** + * @private + * + */ renderItem : function(c, position, target){ if(c && (c.isFormField || c.fieldLabel) && c.inputType != 'hidden'){ var args = this.getTemplateArgs(c); @@ -21375,7 +23328,7 @@ new Ext.Template( * A CSS style specification string to add to the field label for this field (defaults to '' or the * {@link #labelStyle layout's value for labelStyle}).
    *
  • label : String
    The text to display as the label for this - * field (defaults to '')
  • + * field (defaults to the field's configured fieldLabel property) *
  • {@link #labelSeparator} : String
    The separator to display after * the text of the label for this field (defaults to a colon ':' or the * {@link #labelSeparator layout's value for labelSeparator}). To hide the separator use empty string ''.
  • @@ -21384,18 +23337,25 @@ new Ext.Template( * rendered directly after each form field wrapper (defaults to 'x-form-clear-left') * * @param (Ext.form.Field} field The {@link Ext.form.Field Field} being rendered. - * @return An object hash containing the properties required to render the Field. + * @return {Object} An object hash containing the properties required to render the Field. */ getTemplateArgs: function(field) { - var noLabelSep = !field.fieldLabel || field.hideLabel; + var noLabelSep = !field.fieldLabel || field.hideLabel, + itemCls = (field.itemCls || this.container.itemCls || '') + (field.hideLabel ? ' x-hide-label' : ''); + + // IE9 quirks needs an extra, identifying class on wrappers of TextFields + if (Ext.isIE9 && Ext.isIEQuirks && field instanceof Ext.form.TextField) { + itemCls += ' x-input-wrapper'; + } + return { - id: field.id, - label: field.fieldLabel, - labelStyle: this.getLabelStyle(field.labelStyle), - elementStyle: this.elementStyle||'', - labelSeparator: noLabelSep ? '' : (Ext.isDefined(field.labelSeparator) ? field.labelSeparator : this.labelSeparator), - itemCls: (field.itemCls||this.container.itemCls||'') + (field.hideLabel ? ' x-hide-label' : ''), - clearCls: field.clearCls || 'x-form-clear-left' + id : field.id, + label : field.fieldLabel, + itemCls : itemCls, + clearCls : field.clearCls || 'x-form-clear-left', + labelStyle : this.getLabelStyle(field.labelStyle), + elementStyle : this.elementStyle || '', + labelSeparator: noLabelSep ? '' : (Ext.isDefined(field.labelSeparator) ? field.labelSeparator : this.labelSeparator) }; }, @@ -21582,7 +23542,7 @@ Ext.layout.AccordionLayout = Ext.extend(Ext.layout.FitLayout, { var hh = 0, i, ct = this.getRenderedItems(this.container), len = ct.length, p; // Add up all the header heights for (i = 0; i < len; i++) { - if((p = ct[i]) != item){ + if((p = ct[i]) != item && !p.hidden){ hh += p.header.getHeight(); } }; @@ -21722,7 +23682,7 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { this.currentColumn = 0; this.cells = []; }, - + // private onLayout : function(ct, target){ var cs = ct.items.items, len = cs.length, c, i; @@ -21800,18 +23760,23 @@ Ext.layout.TableLayout = Ext.extend(Ext.layout.ContainerLayout, { } if(c && !c.rendered){ c.render(this.getNextCell(c)); - this.configureItem(c, position); + this.configureItem(c); }else if(c && !this.isValidParent(c, target)){ var container = this.getNextCell(c); container.insertBefore(c.getPositionEl().dom, null); c.container = Ext.get(container); - this.configureItem(c, position); + this.configureItem(c); } }, // private isValidParent : function(c, target){ return c.getPositionEl().up('table', 5).dom.parentNode === (target.dom || target); + }, + + destroy: function(){ + delete this.table; + Ext.layout.TableLayout.superclass.destroy.call(this); } /** @@ -21873,7 +23838,7 @@ Ext.layout.AbsoluteLayout = Ext.extend(Ext.layout.AnchorLayout, { extraCls: 'x-abs-layout-item', - type: 'anchor', + type: 'absolute', onLayout : function(ct, target){ target.position(); @@ -21964,53 +23929,1402 @@ Ext.layout.BoxLayout = Ext.extend(Ext.layout.ContainerLayout, { constructor : function(config){ Ext.layout.BoxLayout.superclass.constructor.call(this, config); - if(Ext.isString(this.defaultMargins)){ + + if (Ext.isString(this.defaultMargins)) { this.defaultMargins = this.parseMargins(this.defaultMargins); } + + var handler = this.overflowHandler; + + if (typeof handler == 'string') { + handler = { + type: handler + }; + } + + var handlerType = 'none'; + if (handler && handler.type != undefined) { + handlerType = handler.type; + } + + var constructor = Ext.layout.boxOverflow[handlerType]; + if (constructor[this.type]) { + constructor = constructor[this.type]; + } + + this.overflowHandler = new constructor(this, handler); + }, + + /** + * @private + * Runs the child box calculations and caches them in childBoxCache. Subclasses can used these cached values + * when laying out + */ + onLayout: function(container, target) { + Ext.layout.BoxLayout.superclass.onLayout.call(this, container, target); + + var tSize = this.getLayoutTargetSize(), + items = this.getVisibleItems(container), + calcs = this.calculateChildBoxes(items, tSize), + boxes = calcs.boxes, + meta = calcs.meta; + + //invoke the overflow handler, if one is configured + if (tSize.width > 0) { + var handler = this.overflowHandler, + method = meta.tooNarrow ? 'handleOverflow' : 'clearOverflow'; + + var results = handler[method](calcs, tSize); + + if (results) { + if (results.targetSize) { + tSize = results.targetSize; + } + + if (results.recalculate) { + items = this.getVisibleItems(container); + calcs = this.calculateChildBoxes(items, tSize); + boxes = calcs.boxes; + } + } + } + + /** + * @private + * @property layoutTargetLastSize + * @type Object + * Private cache of the last measured size of the layout target. This should never be used except by + * BoxLayout subclasses during their onLayout run. + */ + this.layoutTargetLastSize = tSize; + + /** + * @private + * @property childBoxCache + * @type Array + * Array of the last calculated height, width, top and left positions of each visible rendered component + * within the Box layout. + */ + this.childBoxCache = calcs; + + this.updateInnerCtSize(tSize, calcs); + this.updateChildBoxes(boxes); + + // Putting a box layout into an overflowed container is NOT correct and will make a second layout pass necessary. + this.handleTargetOverflow(tSize, container, target); + }, + + /** + * Resizes and repositions each child component + * @param {Array} boxes The box measurements + */ + updateChildBoxes: function(boxes) { + for (var i = 0, length = boxes.length; i < length; i++) { + var box = boxes[i], + comp = box.component; + + if (box.dirtySize) { + comp.setSize(box.width, box.height); + } + // Don't set positions to NaN + if (isNaN(box.left) || isNaN(box.top)) { + continue; + } + + comp.setPosition(box.left, box.top); + } }, - // private - isValidParent : function(c, target){ - return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom; + /** + * @private + * Called by onRender just before the child components are sized and positioned. This resizes the innerCt + * to make sure all child items fit within it. We call this before sizing the children because if our child + * items are larger than the previous innerCt size the browser will insert scrollbars and then remove them + * again immediately afterwards, giving a performance hit. + * Subclasses should provide an implementation. + * @param {Object} currentSize The current height and width of the innerCt + * @param {Array} calculations The new box calculations of all items to be laid out + */ + updateInnerCtSize: function(tSize, calcs) { + var align = this.align, + padding = this.padding, + width = tSize.width, + height = tSize.height; + + if (this.type == 'hbox') { + var innerCtWidth = width, + innerCtHeight = calcs.meta.maxHeight + padding.top + padding.bottom; + + if (align == 'stretch') { + innerCtHeight = height; + } else if (align == 'middle') { + innerCtHeight = Math.max(height, innerCtHeight); + } + } else { + var innerCtHeight = height, + innerCtWidth = calcs.meta.maxWidth + padding.left + padding.right; + + if (align == 'stretch') { + innerCtWidth = width; + } else if (align == 'center') { + innerCtWidth = Math.max(width, innerCtWidth); + } + } + + this.innerCt.setSize(innerCtWidth || undefined, innerCtHeight || undefined); + }, + + /** + * @private + * This should be called after onLayout of any BoxLayout subclass. If the target's overflow is not set to 'hidden', + * we need to lay out a second time because the scrollbars may have modified the height and width of the layout + * target. Having a Box layout inside such a target is therefore not recommended. + * @param {Object} previousTargetSize The size and height of the layout target before we just laid out + * @param {Ext.Container} container The container + * @param {Ext.Element} target The target element + */ + handleTargetOverflow: function(previousTargetSize, container, target) { + var overflow = target.getStyle('overflow'); + + if (overflow && overflow != 'hidden' &&!this.adjustmentPass) { + var newTargetSize = this.getLayoutTargetSize(); + if (newTargetSize.width != previousTargetSize.width || newTargetSize.height != previousTargetSize.height){ + this.adjustmentPass = true; + this.onLayout(container, target); + } + } + + delete this.adjustmentPass; }, // private - renderAll : function(ct, target){ - if(!this.innerCt){ - // the innerCt prevents wrapping and shuffling while - // the container is resizing + isValidParent : function(c, target) { + return this.innerCt && c.getPositionEl().dom.parentNode == this.innerCt.dom; + }, + + /** + * @private + * Returns all items that are both rendered and visible + * @return {Array} All matching items + */ + getVisibleItems: function(ct) { + var ct = ct || this.container, + t = ct.getLayoutTarget(), + cti = ct.items.items, + len = cti.length, + + i, c, items = []; + + for (i = 0; i < len; i++) { + if((c = cti[i]).rendered && this.isValidParent(c, t) && c.hidden !== true && c.collapsed !== true && c.shouldLayout !== false){ + items.push(c); + } + } + + return items; + }, + + // private + renderAll : function(ct, target) { + if (!this.innerCt) { + // the innerCt prevents wrapping and shuffling while the container is resizing this.innerCt = target.createChild({cls:this.innerCls}); this.padding = this.parseMargins(this.padding); } Ext.layout.BoxLayout.superclass.renderAll.call(this, ct, this.innerCt); }, - onLayout : function(ct, target){ - this.renderAll(ct, target); - }, - - getLayoutTargetSize : function(){ + getLayoutTargetSize : function() { var target = this.container.getLayoutTarget(), ret; + if (target) { ret = target.getViewSize(); - ret.width -= target.getPadding('lr'); + + // IE in strict mode will return a width of 0 on the 1st pass of getViewSize. + // Use getStyleSize to verify the 0 width, the adjustment pass will then work properly + // with getViewSize + if (Ext.isIE && Ext.isStrict && ret.width == 0){ + ret = target.getStyleSize(); + } + + ret.width -= target.getPadding('lr'); ret.height -= target.getPadding('tb'); } + return ret; }, // private - renderItem : function(c){ + renderItem : function(c) { if(Ext.isString(c.margins)){ c.margins = this.parseMargins(c.margins); }else if(!c.margins){ c.margins = this.defaultMargins; } Ext.layout.BoxLayout.superclass.renderItem.apply(this, arguments); + }, + + /** + * @private + */ + destroy: function() { + Ext.destroy(this.overflowHandler); + + Ext.layout.BoxLayout.superclass.destroy.apply(this, arguments); } }); /** + * @class Ext.layout.boxOverflow.None + * @extends Object + * Base class for Box Layout overflow handlers. These specialized classes are invoked when a Box Layout + * (either an HBox or a VBox) has child items that are either too wide (for HBox) or too tall (for VBox) + * for its container. + */ + +Ext.layout.boxOverflow.None = Ext.extend(Object, { + constructor: function(layout, config) { + this.layout = layout; + + Ext.apply(this, config || {}); + }, + + handleOverflow: Ext.emptyFn, + + clearOverflow: Ext.emptyFn +}); + + +Ext.layout.boxOverflow.none = Ext.layout.boxOverflow.None; +/** + * @class Ext.layout.boxOverflow.Menu + * @extends Ext.layout.boxOverflow.None + * Description + */ +Ext.layout.boxOverflow.Menu = Ext.extend(Ext.layout.boxOverflow.None, { + /** + * @cfg afterCls + * @type String + * CSS class added to the afterCt element. This is the element that holds any special items such as scrollers, + * which must always be present at the rightmost edge of the Container + */ + afterCls: 'x-strip-right', + + /** + * @property noItemsMenuText + * @type String + * HTML fragment to render into the toolbar overflow menu if there are no items to display + */ + noItemsMenuText : '
    (None)
    ', + + constructor: function(layout) { + Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this, arguments); + + /** + * @property menuItems + * @type Array + * Array of all items that are currently hidden and should go into the dropdown menu + */ + this.menuItems = []; + }, + + /** + * @private + * Creates the beforeCt, innerCt and afterCt elements if they have not already been created + * @param {Ext.Container} container The Container attached to this Layout instance + * @param {Ext.Element} target The target Element + */ + createInnerElements: function() { + if (!this.afterCt) { + this.afterCt = this.layout.innerCt.insertSibling({cls: this.afterCls}, 'before'); + } + }, + + /** + * @private + */ + clearOverflow: function(calculations, targetSize) { + var newWidth = targetSize.width + (this.afterCt ? this.afterCt.getWidth() : 0), + items = this.menuItems; + + this.hideTrigger(); + + for (var index = 0, length = items.length; index < length; index++) { + items.pop().component.show(); + } + + return { + targetSize: { + height: targetSize.height, + width : newWidth + } + }; + }, + + /** + * @private + */ + showTrigger: function() { + this.createMenu(); + this.menuTrigger.show(); + }, + + /** + * @private + */ + hideTrigger: function() { + if (this.menuTrigger != undefined) { + this.menuTrigger.hide(); + } + }, + + /** + * @private + * Called before the overflow menu is shown. This constructs the menu's items, caching them for as long as it can. + */ + beforeMenuShow: function(menu) { + var items = this.menuItems, + len = items.length, + item, + prev; + + var needsSep = function(group, item){ + return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); + }; + + this.clearMenu(); + menu.removeAll(); + + for (var i = 0; i < len; i++) { + item = items[i].component; + + if (prev && (needsSep(item, prev) || needsSep(prev, item))) { + menu.add('-'); + } + + this.addComponentToMenu(menu, item); + prev = item; + } + + // put something so the menu isn't empty if no compatible items found + if (menu.items.length < 1) { + menu.add(this.noItemsMenuText); + } + }, + + /** + * @private + * Returns a menu config for a given component. This config is used to create a menu item + * to be added to the expander menu + * @param {Ext.Component} component The component to create the config for + * @param {Boolean} hideOnClick Passed through to the menu item + */ + createMenuConfig : function(component, hideOnClick){ + var config = Ext.apply({}, component.initialConfig), + group = component.toggleGroup; + + Ext.copyTo(config, component, [ + 'iconCls', 'icon', 'itemId', 'disabled', 'handler', 'scope', 'menu' + ]); + + Ext.apply(config, { + text : component.overflowText || component.text, + hideOnClick: hideOnClick + }); + + if (group || component.enableToggle) { + Ext.apply(config, { + group : group, + checked: component.pressed, + listeners: { + checkchange: function(item, checked){ + component.toggle(checked); + } + } + }); + } + + delete config.ownerCt; + delete config.xtype; + delete config.id; + + return config; + }, + + /** + * @private + * Adds the given Toolbar item to the given menu. Buttons inside a buttongroup are added individually. + * @param {Ext.menu.Menu} menu The menu to add to + * @param {Ext.Component} component The component to add + */ + addComponentToMenu : function(menu, component) { + if (component instanceof Ext.Toolbar.Separator) { + menu.add('-'); + + } else if (Ext.isFunction(component.isXType)) { + if (component.isXType('splitbutton')) { + menu.add(this.createMenuConfig(component, true)); + + } else if (component.isXType('button')) { + menu.add(this.createMenuConfig(component, !component.menu)); + + } else if (component.isXType('buttongroup')) { + component.items.each(function(item){ + this.addComponentToMenu(menu, item); + }, this); + } + } + }, + + /** + * @private + * Deletes the sub-menu of each item in the expander menu. Submenus are created for items such as + * splitbuttons and buttongroups, where the Toolbar item cannot be represented by a single menu item + */ + clearMenu : function(){ + var menu = this.moreMenu; + if (menu && menu.items) { + menu.items.each(function(item){ + delete item.menu; + }); + } + }, + + /** + * @private + * Creates the overflow trigger and menu used when enableOverflow is set to true and the items + * in the layout are too wide to fit in the space available + */ + createMenu: function() { + if (!this.menuTrigger) { + this.createInnerElements(); + + /** + * @private + * @property menu + * @type Ext.menu.Menu + * The expand menu - holds items for every item that cannot be shown + * because the container is currently not large enough. + */ + this.menu = new Ext.menu.Menu({ + ownerCt : this.layout.container, + listeners: { + scope: this, + beforeshow: this.beforeMenuShow + } + }); + + /** + * @private + * @property menuTrigger + * @type Ext.Button + * The expand button which triggers the overflow menu to be shown + */ + this.menuTrigger = new Ext.Button({ + iconCls : 'x-toolbar-more-icon', + cls : 'x-toolbar-more', + menu : this.menu, + renderTo: this.afterCt + }); + } + }, + + /** + * @private + */ + destroy: function() { + Ext.destroy(this.menu, this.menuTrigger); + } +}); + +Ext.layout.boxOverflow.menu = Ext.layout.boxOverflow.Menu; + + +/** + * @class Ext.layout.boxOverflow.HorizontalMenu + * @extends Ext.layout.boxOverflow.Menu + * Description + */ +Ext.layout.boxOverflow.HorizontalMenu = Ext.extend(Ext.layout.boxOverflow.Menu, { + + constructor: function() { + Ext.layout.boxOverflow.HorizontalMenu.superclass.constructor.apply(this, arguments); + + var me = this, + layout = me.layout, + origFunction = layout.calculateChildBoxes; + + layout.calculateChildBoxes = function(visibleItems, targetSize) { + var calcs = origFunction.apply(layout, arguments), + meta = calcs.meta, + items = me.menuItems; + + //calculate the width of the items currently hidden solely because there is not enough space + //to display them + var hiddenWidth = 0; + for (var index = 0, length = items.length; index < length; index++) { + hiddenWidth += items[index].width; + } + + meta.minimumWidth += hiddenWidth; + meta.tooNarrow = meta.minimumWidth > targetSize.width; + + return calcs; + }; + }, + + handleOverflow: function(calculations, targetSize) { + this.showTrigger(); + + var newWidth = targetSize.width - this.afterCt.getWidth(), + boxes = calculations.boxes, + usedWidth = 0, + recalculate = false; + + //calculate the width of all visible items and any spare width + for (var index = 0, length = boxes.length; index < length; index++) { + usedWidth += boxes[index].width; + } + + var spareWidth = newWidth - usedWidth, + showCount = 0; + + //see if we can re-show any of the hidden components + for (var index = 0, length = this.menuItems.length; index < length; index++) { + var hidden = this.menuItems[index], + comp = hidden.component, + width = hidden.width; + + if (width < spareWidth) { + comp.show(); + + spareWidth -= width; + showCount ++; + recalculate = true; + } else { + break; + } + } + + if (recalculate) { + this.menuItems = this.menuItems.slice(showCount); + } else { + for (var i = boxes.length - 1; i >= 0; i--) { + var item = boxes[i].component, + right = boxes[i].left + boxes[i].width; + + if (right >= newWidth) { + this.menuItems.unshift({ + component: item, + width : boxes[i].width + }); + + item.hide(); + } else { + break; + } + } + } + + if (this.menuItems.length == 0) { + this.hideTrigger(); + } + + return { + targetSize: { + height: targetSize.height, + width : newWidth + }, + recalculate: recalculate + }; + } +}); + +Ext.layout.boxOverflow.menu.hbox = Ext.layout.boxOverflow.HorizontalMenu;/** + * @class Ext.layout.boxOverflow.Scroller + * @extends Ext.layout.boxOverflow.None + * Description + */ +Ext.layout.boxOverflow.Scroller = Ext.extend(Ext.layout.boxOverflow.None, { + /** + * @cfg animateScroll + * @type Boolean + * True to animate the scrolling of items within the layout (defaults to true, ignored if enableScroll is false) + */ + animateScroll: true, + + /** + * @cfg scrollIncrement + * @type Number + * The number of pixels to scroll by on scroller click (defaults to 100) + */ + scrollIncrement: 100, + + /** + * @cfg wheelIncrement + * @type Number + * The number of pixels to increment on mouse wheel scrolling (defaults to 3). + */ + wheelIncrement: 3, + + /** + * @cfg scrollRepeatInterval + * @type Number + * Number of milliseconds between each scroll while a scroller button is held down (defaults to 400) + */ + scrollRepeatInterval: 400, + + /** + * @cfg scrollDuration + * @type Number + * Number of seconds that each scroll animation lasts (defaults to 0.4) + */ + scrollDuration: 0.4, + + /** + * @cfg beforeCls + * @type String + * CSS class added to the beforeCt element. This is the element that holds any special items such as scrollers, + * which must always be present at the leftmost edge of the Container + */ + beforeCls: 'x-strip-left', + + /** + * @cfg afterCls + * @type String + * CSS class added to the afterCt element. This is the element that holds any special items such as scrollers, + * which must always be present at the rightmost edge of the Container + */ + afterCls: 'x-strip-right', + + /** + * @cfg scrollerCls + * @type String + * CSS class added to both scroller elements if enableScroll is used + */ + scrollerCls: 'x-strip-scroller', + + /** + * @cfg beforeScrollerCls + * @type String + * CSS class added to the left scroller element if enableScroll is used + */ + beforeScrollerCls: 'x-strip-scroller-left', + + /** + * @cfg afterScrollerCls + * @type String + * CSS class added to the right scroller element if enableScroll is used + */ + afterScrollerCls: 'x-strip-scroller-right', + + /** + * @private + * Sets up an listener to scroll on the layout's innerCt mousewheel event + */ + createWheelListener: function() { + this.layout.innerCt.on({ + scope : this, + mousewheel: function(e) { + e.stopEvent(); + + this.scrollBy(e.getWheelDelta() * this.wheelIncrement * -1, false); + } + }); + }, + + /** + * @private + * Most of the heavy lifting is done in the subclasses + */ + handleOverflow: function(calculations, targetSize) { + this.createInnerElements(); + this.showScrollers(); + }, + + /** + * @private + */ + clearOverflow: function() { + this.hideScrollers(); + }, + + /** + * @private + * Shows the scroller elements in the beforeCt and afterCt. Creates the scrollers first if they are not already + * present. + */ + showScrollers: function() { + this.createScrollers(); + + this.beforeScroller.show(); + this.afterScroller.show(); + + this.updateScrollButtons(); + }, + + /** + * @private + * Hides the scroller elements in the beforeCt and afterCt + */ + hideScrollers: function() { + if (this.beforeScroller != undefined) { + this.beforeScroller.hide(); + this.afterScroller.hide(); + } + }, + + /** + * @private + * Creates the clickable scroller elements and places them into the beforeCt and afterCt + */ + createScrollers: function() { + if (!this.beforeScroller && !this.afterScroller) { + var before = this.beforeCt.createChild({ + cls: String.format("{0} {1} ", this.scrollerCls, this.beforeScrollerCls) + }); + + var after = this.afterCt.createChild({ + cls: String.format("{0} {1}", this.scrollerCls, this.afterScrollerCls) + }); + + before.addClassOnOver(this.beforeScrollerCls + '-hover'); + after.addClassOnOver(this.afterScrollerCls + '-hover'); + + before.setVisibilityMode(Ext.Element.DISPLAY); + after.setVisibilityMode(Ext.Element.DISPLAY); + + this.beforeRepeater = new Ext.util.ClickRepeater(before, { + interval: this.scrollRepeatInterval, + handler : this.scrollLeft, + scope : this + }); + + this.afterRepeater = new Ext.util.ClickRepeater(after, { + interval: this.scrollRepeatInterval, + handler : this.scrollRight, + scope : this + }); + + /** + * @property beforeScroller + * @type Ext.Element + * The left scroller element. Only created when needed. + */ + this.beforeScroller = before; + + /** + * @property afterScroller + * @type Ext.Element + * The left scroller element. Only created when needed. + */ + this.afterScroller = after; + } + }, + + /** + * @private + */ + destroy: function() { + Ext.destroy(this.beforeScroller, this.afterScroller, this.beforeRepeater, this.afterRepeater, this.beforeCt, this.afterCt); + }, + + /** + * @private + * Scrolls left or right by the number of pixels specified + * @param {Number} delta Number of pixels to scroll to the right by. Use a negative number to scroll left + */ + scrollBy: function(delta, animate) { + this.scrollTo(this.getScrollPosition() + delta, animate); + }, + + /** + * @private + * Normalizes an item reference, string id or numerical index into a reference to the item + * @param {Ext.Component|String|Number} item The item reference, id or index + * @return {Ext.Component} The item + */ + getItem: function(item) { + if (Ext.isString(item)) { + item = Ext.getCmp(item); + } else if (Ext.isNumber(item)) { + item = this.items[item]; + } + + return item; + }, + + /** + * @private + * @return {Object} Object passed to scrollTo when scrolling + */ + getScrollAnim: function() { + return { + duration: this.scrollDuration, + callback: this.updateScrollButtons, + scope : this + }; + }, + + /** + * @private + * Enables or disables each scroller button based on the current scroll position + */ + updateScrollButtons: function() { + if (this.beforeScroller == undefined || this.afterScroller == undefined) { + return; + } + + var beforeMeth = this.atExtremeBefore() ? 'addClass' : 'removeClass', + afterMeth = this.atExtremeAfter() ? 'addClass' : 'removeClass', + beforeCls = this.beforeScrollerCls + '-disabled', + afterCls = this.afterScrollerCls + '-disabled'; + + this.beforeScroller[beforeMeth](beforeCls); + this.afterScroller[afterMeth](afterCls); + this.scrolling = false; + }, + + /** + * @private + * Returns true if the innerCt scroll is already at its left-most point + * @return {Boolean} True if already at furthest left point + */ + atExtremeBefore: function() { + return this.getScrollPosition() === 0; + }, + + /** + * @private + * Scrolls to the left by the configured amount + */ + scrollLeft: function(animate) { + this.scrollBy(-this.scrollIncrement, animate); + }, + + /** + * @private + * Scrolls to the right by the configured amount + */ + scrollRight: function(animate) { + this.scrollBy(this.scrollIncrement, animate); + }, + + /** + * Scrolls to the given component. + * @param {String|Number|Ext.Component} item The item to scroll to. Can be a numerical index, component id + * or a reference to the component itself. + * @param {Boolean} animate True to animate the scrolling + */ + scrollToItem: function(item, animate) { + item = this.getItem(item); + + if (item != undefined) { + var visibility = this.getItemVisibility(item); + + if (!visibility.fullyVisible) { + var box = item.getBox(true, true), + newX = box.x; + + if (visibility.hiddenRight) { + newX -= (this.layout.innerCt.getWidth() - box.width); + } + + this.scrollTo(newX, animate); + } + } + }, + + /** + * @private + * For a given item in the container, return an object with information on whether the item is visible + * with the current innerCt scroll value. + * @param {Ext.Component} item The item + * @return {Object} Values for fullyVisible, hiddenLeft and hiddenRight + */ + getItemVisibility: function(item) { + var box = this.getItem(item).getBox(true, true), + itemLeft = box.x, + itemRight = box.x + box.width, + scrollLeft = this.getScrollPosition(), + scrollRight = this.layout.innerCt.getWidth() + scrollLeft; + + return { + hiddenLeft : itemLeft < scrollLeft, + hiddenRight : itemRight > scrollRight, + fullyVisible: itemLeft > scrollLeft && itemRight < scrollRight + }; + } +}); + +Ext.layout.boxOverflow.scroller = Ext.layout.boxOverflow.Scroller; + + +/** + * @class Ext.layout.boxOverflow.VerticalScroller + * @extends Ext.layout.boxOverflow.Scroller + * Description + */ +Ext.layout.boxOverflow.VerticalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, { + scrollIncrement: 75, + wheelIncrement : 2, + + handleOverflow: function(calculations, targetSize) { + Ext.layout.boxOverflow.VerticalScroller.superclass.handleOverflow.apply(this, arguments); + + return { + targetSize: { + height: targetSize.height - (this.beforeCt.getHeight() + this.afterCt.getHeight()), + width : targetSize.width + } + }; + }, + + /** + * @private + * Creates the beforeCt and afterCt elements if they have not already been created + */ + createInnerElements: function() { + var target = this.layout.innerCt; + + //normal items will be rendered to the innerCt. beforeCt and afterCt allow for fixed positioning of + //special items such as scrollers or dropdown menu triggers + if (!this.beforeCt) { + this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before'); + this.afterCt = target.insertSibling({cls: this.afterCls}, 'after'); + + this.createWheelListener(); + } + }, + + /** + * @private + * Scrolls to the given position. Performs bounds checking. + * @param {Number} position The position to scroll to. This is constrained. + * @param {Boolean} animate True to animate. If undefined, falls back to value of this.animateScroll + */ + scrollTo: function(position, animate) { + var oldPosition = this.getScrollPosition(), + newPosition = position.constrain(0, this.getMaxScrollBottom()); + + if (newPosition != oldPosition && !this.scrolling) { + if (animate == undefined) { + animate = this.animateScroll; + } + + this.layout.innerCt.scrollTo('top', newPosition, animate ? this.getScrollAnim() : false); + + if (animate) { + this.scrolling = true; + } else { + this.scrolling = false; + this.updateScrollButtons(); + } + } + }, + + /** + * Returns the current scroll position of the innerCt element + * @return {Number} The current scroll position + */ + getScrollPosition: function(){ + return parseInt(this.layout.innerCt.dom.scrollTop, 10) || 0; + }, + + /** + * @private + * Returns the maximum value we can scrollTo + * @return {Number} The max scroll value + */ + getMaxScrollBottom: function() { + return this.layout.innerCt.dom.scrollHeight - this.layout.innerCt.getHeight(); + }, + + /** + * @private + * Returns true if the innerCt scroll is already at its right-most point + * @return {Boolean} True if already at furthest right point + */ + atExtremeAfter: function() { + return this.getScrollPosition() >= this.getMaxScrollBottom(); + } +}); + +Ext.layout.boxOverflow.scroller.vbox = Ext.layout.boxOverflow.VerticalScroller; + + +/** + * @class Ext.layout.boxOverflow.HorizontalScroller + * @extends Ext.layout.boxOverflow.Scroller + * Description + */ +Ext.layout.boxOverflow.HorizontalScroller = Ext.extend(Ext.layout.boxOverflow.Scroller, { + handleOverflow: function(calculations, targetSize) { + Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this, arguments); + + return { + targetSize: { + height: targetSize.height, + width : targetSize.width - (this.beforeCt.getWidth() + this.afterCt.getWidth()) + } + }; + }, + + /** + * @private + * Creates the beforeCt and afterCt elements if they have not already been created + */ + createInnerElements: function() { + var target = this.layout.innerCt; + + //normal items will be rendered to the innerCt. beforeCt and afterCt allow for fixed positioning of + //special items such as scrollers or dropdown menu triggers + if (!this.beforeCt) { + this.afterCt = target.insertSibling({cls: this.afterCls}, 'before'); + this.beforeCt = target.insertSibling({cls: this.beforeCls}, 'before'); + + this.createWheelListener(); + } + }, + + /** + * @private + * Scrolls to the given position. Performs bounds checking. + * @param {Number} position The position to scroll to. This is constrained. + * @param {Boolean} animate True to animate. If undefined, falls back to value of this.animateScroll + */ + scrollTo: function(position, animate) { + var oldPosition = this.getScrollPosition(), + newPosition = position.constrain(0, this.getMaxScrollRight()); + + if (newPosition != oldPosition && !this.scrolling) { + if (animate == undefined) { + animate = this.animateScroll; + } + + this.layout.innerCt.scrollTo('left', newPosition, animate ? this.getScrollAnim() : false); + + if (animate) { + this.scrolling = true; + } else { + this.scrolling = false; + this.updateScrollButtons(); + } + } + }, + + /** + * Returns the current scroll position of the innerCt element + * @return {Number} The current scroll position + */ + getScrollPosition: function(){ + return parseInt(this.layout.innerCt.dom.scrollLeft, 10) || 0; + }, + + /** + * @private + * Returns the maximum value we can scrollTo + * @return {Number} The max scroll value + */ + getMaxScrollRight: function() { + return this.layout.innerCt.dom.scrollWidth - this.layout.innerCt.getWidth(); + }, + + /** + * @private + * Returns true if the innerCt scroll is already at its right-most point + * @return {Boolean} True if already at furthest right point + */ + atExtremeAfter: function() { + return this.getScrollPosition() >= this.getMaxScrollRight(); + } +}); + +Ext.layout.boxOverflow.scroller.hbox = Ext.layout.boxOverflow.HorizontalScroller;/** + * @class Ext.layout.HBoxLayout + * @extends Ext.layout.BoxLayout + *

    A layout that arranges items horizontally across a Container. This layout optionally divides available horizontal + * space between child items containing a numeric flex configuration.

    + * This layout may also be used to set the heights of child items by configuring it with the {@link #align} option. + */ +Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, { + /** + * @cfg {String} align + * Controls how the child items of the container are aligned. Acceptable configuration values for this + * property are: + *
      + *
    • top : Default
      child items are aligned vertically + * at the top of the container
    • + *
    • middle :
      child items are aligned vertically in the + * middle of the container
    • + *
    • stretch :
      child items are stretched vertically to fill + * the height of the container
    • + *
    • stretchmax :
      child items are stretched vertically to + * the height of the largest item.
    • + */ + align: 'top', // top, middle, stretch, strechmax + + type : 'hbox', + + /** + * @cfg {String} pack + * Controls how the child items of the container are packed together. Acceptable configuration values + * for this property are: + *
        + *
      • start : Default
        child items are packed together at + * left side of container
      • + *
      • center :
        child items are packed together at + * mid-width of container
      • + *
      • end :
        child items are packed together at right + * side of container
      • + *
      + */ + /** + * @cfg {Number} flex + * This configuation option is to be applied to child items of the container managed + * by this layout. Each child item with a flex property will be flexed horizontally + * according to each item's relative flex value compared to the sum of all items with + * a flex value specified. Any child items that have either a flex = 0 or + * flex = undefined will not be 'flexed' (the initial size will not be changed). + */ + + /** + * @private + * Calculates the size and positioning of each item in the HBox. This iterates over all of the rendered, + * visible items and returns a height, width, top and left for each, as well as a reference to each. Also + * returns meta data such as maxHeight which are useful when resizing layout wrappers such as this.innerCt. + * @param {Array} visibleItems The array of all rendered, visible items to be calculated for + * @param {Object} targetSize Object containing target size and height + * @return {Object} Object containing box measurements for each child, plus meta data + */ + calculateChildBoxes: function(visibleItems, targetSize) { + var visibleCount = visibleItems.length, + + padding = this.padding, + topOffset = padding.top, + leftOffset = padding.left, + paddingVert = topOffset + padding.bottom, + paddingHoriz = leftOffset + padding.right, + + width = targetSize.width - this.scrollOffset, + height = targetSize.height, + availHeight = Math.max(0, height - paddingVert), + + isStart = this.pack == 'start', + isCenter = this.pack == 'center', + isEnd = this.pack == 'end', + + nonFlexWidth = 0, + maxHeight = 0, + totalFlex = 0, + desiredWidth = 0, + minimumWidth = 0, + + //used to cache the calculated size and position values for each child item + boxes = [], + + //used in the for loops below, just declared here for brevity + child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedWidth, + horizMargins, vertMargins, stretchHeight; + + //gather the total flex of all flexed items and the width taken up by fixed width items + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + childHeight = child.height; + childWidth = child.width; + canLayout = !child.hasLayout && typeof child.doLayout == 'function'; + + // Static width (numeric) requires no calcs + if (typeof childWidth != 'number') { + + // flex and not 'auto' width + if (child.flex && !childWidth) { + totalFlex += child.flex; + + // Not flexed or 'auto' width or undefined width + } else { + //Render and layout sub-containers without a flex or width defined, as otherwise we + //don't know how wide the sub-container should be and cannot calculate flexed widths + if (!childWidth && canLayout) { + child.doLayout(); + } + + childSize = child.getSize(); + childWidth = childSize.width; + childHeight = childSize.height; + } + } + + childMargins = child.margins; + horizMargins = childMargins.left + childMargins.right; + + nonFlexWidth += horizMargins + (childWidth || 0); + desiredWidth += horizMargins + (child.flex ? child.minWidth || 0 : childWidth); + minimumWidth += horizMargins + (child.minWidth || childWidth || 0); + + // Max height for align - force layout of non-laid out subcontainers without a numeric height + if (typeof childHeight != 'number') { + if (canLayout) { + child.doLayout(); + } + childHeight = child.getHeight(); + } + + maxHeight = Math.max(maxHeight, childHeight + childMargins.top + childMargins.bottom); + + //cache the size of each child component. Don't set height or width to 0, keep undefined instead + boxes.push({ + component: child, + height : childHeight || undefined, + width : childWidth || undefined + }); + } + + var shortfall = desiredWidth - width, + tooNarrow = minimumWidth > width; + + //the width available to the flexed items + var availableWidth = Math.max(0, width - nonFlexWidth - paddingHoriz); + + if (tooNarrow) { + for (i = 0; i < visibleCount; i++) { + boxes[i].width = visibleItems[i].minWidth || visibleItems[i].width || boxes[i].width; + } + } else { + //all flexed items should be sized to their minimum width, other items should be shrunk down until + //the shortfall has been accounted for + if (shortfall > 0) { + var minWidths = []; + + /** + * When we have a shortfall but are not tooNarrow, we need to shrink the width of each non-flexed item. + * Flexed items are immediately reduced to their minWidth and anything already at minWidth is ignored. + * The remaining items are collected into the minWidths array, which is later used to distribute the shortfall. + */ + for (var index = 0, length = visibleCount; index < length; index++) { + var item = visibleItems[index], + minWidth = item.minWidth || 0; + + //shrink each non-flex tab by an equal amount to make them all fit. Flexed items are all + //shrunk to their minWidth because they're flexible and should be the first to lose width + if (item.flex) { + boxes[index].width = minWidth; + } else { + minWidths.push({ + minWidth : minWidth, + available: boxes[index].width - minWidth, + index : index + }); + } + } + + //sort by descending amount of width remaining before minWidth is reached + minWidths.sort(function(a, b) { + return a.available > b.available ? 1 : -1; + }); + + /* + * Distribute the shortfall (difference between total desired with of all items and actual width available) + * between the non-flexed items. We try to distribute the shortfall evenly, but apply it to items with the + * smallest difference between their width and minWidth first, so that if reducing the width by the average + * amount would make that item less than its minWidth, we carry the remainder over to the next item. + */ + for (var i = 0, length = minWidths.length; i < length; i++) { + var itemIndex = minWidths[i].index; + + if (itemIndex == undefined) { + continue; + } + + var item = visibleItems[itemIndex], + box = boxes[itemIndex], + oldWidth = box.width, + minWidth = item.minWidth, + newWidth = Math.max(minWidth, oldWidth - Math.ceil(shortfall / (length - i))), + reduction = oldWidth - newWidth; + + boxes[itemIndex].width = newWidth; + shortfall -= reduction; + } + } else { + //temporary variables used in the flex width calculations below + var remainingWidth = availableWidth, + remainingFlex = totalFlex; + + //calculate the widths of each flexed item + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + vertMargins = childMargins.top + childMargins.bottom; + + if (isStart && child.flex && !child.width) { + flexedWidth = Math.ceil((child.flex / remainingFlex) * remainingWidth); + remainingWidth -= flexedWidth; + remainingFlex -= child.flex; + + calcs.width = flexedWidth; + calcs.dirtySize = true; + } + } + } + } + + if (isCenter) { + leftOffset += availableWidth / 2; + } else if (isEnd) { + leftOffset += availableWidth; + } + + //finally, calculate the left and top position of each item + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + leftOffset += childMargins.left; + vertMargins = childMargins.top + childMargins.bottom; + + calcs.left = leftOffset; + calcs.top = topOffset + childMargins.top; + + switch (this.align) { + case 'stretch': + stretchHeight = availHeight - vertMargins; + calcs.height = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000); + calcs.dirtySize = true; + break; + case 'stretchmax': + stretchHeight = maxHeight - vertMargins; + calcs.height = stretchHeight.constrain(child.minHeight || 0, child.maxHeight || 1000000); + calcs.dirtySize = true; + break; + case 'middle': + var diff = availHeight - calcs.height - vertMargins; + if (diff > 0) { + calcs.top = topOffset + vertMargins + (diff / 2); + } + } + + leftOffset += calcs.width + childMargins.right; + } + + return { + boxes: boxes, + meta : { + maxHeight : maxHeight, + nonFlexWidth: nonFlexWidth, + desiredWidth: desiredWidth, + minimumWidth: minimumWidth, + shortfall : desiredWidth - width, + tooNarrow : tooNarrow + } + }; + } +}); + +Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout;/** * @class Ext.layout.VBoxLayout * @extends Ext.layout.BoxLayout *

      A layout that arranges items vertically down a Container. This layout optionally divides available vertical @@ -22035,6 +25349,7 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, { */ align : 'left', // left, center, stretch, strechmax type: 'vbox', + /** * @cfg {String} pack * Controls how the child items of the container are packed together. Acceptable configuration values @@ -22048,6 +25363,7 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, { * side of container

    * */ + /** * @cfg {Number} flex * This configuation option is to be applied to child items of the container managed @@ -22057,364 +25373,372 @@ Ext.layout.VBoxLayout = Ext.extend(Ext.layout.BoxLayout, { * flex = undefined will not be 'flexed' (the initial size will not be changed). */ - // private - onLayout : function(ct, target){ - Ext.layout.VBoxLayout.superclass.onLayout.call(this, ct, target); + /** + * @private + * Calculates the size and positioning of each item in the VBox. This iterates over all of the rendered, + * visible items and returns a height, width, top and left for each, as well as a reference to each. Also + * returns meta data such as maxHeight which are useful when resizing layout wrappers such as this.innerCt. + * @param {Array} visibleItems The array of all rendered, visible items to be calculated for + * @param {Object} targetSize Object containing target size and height + * @return {Object} Object containing box measurements for each child, plus meta data + */ + calculateChildBoxes: function(visibleItems, targetSize) { + var visibleCount = visibleItems.length, - var cs = this.getRenderedItems(ct), csLen = cs.length, - c, i, cm, ch, margin, cl, diff, aw, availHeight, - size = this.getLayoutTargetSize(), - w = size.width, - h = size.height - this.scrollOffset, - l = this.padding.left, - t = this.padding.top, - isStart = this.pack == 'start', - extraHeight = 0, - maxWidth = 0, - totalFlex = 0, - usedHeight = 0, - idx = 0, - heights = [], - restore = []; + padding = this.padding, + topOffset = padding.top, + leftOffset = padding.left, + paddingVert = topOffset + padding.bottom, + paddingHoriz = leftOffset + padding.right, - // Do only width calculations and apply those first, as they can affect height - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - cm = c.margins; - margin = cm.top + cm.bottom; - // Max height for align - maxWidth = Math.max(maxWidth, c.getWidth() + cm.left + cm.right); - } + width = targetSize.width - this.scrollOffset, + height = targetSize.height, + availWidth = Math.max(0, width - paddingHoriz), - var innerCtWidth = maxWidth + this.padding.left + this.padding.right; - switch(this.align){ - case 'stretch': - this.innerCt.setSize(w, h); - break; - case 'stretchmax': - case 'left': - this.innerCt.setSize(innerCtWidth, h); - break; - case 'center': - this.innerCt.setSize(w = Math.max(w, innerCtWidth), h); - break; - } + isStart = this.pack == 'start', + isCenter = this.pack == 'center', + isEnd = this.pack == 'end', - var availableWidth = Math.max(0, w - this.padding.left - this.padding.right); - // Apply widths - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - cm = c.margins; - if(this.align == 'stretch'){ - c.setWidth(((w - (this.padding.left + this.padding.right)) - (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)); - }else if(isStart && c.flex){ - c.setWidth(); + nonFlexHeight= 0, + maxWidth = 0, + totalFlex = 0, + desiredHeight= 0, + minimumHeight= 0, + + //used to cache the calculated size and position values for each child item + boxes = [], + + //used in the for loops below, just declared here for brevity + child, childWidth, childHeight, childSize, childMargins, canLayout, i, calcs, flexedHeight, + horizMargins, vertMargins, stretchWidth, length; + + //gather the total flex of all flexed items and the width taken up by fixed width items + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + childHeight = child.height; + childWidth = child.width; + canLayout = !child.hasLayout && typeof child.doLayout == 'function'; + + // Static height (numeric) requires no calcs + if (typeof childHeight != 'number') { + + // flex and not 'auto' height + if (child.flex && !childHeight) { + totalFlex += child.flex; + + // Not flexed or 'auto' height or undefined height + } else { + //Render and layout sub-containers without a flex or width defined, as otherwise we + //don't know how wide the sub-container should be and cannot calculate flexed widths + if (!childHeight && canLayout) { + child.doLayout(); + } + + childSize = child.getSize(); + childWidth = childSize.width; + childHeight = childSize.height; + } } + childMargins = child.margins; + vertMargins = childMargins.top + childMargins.bottom; + + nonFlexHeight += vertMargins + (childHeight || 0); + desiredHeight += vertMargins + (child.flex ? child.minHeight || 0 : childHeight); + minimumHeight += vertMargins + (child.minHeight || childHeight || 0); + + // Max width for align - force layout of non-layed out subcontainers without a numeric width + if (typeof childWidth != 'number') { + if (canLayout) { + child.doLayout(); + } + childWidth = child.getWidth(); + } + + maxWidth = Math.max(maxWidth, childWidth + childMargins.left + childMargins.right); + + //cache the size of each child component + boxes.push({ + component: child, + height : childHeight || undefined, + width : childWidth || undefined + }); } - // Height calculations - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - // Total of all the flex values - totalFlex += c.flex || 0; - // Don't run height calculations on flexed items - if (!c.flex) { - // Render and layout sub-containers without a flex or height, once - if (!c.height && !c.hasLayout && c.doLayout) { - c.doLayout(); + var shortfall = desiredHeight - height, + tooNarrow = minimumHeight > height; + + //the height available to the flexed items + var availableHeight = Math.max(0, (height - nonFlexHeight - paddingVert)); + + if (tooNarrow) { + for (i = 0, length = visibleCount; i < length; i++) { + boxes[i].height = visibleItems[i].minHeight || visibleItems[i].height || boxes[i].height; + } + } else { + //all flexed items should be sized to their minimum width, other items should be shrunk down until + //the shortfall has been accounted for + if (shortfall > 0) { + var minHeights = []; + + /** + * When we have a shortfall but are not tooNarrow, we need to shrink the height of each non-flexed item. + * Flexed items are immediately reduced to their minHeight and anything already at minHeight is ignored. + * The remaining items are collected into the minHeights array, which is later used to distribute the shortfall. + */ + for (var index = 0, length = visibleCount; index < length; index++) { + var item = visibleItems[index], + minHeight = item.minHeight || 0; + + //shrink each non-flex tab by an equal amount to make them all fit. Flexed items are all + //shrunk to their minHeight because they're flexible and should be the first to lose height + if (item.flex) { + boxes[index].height = minHeight; + } else { + minHeights.push({ + minHeight: minHeight, + available: boxes[index].height - minHeight, + index : index + }); + } + } + + //sort by descending minHeight value + minHeights.sort(function(a, b) { + return a.available > b.available ? 1 : -1; + }); + + /* + * Distribute the shortfall (difference between total desired with of all items and actual height available) + * between the non-flexed items. We try to distribute the shortfall evenly, but apply it to items with the + * smallest difference between their height and minHeight first, so that if reducing the height by the average + * amount would make that item less than its minHeight, we carry the remainder over to the next item. + */ + for (var i = 0, length = minHeights.length; i < length; i++) { + var itemIndex = minHeights[i].index; + + if (itemIndex == undefined) { + continue; + } + + var item = visibleItems[itemIndex], + box = boxes[itemIndex], + oldHeight = box.height, + minHeight = item.minHeight, + newHeight = Math.max(minHeight, oldHeight - Math.ceil(shortfall / (length - i))), + reduction = oldHeight - newHeight; + + boxes[itemIndex].height = newHeight; + shortfall -= reduction; } - ch = c.getHeight(); } else { - ch = 0; - } + //temporary variables used in the flex height calculations below + var remainingHeight = availableHeight, + remainingFlex = totalFlex; - cm = c.margins; - // Determine how much height is available to flex - extraHeight += ch + cm.top + cm.bottom; - } - // Final avail height calc - availHeight = Math.max(0, (h - extraHeight - this.padding.top - this.padding.bottom)); + //calculate the height of each flexed item + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; - var leftOver = availHeight; - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - if(isStart && c.flex){ - ch = Math.floor(availHeight * (c.flex / totalFlex)); - leftOver -= ch; - heights.push(ch); - } - } - if(this.pack == 'center'){ - t += availHeight ? availHeight / 2 : 0; - }else if(this.pack == 'end'){ - t += availHeight; - } - idx = 0; - // Apply heights - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - cm = c.margins; - t += cm.top; - aw = availableWidth; - cl = l + cm.left // default left pos + childMargins = child.margins; + horizMargins = childMargins.left + childMargins.right; - // Adjust left pos for centering - if(this.align == 'center'){ - if((diff = availableWidth - (c.getWidth() + cm.left + cm.right)) > 0){ - cl += (diff/2); - aw -= diff; + if (isStart && child.flex && !child.height) { + flexedHeight = Math.ceil((child.flex / remainingFlex) * remainingHeight); + remainingHeight -= flexedHeight; + remainingFlex -= child.flex; + + calcs.height = flexedHeight; + calcs.dirtySize = true; + } } } + } - c.setPosition(cl, t); - if(isStart && c.flex){ - ch = Math.max(0, heights[idx++] + (leftOver-- > 0 ? 1 : 0)); - c.setSize(aw, ch); - }else{ - ch = c.getHeight(); - } - t += ch + cm.bottom; + if (isCenter) { + topOffset += availableHeight / 2; + } else if (isEnd) { + topOffset += availableHeight; } - // Putting a box layout into an overflowed container is NOT correct and will make a second layout pass necessary. - if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) { - var ts = this.getLayoutTargetSize(); - if (ts.width != size.width || ts.height != size.height){ - this.adjustmentPass = true; - this.onLayout(ct, target); + + //finally, calculate the left and top position of each item + for (i = 0; i < visibleCount; i++) { + child = visibleItems[i]; + calcs = boxes[i]; + + childMargins = child.margins; + topOffset += childMargins.top; + horizMargins = childMargins.left + childMargins.right; + + + calcs.left = leftOffset + childMargins.left; + calcs.top = topOffset; + + switch (this.align) { + case 'stretch': + stretchWidth = availWidth - horizMargins; + calcs.width = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000); + calcs.dirtySize = true; + break; + case 'stretchmax': + stretchWidth = maxWidth - horizMargins; + calcs.width = stretchWidth.constrain(child.minWidth || 0, child.maxWidth || 1000000); + calcs.dirtySize = true; + break; + case 'center': + var diff = availWidth - calcs.width - horizMargins; + if (diff > 0) { + calcs.left = leftOffset + horizMargins + (diff / 2); + } } + + topOffset += calcs.height + childMargins.bottom; } - delete this.adjustmentPass; + + return { + boxes: boxes, + meta : { + maxWidth : maxWidth, + nonFlexHeight: nonFlexHeight, + desiredHeight: desiredHeight, + minimumHeight: minimumHeight, + shortfall : desiredHeight - height, + tooNarrow : tooNarrow + } + }; } }); Ext.Container.LAYOUTS.vbox = Ext.layout.VBoxLayout; - -/** - * @class Ext.layout.HBoxLayout - * @extends Ext.layout.BoxLayout - *

    A layout that arranges items horizontally across a Container. This layout optionally divides available horizontal - * space between child items containing a numeric flex configuration.

    - * This layout may also be used to set the heights of child items by configuring it with the {@link #align} option. - */ -Ext.layout.HBoxLayout = Ext.extend(Ext.layout.BoxLayout, { - /** - * @cfg {String} align - * Controls how the child items of the container are aligned. Acceptable configuration values for this - * property are: - *
      - *
    • top : Default
      child items are aligned vertically - * at the top of the container
    • - *
    • middle :
      child items are aligned vertically in the - * middle of the container
    • - *
    • stretch :
      child items are stretched vertically to fill - * the height of the container
    • - *
    • stretchmax :
      child items are stretched vertically to - * the height of the largest item.
    • - */ - align : 'top', // top, middle, stretch, strechmax - type: 'hbox', - /** - * @cfg {String} pack - * Controls how the child items of the container are packed together. Acceptable configuration values - * for this property are: - *
        - *
      • start : Default
        child items are packed together at - * left side of container
      • - *
      • center :
        child items are packed together at - * mid-width of container
      • - *
      • end :
        child items are packed together at right - * side of container
      • - *
      - */ - /** - * @cfg {Number} flex - * This configuation option is to be applied to child items of the container managed - * by this layout. Each child item with a flex property will be flexed horizontally - * according to each item's relative flex value compared to the sum of all items with - * a flex value specified. Any child items that have either a flex = 0 or - * flex = undefined will not be 'flexed' (the initial size will not be changed). - */ - - // private - onLayout : function(ct, target){ - Ext.layout.HBoxLayout.superclass.onLayout.call(this, ct, target); - - var cs = this.getRenderedItems(ct), csLen = cs.length, - c, i, cm, cw, ch, diff, availWidth, - size = this.getLayoutTargetSize(), - w = size.width - this.scrollOffset, - h = size.height, - l = this.padding.left, - t = this.padding.top, - isStart = this.pack == 'start', - isRestore = ['stretch', 'stretchmax'].indexOf(this.align) == -1, - extraWidth = 0, - maxHeight = 0, - totalFlex = 0, - usedWidth = 0; - - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - // Total of all the flex values - totalFlex += c.flex || 0; - // Don't run width calculations on flexed items - if (!c.flex) { - // Render and layout sub-containers without a flex or width, once - if (!c.width && !c.hasLayout && c.doLayout) { - c.doLayout(); - } - cw = c.getWidth(); - } else { - cw = 0; - } - cm = c.margins; - // Determine how much width is available to flex - extraWidth += cw + cm.left + cm.right; - // Max height for align - maxHeight = Math.max(maxHeight, c.getHeight() + cm.top + cm.bottom); - } - // Final avail width calc - availWidth = Math.max(0, (w - extraWidth - this.padding.left - this.padding.right)); - - 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 leftOver = availWidth, - widths = [], - restore = [], - idx = 0, - availableHeight = Math.max(0, h - this.padding.top - this.padding.bottom); - - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - if(isStart && c.flex){ - cw = Math.floor(availWidth * (c.flex / totalFlex)); - leftOver -= cw; - widths.push(cw); - } - } - - if(this.pack == 'center'){ - l += availWidth ? availWidth / 2 : 0; - }else if(this.pack == 'end'){ - l += availWidth; - } - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - cm = c.margins; - l += cm.left; - c.setPosition(l, t + cm.top); - if(isStart && c.flex){ - cw = Math.max(0, widths[idx++] + (leftOver-- > 0 ? 1 : 0)); - if(isRestore){ - restore.push(c.getHeight()); - } - c.setSize(cw, availableHeight); - }else{ - cw = c.getWidth(); - } - l += cw + cm.right; - } - - idx = 0; - for (i = 0 ; i < csLen; i++) { - c = cs[i]; - cm = c.margins; - ch = c.getHeight(); - if(isStart && c.flex){ - ch = restore[idx++]; - } - if(this.align == 'stretch'){ - c.setHeight(((h - (this.padding.top + this.padding.bottom)) - (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)); - }else{ - if(this.align == 'middle'){ - diff = availableHeight - (ch + cm.top + cm.bottom); - ch = t + cm.top + (diff/2); - if(diff > 0){ - c.setPosition(c.x, ch); - } - } - if(isStart && c.flex){ - c.setHeight(ch); - } - } - } - // Putting a box layout into an overflowed container is NOT correct and will make a second layout pass necessary. - if (i = target.getStyle('overflow') && i != 'hidden' && !this.adjustmentPass) { - var ts = this.getLayoutTargetSize(); - if (ts.width != size.width || ts.height != size.height){ - this.adjustmentPass = true; - this.onLayout(ct, target); - } - } - delete this.adjustmentPass; - } -}); - -Ext.Container.LAYOUTS.hbox = Ext.layout.HBoxLayout; /** * @class Ext.layout.ToolbarLayout * @extends Ext.layout.ContainerLayout - * Layout manager implicitly used by Ext.Toolbar. + * Layout manager used by Ext.Toolbar. This is highly specialised for use by Toolbars and would not + * usually be used by any other class. */ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { monitorResize : true, - triggerWidth : 18, - lastOverflow : false, + type: 'toolbar', + + /** + * @property triggerWidth + * @type Number + * The width allocated for the menu trigger at the extreme right end of the Toolbar + */ + triggerWidth: 18, + + /** + * @property noItemsMenuText + * @type String + * HTML fragment to render into the toolbar overflow menu if there are no items to display + */ noItemsMenuText : '
      (None)
      ', - // private - onLayout : function(ct, target){ - if(!this.leftTr){ + /** + * @private + * @property lastOverflow + * @type Boolean + * Used internally to record whether the last layout caused an overflow or not + */ + lastOverflow: false, + + /** + * @private + * @property tableHTML + * @type String + * String used to build the HTML injected to support the Toolbar's layout. The align property is + * injected into this string inside the td.x-toolbar-left element during onLayout. + */ + tableHTML: [ + '', + '', + '', + '', + '', + '', + '', + '
      ', + '', + '', + '', + '', + '
      ', + '
      ', + '', + '', + '', + '', + '', + '', + '', + '
      ', + '', + '', + '', + '', + '
      ', + '
      ', + '', + '', + '', + '', + '
      ', + '
      ', + '
      ' + ].join(""), + + /** + * @private + * Create the wrapping Toolbar HTML and render/move all the items into the correct places + */ + onLayout : function(ct, target) { + //render the Toolbar HTML if it's not already present + if (!this.leftTr) { var align = ct.buttonAlign == 'center' ? 'center' : 'left'; + target.addClass('x-toolbar-layout-ct'); - target.insertHtml('beforeEnd', - '
      '); - this.leftTr = target.child('tr.x-toolbar-left-row', true); - this.rightTr = target.child('tr.x-toolbar-right-row', true); + target.insertHtml('beforeEnd', String.format(this.tableHTML, align)); + + this.leftTr = target.child('tr.x-toolbar-left-row', true); + this.rightTr = target.child('tr.x-toolbar-right-row', true); this.extrasTr = target.child('tr.x-toolbar-extras-row', true); + + if (this.hiddenItem == undefined) { + /** + * @property hiddenItems + * @type Array + * Holds all items that are currently hidden due to there not being enough space to render them + * These items will appear on the expand menu. + */ + this.hiddenItems = []; + } } - var side = ct.buttonAlign == 'right' ? this.rightTr : this.leftTr, - pos = 0, - items = ct.items.items; + var side = ct.buttonAlign == 'right' ? this.rightTr : this.leftTr, + items = ct.items.items, + position = 0; - for(var i = 0, len = items.length, c; i < len; i++, pos++) { + //render each item if not already rendered, place it into the correct (left or right) target + for (var i = 0, len = items.length, c; i < len; i++, position++) { c = items[i]; - if(c.isFill){ - side = this.rightTr; - pos = -1; - }else if(!c.rendered){ - c.render(this.insertCell(c, side, pos)); - }else{ - if(!c.xtbHidden && !this.isValidParent(c, side.childNodes[pos])){ - var td = this.insertCell(c, side, pos); + + if (c.isFill) { + side = this.rightTr; + position = -1; + } else if (!c.rendered) { + c.render(this.insertCell(c, side, position)); + this.configureItem(c); + } else { + if (!c.xtbHidden && !this.isValidParent(c, side.childNodes[position])) { + var td = this.insertCell(c, side, position); td.appendChild(c.getPositionEl().dom); c.container = Ext.get(td); } } } + //strip extra empty cells this.cleanup(this.leftTr); this.cleanup(this.rightTr); @@ -22422,194 +25746,289 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { this.fitToSize(target); }, - cleanup : function(row){ - var cn = row.childNodes, i, c; - for(i = cn.length-1; i >= 0 && (c = cn[i]); i--){ - if(!c.firstChild){ - row.removeChild(c); + /** + * @private + * Removes any empty nodes from the given element + * @param {Ext.Element} el The element to clean up + */ + cleanup : function(el) { + var cn = el.childNodes, i, c; + + for (i = cn.length-1; i >= 0 && (c = cn[i]); i--) { + if (!c.firstChild) { + el.removeChild(c); } } }, - insertCell : function(c, side, pos){ + /** + * @private + * Inserts the given Toolbar item into the given element + * @param {Ext.Component} c The component to add + * @param {Ext.Element} target The target to add the component to + * @param {Number} position The position to add the component at + */ + insertCell : function(c, target, position) { var td = document.createElement('td'); - td.className='x-toolbar-cell'; - side.insertBefore(td, side.childNodes[pos]||null); + td.className = 'x-toolbar-cell'; + + target.insertBefore(td, target.childNodes[position] || null); + return td; }, - hideItem : function(item){ - var h = (this.hiddens = this.hiddens || []); - h.push(item); + /** + * @private + * Hides an item because it will not fit in the available width. The item will be unhidden again + * if the Toolbar is resized to be large enough to show it + * @param {Ext.Component} item The item to hide + */ + hideItem : function(item) { + this.hiddenItems.push(item); + item.xtbHidden = true; item.xtbWidth = item.getPositionEl().dom.parentNode.offsetWidth; item.hide(); }, - unhideItem : function(item){ + /** + * @private + * Unhides an item that was previously hidden due to there not being enough space left on the Toolbar + * @param {Ext.Component} item The item to show + */ + unhideItem : function(item) { item.show(); item.xtbHidden = false; - this.hiddens.remove(item); - if(this.hiddens.length < 1){ - delete this.hiddens; - } + this.hiddenItems.remove(item); }, - getItemWidth : function(c){ + /** + * @private + * Returns the width of the given toolbar item. If the item is currently hidden because there + * is not enough room to render it, its previous width is returned + * @param {Ext.Component} c The component to measure + * @return {Number} The width of the item + */ + getItemWidth : function(c) { return c.hidden ? (c.xtbWidth || 0) : c.getPositionEl().dom.parentNode.offsetWidth; }, - fitToSize : function(t){ - if(this.container.enableOverflow === false){ + /** + * @private + * Called at the end of onLayout. At this point the Toolbar has already been resized, so we need + * to fit the items into the available width. We add up the width required by all of the items in + * the toolbar - if we don't have enough space we hide the extra items and render the expand menu + * trigger. + * @param {Ext.Element} target The Element the Toolbar is currently laid out within + */ + fitToSize : function(target) { + if (this.container.enableOverflow === false) { return; } - var w = t.dom.clientWidth, - lw = this.lastWidth || 0, - iw = t.dom.firstChild.offsetWidth, - clipWidth = w - this.triggerWidth, - hideIndex = -1; - this.lastWidth = w; + var width = target.dom.clientWidth, + tableWidth = target.dom.firstChild.offsetWidth, + clipWidth = width - this.triggerWidth, + lastWidth = this.lastWidth || 0, - if(iw > w || (this.hiddens && w >= lw)){ - var i, items = this.container.items.items, - len = items.length, c, - loopWidth = 0; + hiddenItems = this.hiddenItems, + hasHiddens = hiddenItems.length != 0, + isLarger = width >= lastWidth; - for(i = 0; i < len; i++) { - c = items[i]; - if(!c.isFill){ - loopWidth += this.getItemWidth(c); - if(loopWidth > clipWidth){ - if(!(c.hidden || c.xtbHidden)){ - this.hideItem(c); + this.lastWidth = width; + + if (tableWidth > width || (hasHiddens && isLarger)) { + var items = this.container.items.items, + len = items.length, + loopWidth = 0, + item; + + for (var i = 0; i < len; i++) { + item = items[i]; + + if (!item.isFill) { + loopWidth += this.getItemWidth(item); + if (loopWidth > clipWidth) { + if (!(item.hidden || item.xtbHidden)) { + this.hideItem(item); } - }else if(c.xtbHidden){ - this.unhideItem(c); + } else if (item.xtbHidden) { + this.unhideItem(item); } } } } - if(this.hiddens){ + + //test for number of hidden items again here because they may have changed above + hasHiddens = hiddenItems.length != 0; + + if (hasHiddens) { this.initMore(); - if(!this.lastOverflow){ + + if (!this.lastOverflow) { this.container.fireEvent('overflowchange', this.container, true); this.lastOverflow = true; } - }else if(this.more){ + } else if (this.more) { this.clearMenu(); this.more.destroy(); delete this.more; - if(this.lastOverflow){ + + if (this.lastOverflow) { this.container.fireEvent('overflowchange', this.container, false); this.lastOverflow = false; } } }, - createMenuConfig : function(c, hideOnClick){ - var cfg = Ext.apply({}, c.initialConfig), - group = c.toggleGroup; + /** + * @private + * Returns a menu config for a given component. This config is used to create a menu item + * to be added to the expander menu + * @param {Ext.Component} component The component to create the config for + * @param {Boolean} hideOnClick Passed through to the menu item + */ + createMenuConfig : function(component, hideOnClick){ + var config = Ext.apply({}, component.initialConfig), + group = component.toggleGroup; - Ext.apply(cfg, { - text: c.overflowText || c.text, - iconCls: c.iconCls, - icon: c.icon, - itemId: c.itemId, - disabled: c.disabled, - handler: c.handler, - scope: c.scope, - menu: c.menu, + Ext.copyTo(config, component, [ + 'iconCls', 'icon', 'itemId', 'disabled', 'handler', 'scope', 'menu' + ]); + + Ext.apply(config, { + text : component.overflowText || component.text, hideOnClick: hideOnClick }); - if(group || c.enableToggle){ - Ext.apply(cfg, { - group: group, - checked: c.pressed, + + if (group || component.enableToggle) { + Ext.apply(config, { + group : group, + checked: component.pressed, listeners: { checkchange: function(item, checked){ - c.toggle(checked); + component.toggle(checked); } } }); } - delete cfg.ownerCt; - delete cfg.xtype; - delete cfg.id; - return cfg; + + delete config.ownerCt; + delete config.xtype; + delete config.id; + + return config; }, - // private - addComponentToMenu : function(m, c){ - if(c instanceof Ext.Toolbar.Separator){ - m.add('-'); - }else if(Ext.isFunction(c.isXType)){ - 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')){ - c.items.each(function(item){ - this.addComponentToMenu(m, item); + /** + * @private + * Adds the given Toolbar item to the given menu. Buttons inside a buttongroup are added individually. + * @param {Ext.menu.Menu} menu The menu to add to + * @param {Ext.Component} component The component to add + */ + addComponentToMenu : function(menu, component) { + if (component instanceof Ext.Toolbar.Separator) { + menu.add('-'); + + } else if (Ext.isFunction(component.isXType)) { + if (component.isXType('splitbutton')) { + menu.add(this.createMenuConfig(component, true)); + + } else if (component.isXType('button')) { + menu.add(this.createMenuConfig(component, !component.menu)); + + } else if (component.isXType('buttongroup')) { + component.items.each(function(item){ + this.addComponentToMenu(menu, item); }, this); } } }, + /** + * @private + * Deletes the sub-menu of each item in the expander menu. Submenus are created for items such as + * splitbuttons and buttongroups, where the Toolbar item cannot be represented by a single menu item + */ clearMenu : function(){ - var m = this.moreMenu; - if(m && m.items){ - m.items.each(function(item){ + var menu = this.moreMenu; + if (menu && menu.items) { + menu.items.each(function(item){ delete item.menu; }); } }, - // private - beforeMoreShow : function(m){ - var h = this.container.items.items, - len = h.length, - c, - prev, - needsSep = function(group, item){ - return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); - }; + /** + * @private + * Called before the expand menu is shown, this rebuilds the menu since it was last shown because + * it is possible that the items hidden due to space limitations on the Toolbar have changed since. + * @param {Ext.menu.Menu} m The menu + */ + beforeMoreShow : function(menu) { + var items = this.container.items.items, + len = items.length, + item, + prev; + + var needsSep = function(group, item){ + return group.isXType('buttongroup') && !(item instanceof Ext.Toolbar.Separator); + }; this.clearMenu(); - m.removeAll(); - for(var i = 0; i < len; i++){ - c = h[i]; - if(c.xtbHidden){ - if(prev && (needsSep(c, prev) || needsSep(prev, c))){ - m.add('-'); + menu.removeAll(); + for (var i = 0; i < len; i++) { + item = items[i]; + if (item.xtbHidden) { + if (prev && (needsSep(item, prev) || needsSep(prev, item))) { + menu.add('-'); } - this.addComponentToMenu(m, c); - prev = c; + this.addComponentToMenu(menu, item); + prev = item; } } - // put something so the menu isn't empty - // if no compatible items found - if(m.items.length < 1){ - m.add(this.noItemsMenuText); + + // put something so the menu isn't empty if no compatible items found + if (menu.items.length < 1) { + menu.add(this.noItemsMenuText); } }, + /** + * @private + * Creates the expand trigger and menu, adding them to the at the extreme right of the + * Toolbar table + */ initMore : function(){ - if(!this.more){ + if (!this.more) { + /** + * @private + * @property moreMenu + * @type Ext.menu.Menu + * The expand menu - holds items for every Toolbar item that cannot be shown + * because the Toolbar is currently not wide enough. + */ this.moreMenu = new Ext.menu.Menu({ ownerCt : this.container, listeners: { beforeshow: this.beforeMoreShow, scope: this } + }); - }); + /** + * @private + * @property more + * @type Ext.Button + * The expand button which triggers the overflow menu to be shown + */ this.more = new Ext.Button({ - iconCls : 'x-toolbar-more-icon', - cls : 'x-toolbar-more', - menu : this.moreMenu, - ownerCt : this.container + iconCls: 'x-toolbar-more-icon', + cls : 'x-toolbar-more', + menu : this.moreMenu, + ownerCt: this.container }); + var td = this.insertCell(this.more, this.extrasTr, 100); this.more.render(td); } @@ -22624,7 +26043,8 @@ Ext.layout.ToolbarLayout = Ext.extend(Ext.layout.ContainerLayout, { } }); -Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;/** +Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout; +/** * @class Ext.layout.MenuLayout * @extends Ext.layout.ContainerLayout *

      Layout manager used by {@link Ext.menu.Menu}. Generally this class should not need to be used directly.

      @@ -22632,6 +26052,8 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;/** Ext.layout.MenuLayout = Ext.extend(Ext.layout.ContainerLayout, { monitorResize : true, + type: 'menu', + setContainer : function(ct){ this.monitorResize = !ct.floating; // This event is only fired by the menu in IE, used so we don't couple @@ -22645,7 +26067,7 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;/** this.itemTpl = Ext.layout.MenuLayout.prototype.itemTpl = new Ext.XTemplate( '
    • ', '', - '', + '{altText}', '', '
    • ' ); @@ -22670,7 +26092,7 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;/** if (!a.isMenuItem && a.needsIcon) { c.positionEl.addClass('x-menu-list-item-indent'); } - this.configureItem(c, position); + this.configureItem(c); }else if(c && !this.isValidParent(c, target)){ if(Ext.isNumber(position)){ position = target.dom.childNodes[position]; @@ -22680,14 +26102,17 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;/** }, getItemArgs : function(c) { - var isMenuItem = c instanceof Ext.menu.Item; + var isMenuItem = c instanceof Ext.menu.Item, + canHaveIcon = !(isMenuItem || c instanceof Ext.menu.Separator); + return { isMenuItem: isMenuItem, - needsIcon: !isMenuItem && (c.icon || c.iconCls), + needsIcon: canHaveIcon && (c.icon || c.iconCls), icon: c.icon || Ext.BLANK_IMAGE_URL, iconCls: 'x-menu-item-icon ' + (c.iconCls || ''), itemId: 'x-menu-el-' + c.id, - itemCls: 'x-menu-list-item ' + itemCls: 'x-menu-list-item ', + altText: c.altText || '' }; }, @@ -22707,14 +26132,15 @@ Ext.Container.LAYOUTS.toolbar = Ext.layout.ToolbarLayout;/** if(w){ ct.setWidth(w); }else if(Ext.isIE){ - ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8) ? 'auto' : ct.minWidth); + ct.setWidth(Ext.isStrict && (Ext.isIE7 || Ext.isIE8 || Ext.isIE9) ? 'auto' : ct.minWidth); var el = ct.getEl(), t = el.dom.offsetWidth; // force recalc ct.setWidth(ct.getLayoutTarget().getWidth() + el.getFrameWidth('lr')); } } } }); -Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout;/** +Ext.Container.LAYOUTS['menu'] = Ext.layout.MenuLayout; +/** * @class Ext.Viewport * @extends Ext.Container *

      A specialized container representing the viewable application area (the browser viewport).

      @@ -22924,7 +26350,7 @@ new Ext.Panel({ }, footerCfg: { tag: 'h2', - cls: 'x-panel-footer' // same as the Default class + cls: 'x-panel-footer', // same as the Default class html: 'footer html' }, footerCssClass: 'custom-footer', // additional css class, see {@link Ext.element#addClass addClass} @@ -23612,30 +27038,30 @@ new Ext.Panel({ if(this.tbar){ this.elements += ',tbar'; this.topToolbar = this.createToolbar(this.tbar); - delete this.tbar; + this.tbar = null; } if(this.bbar){ this.elements += ',bbar'; this.bottomToolbar = this.createToolbar(this.bbar); - delete this.bbar; + this.bbar = null; } if(this.header === true){ this.elements += ',header'; - delete this.header; + this.header = null; }else if(this.headerCfg || (this.title && this.header !== false)){ this.elements += ',header'; } if(this.footerCfg || this.footer === true){ this.elements += ',footer'; - delete this.footer; + this.footer = null; } if(this.buttons){ this.fbar = this.buttons; - delete this.buttons; + this.buttons = null; } if(this.fbar){ this.createFbar(this.fbar); @@ -23659,8 +27085,8 @@ new Ext.Panel({ }; } }); - //@compat addButton and buttons could possibly be removed - //@target 4.0 + // @compat addButton and buttons could possibly be removed + // @target 4.0 /** * This Panel's Array of buttons as created from the {@link #buttons} * config property. Read only. @@ -23897,9 +27323,12 @@ new Ext.Panel({ if(img){ Ext.fly(img).replaceClass(old, this.iconCls); }else{ - Ext.DomHelper.insertBefore(hd.dom.firstChild, { - tag:'img', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls - }); + var hdspan = hd.child('span.' + this.headerTextCls); + if (hdspan) { + Ext.DomHelper.insertBefore(hdspan.dom, { + tag:'img', alt: '', src: Ext.BLANK_IMAGE_URL, cls:'x-panel-inline-icon '+this.iconCls + }); + } } } } @@ -23933,6 +27362,14 @@ new Ext.Panel({ return this.bottomToolbar; }, + /** + * Returns the {@link Ext.Toolbar toolbar} from the footer ({@link #fbar}) section of the panel. + * @return {Ext.Toolbar} The toolbar + */ + getFooterToolbar : function() { + return this.fbar; + }, + /** * Adds a button to this panel. Note that this method must be called prior to rendering. The preferred * approach is to add buttons via the {@link #buttons} config. @@ -23953,7 +27390,7 @@ new Ext.Panel({ config = Ext.apply({ handler: handler, scope: scope - }, config) + }, config); } return this.fbar.add(config); }, @@ -23965,7 +27402,7 @@ new Ext.Panel({ this.tools = []; } Ext.each(arguments, function(arg){ - this.tools.push(arg) + this.tools.push(arg); }, this); return; } @@ -24032,7 +27469,7 @@ new Ext.Panel({ if(h != this.getToolbarHeight()){ - h = Math.max(0, this.adjustBodyHeight(lsh - this.getFrameHeight())); + h = Math.max(0, lsh - this.getFrameHeight()); bd.setHeight(h); sz = bd.getSize(); this.toolbarHeight = this.getToolbarHeight(); @@ -24141,9 +27578,7 @@ new Ext.Panel({ // private afterEffect : function(anim){ this.syncShadow(); - if(anim !== false){ - this.el.removeClass('x-panel-animated'); - } + this.el.removeClass('x-panel-animated'); }, // private - wraps up an animation param with internal callbacks @@ -24190,7 +27625,7 @@ new Ext.Panel({ Ext.apply(this.createEffect(animArg||true, this.afterCollapse, this), this.collapseDefaults)); }else{ - this[this.collapseEl].hide(); + this[this.collapseEl].hide(this.hideMode); this.afterCollapse(false); } }, @@ -24199,7 +27634,17 @@ new Ext.Panel({ afterCollapse : function(anim){ this.collapsed = true; this.el.addClass(this.collapsedCls); + if(anim !== false){ + this[this.collapseEl].hide(this.hideMode); + } this.afterEffect(anim); + + // Reset lastSize of all sub-components so they KNOW they are in a collapsed container + this.cascade(function(c) { + if (c.lastSize) { + c.lastSize = { width: undefined, height: undefined }; + } + }); this.fireEvent('collapse', this); }, @@ -24228,7 +27673,7 @@ new Ext.Panel({ Ext.apply(this.createEffect(animArg||true, this.afterExpand, this), this.expandDefaults)); }else{ - this[this.collapseEl].show(); + this[this.collapseEl].show(this.hideMode); this.afterExpand(false); } }, @@ -24236,6 +27681,9 @@ new Ext.Panel({ // private afterExpand : function(anim){ this.collapsed = false; + if(anim !== false){ + this[this.collapseEl].show(this.hideMode); + } this.afterEffect(anim); if (this.deferLayout) { delete this.deferLayout; @@ -24272,7 +27720,10 @@ new Ext.Panel({ }, // private - onResize : function(w, h){ + onResize : function(adjWidth, adjHeight, rawWidth, rawHeight){ + var w = adjWidth, + h = adjHeight; + if(Ext.isDefined(w) || Ext.isDefined(h)){ if(!this.collapsed){ // First, set the the Panel's body width. @@ -24313,7 +27764,8 @@ new Ext.Panel({ // At this point, the Toolbars must be layed out for getFrameHeight to find a result. if(Ext.isNumber(h)){ - h = Math.max(0, this.adjustBodyHeight(h - this.getFrameHeight())); + h = Math.max(0, h - this.getFrameHeight()); + //h = Math.max(0, h - (this.getHeight() - this.body.getHeight())); this.body.setHeight(h); }else if(h == 'auto'){ this.body.setHeight(h); @@ -24336,7 +27788,8 @@ new Ext.Panel({ this.onBodyResize(w, h); } this.syncShadow(); - Ext.Panel.superclass.onResize.call(this); + Ext.Panel.superclass.onResize.call(this, adjWidth, adjHeight, rawWidth, rawHeight); + }, // private @@ -24355,7 +27808,7 @@ new Ext.Panel({ return h; }, - // private + // deprecate adjustBodyHeight : function(h){ return h; }, @@ -24391,7 +27844,7 @@ new Ext.Panel({ * header and footer elements, but not including the body height). To retrieve the body height see {@link #getInnerHeight}. * @return {Number} The frame height */ - getFrameHeight : function(){ + getFrameHeight : function() { var h = this.el.getFrameWidth('tb') + this.bwrap.getFrameWidth('tb'); h += (this.tbar ? this.tbar.getHeight() : 0) + (this.bbar ? this.bbar.getHeight() : 0); @@ -24420,7 +27873,10 @@ new Ext.Panel({ * @return {Number} The body height */ getInnerHeight : function(){ - return this.getSize().height - this.getFrameHeight(); + return this.body.getHeight(); + /* Deprecate + return this.getSize().height - this.getFrameHeight(); + */ }, // private @@ -24522,12 +27978,12 @@ panel.load({ this.ft, this.header, this.footer, - this.toolbars, this.tbar, this.bbar, this.body, this.mc, - this.bwrap + this.bwrap, + this.dd ); if (this.fbar) { Ext.destroy( @@ -24535,12 +27991,8 @@ panel.load({ this.fbar.el ); } - }else{ - Ext.destroy( - this.topToolbar, - this.bottomToolbar - ); } + Ext.destroy(this.toolbars); }, // private @@ -24628,8 +28080,9 @@ Ext.extend(Ext.Editor, Ext.Component, { /** * @cfg {Boolean} allowBlur * True to {@link #completeEdit complete the editing process} if in edit mode when the - * field is blurred. Defaults to false. + * field is blurred. Defaults to true. */ + allowBlur: true, /** * @cfg {Boolean/String} autoSize * True for the editor to automatically adopt the size of the underlying field, "width" to adopt the width only, @@ -24860,7 +28313,8 @@ Ext.extend(Ext.Editor, Ext.Component, { delete this.field.lastSize; this.field.setSize(w, h); if(this.el){ - if(Ext.isGecko2 || Ext.isOpera){ + // IE7 in strict mode doesn't size properly. + if(Ext.isGecko2 || Ext.isOpera || (Ext.isIE7 && Ext.isStrict)){ // prevent layer scrollbars this.el.setSize(w, h); } @@ -24887,6 +28341,10 @@ Ext.extend(Ext.Editor, Ext.Component, { if(!this.editing){ return; } + // Assert combo values first + if (this.field.assertValue) { + this.field.assertValue(); + } var v = this.getValue(); if(!this.field.isValid()){ if(this.revertInvalid !== false){ @@ -24944,7 +28402,7 @@ Ext.extend(Ext.Editor, Ext.Component, { // private onBlur : function(){ // selectSameEditor flag allows the same editor to be started without onBlur firing on itself - if(this.allowBlur !== true && this.editing && this.selectSameEditor !== true){ + if(this.allowBlur === true && this.editing && this.selectSameEditor !== true){ this.completeEdit(); } }, @@ -25117,7 +28575,7 @@ cp.colors = ['000000', '993300', '333300']; if(this.value){ var s = this.value; this.value = null; - this.select(s); + this.select(s, true); } }, @@ -25133,8 +28591,9 @@ cp.colors = ['000000', '993300', '333300']; /** * Selects the specified color in the palette (fires the {@link #select} event) * @param {String} color A valid 6-digit color hex code (# will be stripped if included) + * @param {Boolean} suppressEvent (optional) True to stop the select event from firing. Defaults to false. */ - select : function(color){ + select : function(color, suppressEvent){ color = color.replace('#', ''); if(color != this.value || this.allowReselect){ var el = this.el; @@ -25143,7 +28602,9 @@ cp.colors = ['000000', '993300', '333300']; } el.child('a.color-'+color).addClass('x-color-palette-sel'); this.value = color; - this.fireEvent('select', this, color); + if(suppressEvent !== true){ + this.fireEvent('select', this, color); + } } } @@ -25151,8 +28612,7 @@ cp.colors = ['000000', '993300', '333300']; * @cfg {String} autoEl @hide */ }); -Ext.reg('colorpalette', Ext.ColorPalette); -/** +Ext.reg('colorpalette', Ext.ColorPalette);/** * @class Ext.DatePicker * @extends Ext.Component *

      A popup date picker. This class is used by the {@link Ext.form.DateField DateField} class @@ -25192,7 +28652,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { * @cfg {Object} scope * The scope (this reference) in which the {@link #handler} * function will be called. Defaults to this DatePicker instance. - */ + */ /** * @cfg {String} todayTip * A string used to format the message for displaying in a tooltip over the button that @@ -25295,11 +28755,15 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { * In order to support regular expressions, if you are using a date format that has '.' in it, you will have to * escape the dot when restricting dates. For example: ['03\\.08\\.03']. */ - + // private // Set by other components to stop the picker focus being updated when the value changes. focusOnSelect: true, + // default value used to initialise each date in the DatePicker + // (note: 12 noon was chosen because it steers well clear of all DST timezone changes) + initHour: 12, // 24-hour format + // private initComponent : function(){ Ext.DatePicker.superclass.initComponent.call(this); @@ -25330,7 +28794,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { var dd = this.disabledDates, len = dd.length - 1, re = '(?:'; - + Ext.each(dd, function(d, i){ re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i]; if(i != len){ @@ -25406,21 +28870,21 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { focus : function(){ this.update(this.activeDate); }, - + // private onEnable: function(initial){ - Ext.DatePicker.superclass.onEnable.call(this); + Ext.DatePicker.superclass.onEnable.call(this); this.doDisabled(false); this.update(initial ? this.value : this.activeDate); if(Ext.isIE){ this.el.repaint(); } - + }, - + // private onDisable : function(){ - Ext.DatePicker.superclass.onDisable.call(this); + Ext.DatePicker.superclass.onDisable.call(this); this.doDisabled(true); if(Ext.isIE && !Ext.isIE8){ /* Really strange problem in IE6/7, when disabled, have to explicitly @@ -25432,7 +28896,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { }); } }, - + // private doDisabled : function(disabled){ this.keyNav.setDisabled(disabled); @@ -25501,7 +28965,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { if(e.ctrlKey){ this.showPrevMonth(); }else{ - this.update(this.activeDate.add('d', -1)); + this.update(this.activeDate.add('d', -1)); } }, @@ -25509,7 +28973,7 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { if(e.ctrlKey){ this.showNextMonth(); }else{ - this.update(this.activeDate.add('d', 1)); + this.update(this.activeDate.add('d', 1)); } }, @@ -25776,141 +29240,140 @@ Ext.DatePicker = Ext.extend(Ext.BoxComponent, { // private update : function(date, forceRefresh){ if(this.rendered){ - var vd = this.activeDate, vis = this.isVisible(); - this.activeDate = date; - if(!forceRefresh && 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'); - if(vis && !this.cancelFocus){ - Ext.fly(c.dom.firstChild).focus(50); - } - return false; - } - }, this); - return; - } - } - var days = date.getDaysInMonth(), - firstOfMonth = date.getFirstDateOfMonth(), - startingPos = firstOfMonth.getDay()-this.startDay; - - if(startingPos < 0){ - startingPos += 7; - } - days += startingPos; - - var pm = date.add('mo', -1), - prevStart = pm.getDaysInMonth()-startingPos, - cells = this.cells.elements, - textEls = this.textNodes, - // convert everything to numbers so it's fast - day = 86400000, - d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart)).clearTime(), - today = new Date().clearTime().getTime(), - sel = date.clearTime(true).getTime(), - min = this.minDate ? this.minDate.clearTime(true) : Number.NEGATIVE_INFINITY, - max = this.maxDate ? this.maxDate.clearTime(true) : Number.POSITIVE_INFINITY, - ddMatch = this.disabledDatesRE, - ddText = this.disabledDatesText, - ddays = this.disabledDays ? this.disabledDays.join('') : false, - ddaysText = this.disabledDaysText, - format = this.format; - - if(this.showToday){ - var td = new Date().clearTime(), - disable = (td < min || td > max || - (ddMatch && format && ddMatch.test(td.dateFormat(format))) || - (ddays && ddays.indexOf(td.getDay()) != -1)); - - if(!this.disabled){ - this.todayBtn.setDisabled(disable); - this.todayKeyListener[disable ? 'disable' : 'enable'](); - } - } - - 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'; - if(vis){ - Ext.fly(cell.firstChild).focus(50); - } - } - // disabling - if(t < min) { - cell.className = ' x-date-disabled'; - cell.title = cal.minText; - return; - } - if(t > max) { - cell.className = ' x-date-disabled'; - cell.title = cal.maxText; - return; - } - if(ddays){ - if(ddays.indexOf(d.getDay()) != -1){ - cell.title = ddaysText; - cell.className = ' x-date-disabled'; - } - } - if(ddMatch && format){ - var fvalue = d.dateFormat(format); - if(ddMatch.test(fvalue)){ - cell.title = ddText.replace('%0', fvalue); - cell.className = ' x-date-disabled'; - } - } - }; - - var i = 0; - for(; i < startingPos; i++) { - textEls[i].innerHTML = (++prevStart); - d.setDate(d.getDate()+1); - cells[i].className = 'x-date-prevday'; - setCellClass(this, cells[i]); - } - for(; i < days; i++){ - 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, - w = main.offsetWidth; - this.el.setWidth(w + this.el.getBorderWidth('lr')); - Ext.fly(main).setWidth(w); - this.internalRender = true; - // opera does not respect the auto grow header center column - // then, after it gets a width opera refuses to recalculate - // without a second pass - if(Ext.isOpera && !this.secondPass){ - main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px'; - this.secondPass = true; - this.update.defer(10, this, [date]); - } - } + var vd = this.activeDate, vis = this.isVisible(); + this.activeDate = date; + if(!forceRefresh && 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'); + if(vis && !this.cancelFocus){ + Ext.fly(c.dom.firstChild).focus(50); + } + return false; + } + }, this); + return; + } + } + var days = date.getDaysInMonth(), + firstOfMonth = date.getFirstDateOfMonth(), + startingPos = firstOfMonth.getDay()-this.startDay; + + if(startingPos < 0){ + startingPos += 7; + } + days += startingPos; + + var pm = date.add('mo', -1), + prevStart = pm.getDaysInMonth()-startingPos, + cells = this.cells.elements, + textEls = this.textNodes, + // convert everything to numbers so it's fast + d = (new Date(pm.getFullYear(), pm.getMonth(), prevStart, this.initHour)), + today = new Date().clearTime().getTime(), + sel = date.clearTime(true).getTime(), + min = this.minDate ? this.minDate.clearTime(true) : Number.NEGATIVE_INFINITY, + max = this.maxDate ? this.maxDate.clearTime(true) : Number.POSITIVE_INFINITY, + ddMatch = this.disabledDatesRE, + ddText = this.disabledDatesText, + ddays = this.disabledDays ? this.disabledDays.join('') : false, + ddaysText = this.disabledDaysText, + format = this.format; + + if(this.showToday){ + var td = new Date().clearTime(), + disable = (td < min || td > max || + (ddMatch && format && ddMatch.test(td.dateFormat(format))) || + (ddays && ddays.indexOf(td.getDay()) != -1)); + + if(!this.disabled){ + this.todayBtn.setDisabled(disable); + this.todayKeyListener[disable ? 'disable' : 'enable'](); + } + } + + var setCellClass = function(cal, cell){ + cell.title = ''; + var t = d.clearTime(true).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'; + if(vis){ + Ext.fly(cell.firstChild).focus(50); + } + } + // disabling + if(t < min) { + cell.className = ' x-date-disabled'; + cell.title = cal.minText; + return; + } + if(t > max) { + cell.className = ' x-date-disabled'; + cell.title = cal.maxText; + return; + } + if(ddays){ + if(ddays.indexOf(d.getDay()) != -1){ + cell.title = ddaysText; + cell.className = ' x-date-disabled'; + } + } + if(ddMatch && format){ + var fvalue = d.dateFormat(format); + if(ddMatch.test(fvalue)){ + cell.title = ddText.replace('%0', fvalue); + cell.className = ' x-date-disabled'; + } + } + }; + + var i = 0; + for(; i < startingPos; i++) { + textEls[i].innerHTML = (++prevStart); + d.setDate(d.getDate()+1); + cells[i].className = 'x-date-prevday'; + setCellClass(this, cells[i]); + } + for(; i < days; i++){ + 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, + w = main.offsetWidth; + this.el.setWidth(w + this.el.getBorderWidth('lr')); + Ext.fly(main).setWidth(w); + this.internalRender = true; + // opera does not respect the auto grow header center column + // then, after it gets a width opera refuses to recalculate + // without a second pass + if(Ext.isOpera && !this.secondPass){ + main.rows[0].cells[1].style.width = (w - (main.rows[0].cells[0].offsetWidth+main.rows[0].cells[2].offsetWidth)) + 'px'; + this.secondPass = true; + this.update.defer(10, this, [date]); + } + } } }, @@ -26061,12 +29524,180 @@ Ext.LoadMask.prototype = { } } };/** - * @class Ext.Slider + * @class Ext.slider.Thumb + * @extends Object + * Represents a single thumb element on a Slider. This would not usually be created manually and would instead + * be created internally by an {@link Ext.slider.MultiSlider Ext.Slider}. + */ +Ext.slider.Thumb = Ext.extend(Object, { + + /** + * True while the thumb is in a drag operation + * @type Boolean + */ + dragging: false, + + /** + * @constructor + * @cfg {Ext.slider.MultiSlider} slider The Slider to render to (required) + */ + constructor: function(config) { + /** + * @property slider + * @type Ext.slider.MultiSlider + * The slider this thumb is contained within + */ + Ext.apply(this, config || {}, { + cls: 'x-slider-thumb', + + /** + * @cfg {Boolean} constrain True to constrain the thumb so that it cannot overlap its siblings + */ + constrain: false + }); + + Ext.slider.Thumb.superclass.constructor.call(this, config); + + if (this.slider.vertical) { + Ext.apply(this, Ext.slider.Thumb.Vertical); + } + }, + + /** + * Renders the thumb into a slider + */ + render: function() { + this.el = this.slider.innerEl.insertFirst({cls: this.cls}); + + this.initEvents(); + }, + + /** + * Enables the thumb if it is currently disabled + */ + enable: function() { + this.disabled = false; + this.el.removeClass(this.slider.disabledClass); + }, + + /** + * Disables the thumb if it is currently enabled + */ + disable: function() { + this.disabled = true; + this.el.addClass(this.slider.disabledClass); + }, + + /** + * Sets up an Ext.dd.DragTracker for this thumb + */ + initEvents: function() { + var el = this.el; + + el.addClassOnOver('x-slider-thumb-over'); + + this.tracker = new Ext.dd.DragTracker({ + onBeforeStart: this.onBeforeDragStart.createDelegate(this), + onStart : this.onDragStart.createDelegate(this), + onDrag : this.onDrag.createDelegate(this), + onEnd : this.onDragEnd.createDelegate(this), + tolerance : 3, + autoStart : 300 + }); + + this.tracker.initEl(el); + }, + + /** + * @private + * This is tied into the internal Ext.dd.DragTracker. If the slider is currently disabled, + * this returns false to disable the DragTracker too. + * @return {Boolean} False if the slider is currently disabled + */ + onBeforeDragStart : function(e) { + if (this.disabled) { + return false; + } else { + this.slider.promoteThumb(this); + return true; + } + }, + + /** + * @private + * This is tied into the internal Ext.dd.DragTracker's onStart template method. Adds the drag CSS class + * to the thumb and fires the 'dragstart' event + */ + onDragStart: function(e){ + this.el.addClass('x-slider-thumb-drag'); + this.dragging = true; + this.dragStartValue = this.value; + + this.slider.fireEvent('dragstart', this.slider, e, this); + }, + + /** + * @private + * This is tied into the internal Ext.dd.DragTracker's onDrag template method. This is called every time + * the DragTracker detects a drag movement. It updates the Slider's value using the position of the drag + */ + onDrag: function(e) { + var slider = this.slider, + index = this.index, + newValue = this.getNewValue(); + + if (this.constrain) { + var above = slider.thumbs[index + 1], + below = slider.thumbs[index - 1]; + + if (below != undefined && newValue <= below.value) newValue = below.value; + if (above != undefined && newValue >= above.value) newValue = above.value; + } + + slider.setValue(index, newValue, false); + slider.fireEvent('drag', slider, e, this); + }, + + getNewValue: function() { + var slider = this.slider, + pos = slider.innerEl.translatePoints(this.tracker.getXY()); + + return Ext.util.Format.round(slider.reverseValue(pos.left), slider.decimalPrecision); + }, + + /** + * @private + * This is tied to the internal Ext.dd.DragTracker's onEnd template method. Removes the drag CSS class and + * fires the 'changecomplete' event with the new value + */ + onDragEnd: function(e) { + var slider = this.slider, + value = this.value; + + this.el.removeClass('x-slider-thumb-drag'); + + this.dragging = false; + slider.fireEvent('dragend', slider, e); + + if (this.dragStartValue != value) { + slider.fireEvent('changecomplete', slider, value, this); + } + }, + + /** + * @private + * Destroys the thumb + */ + destroy: function(){ + Ext.destroyMembers(this, 'tracker', 'el'); + } +}); + +/** + * @class Ext.slider.MultiSlider * @extends Ext.BoxComponent - * Slider which supports vertical or horizontal orientation, keyboard adjustments, - * configurable snapping, axis clicking and animation. Can be added as an item to - * any container. Example usage: -

      
      + * Slider which supports vertical or horizontal orientation, keyboard adjustments, configurable snapping, axis clicking and animation. Can be added as an item to any container. Example usage:
      +
       new Ext.Slider({
           renderTo: Ext.getBody(),
           width: 200,
      @@ -26075,9 +29706,22 @@ new Ext.Slider({
           minValue: 0,
           maxValue: 100
       });
      -
      +
      + * Sliders can be created with more than one thumb handle by passing an array of values instead of a single one: +
      +new Ext.Slider({
      +    renderTo: Ext.getBody(),
      +    width: 200,
      +    values: [25, 50, 75],
      +    minValue: 0,
      +    maxValue: 100,
      +
      +    //this defaults to true, setting to false allows the thumbs to pass each other
      +    {@link #constrainThumbs}: false
      +});
      +
      */ -Ext.Slider = Ext.extend(Ext.BoxComponent, { +Ext.slider.MultiSlider = Ext.extend(Ext.BoxComponent, { /** * @cfg {Number} value The value to initialize the slider with. Defaults to minValue. */ @@ -26107,8 +29751,17 @@ Ext.Slider = Ext.extend(Ext.BoxComponent, { * @cfg {Number} increment How many units to change the slider when adjusting by drag and drop. Use this option to enable 'snapping'. */ increment: 0, - // private + + /** + * @private + * @property clickRange + * @type Array + * Determines whether or not a click to the slider component is considered to be a user request to change the value. Specified as an array of [top, bottom], + * the click event's 'top' property is compared to these numbers and the click only considered a change request if it falls within them. e.g. if the 'top' + * value of the click event is 4 or 16, the click is not considered a change request as it falls outside of the [5, 15] range + */ clickRange: [5,15], + /** * @cfg {Boolean} clickToChange Determines whether or not clicking on the Slider axis will change the slider. Defaults to true */ @@ -26117,169 +29770,318 @@ Ext.Slider = Ext.extend(Ext.BoxComponent, { * @cfg {Boolean} animate Turn on or off animation. Defaults to true */ animate: true, + /** + * @cfg {Boolean} constrainThumbs True to disallow thumbs from overlapping one another. Defaults to true + */ + constrainThumbs: true, /** - * True while the thumb is in a drag operation - * @type boolean + * @private + * @property topThumbZIndex + * @type Number + * The number used internally to set the z index of the top thumb (see promoteThumb for details) */ - dragging: false, + topThumbZIndex: 10000, // private override initComponent : function(){ if(!Ext.isDefined(this.value)){ this.value = this.minValue; } - Ext.Slider.superclass.initComponent.call(this); + + /** + * @property thumbs + * @type Array + * Array containing references to each thumb + */ + this.thumbs = []; + + Ext.slider.MultiSlider.superclass.initComponent.call(this); + this.keyIncrement = Math.max(this.increment, this.keyIncrement); this.addEvents( /** * @event beforechange * Fires before the slider value is changed. By returning false from an event handler, * you can cancel the event and prevent the slider from changing. - * @param {Ext.Slider} slider The slider + * @param {Ext.slider.MultiSlider} slider The slider * @param {Number} newValue The new value which the slider is being changed to. * @param {Number} oldValue The old value which the slider was previously. */ 'beforechange', + /** * @event change * Fires when the slider value is changed. - * @param {Ext.Slider} slider The slider + * @param {Ext.slider.MultiSlider} slider The slider * @param {Number} newValue The new value which the slider has been changed to. + * @param {Ext.slider.Thumb} thumb The thumb that was changed */ 'change', + /** * @event changecomplete * Fires when the slider value is changed by the user and any drag operations have completed. - * @param {Ext.Slider} slider The slider + * @param {Ext.slider.MultiSlider} slider The slider * @param {Number} newValue The new value which the slider has been changed to. + * @param {Ext.slider.Thumb} thumb The thumb that was changed */ 'changecomplete', + /** * @event dragstart * Fires after a drag operation has started. - * @param {Ext.Slider} slider The slider + * @param {Ext.slider.MultiSlider} slider The slider * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker */ 'dragstart', + /** * @event drag * Fires continuously during the drag operation while the mouse is moving. - * @param {Ext.Slider} slider The slider + * @param {Ext.slider.MultiSlider} slider The slider * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker */ 'drag', + /** * @event dragend * Fires after the drag operation has completed. - * @param {Ext.Slider} slider The slider + * @param {Ext.slider.MultiSlider} slider The slider * @param {Ext.EventObject} e The event fired from Ext.dd.DragTracker */ 'dragend' ); + /** + * @property values + * @type Array + * Array of values to initalize the thumbs with + */ + if (this.values == undefined || Ext.isEmpty(this.values)) this.values = [0]; + + var values = this.values; + + for (var i=0; i < values.length; i++) { + this.addThumb(values[i]); + } + if(this.vertical){ - Ext.apply(this, Ext.Slider.Vertical); + Ext.apply(this, Ext.slider.Vertical); + } + }, + + /** + * Creates a new thumb and adds it to the slider + * @param {Number} value The initial value to set on the thumb. Defaults to 0 + */ + addThumb: function(value) { + var thumb = new Ext.slider.Thumb({ + value : value, + slider : this, + index : this.thumbs.length, + constrain: this.constrainThumbs + }); + this.thumbs.push(thumb); + + //render the thumb now if needed + if (this.rendered) thumb.render(); + }, + + /** + * @private + * Moves the given thumb above all other by increasing its z-index. This is called when as drag + * any thumb, so that the thumb that was just dragged is always at the highest z-index. This is + * required when the thumbs are stacked on top of each other at one of the ends of the slider's + * range, which can result in the user not being able to move any of them. + * @param {Ext.slider.Thumb} topThumb The thumb to move to the top + */ + promoteThumb: function(topThumb) { + var thumbs = this.thumbs, + zIndex, thumb; + + for (var i = 0, j = thumbs.length; i < j; i++) { + thumb = thumbs[i]; + + if (thumb == topThumb) { + zIndex = this.topThumbZIndex; + } else { + zIndex = ''; + } + + thumb.el.setStyle('zIndex', zIndex); } }, // private override - onRender : function(){ + onRender : function() { this.autoEl = { cls: 'x-slider ' + (this.vertical ? 'x-slider-vert' : 'x-slider-horz'), - cn:{cls:'x-slider-end',cn:{cls:'x-slider-inner',cn:[{cls:'x-slider-thumb'},{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}]}} + cn : { + cls: 'x-slider-end', + cn : { + cls:'x-slider-inner', + cn : [{tag:'a', cls:'x-slider-focus', href:"#", tabIndex: '-1', hidefocus:'on'}] + } + } }; - Ext.Slider.superclass.onRender.apply(this, arguments); - this.endEl = this.el.first(); + + Ext.slider.MultiSlider.superclass.onRender.apply(this, arguments); + + this.endEl = this.el.first(); this.innerEl = this.endEl.first(); - this.thumb = this.innerEl.first(); - this.halfThumb = (this.vertical ? this.thumb.getHeight() : this.thumb.getWidth())/2; - this.focusEl = this.thumb.next(); + this.focusEl = this.innerEl.child('.x-slider-focus'); + + //render each thumb + for (var i=0; i < this.thumbs.length; i++) { + this.thumbs[i].render(); + } + + //calculate the size of half a thumb + var thumb = this.innerEl.child('.x-slider-thumb'); + this.halfThumb = (this.vertical ? thumb.getHeight() : thumb.getWidth()) / 2; + this.initEvents(); }, - // private override + /** + * @private + * Adds keyboard and mouse listeners on this.el. Ignores click events on the internal focus element. + * Creates a new DragTracker which is used to control what happens when the user drags the thumb around. + */ initEvents : function(){ - this.thumb.addClassOnOver('x-slider-thumb-over'); this.mon(this.el, { - scope: this, + scope : this, mousedown: this.onMouseDown, - keydown: this.onKeyDown + keydown : this.onKeyDown }); this.focusEl.swallowEvent("click", true); - - this.tracker = new Ext.dd.DragTracker({ - onBeforeStart: this.onBeforeDragStart.createDelegate(this), - onStart: this.onDragStart.createDelegate(this), - onDrag: this.onDrag.createDelegate(this), - onEnd: this.onDragEnd.createDelegate(this), - tolerance: 3, - autoStart: 300 - }); - this.tracker.initEl(this.thumb); }, - // private override + /** + * @private + * Mousedown handler for the slider. If the clickToChange is enabled and the click was not on the draggable 'thumb', + * this calculates the new value of the slider and tells the implementation (Horizontal or Vertical) to move the thumb + * @param {Ext.EventObject} e The click event + */ onMouseDown : function(e){ if(this.disabled){ return; } - if(this.clickToChange && e.target != this.thumb.dom){ + + //see if the click was on any of the thumbs + var thumbClicked = false; + for (var i=0; i < this.thumbs.length; i++) { + thumbClicked = thumbClicked || e.target == this.thumbs[i].el.dom; + } + + if (this.clickToChange && !thumbClicked) { var local = this.innerEl.translatePoints(e.getXY()); this.onClickChange(local); } this.focus(); }, - // private - onClickChange : function(local){ - if(local.top > this.clickRange[0] && local.top < this.clickRange[1]){ - this.setValue(Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true); + /** + * @private + * Moves the thumb to the indicated position. Note that a Vertical implementation is provided in Ext.slider.Vertical. + * Only changes the value if the click was within this.clickRange. + * @param {Object} local Object containing top and left values for the click event. + */ + onClickChange : function(local) { + if (local.top > this.clickRange[0] && local.top < this.clickRange[1]) { + //find the nearest thumb to the click event + var thumb = this.getNearest(local, 'left'), + index = thumb.index; + + this.setValue(index, Ext.util.Format.round(this.reverseValue(local.left), this.decimalPrecision), undefined, true); } }, - // private + /** + * @private + * Returns the nearest thumb to a click event, along with its distance + * @param {Object} local Object containing top and left values from a click event + * @param {String} prop The property of local to compare on. Use 'left' for horizontal sliders, 'top' for vertical ones + * @return {Object} The closest thumb object and its distance from the click event + */ + getNearest: function(local, prop) { + var localValue = prop == 'top' ? this.innerEl.getHeight() - local[prop] : local[prop], + clickValue = this.reverseValue(localValue), + nearestDistance = (this.maxValue - this.minValue) + 5, //add a small fudge for the end of the slider + index = 0, + nearest = null; + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i], + value = thumb.value, + dist = Math.abs(value - clickValue); + + if (Math.abs(dist <= nearestDistance)) { + nearest = thumb; + index = i; + nearestDistance = dist; + } + } + return nearest; + }, + + /** + * @private + * Handler for any keypresses captured by the slider. If the key is UP or RIGHT, the thumb is moved along to the right + * by this.keyIncrement. If DOWN or LEFT it is moved left. Pressing CTRL moves the slider to the end in either direction + * @param {Ext.EventObject} e The Event object + */ onKeyDown : function(e){ - if(this.disabled){e.preventDefault();return;} - var k = e.getKey(); + /* + * The behaviour for keyboard handling with multiple thumbs is currently undefined. + * There's no real sane default for it, so leave it like this until we come up + * with a better way of doing it. + */ + if(this.disabled || this.thumbs.length !== 1){ + e.preventDefault(); + return; + } + var k = e.getKey(), + val; switch(k){ case e.UP: case e.RIGHT: e.stopEvent(); - if(e.ctrlKey){ - this.setValue(this.maxValue, undefined, true); - }else{ - this.setValue(this.value+this.keyIncrement, undefined, true); - } + val = e.ctrlKey ? this.maxValue : this.getValue(0) + this.keyIncrement; + this.setValue(0, val, undefined, true); break; case e.DOWN: case e.LEFT: e.stopEvent(); - if(e.ctrlKey){ - this.setValue(this.minValue, undefined, true); - }else{ - this.setValue(this.value-this.keyIncrement, undefined, true); - } + val = e.ctrlKey ? this.minValue : this.getValue(0) - this.keyIncrement; + this.setValue(0, val, undefined, true); break; default: e.preventDefault(); } }, - // private + /** + * @private + * If using snapping, this takes a desired new value and returns the closest snapped + * value to it + * @param {Number} value The unsnapped value + * @return {Number} The value of the nearest snap target + */ doSnap : function(value){ - if(!(this.increment && value)){ + if (!(this.increment && value)) { return value; } var newValue = value, inc = this.increment, m = value % inc; - if(m != 0){ + if (m != 0) { newValue -= m; - if(m * 2 > inc){ + if (m * 2 >= inc) { newValue += inc; - }else if(m * 2 < -inc){ + } else if (m * 2 < -inc) { newValue -= inc; } } @@ -26288,94 +30090,144 @@ Ext.Slider = Ext.extend(Ext.BoxComponent, { // private afterRender : function(){ - Ext.Slider.superclass.afterRender.apply(this, arguments); - if(this.value !== undefined){ - var v = this.normalizeValue(this.value); - if(v !== this.value){ - delete this.value; - this.setValue(v, false); - }else{ - this.moveThumb(this.translateValue(v), false); + Ext.slider.MultiSlider.superclass.afterRender.apply(this, arguments); + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i]; + + if (thumb.value !== undefined) { + var v = this.normalizeValue(thumb.value); + + if (v !== thumb.value) { + // delete this.value; + this.setValue(i, v, false); + } else { + this.moveThumb(i, this.translateValue(v), false); + } } - } + }; }, - // private + /** + * @private + * Returns the ratio of pixels to mapped values. e.g. if the slider is 200px wide and maxValue - minValue is 100, + * the ratio is 2 + * @return {Number} The ratio of pixels to mapped values + */ getRatio : function(){ var w = this.innerEl.getWidth(), v = this.maxValue - this.minValue; return v == 0 ? w : (w/v); }, - // private + /** + * @private + * Returns a snapped, constrained value when given a desired value + * @param {Number} value Raw number value + * @return {Number} The raw value rounded to the correct d.p. and constrained within the set max and min values + */ normalizeValue : function(v){ v = this.doSnap(v); v = Ext.util.Format.round(v, this.decimalPrecision); v = v.constrain(this.minValue, this.maxValue); return v; }, - + /** - * Sets the minimum value for the slider instance. If the current value is less than the + * Sets the minimum value for the slider instance. If the current value is less than the * minimum value, the current value will be changed. * @param {Number} val The new minimum value */ setMinValue : function(val){ this.minValue = val; - this.syncThumb(); - if(this.value < val){ - this.setValue(val); + var i = 0, + thumbs = this.thumbs, + len = thumbs.length, + t; + + for(; i < len; ++i){ + t = thumbs[i]; + t.value = t.value < val ? val : t.value; } + this.syncThumb(); }, - + /** - * Sets the maximum value for the slider instance. If the current value is more than the + * Sets the maximum value for the slider instance. If the current value is more than the * maximum value, the current value will be changed. * @param {Number} val The new maximum value */ setMaxValue : function(val){ this.maxValue = val; - this.syncThumb(); - if(this.value > val){ - this.setValue(val); + var i = 0, + thumbs = this.thumbs, + len = thumbs.length, + t; + + for(; i < len; ++i){ + t = thumbs[i]; + t.value = t.value > val ? val : t.value; } + this.syncThumb(); }, /** * Programmatically sets the value of the Slider. Ensures that the value is constrained within * the minValue and maxValue. + * @param {Number} index Index of the thumb to move * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue) * @param {Boolean} animate Turn on or off animation, defaults to true */ - setValue : function(v, animate, changeComplete){ + setValue : function(index, v, animate, changeComplete) { + var thumb = this.thumbs[index], + el = thumb.el; + v = this.normalizeValue(v); - if(v !== this.value && this.fireEvent('beforechange', this, v, this.value) !== false){ - this.value = v; - this.moveThumb(this.translateValue(v), animate !== false); - this.fireEvent('change', this, v); - if(changeComplete){ - this.fireEvent('changecomplete', this, v); + + if (v !== thumb.value && this.fireEvent('beforechange', this, v, thumb.value, thumb) !== false) { + thumb.value = v; + if(this.rendered){ + this.moveThumb(index, this.translateValue(v), animate !== false); + this.fireEvent('change', this, v, thumb); + if(changeComplete){ + this.fireEvent('changecomplete', this, v, thumb); + } } } }, - // private - translateValue : function(v){ + /** + * @private + */ + translateValue : function(v) { var ratio = this.getRatio(); return (v * ratio) - (this.minValue * ratio) - this.halfThumb; }, + /** + * @private + * Given a pixel location along the slider, returns the mapped slider value for that pixel. + * E.g. if we have a slider 200px wide with minValue = 100 and maxValue = 500, reverseValue(50) + * returns 200 + * @param {Number} pos The position along the slider to return a mapped value for + * @return {Number} The mapped value for the given position + */ reverseValue : function(pos){ var ratio = this.getRatio(); return (pos + (this.minValue * ratio)) / ratio; }, - // private - moveThumb: function(v, animate){ + /** + * @private + * @param {Number} index Index of the thumb to move + */ + moveThumb: function(index, v, animate){ + var thumb = this.thumbs[index].el; + if(!animate || this.animate === false){ - this.thumb.setLeft(v); + thumb.setLeft(v); }else{ - this.thumb.shift({left: v, stopFx: true, duration:.35}); + thumb.shift({left: v, stopFx: true, duration:.35}); } }, @@ -26384,71 +30236,72 @@ Ext.Slider = Ext.extend(Ext.BoxComponent, { this.focusEl.focus(10); }, - // private - onBeforeDragStart : function(e){ - return !this.disabled; - }, - - // private - onDragStart: function(e){ - this.thumb.addClass('x-slider-thumb-drag'); - this.dragging = true; - this.dragStartValue = this.value; - this.fireEvent('dragstart', this, e); - }, - - // private - onDrag: function(e){ - var pos = this.innerEl.translatePoints(this.tracker.getXY()); - this.setValue(Ext.util.Format.round(this.reverseValue(pos.left), this.decimalPrecision), false); - this.fireEvent('drag', this, e); - }, - - // private - onDragEnd: function(e){ - this.thumb.removeClass('x-slider-thumb-drag'); - this.dragging = false; - this.fireEvent('dragend', this, e); - if(this.dragStartValue != this.value){ - this.fireEvent('changecomplete', this, this.value); - } - }, - // private onResize : function(w, h){ - this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); + var thumbs = this.thumbs, + len = thumbs.length, + i = 0; + + /* + * If we happen to be animating during a resize, the position of the thumb will likely be off + * when the animation stops. As such, just stop any animations before syncing the thumbs. + */ + for(; i < len; ++i){ + thumbs[i].el.stopFx(); + } + // check to see if we're using an auto width + if(Ext.isNumber(w)){ + this.innerEl.setWidth(w - (this.el.getPadding('l') + this.endEl.getPadding('r'))); + } this.syncThumb(); - Ext.Slider.superclass.onResize.apply(this, arguments); + Ext.slider.MultiSlider.superclass.onResize.apply(this, arguments); }, //private onDisable: function(){ - Ext.Slider.superclass.onDisable.call(this); - this.thumb.addClass(this.disabledClass); - if(Ext.isIE){ - //IE breaks when using overflow visible and opacity other than 1. - //Create a place holder for the thumb and display it. - var xy = this.thumb.getXY(); - this.thumb.hide(); - this.innerEl.addClass(this.disabledClass).dom.disabled = true; - if (!this.thumbHolder){ - this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass}); + Ext.slider.MultiSlider.superclass.onDisable.call(this); + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i], + el = thumb.el; + + thumb.disable(); + + if(Ext.isIE){ + //IE breaks when using overflow visible and opacity other than 1. + //Create a place holder for the thumb and display it. + var xy = el.getXY(); + el.hide(); + + this.innerEl.addClass(this.disabledClass).dom.disabled = true; + + if (!this.thumbHolder) { + this.thumbHolder = this.endEl.createChild({cls: 'x-slider-thumb ' + this.disabledClass}); + } + + this.thumbHolder.show().setXY(xy); } - this.thumbHolder.show().setXY(xy); } }, //private onEnable: function(){ - Ext.Slider.superclass.onEnable.call(this); - this.thumb.removeClass(this.disabledClass); - if(Ext.isIE){ - this.innerEl.removeClass(this.disabledClass).dom.disabled = false; - if(this.thumbHolder){ - this.thumbHolder.hide(); + Ext.slider.MultiSlider.superclass.onEnable.call(this); + + for (var i=0; i < this.thumbs.length; i++) { + var thumb = this.thumbs[i], + el = thumb.el; + + thumb.enable(); + + if (Ext.isIE) { + this.innerEl.removeClass(this.disabledClass).dom.disabled = false; + + if (this.thumbHolder) this.thumbHolder.hide(); + + el.show(); + this.syncThumb(); } - this.thumb.show(); - this.syncThumb(); } }, @@ -26458,30 +30311,133 @@ Ext.Slider = Ext.extend(Ext.BoxComponent, { * is resized by a layout, but if it is rendered auto width, this method can be called from * another resize handler to sync the Slider if necessary. */ - syncThumb : function(){ - if(this.rendered){ - this.moveThumb(this.translateValue(this.value)); + syncThumb : function() { + if (this.rendered) { + for (var i=0; i < this.thumbs.length; i++) { + this.moveThumb(i, this.translateValue(this.thumbs[i].value)); + } } }, + /** + * Returns the current value of the slider + * @param {Number} index The index of the thumb to return a value for + * @return {Number} The current value of the slider + */ + getValue : function(index) { + return this.thumbs[index].value; + }, + + /** + * Returns an array of values - one for the location of each thumb + * @return {Array} The set of thumb values + */ + getValues: function() { + var values = []; + + for (var i=0; i < this.thumbs.length; i++) { + values.push(this.thumbs[i].value); + } + + return values; + }, + + // private + beforeDestroy : function(){ + var thumbs = this.thumbs; + for(var i = 0, len = thumbs.length; i < len; ++i){ + thumbs[i].destroy(); + thumbs[i] = null; + } + Ext.destroyMembers(this, 'endEl', 'innerEl', 'focusEl', 'thumbHolder'); + Ext.slider.MultiSlider.superclass.beforeDestroy.call(this); + } +}); + +Ext.reg('multislider', Ext.slider.MultiSlider); + +/** + * @class Ext.slider.SingleSlider + * @extends Ext.slider.MultiSlider + * Slider which supports vertical or horizontal orientation, keyboard adjustments, + * configurable snapping, axis clicking and animation. Can be added as an item to + * any container. Example usage: +
      
      +new Ext.slider.SingleSlider({
      +    renderTo: Ext.getBody(),
      +    width: 200,
      +    value: 50,
      +    increment: 10,
      +    minValue: 0,
      +    maxValue: 100
      +});
      +
      + * The class Ext.slider.SingleSlider is aliased to Ext.Slider for backwards compatibility. + */ +Ext.slider.SingleSlider = Ext.extend(Ext.slider.MultiSlider, { + constructor: function(config) { + config = config || {}; + + Ext.applyIf(config, { + values: [config.value || 0] + }); + + Ext.slider.SingleSlider.superclass.constructor.call(this, config); + }, + /** * Returns the current value of the slider * @return {Number} The current value of the slider */ - getValue : function(){ - return this.value; + getValue: function() { + //just returns the value of the first thumb, which should be the only one in a single slider + return Ext.slider.SingleSlider.superclass.getValue.call(this, 0); + }, + + /** + * Programmatically sets the value of the Slider. Ensures that the value is constrained within + * the minValue and maxValue. + * @param {Number} value The value to set the slider to. (This will be constrained within minValue and maxValue) + * @param {Boolean} animate Turn on or off animation, defaults to true + */ + setValue: function(value, animate) { + var args = Ext.toArray(arguments), + len = args.length; + + //this is to maintain backwards compatiblity for sliders with only one thunb. Usually you must pass the thumb + //index to setValue, but if we only have one thumb we inject the index here first if given the multi-slider + //signature without the required index. The index will always be 0 for a single slider + if (len == 1 || (len <= 3 && typeof arguments[1] != 'number')) { + args.unshift(0); + } + + return Ext.slider.SingleSlider.superclass.setValue.apply(this, args); + }, + + /** + * Synchronizes the thumb position to the proper proportion of the total component width based + * on the current slider {@link #value}. This will be called automatically when the Slider + * is resized by a layout, but if it is rendered auto width, this method can be called from + * another resize handler to sync the Slider if necessary. + */ + syncThumb : function() { + return Ext.slider.SingleSlider.superclass.syncThumb.apply(this, [0].concat(arguments)); }, // private - beforeDestroy : function(){ - Ext.destroyMembers(this, 'endEl', 'innerEl', 'thumb', 'halfThumb', 'focusEl', 'tracker', 'thumbHolder'); - Ext.Slider.superclass.beforeDestroy.call(this); + getNearest : function(){ + // Since there's only 1 thumb, it's always the nearest + return this.thumbs[0]; } }); -Ext.reg('slider', Ext.Slider); + +//backwards compatibility +Ext.Slider = Ext.slider.SingleSlider; + +Ext.reg('slider', Ext.slider.SingleSlider); // private class to support vertical sliders -Ext.Slider.Vertical = { +Ext.slider.Vertical = { onResize : function(w, h){ this.innerEl.setHeight(h - (this.el.getPadding('t') + this.endEl.getPadding('b'))); this.syncThumb(); @@ -26493,28 +30449,40 @@ Ext.Slider.Vertical = { return h/v; }, - moveThumb: function(v, animate){ - if(!animate || this.animate === false){ - this.thumb.setBottom(v); - }else{ - this.thumb.shift({bottom: v, stopFx: true, duration:.35}); + moveThumb: function(index, v, animate) { + var thumb = this.thumbs[index], + el = thumb.el; + + if (!animate || this.animate === false) { + el.setBottom(v); + } else { + el.shift({bottom: v, stopFx: true, duration:.35}); } }, - onDrag: function(e){ - var pos = this.innerEl.translatePoints(this.tracker.getXY()), - bottom = this.innerEl.getHeight()-pos.top; - this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), false); - this.fireEvent('drag', this, e); - }, + onClickChange : function(local) { + if (local.left > this.clickRange[0] && local.left < this.clickRange[1]) { + var thumb = this.getNearest(local, 'top'), + index = thumb.index, + value = this.minValue + this.reverseValue(this.innerEl.getHeight() - local.top); - onClickChange : function(local){ - if(local.left > this.clickRange[0] && local.left < this.clickRange[1]){ - var bottom = this.innerEl.getHeight() - local.top; - this.setValue(this.minValue + Ext.util.Format.round(bottom/this.getRatio(), this.decimalPrecision), undefined, true); + this.setValue(index, Ext.util.Format.round(value, this.decimalPrecision), undefined, true); } } -};/** +}; + +//private class to support vertical dragging of thumbs within a slider +Ext.slider.Thumb.Vertical = { + getNewValue: function() { + var slider = this.slider, + innerEl = slider.innerEl, + pos = innerEl.translatePoints(this.tracker.getXY()), + bottom = innerEl.getHeight() - pos.top; + + return slider.minValue + Ext.util.Format.round(bottom / slider.getRatio(), slider.decimalPrecision); + } +}; +/** * @class Ext.ProgressBar * @extends Ext.BoxComponent *

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

      @@ -26581,8 +30549,8 @@ Ext.ProgressBar = Ext.extend(Ext.BoxComponent, { ); this.el = position ? tpl.insertBefore(position, {cls: this.baseCls}, true) - : tpl.append(ct, {cls: this.baseCls}, true); - + : tpl.append(ct, {cls: this.baseCls}, true); + if(this.id){ this.el.dom.id = this.id; } @@ -26905,7 +30873,7 @@ Ext.dd.DragDrop.prototype = { /** * 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: + * as the linked element, but could be changed to another element. Ex: * Ext.dd.DDProxy * @property dragElId * @type String @@ -26996,7 +30964,9 @@ Ext.dd.DragDrop.prototype = { * Lock this instance * @method lock */ - lock: function() { this.locked = true; }, + lock: function() { + this.locked = true; + }, /** * When set to true, other DD objects in cooperating DDGroups do not receive @@ -27010,7 +30980,9 @@ Ext.dd.DragDrop.prototype = { * Unlock this instace * @method unlock */ - unlock: function() { this.locked = false; }, + unlock: function() { + this.locked = false; + }, /** * By default, all instances can be a drop target. This can be disabled by @@ -27078,7 +31050,6 @@ Ext.dd.DragDrop.prototype = { * The up constraint * @property minY * @type int - * @type int * @private */ minY: 0, @@ -27130,7 +31101,7 @@ Ext.dd.DragDrop.prototype = { primaryButtonOnly: true, /** - * The availabe property is false until the linked dom element is accessible. + * The available property is false until the linked dom element is accessible. * @property available * @type boolean */ @@ -27521,7 +31492,6 @@ Ext.dd.DragDrop.prototype = { this.lastPageX = p[0]; this.lastPageY = p[1]; - this.setStartPosition(p); }, @@ -27663,7 +31633,6 @@ Ext.dd.DragDrop.prototype = { // set the initial element position this.setStartPosition(); - this.b4MouseDown(e); this.onMouseDown(e); @@ -27914,8 +31883,6 @@ Ext.dd.DragDrop.prototype = { * @param {boolean} maintainOffset */ resetConstraints: function() { - - // Maintain offsets if necessary if (this.initPageX || this.initPageX === 0) { // figure out how much this thing has moved @@ -27953,7 +31920,6 @@ Ext.dd.DragDrop.prototype = { * @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. @@ -27990,7 +31956,7 @@ Ext.dd.DragDrop.prototype = { }; })(); -/** +/* * 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 @@ -28021,7 +31987,7 @@ Ext.dd.DragDropMgr = function() { * dimension is the DragDrop item group, the second the DragDrop * object. * @property ids - * @type {string: string} + * @type String[] * @private * @static */ @@ -28032,7 +31998,7 @@ Ext.dd.DragDropMgr = function() { * if the element that generated the mousedown event is actually the * handle and not the html element itself. * @property handleIds - * @type {string: string} + * @type String[] * @private * @static */ @@ -28402,8 +32368,8 @@ Ext.dd.DragDropMgr = function() { * 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 + * @param {DragDrop} oDD the drag obj + * @param {DragDrop} oTargetDD the target * @return {boolean} true if the target is a legal target for the * dd obj * @static @@ -28475,7 +32441,7 @@ Ext.dd.DragDropMgr = function() { */ handleMouseDown: function(e, oDD) { if(Ext.QuickTips){ - Ext.QuickTips.disable(); + Ext.QuickTips.ddDisable(); } if(this.dragCurrent){ // the original browser mouseup wasn't handled (e.g. outside FF browser window) @@ -28533,7 +32499,7 @@ Ext.dd.DragDropMgr = function() { handleMouseUp: function(e) { if(Ext.QuickTips){ - Ext.QuickTips.enable(); + Ext.QuickTips.ddEnable(); } if (! this.dragCurrent) { return; @@ -28908,7 +32874,7 @@ Ext.dd.DragDropMgr = function() { return null; } - var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l; + var el = oDD.getEl(), pos, x1, x2, y1, y2, t, r, b, l, region; try { pos= Ext.lib.Dom.getXY(el); @@ -28928,7 +32894,22 @@ Ext.dd.DragDropMgr = function() { b = y2 + oDD.padding[2]; l = x1 - oDD.padding[3]; - return new Ext.lib.Region( t, r, b, l ); + region = new Ext.lib.Region( t, r, b, l ); + /* + * The code below is to ensure that large scrolling elements will + * only have their visible area recognized as a drop target, otherwise it + * can potentially erronously register as a target when the element scrolls + * over the top of something below it. + */ + el = Ext.get(el.parentNode); + while (el && region) { + if (el.isScrollable()) { + // check whether our element is visible in the view port: + region = region.intersect(el.getRegion()); + } + el = el.parent(); + } + return region; }, /** @@ -28997,6 +32978,9 @@ Ext.dd.DragDropMgr = function() { * @static */ _onUnload: function(e, me) { + Event.removeListener(document, "mouseup", this.handleMouseUp, this); + Event.removeListener(document, "mousemove", this.handleMouseMove, this); + Event.removeListener(window, "resize", this._onResize, this); Ext.dd.DragDropMgr.unregAll(); }, @@ -29190,7 +33174,9 @@ Ext.dd.DragDropMgr = function() { * @return {int} the document's scrollTop * @static */ - getScrollTop: function () { return this.getScroll().top; }, + getScrollTop: function () { + return this.getScroll().top; + }, /** * Gets the scrollLeft @@ -29198,7 +33184,9 @@ Ext.dd.DragDropMgr = function() { * @return {int} the document's scrollTop * @static */ - getScrollLeft: function () { return this.getScroll().left; }, + getScrollLeft: function () { + return this.getScroll().left; + }, /** * Sets the x/y position of an element to the location of the @@ -29218,7 +33206,9 @@ Ext.dd.DragDropMgr = function() { * @method numericSort * @static */ - numericSort: function(a, b) { return (a - b); }, + numericSort: function(a, b) { + return (a - b); + }, /** * Internal counter @@ -29493,8 +33483,6 @@ Ext.extend(Ext.dd.DD, Ext.dd.DragDrop, { * @private */ getTargetCoord: function(iPageX, iPageY) { - - var x = iPageX - this.deltaX; var y = iPageY - this.deltaY; @@ -29965,6 +33953,12 @@ Ext.extend(Ext.dd.DDTarget, Ext.dd.DragDrop, { });/** * @class Ext.dd.DragTracker * @extends Ext.util.Observable + * A DragTracker listens for drag events on an Element and fires events at the start and end of the drag, + * as well as during the drag. This is useful for components such as {@link Ext.slider.MultiSlider}, where there is + * an element that can be dragged around to change the Slider's value. + * DragTracker provides a series of template methods that should be overridden to provide functionality + * in response to detected drag operations. These are onBeforeStart, onStart, onDrag and onEnd. + * See {@link Ext.slider.MultiSlider}'s initEvents function for an example implementation. */ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { /** @@ -29974,7 +33968,7 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { active: false, /** * @cfg {Number} tolerance - * Defaults to 5. + * Number of pixels the drag target must be moved before dragging is considered to have started. Defaults to 5. */ tolerance: 5, /** @@ -30008,7 +34002,7 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { /** * @event dragstart * @param {Object} this - * @param {Object} startXY the page coordinates of the event + * @param {Object} e event object */ 'dragstart', /** @@ -30041,6 +34035,7 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { destroy : function(){ this.el.un('mousedown', this.onMouseDown, this); + delete this.el; }, onMouseDown: function(e, target){ @@ -30050,12 +34045,14 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { 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); + Ext.getDoc().on({ + scope: this, + mouseup: this.onMouseUp, + mousemove: this.onMouseMove, + selectstart: this.stopSelect + }); if(this.autoStart){ - this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this); + this.timer = this.triggerStart.defer(this.autoStart === true ? 1000 : this.autoStart, this, [e]); } } }, @@ -30073,7 +34070,7 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { 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(); + this.triggerStart(e); }else{ return; } @@ -30083,14 +34080,15 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { this.fireEvent('drag', this, e); }, - onMouseUp: function(e){ - var doc = Ext.getDoc(); + onMouseUp: function(e) { + var doc = Ext.getDoc(), + wasActive = this.active; + doc.un('mousemove', this.onMouseMove, this); doc.un('mouseup', this.onMouseUp, this); doc.un('selectstart', this.stopSelect, this); e.preventDefault(); this.clearStart(); - var wasActive = this.active; this.active = false; delete this.elRegion; this.fireEvent('mouseup', this, e); @@ -30100,41 +34098,64 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { } }, - triggerStart: function(isTimer){ + triggerStart: function(e) { this.clearStart(); this.active = true; - this.onStart(this.startXY); - this.fireEvent('dragstart', this, this.startXY); + this.onStart(e); + this.fireEvent('dragstart', this, e); }, - clearStart : function(){ + clearStart : function() { if(this.timer){ clearTimeout(this.timer); delete this.timer; } }, - stopSelect : function(e){ + stopSelect : function(e) { e.stopEvent(); return false; }, - onBeforeStart : function(e){ + /** + * Template method which should be overridden by each DragTracker instance. Called when the user first clicks and + * holds the mouse button down. Return false to disallow the drag + * @param {Ext.EventObject} e The event object + */ + onBeforeStart : function(e) { }, - onStart : function(xy){ + /** + * Template method which should be overridden by each DragTracker instance. Called when a drag operation starts + * (e.g. the user has moved the tracked element beyond the specified tolerance) + * @param {Ext.EventObject} e The event object + */ + onStart : function(xy) { }, - onDrag : function(e){ + /** + * Template method which should be overridden by each DragTracker instance. Called whenever a drag has been detected. + * @param {Ext.EventObject} e The event object + */ + onDrag : function(e) { }, - onEnd : function(e){ + /** + * Template method which should be overridden by each DragTracker instance. Called when a drag operation has been completed + * (e.g. the user clicked and held the mouse down, dragged the element and then released the mouse button) + * @param {Ext.EventObject} e The event object + */ + onEnd : function(e) { }, + /** + * Returns the drag target + * @return {Ext.Element} The element currently being tracked + */ getDragTarget : function(){ return this.dragTarget; }, @@ -30149,8 +34170,8 @@ Ext.dd.DragTracker = Ext.extend(Ext.util.Observable, { }, getOffset : function(constrain){ - var xy = this.getXY(constrain); - var s = this.startXY; + var xy = this.getXY(constrain), + s = this.startXY; return [s[0]-xy[0], s[1]-xy[1]]; }, @@ -30233,14 +34254,19 @@ Ext.dd.ScrollManager = function(){ 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 group = el.ddScrollConfig ? el.ddScrollConfig.ddGroup : undefined, + freq = (el.ddScrollConfig && el.ddScrollConfig.frequency) + ? el.ddScrollConfig.frequency + : Ext.dd.ScrollManager.frequency; + + if (group === undefined || ddm.dragCurrent.ddGroup == group) { + proc.id = setInterval(doScroll, freq); + } }; var onFire = function(e, isDrop){ @@ -30332,7 +34358,7 @@ Ext.dd.ScrollManager = function(){ hthresh : 25, /** - * The number of pixels to scroll in each scroll increment (defaults to 50) + * The number of pixels to scroll in each scroll increment (defaults to 100) * @type Number */ increment : 100, @@ -30356,6 +34382,13 @@ Ext.dd.ScrollManager = function(){ */ animDuration: .4, + /** + * The named drag drop {@link Ext.dd.DragSource#ddGroup group} to which this container belongs (defaults to undefined). + * If a ddGroup is specified, then container scrolling will only occur when a dragged object is in the same ddGroup. + * @type String + */ + ddGroup: undefined, + /** * Manually trigger a cache refresh. */ @@ -30393,7 +34426,7 @@ Ext.dd.Registry = function(){ return { /** * Resgister a drag drop element - * @param {String/HTMLElement) element The id or DOM node to register + * @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 @@ -30427,7 +34460,7 @@ isHandle True if the element passed in triggers
      /** * Unregister a drag drop element - * @param {String/HTMLElement) element The id or DOM node to unregister + * @param {String/HTMLElement} element The id or DOM node to unregister */ unregister : function(el){ var id = getId(el, false); @@ -31027,21 +35060,21 @@ Ext.extend(Ext.dd.DragSource, Ext.dd.DDProxy, { * @param {Mixed} el The container element * @param {Object} config */ -Ext.dd.DropTarget = function(el, config){ - this.el = Ext.get(el); +Ext.dd.DropTarget = Ext.extend(Ext.dd.DDTarget, { - Ext.apply(this, config); + constructor : function(el, config){ + this.el = Ext.get(el); - 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.apply(this, config); -}; + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.el); + } -Ext.extend(Ext.dd.DropTarget, Ext.dd.DDTarget, { + Ext.dd.DropTarget.superclass.constructor.call(this, this.el.dom, this.ddGroup || this.group, + {isTarget: true}); + }, + /** * @cfg {String} ddGroup * A named drag drop group to which this object belongs. If a group is specified, then this object will only @@ -31125,6 +35158,13 @@ Ext.extend(Ext.dd.DropTarget, Ext.dd.DDTarget, { */ notifyDrop : function(dd, e, data){ return false; + }, + + destroy : function(){ + Ext.dd.DropTarget.superclass.destroy.call(this); + if(this.containerScroll){ + Ext.dd.ScrollManager.unregister(this.el); + } } });/** * @class Ext.dd.DragZone @@ -31184,14 +35224,15 @@ myDataView.on('render', function(v) { * @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.dd.DragZone = Ext.extend(Ext.dd.DragSource, { + + constructor : function(el, config){ + Ext.dd.DragZone.superclass.constructor.call(this, el, config); + if(this.containerScroll){ + Ext.dd.ScrollManager.register(this.el); + } + }, -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 ddel property, but can contain @@ -31251,6 +35292,13 @@ Ext.extend(Ext.dd.DragZone, Ext.dd.DragSource, { */ getRepairXY : function(e){ return Ext.Element.fly(this.dragData.ddel).getXY(); + }, + + destroy : function(){ + Ext.dd.DragZone.superclass.destroy.call(this); + if(this.containerScroll){ + Ext.dd.ScrollManager.unregister(this.el); + } } });/** * @class Ext.dd.DropZone @@ -31607,8 +35655,7 @@ restActions : { /** * Returns true if supplied action-name is a valid API action defined in {@link #actions} constants - * @param {String} action - * @param {String[]}(Optional) List of available CRUD actions. Pass in list when executing multiple times for efficiency. + * @param {String} action Action to test for availability. * @return {Boolean} */ isAction : function(action) { @@ -31640,7 +35687,7 @@ restActions : { /** * Returns true if the supplied API is valid; that is, check that all keys match defined actions * otherwise returns an array of mistakes. - * @return {String[]||true} + * @return {String[]|true} */ isValid : function(api){ var invalid = []; @@ -31980,7 +36027,7 @@ var myNewRecord = new TopicRecord( myStore.{@link Ext.data.Store#add add}(myNewRecord); * @method create - * @return {function} A constructor which is used to create new Records according + * @return {Function} A constructor which is used to create new Records according * to the definition. The constructor has the same signature as {@link #Record}. * @static */ @@ -32142,7 +36189,7 @@ rec.{@link #commit}(); // updates the view // private afterEdit : function(){ - if(this.store){ + if (this.store != undefined && typeof this.store.afterEdit == "function") { this.store.afterEdit(this); } }, @@ -32638,10 +36685,25 @@ sortInfo: { dir : 'dir' }, + isDestroyed: false, + hasMultiSort: false, + // private batchKey : '_ext_batch_', constructor : function(config){ + /** + * @property multiSort + * @type Boolean + * True if this store is currently sorted by more than one field/direction combination. + */ + + /** + * @property isDestroyed + * @type Boolean + * True if the store has been destroyed already. Read only + */ + this.data = new Ext.util.MixedCollection(false); this.data.getKey = function(o){ return o.id; @@ -32819,7 +36881,7 @@ sortInfo: { * @event clear * Fires when the data cache has been cleared. * @param {Store} this - * @param {Record[]} The records that were cleared. + * @param {Record[]} records The records that were cleared. */ 'clear', /** @@ -32863,7 +36925,7 @@ sortInfo: { * @event beforewrite * @param {Ext.data.Store} store * @param {String} action [Ext.data.Api.actions.create|update|destroy] - * @param {Record/Array[Record]} rs + * @param {Record/Record[]} rs The Record(s) being written. * @param {Object} options The loading options that were specified. Edit options.params to add Http parameters to the request. (see {@link #save} for details) * @param {Object} arg The callback's arg object passed to the {@link #request} function */ @@ -32990,19 +37052,31 @@ sortInfo: { * @param {Ext.data.Record[]} records An Array of Ext.data.Record objects * to add to the cache. See {@link #recordType}. */ - add : function(records){ + add : function(records) { + var i, len, record, index; + records = [].concat(records); - if(records.length < 1){ + if (records.length < 1) { return; } - for(var i = 0, len = records.length; i < len; i++){ - records[i].join(this); + + for (i = 0, len = records.length; i < len; i++) { + record = records[i]; + + record.join(this); + + if (record.dirty || record.phantom) { + this.modified.push(record); + } } - var index = this.data.length; + + index = this.data.length; this.data.addAll(records); - if(this.snapshot){ + + if (this.snapshot) { this.snapshot.addAll(records); } + this.fireEvent('add', this, records, index); }, @@ -33016,6 +37090,23 @@ sortInfo: { this.insert(index, record); }, + /** + * @private + * Update a record within the store with a new reference + */ + doUpdate: function(rec){ + var id = rec.id; + // unjoin the old record + this.getById(id).join(null); + + this.data.replace(id, rec); + if (this.snapshot) { + this.snapshot.replace(id, rec); + } + rec.join(this); + this.fireEvent('update', this, rec, Ext.data.Record.COMMIT); + }, + /** * Remove Records from the Store and fires the {@link #remove} event. * @param {Ext.data.Record/Ext.data.Record[]} record The record object or array of records to remove from the cache. @@ -33025,6 +37116,7 @@ sortInfo: { Ext.each(record, function(r){ this.remove(r); }, this); + return; } var index = this.data.indexOf(record); if(index > -1){ @@ -33084,15 +37176,25 @@ sortInfo: { * @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){ + insert : function(index, records) { + var i, len, record; + records = [].concat(records); - for(var i = 0, len = records.length; i < len; i++){ - this.data.insert(index, records[i]); - records[i].join(this); + for (i = 0, len = records.length; i < len; i++) { + record = records[i]; + + this.data.insert(index + i, record); + record.join(this); + + if (record.dirty || record.phantom) { + this.modified.push(record); + } } - if(this.snapshot){ + + if (this.snapshot) { this.snapshot.addAll(records); } + this.fireEvent('add', this, records, index); }, @@ -33190,11 +37292,11 @@ sortInfo: { * false, the load call will abort and will return false; otherwise will return true. */ load : function(options) { - options = options || {}; + options = Ext.apply({}, options); this.storeOptions(options); if(this.sortInfo && this.remoteSort){ var pn = this.paramNames; - options.params = options.params || {}; + options.params = Ext.apply({}, options.params); options.params[pn.sort] = this.sortInfo.field; options.params[pn.dir] = this.sortInfo.direction; } @@ -33221,17 +37323,26 @@ sortInfo: { }, /** + * @private * Should not be used directly. Store#add will call this automatically if a Writer is set * @param {Object} store - * @param {Object} rs + * @param {Object} records * @param {Object} index - * @private */ - createRecords : function(store, rs, index) { - for (var i = 0, len = rs.length; i < len; i++) { - if (rs[i].phantom && rs[i].isValid()) { - rs[i].markDirty(); // <-- Mark new records dirty - this.modified.push(rs[i]); // <-- add to modified + createRecords : function(store, records, index) { + var modified = this.modified, + length = records.length, + record, i; + + for (i = 0; i < length; i++) { + record = records[i]; + + if (record.phantom && record.isValid()) { + record.markDirty(); // <-- Mark new records dirty (Ed: why?) + + if (modified.indexOf(record) == -1) { + modified.push(record); + } } } if (this.autoSave === true) { @@ -33240,9 +37351,9 @@ sortInfo: { }, /** - * Destroys a record or records. Should not be used directly. It's called by Store#remove if a Writer is set. - * @param {Store} this - * @param {Ext.data.Record/Ext.data.Record[]} + * Destroys a Record. Should not be used directly. It's called by Store#remove if a Writer is set. + * @param {Store} store this + * @param {Ext.data.Record} record * @param {Number} index * @private */ @@ -33348,7 +37459,8 @@ sortInfo: { len, trans, batch, - data = {}; + data = {}, + i; // DESTROY: First check for removed records. Records in this.removed are guaranteed non-phantoms. @see Store#remove if(this.removed.length){ queue.push(['destroy', this.removed]); @@ -33359,7 +37471,7 @@ sortInfo: { if(rs.length){ // CREATE: Next check for phantoms within rs. splice-off and execute create. var phantoms = []; - for(var i = rs.length-1; i >= 0; i--){ + for(i = rs.length-1; i >= 0; i--){ if(rs[i].phantom === true){ var rec = rs.splice(i, 1).shift(); if(rec.isValid()){ @@ -33382,12 +37494,12 @@ sortInfo: { len = queue.length; if(len){ batch = ++this.batchCounter; - for(var i = 0; i < len; ++i){ + for(i = 0; i < len; ++i){ trans = queue[i]; data[trans[0]] = trans[1]; } if(this.fireEvent('beforesave', this, data) !== false){ - for(var i = 0; i < len; ++i){ + for(i = 0; i < len; ++i){ trans = queue[i]; this.doTransaction(trans[0], trans[1], batch); } @@ -33426,7 +37538,7 @@ sortInfo: { id: batch, count: 0, data: {} - } + }; } ++o.count; }, @@ -33435,7 +37547,6 @@ sortInfo: { var b = this.batches, key = this.batchKey + batch, o = b[key], - data, arr; @@ -33500,7 +37611,6 @@ sortInfo: { if (success === true) { try { this.reader.realize(rs, data); - this.reMap(rs); } catch (e) { this.handleException(e); @@ -33574,6 +37684,8 @@ myStore.reload(lastOptions); // private // Called as a callback by the Reader during a load operation. loadRecords : function(o, options, success){ + var i, len; + if (this.isDestroyed === true) { return; } @@ -33591,7 +37703,7 @@ myStore.reload(lastOptions); if(this.pruneModifiedRecords){ this.modified = []; } - for(var i = 0, len = r.length; i < len; i++){ + for(i = 0, len = r.length; i < len; i++){ r[i].join(this); } if(this.snapshot){ @@ -33604,8 +37716,20 @@ myStore.reload(lastOptions); this.applySort(); this.fireEvent('datachanged', this); }else{ - this.totalLength = Math.max(t, this.data.length+r.length); - this.add(r); + var toAdd = [], + rec, + cnt = 0; + for(i = 0, len = r.length; i < len; ++i){ + rec = r[i]; + if(this.indexOfId(rec.id) > -1){ + this.doUpdate(rec); + }else{ + toAdd.push(rec); + ++cnt; + } + } + this.totalLength = Math.max(t, this.data.length + cnt); + this.add(toAdd); } this.fireEvent('load', this, r, options); if(options.callback){ @@ -33668,34 +37792,96 @@ myStore.reload(lastOptions); return this.sortInfo; }, - // private + /** + * @private + * Invokes sortData if we have sortInfo to sort on and are not sorting remotely + */ applySort : function(){ - if(this.sortInfo && !this.remoteSort){ - var s = this.sortInfo, f = s.field; - this.sortData(f, s.direction); + if ((this.sortInfo || this.multiSortInfo) && !this.remoteSort) { + this.sortData(); } }, - // 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); + /** + * @private + * Performs the actual sorting of data. This checks to see if we currently have a multi sort or not. It applies + * each sorter field/direction pair in turn by building an OR'ed master sorting function and running it against + * the full dataset + */ + sortData : function() { + var sortInfo = this.hasMultiSort ? this.multiSortInfo : this.sortInfo, + direction = sortInfo.direction || "ASC", + sorters = sortInfo.sorters, + sortFns = []; + + //if we just have a single sorter, pretend it's the first in an array + if (!this.hasMultiSort) { + sorters = [{direction: direction, field: sortInfo.field}]; + } + + //create a sorter function for each sorter field/direction combo + for (var i=0, j = sorters.length; i < j; i++) { + sortFns.push(this.createSortFunction(sorters[i].field, sorters[i].direction)); + } + + if (sortFns.length == 0) { + return; + } + + //the direction modifier is multiplied with the result of the sorting functions to provide overall sort direction + //(as opposed to direction per field) + var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; + + //create a function which ORs each sorter together to enable multi-sort + var fn = function(r1, r2) { + var result = sortFns[0].call(this, r1, r2); + + //if we have more than one sorter, OR any additional sorter functions together + if (sortFns.length > 1) { + for (var i=1, j = sortFns.length; i < j; i++) { + result = result || sortFns[i].call(this, r1, r2); + } + } + + return directionModifier * result; }; + + //sort the data this.data.sort(direction, fn); - if(this.snapshot && this.snapshot != this.data){ + if (this.snapshot && this.snapshot != this.data) { this.snapshot.sort(direction, fn); } }, + /** + * @private + * Creates and returns a function which sorts an array by the given field and direction + * @param {String} field The field to create the sorter for + * @param {String} direction The direction to sort by (defaults to "ASC") + * @return {Function} A function which sorts by the field/direction combination provided + */ + createSortFunction: function(field, direction) { + direction = direction || "ASC"; + var directionModifier = direction.toUpperCase() == "DESC" ? -1 : 1; + + var sortType = this.fields.get(field).sortType; + + //create a comparison function. Takes 2 records, returns 1 if record 1 is greater, + //-1 if record 2 is greater or 0 if they are equal + return function(r1, r2) { + var v1 = sortType(r1.data[field]), + v2 = sortType(r2.data[field]); + + return directionModifier * (v1 > v2 ? 1 : (v1 < v2 ? -1 : 0)); + }; + }, + /** * Sets the default sort column and order to be used by the next {@link #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){ + setDefaultSort : function(field, dir) { dir = dir ? dir.toUpperCase() : 'ASC'; this.sortInfo = {field: field, direction: dir}; this.sortToggle[field] = dir; @@ -33705,38 +37891,112 @@ myStore.reload(lastOptions); * 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. See also {@link #remoteSort} and {@link #paramNames}. + * This function accepts two call signatures - pass in a field name as the first argument to sort on a single + * field, or pass in an array of sort configuration objects to sort by multiple fields. + * Single sort example: + * store.sort('name', 'ASC'); + * Multi sort example: + * store.sort([ + * { + * field : 'name', + * direction: 'ASC' + * }, + * { + * field : 'salary', + * direction: 'DESC' + * } + * ], 'ASC'); + * In this second form, the sort configs are applied in order, with later sorters sorting within earlier sorters' results. + * For example, if two records with the same name are present they will also be sorted by salary if given the sort configs + * above. Any number of sort configs can be added. + * @param {String/Array} fieldName The name of the field to sort by, or an array of ordered sort configs + * @param {String} dir (optional) The sort order, 'ASC' or 'DESC' (case-sensitive, defaults to 'ASC') + */ + sort : function(fieldName, dir) { + if (Ext.isArray(arguments[0])) { + return this.multiSort.call(this, fieldName, dir); + } else { + return this.singleSort(fieldName, dir); + } + }, + + /** + * Sorts the store contents by a single field and direction. This is called internally by {@link sort} and would + * not usually be called manually * @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){ + singleSort: function(fieldName, dir) { + var field = this.fields.get(fieldName); + if (!field) { 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 name = field.name, + sortInfo = this.sortInfo || null, + sortToggle = this.sortToggle ? this.sortToggle[name] : null; + + if (!dir) { + if (sortInfo && sortInfo.field == name) { // toggle sort dir + dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC'); + } else { + dir = field.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{ + this.sortToggle[name] = dir; + this.sortInfo = {field: name, direction: dir}; + this.hasMultiSort = false; + + if (this.remoteSort) { if (!this.load(this.lastOptions)) { - if (st) { - this.sortToggle[f.name] = st; + if (sortToggle) { + this.sortToggle[name] = sortToggle; } - if (si) { - this.sortInfo = si; + if (sortInfo) { + this.sortInfo = sortInfo; } } + } else { + this.applySort(); + this.fireEvent('datachanged', this); + } + return true; + }, + + /** + * Sorts the contents of this store by multiple field/direction sorters. This is called internally by {@link sort} + * and would not usually be called manually. + * Multi sorting only currently applies to local datasets - multiple sort data is not currently sent to a proxy + * if remoteSort is used. + * @param {Array} sorters Array of sorter objects (field and direction) + * @param {String} direction Overall direction to sort the ordered results by (defaults to "ASC") + */ + multiSort: function(sorters, direction) { + this.hasMultiSort = true; + direction = direction || "ASC"; + + //toggle sort direction + if (this.multiSortInfo && direction == this.multiSortInfo.direction) { + direction = direction.toggle("ASC", "DESC"); + } + + /** + * Object containing overall sort direction and an ordered array of sorter configs used when sorting on multiple fields + * @property multiSortInfo + * @type Object + */ + this.multiSortInfo = { + sorters : sorters, + direction: direction + }; + + if (this.remoteSort) { + this.singleSort(sorters[0].field, sorters[0].direction); + + } else { + this.applySort(); + this.fireEvent('datachanged', this); } }, @@ -33764,17 +38024,6 @@ myStore.reload(lastOptions); return this.modified; }, - // private - createFilterFn : function(property, value, anyMatch, caseSensitive){ - if(Ext.isEmpty(value, false)){ - return false; - } - value = this.data.createValueMatcher(value, anyMatch, caseSensitive); - return function(r){ - return value.test(r.data[property]); - }; - }, - /** * Sums the value of property for each {@link Ext.data.Record record} between start * and end and returns the result. @@ -33795,15 +38044,109 @@ myStore.reload(lastOptions); }, /** - * Filter the {@link Ext.data.Record records} by a specified property. - * @param {String} field A field on your records + * @private + * Returns a filter function used to test a the given property's value. Defers most of the work to + * Ext.util.MixedCollection's createValueMatcher function + * @param {String} property The property to create the filter function for + * @param {String/RegExp} value The string/regex to compare the property value to + * @param {Boolean} anyMatch True if we don't care if the filter value is not the full value (defaults to false) + * @param {Boolean} caseSensitive True to create a case-sensitive regex (defaults to false) + * @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true. + */ + createFilterFn : function(property, value, anyMatch, caseSensitive, exactMatch){ + if(Ext.isEmpty(value, false)){ + return false; + } + value = this.data.createValueMatcher(value, anyMatch, caseSensitive, exactMatch); + return function(r) { + return value.test(r.data[property]); + }; + }, + + /** + * @private + * Given an array of filter functions (each with optional scope), constructs and returns a single function that returns + * the result of all of the filters ANDed together + * @param {Array} filters The array of filter objects (each object should contain an 'fn' and optional scope) + * @return {Function} The multiple filter function + */ + createMultipleFilterFn: function(filters) { + return function(record) { + var isMatch = true; + + for (var i=0, j = filters.length; i < j; i++) { + var filter = filters[i], + fn = filter.fn, + scope = filter.scope; + + isMatch = isMatch && fn.call(scope, record); + } + + return isMatch; + }; + }, + + /** + * Filter the {@link Ext.data.Record records} by a specified property. Alternatively, pass an array of filter + * options to filter by more than one property. + * Single filter example: + * store.filter('name', 'Ed', true, true); //finds all records containing the substring 'Ed' + * Multiple filter example: + *
      
      +     * store.filter([
      +     *   {
      +     *     property     : 'name',
      +     *     value        : 'Ed',
      +     *     anyMatch     : true, //optional, defaults to true
      +     *     caseSensitive: true  //optional, defaults to true
      +     *   },
      +     *
      +     *   //filter functions can also be passed
      +     *   {
      +     *     fn   : function(record) {
      +     *       return record.get('age') == 24
      +     *     },
      +     *     scope: this
      +     *   }
      +     * ]);
      +     * 
      + * @param {String|Array} field A field on your records, or an array containing multiple filter options * @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 + * @param {Boolean} exactMatch True to force exact match (^ and $ characters added to the regex). Defaults to false. Ignored if anyMatch is true. */ - filter : function(property, value, anyMatch, caseSensitive){ - var fn = this.createFilterFn(property, value, anyMatch, caseSensitive); + filter : function(property, value, anyMatch, caseSensitive, exactMatch){ + var fn; + //we can accept an array of filter objects, or a single filter object - normalize them here + if (Ext.isObject(property)) { + property = [property]; + } + + if (Ext.isArray(property)) { + var filters = []; + + //normalize the filters passed into an array of filter functions + for (var i=0, j = property.length; i < j; i++) { + var filter = property[i], + func = filter.fn, + scope = filter.scope || this; + + //if we weren't given a filter function, construct one now + if (!Ext.isFunction(func)) { + func = this.createFilterFn(filter.property, filter.value, filter.anyMatch, filter.caseSensitive, filter.exactMatch); + } + + filters.push({fn: func, scope: scope}); + } + + fn = this.createMultipleFilterFn(filters); + } else { + //classic single property filter + fn = this.createFilterFn(property, value, anyMatch, caseSensitive, exactMatch); + } + return fn ? this.filterBy(fn) : this.clearFilter(); }, @@ -33820,10 +38163,33 @@ myStore.reload(lastOptions); */ filterBy : function(fn, scope){ this.snapshot = this.snapshot || this.data; - this.data = this.queryBy(fn, scope||this); + this.data = this.queryBy(fn, scope || this); this.fireEvent('datachanged', this); }, + /** + * Revert to a view of the Record cache with no filtering applied. + * @param {Boolean} suppressEvent If true the filter is cleared silently without firing the + * {@link #datachanged} event. + */ + 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; + }, + /** * Query the records by a specified property. * @param {String} field A field on your records @@ -33921,29 +38287,6 @@ myStore.reload(lastOptions); 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 firing the - * {@link #datachanged} event. - */ - 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){ @@ -33970,28 +38313,39 @@ myStore.reload(lastOptions); * 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(); + var modified = this.modified.slice(0), + length = modified.length, + i; + + for (i = 0; i < length; i++){ + modified[i].commit(); } + + this.modified = []; + this.removed = []; }, /** * {@link Ext.data.Record#reject Reject} outstanding changes on all {@link #getModifiedRecords modified records}. */ - rejectChanges : function(){ - var m = this.modified.slice(0); + rejectChanges : function() { + var modified = this.modified.slice(0), + removed = this.removed.slice(0).reverse(), + mLength = modified.length, + rLength = removed.length, + i; + + for (i = 0; i < mLength; i++) { + modified[i].reject(); + } + + for (i = 0; i < rLength; i++) { + this.insert(removed[i].lastIndex || 0, removed[i]); + removed[i].reject(); + } + this.modified = []; - for(var i = 0, len = m.length; i < len; i++){ - m[i].reject(); - } - var m = this.removed.slice(0).reverse(); - this.removed = []; - for(var i = 0, len = m.length; i < len; i++){ - this.insert(m[i].lastIndex||0, m[i]); - m[i].reject(); - } + this.removed = []; }, // private @@ -34059,109 +38413,49 @@ Ext.apply(Ext.data.Store.Error.prototype, { *

      Developers do not need to instantiate this class. Instances are created by {@link Ext.data.Record.create} * and cached in the {@link Ext.data.Record#fields fields} property of the created Record constructor's prototype.

      */ -Ext.data.Field = function(config){ - if(typeof config == "string"){ - config = {name: config}; - } - Ext.apply(this, config); +Ext.data.Field = Ext.extend(Object, { - 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; + constructor : function(config){ + if(Ext.isString(config)){ + config = {name: config}; } - } + Ext.apply(this, config); - // 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": - 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; - default: - cv = function(v){ return v; }; - break; + var types = Ext.data.Types, + st = this.sortType, + t; + if(this.type){ + if(Ext.isString(this.type)){ + this.type = Ext.data.Types[this.type.toUpperCase()] || types.AUTO; + } + }else{ + this.type = types.AUTO; } - this.convert = cv; - } -}; -Ext.data.Field.prototype = { + // named sortTypes are supported, here we look them up + if(Ext.isString(st)){ + this.sortType = Ext.data.SortTypes[st]; + }else if(Ext.isEmpty(st)){ + this.sortType = this.type.sortType; + } + + if(!this.convert){ + this.convert = this.type.convert; + } + }, + /** * @cfg {String} name * The name by which the field is referenced within the Record. This is referenced by, for example, - * the dataIndex property in column definition objects passed to {@link Ext.grid.ColumnModel}. - *

      Note: In the simplest case, if no properties other than name are required, a field + * the dataIndex property in column definition objects passed to {@link Ext.grid.ColumnModel}. + *

      Note: In the simplest case, if no properties other than name are required, a field * definition may consist of just a String for the field name.

      */ /** - * @cfg {String} type - * (Optional) The data type for conversion to displayable value if {@link Ext.data.Field#convert convert} - * has not been specified. Possible values are + * @cfg {Mixed} type + * (Optional) The data type for automatic conversion from received data to the stored value if {@link Ext.data.Field#convert convert} + * has not been specified. This may be specified as a string value. Possible values are *
        *
      • auto (Default, implies no conversion)
      • *
      • string
      • @@ -34169,13 +38463,16 @@ Ext.data.Field.prototype = { *
      • float
      • *
      • boolean
      • *
      • date
      + *

      This may also be specified by referencing a member of the {@link Ext.data.Types} class.

      + *

      Developers may create their own application-specific data types by defining new members of the + * {@link Ext.data.Types} class.

      */ /** * @cfg {Function} convert * (Optional) A function which converts the value provided by the Reader into an object that will be stored * in the Record. It is passed the following parameters:
        *
      • v : Mixed
        The data value as read by the Reader, if undefined will use - * the configured {@link Ext.data.Field#defaultValue defaultValue}.
      • + * the configured {@link Ext.data.Field#defaultValue defaultValue}.
      *
    • rec : Mixed
      The data object containing the row as read by the Reader. * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object * ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).
    • @@ -34229,15 +38526,24 @@ var myData = [ */ /** * @cfg {String} dateFormat - * (Optional) A format string for the {@link Date#parseDate Date.parseDate} function, or "timestamp" if the + *

      (Optional) Used when converting received data into a Date when the {@link #type} is specified as "date".

      + *

      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. + * javascript millisecond timestamp. See {@link Date}

      */ dateFormat: null, + + /** + * @cfg {Boolean} useNull + *

      (Optional) Use when converting received data into a Number type (either int or float). If the value cannot be parsed, + * null will be used if useNull is true, otherwise the value will be 0. Defaults to false + */ + useNull: false, + /** * @cfg {Mixed} defaultValue * (Optional) The default value used when a Record is being created by a {@link Ext.data.Reader Reader} - * when the item referenced by the {@link Ext.data.Field#mapping mapping} does not exist in the data + * when the item referenced by the {@link Ext.data.Field#mapping mapping} does not exist in the data * object (i.e. undefined). (defaults to "") */ defaultValue: "", @@ -34285,18 +38591,19 @@ sortType: function(value) { sortType : null, /** * @cfg {String} sortDir - * (Optional) Initial direction to sort ("ASC" or "DESC"). Defaults to - * "ASC". + * (Optional) Initial direction to sort ("ASC" or "DESC"). Defaults to + * "ASC". */ sortDir : "ASC", /** * @cfg {Boolean} allowBlank - * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to true. + * (Optional) Used for validating a {@link Ext.data.Record record}, defaults to true. * An empty value here will cause {@link Ext.data.Record}.{@link Ext.data.Record#isValid isValid} - * to evaluate to false. + * to evaluate to false. */ allowBlank : true -};/** +}); +/** * @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 @@ -34360,10 +38667,6 @@ Ext.data.DataReader.prototype = { * Abstract method, overridden in DataReader extensions such as {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader} */ buildExtractors : Ext.emptyFn, - /** - * Abstract method overridden in DataReader extensions such as {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader} - */ - extractData : Ext.emptyFn, /** * Abstract method overridden in DataReader extensions such as {@link Ext.data.JsonReader} and {@link Ext.data.XmlReader} */ @@ -34405,13 +38708,10 @@ Ext.data.DataReader.prototype = { rs.phantom = false; // <-- That's what it's all about rs._phid = rs.id; // <-- copy phantom-id -> _phid, so we can remap in Store#onCreateRecords rs.id = this.getId(data); + rs.data = data; - rs.fields.each(function(f) { - if (data[f.name] !== f.defaultValue) { - rs.data[f.name] = data[f.name]; - } - }); rs.commit(); + rs.store.reMap(rs); } }, @@ -34442,11 +38742,7 @@ Ext.data.DataReader.prototype = { data = data.shift(); } if (this.isData(data)) { - rs.fields.each(function(f) { - if (data[f.name] !== f.defaultValue) { - rs.data[f.name] = data[f.name]; - } - }); + rs.data = Ext.apply(rs.data, data); } rs.commit(); } @@ -34687,7 +38983,7 @@ Ext.data.DataWriter.prototype = { * Converts a Record to a hash, taking into account the state of the Ext.data.Record along with configuration properties * related to its rendering, such as {@link #writeAllFields}, {@link Ext.data.Record#phantom phantom}, {@link Ext.data.Record#getChanges getChanges} and * {@link Ext.data.DataReader#idProperty idProperty} - * @param {Ext.data.Record} + * @param {Ext.data.Record} rec The Record from which to create a hash. * @param {Object} config NOT YET IMPLEMENTED. Will implement an exlude/only configuration for fine-control over which fields do/don't get rendered. * @return {Object} * @protected @@ -34711,7 +39007,7 @@ Ext.data.DataWriter.prototype = { delete data[this.meta.idProperty]; } } else { - data[this.meta.idProperty] = rec.id + data[this.meta.idProperty] = rec.id; } return data; }, @@ -34782,7 +39078,7 @@ Ext.data.DataProxy.on('write', function(proxy, action, data, res, rs) { }); // Listen to "exception" event fired by all proxies -Ext.data.DataProxy.on('exception', function(proxy, type, action) { +Ext.data.DataProxy.on('exception', function(proxy, type, action, exception) { console.error(type + action + ' exception); }); * @@ -34881,7 +39177,7 @@ myStore.on({ * so any Store instance may observe this event.

      *

      In addition to being fired through the DataProxy instance that raised the event, this event is also fired * through the Ext.data.DataProxy class to allow for centralized processing of exception events from all - * DataProxies by attaching a listener to the Ext.data.Proxy class itself.

      + * DataProxies by attaching a listener to the Ext.data.DataProxy class itself.

      *

      This event can be fired for one of two reasons:

      *
        *
      • remote-request failed :
        @@ -34969,10 +39265,10 @@ myStore.on({ *

        Fires before a request is generated for one of the actions Ext.data.Api.actions.create|update|destroy

        *

        In addition to being fired through the DataProxy instance that raised the event, this event is also fired * through the Ext.data.DataProxy class to allow for centralized processing of beforewrite events from all - * DataProxies by attaching a listener to the Ext.data.Proxy class itself.

        + * DataProxies by attaching a listener to the Ext.data.DataProxy class itself.

        * @param {DataProxy} this The proxy for the request * @param {String} action [Ext.data.Api.actions.create|update|destroy] - * @param {Record/Array[Record]} rs The Record(s) to create|update|destroy. + * @param {Record/Record[]} rs The Record(s) to create|update|destroy. * @param {Object} params The request params object. Edit params to add parameters to the request. */ 'beforewrite', @@ -34981,12 +39277,12 @@ myStore.on({ *

        Fires before the request-callback is called

        *

        In addition to being fired through the DataProxy instance that raised the event, this event is also fired * through the Ext.data.DataProxy class to allow for centralized processing of write events from all - * DataProxies by attaching a listener to the Ext.data.Proxy class itself.

        + * DataProxies by attaching a listener to the Ext.data.DataProxy class itself.

        * @param {DataProxy} this The proxy that sent the request * @param {String} action [Ext.data.Api.actions.create|upate|destroy] * @param {Object} data The data object extracted from the server-response * @param {Object} response The decoded response from server - * @param {Record/Record{}} rs The records from Store + * @param {Record/Record[]} rs The Record(s) from Store * @param {Object} options The callback's options property as passed to the {@link #request} function */ 'write' @@ -35168,7 +39464,7 @@ proxy.setApi(Ext.data.Api.actions.read, '/users/new_load_url'); * url will be built Rails-style, as in "/controller/action/32". restful will aply iff the supplied record is an * instance of Ext.data.Record rather than an Array of them. * @param {String} action The api action being executed [read|create|update|destroy] - * @param {Ext.data.Record/Array[Ext.data.Record]} The record or Array of Records being acted upon. + * @param {Ext.data.Record/Ext.data.Record[]} record The record or Array of Records being acted upon. * @return {String} url * @private */ @@ -35220,8 +39516,8 @@ Ext.util.Observable.call(Ext.data.DataProxy); * @extends Ext.Error * DataProxy Error extension. * constructor - * @param {String} name - * @param {Record/Array[Record]/Array} + * @param {String} message Message describing the error. + * @param {Record/Record[]} arg */ Ext.data.DataProxy.Error = Ext.extend(Ext.Error, { constructor : function(message, arg) { @@ -35759,7 +40055,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { if (!success) { if (action === Ext.data.Api.actions.read) { // @deprecated: fire loadexception for backwards compat. - // TODO remove in 3.1 + // TODO remove this.fireEvent('loadexception', this, o, response); } this.fireEvent('exception', this, 'response', action, o, response); @@ -35790,7 +40086,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { result = o.reader.read(response); }catch(e){ // @deprecated: fire old loadexception for backwards-compat. - // TODO remove in 3.1 + // TODO remove this.fireEvent('loadexception', this, o, response, e); this.fireEvent('exception', this, 'response', action, o, response, e); @@ -35799,7 +40095,7 @@ Ext.extend(Ext.data.HttpProxy, Ext.data.DataProxy, { } if (result.success === false) { // @deprecated: fire old loadexception for backwards-compat. - // TODO remove in 3.1 + // TODO remove this.fireEvent('loadexception', this, o, response); // Get DataReader read-back a response-object to pass along to exception event @@ -35921,20 +40217,204 @@ Ext.extend(Ext.data.MemoryProxy, Ext.data.DataProxy, { callback.call(scope, result, arg, true); } });/** + * @class Ext.data.Types + *

        This is s static class containing the system-supplied data types which may be given to a {@link Ext.data.Field Field}.

        + *

        The properties in this class are used as type indicators in the {@link Ext.data.Field Field} class, so to + * test whether a Field is of a certain type, compare the {@link Ext.data.Field#type type} property against properties + * of this class.

        + *

        Developers may add their own application-specific data types to this class. Definition names must be UPPERCASE. + * each type definition must contain three properties:

        + *
          + *
        • convert : Function
          A function to convert raw data values from a data block into the data + * to be stored in the Field. The function is passed the collowing parameters: + *
            + *
          • v : Mixed
            The data value as read by the Reader, if undefined will use + * the configured {@link Ext.data.Field#defaultValue defaultValue}.
          • + *
          • rec : Mixed
            The data object containing the row as read by the Reader. + * Depending on the Reader type, this could be an Array ({@link Ext.data.ArrayReader ArrayReader}), an object + * ({@link Ext.data.JsonReader JsonReader}), or an XML element ({@link Ext.data.XMLReader XMLReader}).
          • + *
        • + *
        • sortType : Function
          A function to convert the stored data into comparable form, as defined by {@link Ext.data.SortTypes}.
        • + *
        • type : String
          A textual data type name.
        • + *
        + *

        For example, to create a VELatLong field (See the Microsoft Bing Mapping API) containing the latitude/longitude value of a datapoint on a map from a JsonReader data block + * which contained the properties lat and long, you would define a new data type like this:

        + *
        
        +// Add a new Field data type which stores a VELatLong object in the Record.
        +Ext.data.Types.VELATLONG = {
        +    convert: function(v, data) {
        +        return new VELatLong(data.lat, data.long);
        +    },
        +    sortType: function(v) {
        +        return v.Latitude;  // When sorting, order by latitude
        +    },
        +    type: 'VELatLong'
        +};
        +
        + *

        Then, when declaring a Record, use

        
        +var types = Ext.data.Types; // allow shorthand type access
        +UnitRecord = Ext.data.Record.create([
        +    { name: 'unitName', mapping: 'UnitName' },
        +    { name: 'curSpeed', mapping: 'CurSpeed', type: types.INT },
        +    { name: 'latitude', mapping: 'lat', type: types.FLOAT },
        +    { name: 'latitude', mapping: 'lat', type: types.FLOAT },
        +    { name: 'position', type: types.VELATLONG }
        +]);
        +
        + * @singleton + */ +Ext.data.Types = new function(){ + var st = Ext.data.SortTypes; + Ext.apply(this, { + /** + * @type Regexp + * @property stripRe + * A regular expression for stripping non-numeric characters from a numeric value. Defaults to /[\$,%]/g. + * This should be overridden for localization. + */ + stripRe: /[\$,%]/g, + + /** + * @type Object. + * @property AUTO + * This data type means that no conversion is applied to the raw data before it is placed into a Record. + */ + AUTO: { + convert: function(v){ return v; }, + sortType: st.none, + type: 'auto' + }, + + /** + * @type Object. + * @property STRING + * This data type means that the raw data is converted into a String before it is placed into a Record. + */ + STRING: { + convert: function(v){ return (v === undefined || v === null) ? '' : String(v); }, + sortType: st.asUCString, + type: 'string' + }, + + /** + * @type Object. + * @property INT + * This data type means that the raw data is converted into an integer before it is placed into a Record. + *

        The synonym INTEGER is equivalent.

        + */ + INT: { + convert: function(v){ + return v !== undefined && v !== null && v !== '' ? + parseInt(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0); + }, + sortType: st.none, + type: 'int' + }, + + /** + * @type Object. + * @property FLOAT + * This data type means that the raw data is converted into a number before it is placed into a Record. + *

        The synonym NUMBER is equivalent.

        + */ + FLOAT: { + convert: function(v){ + return v !== undefined && v !== null && v !== '' ? + parseFloat(String(v).replace(Ext.data.Types.stripRe, ''), 10) : (this.useNull ? null : 0); + }, + sortType: st.none, + type: 'float' + }, + + /** + * @type Object. + * @property BOOL + *

        This data type means that the raw data is converted into a boolean before it is placed into + * a Record. The string "true" and the number 1 are converted to boolean true.

        + *

        The synonym BOOLEAN is equivalent.

        + */ + BOOL: { + convert: function(v){ return v === true || v === 'true' || v == 1; }, + sortType: st.none, + type: 'bool' + }, + + /** + * @type Object. + * @property DATE + * This data type means that the raw data is converted into a Date before it is placed into a Record. + * The date format is specified in the constructor of the {@link Ext.data.Field} to which this type is + * being applied. + */ + DATE: { + convert: function(v){ + var df = this.dateFormat; + if(!v){ + return null; + } + if(Ext.isDate(v)){ + return v; + } + if(df){ + if(df == 'timestamp'){ + return new Date(v*1000); + } + if(df == 'time'){ + return new Date(parseInt(v, 10)); + } + return Date.parseDate(v, df); + } + var parsed = Date.parse(v); + return parsed ? new Date(parsed) : null; + }, + sortType: st.asDate, + type: 'date' + } + }); + + Ext.apply(this, { + /** + * @type Object. + * @property BOOLEAN + *

        This data type means that the raw data is converted into a boolean before it is placed into + * a Record. The string "true" and the number 1 are converted to boolean true.

        + *

        The synonym BOOL is equivalent.

        + */ + BOOLEAN: this.BOOL, + /** + * @type Object. + * @property INTEGER + * This data type means that the raw data is converted into an integer before it is placed into a Record. + *

        The synonym INT is equivalent.

        + */ + INTEGER: this.INT, + /** + * @type Object. + * @property NUMBER + * This data type means that the raw data is converted into a number before it is placed into a Record. + *

        The synonym FLOAT is equivalent.

        + */ + NUMBER: this.FLOAT + }); +};/** * @class Ext.data.JsonWriter * @extends Ext.data.DataWriter * DataWriter extension for writing an array or single {@link Ext.data.Record} object(s) in preparation for executing a remote CRUD action. */ Ext.data.JsonWriter = Ext.extend(Ext.data.DataWriter, { /** - * @cfg {Boolean} encode true to {@link Ext.util.JSON#encode encode} the - * {@link Ext.data.DataWriter#toHash hashed data}. Defaults to true. When using - * {@link Ext.data.DirectProxy}, set this to false since Ext.Direct.JsonProvider will perform + * @cfg {Boolean} encode

        true to {@link Ext.util.JSON#encode JSON encode} the + * {@link Ext.data.DataWriter#toHash hashed data} into a standard HTTP parameter named after this + * Reader's meta.root property which, by default is imported from the associated Reader. Defaults to true.

        + *

        If set to false, the hashed data is {@link Ext.util.JSON#encode JSON encoded}, along with + * the associated {@link Ext.data.Store}'s {@link Ext.data.Store#baseParams baseParams}, into the POST body.

        + *

        When using {@link Ext.data.DirectProxy}, set this to false since Ext.Direct.JsonProvider will perform * its own json-encoding. In addition, if you're using {@link Ext.data.HttpProxy}, setting to false * will cause HttpProxy to transmit data using the jsonData configuration-params of {@link Ext.Ajax#request} - * instead of params. When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are + * instead of params.

        + *

        When using a {@link Ext.data.Store#restful} Store, some serverside frameworks are * tuned to expect data through the jsonData mechanism. In those cases, one will want to set encode: false, as in - * let the lower-level connection object (eg: Ext.Ajax) do the encoding. + * let the lower-level connection object (eg: Ext.Ajax) do the encoding.

        */ encode : true, /** @@ -35950,10 +40430,14 @@ Ext.data.JsonWriter = Ext.extend(Ext.data.DataWriter, { }, /** - * Final action of a write event. Apply the written data-object to params. - * @param {Object} http params-object to write-to. + *

        This method should not need to be called by application code, however it may be useful on occasion to + * override it, or augment it with an {@link Function#createInterceptor interceptor} or {@link Function#createSequence sequence}.

        + *

        The provided implementation encodes the serialized data representing the Store's modified Records into the Ajax request's + * params according to the {@link #encode} setting.

        + * @param {Object} Ajax request params object to write into. * @param {Object} baseParams as defined by {@link Ext.data.Store#baseParams}. The baseParms must be encoded by the extending class, eg: {@link Ext.data.JsonWriter}, {@link Ext.data.XmlWriter}. - * @param {Object/Object[]} data Data-object representing compiled Store-recordset. + * @param {Object/Object[]} data Data object representing the serialized modified records from the Store. May be either a single object, + * or an Array of objects - user implementations must handle both cases. */ render : function(params, baseParams, data) { if (this.encode === true) { @@ -36020,7 +40504,7 @@ var myReader = new Ext.data.JsonReader({ // constructor that provides mapping for reading the record data objects {@link Ext.data.DataReader#fields fields}: [ // map Record's 'firstname' field to data object's key of same name - {name: 'name'}, + {name: 'name', mapping: 'firstname'}, // map Record's 'job' field to data object's 'occupation' key {name: 'job', mapping: 'occupation'} ] @@ -36162,21 +40646,25 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { return this.readRecords(o); }, - /** - * Decode a json response from server. - * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] - * @param {Object} response + /* * TODO: refactor code between JsonReader#readRecords, #readResponse into 1 method. * there's ugly duplication going on due to maintaining backwards compat. with 2.0. It's time to do this. */ + /** + * Decode a JSON response from server. + * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] + * @param {Object} response The XHR object returned through an Ajax server request. + * @return {Response} A {@link Ext.data.Response Response} object containing the data response, and also status information. + */ readResponse : function(action, response) { var o = (response.responseText !== undefined) ? Ext.decode(response.responseText) : response; if(!o) { throw new Ext.data.JsonReader.Error('response'); } - var root = this.getRoot(o); - if (action === Ext.data.Api.actions.create) { + var root = this.getRoot(o), + success = this.getSuccess(o); + if (success && action === Ext.data.Api.actions.create) { var def = Ext.isDefined(root); if (def && Ext.isEmpty(root)) { throw new Ext.data.JsonReader.Error('root-empty', this.meta.root); @@ -36189,7 +40677,7 @@ Ext.extend(Ext.data.JsonReader, Ext.data.DataReader, { // instantiate response object var res = new Ext.data.Response({ action: action, - success: this.getSuccess(o), + success: success, data: (root) ? this.extractData(root, false) : [], message: this.getMessage(o), raw: o @@ -36648,8 +41136,9 @@ Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, { *
      • {Array} baseParams. The baseParams as defined upon {@link Ext.data.Store#baseParams}. Note that the baseParams have been converted into an array of [{name : "foo", value: "bar"}, ...] pairs in the same manner as the records parameter above. See {@link #documentRoot} and {@link #forceDocumentRoot}.
      • *
      */ - // Break up encoding here in case it's being included by some kind of page that will parse it (eg. PHP) - tpl: '<' + '?xml version="{version}" encoding="{encoding}"?' + '><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}', + // Encoding the ? here in case it's being included by some kind of page that will parse it (eg. PHP) + tpl: '<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}', + /** * XmlWriter implementation of the final stage of a write action. @@ -36702,7 +41191,6 @@ Ext.extend(Ext.data.XmlWriter, Ext.data.DataWriter, { return this.toArray(data); } }); - /** * @class Ext.data.XmlReader * @extends Ext.data.DataReader @@ -36818,21 +41306,22 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { }, /** - * Decode a json response from server. + * Decode an XML response from server. * @param {String} action [{@link Ext.data.Api#actions} create|read|update|destroy] * @param {Object} response HTTP Response object from browser. - * @return {Ext.data.Response} response Returns an instance of {@link Ext.data.Response} + * @return {Ext.data.Response} An instance of {@link Ext.data.Response} */ readResponse : function(action, response) { - var q = Ext.DomQuery, - doc = response.responseXML; + var q = Ext.DomQuery, + doc = response.responseXML, + root = doc.documentElement || doc; // create general Response instance. var res = new Ext.data.Response({ action: action, - success : this.getSuccess(doc), - message: this.getMessage(doc), - data: this.extractData(q.select(this.meta.record, doc) || q.select(this.meta.root, doc), false), + success : this.getSuccess(root), + message: this.getMessage(root), + data: this.extractData(q.select(this.meta.record, root) || q.select(this.meta.root, root), false), raw: doc }); @@ -36883,7 +41372,7 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { } this.getRoot = function(res) { return (!Ext.isEmpty(res[this.meta.record])) ? res[this.meta.record] : res[this.meta.root]; - } + }; if (s.idPath || s.idProperty) { var g = this.createAccessor(s.idPath || s.idProperty); this.getId = function(rec) { @@ -36912,23 +41401,26 @@ Ext.extend(Ext.data.XmlReader, Ext.data.DataReader, { createAccessor : function(){ var q = Ext.DomQuery; return function(key) { + if (Ext.isFunction(key)) { + return key; + } switch(key) { case this.meta.totalProperty: return function(root, def){ return q.selectNumber(key, root, def); - } + }; break; case this.meta.successProperty: return function(root, def) { var sv = q.selectValue(key, root, true); var success = sv !== false && sv !== 'false'; return success; - } + }; break; default: return function(root, def) { return q.selectValue(key, root, def); - } + }; break; } }; @@ -37023,8 +41515,13 @@ Ext.reg('xmlstore', Ext.data.XmlStore);/** * @class Ext.data.GroupingStore * @extends Ext.data.Store * A specialized store implementation that provides for grouping records by one of the available fields. This - * is usually used in conjunction with an {@link Ext.grid.GroupingView} to proved the data model for + * is usually used in conjunction with an {@link Ext.grid.GroupingView} to provide the data model for * a grouped GridPanel. + * + * Internally, GroupingStore is simply a normal Store with multi sorting enabled from the start. The grouping field + * and direction are always injected as the first sorter pair. GroupingView picks up on the configured groupField and + * builds grid rows appropriately. + * * @constructor * Creates a new GroupingStore. * @param {Object} config A config object containing the objects needed for the Store to access data, @@ -37034,8 +41531,46 @@ Ext.reg('xmlstore', Ext.data.XmlStore);/** Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { //inherit docs - constructor: function(config){ + constructor: function(config) { + config = config || {}; + + //We do some preprocessing here to massage the grouping + sorting options into a single + //multi sort array. If grouping and sorting options are both presented to the constructor, + //the sorters array consists of the grouping sorter object followed by the sorting sorter object + //see Ext.data.Store's sorting functions for details about how multi sorting works + this.hasMultiSort = true; + this.multiSortInfo = this.multiSortInfo || {sorters: []}; + + var sorters = this.multiSortInfo.sorters, + groupField = config.groupField || this.groupField, + sortInfo = config.sortInfo || this.sortInfo, + groupDir = config.groupDir || this.groupDir; + + //add the grouping sorter object first + if(groupField){ + sorters.push({ + field : groupField, + direction: groupDir + }); + } + + //add the sorting sorter object if it is present + if (sortInfo) { + sorters.push(sortInfo); + } + Ext.data.GroupingStore.superclass.constructor.call(this, config); + + this.addEvents( + /** + * @event groupchange + * Fired whenever a call to store.groupBy successfully changes the grouping on the store + * @param {Ext.data.GroupingStore} store The grouping store + * @param {String} groupField The field that the store is now grouped by + */ + 'groupchange' + ); + this.applyGroupField(); }, @@ -37057,6 +41592,10 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { */ groupOnSort:false, + /** + * @cfg {String} groupDir + * The direction to sort the groups. Defaults to 'ASC'. + */ groupDir : 'ASC', /** @@ -37078,7 +41617,7 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { this.reload(); }else{ - this.applySort(); + this.sort(); this.fireEvent('datachanged', this); } }, @@ -37089,64 +41628,122 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { * @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, direction){ + groupBy : function(field, forceRegroup, direction) { direction = direction ? (String(direction).toUpperCase() == 'DESC' ? 'DESC' : 'ASC') : this.groupDir; - if(this.groupField == field && this.groupDir == direction && !forceRegroup){ + + if (this.groupField == field && this.groupDir == direction && !forceRegroup) { return; // already grouped by this field } + + //check the contents of the first sorter. If the field matches the CURRENT groupField (before it is set to the new one), + //remove the sorter as it is actually the grouper. The new grouper is added back in by this.sort + var sorters = this.multiSortInfo.sorters; + if (sorters.length > 0 && sorters[0].field == this.groupField) { + sorters.shift(); + } + this.groupField = field; this.groupDir = direction; this.applyGroupField(); - if(this.groupOnSort){ + + var fireGroupEvent = function() { + this.fireEvent('groupchange', this, this.getGroupState()); + }; + + if (this.groupOnSort) { this.sort(field, direction); + fireGroupEvent.call(this); return; } - if(this.remoteGroup){ + + if (this.remoteGroup) { + this.on('load', fireGroupEvent, this, {single: true}); this.reload(); - }else{ - var si = this.sortInfo || {}; - if(forceRegroup || si.field != field || si.direction != direction){ - this.applySort(); - }else{ - this.sortData(field, direction); - } - this.fireEvent('datachanged', this); + } else { + this.sort(sorters); + fireGroupEvent.call(this); } }, - // private + //GroupingStore always uses multisorting so we intercept calls to sort here to make sure that our grouping sorter object + //is always injected first. + sort : function(fieldName, dir) { + if (this.remoteSort) { + return Ext.data.GroupingStore.superclass.sort.call(this, fieldName, dir); + } + + var sorters = []; + + //cater for any existing valid arguments to this.sort, massage them into an array of sorter objects + if (Ext.isArray(arguments[0])) { + sorters = arguments[0]; + } else if (fieldName == undefined) { + //we preserve the existing sortInfo here because this.sort is called after + //clearGrouping and there may be existing sorting + sorters = this.sortInfo ? [this.sortInfo] : []; + } else { + //TODO: this is lifted straight from Ext.data.Store's singleSort function. It should instead be + //refactored into a common method if possible + var field = this.fields.get(fieldName); + if (!field) return false; + + var name = field.name, + sortInfo = this.sortInfo || null, + sortToggle = this.sortToggle ? this.sortToggle[name] : null; + + if (!dir) { + if (sortInfo && sortInfo.field == name) { // toggle sort dir + dir = (this.sortToggle[name] || 'ASC').toggle('ASC', 'DESC'); + } else { + dir = field.sortDir; + } + } + + this.sortToggle[name] = dir; + this.sortInfo = {field: name, direction: dir}; + + sorters = [this.sortInfo]; + } + + //add the grouping sorter object as the first multisort sorter + if (this.groupField) { + sorters.unshift({direction: this.groupDir, field: this.groupField}); + } + + return this.multiSort.call(this, sorters, dir); + }, + + /** + * @private + * Saves the current grouping field and direction to this.baseParams and this.lastOptions.params + * if we're using remote grouping. Does not actually perform any grouping - just stores values + */ applyGroupField: function(){ - if(this.remoteGroup){ + if (this.remoteGroup) { if(!this.baseParams){ this.baseParams = {}; } + Ext.apply(this.baseParams, { groupBy : this.groupField, - groupDir : this.groupDir + groupDir: this.groupDir }); var lo = this.lastOptions; - if(lo && lo.params){ - Ext.apply(lo.params, { - groupBy : this.groupField, - groupDir : this.groupDir - }); + if (lo && lo.params) { + lo.params.groupDir = this.groupDir; + + //this is deleted because of a bug reported at http://www.extjs.com/forum/showthread.php?t=82907 + delete lo.params.groupBy; } } }, - // 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.groupDir != this.sortInfo.direction)){ - this.sortData(this.groupField, this.groupDir); - } - } - }, - - // private + /** + * @private + * TODO: This function is apparently never invoked anywhere in the framework. It has no documentation + * and should be considered for deletion + */ applyGrouping : function(alwaysFireChange){ if(this.groupField !== false){ this.groupBy(this.groupField, true, this.groupDir); @@ -37159,13 +41756,19 @@ Ext.data.GroupingStore = Ext.extend(Ext.data.Store, { } }, - // private + /** + * @private + * Returns the grouping field that should be used. If groupOnSort is used this will be sortInfo's field, + * otherwise it will be this.groupField + * @return {String} The group field + */ getGroupState : function(){ return this.groupOnSort && this.groupField !== false ? (this.sortInfo ? this.sortInfo.field : undefined) : this.groupField; } }); -Ext.reg('groupingstore', Ext.data.GroupingStore);/** +Ext.reg('groupingstore', Ext.data.GroupingStore); +/** * @class Ext.data.DirectProxy * @extends Ext.data.DataProxy */ @@ -37268,23 +41871,25 @@ paramOrder: 'param1|param2|param' // private createCallback : function(action, rs, trans) { + var me = this; return function(result, res) { if (!res.status) { // @deprecated fire loadexception if (action === Ext.data.Api.actions.read) { - this.fireEvent("loadexception", this, trans, res, null); + me.fireEvent("loadexception", me, trans, res, null); } - this.fireEvent('exception', this, 'remote', action, trans, res, null); + me.fireEvent('exception', me, 'remote', action, trans, res, null); trans.request.callback.call(trans.request.scope, null, trans.request.arg, false); return; } if (action === Ext.data.Api.actions.read) { - this.onRead(action, trans, result, res); + me.onRead(action, trans, result, res); } else { - this.onWrite(action, trans, result, res, rs); + me.onWrite(action, trans, result, res, rs); } }; }, + /** * Callback for read actions * @param {String} action [Ext.data.Api.actions.create|read|update|destroy] @@ -37319,12 +41924,17 @@ paramOrder: 'param1|param2|param' * @protected */ onWrite : function(action, trans, result, res, rs) { - var data = trans.reader.extractData(result, false); - this.fireEvent("write", this, action, data, res, rs, trans.request.arg); - trans.request.callback.call(trans.request.scope, data, res, true); + var data = trans.reader.extractData(trans.reader.getRoot(result), false); + var success = trans.reader.getSuccess(result); + success = (success !== false); + if (success){ + this.fireEvent("write", this, action, data, res, rs, trans.request.arg); + }else{ + this.fireEvent('exception', this, 'remote', action, trans, result, rs); + } + trans.request.callback.call(trans.request.scope, data, res, success); } }); - /** * @class Ext.data.DirectStore * @extends Ext.data.Store @@ -37377,52 +41987,52 @@ Ext.reg('directstore', Ext.data.DirectStore); * @class Ext.Direct * @extends Ext.util.Observable *

      Overview

      - * + * *

      Ext.Direct aims to streamline communication between the client and server * by providing a single interface that reduces the amount of common code * typically required to validate data and handle returned data packets * (reading data, error conditions, etc).

      - * + * *

      The Ext.direct namespace includes several classes for a closer integration * with the server-side. The Ext.data namespace also includes classes for working * with Ext.data.Stores which are backed by data from an Ext.Direct method.

      - * + * *

      Specification

      - * - *

      For additional information consult the + * + *

      For additional information consult the * Ext.Direct Specification.

      - * + * *

      Providers

      - * + * *

      Ext.Direct uses a provider architecture, where one or more providers are * used to transport data to and from the server. There are several providers * that exist in the core at the moment:

        - * + * *
      • {@link Ext.direct.JsonProvider JsonProvider} for simple JSON operations
      • *
      • {@link Ext.direct.PollingProvider PollingProvider} for repeated requests
      • *
      • {@link Ext.direct.RemotingProvider RemotingProvider} exposes server side * on the client.
      • *
      - * + * *

      A provider does not need to be invoked directly, providers are added via * {@link Ext.Direct}.{@link Ext.Direct#add add}.

      - * + * *

      Router

      - * + * *

      Ext.Direct utilizes a "router" on the server to direct requests from the client * to the appropriate server-side method. Because the Ext.Direct API is completely * platform-agnostic, you could completely swap out a Java based server solution * and replace it with one that uses C# without changing the client side JavaScript * at all.

      - * + * *

      Server side events

      - * + * *

      Custom events from the server may be handled by the client by adding * listeners, for example:

      *
      
       {"type":"event","name":"message","data":"Successfully polled at: 11:19:30 am"}
       
      -// add a handler for a 'message' event sent by the server 
      +// add a handler for a 'message' event sent by the server
       Ext.Direct.on('message', function(e){
           out.append(String.format('<p><i>{0}</i></p>', e.data));
                   out.el.scrollTo('t', 100000, true);
      @@ -37459,7 +42069,7 @@ Ext.Direct = Ext.extend(Ext.util.Observable, {
               LOGIN: 'login',
               SERVER: 'exception'
           },
      -    
      +
           // private
           constructor: function(){
               this.addEvents(
      @@ -37487,14 +42097,14 @@ Ext.Direct = Ext.extend(Ext.util.Observable, {
            * 
      
       var pollProv = new Ext.direct.PollingProvider({
           url: 'php/poll2.php'
      -}); 
      +});
       
       Ext.Direct.addProvider(
           {
      -        "type":"remoting",       // create a {@link Ext.direct.RemotingProvider} 
      +        "type":"remoting",       // create a {@link Ext.direct.RemotingProvider}
               "url":"php\/router.php", // url to connect to the Ext.Direct server-side router.
      -        "actions":{              // each property within the actions object represents a Class 
      -            "TestAction":[       // array of methods within each server side Class   
      +        "actions":{              // each property within the actions object represents a Class
      +            "TestAction":[       // array of methods within each server side Class
                   {
                       "name":"doEcho", // name of method
                       "len":1
      @@ -37503,13 +42113,13 @@ Ext.Direct.addProvider(
                       "len":1
                   },{
                       "name":"doForm",
      -                "formHandler":true, // handle form on server with Ext.Direct.Transaction 
      +                "formHandler":true, // handle form on server with Ext.Direct.Transaction
                       "len":1
                   }]
               },
               "namespace":"myApplication",// namespace to create the Remoting Provider in
           },{
      -        type: 'polling', // create a {@link Ext.direct.PollingProvider} 
      +        type: 'polling', // create a {@link Ext.direct.PollingProvider}
               url:  'php/poll.php'
           },
           pollProv // reference to previously created instance
      @@ -37519,7 +42129,7 @@ Ext.Direct.addProvider(
            * or config object for a Provider) or any number of Provider descriptions as arguments.  Each
            * Provider description instructs Ext.Direct how to create client-side stub methods.
            */
      -    addProvider : function(provider){        
      +    addProvider : function(provider){
               var a = arguments;
               if(a.length > 1){
                   for(var i = 0, len = a.length; i < len; i++){
      @@ -37527,7 +42137,7 @@ Ext.Direct.addProvider(
                   }
                   return;
               }
      -        
      +
               // if provider has not already been instantiated
               if(!provider.events){
                   provider = new Ext.Direct.PROVIDERS[provider.type](provider);
      @@ -37550,14 +42160,14 @@ Ext.Direct.addProvider(
            * Retrieve a {@link Ext.direct.Provider provider} by the
            * {@link Ext.direct.Provider#id id} specified when the provider is
            * {@link #addProvider added}.
      -     * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider} 
      +     * @param {String} id Unique identifier assigned to the provider when calling {@link #addProvider}
            */
           getProvider : function(id){
               return this.providers[id];
           },
       
           removeProvider : function(id){
      -        var provider = id.id ? id : this.providers[id.id];
      +        var provider = id.id ? id : this.providers[id];
               provider.un('data', this.onProviderData, this);
               provider.un('exception', this.onProviderException, this);
               delete this.providers[provider.id];
      @@ -37628,7 +42238,8 @@ Ext.Direct.Transaction.prototype = {
           }
       };Ext.Direct.Event = function(config){
           Ext.apply(this, config);
      -}
      +};
      +
       Ext.Direct.Event.prototype = {
           status: true,
           getData: function(){
      @@ -37653,7 +42264,6 @@ Ext.Direct.eventTypes = {
           'event':  Ext.Direct.Event,
           'exception':  Ext.Direct.ExceptionEvent
       };
      -
       /**
        * @class Ext.direct.Provider
        * @extends Ext.util.Observable
      @@ -37783,7 +42393,7 @@ Ext.direct.JsonProvider = Ext.extend(Ext.direct.Provider, {
                       xhr: xhr,
                       code: Ext.Direct.exceptions.PARSE,
                       message: 'Error parsing json response: \n\n ' + data
      -            })
      +            });
                   return [event];
               }
               var events = [];
      @@ -38058,6 +42668,7 @@ TestAction.multiply(
                    * executing.
                    * @param {Ext.direct.RemotingProvider} provider
                    * @param {Ext.Direct.Transaction} transaction
      +             * @param {Object} meta The meta data
                    */            
                   'beforecall',            
                   /**
      @@ -38066,6 +42677,7 @@ TestAction.multiply(
                    * NOT fire after the response has come back from the call.
                    * @param {Ext.direct.RemotingProvider} provider
                    * @param {Ext.Direct.Transaction} transaction
      +             * @param {Object} meta The meta data
                    */            
                   'call'
               );
      @@ -38223,10 +42835,10 @@ TestAction.multiply(
                   cb: scope && Ext.isFunction(hs) ? hs.createDelegate(scope) : hs
               });
       
      -        if(this.fireEvent('beforecall', this, t) !== false){
      +        if(this.fireEvent('beforecall', this, t, m) !== false){
                   Ext.Direct.addTransaction(t);
                   this.queueTransaction(t);
      -            this.fireEvent('call', this, t);
      +            this.fireEvent('call', this, t, m);
               }
           },
       
      @@ -38240,7 +42852,7 @@ TestAction.multiply(
                   isForm: true
               });
       
      -        if(this.fireEvent('beforecall', this, t) !== false){
      +        if(this.fireEvent('beforecall', this, t, m) !== false){
                   Ext.Direct.addTransaction(t);
                   var isUpload = String(form.getAttribute("enctype")).toLowerCase() == 'multipart/form-data',
                       params = {
      @@ -38258,7 +42870,7 @@ TestAction.multiply(
                       isUpload: isUpload,
                       params: callback && Ext.isObject(callback.params) ? Ext.apply(params, callback.params) : params
                   });
      -            this.fireEvent('call', this, t);
      +            this.fireEvent('call', this, t, m);
                   this.processForm(t);
               }
           },
      @@ -38311,16 +42923,10 @@ TestAction.multiply(
               }
           }
       });
      -Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;/*!
      - * Ext JS Library 3.1.1
      - * Copyright(c) 2006-2010 Ext JS, LLC
      - * licensing@extjs.com
      - * http://www.extjs.com/license
      - */
      -/**
      +Ext.Direct.PROVIDERS['remoting'] = Ext.direct.RemotingProvider;/**
        * @class Ext.Resizable
        * @extends Ext.util.Observable
      - * 

      Applies drag handles to an element to make it resizable. The drag handles are inserted into the element + *

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

      @@ -38358,7 +42964,7 @@ resizer.on('resize', myHandler); * @param {Object} config configuration options */ Ext.Resizable = Ext.extend(Ext.util.Observable, { - + constructor: function(el, config){ this.el = Ext.get(el); if(config && config.wrap){ @@ -38376,7 +42982,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { config.adjustments = 'auto'; } } - + /** * The proxy Element that is resized in place of the real Element during the resize operation. * This may be queried using {@link Ext.Element#getBox} to provide the new area to resize to. @@ -38387,9 +42993,9 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { this.proxy = this.el.createProxy({tag: 'div', cls: 'x-resizable-proxy', id: this.el.id + '-rzproxy'}, Ext.getBody()); this.proxy.unselectable(); this.proxy.enableDisplayMode('block'); - + Ext.apply(this, config); - + if(this.pinned){ this.disableTrackOver = true; this.el.addClass('x-resizable-pinned'); @@ -38418,13 +43024,13 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { } // legacy this.corner = this.southeast; - + if(this.handles.indexOf('n') != -1 || this.handles.indexOf('w') != -1){ this.updateBox = true; - } - + } + this.activeHandle = null; - + if(this.resizeChild){ if(typeof this.resizeChild == 'boolean'){ this.resizeChild = Ext.get(this.el.dom.firstChild, true); @@ -38432,7 +43038,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { 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; @@ -38443,19 +43049,19 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { } this.adjustments = [ (he ? -he.el.getWidth() : 0) + (hw ? -hw.el.getWidth() : 0), - (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 + (hn ? -hn.el.getHeight() : 0) + (hs ? -hs.el.getHeight() : 0) -1 ]; } - + if(this.draggable){ - this.dd = this.dynamic ? + 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); if(this.constrainTo){ this.dd.constrainTo(this.constrainTo); } } - + this.addEvents( /** * @event beforeresize @@ -38474,7 +43080,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { */ 'resize' ); - + if(this.width !== null && this.height !== null){ this.resizeTo(this.width, this.height); }else{ @@ -38483,7 +43089,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { if(Ext.isIE){ this.el.dom.style.zoom = 1; } - Ext.Resizable.superclass.constructor.call(this); + Ext.Resizable.superclass.constructor.call(this); }, /** @@ -38524,7 +43130,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { enabled : true, /** * @property enabled Writable. False if resizing is disabled. - * @type Boolean + * @type Boolean */ /** * @cfg {String} handles String consisting of the resize handles to display (defaults to undefined). @@ -38588,8 +43194,8 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { */ preserveRatio : false, /** - * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) - */ + * @cfg {Boolean/String/Element} resizeChild True to resize the first child, or id/element to resize (defaults to false) + */ resizeChild : false, /** * @cfg {Boolean} transparent True for transparent handles. This is only applied at config time. (defaults to false) @@ -38606,7 +43212,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { * @cfg {String} handleCls A css class to add to each handle. Defaults to ''. */ - + /** * Perform a manual resize and fires the 'resize' event. * @param {Number} width @@ -38669,7 +43275,7 @@ Ext.Resizable = Ext.extend(Ext.util.Observable, { e.stopEvent(); this.activeHandle = handle; this.startSizing(e, handle); - } + } }, // private @@ -38785,11 +43391,11 @@ new Ext.Panel({ // private constrain : function(v, diff, m, mx){ if(v - diff < m){ - diff = v - m; + diff = v - m; }else if(v - diff > mx){ - diff = v - mx; + diff = v - mx; } - return diff; + return diff; }, // private @@ -38804,15 +43410,15 @@ new Ext.Panel({ //var curXY = this.startPoint; var curSize = this.curSize || this.startBox, x = this.startBox.x, y = this.startBox.y, - ox = x, + ox = x, oy = y, - w = curSize.width, + w = curSize.width, h = curSize.height, - ow = w, + ow = w, oh = h, - mw = this.minWidth, + mw = this.minWidth, mh = this.minHeight, - mxw = this.maxWidth, + mxw = this.maxWidth, mxh = this.maxHeight, wi = this.widthIncrement, hi = this.heightIncrement, @@ -38822,10 +43428,10 @@ new Ext.Panel({ pos = this.activeHandle.position, tw, th; - + switch(pos){ case 'east': - w += diffX; + w += diffX; w = Math.min(Math.max(mw, w), mxw); break; case 'south': @@ -38833,7 +43439,7 @@ new Ext.Panel({ h = Math.min(Math.max(mh, h), mxh); break; case 'southeast': - w += diffX; + w += diffX; h += diffY; w = Math.min(Math.max(mw, w), mxw); h = Math.min(Math.max(mh, h), mxh); @@ -38849,7 +43455,7 @@ new Ext.Panel({ w -= diffX; break; case 'northeast': - w += diffX; + w += diffX; w = Math.min(Math.max(mw, w), mxw); diffY = this.constrain(h, diffY, mh, mxh); y += diffY; @@ -38871,7 +43477,7 @@ new Ext.Panel({ w -= diffX; break; } - + var sw = this.snap(w, wi, mw); var sh = this.snap(h, hi, mh); if(sw != w || sh != h){ @@ -38896,7 +43502,7 @@ new Ext.Panel({ w = sw; h = sh; } - + if(this.preserveRatio){ switch(pos){ case 'southeast': @@ -38947,7 +43553,7 @@ new Ext.Panel({ y += th - h; x += tw - w; break; - + } } this.proxy.setBounds(x, y, w, h); @@ -38971,7 +43577,7 @@ new Ext.Panel({ this.el.removeClass('x-resizable-over'); } }, - + /** * Returns the element this component is bound to. * @return {Ext.Element} @@ -38979,7 +43585,7 @@ new Ext.Panel({ getEl : function(){ return this.el; }, - + /** * Returns the resizeChild element (or null). * @return {Ext.Element} @@ -38987,9 +43593,9 @@ new Ext.Panel({ getResizeChild : function(){ return this.resizeChild; }, - + /** - * Destroys this resizable. If the element was wrapped and + * Destroys this resizable. If the element was wrapped and * removeEl is not true then the element remains. * @param {Boolean} removeEl (optional) true to remove the element from the DOM */ @@ -38997,7 +43603,7 @@ new Ext.Panel({ Ext.destroy(this.dd, this.overlay, this.proxy); this.overlay = null; this.proxy = null; - + var ps = Ext.Resizable.positions; for(var k in ps){ if(typeof ps[k] != 'function' && this[ps[k]]){ @@ -39047,7 +43653,7 @@ Ext.Resizable.Handle = Ext.extend(Object, { this.el.setOpacity(0); } if(!Ext.isEmpty(cls)){ - this.el.addClass(cls); + this.el.addClass(cls); } this.el.on('mousedown', this.onMouseDown, this); if(!disableTrackOver){ @@ -39056,12 +43662,12 @@ Ext.Resizable.Handle = Ext.extend(Object, { mouseover: this.onMouseOver, mouseout: this.onMouseOut }); - } + } }, - + // private afterResize : function(rz){ - // do nothing + // do nothing }, // private onMouseDown : function(e){ @@ -39256,6 +43862,18 @@ Ext.Window = Ext.extend(Ext.Panel, { */ expandOnShow : true, + /** + * @cfg {Number} showAnimDuration The number of seconds that the window show animation takes if enabled. + * Defaults to 0.25 + */ + showAnimDuration: 0.25, + + /** + * @cfg {Number} hideAnimDuration The number of seconds that the window hide animation takes if enabled. + * Defaults to 0.25 + */ + hideAnimDuration: 0.25, + // inherited docs, same default collapsible : false, @@ -39408,8 +44026,12 @@ Ext.Window = Ext.extend(Ext.Panel, { initDraggable : function(){ /** - * If this Window is configured {@link #draggable}, this property will contain - * an instance of {@link Ext.dd.DD} which handles dragging the Window's DOM Element. + *

      If this Window is configured {@link #draggable}, this property will contain + * an instance of {@link Ext.dd.DD} which handles dragging the Window's DOM Element.

      + *

      This has implementations of startDrag, onDrag and endDrag + * which perform the dragging action. If extra logic is needed at these points, use + * {@link Function#createInterceptor createInterceptor} or {@link Function#createSequence createSequence} to + * augment the existing implementations.

      * @type Ext.dd.DD * @property dd */ @@ -39418,18 +44040,18 @@ Ext.Window = Ext.extend(Ext.Panel, { // private onEsc : function(k, e){ + if (this.activeGhost) { + this.unghost(); + } e.stopEvent(); this[this.closeAction](); }, // private beforeDestroy : function(){ - if (this.rendered){ + if(this.rendered){ this.hide(); - if(this.doAnchor){ - Ext.EventManager.removeResizeListener(this.doAnchor, this); - Ext.EventManager.un(window, 'scroll', this.doAnchor, this); - } + this.clearAnchor(); Ext.destroy( this.focusEl, this.resizer, @@ -39506,11 +44128,13 @@ Ext.Window = Ext.extend(Ext.Panel, { this.updateBox(box); }else{ this.setSize(box); + if (Ext.isIE6 && Ext.isStrict) { + this.doLayout(); + } } this.focus(); this.updateHandles(); this.saveState(); - this.doLayout(); }, /** @@ -39518,7 +44142,11 @@ Ext.Window = Ext.extend(Ext.Panel, { * window itself will receive focus. */ focus : function(){ - var f = this.focusEl, db = this.defaultButton, t = typeof db; + var f = this.focusEl, + db = this.defaultButton, + t = typeof db, + el, + ct; if(Ext.isDefined(db)){ if(Ext.isNumber(db) && this.fbar){ f = this.fbar.items.get(db); @@ -39527,6 +44155,13 @@ Ext.Window = Ext.extend(Ext.Panel, { }else{ f = db; } + el = f.getEl(); + ct = Ext.getDom(this.container); + if (el && ct) { + if (ct != document.body && !Ext.lib.Region.getRegion(ct).contains(Ext.lib.Region.getRegion(el.dom))){ + return; + } + } } f = f || this.focusEl; f.focus.defer(10, f); @@ -39643,7 +44278,7 @@ Ext.Window = Ext.extend(Ext.Panel, { callback: this.afterShow.createDelegate(this, [true], false), scope: this, easing: 'easeNone', - duration: 0.25, + duration: this.showAnimDuration, opacity: 0.5 })); }, @@ -39703,7 +44338,7 @@ Ext.Window = Ext.extend(Ext.Panel, { this.proxy.shift(Ext.apply(this.animateTarget.getBox(), { callback: this.afterHide, scope: this, - duration: 0.25, + duration: this.hideAnimDuration, easing: 'easeNone', opacity: 0 })); @@ -39748,7 +44383,7 @@ Ext.Window = Ext.extend(Ext.Panel, { var s = this.getSize(); offsets = { right:-(s.width - 100), - bottom:-(s.height - 25) + bottom:-(s.height - 25 + this.el.getConstrainOffset()) }; } @@ -39777,7 +44412,7 @@ Ext.Window = Ext.extend(Ext.Panel, { } if(show !== false){ this.el.show(); - this.focus(); + this.focus.defer(10, this); if(Ext.isMac && Ext.isGecko2){ // work around stupid FF 2.0/Mac scroll bar bug this.cascade(this.setAutoScroll); } @@ -39951,21 +44586,44 @@ Ext.Window = Ext.extend(Ext.Panel, { * @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); + this.clearAnchor(); + this.anchorTarget = { + el: el, + alignment: alignment, + offsets: offsets + }; - var tm = typeof monitorScroll; - if(tm != 'undefined'){ - Ext.EventManager.on(window, 'scroll', this.doAnchor, this, - {buffer: tm == 'number' ? monitorScroll : 50}); - } - return this; + 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}); + } + return this.doAnchor(); + }, + + /** + * Performs the anchor, using the saved anchorTarget property. + * @return {Ext.Window} this + * @private + */ + doAnchor : function(){ + var o = this.anchorTarget; + this.alignTo(o.el, o.alignment, o.offsets); + return this; + }, + + /** + * Removes any existing anchor from this window. See {@link #anchorTo}. + * @return {Ext.Window} this + */ + clearAnchor : function(){ + if(this.anchorTarget){ + Ext.EventManager.removeResizeListener(this.doAnchor, this); + Ext.EventManager.un(window, 'scroll', this.doAnchor, this); + delete this.anchorTarget; + } + return this; }, /** @@ -40026,19 +44684,20 @@ Ext.Window = Ext.extend(Ext.Panel, { Ext.reg('window', Ext.Window); // private - custom Window DD implementation -Ext.Window.DD = function(win){ - this.win = win; - Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id); - this.setHandleElId(win.header.id); - this.scroll = false; -}; +Ext.Window.DD = Ext.extend(Ext.dd.DD, { + + constructor : function(win){ + this.win = win; + Ext.Window.DD.superclass.constructor.call(this, win.el.id, 'WindowDD-'+win.id); + this.setHandleElId(win.header.id); + this.scroll = false; + }, -Ext.extend(Ext.Window.DD, Ext.dd.DD, { moveOnly:true, headerOffsets:[100, 25], startDrag : function(){ var w = this.win; - this.proxy = w.ghost(); + this.proxy = w.ghost(w.initialConfig.cls); if(w.constrain !== false){ var so = w.el.shadowOffset; this.constrainTo(w.container, {right: so, left: so, bottom: so}); @@ -40437,7 +45096,8 @@ Ext.MessageBox = function(){ if(!dlg.isVisible() && !opt.width){ dlg.setSize(this.maxWidth, 100); // resize first so content is never clipped from previous shows } - msgEl.update(text || ' '); + // Append a space here for sizing. In IE, for some reason, it wraps text incorrectly without one in some cases + msgEl.update(text ? text + ' ' : ' '); var iw = iconCls != '' ? (iconEl.getWidth() + iconEl.getMargins('lr')) : 0, mw = msgEl.getWidth() + msgEl.getMargins('lr'), @@ -40445,11 +45105,6 @@ Ext.MessageBox = function(){ bw = dlg.body.getFrameWidth('lr'), w; - if (Ext.isIE && iw > 0){ - //3 pixels get subtracted in the icon CSS for an IE margin issue, - //so we have to add it back here for the overall width to be consistent - iw += 3; - } w = Math.max(Math.min(opt.width || iw+mw+fw+bw, opt.maxWidth || this.maxWidth), Math.max(opt.minWidth || this.minWidth, bwidth || 0)); @@ -40462,6 +45117,7 @@ Ext.MessageBox = function(){ if(Ext.isIE && w == bwidth){ w += 4; //Add offset when the content width is smaller than the buttons. } + msgEl.update(text || ' '); dlg.setSize(w, 'auto').center(); return this; }, @@ -40620,7 +45276,7 @@ Ext.Msg.show({ d.focusEl = db; } } - if(opt.iconCls){ + if(Ext.isDefined(opt.iconCls)){ d.setIconClass(opt.iconCls); } this.setIcon(Ext.isDefined(opt.icon) ? opt.icon : bufferIcon); @@ -40908,13 +45564,14 @@ Ext.Msg = Ext.MessageBox;/** * @param panel The {@link Ext.Panel} to proxy for * @param config Configuration options */ -Ext.dd.PanelProxy = function(panel, config){ - this.panel = panel; - this.id = this.panel.id +'-ddproxy'; - Ext.apply(this, config); -}; +Ext.dd.PanelProxy = Ext.extend(Object, { + + constructor : function(panel, config){ + this.panel = panel; + this.id = this.panel.id +'-ddproxy'; + Ext.apply(this, config); + }, -Ext.dd.PanelProxy.prototype = { /** * @cfg {Boolean} insertProxy True to insert a placeholder proxy element while dragging the panel, * false to drag with no proxy (defaults to true). @@ -40972,8 +45629,8 @@ Ext.dd.PanelProxy.prototype = { */ show : function(){ if(!this.ghost){ - this.ghost = this.panel.createGhost(undefined, undefined, Ext.getBody()); - this.ghost.setXY(this.panel.el.getXY()) + this.ghost = this.panel.createGhost(this.panel.initialConfig.cls, undefined, Ext.getBody()); + this.ghost.setXY(this.panel.el.getXY()); if(this.insertProxy){ this.proxy = this.panel.el.insertSibling({cls:'x-panel-dd-spacer'}); this.proxy.setSize(this.panel.getSize()); @@ -41002,31 +45659,34 @@ Ext.dd.PanelProxy.prototype = { parentNode.insertBefore(this.proxy.dom, before); } } -}; +}); // private - DD implementation for Panels -Ext.Panel.DD = function(panel, cfg){ - this.panel = panel; - this.dragData = {panel: panel}; - this.proxy = new Ext.dd.PanelProxy(panel, cfg); - Ext.Panel.DD.superclass.constructor.call(this, panel.el, cfg); - var h = panel.header; - if(h){ - this.setHandleElId(h.id); - } - (h ? h : this.panel.body).setStyle('cursor', 'move'); - this.scroll = false; -}; +Ext.Panel.DD = Ext.extend(Ext.dd.DragSource, { + + constructor : 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); + var h = panel.header, + el = panel.body; + if(h){ + this.setHandleElId(h.id); + el = panel.header; + } + el.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(); + var x = e.getPageX(), + y = e.getPageY(); this.autoOffset(x, y); }, onInitDrag : function(x, y){ @@ -41053,19 +45713,21 @@ Ext.extend(Ext.Panel.DD, Ext.dd.DragSource, { * for encoding and decoding typed variables including dates and defines the * Provider interface. */ -Ext.state.Provider = function(){ - /** - * @event statechange - * Fires when a state change occurs. - * @param {Provider} this This state provider - * @param {String} key The state key which was changed - * @param {String} value The encoded value for the state - */ - this.addEvents("statechange"); - this.state = {}; - Ext.state.Provider.superclass.constructor.call(this); -}; -Ext.extend(Ext.state.Provider, Ext.util.Observable, { +Ext.state.Provider = Ext.extend(Ext.util.Observable, { + + constructor : function(){ + /** + * @event statechange + * Fires when a state change occurs. + * @param {Provider} this This state provider + * @param {String} key The state key which was changed + * @param {String} value The encoded value for the state + */ + this.addEvents("statechange"); + this.state = {}; + Ext.state.Provider.superclass.constructor.call(this); + }, + /** * Returns the current value for a key * @param {String} name The key name @@ -41102,31 +45764,48 @@ Ext.extend(Ext.state.Provider, Ext.util.Observable, { * @return {Mixed} The decoded value */ decodeValue : function(cookie){ - var re = /^(a|n|d|b|s|o)\:(.*)$/; - var matches = re.exec(unescape(cookie)); - if(!matches || !matches[1]) return; // non state cookie - var type = matches[1]; - var v = matches[2]; + /** + * a -> Array + * n -> Number + * d -> Date + * b -> Boolean + * s -> String + * o -> Object + * -> Empty (null) + */ + var re = /^(a|n|d|b|s|o|e)\:(.*)$/, + matches = re.exec(unescape(cookie)), + all, + type, + v, + kv; + if(!matches || !matches[1]){ + return; // non state cookie + } + type = matches[1]; + v = matches[2]; switch(type){ - case "n": + case 'e': + return null; + case 'n': return parseFloat(v); - case "d": + case 'd': return new Date(Date.parse(v)); - case "b": - return (v == "1"); - case "a": - var all = []; + case 'b': + return (v == '1'); + case 'a': + all = []; if(v != ''){ Ext.each(v.split('^'), function(val){ all.push(this.decodeValue(val)); }, this); } return all; - case "o": - var all = {}; + case 'o': + all = {}; if(v != ''){ Ext.each(v.split('^'), function(val){ - var kv = val.split('='); + kv = val.split('='); all[kv[0]] = this.decodeValue(kv[1]); }, this); } @@ -41142,30 +45821,36 @@ Ext.extend(Ext.state.Provider, Ext.util.Observable, { * @return {String} The encoded value */ encodeValue : function(v){ - var enc; - if(typeof v == "number"){ - enc = "n:" + v; - }else if(typeof v == "boolean"){ - enc = "b:" + (v ? "1" : "0"); + var enc, + flat = '', + i = 0, + len, + key; + if(v == null){ + return 'e:1'; + }else 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(); + enc = 'd:' + v.toGMTString(); }else if(Ext.isArray(v)){ - var flat = ""; - for(var i = 0, len = v.length; i < len; i++){ + for(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]) + "^"; + if(i != len - 1){ + flat += '^'; } } - enc = "o:" + flat.substring(0, flat.length-1); + enc = 'a:' + flat; + }else if(typeof v == 'object'){ + for(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; + enc = 's:' + v; } return escape(enc); } @@ -41257,17 +45942,18 @@ Ext.state.Manager = function(){ * Create a new CookieProvider * @param {Object} config The configuration object */ -Ext.state.CookieProvider = function(config){ - Ext.state.CookieProvider.superclass.constructor.call(this); - this.path = "/"; - this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days - this.domain = null; - this.secure = false; - Ext.apply(this, config); - this.state = this.readCookies(); -}; +Ext.state.CookieProvider = Ext.extend(Ext.state.Provider, { + + constructor : function(config){ + Ext.state.CookieProvider.superclass.constructor.call(this); + this.path = "/"; + this.expires = new Date(new Date().getTime()+(1000*60*60*24*7)); //7 days + this.domain = null; + this.secure = false; + Ext.apply(this, config); + this.state = this.readCookies(); + }, -Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, { // private set : function(name, value){ if(typeof value == "undefined" || value === null){ @@ -41286,13 +45972,15 @@ Ext.extend(Ext.state.CookieProvider, Ext.state.Provider, { // private readCookies : function(){ - var cookies = {}; - var c = document.cookie + ";"; - var re = /\s?(.*?)=(.*?);/g; - var matches; + var cookies = {}, + c = document.cookie + ";", + re = /\s?(.*?)=(.*?);/g, + matches, + name, + value; while((matches = re.exec(c)) != null){ - var name = matches[1]; - var value = matches[2]; + name = matches[1]; + value = matches[2]; if(name && name.substring(0,3) == "ys-"){ cookies[name.substr(3)] = this.decodeValue(value); } @@ -41435,6 +46123,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { */ trackOver: false, + /** + * @cfg {Boolean} blockRefresh Set this to true to ignore datachanged events on the bound store. This is useful if + * you wish to provide custom transition animations via a plugin (defaults to false) + */ + blockRefresh: false, + //private last: false, @@ -41564,11 +46258,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { /** * Refreshes the view by reloading the data from the store and re-rendering the template. */ - refresh : function(){ + refresh : function() { this.clearSelections(false, true); - var el = this.getTemplateTarget(); - el.update(""); - var records = this.store.getRange(); + var el = this.getTemplateTarget(), + records = this.store.getRange(); + + el.update(''); if(records.length < 1){ if(!this.deferEmptyText || this.hasSkippedEmptyText){ el.update(this.emptyText); @@ -41612,17 +46307,19 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { * contain named properties. */ 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]); + var r = [], + i = 0, + len = records.length; + for(; i < len; i++){ + r[r.length] = this.prepareData(records[i].data, startIndex + i, records[i]); } return r; }, // private - bufferRender : function(records){ + bufferRender : function(records, index){ var div = document.createElement('div'); - this.tpl.overwrite(div, this.collectData(records)); + this.tpl.overwrite(div, this.collectData(records, index)); return Ext.query(this.itemSelector, div); }, @@ -41630,9 +46327,9 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { onUpdate : function(ds, record){ var index = this.store.indexOf(record); if(index > -1){ - var sel = this.isSelected(index); - var original = this.all.elements[index]; - var node = this.bufferRender([record], index)[0]; + var sel = this.isSelected(index), + original = this.all.elements[index], + node = this.bufferRender([record], index)[0]; this.all.replaceElement(index, node, true); if(sel){ @@ -41706,7 +46403,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { this.store.destroy(); }else{ this.store.un("beforeload", this.onBeforeLoad, this); - this.store.un("datachanged", this.refresh, this); + this.store.un("datachanged", this.onDataChanged, this); this.store.un("add", this.onAdd, this); this.store.un("remove", this.onRemove, this); this.store.un("update", this.onUpdate, this); @@ -41721,7 +46418,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { store.on({ scope: this, beforeload: this.onBeforeLoad, - datachanged: this.refresh, + datachanged: this.onDataChanged, add: this.onAdd, remove: this.onRemove, update: this.onUpdate, @@ -41734,6 +46431,16 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { } }, + /** + * @private + * Calls this.refresh if this.blockRefresh is not true + */ + onDataChanged: function() { + if (this.blockRefresh !== true) { + this.refresh.apply(this, arguments); + } + }, + /** * Returns the template node the passed child belongs to, or null if it doesn't belong to one. * @param {HTMLElement} node @@ -41745,9 +46452,10 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { // private onClick : function(e){ - var item = e.getTarget(this.itemSelector, this.getTemplateTarget()); + var item = e.getTarget(this.itemSelector, this.getTemplateTarget()), + index; if(item){ - var index = this.indexOf(item); + index = this.indexOf(item); if(this.onItemClick(item, index, e) !== false){ this.fireEvent("click", this, index, item, e); } @@ -41861,9 +46569,13 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { * @return {Array} An array of numeric indexes */ getSelectedIndexes : function(){ - var indexes = [], s = this.selected.elements; - for(var i = 0, len = s.length; i < len; i++){ - indexes.push(s[i].viewIndex); + var indexes = [], + selected = this.selected.elements, + i = 0, + len = selected.length; + + for(; i < len; i++){ + indexes.push(selected[i].viewIndex); } return indexes; }, @@ -41873,11 +46585,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { * @return {Array} An array of {@link Ext.data.Record} objects */ getSelectedRecords : function(){ - var r = [], s = this.selected.elements; - for(var i = 0, len = s.length; i < len; i++){ - r[r.length] = this.store.getAt(s[i].viewIndex); - } - return r; + return this.getRecords(this.selected.elements); }, /** @@ -41886,11 +46594,14 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { * @return {Array} records The {@link Ext.data.Record} objects */ getRecords : function(nodes){ - var r = [], s = nodes; - for(var i = 0, len = s.length; i < len; i++){ - r[r.length] = this.store.getAt(s[i].viewIndex); + var records = [], + i = 0, + len = nodes.length; + + for(; i < len; i++){ + records[records.length] = this.store.getAt(nodes[i].viewIndex); } - return r; + return records; }, /** @@ -41921,7 +46632,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { /** * Returns true if the passed node is selected, else false. - * @param {HTMLElement/Number} node The node or node index to check + * @param {HTMLElement/Number/Ext.data.Record} node The node, node index or record to check * @return {Boolean} True if selected, else false */ isSelected : function(node){ @@ -41930,7 +46641,7 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { /** * Deselects a node. - * @param {HTMLElement/Number} node The node to deselect + * @param {HTMLElement/Number/Record} node The node, node index or record to deselect */ deselect : function(node){ if(this.isSelected(node)){ @@ -41946,8 +46657,8 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { /** * Selects a set of nodes. - * @param {Array/HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node, - * id of a template node or an array of any of those to select + * @param {Array/HTMLElement/String/Number/Ext.data.Record} nodeInfo An HTMLElement template node, index of a template node, + * id of a template node, record associated with a node or an array of any of those to select * @param {Boolean} keepExisting (optional) true to keep existing selections * @param {Boolean} suppressEvent (optional) true to skip firing of the selectionchange vent */ @@ -41995,7 +46706,8 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { /** * Gets a template node. - * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node + * @param {HTMLElement/String/Number/Ext.data.Record} nodeInfo An HTMLElement template node, index of a template node, + * the id of a template node or the record associated with the node. * @return {HTMLElement} The node or null if it wasn't found */ getNode : function(nodeInfo){ @@ -42003,6 +46715,9 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { return document.getElementById(nodeInfo); }else if(Ext.isNumber(nodeInfo)){ return this.all.elements[nodeInfo]; + }else if(nodeInfo instanceof Ext.data.Record){ + var idx = this.store.indexOf(nodeInfo); + return this.all.elements[idx]; } return nodeInfo; }, @@ -42014,10 +46729,12 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { * @return {Array} An array of nodes */ getNodes : function(start, end){ - var ns = this.all.elements; + var ns = this.all.elements, + nodes = [], + i; + start = start || 0; end = !Ext.isDefined(end) ? Math.max(ns.length - 1, 0) : end; - var nodes = [], i; if(start <= end){ for(i = start; i <= end && ns[i]; i++){ nodes.push(ns[i]); @@ -42032,7 +46749,8 @@ Ext.DataView = Ext.extend(Ext.BoxComponent, { /** * Finds the index of the passed node. - * @param {HTMLElement/String/Number} nodeInfo An HTMLElement template node, index of a template node or the id of a template node + * @param {HTMLElement/String/Number/Record} nodeInfo An HTMLElement template node, index of a template node, the id of a template node + * or a record associated with a node. * @return {Number} The index of the node or -1 */ indexOf : function(node){ @@ -42099,7 +46817,7 @@ Ext.reg('dataview', Ext.DataView); "url":"images\/thumbs\/zack_sink.jpg" } ] -} +} var store = new Ext.data.JsonStore({ url: 'get-images.php', root: 'images', @@ -42122,7 +46840,7 @@ var listView = new Ext.list.ListView({ dataIndex: 'name' },{ header: 'Last Modified', - width: .35, + width: .35, dataIndex: 'lastmod', tpl: '{lastmod:date("m-d h:i a")}' },{ @@ -42172,7 +46890,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { * @cfg {String} itemSelector * Defaults to 'dl' to work with the preconfigured {@link Ext.DataView#tpl tpl}. * This setting specifies the CSS selector (e.g. div.some-class or span:first-child) - * that will be used to determine what nodes the ListView will be working with. + * that will be used to determine what nodes the ListView will be working with. */ itemSelector: 'dl', /** @@ -42221,7 +46939,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { tpl: '{size:fileSize}', width: .35 } - *
      + *
      * Acceptable properties for each column configuration object are: *
        *
      • align : String
        Set the CSS text-align property @@ -42255,8 +46973,8 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { /* * IE has issues when setting percentage based widths to 100%. Default to 99. */ - maxWidth: Ext.isIE ? 99 : 100, - + maxColumnWidth: Ext.isIE ? 99 : 100, + initComponent : function(){ if(this.columnResize){ this.colResizer = new Ext.list.ColumnResizer(this.colResizer); @@ -42295,13 +47013,13 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { '' ); }; - - var cs = this.columns, - allocatedWidth = 0, - colsWithWidth = 0, - len = cs.length, + + var cs = this.columns, + allocatedWidth = 0, + colsWithWidth = 0, + len = cs.length, columns = []; - + for(var i = 0; i < len; i++){ var c = cs[i]; if(!c.isColumn) { @@ -42310,18 +47028,21 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { } if(c.width) { allocatedWidth += c.width*100; + if(allocatedWidth > this.maxColumnWidth){ + c.width -= (allocatedWidth - this.maxColumnWidth) / 100; + } colsWithWidth++; } columns.push(c); } - + cs = this.columns = columns; - + // auto calculate missing column widths if(colsWithWidth < len){ var remaining = len - colsWithWidth; - if(allocatedWidth < this.maxWidth){ - var perCol = ((this.maxWidth-allocatedWidth) / remaining)/100; + if(allocatedWidth < this.maxColumnWidth){ + var perCol = ((this.maxColumnWidth-allocatedWidth) / remaining)/100; for(var j = 0; j < len; j++){ var c = cs[j]; if(!c.width){ @@ -42335,12 +47056,12 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { onRender : function(){ this.autoEl = { - cls: 'x-list-wrap' + cls: 'x-list-wrap' }; Ext.list.ListView.superclass.onRender.apply(this, arguments); this.internalTpl.overwrite(this.el, {columns: this.columns}); - + this.innerBody = Ext.get(this.el.dom.childNodes[1].firstChild); this.innerHd = Ext.get(this.el.dom.firstChild.firstChild); @@ -42355,7 +47076,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { /** *

        Function which can be overridden which returns the data object passed to this - * view's {@link #tpl template} to render the whole ListView. The returned object + * view's {@link #tpl template} to render the whole ListView. The returned object * shall contain the following properties:

        *
          *
        • columns : String
          See {@link #columns}
        • @@ -42372,7 +47093,7 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { return { columns: this.columns, rows: rs - } + }; }, verifyInternalSize : function(){ @@ -42383,30 +47104,32 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { // private onResize : function(w, h){ - var bd = this.innerBody.dom; - var hd = this.innerHd.dom - if(!bd){ + var body = this.innerBody.dom, + header = this.innerHd.dom, + scrollWidth = w - Ext.num(this.scrollOffset, Ext.getScrollBarWidth()) + 'px', + parentNode; + + if(!body){ return; } - var bdp = bd.parentNode; + parentNode = body.parentNode; if(Ext.isNumber(w)){ - var sw = w - Ext.num(this.scrollOffset, Ext.getScrollBarWidth()); - if(this.reserveScrollOffset || ((bdp.offsetWidth - bdp.clientWidth) > 10)){ - bd.style.width = sw + 'px'; - hd.style.width = sw + 'px'; + if(this.reserveScrollOffset || ((parentNode.offsetWidth - parentNode.clientWidth) > 10)){ + body.style.width = scrollWidth; + header.style.width = scrollWidth; }else{ - bd.style.width = w + 'px'; - hd.style.width = w + 'px'; + body.style.width = w + 'px'; + header.style.width = w + 'px'; setTimeout(function(){ - if((bdp.offsetWidth - bdp.clientWidth) > 10){ - bd.style.width = sw + 'px'; - hd.style.width = sw + 'px'; + if((parentNode.offsetWidth - parentNode.clientWidth) > 10){ + body.style.width = scrollWidth; + header.style.width = scrollWidth; } }, 10); } } if(Ext.isNumber(h)){ - bdp.style.height = (h - hd.parentNode.offsetHeight) + 'px'; + parentNode.style.height = Math.max(0, h - header.parentNode.offsetHeight) + 'px'; } }, @@ -42415,11 +47138,14 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { this.verifyInternalSize(); }, - findHeaderIndex : function(hd){ - hd = hd.dom || hd; - var pn = hd.parentNode, cs = pn.parentNode.childNodes; - for(var i = 0, c; c = cs[i]; i++){ - if(c == pn){ + findHeaderIndex : function(header){ + header = header.dom || header; + var parentNode = header.parentNode, + children = parentNode.parentNode.childNodes, + i = 0, + c; + for(; c = children[i]; i++){ + if(c == parentNode){ return i; } } @@ -42427,9 +47153,13 @@ Ext.list.ListView = Ext.extend(Ext.DataView, { }, setHdWidths : function(){ - var els = this.innerHd.dom.getElementsByTagName('div'); - for(var i = 0, cs = this.columns, len = cs.length; i < len; i++){ - els[i].style.width = (cs[i].width*100) + '%'; + var els = this.innerHd.dom.getElementsByTagName('div'), + i = 0, + columns = this.columns, + len = columns.length; + + for(; i < len; i++){ + els[i].style.width = (columns[i].width*100) + '%'; } } }); @@ -42625,23 +47355,23 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, { }, handleHdMove : function(e, t){ - var hw = 5, + var handleWidth = 5, x = e.getPageX(), - hd = e.getTarget('em', 3, true); - if(hd){ - var r = hd.getRegion(), - ss = hd.dom.style, - pn = hd.dom.parentNode; + header = e.getTarget('em', 3, true); + if(header){ + var region = header.getRegion(), + style = header.dom.style, + parentNode = header.dom.parentNode; - if(x - r.left <= hw && pn != pn.parentNode.firstChild){ - this.activeHd = Ext.get(pn.previousSibling.firstChild); - ss.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize'; - } else if(r.right - x <= hw && pn != pn.parentNode.lastChild.previousSibling){ - this.activeHd = hd; - ss.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize'; + if(x - region.left <= handleWidth && parentNode != parentNode.parentNode.firstChild){ + this.activeHd = Ext.get(parentNode.previousSibling.firstChild); + style.cursor = Ext.isWebKit ? 'e-resize' : 'col-resize'; + } else if(region.right - x <= handleWidth && parentNode != parentNode.parentNode.lastChild.previousSibling){ + this.activeHd = header; + style.cursor = Ext.isWebKit ? 'w-resize' : 'col-resize'; } else{ delete this.activeHd; - ss.cursor = ''; + style.cursor = ''; } } }, @@ -42652,59 +47382,89 @@ Ext.list.ColumnResizer = Ext.extend(Ext.util.Observable, { }, onStart: function(e){ - this.view.disableHeaders = true; - this.proxy = this.view.el.createChild({cls:'x-list-resizer'}); - this.proxy.setHeight(this.view.el.getHeight()); - var x = this.tracker.getXY()[0], - w = this.view.innerHd.getWidth(); + var me = this, + view = me.view, + dragHeader = me.dragHd, + x = me.tracker.getXY()[0]; - this.hdX = this.dragHd.getX(); - this.hdIndex = this.view.findHeaderIndex(this.dragHd); + me.proxy = view.el.createChild({cls:'x-list-resizer'}); + me.dragX = dragHeader.getX(); + me.headerIndex = view.findHeaderIndex(dragHeader); - this.proxy.setX(this.hdX); - this.proxy.setWidth(x-this.hdX); + me.headersDisabled = view.disableHeaders; + view.disableHeaders = true; - this.minWidth = w*this.minPct; - this.maxWidth = w - (this.minWidth*(this.view.columns.length-1-this.hdIndex)); + me.proxy.setHeight(view.el.getHeight()); + me.proxy.setX(me.dragX); + me.proxy.setWidth(x - me.dragX); + + this.setBoundaries(); + + }, + + // Sets up the boundaries for the drag/drop operation + setBoundaries: function(relativeX){ + var view = this.view, + headerIndex = this.headerIndex, + width = view.innerHd.getWidth(), + relativeX = view.innerHd.getX(), + minWidth = Math.ceil(width * this.minPct), + maxWidth = width - minWidth, + numColumns = view.columns.length, + headers = view.innerHd.select('em', true), + minX = minWidth + relativeX, + maxX = maxWidth + relativeX, + header; + + if (numColumns == 2) { + this.minX = minX; + this.maxX = maxX; + }else{ + header = headers.item(headerIndex + 2); + this.minX = headers.item(headerIndex).getX() + minWidth; + this.maxX = header ? header.getX() - minWidth : maxX; + if (headerIndex == 0) { + // First + this.minX = minX; + } else if (headerIndex == numColumns - 2) { + // Last + this.maxX = maxX; + } + } }, onDrag: function(e){ - var cursorX = this.tracker.getXY()[0]; - this.proxy.setWidth((cursorX-this.hdX).constrain(this.minWidth, this.maxWidth)); + var me = this, + cursorX = me.tracker.getXY()[0].constrain(me.minX, me.maxX); + + me.proxy.setWidth(cursorX - this.dragX); }, onEnd: function(e){ /* calculate desired width by measuring proxy and then remove it */ - var nw = this.proxy.getWidth(); + var newWidth = this.proxy.getWidth(), + index = this.headerIndex, + view = this.view, + columns = view.columns, + width = view.innerHd.getWidth(), + newPercent = Math.ceil(newWidth * view.maxColumnWidth / width) / 100, + disabled = this.headersDisabled, + headerCol = columns[index], + otherCol = columns[index + 1], + totalPercent = headerCol.width + otherCol.width; + this.proxy.remove(); - var index = this.hdIndex, - vw = this.view, - cs = vw.columns, - len = cs.length, - w = this.view.innerHd.getWidth(), - minPct = this.minPct * 100, - pct = Math.ceil((nw * vw.maxWidth) / w), - diff = (cs[index].width * 100) - pct, - each = Math.floor(diff / (len-1-index)), - mod = diff - (each * (len-1-index)); + headerCol.width = newPercent; + otherCol.width = totalPercent - newPercent; - for(var i = index+1; i < len; i++){ - var cw = (cs[i].width * 100) + each, - ncw = Math.max(minPct, cw); - if(cw != ncw){ - mod += cw - ncw; - } - cs[i].width = ncw / 100; - } - cs[index].width = pct / 100; - cs[index+1].width += (mod / 100); delete this.dragHd; - vw.setHdWidths(); - vw.refresh(); + view.setHdWidths(); + view.refresh(); + setTimeout(function(){ - vw.disableHeaders = false; + view.disableHeaders = disabled; }, 100); } }); @@ -43331,7 +48091,7 @@ new Ext.TabPanel({ *
        • cls : String
          The CSS class name
        • *
        • iconCls : String
          A CSS class to provide appearance for an icon.
        • *
        - * @param {BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip. + * @param {Ext.BoxComponent} item The {@link Ext.BoxComponent BoxComponent} for which to create a selector element in the tab strip. * @return {Object} An object hash containing the properties required to render the selector element. */ getTemplateArgs : function(item) { @@ -43360,9 +48120,6 @@ new Ext.TabPanel({ if(this.rendered){ var items = this.items; this.initTab(c, items.indexOf(c)); - if(items.getCount() == 1){ - this.syncSize(); - } this.delegateUpdates(); } }, @@ -43515,13 +48272,14 @@ new Ext.TabPanel({ // private delegateUpdates : function(){ + var rendered = this.rendered; if(this.suspendUpdates){ return; } - if(this.resizeTabs && this.rendered){ + if(this.resizeTabs && rendered){ this.autoSizeTabs(); } - if(this.enableTabScroll && this.rendered){ + if(this.enableTabScroll && rendered){ this.autoScrollTabs(); } }, @@ -43589,13 +48347,15 @@ new Ext.TabPanel({ Ext.fly(oldEl).removeClass('x-tab-strip-active'); } } + this.activeTab = item; if(item){ var el = this.getTabEl(item); Ext.fly(el).addClass('x-tab-strip-active'); - this.activeTab = item; this.stack.add(item); this.layout.setActiveItem(item); + // Need to do this here, since setting the active tab slightly changes the size + this.delegateUpdates(); if(this.scrolling){ this.scrollToTab(item, this.animScroll); } @@ -43635,10 +48395,11 @@ new Ext.TabPanel({ pos = this.getScrollPos(), l = this.edge.getOffsetsTo(this.stripWrap)[0] + pos; - if(!this.enableTabScroll || count < 1 || cw < 20){ // 20 to prevent display:none issues + if(!this.enableTabScroll || cw < 20){ // 20 to prevent display:none issues return; } - if(l <= tw){ + if(count == 0 || l <= tw){ + // ensure the width is set if there's no tabs wd.scrollLeft = 0; wrap.setWidth(tw); if(this.scrolling){ @@ -44082,8 +48843,32 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { * @type Menu * The {@link Ext.menu.Menu Menu} object associated with this Button when configured with the {@link #menu} config option. */ + /** + * @cfg {Boolean} autoWidth + * By default, if a width is not specified the button will attempt to stretch horizontally to fit its content. + * If the button is being managed by a width sizing layout (hbox, fit, anchor), set this to false to prevent + * the button from doing this automatic sizing. + * Defaults to undefined. + */ initComponent : function(){ + if(this.menu){ + // If array of items, turn it into an object config so we + // can set the ownerCt property in the config + if (Ext.isArray(this.menu)){ + this.menu = { items: this.menu }; + } + + // An object config will work here, but an instance of a menu + // will have already setup its ref's and have no effect + if (Ext.isObject(this.menu)){ + this.menu.ownerCt = this; + } + + this.menu = Ext.menu.MenuMgr.get(this.menu); + this.menu.ownerCt = undefined; + } + Ext.Button.superclass.initComponent.call(this); this.addEvents( @@ -44146,9 +48931,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { */ 'menutriggerout' ); - if(this.menu){ - this.menu = Ext.menu.MenuMgr.get(this.menu); - } + if(Ext.isString(this.toggleGroup)){ this.enableToggle = true; } @@ -44179,7 +48962,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { if(!Ext.isEmpty(this.oldCls)){ this.el.removeClass([this.oldCls, 'x-btn-pressed']); } - this.oldCls = (this.iconCls || this.icon) ? (this.text ? ' x-btn-text-icon' : ' x-btn-icon') : ' x-btn-noicon'; + this.oldCls = (this.iconCls || this.icon) ? (this.text ? 'x-btn-text-icon' : 'x-btn-icon') : 'x-btn-noicon'; this.el.addClass([this.oldCls, this.pressed ? 'x-btn-pressed' : null]); } }, @@ -44264,9 +49047,10 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { if(this.repeat){ var repeater = new Ext.util.ClickRepeater(btn, Ext.isObject(this.repeat) ? this.repeat : {}); - this.mon(repeater, 'click', this.onClick, this); + this.mon(repeater, 'click', this.onRepeatClick, this); + }else{ + this.mon(btn, this.clickEvent, this.onClick, this); } - this.mon(btn, this.clickEvent, this.onClick, this); }, // private @@ -44334,7 +49118,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { this.clearTip(); } if(this.menu && this.destroyMenu !== false) { - Ext.destroy(this.menu); + Ext.destroy(this.btnEl, this.menu); } Ext.destroy(this.repeater); }, @@ -44353,7 +49137,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { // private doAutoWidth : function(){ - if(this.el && this.text && this.width === undefined){ + if(this.autoWidth !== false && this.el && this.text && this.width === undefined){ this.el.setWidth('auto'); if(Ext.isIE7 && Ext.isStrict){ var ib = this.btnEl; @@ -44444,13 +49228,6 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { return this; }, - /** - * Focus the button - */ - focus : function(){ - this.btnEl.focus(); - }, - // private onDisable : function(){ this.onDisableChange(true); @@ -44506,6 +49283,11 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { return this.menu && this.menu.ownerCt == this && this.menu.isVisible(); }, + // private + onRepeatClick : function(repeat, e){ + this.onClick(e); + }, + // private onClick : function(e){ if(e){ @@ -44515,9 +49297,7 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { return; } if(!this.disabled){ - if(this.enableToggle && (this.allowDepress !== false || !this.pressed)){ - this.toggle(); - } + this.doToggle(); if(this.menu && !this.hasVisibleMenu() && !this.ignoreNextClick){ this.showMenu(); } @@ -44529,6 +49309,13 @@ Ext.Button = Ext.extend(Ext.BoxComponent, { } }, + // private + doToggle: function(){ + if (this.enableToggle && (this.allowDepress !== false || !this.pressed)) { + this.toggle(); + } + }, + // private isMenuTriggerOver : function(e, internal){ return this.menu && !internal; @@ -44817,9 +49604,7 @@ Ext.SplitButton = Ext.extend(Ext.Button, { this.arrowHandler.call(this.scope || this, this, e); } }else{ - if(this.enableToggle){ - this.toggle(); - } + this.doToggle(); this.fireEvent("click", this, e); if(this.handler){ this.handler.call(this.scope || this, this, e); @@ -44932,7 +49717,7 @@ Ext.CycleButton = Ext.extend(Ext.SplitButton, { } this.activeItem = item; if(!item.checked){ - item.setChecked(true, false); + item.setChecked(true, suppressEvent); } if(this.forceIcon){ this.setIconClass(this.forceIcon); @@ -45153,7 +49938,7 @@ Ext.extend(T, Ext.Container, { /** * @cfg {Boolean} enableOverflow - * Defaults to false. Configure true to make the toolbar provide a button + * Defaults to false. Configure true to make the toolbar provide a button * which activates a dropdown Menu to show items which overflow the Toolbar's width. */ /** @@ -45397,6 +50182,9 @@ Ext.extend(T, Ext.Container, { // private onRemove : function(c){ Ext.Toolbar.superclass.onRemove.call(this); + if (c == this.activeMenuBtn) { + delete this.activeMenuBtn; + } this.trackMenu(c, true); }, @@ -46246,8 +51034,13 @@ Ext.History = (function () { var currentToken; function getHash() { - var href = top.location.href, i = href.indexOf("#"); - return i >= 0 ? href.substr(i + 1) : null; + var href = location.href, i = href.indexOf("#"), + hash = i >= 0 ? href.substr(i + 1) : null; + + if (Ext.isGecko) { + hash = decodeURIComponent(hash); + } + return hash; } function doSave() { @@ -46296,7 +51089,7 @@ Ext.History = (function () { if (newtoken !== token) { token = newtoken; handleStateChange(token); - top.location.hash = token; + location.hash = token; hash = token; doSave(); } else if (newHash !== hash) { @@ -46412,7 +51205,7 @@ tabPanel.on('tabchange', function(tabPanel, tab){ if (Ext.isIE) { return updateIFrame(token); } else { - top.location.hash = token; + location.hash = token; return true; } }, @@ -46724,7 +51517,7 @@ myGrid.on('render', function(grid) { // private afterRender : function(){ Ext.ToolTip.superclass.afterRender.call(this); - this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1); + this.anchorEl.setStyle('z-index', this.el.getZIndex() + 1).setVisibilityMode(Ext.Element.DISPLAY); }, /** @@ -46991,8 +51784,8 @@ myGrid.on('render', function(grid) { this.showAt(this.getTargetXY()); if(this.anchor){ - this.syncAnchor(); this.anchorEl.show(); + this.syncAnchor(); this.constrainPosition = this.origConstrainPosition; }else{ this.anchorEl.hide(); @@ -47010,6 +51803,8 @@ myGrid.on('render', function(grid) { if(this.anchor && !this.anchorEl.isVisible()){ this.syncAnchor(); this.anchorEl.show(); + }else{ + this.anchorEl.hide(); } }, @@ -47079,7 +51874,14 @@ myGrid.on('render', function(grid) { onDocMouseDown : function(e){ if(this.autoHide !== true && !this.closable && !e.within(this.el.dom)){ this.disable(); - this.enable.defer(100, this); + this.doEnable.defer(100, this); + } + }, + + // private + doEnable : function(){ + if(!this.isDestroyed){ + this.enable(); } }, @@ -47091,7 +51893,7 @@ myGrid.on('render', function(grid) { // private adjustPosition : function(x, y){ - if(this.contstrainPosition){ + if(this.constrainPosition){ var ay = this.targetXY[1], h = this.getSize().height; if(y <= ay && (y+h) >= ay){ y = ay-h-5; @@ -47344,7 +52146,7 @@ Ext.reg('quicktip', Ext.QuickTip);/** * configuration properties of Ext.QuickTip. These settings will apply to all * tooltips shown by the singleton.

        *

        Below is the summary of the configuration properties which can be used. - * For detailed descriptions see {@link #getQuickTip}

        + * For detailed descriptions see the config options for the {@link Ext.QuickTip QuickTip} class

        *

        QuickTips singleton configs (all are optional)

        *
        • dismissDelay
        • *
        • hideDelay
        • @@ -47369,7 +52171,7 @@ Ext.QuickTips.init(); Ext.apply(Ext.QuickTips.getQuickTip(), { maxWidth: 200, minWidth: 100, - showDelay: 50, + showDelay: 50, // Show 50ms after entering target trackMouse: true }); @@ -47379,7 +52181,7 @@ Ext.QuickTips.register({ title: 'My Tooltip', text: 'This tooltip was added in code', width: 100, - dismissDelay: 20 + dismissDelay: 10000 // Hide after 10 seconds hover });
          *

          To register a quick tip in markup, you simply add one or more of the valid QuickTip attributes prefixed with @@ -47400,7 +52202,9 @@ Ext.QuickTips.register({ * @singleton */ Ext.QuickTips = function(){ - var tip, locks = []; + var tip, + disabled = false; + return { /** * Initialize the global QuickTips instance and prepare any quick tips. @@ -47414,23 +52218,40 @@ Ext.QuickTips = function(){ }); return; } - tip = new Ext.QuickTip({elements:'header,body'}); + tip = new Ext.QuickTip({ + elements:'header,body', + disabled: disabled + }); if(autoRender !== false){ tip.render(Ext.getBody()); } } }, + // Protected method called by the dd classes + ddDisable : function(){ + // don't disable it if we don't need to + if(tip && !disabled){ + tip.disable(); + } + }, + + // Protected method called by the dd classes + ddEnable : function(){ + // only enable it if it hasn't been disabled + if(tip && !disabled){ + tip.enable(); + } + }, + /** * Enable quick tips globally. */ enable : function(){ if(tip){ - locks.pop(); - if(locks.length < 1){ - tip.enable(); - } + tip.enable(); } + disabled = false; }, /** @@ -47440,7 +52261,7 @@ Ext.QuickTips = function(){ if(tip){ tip.disable(); } - locks.push(1); + disabled = true; }, /** @@ -47452,7 +52273,8 @@ Ext.QuickTips = function(){ }, /** - * Gets the global QuickTips instance. + * Gets the single {@link Ext.QuickTip QuickTip} instance used to show tips from all registered elements. + * @return {Ext.QuickTip} */ getQuickTip : function(){ return tip; @@ -47479,11 +52301,78 @@ Ext.QuickTips = function(){ * Alias of {@link #register}. * @param {Object} config The config object */ - tips :function(){ + tips : function(){ tip.register.apply(tip, arguments); } - } + }; }();/** + * @class Ext.slider.Tip + * @extends Ext.Tip + * Simple plugin for using an Ext.Tip with a slider to show the slider value. Example usage: +

          +new Ext.Slider({
          +    width: 214,
          +    minValue: 0,
          +    maxValue: 100,
          +    plugins: new Ext.slider.Tip()
          +});
          +
          + * Optionally provide your own tip text by overriding getText: +
          + new Ext.Slider({
          +     width: 214,
          +     minValue: 0,
          +     maxValue: 100,
          +     plugins: new Ext.slider.Tip({
          +         getText: function(thumb){
          +             return String.format('{0}% complete', thumb.value);
          +         }
          +     })
          + });
          + 
          + */ +Ext.slider.Tip = Ext.extend(Ext.Tip, { + minWidth: 10, + offsets : [0, -10], + + init: function(slider) { + slider.on({ + scope : this, + dragstart: this.onSlide, + drag : this.onSlide, + dragend : this.hide, + destroy : this.destroy + }); + }, + + /** + * @private + * Called whenever a dragstart or drag event is received on the associated Thumb. + * Aligns the Tip with the Thumb's new position. + * @param {Ext.slider.MultiSlider} slider The slider + * @param {Ext.EventObject} e The Event object + * @param {Ext.slider.Thumb} thumb The thumb that the Tip is attached to + */ + onSlide : function(slider, e, thumb) { + this.show(); + this.body.update(this.getText(thumb)); + this.doAutoWidth(); + this.el.alignTo(thumb.el, 'b-t?', this.offsets); + }, + + /** + * Used to create the text that appears in the Tip's body. By default this just returns + * the value of the Slider Thumb that the Tip is attached to. Override to customize. + * @param {Ext.slider.Thumb} thumb The Thumb that the Tip is attached to + * @return {String} The text to display in the tip + */ + getText : function(thumb) { + return String(thumb.value); + } +}); + +//backwards compatibility - SliderTip used to be a ux before 3.2 +Ext.ux.SliderTip = Ext.slider.Tip;/** * @class Ext.tree.TreePanel * @extends Ext.Panel *

          The TreePanel provides tree-structured UI representation of tree-structured data.

          @@ -47992,7 +52881,7 @@ new Ext.tree.TreePanel({ * @return {Node} */ setRootNode : function(node){ - Ext.destroy(this.root); + this.destroyRoot(); if(!node.render){ // attributes passed node = this.loader.createNode(node); } @@ -48117,6 +53006,12 @@ new Ext.tree.TreePanel({ * (bSuccess, oLastNode) where bSuccess is if the expand was successful and oLastNode is the last node that was expanded. */ expandPath : function(path, attr, callback){ + if(Ext.isEmpty(path)){ + if(callback){ + callback(false, undefined); + } + return; + } attr = attr || 'id'; var keys = path.split(this.pathSeparator); var curNode = this.root; @@ -48155,6 +53050,12 @@ new Ext.tree.TreePanel({ * (bSuccess, oSelNode) where bSuccess is if the selection was successful and oSelNode is the selected node. */ selectPath : function(path, attr, callback){ + if(Ext.isEmpty(path)){ + if(callback){ + callback(false, undefined); + } + return; + } attr = attr || 'id'; var keys = path.split(this.pathSeparator), v = keys.pop(); @@ -48244,9 +53145,20 @@ new Ext.tree.TreePanel({ Ext.dd.ScrollManager.unregister(this.body); Ext.destroy(this.dropZone, this.dragZone); } - Ext.destroy(this.root, this.loader); + this.destroyRoot(); + Ext.destroy(this.loader); this.nodeHash = this.root = this.loader = null; Ext.tree.TreePanel.superclass.beforeDestroy.call(this); + }, + + /** + * Destroy the root node. Not included by itself because we need to pass the silent parameter. + * @private + */ + destroyRoot : function(){ + if(this.root && this.root.destroy){ + this.root.destroy(true); + } } /** @@ -48437,7 +53349,7 @@ 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); -} +}; Ext.tree.TreeEventModel.prototype = { initEvents : function(){ @@ -48534,9 +53446,9 @@ Ext.tree.TreeEventModel.prototype = { this.onIconClick(e, this.getNode(e)); }else if(this.getNodeTarget(e)){ this.onNodeClick(e, this.getNode(e)); - }else{ - this.onContainerEvent(e, 'click'); } + }else{ + this.checkContainerEvent(e, 'click'); } }, @@ -48544,9 +53456,9 @@ Ext.tree.TreeEventModel.prototype = { if(this.beforeEvent(e)){ if(this.getNodeTarget(e)){ this.onNodeDblClick(e, this.getNode(e)); - }else{ - this.onContainerEvent(e, 'dblclick'); } + }else{ + this.checkContainerEvent(e, 'dblclick'); } }, @@ -48554,12 +53466,20 @@ Ext.tree.TreeEventModel.prototype = { if(this.beforeEvent(e)){ if(this.getNodeTarget(e)){ this.onNodeContextMenu(e, this.getNode(e)); - }else{ - this.onContainerEvent(e, 'contextmenu'); } + }else{ + this.checkContainerEvent(e, 'contextmenu'); } }, + checkContainerEvent: function(e, type){ + if(this.disabled){ + e.stopEvent(); + return false; + } + this.onContainerEvent(e, type); + }, + onContainerEvent: function(e, type){ this.tree.fireEvent('container' + type, this.tree, e); }, @@ -48622,33 +53542,34 @@ Ext.tree.TreeEventModel.prototype = { * @extends Ext.util.Observable * The default single selection for a TreePanel. */ -Ext.tree.DefaultSelectionModel = function(config){ - this.selNode = null; +Ext.tree.DefaultSelectionModel = Ext.extend(Ext.util.Observable, { + + constructor : function(config){ + this.selNode = null; - this.addEvents( - /** - * @event selectionchange - * Fires when the selected node changes - * @param {DefaultSelectionModel} this - * @param {TreeNode} node the new selection - */ - 'selectionchange', + this.addEvents( + /** + * @event selectionchange + * Fires when the selected node changes + * @param {DefaultSelectionModel} this + * @param {TreeNode} node the new selection + */ + 'selectionchange', - /** - * @event beforeselect - * Fires before the selected node changes, return false to cancel the change - * @param {DefaultSelectionModel} this - * @param {TreeNode} node the new selection - * @param {TreeNode} node the old selection - */ - 'beforeselect' - ); + /** + * @event beforeselect + * Fires before the selected node changes, return false to cancel the change + * @param {DefaultSelectionModel} this + * @param {TreeNode} node the new selection + * @param {TreeNode} node the old selection + */ + 'beforeselect' + ); - Ext.apply(this, config); - Ext.tree.DefaultSelectionModel.superclass.constructor.call(this); -}; + 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.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this); @@ -48823,23 +53744,24 @@ Ext.extend(Ext.tree.DefaultSelectionModel, Ext.util.Observable, { * @extends Ext.util.Observable * Multi selection for a TreePanel. */ -Ext.tree.MultiSelectionModel = function(config){ - this.selNodes = []; - this.selMap = {}; - this.addEvents( - /** - * @event selectionchange - * Fires when the selected nodes change - * @param {MultiSelectionModel} this - * @param {Array} nodes Array of the selected nodes - */ - 'selectionchange' - ); - Ext.apply(this, config); - Ext.tree.MultiSelectionModel.superclass.constructor.call(this); -}; +Ext.tree.MultiSelectionModel = Ext.extend(Ext.util.Observable, { + + constructor : function(config){ + this.selNodes = []; + this.selMap = {}; + this.addEvents( + /** + * @event selectionchange + * Fires when the selected nodes change + * @param {MultiSelectionModel} this + * @param {Array} nodes Array of the selected nodes + */ + '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.mon(tree.getTreeEl(), 'keydown', this.onKeyDown, this); @@ -48925,7 +53847,7 @@ Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, { * @return {Array} */ getSelectedNodes : function(){ - return this.selNodes; + return this.selNodes.concat([]); }, onKeyDown : Ext.tree.DefaultSelectionModel.prototype.onKeyDown, @@ -48941,94 +53863,94 @@ Ext.extend(Ext.tree.MultiSelectionModel, Ext.util.Observable, { * @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 = Ext.extend(Ext.util.Observable, { - Ext.data.Tree.superclass.constructor.call(this); -}; + constructor: 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 '/'). @@ -49093,134 +54015,125 @@ Ext.extend(Ext.data.Tree, Ext.util.Observable, { * @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, "xnode-"); - 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; +Ext.data.Node = Ext.extend(Ext.util.Observable, { - 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); -}; + constructor: 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, "xnode-"); + this.attributes.id = this.id; + } + /** + * All child nodes of this node. @type Array + */ + this.childNodes = []; + /** + * 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 @@ -49279,7 +54192,7 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { hasChildNodes : function(){ return !this.isLeaf() && this.childNodes.length > 0; }, - + /** * Returns true if this node has one or more child nodes, or if the expandable * node attribute is explicitly specified as true (see {@link #attributes}), otherwise returns false. @@ -49304,7 +54217,7 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { // 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]); + this.appendChild(multi[i]); } }else{ if(this.fireEvent("beforeappend", this.ownerTree, this, node) === false){ @@ -49377,34 +54290,45 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { this.setLastChild(node.previousSibling); } - node.clear(); this.fireEvent("remove", this.ownerTree, this, node); if(destroy){ - node.destroy(); + node.destroy(true); + }else{ + node.clear(); } return node; }, - + // private clear : function(destroy){ // clear any references from the node this.setOwnerTree(null, destroy); - this.parentNode = this.previousSibling = this.nextSibling = null + this.parentNode = this.previousSibling = this.nextSibling = null; if(destroy){ - this.firstChild = this.lastChild = null; + this.firstChild = this.lastChild = null; } }, - + /** * Destroys the node. */ - destroy : function(){ - this.purgeListeners(); - this.clear(true); - Ext.each(this.childNodes, function(n){ - n.destroy(); - }); - this.childNodes = null; + destroy : function(/* private */ silent){ + /* + * Silent is to be used in a number of cases + * 1) When setRootNode is called. + * 2) When destroy on the tree is called + * 3) For destroying child nodes on a node + */ + if(silent === true){ + this.purgeListeners(); + this.clear(true); + Ext.each(this.childNodes, function(n){ + n.destroy(true); + }); + this.childNodes = null; + }else{ + this.remove(true); + } }, /** @@ -49469,10 +54393,12 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { * @return {Node} this */ remove : function(destroy){ - this.parentNode.removeChild(this, destroy); + if (this.parentNode) { + this.parentNode.removeChild(this, destroy); + } return this; }, - + /** * Removes all child nodes from this node. * @param {Boolean} destroy true to destroy the node upon removal. Defaults to false. @@ -49570,7 +54496,7 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { } } }, - + /** * Changes the id of this node. * @param {String} id The new id for the node. @@ -49588,7 +54514,7 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { this.onIdChange(id); } }, - + // private onIdChange: Ext.emptyFn, @@ -49639,7 +54565,7 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { 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); + cs[i].cascade(fn, scope, args); } } }, @@ -49655,9 +54581,9 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { 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; - } + if(fn.apply(scope || cs[i], args || [cs[i]]) === false){ + break; + } } }, @@ -49665,30 +54591,39 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { * 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 + * @param {Boolean} deep (Optional) True to search through nodes deeper than the immediate children * @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; + findChild : function(attribute, value, deep){ + return this.findChildBy(function(){ + return this.attributes[attribute] == value; + }, null, deep); }, /** * Finds the first child by a custom function. The child matches if the function passed returns true. * @param {Function} fn A function which must return true if the passed Node is the required Node. * @param {Object} scope (optional) The scope (this reference) in which the function is executed. Defaults to the Node being tested. + * @param {Boolean} deep (Optional) True to search through nodes deeper than the immediate children * @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]; - } + findChildBy : function(fn, scope, deep){ + var cs = this.childNodes, + len = cs.length, + i = 0, + n, + res; + for(; i < len; i++){ + n = cs[i]; + if(fn.call(scope || n, n) === true){ + return n; + }else if (deep){ + res = n.findChildBy(fn, scope, deep); + if(res != null){ + return res; + } + } + } return null; }, @@ -49775,138 +54710,140 @@ Ext.extend(Ext.data.Node, Ext.util.Observable, { * @constructor * @param {Object/String} attributes The attributes/config for the node or just a string with the text for the node */ -Ext.tree.TreeNode = function(attributes){ - attributes = attributes || {}; - if(Ext.isString(attributes)){ - 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; +Ext.tree.TreeNode = Ext.extend(Ext.data.Node, { - /** - * Read-only. The text for this node. To change it use {@link #setText}. - * @type String - */ - this.text = attributes.text; - /** - * True if this node is disabled. - * @type Boolean - */ - this.disabled = attributes.disabled === true; - /** - * True if this node is hidden. - * @type Boolean - */ - this.hidden = attributes.hidden === true; + constructor : function(attributes){ + attributes = attributes || {}; + if(Ext.isString(attributes)){ + 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.addEvents( /** - * @event textchange - * Fires when the text for this node is changed - * @param {Node} this This node - * @param {String} text The new text - * @param {String} oldText The old text - */ - 'textchange', + * Read-only. The text for this node. To change it use {@link #setText}. + * @type String + */ + this.text = attributes.text; /** - * @event beforeexpand - * Fires before this node is expanded, return false to cancel. - * @param {Node} this This node - * @param {Boolean} deep - * @param {Boolean} anim - */ - 'beforeexpand', + * True if this node is disabled. + * @type Boolean + */ + this.disabled = attributes.disabled === true; /** - * @event beforecollapse - * Fires before this node is collapsed, return false to cancel. - * @param {Node} this This node - * @param {Boolean} deep - * @param {Boolean} anim - */ - 'beforecollapse', - /** - * @event expand - * Fires when this node is expanded - * @param {Node} this This node - */ - 'expand', - /** - * @event disabledchange - * Fires when the disabled status of this node changes - * @param {Node} this This node - * @param {Boolean} disabled - */ - 'disabledchange', - /** - * @event collapse - * Fires when this node is collapsed - * @param {Node} this This node - */ - 'collapse', - /** - * @event beforeclick - * Fires before click processing. Return false to cancel the default action. - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'beforeclick', - /** - * @event click - * Fires when this node is clicked - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'click', - /** - * @event checkchange - * Fires when a node with a checkbox's checked property changes - * @param {Node} this This node - * @param {Boolean} checked - */ - 'checkchange', - /** - * @event beforedblclick - * Fires before double click processing. Return false to cancel the default action. - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'beforedblclick', - /** - * @event dblclick - * Fires when this node is double clicked - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'dblclick', - /** - * @event contextmenu - * Fires when this node is right clicked - * @param {Node} this This node - * @param {Ext.EventObject} e The event object - */ - 'contextmenu', - /** - * @event beforechildrenrendered - * Fires right before the child nodes for this node are rendered - * @param {Node} this This node - */ - 'beforechildrenrendered' - ); + * True if this node is hidden. + * @type Boolean + */ + this.hidden = attributes.hidden === true; - var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; + this.addEvents( + /** + * @event textchange + * Fires when the text for this node is changed + * @param {Node} this This node + * @param {String} text The new text + * @param {String} oldText The old text + */ + 'textchange', + /** + * @event beforeexpand + * Fires before this node is expanded, return false to cancel. + * @param {Node} this This node + * @param {Boolean} deep + * @param {Boolean} anim + */ + 'beforeexpand', + /** + * @event beforecollapse + * Fires before this node is collapsed, return false to cancel. + * @param {Node} this This node + * @param {Boolean} deep + * @param {Boolean} anim + */ + 'beforecollapse', + /** + * @event expand + * Fires when this node is expanded + * @param {Node} this This node + */ + 'expand', + /** + * @event disabledchange + * Fires when the disabled status of this node changes + * @param {Node} this This node + * @param {Boolean} disabled + */ + 'disabledchange', + /** + * @event collapse + * Fires when this node is collapsed + * @param {Node} this This node + */ + 'collapse', + /** + * @event beforeclick + * Fires before click processing. Return false to cancel the default action. + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + 'beforeclick', + /** + * @event click + * Fires when this node is clicked + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + 'click', + /** + * @event checkchange + * Fires when a node with a checkbox's checked property changes + * @param {Node} this This node + * @param {Boolean} checked + */ + 'checkchange', + /** + * @event beforedblclick + * Fires before double click processing. Return false to cancel the default action. + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + 'beforedblclick', + /** + * @event dblclick + * Fires when this node is double clicked + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + 'dblclick', + /** + * @event contextmenu + * Fires when this node is right clicked + * @param {Node} this This node + * @param {Ext.EventObject} e The event object + */ + 'contextmenu', + /** + * @event beforechildrenrendered + * Fires right before the child nodes for this node are rendered + * @param {Node} this This node + */ + 'beforechildrenrendered' + ); + + var uiClass = this.attributes.uiProvider || this.defaultUI || Ext.tree.TreeNodeUI; + + /** + * Read-only. The UI for this node + * @type TreeNodeUI + */ + this.ui = new uiClass(this); + }, - /** - * Read-only. The UI for this node - * @type TreeNodeUI - */ - this.ui = new uiClass(this); -}; -Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { preventHScroll : true, /** * Returns true if this node is expanded @@ -49958,15 +54895,12 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { // these methods are overridden to provide lazy rendering support // private override appendChild : function(n){ - var node, exists; if(!n.render && !Ext.isArray(n)){ n = this.getLoader().createNode(n); - }else{ - exists = !n.parentNode; } - node = Ext.tree.TreeNode.superclass.appendChild.call(this, n); - if(node){ - this.afterAdd(node, exists); + var node = Ext.tree.TreeNode.superclass.appendChild.call(this, n); + if(node && this.childrenRendered){ + node.render(); } this.ui.updateExpandIcon(); return node; @@ -49976,47 +54910,37 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { removeChild : function(node, destroy){ this.ownerTree.getSelectionModel().unselect(node); Ext.tree.TreeNode.superclass.removeChild.apply(this, arguments); - // if it's been rendered remove dom node - if(node.ui.rendered){ - node.ui.remove(); - } - if(this.childNodes.length < 1){ - this.collapse(false, false); - }else{ - this.ui.updateExpandIcon(); - } - if(!this.firstChild && !this.isHiddenRoot()) { - this.childrenRendered = false; + // only update the ui if we're not destroying + if(!destroy){ + var rendered = node.ui.rendered; + // if it's been rendered remove dom node + if(rendered){ + node.ui.remove(); + } + if(rendered && this.childNodes.length < 1){ + this.collapse(false, false); + }else{ + this.ui.updateExpandIcon(); + } + if(!this.firstChild && !this.isHiddenRoot()){ + this.childrenRendered = false; + } } return node; }, // private override insertBefore : function(node, refNode){ - var newNode, exists; if(!node.render){ node = this.getLoader().createNode(node); - } else { - exists = Ext.isObject(node.parentNode); } - newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode); - if(newNode && refNode){ - this.afterAdd(newNode, exists); + var newNode = Ext.tree.TreeNode.superclass.insertBefore.call(this, node, refNode); + if(newNode && refNode && this.childrenRendered){ + node.render(); } this.ui.updateExpandIcon(); return newNode; }, - - // private - afterAdd : function(node, exists){ - if(this.childrenRendered){ - // bulk render if the node already exists - node.render(exists); - }else if(exists){ - // make sure we update the indent - node.renderIndent(true, true); - } - }, /** * Sets the text for this node @@ -50031,6 +54955,67 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { this.fireEvent('textchange', this, text, oldText); }, + /** + * Sets the icon class for this node. + * @param {String} cls + */ + setIconCls : function(cls){ + var old = this.attributes.iconCls; + this.attributes.iconCls = cls; + if(this.rendered){ + this.ui.onIconClsChange(this, cls, old); + } + }, + + /** + * Sets the tooltip for this node. + * @param {String} tip The text for the tip + * @param {String} title (Optional) The title for the tip + */ + setTooltip : function(tip, title){ + this.attributes.qtip = tip; + this.attributes.qtipTitle = title; + if(this.rendered){ + this.ui.onTipChange(this, tip, title); + } + }, + + /** + * Sets the icon for this node. + * @param {String} icon + */ + setIcon : function(icon){ + this.attributes.icon = icon; + if(this.rendered){ + this.ui.onIconChange(this, icon); + } + }, + + /** + * Sets the href for the node. + * @param {String} href The href to set + * @param {String} (Optional) target The target of the href + */ + setHref : function(href, target){ + this.attributes.href = href; + this.attributes.hrefTarget = target; + if(this.rendered){ + this.ui.onHrefChange(this, href, target); + } + }, + + /** + * Sets the class on this node. + * @param {String} cls + */ + setCls : function(cls){ + var old = this.attributes.cls; + this.attributes.cls = cls; + if(this.rendered){ + this.ui.onClsChange(this, cls, old); + } + }, + /** * Triggers selection of this node */ @@ -50084,7 +55069,7 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { this.fireEvent('expand', this); this.runCallback(callback, scope || this, [this]); if(deep === true){ - this.expandChildNodes(true); + this.expandChildNodes(true, true); } }.createDelegate(this)); return; @@ -50196,10 +55181,12 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { * Expand all child nodes * @param {Boolean} deep (optional) true if the child nodes should also expand their child nodes */ - expandChildNodes : function(deep){ - var cs = this.childNodes; - for(var i = 0, len = cs.length; i < len; i++) { - cs[i].expand(deep); + expandChildNodes : function(deep, anim) { + var cs = this.childNodes, + i, + len = cs.length; + for (i = 0; i < len; i++) { + cs[i].expand(deep, anim); } }, @@ -50298,9 +55285,12 @@ Ext.extend(Ext.tree.TreeNode, Ext.data.Node, { } }, - destroy : function(){ - this.unselect(true); - Ext.tree.TreeNode.superclass.destroy.call(this); + //inherit docs + destroy : function(silent){ + if(silent === true){ + this.unselect(true); + } + Ext.tree.TreeNode.superclass.destroy.call(this, silent); Ext.destroy(this.ui, this.loader); this.ui = this.loader = null; }, @@ -50431,16 +55421,19 @@ Ext.tree.TreePanel.nodeTypes.async = Ext.tree.AsyncTreeNode;/** * This class provides access to the user interface components of an Ext TreeNode, through * {@link Ext.tree.TreeNode#getUI} */ -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 = Ext.extend(Object, { + + constructor : function(node){ + Ext.apply(this, { + node: node, + rendered: false, + animating: false, + wasLeaf: true, + ecc: 'x-tree-ec-icon x-tree-elbow', + emptyIcon: Ext.BLANK_IMAGE_URL + }); + }, -Ext.tree.TreeNodeUI.prototype = { // private removeChild : function(node){ if(this.rendered){ @@ -50465,17 +55458,65 @@ Ext.tree.TreeNodeUI.prototype = { } }, + // private + onIconClsChange : function(node, cls, oldCls){ + if(this.rendered){ + Ext.fly(this.iconNode).replaceClass(oldCls, cls); + } + }, + + // private + onIconChange : function(node, icon){ + if(this.rendered){ + //'', + var empty = Ext.isEmpty(icon); + this.iconNode.src = empty ? this.emptyIcon : icon; + Ext.fly(this.iconNode)[empty ? 'removeClass' : 'addClass']('x-tree-node-inline-icon'); + } + }, + + // private + onTipChange : function(node, tip, title){ + if(this.rendered){ + var hasTitle = Ext.isDefined(title); + if(this.textNode.setAttributeNS){ + this.textNode.setAttributeNS("ext", "qtip", tip); + if(hasTitle){ + this.textNode.setAttributeNS("ext", "qtitle", title); + } + }else{ + this.textNode.setAttribute("ext:qtip", tip); + if(hasTitle){ + this.textNode.setAttribute("ext:qtitle", title); + } + } + } + }, + + // private + onHrefChange : function(node, href, target){ + if(this.rendered){ + this.anchor.href = this.getHref(href); + if(Ext.isDefined(target)){ + this.anchor.target = target; + } + } + }, + + // private + onClsChange : function(node, cls, oldCls){ + if(this.rendered){ + Ext.fly(this.elNode).replaceClass(oldCls, cls); + } + }, + // private 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"); - } + this[state ? 'addClass' : 'removeClass']('x-tree-node-disabled'); }, // private @@ -50704,7 +55745,7 @@ Ext.tree.TreeNodeUI.prototype = { /** * Sets the checked status of the tree node to the passed value, or, if no value was passed, * toggles the checked status. If the node was rendered with no checkbox, this has no effect. - * @param {Boolean} (optional) The new checked status. + * @param {Boolean} value (optional) The new checked status. */ toggleCheck : function(value){ var cb = this.checkbox; @@ -50818,17 +55859,7 @@ Ext.tree.TreeNodeUI.prototype = { 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); - } - } + this.onTipChange(n, a.qtip, a.qtipTitle); }else if(a.qtipCfg){ a.qtipCfg.target = Ext.id(this.textNode); Ext.QuickTips.register(a.qtipCfg); @@ -50851,11 +55882,11 @@ Ext.tree.TreeNodeUI.prototype = { var cb = Ext.isBoolean(a.checked), nel, - href = a.href ? a.href : Ext.isGecko ? "" : "#", + href = this.getHref(a.href), buf = ['
        • ', '',this.indentMarkup,"", - '', - '', + '', + '', cb ? ('' : '/>')) : '', '',n.text,"
          ", @@ -50885,6 +55916,14 @@ Ext.tree.TreeNodeUI.prototype = { this.textNode = cs[index].firstChild; }, + /** + * @private Gets a normalized href for the node. + * @param {String} href + */ + getHref : function(href){ + return Ext.isEmpty(href) ? (Ext.isGecko ? '' : '#') : href; + }, + /** * Returns the <a> element that provides focus for the node's UI. * @return {HtmlElement} The DOM anchor element. @@ -50975,9 +56014,9 @@ Ext.tree.TreeNodeUI.prototype = { while(p){ if(!p.isRoot || (p.isRoot && p.ownerTree.rootVisible)){ if(!p.isLast()) { - buf.unshift(''); + buf.unshift(''); } else { - buf.unshift(''); + buf.unshift(''); } } p = p.parentNode; @@ -51016,7 +56055,7 @@ Ext.tree.TreeNodeUI.prototype = { }, this); delete this.node; } -}; +}); /** * @class Ext.tree.RootTreeNodeUI @@ -51193,7 +56232,7 @@ paramOrder: 'param1|param2|param|node' * @param {Ext.tree.TreeNode} node * @param {Function} callback Function to call after the node has been loaded. The * function is passed the TreeNode which was requested to be loaded. - * @param (Object) scope The cope (this reference) in which the callback is executed. + * @param {Object} scope The scope (this reference) in which the callback is executed. * defaults to the loaded TreeNode. */ load : function(node, callback, scope){ @@ -51515,8 +56554,10 @@ new Ext.tree.TreeSorter(myTree, { * @param {TreePanel} tree * @param {Object} config */ -Ext.tree.TreeSorter = function(tree, config){ - /** +Ext.tree.TreeSorter = Ext.extend(Object, { + + constructor: function(tree, config){ + /** * @cfg {Boolean} folderSort True to sort leaf nodes under non-leaf nodes (defaults to false) */ /** @@ -51541,46 +56582,52 @@ 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); + tree.on({ + scope: this, + beforechildrenrendered: this.doSort, + append: this.updateSort, + insert: this.updateSort, + textchange: this.updateSortParent + }); - 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'; + var desc = this.dir && this.dir.toLowerCase() == 'desc', + prop = this.property || 'text', + sortType = this.sortType, + folderSort = this.folderSort, + caseSensitive = this.caseSensitive === true, + leafAttr = this.leafAttr || 'leaf'; + if(Ext.isString(sortType)){ + sortType = Ext.data.SortTypes[sortType]; + } this.sortFn = function(n1, n2){ - if(fs){ - if(n1.attributes[leafAttr] && !n2.attributes[leafAttr]){ + var attr1 = n1.attributes, + attr2 = n2.attributes; + + if(folderSort){ + if(attr1[leafAttr] && !attr2[leafAttr]){ return 1; } - if(!n1.attributes[leafAttr] && n2.attributes[leafAttr]){ + if(!attr1[leafAttr] && attr2[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; - } - }; -}; + var prop1 = attr1[prop], + prop2 = attr2[prop], + v1 = sortType ? sortType(prop1) : (caseSensitive ? prop1 : prop1.toUpperCase()), + v2 = sortType ? sortType(prop2) : (caseSensitive ? prop2 : prop2.toUpperCase()); -Ext.tree.TreeSorter.prototype = { - doSort : function(node){ - node.sort(this.sortFn); + if(v1 < v2){ + return desc ? 1 : -1; + }else if(v1 > v2){ + return desc ? -1 : 1; + } + return 0; + }; }, - compareNodes : function(n1, n2){ - return (n1.text.toUpperCase() > n2.text.toUpperCase() ? 1 : -1); + doSort : function(node){ + node.sort(this.sortFn); }, updateSort : function(tree, node){ @@ -51595,7 +56642,8 @@ Ext.tree.TreeSorter.prototype = { this.doSort.defer(1, this, [p]); } } -};/** +}); +/** * @class Ext.tree.TreeDropZone * @extends Ext.dd.DropZone * @constructor @@ -52195,8 +57243,8 @@ var swfobject = function() { var w3cdom = typeof doc.getElementById != UNDEF && typeof doc.getElementsByTagName != UNDEF && typeof doc.createElement != UNDEF, u = nav.userAgent.toLowerCase(), p = nav.platform.toLowerCase(), - windows = p ? /win/.test(p) : /win/.test(u), - mac = p ? /mac/.test(p) : /mac/.test(u), + windows = p ? (/win/).test(p) : /win/.test(u), + mac = p ? (/mac/).test(p) : /mac/.test(u), webkit = /webkit/.test(u) ? parseFloat(u.replace(/^.*webkit\/(\d+(\.\d+)?).*$/, "$1")) : false, // returns either the webkit version or false if not webkit ie = !+"\v1", // feature detection based on Andrea Giammarchi's solution: http://webreflection.blogspot.com/2009/01/32-bytes-to-know-if-your-browser-is-ie.html playerVersion = [0,0,0], @@ -52267,7 +57315,7 @@ var swfobject = function() { if (ua.wk) { (function(){ if (isDomLoaded) { return; } - if (!/loaded|complete/.test(doc.readyState)) { + if (!(/loaded|complete/).test(doc.readyState)) { setTimeout(arguments.callee, 0); return; } @@ -52480,8 +57528,13 @@ var swfobject = function() { storedAltContentId = replaceElemIdStr; } att.id = EXPRESS_INSTALL_ID; - if (typeof att.width == UNDEF || (!/%$/.test(att.width) && parseInt(att.width, 10) < 310)) { att.width = "310"; } - if (typeof att.height == UNDEF || (!/%$/.test(att.height) && parseInt(att.height, 10) < 137)) { att.height = "137"; } + if (typeof att.width == UNDEF || (!(/%$/).test(att.width) && parseInt(att.width, 10) < 310)) { + att.width = "310"; + } + + if (typeof att.height == UNDEF || (!(/%$/).test(att.height) && parseInt(att.height, 10) < 137)) { + att.height = "137"; + } doc.title = doc.title.slice(0, 47) + " - Flash Player Installation"; var pt = ua.ie && ua.win ? "ActiveX" : "PlugIn", fv = "MMredirectURL=" + win.location.toString().replace(/&/g,"%26") + "&MMplayerType=" + pt + "&MMdoctitle=" + doc.title; @@ -52771,6 +57824,7 @@ var swfobject = function() { swfobject[l] = null; } swfobject = null; + window.detachEvent('onunload', arguments.callee); }); } }(); @@ -52940,7 +57994,7 @@ var swfobject = function() { Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { /** * @cfg {String} flashVersion - * Indicates the version the flash content was published for. Defaults to '9.0.45'. + * Indicates the version the flash content was published for. Defaults to '9.0.115'. */ flashVersion : '9.0.115', @@ -52955,13 +58009,13 @@ Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { * The wmode of the flash object. This can be used to control layering. Defaults to 'opaque'. */ wmode: 'opaque', - + /** * @cfg {Object} flashVars * A set of key value pairs to be passed to the flash object as flash variables. Defaults to undefined. */ flashVars: undefined, - + /** * @cfg {Object} flashParams * A set of key value pairs to be passed to the flash object as parameters. Possible parameters can be found here: @@ -52991,7 +58045,7 @@ Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { this.addEvents( /** * @event initialize - * + * * @param {Chart} this */ 'initialize' @@ -53007,8 +58061,8 @@ Ext.FlashComponent = Ext.extend(Ext.BoxComponent, { wmode: this.wmode }, this.flashParams), vars = Ext.apply({ allowedDomain: document.location.hostname, - elementID: this.getId(), - eventHandler: 'Ext.FlashEventProxy.onEvent' + YUISwfId: this.getId(), + YUIBridgeCallback: 'Ext.FlashEventProxy.onEvent' }, this.flashVars); new swfobject.embedSWF(this.url, this.id, this.swfWidth, this.swfHeight, this.flashVersion, @@ -53074,7 +58128,7 @@ Ext.FlashEventProxy = { arguments.callee.defer(10, this, [id, e]); } } -}/** +};/** * @class Ext.chart.Chart * @extends Ext.FlashComponent * The Ext.chart package provides the capability to visualize data with flash based charting. @@ -53083,10 +58137,10 @@ Ext.FlashEventProxy = { * @constructor * @xtype chart */ - + Ext.chart.Chart = Ext.extend(Ext.FlashComponent, { refreshBuffer: 100, - + /** * @cfg {String} backgroundColor * @hide @@ -53095,7 +58149,7 @@ Ext.FlashEventProxy = { /** * @cfg {Object} chartStyle * Sets styles for this chart. This contains default styling, so modifying this property will override - * the built in styles of the chart. Use {@link #extraStyle} to add customizations to the default styling. + * the built in styles of the chart. Use {@link #extraStyle} to add customizations to the default styling. */ chartStyle: { padding: 10, @@ -53123,17 +58177,17 @@ Ext.FlashEventProxy = { } } }, - + /** * @cfg {String} url * The url to load the chart from. This defaults to Ext.chart.Chart.CHART_URL, which should * be modified to point to the local charts resource. */ - + /** * @cfg {Object} extraStyle * Contains extra styles that will be added or overwritten to the default chartStyle. Defaults to null. - * For a detailed list of the options available, visit the YUI Charts site + * For a detailed list of the options available, visit the YUI Charts site * at http://developer.yahoo.com/yui/charts/#basicstyles
          * Some of the options availabe:
          *
            @@ -53195,13 +58249,13 @@ Ext.FlashEventProxy = { *
          */ extraStyle: null, - + /** * @cfg {Object} seriesStyles * Contains styles to apply to the series after a refresh. Defaults to null. */ seriesStyles: null, - + /** * @cfg {Boolean} disableCaching * True to add a "cache buster" to the end of the chart url. Defaults to true for Opera and IE. @@ -53279,13 +58333,25 @@ Ext.FlashEventProxy = { this.swf.setCategoryNames(names); }, - setTipRenderer : function(fn){ + setLegendRenderer : function(fn, scope){ var chart = this; - this.tipFnName = this.createFnProxy(function(item, index, series){ + scope = scope || chart; + chart.removeFnProxy(chart.legendFnName); + chart.legendFnName = chart.createFnProxy(function(name){ + return fn.call(scope, name); + }); + chart.swf.setLegendLabelFunction(chart.legendFnName); + }, + + setTipRenderer : function(fn, scope){ + var chart = this; + scope = scope || chart; + chart.removeFnProxy(chart.tipFnName); + chart.tipFnName = chart.createFnProxy(function(item, index, series){ var record = chart.store.getAt(index); - return fn(chart, record, index, series); - }, this.tipFnName); - this.swf.setDataTipFunction(this.tipFnName); + return fn.call(scope, chart, record, index, series); + }); + chart.swf.setDataTipFunction(chart.tipFnName); }, setSeries : function(series){ @@ -53328,6 +58394,7 @@ Ext.FlashEventProxy = { onSwfReady : function(isReset){ Ext.chart.Chart.superclass.onSwfReady.call(this, isReset); + var ref; this.swf.setType(this.type); if(this.chartStyle){ @@ -53339,7 +58406,12 @@ Ext.FlashEventProxy = { } if(this.tipRenderer){ - this.setTipRenderer(this.tipRenderer); + ref = this.getFunctionRef(this.tipRenderer); + this.setTipRenderer(ref.fn, ref.scope); + } + if(this.legendRenderer){ + ref = this.getFunctionRef(this.legendRenderer); + this.setLegendRenderer(ref.fn, ref.scope); } if(!isReset){ this.bindStore(this.store, true); @@ -53356,85 +58428,109 @@ Ext.FlashEventProxy = { refresh : function(){ if(this.fireEvent('beforerefresh', this) !== false){ - var styleChanged = false; - // convert the store data into something YUI charts can understand - var data = [], rs = this.store.data.items; - for(var j = 0, len = rs.length; j < len; j++){ - data[j] = rs[j].data; - } - //make a copy of the series definitions so that we aren't - //editing them directly. - var dataProvider = []; - var seriesCount = 0; - var currentSeries = null; - var i = 0; - if(this.series){ - seriesCount = this.series.length; - for(i = 0; i < seriesCount; i++){ - currentSeries = this.series[i]; - var clonedSeries = {}; - for(var prop in currentSeries){ - if(prop == "style" && currentSeries.style !== null){ - clonedSeries.style = Ext.encode(currentSeries.style); - styleChanged = true; - //we don't want to modify the styles again next time - //so null out the style property. - // this causes issues - // currentSeries.style = null; - } else{ - clonedSeries[prop] = currentSeries[prop]; - } - } - dataProvider.push(clonedSeries); - } - } - - if(seriesCount > 0){ - for(i = 0; i < seriesCount; i++){ - currentSeries = dataProvider[i]; - if(!currentSeries.type){ - currentSeries.type = this.type; - } - currentSeries.dataProvider = data; - } - } else{ - dataProvider.push({type: this.type, dataProvider: data}); - } - this.swf.setDataProvider(dataProvider); - if(this.seriesStyles){ - this.setSeriesStyles(this.seriesStyles); - } + var styleChanged = false; + // convert the store data into something YUI charts can understand + var data = [], rs = this.store.data.items; + for(var j = 0, len = rs.length; j < len; j++){ + data[j] = rs[j].data; + } + //make a copy of the series definitions so that we aren't + //editing them directly. + var dataProvider = []; + var seriesCount = 0; + var currentSeries = null; + var i = 0; + if(this.series){ + seriesCount = this.series.length; + for(i = 0; i < seriesCount; i++){ + currentSeries = this.series[i]; + var clonedSeries = {}; + for(var prop in currentSeries){ + if(prop == "style" && currentSeries.style !== null){ + clonedSeries.style = Ext.encode(currentSeries.style); + styleChanged = true; + //we don't want to modify the styles again next time + //so null out the style property. + // this causes issues + // currentSeries.style = null; + } else{ + clonedSeries[prop] = currentSeries[prop]; + } + } + dataProvider.push(clonedSeries); + } + } + + if(seriesCount > 0){ + for(i = 0; i < seriesCount; i++){ + currentSeries = dataProvider[i]; + if(!currentSeries.type){ + currentSeries.type = this.type; + } + currentSeries.dataProvider = data; + } + } else{ + dataProvider.push({type: this.type, dataProvider: data}); + } + this.swf.setDataProvider(dataProvider); + if(this.seriesStyles){ + this.setSeriesStyles(this.seriesStyles); + } this.fireEvent('refresh', this); } }, - createFnProxy : function(fn, old){ - if(old){ - delete window[old]; - } - var fnName = "extFnProxy" + (++Ext.chart.Chart.PROXY_FN_ID); - window[fnName] = fn; - return fnName; + // private + createFnProxy : function(fn){ + var fnName = 'extFnProxy' + (++Ext.chart.Chart.PROXY_FN_ID); + Ext.chart.Chart.proxyFunction[fnName] = fn; + return 'Ext.chart.Chart.proxyFunction.' + fnName; }, - + + // private + removeFnProxy : function(fn){ + if(!Ext.isEmpty(fn)){ + fn = fn.replace('Ext.chart.Chart.proxyFunction.', ''); + delete Ext.chart.Chart.proxyFunction[fn]; + } + }, + + // private + getFunctionRef : function(val){ + if(Ext.isFunction(val)){ + return { + fn: val, + scope: this + }; + }else{ + return { + fn: val.fn, + scope: val.scope || this + }; + } + }, + + // private onDestroy: function(){ + if (this.refreshTask && this.refreshTask.cancel){ + this.refreshTask.cancel(); + } Ext.chart.Chart.superclass.onDestroy.call(this); this.bindStore(null); - var tip = this.tipFnName; - if(!Ext.isEmpty(tip)){ - delete window[tip]; - } + this.removeFnProxy(this.tipFnName); + this.removeFnProxy(this.legendFnName); } }); Ext.reg('chart', Ext.chart.Chart); Ext.chart.Chart.PROXY_FN_ID = 0; +Ext.chart.Chart.proxyFunction = {}; /** * Sets the url to load the chart from. This should be set to a local resource. * @static * @type String */ -Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.7.0/build/charts/assets/charts.swf'; +Ext.chart.Chart.CHART_URL = 'http:/' + '/yui.yahooapis.com/2.8.2/build/charts/assets/charts.swf'; /** * @class Ext.chart.PieChart @@ -53473,7 +58569,7 @@ Ext.reg('piechart', Ext.chart.PieChart); Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, { onSwfReady : function(isReset){ Ext.chart.CartesianChart.superclass.onSwfReady.call(this, isReset); - + this.labelFn = []; if(this.xField){ this.setXField(this.xField); } @@ -53483,9 +58579,18 @@ Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, { if(this.xAxis){ this.setXAxis(this.xAxis); } + if(this.xAxes){ + this.setXAxes(this.xAxes); + } if(this.yAxis){ this.setYAxis(this.yAxis); } + if(this.yAxes){ + this.setYAxes(this.yAxes); + } + if(Ext.isDefined(this.constrainViewport)){ + this.swf.setConstrainViewport(this.constrainViewport); + } }, setXField : function(value){ @@ -53503,24 +58608,56 @@ Ext.chart.CartesianChart = Ext.extend(Ext.chart.Chart, { this.swf.setHorizontalAxis(this.xAxis); }, + setXAxes : function(value){ + var axis; + for(var i = 0; i < value.length; i++) { + axis = this.createAxis('xAxis' + i, value[i]); + this.swf.setHorizontalAxis(axis); + } + }, + setYAxis : function(value){ this.yAxis = this.createAxis('yAxis', value); this.swf.setVerticalAxis(this.yAxis); }, + setYAxes : function(value){ + var axis; + for(var i = 0; i < value.length; i++) { + axis = this.createAxis('yAxis' + i, value[i]); + this.swf.setVerticalAxis(axis); + } + }, + createAxis : function(axis, value){ - var o = Ext.apply({}, value), oldFn = null; + var o = Ext.apply({}, value), + ref, + old; + if(this[axis]){ - oldFn = this[axis].labelFunction; + old = this[axis].labelFunction; + this.removeFnProxy(old); + this.labelFn.remove(old); } if(o.labelRenderer){ - var fn = o.labelRenderer; + ref = this.getFunctionRef(o.labelRenderer); o.labelFunction = this.createFnProxy(function(v){ - return fn(v); - }, oldFn); + return ref.fn.call(ref.scope, v); + }); delete o.labelRenderer; + this.labelFn.push(o.labelFunction); + } + if(axis.indexOf('xAxis') > -1 && o.position == 'left'){ + o.position = 'bottom'; } return o; + }, + + onDestroy : function(){ + Ext.chart.CartesianChart.superclass.onDestroy.call(this); + Ext.each(this.labelFn, function(fn){ + this.removeFnProxy(fn); + }, this); } }); Ext.reg('cartesianchart', Ext.chart.CartesianChart); @@ -53632,7 +58769,15 @@ Ext.chart.Axis.prototype = * @property hideOverlappingLabels * @type Boolean */ - hideOverlappingLabels: true + hideOverlappingLabels: true, + + /** + * The space, in pixels, between labels on an axis. + * + * @property labelSpacing + * @type Number + */ + labelSpacing: 2 }; /** @@ -53645,8 +58790,8 @@ Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { type: "numeric", /** - * The minimum value drawn by the axis. If not set explicitly, the axis minimum - * will be calculated automatically. + * The minimum value drawn by the axis. If not set explicitly, the axis + * minimum will be calculated automatically. * * @property minimum * @type Number @@ -53654,8 +58799,8 @@ Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { minimum: NaN, /** - * The maximum value drawn by the axis. If not set explicitly, the axis maximum - * will be calculated automatically. + * The maximum value drawn by the axis. If not set explicitly, the axis + * maximum will be calculated automatically. * * @property maximum * @type Number @@ -53679,9 +58824,9 @@ Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { minorUnit: NaN, /** - * If true, the labels, ticks, gridlines, and other objects will snap to - * the nearest major or minor unit. If false, their position will be based - * on the minimum value. + * If true, the labels, ticks, gridlines, and other objects will snap to the + * nearest major or minor unit. If false, their position will be based on + * the minimum value. * * @property snapToUnits * @type Boolean @@ -53689,8 +58834,8 @@ Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { snapToUnits: true, /** - * If true, and the bounds are calculated automatically, either the minimum or - * maximum will be set to zero. + * If true, and the bounds are calculated automatically, either the minimum + * or maximum will be set to zero. * * @property alwaysShowZero * @type Boolean @@ -53698,12 +58843,57 @@ Ext.chart.NumericAxis = Ext.extend(Ext.chart.Axis, { alwaysShowZero: true, /** - * The scaling algorithm to use on this axis. May be "linear" or "logarithmic". + * The scaling algorithm to use on this axis. May be "linear" or + * "logarithmic". * * @property scale * @type String */ - scale: "linear" + scale: "linear", + + /** + * Indicates whether to round the major unit. + * + * @property roundMajorUnit + * @type Boolean + */ + roundMajorUnit: true, + + /** + * Indicates whether to factor in the size of the labels when calculating a + * major unit. + * + * @property calculateByLabelSize + * @type Boolean + */ + calculateByLabelSize: true, + + /** + * Indicates the position of the axis relative to the chart + * + * @property position + * @type String + */ + position: 'left', + + /** + * Indicates whether to extend maximum beyond data's maximum to the nearest + * majorUnit. + * + * @property adjustMaximumByMajorUnit + * @type Boolean + */ + adjustMaximumByMajorUnit: true, + + /** + * Indicates whether to extend the minimum beyond data's minimum to the + * nearest majorUnit. + * + * @property adjustMinimumByMajorUnit + * @type Boolean + */ + adjustMinimumByMajorUnit: true + }); /** @@ -53716,8 +58906,8 @@ Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, { type: "time", /** - * The minimum value drawn by the axis. If not set explicitly, the axis minimum - * will be calculated automatically. + * The minimum value drawn by the axis. If not set explicitly, the axis + * minimum will be calculated automatically. * * @property minimum * @type Date @@ -53725,8 +58915,8 @@ Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, { minimum: null, /** - * The maximum value drawn by the axis. If not set explicitly, the axis maximum - * will be calculated automatically. + * The maximum value drawn by the axis. If not set explicitly, the axis + * maximum will be calculated automatically. * * @property maximum * @type Number @@ -53766,14 +58956,32 @@ Ext.chart.TimeAxis = Ext.extend(Ext.chart.Axis, { minorTimeUnit: null, /** - * If true, the labels, ticks, gridlines, and other objects will snap to - * the nearest major or minor unit. If false, their position will be based - * on the minimum value. + * If true, the labels, ticks, gridlines, and other objects will snap to the + * nearest major or minor unit. If false, their position will be based on + * the minimum value. * * @property snapToUnits * @type Boolean */ - snapToUnits: true + snapToUnits: true, + + /** + * Series that are stackable will only stack when this value is set to true. + * + * @property stackingEnabled + * @type Boolean + */ + stackingEnabled: false, + + /** + * Indicates whether to factor in the size of the labels when calculating a + * major unit. + * + * @property calculateByLabelSize + * @type Boolean + */ + calculateByLabelSize: true + }); /** @@ -53791,7 +58999,19 @@ Ext.chart.CategoryAxis = Ext.extend(Ext.chart.Axis, { * @property categoryNames * @type Array */ - categoryNames: null + categoryNames: null, + + /** + * Indicates whether or not to calculate the number of categories (ticks and + * labels) when there is not enough room to display all labels on the axis. + * If set to true, the axis will determine the number of categories to plot. + * If not, all categories will be plotted. + * + * @property calculateCategoryCount + * @type Boolean + */ + calculateCategoryCount: false + }); /** @@ -53828,7 +59048,8 @@ Ext.chart.Series.prototype = */ Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, { /** - * The field used to access the x-axis value from the items from the data source. + * The field used to access the x-axis value from the items from the data + * source. * * @property xField * @type String @@ -53836,12 +59057,29 @@ Ext.chart.CartesianSeries = Ext.extend(Ext.chart.Series, { xField: null, /** - * The field used to access the y-axis value from the items from the data source. + * The field used to access the y-axis value from the items from the data + * source. * * @property yField * @type String */ - yField: null + yField: null, + + /** + * False to not show this series in the legend. Defaults to true. + * + * @property showInLegend + * @type Boolean + */ + showInLegend: true, + + /** + * Indicates which axis the series will bind to + * + * @property axis + * @type String + */ + axis: 'primary' }); /** @@ -54175,7 +59413,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { 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 || item.isFormField)){ + if(item.isVisible() && !item.disabled && (item.canActivate || item.isFormField)){ this.setActiveItem(item, false); return item; } @@ -54314,6 +59552,10 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { }else{ max = this.getHeight(); } + // Always respect maxHeight + if (this.maxHeight){ + max = Math.min(this.maxHeight, max); + } if(full > max && max > 0){ this.activeMax = max - this.scrollerHeight * 2 - this.el.getFrameWidth('tb') - Ext.num(this.el.shadowOffset, 0); this.ul.setHeight(this.activeMax); @@ -54426,8 +59668,8 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { return c; }, - applyDefaults : function(c){ - if(!Ext.isString(c)){ + applyDefaults : function(c) { + if (!Ext.isString(c)) { c = Ext.menu.Menu.superclass.applyDefaults.call(this, c); var d = this.internalDefaults; if(d){ @@ -54443,10 +59685,12 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { }, // private - getMenuItem : function(config){ - if(!config.isXType){ - if(!config.xtype && Ext.isBoolean(config.checked)){ - return new Ext.menu.CheckItem(config) + getMenuItem : function(config) { + config.ownerCt = this; + + if (!config.isXType) { + if (!config.xtype && Ext.isBoolean(config.checked)) { + return new Ext.menu.CheckItem(config); } return Ext.create(config, this.defaultType); } @@ -54457,7 +59701,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * Adds a separator bar to the menu * @return {Ext.menu.Item} The menu item that was added */ - addSeparator : function(){ + addSeparator : function() { return this.add(new Ext.menu.Separator()); }, @@ -54466,7 +59710,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * @param {Mixed} el The element or DOM node to add, or its id * @return {Ext.menu.Item} The menu item that was added */ - addElement : function(el){ + addElement : function(el) { return this.add(new Ext.menu.BaseItem({ el: el })); @@ -54477,7 +59721,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * @param {Ext.menu.Item} item The menu item to add * @return {Ext.menu.Item} The menu item that was added */ - addItem : function(item){ + addItem : function(item) { return this.add(item); }, @@ -54486,7 +59730,7 @@ Ext.menu.Menu = Ext.extend(Ext.Container, { * @param {Object} config A MenuItem config object * @return {Ext.menu.Item} The menu item that was added */ - addMenuItem : function(config){ + addMenuItem : function(config) { return this.add(this.getMenuItem(config)); }, @@ -54599,17 +59843,20 @@ Ext.menu.MenuNav = Ext.extend(Ext.KeyNav, function(){ * @singleton */ Ext.menu.MenuMgr = function(){ - var menus, active, groups = {}, attached = false, lastShow = new Date(); + var menus, + active, + map, + groups = {}, + attached = false, + lastShow = new Date(); + // private - called when first menu is created function init(){ menus = {}; active = new Ext.util.MixedCollection(); - Ext.getDoc().addKeyListener(27, function(){ - if(active.length > 0){ - hideAll(); - } - }); + map = Ext.getDoc().addKeyListener(27, hideAll); + map.disable(); } // private @@ -54628,6 +59875,7 @@ Ext.menu.MenuMgr = function(){ function onHide(m){ active.remove(m); if(active.length < 1){ + map.disable(); Ext.getDoc().un("mousedown", onMouseDown); attached = false; } @@ -54639,6 +59887,7 @@ Ext.menu.MenuMgr = function(){ lastShow = new Date(); active.add(m); if(!attached){ + map.enable(); Ext.getDoc().on("mousedown", onMouseDown); attached = true; } @@ -54678,18 +59927,6 @@ Ext.menu.MenuMgr = function(){ } } - // private - function onBeforeCheck(mi, state){ - if(state){ - var g = groups[mi.group]; - for(var i = 0, l = g.length; i < l; i++){ - if(g[i] != mi){ - g[i].setChecked(false); - } - } - } - } - return { /** @@ -54752,7 +59989,6 @@ Ext.menu.MenuMgr = function(){ groups[g] = []; } groups[g].push(menuItem); - menuItem.on("beforecheckchange", onBeforeCheck); } }, @@ -54761,7 +59997,23 @@ Ext.menu.MenuMgr = function(){ var g = menuItem.group; if(g){ groups[g].remove(menuItem); - menuItem.un("beforecheckchange", onBeforeCheck); + } + }, + + // private + onCheckChange: function(item, state){ + if(item.group && state){ + var group = groups[item.group], + i = 0, + len = group.length, + current; + + for(; i < len; i++){ + current = group[i]; + if(current != item){ + current.setChecked(false); + } + } } }, @@ -54831,7 +60083,7 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, { */ hideOnClick : true, /** - * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 100) + * @cfg {Number} clickHideDelay Length of time in milliseconds to wait before hiding after a click (defaults to 1) */ clickHideDelay : 1, @@ -54840,33 +60092,33 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, { // private actionMode : "container", - + initComponent : function(){ Ext.menu.BaseItem.superclass.initComponent.call(this); this.addEvents( - /** - * @event click - * Fires when this item is clicked - * @param {Ext.menu.BaseItem} this - * @param {Ext.EventObject} e - */ - 'click', - /** - * @event activate - * Fires when this item is activated - * @param {Ext.menu.BaseItem} this - */ - 'activate', - /** - * @event deactivate - * Fires when this item is deactivated - * @param {Ext.menu.BaseItem} this - */ - 'deactivate' - ); - if(this.handler){ - this.on("click", this.handler, this.scope); - } + /** + * @event click + * Fires when this item is clicked + * @param {Ext.menu.BaseItem} this + * @param {Ext.EventObject} e + */ + 'click', + /** + * @event activate + * Fires when this item is activated + * @param {Ext.menu.BaseItem} this + */ + 'activate', + /** + * @event deactivate + * Fires when this item is deactivated + * @param {Ext.menu.BaseItem} this + */ + 'deactivate' + ); + if(this.handler){ + this.on("click", this.handler, this.scope); + } }, // private @@ -54936,13 +60188,18 @@ Ext.menu.BaseItem = Ext.extend(Ext.Component, { var pm = this.parentMenu; if(this.hideOnClick){ if(pm.floating){ - pm.hide.defer(this.clickHideDelay, pm, [true]); + this.clickHideDelayTimer = pm.hide.defer(this.clickHideDelay, pm, [true]); }else{ pm.deactivateActive(); } } }, + beforeDestroy: function(){ + clearTimeout(this.clickHideDelayTimer); + Ext.menu.BaseItem.superclass.beforeDestroy.call(this); + }, + // private. Do nothing expandMenu : Ext.emptyFn, @@ -54972,15 +60229,17 @@ Ext.menu.TextItem = Ext.extend(Ext.menu.BaseItem, { */ itemCls : "x-menu-text", - constructor : function(config){ - if(typeof config == 'string'){ - config = {text: config} + constructor : function(config) { + if (typeof config == 'string') { + config = { + text: config + }; } Ext.menu.TextItem.superclass.constructor.call(this, config); }, // private - onRender : function(){ + onRender : function() { var s = document.createElement("span"); s.className = this.itemCls; s.innerHTML = this.text; @@ -55073,6 +60332,12 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { * @cfg {Number} showDelay Length of time in milliseconds to wait before showing this item (defaults to 200) */ showDelay: 200, + + /** + * @cfg {String} altText The altText to use for the icon, if it exists. Defaults to ''. + */ + altText: '', + // doc'd in BaseItem hideDelay: 200, @@ -55082,8 +60347,20 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { initComponent : function(){ Ext.menu.Item.superclass.initComponent.call(this); if(this.menu){ + // If array of items, turn it into an object config so we + // can set the ownerCt property in the config + if (Ext.isArray(this.menu)){ + this.menu = { items: this.menu }; + } + + // An object config will work here, but an instance of a menu + // will have already setup its ref's and have no effect + if (Ext.isObject(this.menu)){ + this.menu.ownerCt = this; + } + this.menu = Ext.menu.MenuMgr.get(this.menu); - this.menu.ownerCt = this; + this.menu.ownerCt = undefined; } }, @@ -55096,7 +60373,7 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { ' target="{hrefTarget}"', '', '>', - '', + '{altText}', '{text}', '' ); @@ -55119,7 +60396,8 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { hrefTarget: this.hrefTarget, icon: this.icon || Ext.BLANK_IMAGE_URL, iconCls: this.iconCls || '', - text: this.itemText||this.text||' ' + text: this.itemText||this.text||' ', + altText: this.altText || '' }; }, @@ -55149,6 +60427,8 @@ Ext.menu.Item = Ext.extend(Ext.menu.BaseItem, { //private beforeDestroy: function(){ + clearTimeout(this.showTimer); + clearTimeout(this.hideTimer); if (this.menu){ delete this.menu.ownerCt; this.menu.destroy(); @@ -55259,7 +60539,7 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, { /** * @cfg {Boolean} checked True to initialize this checkbox as checked (defaults to false). Note that - * if this checkbox is part of a radio group (group = true) only the last item in the group that is + * if this checkbox is part of a radio group (group = true) only the first item in the group that is * initialized with checked = true will be rendered as checked. */ checked: false, @@ -55324,6 +60604,7 @@ Ext.menu.CheckItem = Ext.extend(Ext.menu.Item, { setChecked : function(state, suppressEvent){ var suppress = suppressEvent === true; if(this.checked != state && (suppress || this.fireEvent("beforecheckchange", this, state) !== false)){ + Ext.menu.MenuMgr.onCheckChange(this, state); if(this.container){ this.container[state ? "addClass" : "removeClass"]("x-menu-item-checked"); } @@ -55645,7 +60926,7 @@ Ext.form.Field = Ext.extend(Ext.BoxComponent, { */ fieldClass : 'x-form-field', /** - * @cfg {String} msgTarget

          The location where the message text set through {@link #markInvalid} should display. + * @cfg {String} msgTarget

          The location where the message text set through {@link #markInvalid} should display. * Must be one of the following values:

          *
            *
          • qtip Display a quick tip containing the message when the user hovers over the field. This is the default. @@ -55885,7 +61166,7 @@ var form = new Ext.form.FormPanel({ // private initEvents : function(){ - this.mon(this.el, Ext.EventManager.useKeydown ? 'keydown' : 'keypress', this.fireKey, this); + this.mon(this.el, Ext.EventManager.getKeyEvent(), this.fireKey, this); this.mon(this.el, 'focus', this.onFocus, this); // standardise buffer across all browsers + OS-es for consistent event order. @@ -55953,7 +61234,7 @@ var form = new Ext.form.FormPanel({ } var restore = this.preventMark; this.preventMark = preventMark === true; - var v = this.validateValue(this.processValue(this.getRawValue())); + var v = this.validateValue(this.processValue(this.getRawValue()), preventMark); this.preventMark = restore; return v; }, @@ -55982,12 +61263,33 @@ var form = new Ext.form.FormPanel({ }, /** - * @private - * Subclasses should provide the validation implementation by overriding this - * @param {Mixed} value + * Uses getErrors to build an array of validation errors. If any errors are found, markInvalid is called + * with the first and false is returned, otherwise true is returned. Previously, subclasses were invited + * to provide an implementation of this to process validations - from 3.2 onwards getErrors should be + * overridden instead. + * @param {Mixed} The current value of the field + * @return {Boolean} True if all validations passed, false if one or more failed */ - validateValue : function(value){ - return true; + validateValue : function(value) { + //currently, we only show 1 error at a time for a field, so just use the first one + var error = this.getErrors(value)[0]; + + if (error == undefined) { + return true; + } else { + this.markInvalid(error); + return false; + } + }, + + /** + * Runs this field's validators and returns an array of error messages for any validation failures. + * This is called internally during validation and would not usually need to be used manually. + * Each subclass should override or augment the return value to provide their own errors + * @return {Array} All error messages for this field + */ + getErrors: function() { + return []; }, /** @@ -56008,47 +61310,69 @@ var form = new Ext.form.FormPanel({ * @param {String} msg (optional) The validation message (defaults to {@link #invalidText}) */ markInvalid : function(msg){ - if(!this.rendered || this.preventMark){ // not rendered - return; - } - msg = msg || this.invalidText; + //don't set the error icon if we're not rendered or marking is prevented + if (this.rendered && !this.preventMark) { + msg = msg || this.invalidText; - var mt = this.getMessageHandler(); - if(mt){ - mt.mark(this, msg); - }else if(this.msgTarget){ - this.el.addClass(this.invalidClass); - var t = Ext.getDom(this.msgTarget); - if(t){ - t.innerHTML = msg; - t.style.display = this.msgDisplay; + var mt = this.getMessageHandler(); + if(mt){ + mt.mark(this, msg); + }else if(this.msgTarget){ + this.el.addClass(this.invalidClass); + var t = Ext.getDom(this.msgTarget); + if(t){ + t.innerHTML = msg; + t.style.display = this.msgDisplay; + } } } - this.activeError = msg; - this.fireEvent('invalid', this, msg); + + this.setActiveError(msg); }, /** * Clear any invalid styles/messages for this field */ clearInvalid : function(){ - if(!this.rendered || this.preventMark){ // not rendered - return; - } - this.el.removeClass(this.invalidClass); - var mt = this.getMessageHandler(); - if(mt){ - mt.clear(this); - }else if(this.msgTarget){ + //don't remove the error icon if we're not rendered or marking is prevented + if (this.rendered && !this.preventMark) { this.el.removeClass(this.invalidClass); - var t = Ext.getDom(this.msgTarget); - if(t){ - t.innerHTML = ''; - t.style.display = 'none'; + var mt = this.getMessageHandler(); + if(mt){ + mt.clear(this); + }else if(this.msgTarget){ + this.el.removeClass(this.invalidClass); + var t = Ext.getDom(this.msgTarget); + if(t){ + t.innerHTML = ''; + t.style.display = 'none'; + } } } + + this.unsetActiveError(); + }, + + /** + * Sets the current activeError to the given string. Fires the 'invalid' event. + * This does not set up the error icon, only sets the message and fires the event. To show the error icon, + * use markInvalid instead, which calls this method internally + * @param {String} msg The error message + * @param {Boolean} suppressEvent True to suppress the 'invalid' event from being fired + */ + setActiveError: function(msg, suppressEvent) { + this.activeError = msg; + if (suppressEvent !== true) this.fireEvent('invalid', this, msg); + }, + + /** + * Clears the activeError and fires the 'valid' event. This is called internally by clearInvalid and would not + * usually need to be called manually + * @param {Boolean} suppressEvent True to suppress the 'invalid' event from being fired + */ + unsetActiveError: function(suppressEvent) { delete this.activeError; - this.fireEvent('valid', this); + if (suppressEvent !== true) this.fireEvent('valid', this); }, // private @@ -56197,11 +61521,16 @@ Ext.form.MessageTargets = { field.el.addClass(field.invalidClass); if(!field.errorIcon){ var elp = field.getErrorCt(); - if(!elp){ // field has no container el + // field has no container el + if(!elp){ field.el.dom.title = msg; return; } field.errorIcon = elp.createChild({cls:'x-form-invalid-icon'}); + if (field.ownerCt) { + field.ownerCt.on('afterlayout', field.alignErrorIcon, field); + field.ownerCt.on('expand', field.alignErrorIcon, field); + } field.on('resize', field.alignErrorIcon, field); field.on('destroy', function(){ Ext.destroy(this.errorIcon); @@ -56317,7 +61646,7 @@ Ext.form.TextField = Ext.extend(Ext.form.Field, { vtype : null, /** * @cfg {RegExp} maskRe An input mask regular expression that will be used to filter keystrokes that do - * not match (defaults to null) + * not match (defaults to null). The maskRe will not operate on any paste events. */ maskRe : null, /** @@ -56577,14 +61906,16 @@ var myField = new Ext.form.NumberField({ // private preFocus : function(){ - var el = this.el; + var el = this.el, + isEmpty; if(this.emptyText){ if(el.dom.value == this.emptyText){ this.setRawValue(''); + isEmpty = true; } el.removeClass(this.emptyClass); } - if(this.selectOnFocus){ + if(this.selectOnFocus || isEmpty){ el.dom.select(); } }, @@ -56623,8 +61954,8 @@ var myField = new Ext.form.NumberField({ }, /** - *

            Validates a value according to the field's validation rules and marks the field as invalid - * if the validation fails. Validation rules are processed in the following order:

            + *

            Validates a value according to the field's validation rules and returns an array of errors + * for any failing validations. Validation rules are processed in the following order:

            *
              * *
            • 1. Field specific validator @@ -56687,46 +62018,54 @@ var myField = new Ext.form.NumberField({ * {@link #regexText}.

              *
          • * - * @param {Mixed} value The value to validate - * @return {Boolean} True if the value is valid, else false + * @param {Mixed} value The value to validate. The processed raw value will be used if nothing is passed + * @return {Array} Array of any validation errors */ - validateValue : function(value){ - if(Ext.isFunction(this.validator)){ + getErrors: function(value) { + var errors = Ext.form.TextField.superclass.getErrors.apply(this, arguments); + + value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); + + if (Ext.isFunction(this.validator)) { var msg = this.validator(value); - if(msg !== true){ - this.markInvalid(msg); - return false; + if (msg !== true) { + errors.push(msg); } } - if(value.length < 1 || value === this.emptyText){ // if it's blank - if(this.allowBlank){ - this.clearInvalid(); - return true; - }else{ - this.markInvalid(this.blankText); - return false; - } + + if (value.length < 1 || value === this.emptyText) { + if (this.allowBlank) { + //if value is blank and allowBlank is true, there cannot be any additional errors + return errors; + } else { + errors.push(this.blankText); + } } - if(value.length < this.minLength){ - this.markInvalid(String.format(this.minLengthText, this.minLength)); - return false; + + if (!this.allowBlank && (value.length < 1 || value === this.emptyText)) { // if it's blank + errors.push(this.blankText); } - if(value.length > this.maxLength){ - this.markInvalid(String.format(this.maxLengthText, this.maxLength)); - return false; - } - if(this.vtype){ + + if (value.length < this.minLength) { + errors.push(String.format(this.minLengthText, this.minLength)); + } + + if (value.length > this.maxLength) { + errors.push(String.format(this.maxLengthText, this.maxLength)); + } + + if (this.vtype) { var vt = Ext.form.VTypes; if(!vt[this.vtype](value, this)){ - this.markInvalid(this.vtypeText || vt[this.vtype +'Text']); - return false; + errors.push(this.vtypeText || vt[this.vtype +'Text']); } } - if(this.regex && !this.regex.test(value)){ - this.markInvalid(this.regexText); - return false; + + if (this.regex && !this.regex.test(value)) { + errors.push(this.regexText); } - return true; + + return errors; }, /** @@ -56884,7 +62223,7 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { getTriggerWidth: function(){ var tw = this.trigger.getWidth(); - if(!this.hideTrigger && tw === 0){ + if(!this.hideTrigger && !this.readOnly && tw === 0){ tw = this.defaultTriggerWidth; } return tw; @@ -56904,7 +62243,7 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { this.wrap = this.el.wrap({cls: 'x-form-field-wrap x-form-field-trigger-wrap'}); this.trigger = this.wrap.createChild(this.triggerConfig || - {tag: "img", src: Ext.BLANK_IMAGE_URL, cls: "x-form-trigger " + this.triggerClass}); + {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.triggerClass}); this.initTrigger(); if(!this.width){ this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth()); @@ -56912,6 +62251,10 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { this.resizeEl = this.positionEl = this.wrap; }, + getWidth: function() { + return(this.el.getWidth() + this.trigger.getWidth()); + }, + updateEditState: function(){ if(this.rendered){ if (this.readOnly) { @@ -56935,6 +62278,10 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { } }, + /** + * Changes the hidden status of the trigger. + * @param {Boolean} hideTrigger True to hide the trigger, false to show it. + */ setHideTrigger: function(hideTrigger){ if(hideTrigger != this.hideTrigger){ this.hideTrigger = hideTrigger; @@ -56943,11 +62290,11 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { }, /** - * @param {Boolean} value True to allow the user to directly edit the field text * Allow or prevent the user from directly editing the field text. If false is passed, * the user will only be able to modify the field using the trigger. Will also add * a click event to the text field which will call the trigger. This method - * is the runtime equivalent of setting the 'editable' config option at config time. + * is the runtime equivalent of setting the {@link #editable} config option at config time. + * @param {Boolean} value True to allow the user to directly edit the field text. */ setEditable: function(editable){ if(editable != this.editable){ @@ -56957,11 +62304,11 @@ Ext.form.TriggerField = Ext.extend(Ext.form.TextField, { }, /** + * Setting this to true will supersede settings {@link #editable} and {@link #hideTrigger}. + * Setting this to false will defer back to {@link #editable} and {@link #hideTrigger}. This method + * is the runtime equivalent of setting the {@link #readOnly} config option at config time. * @param {Boolean} value True to prevent the user changing the field and explicitly * hide the trigger. - * Setting this to true will superceed settings editable and hideTrigger. - * Setting this to false will defer back to editable and hideTrigger. This method - * is the runtime equivalent of setting the 'readOnly' config option at config time. */ setReadOnly: function(readOnly){ if(readOnly != this.readOnly){ @@ -57098,8 +62445,8 @@ Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, { 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} + {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger1Class}, + {tag: "img", src: Ext.BLANK_IMAGE_URL, alt: "", cls: "x-form-trigger " + this.trigger2Class} ]}; }, @@ -57107,28 +62454,38 @@ Ext.form.TwinTriggerField = Ext.extend(Ext.form.TriggerField, { return this.triggers[index]; }, + afterRender: function(){ + Ext.form.TwinTriggerField.superclass.afterRender.call(this); + var triggers = this.triggers, + i = 0, + len = triggers.length; + + for(; i < len; ++i){ + if(this['hideTrigger' + (i + 1)]){ + triggers[i].hide(); + } + + } + }, + initTrigger : function(){ - var ts = this.trigger.select('.x-form-trigger', true); - var triggerField = this; + var ts = this.trigger.select('.x-form-trigger', true), + triggerField = this; + ts.each(function(t, all, index){ var triggerIndex = 'Trigger'+(index+1); t.hide = function(){ var w = triggerField.wrap.getWidth(); this.dom.style.display = 'none'; triggerField.el.setWidth(w-triggerField.trigger.getWidth()); - this['hidden' + triggerIndex] = true; + triggerField['hidden' + triggerIndex] = true; }; t.show = function(){ var w = triggerField.wrap.getWidth(); this.dom.style.display = ''; triggerField.el.setWidth(w-triggerField.trigger.getWidth()); - this['hidden' + triggerIndex] = false; + triggerField['hidden' + triggerIndex] = false; }; - - if(this['hide'+triggerIndex]){ - t.dom.style.display = 'none'; - this['hidden' + triggerIndex] = true; - } this.mon(t, 'click', this['on'+triggerIndex+'Click'], this, {preventDefault:true}); t.addClassOnOver('x-form-trigger-over'); t.addClassOnClick('x-form-trigger-click'); @@ -57249,6 +62606,13 @@ Ext.form.TextArea = Ext.extend(Ext.form.TextField, { return !e.isNavKeyPress() || e.getKey() == e.ENTER; }, + // inherit docs + filterValidation: function(e) { + if(!e.isNavKeyPress() || (!this.enterIsSpecial && e.keyCode == e.ENTER)){ + this.validationTask.delay(this.validationDelay); + } + }, + /** * Automatically grows the field to accomodate the height of the text up to the maximum field height allowed. * This only takes effect if grow = true, and fires the {@link #autosize} event if the height changes. @@ -57300,50 +62664,65 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { * @cfg {String} fieldClass The default CSS class for the field (defaults to "x-form-field x-form-num-field") */ fieldClass: "x-form-field x-form-num-field", + /** * @cfg {Boolean} allowDecimals False to disallow decimal values (defaults to true) */ allowDecimals : true, + /** * @cfg {String} decimalSeparator Character(s) to allow as the decimal separator (defaults to '.') */ decimalSeparator : ".", + /** * @cfg {Number} decimalPrecision The maximum precision to display after the decimal separator (defaults to 2) */ decimalPrecision : 2, + /** * @cfg {Boolean} allowNegative False to prevent entering a negative sign (defaults to true) */ allowNegative : true, + /** * @cfg {Number} minValue The minimum allowed value (defaults to Number.NEGATIVE_INFINITY) */ minValue : Number.NEGATIVE_INFINITY, + /** * @cfg {Number} maxValue The maximum allowed value (defaults to Number.MAX_VALUE) */ maxValue : Number.MAX_VALUE, + /** * @cfg {String} minText Error text to display if the minimum value validation fails (defaults to "The minimum value for this field is {minValue}") */ minText : "The minimum value for this field is {0}", + /** * @cfg {String} maxText Error text to display if the maximum value validation fails (defaults to "The maximum value for this field is {maxValue}") */ maxText : "The maximum value for this field is {0}", + /** * @cfg {String} nanText Error text to display if the value is not a valid number. For example, this can happen * if a valid character like '.' or '-' is left in the field with no number (defaults to "{value} is not a valid number") */ nanText : "{0} is not a valid number", + /** * @cfg {String} baseChars The base set of characters to evaluate as valid numbers (defaults to '0123456789'). */ baseChars : "0123456789", + /** + * @cfg {Boolean} autoStripChars True to automatically strip not allowed characters from the field. Defaults to false + */ + autoStripChars: false, + // private - initEvents : function(){ + initEvents : function() { var allowed = this.baseChars + ''; if (this.allowDecimals) { allowed += this.decimalSeparator; @@ -57351,41 +62730,58 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { if (this.allowNegative) { allowed += '-'; } - this.maskRe = new RegExp('[' + Ext.escapeRe(allowed) + ']'); + allowed = Ext.escapeRe(allowed); + this.maskRe = new RegExp('[' + allowed + ']'); + if (this.autoStripChars) { + this.stripCharsRe = new RegExp('[^' + allowed + ']', 'gi'); + } + Ext.form.NumberField.superclass.initEvents.call(this); }, - // private - validateValue : function(value){ - if(!Ext.form.NumberField.superclass.validateValue.call(this, value)){ - return false; - } - if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid - return true; + /** + * Runs all of NumberFields validations and returns an array of any errors. Note that this first + * runs TextField's validations, so the returned array is an amalgamation of all field errors. + * The additional validations run test that the value is a number, and that it is within the + * configured min and max values. + * @param {Mixed} value The value to get errors for (defaults to the current field value) + * @return {Array} All validation errors for this field + */ + getErrors: function(value) { + var errors = Ext.form.NumberField.superclass.getErrors.apply(this, arguments); + + value = Ext.isDefined(value) ? value : this.processValue(this.getRawValue()); + + if (value.length < 1) { // if it's blank and textfield didn't flag it then it's valid + return errors; } + value = String(value).replace(this.decimalSeparator, "."); + if(isNaN(value)){ - this.markInvalid(String.format(this.nanText, value)); - return false; + errors.push(String.format(this.nanText, value)); } + var num = this.parseValue(value); - if(num < this.minValue){ - this.markInvalid(String.format(this.minText, this.minValue)); - return false; + + if (num < this.minValue) { + errors.push(String.format(this.minText, this.minValue)); } - if(num > this.maxValue){ - this.markInvalid(String.format(this.maxText, this.maxValue)); - return false; + + if (num > this.maxValue) { + errors.push(String.format(this.maxText, this.maxValue)); } - return true; + + return errors; }, - getValue : function(){ + getValue : function() { return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this))); }, - setValue : function(v){ + setValue : function(v) { v = Ext.isNumber(v) ? v : parseFloat(String(v).replace(this.decimalSeparator, ".")); + v = this.fixPrecision(v); v = isNaN(v) ? '' : String(v).replace(".", this.decimalSeparator); return Ext.form.NumberField.superclass.setValue.call(this, v); }, @@ -57394,7 +62790,7 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { * Replaces any existing {@link #minValue} with the new value. * @param {Number} value The minimum value */ - setMinValue : function(value){ + setMinValue : function(value) { this.minValue = Ext.num(value, Number.NEGATIVE_INFINITY); }, @@ -57402,33 +62798,41 @@ Ext.form.NumberField = Ext.extend(Ext.form.TextField, { * Replaces any existing {@link #maxValue} with the new value. * @param {Number} value The maximum value */ - setMaxValue : function(value){ + setMaxValue : function(value) { this.maxValue = Ext.num(value, Number.MAX_VALUE); }, // private - parseValue : function(value){ + parseValue : function(value) { value = parseFloat(String(value).replace(this.decimalSeparator, ".")); return isNaN(value) ? '' : value; }, - // private - fixPrecision : function(value){ + /** + * @private + * + */ + fixPrecision : function(value) { var nan = isNaN(value); - if(!this.allowDecimals || this.decimalPrecision == -1 || nan || !value){ - return nan ? '' : value; + + if (!this.allowDecimals || this.decimalPrecision == -1 || nan || !value) { + return nan ? '' : value; } + return parseFloat(parseFloat(value).toFixed(this.decimalPrecision)); }, - beforeBlur : function(){ + beforeBlur : function() { var v = this.parseValue(this.getRawValue()); - if(!Ext.isEmpty(v)){ - this.setValue(this.fixPrecision(v)); + + if (!Ext.isEmpty(v)) { + this.setValue(v); } } }); -Ext.reg('numberfield', Ext.form.NumberField);/** + +Ext.reg('numberfield', Ext.form.NumberField); +/** * @class Ext.form.DateField * @extends Ext.form.TriggerField * Provides a date input field with a {@link Ext.DatePicker} dropdown and automatic date validation. @@ -57448,9 +62852,9 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { * @cfg {String} altFormats * Multiple date formats separated by "|" to try when parsing a user input value and it * does not match the defined format (defaults to - * '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'). + * 'm/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j'). */ - 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", + altFormats : "m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j", /** * @cfg {String} disabledDaysText * The tooltip to display when the date falls on a disabled day (defaults to 'Disabled') @@ -57492,6 +62896,13 @@ Ext.form.DateField = Ext.extend(Ext.form.TriggerField, { * the keyboard handler for spacebar that selects the current date (defaults to true). */ showToday : true, + + /** + * @cfg {Number} startDay + * Day index at which the week should begin, 0-based (defaults to 0, which is Sunday) + */ + startDay : 0, + /** * @cfg {Date/String} minValue * The minimum allowed date. Can be either a Javascript date object or a string date in a @@ -57541,6 +62952,27 @@ disabledDates: ["^03"] // private defaultAutoCreate : {tag: "input", type: "text", size: "10", autocomplete: "off"}, + // in the absence of a time value, a default value of 12 noon will be used + // (note: 12 noon was chosen because it steers well clear of all DST timezone changes) + initTime: '12', // 24 hour format + + initTimeFormat: 'H', + + // PUBLIC -- to be documented + safeParse : function(value, format) { + if (Date.formatContainsHourInfo(format)) { + // if parse format contains hour information, no DST adjustment is necessary + return Date.parseDate(value, format); + } else { + // set time to 12 noon, then clear the time + var parsedDate = Date.parseDate(value + ' ' + this.initTime, format + ' ' + this.initTimeFormat); + + if (parsedDate) { + return parsedDate.clearTime(); + } + } + }, + initComponent : function(){ Ext.form.DateField.superclass.initComponent.call(this); @@ -57563,7 +62995,7 @@ disabledDates: ["^03"] this.disabledDatesRE = null; this.initDisabledDays(); }, - + initEvents: function() { Ext.form.DateField.superclass.initEvents.call(this); this.keyNav = new Ext.KeyNav(this.el, { @@ -57580,9 +63012,9 @@ disabledDates: ["^03"] initDisabledDays : function(){ if(this.disabledDates){ var dd = this.disabledDates, - len = dd.length - 1, + len = dd.length - 1, re = "(?:"; - + Ext.each(dd, function(d, i){ re += Ext.isDate(d) ? '^' + Ext.escapeRe(d.dateFormat(this.format)) + '$' : dd[i]; if(i != len){ @@ -57640,45 +63072,57 @@ disabledDates: ["^03"] } }, - // private - validateValue : function(value){ - value = this.formatDate(value); - if(!Ext.form.DateField.superclass.validateValue.call(this, value)){ - return false; - } - if(value.length < 1){ // if it's blank and textfield didn't flag it then it's valid - return true; + /** + * Runs all of NumberFields validations and returns an array of any errors. Note that this first + * runs TextField's validations, so the returned array is an amalgamation of all field errors. + * The additional validation checks are testing that the date format is valid, that the chosen + * date is within the min and max date constraints set, that the date chosen is not in the disabledDates + * regex and that the day chosed is not one of the disabledDays. + * @param {Mixed} value The value to get errors for (defaults to the current field value) + * @return {Array} All validation errors for this field + */ + getErrors: function(value) { + var errors = Ext.form.DateField.superclass.getErrors.apply(this, arguments); + + value = this.formatDate(value || this.processValue(this.getRawValue())); + + if (value.length < 1) { // if it's blank and textfield didn't flag it then it's valid + return errors; } + var svalue = value; value = this.parseDate(value); - if(!value){ - this.markInvalid(String.format(this.invalidText, svalue, this.format)); - return false; + if (!value) { + errors.push(String.format(this.invalidText, svalue, this.format)); + return errors; } + 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.minValue && time < this.minValue.clearTime().getTime()) { + errors.push(String.format(this.minText, this.formatDate(this.minValue))); } - if(this.maxValue && time > this.maxValue.getTime()){ - this.markInvalid(String.format(this.maxText, this.formatDate(this.maxValue))); - return false; + + if (this.maxValue && time > this.maxValue.clearTime().getTime()) { + errors.push(String.format(this.maxText, this.formatDate(this.maxValue))); } - if(this.disabledDays){ + + 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; + if (day === this.disabledDays[i]) { + errors.push(this.disabledDaysText); + break; } } } + var fvalue = this.formatDate(value); - if(this.disabledDatesRE && this.disabledDatesRE.test(fvalue)){ - this.markInvalid(String.format(this.disabledDatesText, fvalue)); - return false; + if (this.disabledDatesRE && this.disabledDatesRE.test(fvalue)) { + errors.push(String.format(this.disabledDatesText, fvalue)); } - return true; + + return errors; }, // private @@ -57722,17 +63166,20 @@ dateField.setValue('2006-05-04'); }, // private - parseDate : function(value){ + 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]); + + var v = this.safeParse(value, this.format), + af = this.altFormats, + afa = this.altFormatsArray; + + if (!v && af) { + afa = afa || af.split("|"); + + for (var i = 0, len = afa.length; i < len && !v; i++) { + v = this.safeParse(value, afa[i]); } } return v; @@ -57740,7 +63187,7 @@ dateField.setValue('2006-05-04'); // private onDestroy : function(){ - Ext.destroy(this.menu, this.keyNav); + Ext.destroy(this.menu, this.keyNav); Ext.form.DateField.superclass.onDestroy.call(this); }, @@ -57775,6 +63222,7 @@ dateField.setValue('2006-05-04'); disabledDaysText : this.disabledDaysText, format : this.format, showToday : this.showToday, + startDay: this.startDay, minText : String.format(this.minText, this.formatDate(this.minValue)), maxText : String.format(this.maxText, this.formatDate(this.maxValue)) }); @@ -57782,20 +63230,20 @@ dateField.setValue('2006-05-04'); this.menu.show(this.el, "tl-bl?"); this.menuEvents('on'); }, - + //private menuEvents: function(method){ this.menu[method]('select', this.onSelect, this); this.menu[method]('hide', this.onMenuHide, this); this.menu[method]('show', this.onFocus, this); }, - + onSelect: function(m, d){ this.setValue(d); this.fireEvent('select', this, d); this.menu.hide(); }, - + onMenuHide: function(){ this.focus(false, 60); this.menuEvents('un'); @@ -57823,7 +63271,8 @@ dateField.setValue('2006-05-04'); * @method autoSize */ }); -Ext.reg('datefield', Ext.form.DateField);/** +Ext.reg('datefield', Ext.form.DateField); +/** * @class Ext.form.DisplayField * @extends Ext.form.Field * A display-only text field which is not validated and not submitted. @@ -58057,16 +63506,11 @@ Ext.form.ComboBox = Ext.extend(Ext.form.TriggerField, { * @cfg {String} hiddenName If specified, a hidden form field with this name is dynamically generated to store the * field's data value (defaults to the underlying DOM element's name). Required for the combo's value to automatically * post during a form submission. See also {@link #valueField}. - *

            Note: the hidden field's id will also default to this name if {@link #hiddenId} is not specified. - * The ComboBox {@link Ext.Component#id id} and the {@link #hiddenId} should be different, since - * no two DOM nodes should share the same id. So, if the ComboBox {@link Ext.form.Field#name name} and - * hiddenName are the same, you should specify a unique {@link #hiddenId}.

            */ /** * @cfg {String} hiddenId If {@link #hiddenName} is specified, hiddenId can also be provided - * to give the hidden field a unique id (defaults to the {@link #hiddenName}). The hiddenId - * and combo {@link Ext.Component#id id} should be different, since no two DOM - * nodes should share the same id. + * to give the hidden field a unique id. The hiddenId and combo {@link Ext.Component#id id} should be + * different, since no two DOM nodes should share the same id. */ /** * @cfg {String} hiddenValue Sets the initial value of the hidden field if {@link #hiddenName} is @@ -58355,7 +63799,7 @@ var combo = new Ext.form.ComboBox({ d.push([value, o.text]); } this.store = new Ext.data.ArrayStore({ - 'id': 0, + idIndex: 0, fields: ['value', 'text'], data : d, autoDestroy: true @@ -58402,7 +63846,7 @@ var combo = new Ext.form.ComboBox({ 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); + id: (this.hiddenId || Ext.id())}, 'before', true); } if(Ext.isGecko){ @@ -58425,26 +63869,38 @@ var combo = new Ext.form.ComboBox({ } }, + getParentZIndex : function(){ + var zindex; + if (this.ownerCt){ + this.findParentBy(function(ct){ + zindex = parseInt(ct.getPositionEl().getStyle('z-index'), 10); + return !!zindex; + }); + } + return zindex; + }, + + getZIndex : function(listParent){ + listParent = listParent || Ext.getDom(this.getListParent() || Ext.getBody()); + var zindex = parseInt(Ext.fly(listParent).getStyle('z-index'), 10); + if(!zindex){ + zindex = this.getParentZIndex(); + } + return (zindex || 12000) + 5; + }, + // private initList : function(){ if(!this.list){ var cls = 'x-combo-list', - listParent = Ext.getDom(this.getListParent() || Ext.getBody()), - zindex = parseInt(Ext.fly(listParent).getStyle('z-index') ,10); - - if (this.ownerCt && !zindex){ - this.findParentBy(function(ct){ - zindex = parseInt(ct.getPositionEl().getStyle('z-index'), 10); - return !!zindex; - }); - } + listParent = Ext.getDom(this.getListParent() || Ext.getBody()); this.list = new Ext.Layer({ parentEl: listParent, shadow: this.shadow, cls: [cls, this.listClass].join(' '), constrain:false, - zindex: (zindex || 12000) + 5 + zindex: this.getZIndex(listParent) }); var lw = this.listWidth || Math.max(this.wrap.getWidth(), this.minListWidth); @@ -58636,17 +64092,33 @@ var menu = new Ext.menu.Menu({ }, reset : function(){ - Ext.form.ComboBox.superclass.reset.call(this); if(this.clearFilterOnReset && this.mode == 'local'){ this.store.clearFilter(); } + Ext.form.ComboBox.superclass.reset.call(this); }, // private initEvents : function(){ Ext.form.ComboBox.superclass.initEvents.call(this); - + /** + * @property keyNav + * @type Ext.KeyNav + *

            A {@link Ext.KeyNav KeyNav} object which handles navigation keys for this ComboBox. This performs actions + * based on keystrokes typed when the input field is focused.

            + *

            After the ComboBox has been rendered, you may override existing navigation key functionality, + * or add your own based upon key names as specified in the {@link Ext.KeyNav KeyNav} class.

            + *

            The function is executed in the scope (this reference of the ComboBox. Example:

            
            +myCombo.keyNav.esc = function(e) {  // Override ESC handling function
            +    this.collapse();                // Standard behaviour of Ext's ComboBox.
            +    this.setValue(this.startValue); // We reset to starting value on ESC
            +};
            +myCombo.keyNav.tab = function() {   // Override TAB handling function
            +    this.onViewClick(false);        // Select the currently highlighted row
            +};
            +
            + */ this.keyNav = new Ext.KeyNav(this.el, { "up" : function(e){ this.inKeyMode = true; @@ -58671,7 +64143,11 @@ var menu = new Ext.menu.Menu({ }, "tab" : function(e){ - this.collapse(); + if (this.forceSelection === true) { + this.collapse(); + } else { + this.onViewClick(false); + } return true; }, @@ -58732,7 +64208,7 @@ var menu = new Ext.menu.Menu({ // private onResize : function(w, h){ Ext.form.ComboBox.superclass.onResize.apply(this, arguments); - if(this.isVisible() && this.list){ + if(!isNaN(w) && this.isVisible() && this.list){ this.doResize(w); }else{ this.bufferSize = w; @@ -58819,11 +64295,16 @@ var menu = new Ext.menu.Menu({ }, // private - assertValue : function(){ - + assertValue : function(){ var val = this.getRawValue(), - rec = this.findRecord(this.displayField, val); + rec; + if(this.valueField && Ext.isDefined(this.value)){ + rec = this.findRecord(this.valueField, this.value); + } + if(!rec || rec.get(this.displayField) != val){ + rec = this.findRecord(this.displayField, val); + } if(!rec && this.forceSelection){ if(val.length > 0 && val != this.emptyText){ this.el.dom.value = Ext.value(this.lastSelectionText, ''); @@ -58832,12 +64313,17 @@ var menu = new Ext.menu.Menu({ this.clearValue(); } }else{ - if(rec){ + if(rec && this.valueField){ + // onSelect may have already set the value and by doing so + // set the display field properly. Let's not wipe out the + // valueField here by just sending the displayField. + if (this.value == val){ + return; + } val = rec.get(this.valueField || this.displayField); } this.setValue(val); } - }, // private @@ -59123,13 +64609,13 @@ var menu = new Ext.menu.Menu({ // private getParams : function(q){ - var p = {}; - //p[this.queryParam] = q; + var params = {}, + paramNames = this.store.paramNames; if(this.pageSize){ - p.start = 0; - p.limit = this.pageSize; + params[paramNames.start] = 0; + params[paramNames.limit] = this.pageSize; } - return p; + return params; }, /** @@ -59147,7 +64633,7 @@ var menu = new Ext.menu.Menu({ // private collapseIf : function(e){ - if(!e.within(this.wrap) && !e.within(this.list)){ + if(!this.isDestroyed && !e.within(this.wrap) && !e.within(this.list)){ this.collapse(); } }, @@ -59159,11 +64645,25 @@ var menu = new Ext.menu.Menu({ if(this.isExpanded() || !this.hasFocus){ return; } + + if(this.title || this.pageSize){ + this.assetHeight = 0; + if(this.title){ + this.assetHeight += this.header.getHeight(); + } + if(this.pageSize){ + this.assetHeight += this.footer.getHeight(); + } + } + if(this.bufferSize){ this.doResize(this.bufferSize); delete this.bufferSize; } this.list.alignTo.apply(this.list, [this.el].concat(this.listAlign)); + + // zindex can change, re-check it and set it if necessary + this.list.setZIndex(this.getZIndex()); this.list.show(); if(Ext.isGecko2){ this.innerList.setOverflow('auto'); // necessary for FF 2.0/Mac @@ -59238,19 +64738,20 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { * @cfg {Boolean} checked true if the checkbox should render initially checked (defaults to false) */ checked : false, + /** + * @cfg {String} boxLabel The text that appears beside the checkbox + */ + boxLabel: ' ', /** * @cfg {String/Object} autoCreate A DomHelper element spec, or true for a default element spec (defaults to * {tag: 'input', type: 'checkbox', autocomplete: 'off'}) */ defaultAutoCreate : { tag: 'input', type: 'checkbox', autocomplete: 'off'}, - /** - * @cfg {String} boxLabel The text that appears beside the checkbox - */ /** * @cfg {String} inputValue The value that should go into the generated input element's value attribute */ /** - * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of + * @cfg {Function} handler A function called when the {@link #checked} value changes (can be used instead of * handling the check event). The handler is passed the following parameters: *
              *
            • checkbox : Ext.form.Checkbox
              The Checkbox being toggled.
            • @@ -59264,7 +64765,7 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { // private actionMode : 'wrap', - + // private initComponent : function(){ Ext.form.Checkbox.superclass.initComponent.call(this); @@ -59326,7 +64827,7 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { this.checked = this.el.dom.checked; } // Need to repaint for IE, otherwise positioning is broken - if(Ext.isIE){ + if (Ext.isIE && !Ext.isStrict) { this.wrap.repaint(); } this.resizeEl = this.positionEl = this.wrap; @@ -59369,8 +64870,15 @@ Ext.form.Checkbox = Ext.extend(Ext.form.Field, { * @return {Ext.form.Field} this */ setValue : function(v){ - var checked = this.checked ; - this.checked = (v === true || v === 'true' || v == '1' || String(v).toLowerCase() == 'on'); + var checked = this.checked, + inputVal = this.inputValue; + + if (v === false) { + this.checked = false; + } else { + this.checked = (v === true || v === 'true' || v == '1' || (inputVal ? v == inputVal : String(v).toLowerCase() == 'on')); + } + if(this.rendered){ this.el.dom.checked = this.checked; this.el.dom.defaultChecked = this.checked; @@ -59528,7 +65036,7 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { var cc = Ext.apply({items:[]}, colCfg); cc[this.columns[i] <= 1 ? 'columnWidth' : 'width'] = this.columns[i]; if(this.defaults){ - cc.defaults = Ext.apply(cc.defaults || {}, this.defaults) + cc.defaults = Ext.apply(cc.defaults || {}, this.defaults); } cols.push(cc); }; @@ -59618,21 +65126,27 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { this.fireEvent('change', this, arr); }, - // private - validateValue : function(value){ - if(!this.allowBlank){ + /** + * Runs CheckboxGroup's validations and returns an array of any errors. The only error by default + * is if allowBlank is set to true and no items are checked. + * @return {Array} Array of all validation errors + */ + getErrors: function() { + var errors = Ext.form.CheckboxGroup.superclass.getErrors.apply(this, arguments); + + if (!this.allowBlank) { var blank = true; + this.eachItem(function(f){ - if(f.checked){ + if (f.checked) { return (blank = false); } }); - if(blank){ - this.markInvalid(this.blankText); - return false; - } + + if (blank) errors.push(this.blankText); } - return true; + + return errors; }, // private @@ -59643,15 +65157,27 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { } var dirty = false; + this.eachItem(function(item){ if(item.isDirty()){ dirty = true; return false; } }); + return dirty; }, + // private + setReadOnly : function(readOnly){ + if(this.rendered){ + this.eachItem(function(item){ + item.setReadOnly(readOnly); + }); + } + this.readOnly = readOnly; + }, + // private onDisable : function(){ this.eachItem(function(item){ @@ -59666,14 +65192,6 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { }); }, - // private - doLayout: function(){ - if(this.rendered){ - this.panel.forceLayout = this.ownerCt.forceLayout; - this.panel.doLayout(); - } - }, - // private onResize : function(w, h){ this.panel.setSize(w, h); @@ -59682,11 +65200,26 @@ Ext.form.CheckboxGroup = Ext.extend(Ext.form.Field, { // inherit docs from Field reset : function(){ - this.eachItem(function(c){ - if(c.reset){ - c.reset(); - } - }); + if (this.originalValue) { + // Clear all items + this.eachItem(function(c){ + if(c.setValue){ + c.setValue(false); + c.originalValue = c.getValue(); + } + }); + // Set items stored in originalValue, ugly - set a flag to reset the originalValue + // during the horrible onSetValue. This will allow trackResetOnLoad to function. + this.resetOriginal = true; + this.setValue(this.originalValue); + delete this.resetOriginal; + } else { + this.eachItem(function(c){ + if(c.reset){ + c.reset(); + } + }); + } // Defer the clearInvalid so if BaseForm's collection is being iterated it will be called AFTER it is complete. // Important because reset is being called on both the group and the individual items. (function() { @@ -59725,14 +65258,33 @@ myCheckboxGroup.setValue('cb-col-1,cb-col-3'); return this; }, + /** + * @private + * Sets the values of one or more of the items within the CheckboxGroup + * @param {String|Array|Object} id Can take multiple forms. Can be optionally: + *
                + *
              • An ID string to be used with a second argument
              • + *
              • An array of the form ['some', 'list', 'of', 'ids', 'to', 'mark', 'checked']
              • + *
              • An array in the form [true, true, false, true, false] etc, where each item relates to the check status of + * the checkbox at the same index
              • + *
              • An object containing ids of the checkboxes as keys and check values as properties
              • + *
              + * @param {String} value The value to set the field to if the first argument was a string + */ onSetValue: function(id, value){ if(arguments.length == 1){ if(Ext.isArray(id)){ - // an array of boolean values Ext.each(id, function(val, idx){ - var item = this.items.itemAt(idx); - if(item){ - item.setValue(val); + if (Ext.isObject(val) && val.setValue){ // array of checkbox components to be checked + val.setValue(true); + if (this.resetOriginal === true) { + val.originalValue = val.getValue(); + } + } else { // an array of boolean values + var item = this.items.itemAt(idx); + if(item){ + item.setValue(val); + } } }, this); }else if(Ext.isObject(id)){ @@ -59757,6 +65309,9 @@ myCheckboxGroup.setValue('cb-col-1,cb-col-3'); // private beforeDestroy: function(){ Ext.destroy(this.panel); + if (!this.rendered) { + Ext.destroy(this.items); + } Ext.form.CheckboxGroup.superclass.beforeDestroy.call(this); }, @@ -59796,10 +65351,15 @@ myCheckboxGroup.setValue('cb-col-1,cb-col-3'); return out; }, - // private - eachItem: function(fn){ + /** + * @private + * Convenience function which passes the given function to every item in the composite + * @param {Function} fn The function to call + * @param {Object} scope Optional scope object + */ + eachItem: function(fn, scope) { if(this.items && this.items.each){ - this.items.each(fn, this); + this.items.each(fn, scope || this); } }, @@ -59824,6 +65384,448 @@ myCheckboxGroup.setValue('cb-col-1,cb-col-3'); Ext.reg('checkboxgroup', Ext.form.CheckboxGroup); /** + * @class Ext.form.CompositeField + * @extends Ext.form.Field + * Composite field allowing a number of form Fields to be rendered on the same row. The fields are rendered + * using an hbox layout internally, so all of the normal HBox layout config items are available. Example usage: + *
              +{
              +    xtype: 'compositefield',
              +    labelWidth: 120
              +    items: [
              +        {
              +            xtype     : 'textfield',
              +            fieldLabel: 'Title',
              +            width     : 20
              +        },
              +        {
              +            xtype     : 'textfield',
              +            fieldLabel: 'First',
              +            flex      : 1
              +        },
              +        {
              +            xtype     : 'textfield',
              +            fieldLabel: 'Last',
              +            flex      : 1
              +        }
              +    ]
              +}
              + * 
              + * In the example above the composite's fieldLabel will be set to 'Title, First, Last' as it groups the fieldLabels + * of each of its children. This can be overridden by setting a fieldLabel on the compositefield itself: + *
              +{
              +    xtype: 'compositefield',
              +    fieldLabel: 'Custom label',
              +    items: [...]
              +}
              + * 
              + * Any Ext.form.* component can be placed inside a composite field. + */ +Ext.form.CompositeField = Ext.extend(Ext.form.Field, { + + /** + * @property defaultMargins + * @type String + * The margins to apply by default to each field in the composite + */ + defaultMargins: '0 5 0 0', + + /** + * @property skipLastItemMargin + * @type Boolean + * If true, the defaultMargins are not applied to the last item in the composite field set (defaults to true) + */ + skipLastItemMargin: true, + + /** + * @property isComposite + * @type Boolean + * Signifies that this is a Composite field + */ + isComposite: true, + + /** + * @property combineErrors + * @type Boolean + * True to combine errors from the individual fields into a single error message at the CompositeField level (defaults to true) + */ + combineErrors: true, + + /** + * @cfg {String} labelConnector The string to use when joining segments of the built label together (defaults to ', ') + */ + labelConnector: ', ', + + /** + * @cfg {Object} defaults Any default properties to assign to the child fields. + */ + + //inherit docs + //Builds the composite field label + initComponent: function() { + var labels = [], + items = this.items, + item; + + for (var i=0, j = items.length; i < j; i++) { + item = items[i]; + + if (!Ext.isEmpty(item.ref)){ + item.ref = '../' + item.ref; + } + + labels.push(item.fieldLabel); + + //apply any defaults + Ext.applyIf(item, this.defaults); + + //apply default margins to each item except the last + if (!(i == j - 1 && this.skipLastItemMargin)) { + Ext.applyIf(item, {margins: this.defaultMargins}); + } + } + + this.fieldLabel = this.fieldLabel || this.buildLabel(labels); + + /** + * @property fieldErrors + * @type Ext.util.MixedCollection + * MixedCollection of current errors on the Composite's subfields. This is used internally to track when + * to show and hide error messages at the Composite level. Listeners are attached to the MixedCollection's + * add, remove and replace events to update the error icon in the UI as errors are added or removed. + */ + this.fieldErrors = new Ext.util.MixedCollection(true, function(item) { + return item.field; + }); + + this.fieldErrors.on({ + scope : this, + add : this.updateInvalidMark, + remove : this.updateInvalidMark, + replace: this.updateInvalidMark + }); + + Ext.form.CompositeField.superclass.initComponent.apply(this, arguments); + + this.innerCt = new Ext.Container({ + layout : 'hbox', + items : this.items, + cls : 'x-form-composite', + defaultMargins: '0 3 0 0', + ownerCt: this + }); + this.innerCt.ownerCt = undefined; + + var fields = this.innerCt.findBy(function(c) { + return c.isFormField; + }, this); + + /** + * @property items + * @type Ext.util.MixedCollection + * Internal collection of all of the subfields in this Composite + */ + this.items = new Ext.util.MixedCollection(); + this.items.addAll(fields); + + }, + + /** + * @private + * Creates an internal container using hbox and renders the fields to it + */ + onRender: function(ct, position) { + if (!this.el) { + /** + * @property innerCt + * @type Ext.Container + * A container configured with hbox layout which is responsible for laying out the subfields + */ + var innerCt = this.innerCt; + innerCt.render(ct); + + this.el = innerCt.getEl(); + + //if we're combining subfield errors into a single message, override the markInvalid and clearInvalid + //methods of each subfield and show them at the Composite level instead + if (this.combineErrors) { + this.eachItem(function(field) { + Ext.apply(field, { + markInvalid : this.onFieldMarkInvalid.createDelegate(this, [field], 0), + clearInvalid: this.onFieldClearInvalid.createDelegate(this, [field], 0) + }); + }); + } + + //set the label 'for' to the first item + var l = this.el.parent().parent().child('label', true); + if (l) { + l.setAttribute('for', this.items.items[0].id); + } + } + + Ext.form.CompositeField.superclass.onRender.apply(this, arguments); + }, + + /** + * Called if combineErrors is true and a subfield's markInvalid method is called. + * By default this just adds the subfield's error to the internal fieldErrors MixedCollection + * @param {Ext.form.Field} field The field that was marked invalid + * @param {String} message The error message + */ + onFieldMarkInvalid: function(field, message) { + var name = field.getName(), + error = { + field: name, + errorName: field.fieldLabel || name, + error: message + }; + + this.fieldErrors.replace(name, error); + + if (!field.preventMark) { + field.el.addClass(field.invalidClass); + } + }, + + /** + * Called if combineErrors is true and a subfield's clearInvalid method is called. + * By default this just updates the internal fieldErrors MixedCollection. + * @param {Ext.form.Field} field The field that was marked invalid + */ + onFieldClearInvalid: function(field) { + this.fieldErrors.removeKey(field.getName()); + + field.el.removeClass(field.invalidClass); + }, + + /** + * @private + * Called after a subfield is marked valid or invalid, this checks to see if any of the subfields are + * currently invalid. If any subfields are invalid it builds a combined error message marks the composite + * invalid, otherwise clearInvalid is called + */ + updateInvalidMark: function() { + var ieStrict = Ext.isIE6 && Ext.isStrict; + + if (this.fieldErrors.length == 0) { + this.clearInvalid(); + + //IE6 in strict mode has a layout bug when using 'under' as the error message target. This fixes it + if (ieStrict) { + this.clearInvalid.defer(50, this); + } + } else { + var message = this.buildCombinedErrorMessage(this.fieldErrors.items); + + this.sortErrors(); + this.markInvalid(message); + + //IE6 in strict mode has a layout bug when using 'under' as the error message target. This fixes it + if (ieStrict) { + this.markInvalid(message); + } + } + }, + + /** + * Performs validation checks on each subfield and returns false if any of them fail validation. + * @return {Boolean} False if any subfield failed validation + */ + validateValue: function(value, preventMark) { + var valid = true; + + this.eachItem(function(field) { + if (!field.isValid(preventMark)) { + valid = false; + } + }); + + return valid; + }, + + /** + * Takes an object containing error messages for contained fields, returning a combined error + * string (defaults to just placing each item on a new line). This can be overridden to provide + * custom combined error message handling. + * @param {Array} errors Array of errors in format: [{field: 'title', error: 'some error'}] + * @return {String} The combined error message + */ + buildCombinedErrorMessage: function(errors) { + var combined = [], + error; + + for (var i = 0, j = errors.length; i < j; i++) { + error = errors[i]; + + combined.push(String.format("{0}: {1}", error.errorName, error.error)); + } + + return combined.join("
              "); + }, + + /** + * Sorts the internal fieldErrors MixedCollection by the order in which the fields are defined. + * This is called before displaying errors to ensure that the errors are presented in the expected order. + * This function can be overridden to provide a custom sorting order if needed. + */ + sortErrors: function() { + var fields = this.items; + + this.fieldErrors.sort("ASC", function(a, b) { + var findByName = function(key) { + return function(field) { + return field.getName() == key; + }; + }; + + var aIndex = fields.findIndexBy(findByName(a.field)), + bIndex = fields.findIndexBy(findByName(b.field)); + + return aIndex < bIndex ? -1 : 1; + }); + }, + + /** + * Resets each field in the composite to their previous value + */ + reset: function() { + this.eachItem(function(item) { + item.reset(); + }); + + // Defer the clearInvalid so if BaseForm's collection is being iterated it will be called AFTER it is complete. + // Important because reset is being called on both the group and the individual items. + (function() { + this.clearInvalid(); + }).defer(50, this); + }, + + /** + * Calls clearInvalid on all child fields. This is a convenience function and should not often need to be called + * as fields usually take care of clearing themselves + */ + clearInvalidChildren: function() { + this.eachItem(function(item) { + item.clearInvalid(); + }); + }, + + /** + * Builds a label string from an array of subfield labels. + * By default this just joins the labels together with a comma + * @param {Array} segments Array of each of the labels in the composite field's subfields + * @return {String} The built label + */ + buildLabel: function(segments) { + return Ext.clean(segments).join(this.labelConnector); + }, + + /** + * Checks each field in the composite and returns true if any is dirty + * @return {Boolean} True if any field is dirty + */ + isDirty: function(){ + //override the behaviour to check sub items. + if (this.disabled || !this.rendered) { + return false; + } + + var dirty = false; + this.eachItem(function(item){ + if(item.isDirty()){ + dirty = true; + return false; + } + }); + return dirty; + }, + + /** + * @private + * Convenience function which passes the given function to every item in the composite + * @param {Function} fn The function to call + * @param {Object} scope Optional scope object + */ + eachItem: function(fn, scope) { + if(this.items && this.items.each){ + this.items.each(fn, scope || this); + } + }, + + /** + * @private + * Passes the resize call through to the inner panel + */ + onResize: function(adjWidth, adjHeight, rawWidth, rawHeight) { + var innerCt = this.innerCt; + + if (this.rendered && innerCt.rendered) { + innerCt.setSize(adjWidth, adjHeight); + } + + Ext.form.CompositeField.superclass.onResize.apply(this, arguments); + }, + + /** + * @private + * Forces the internal container to be laid out again + */ + doLayout: function(shallow, force) { + if (this.rendered) { + var innerCt = this.innerCt; + + innerCt.forceLayout = this.ownerCt.forceLayout; + innerCt.doLayout(shallow, force); + } + }, + + /** + * @private + */ + beforeDestroy: function(){ + Ext.destroy(this.innerCt); + + Ext.form.CompositeField.superclass.beforeDestroy.call(this); + }, + + //override the behaviour to check sub items. + setReadOnly : function(readOnly) { + if (readOnly == undefined) { + readOnly = true; + } + readOnly = !!readOnly; + + if(this.rendered){ + this.eachItem(function(item){ + item.setReadOnly(readOnly); + }); + } + this.readOnly = readOnly; + }, + + onShow : function() { + Ext.form.CompositeField.superclass.onShow.call(this); + this.doLayout(); + }, + + //override the behaviour to check sub items. + onDisable : function(){ + this.eachItem(function(item){ + item.disable(); + }); + }, + + //override the behaviour to check sub items. + onEnable : function(){ + this.eachItem(function(item){ + item.enable(); + }); + } +}); + +Ext.reg('compositefield', Ext.form.CompositeField);/** * @class Ext.form.Radio * @extends Ext.form.Checkbox * Single radio field. Same as Checkbox, but provided as a convenience for automatically setting the input type. @@ -59853,24 +65855,10 @@ Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { */ getGroupValue : function(){ var p = this.el.up('form') || Ext.getBody(); - var c = p.child('input[name='+this.el.dom.name+']:checked', true); + var c = p.child('input[name="'+this.el.dom.name+'"]:checked', true); return c ? c.value : null; }, - // private - onClick : function(){ - if(this.el.dom.checked != this.checked){ - var els = this.getCheckEl().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); - } - }, - /** * Sets either the checked/unchecked status of this Radio, or, if a string value * is passed, checks a sibling Radio of the same name whose value is the value specified. @@ -59878,21 +65866,34 @@ Ext.form.Radio = Ext.extend(Ext.form.Checkbox, { * @return {Ext.form.Field} this */ setValue : function(v){ + var checkEl, + els, + radio; if (typeof v == 'boolean') { Ext.form.Radio.superclass.setValue.call(this, v); } else if (this.rendered) { - var r = this.getCheckEl().child('input[name=' + this.el.dom.name + '][value=' + v + ']', true); - if(r){ - Ext.getCmp(r.id).setValue(true); + checkEl = this.getCheckEl(); + radio = checkEl.child('input[name="' + this.el.dom.name + '"][value="' + v + '"]', true); + if(radio){ + Ext.getCmp(radio.id).setValue(true); } } + if(this.rendered && this.checked){ + checkEl = checkEl || this.getCheckEl(); + els = this.getCheckEl().select('input[name="' + this.el.dom.name + '"]'); + els.each(function(el){ + if(el.dom.id != this.id){ + Ext.getCmp(el.dom.id).setValue(false); + } + }, this); + } return this; }, // private getCheckEl: function(){ if(this.inGroup){ - return this.el.up('.x-form-radio-group') + return this.el.up('.x-form-radio-group'); } return this.el.up('form') || Ext.getBody(); } @@ -60027,6 +66028,8 @@ Ext.form.Hidden = Ext.extend(Ext.form.Field, { // private inputType : 'hidden', + shouldLayout: false, + // private onRender : function(){ Ext.form.Hidden.superclass.onRender.apply(this, arguments); @@ -60077,7 +66080,7 @@ Ext.reg('hidden', Ext.form.Hidden);/** * @param {Object} config Configuration options */ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, { - + constructor: function(el, config){ Ext.apply(this, config); if(Ext.isString(this.paramOrder)){ @@ -60118,9 +66121,9 @@ Ext.form.BasicForm = Ext.extend(Ext.util.Observable, { if(el){ this.initEl(el); } - Ext.form.BasicForm.superclass.constructor.call(this); + Ext.form.BasicForm.superclass.constructor.call(this); }, - + /** * @cfg {String} method * The request method to use (GET or POST) for form actions if one isn't supplied in the action options. @@ -60226,7 +66229,7 @@ paramOrder: 'param1|param2|param' * {@link #paramOrder} nullifies this configuration. */ paramsAsHash: false, - + /** * @cfg {String} waitTitle * The default title to show for the waiting message box (defaults to 'Please Wait...') @@ -60320,15 +66323,20 @@ new Ext.FormPanel({ e.stopEvent(); }, - // private - destroy: function() { - this.items.each(function(f){ - Ext.destroy(f); - }); - if(this.el){ - this.el.removeAllListeners(); - this.el.remove(); + /** + * Destroys this object. + * @private + * @param {Boolean} bound true if the object is bound to a form panel. If this is the case + * the FormPanel will take care of destroying certain things, so we're just doubling up. + */ + destroy: function(bound){ + if(bound !== true){ + this.items.each(function(f){ + Ext.destroy(f); + }); + Ext.destroy(this.el); } + this.items.clear(); this.purgeListeners(); }, @@ -60477,8 +66485,9 @@ myFormPanel.getForm().submit({ * @return {BasicForm} this */ submit : function(options){ + options = options || {}; if(this.standardSubmit){ - var v = this.isValid(); + var v = options.clientValidation === false || this.isValid(); if(v){ var el = this.el.dom; if(this.url && Ext.isEmpty(el.action)){ @@ -60511,11 +66520,22 @@ myFormPanel.getForm().submit({ */ updateRecord : function(record){ record.beginEdit(); - var fs = record.fields; + var fs = record.fields, + field, + value; fs.each(function(f){ - var field = this.findField(f.name); + field = this.findField(f.name); if(field){ - record.set(f.name, field.getValue()); + value = field.getValue(); + if (Ext.type(value) !== false && value.getGroupValue) { + value = value.getGroupValue(); + } else if ( field.eachItem ) { + value = []; + field.eachItem(function(item){ + value.push(item.getValue()); + }); + } + record.set(f.name, value); } }, this); record.endEdit(); @@ -60536,6 +66556,12 @@ myFormPanel.getForm().submit({ // private beforeAction : function(action){ + // Call HtmlEditor's syncValue before actions + this.items.each(function(f){ + if(f.isFormField && f.syncValue){ + f.syncValue(); + } + }); var o = action.options; if(o.waitMsg){ if(this.waitMsgTarget === true){ @@ -60581,15 +66607,25 @@ myFormPanel.getForm().submit({ * {@link Ext.grid.Column#dataIndex dataIndex}, {@link Ext.form.Field#getName name or hiddenName}). * @return Field */ - findField : function(id){ + findField : function(id) { var field = this.items.get(id); - if(!Ext.isObject(field)){ - this.items.each(function(f){ - if(f.isFormField && (f.dataIndex == id || f.id == id || f.getName() == id)){ - field = f; - return false; + + if (!Ext.isObject(field)) { + //searches for the field corresponding to the given id. Used recursively for composite fields + var findMatchingField = function(f) { + if (f.isFormField) { + if (f.dataIndex == id || f.id == id || f.getName() == id) { + field = f; + return false; + } else if (f.isComposite) { + return f.items.each(findMatchingField); + } else if (f instanceof Ext.form.CheckboxGroup && f.rendered) { + return f.eachItem(findMatchingField); + } } - }); + }; + + this.items.each(findMatchingField); } return field || null; }, @@ -60601,7 +66637,7 @@ myFormPanel.getForm().submit({ * @return {BasicForm} this */ markInvalid : function(errors){ - if(Ext.isArray(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); @@ -60609,7 +66645,7 @@ myFormPanel.getForm().submit({ f.markInvalid(fieldError.msg); } } - }else{ + } else { var field, id; for(id in errors){ if(!Ext.isFunction(errors[id]) && (field = this.findField(id))){ @@ -60617,6 +66653,7 @@ myFormPanel.getForm().submit({ } } } + return this; }, @@ -60688,12 +66725,12 @@ myFormPanel.getForm().submit({ n, key, val; - this.items.each(function(f){ - if(dirtyOnly !== true || f.isDirty()){ + this.items.each(function(f) { + if (!f.disabled && (dirtyOnly !== true || f.isDirty())) { n = f.getName(); key = o[n]; val = f.getValue(); - + if(Ext.isDefined(key)){ if(Ext.isArray(key)){ o[n].push(val); @@ -60748,7 +66785,6 @@ myFormPanel.getForm().submit({ return this; }, - /** * Removes a field from the items collection (does NOT remove its markup). * @param {Field} field @@ -60759,6 +66795,13 @@ myFormPanel.getForm().submit({ return this; }, + /** + * Removes all fields from the collection that have been destroyed. + */ + cleanDestroyed : function() { + this.items.filterBy(function(o) { return !!o.isDestroyed; }).each(this.remove, this); + }, + /** * Iterates through the {@link Ext.form.Field Field}s which have been {@link #add add}ed to this BasicForm, * checks them for an id attribute, and calls {@link Ext.form.Field#applyToMarkup} on the existing dom element with that id. @@ -60809,7 +66852,8 @@ myFormPanel.getForm().submit({ }); // back compat -Ext.BasicForm = Ext.form.BasicForm;/** +Ext.BasicForm = Ext.form.BasicForm; +/** * @class Ext.form.FormPanel * @extends Ext.Panel *

              Standard form container.

              @@ -61006,12 +67050,7 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { // private beforeDestroy : function(){ this.stopMonitoring(); - /* - * Don't move this behaviour to BasicForm because it can be used - * on it's own. - */ - Ext.destroy(this.form); - this.form.items.clear(); + this.form.destroy(true); Ext.FormPanel.superclass.beforeDestroy.call(this); }, @@ -61072,16 +67111,20 @@ Ext.FormPanel = Ext.extend(Ext.Panel, { }, // private - processRemove : function(c){ - // If a single form Field, remove it - if(this.isField(c)){ - this.form.remove(c); - // If a Container, its already destroyed by the time it gets here. Remove any references to destroyed fields. - }else if(c.findBy){ - var isDestroyed = function(o) { - return !!o.isDestroyed; + processRemove: function(c){ + if(!this.destroying){ + // If a single form Field, remove it + if(this.isField(c)){ + this.form.remove(c); + // If a Container, its already destroyed by the time it gets here. Remove any references to destroyed fields. + }else if (c.findBy){ + Ext.each(c.findBy(this.isField), this.form.remove, this.form); + /* + * This isn't the most efficient way of getting rid of the items, however it's the most + * correct, which in this case is most important. + */ + this.form.cleanDestroyed(); } - this.form.items.filterBy(isDestroyed, this.form).each(this.form.remove, this.form); } }, @@ -61232,7 +67275,7 @@ Ext.form.FieldSet = Ext.extend(Ext.Panel, { * If true is specified, the default DomHelper config object used to create the element * is:

              
                    * {tag: 'input', type: 'checkbox', name: this.checkboxName || this.id+'-checkbox'}
              -     * 
              + *
              */ /** * @cfg {String} checkboxName The name to assign to the fieldset's checkbox if {@link #checkboxToggle} = true @@ -61248,7 +67291,7 @@ Ext.form.FieldSet = Ext.extend(Ext.Panel, { * @cfg {Number} labelWidth The width of labels. This property cascades to child containers. */ /** - * @cfg {String} itemCls A css class to apply to the x-form-item of fields (see + * @cfg {String} itemCls A css class to apply to the x-form-item of fields (see * {@link Ext.layout.FormLayout}.{@link Ext.layout.FormLayout#fieldTpl fieldTpl} for details). * This property cascades to child containers. */ @@ -61452,8 +67495,7 @@ Ext.form.FieldSet = Ext.extend(Ext.Panel, { * @hide */ }); -Ext.reg('fieldset', Ext.form.FieldSet); -/** +Ext.reg('fieldset', Ext.form.FieldSet);/** * @class Ext.form.HtmlEditor * @extends Ext.form.Field * Provides a lightweight HTML Editor component. Some toolbar features are not supported by Safari and will be @@ -61622,7 +67664,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { * @param {Boolean} sourceEdit True if source edit, false if standard editing. */ 'editmodechange' - ) + ); + Ext.form.HtmlEditor.superclass.initComponent.call(this); }, // private @@ -61804,13 +67847,13 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { }, this); } - // stop form submits this.mon(tb.el, 'click', function(e){ e.preventDefault(); }); this.tb = tb; + this.tb.doLayout(); }, onDisable: function(){ @@ -61827,7 +67870,11 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { Ext.form.HtmlEditor.superclass.setReadOnly.call(this, readOnly); if(this.initialized){ - this.setDesignMode(!readOnly); + if(Ext.isIE){ + this.getEditorBody().contentEditable = !readOnly; + }else{ + this.setDesignMode(!readOnly); + } var bd = this.getEditorBody(); if(bd){ bd.style.cursor = this.readOnly ? 'default' : 'text'; @@ -61844,7 +67891,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { * Note: IE8-Standards has unwanted scroller behavior, so the default meta tag forces IE7 compatibility */ getDocMarkup : function(){ - return ''; + var h = Ext.fly(this.iframe).getHeight() - this.iframePad * 2; + return String.format('', this.iframePad, h); }, // private @@ -61870,7 +67918,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { this.el.dom.setAttribute('tabIndex', -1); this.el.addClass('x-hidden'); if(Ext.isIE){ // fix IE 1px bogus margin - this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;') + this.el.applyStyles('margin-top:-1px;margin-bottom:-1px;'); } this.wrap = this.el.wrap({ cls:'x-html-editor-wrap', cn:{cls:'x-html-editor-tb'} @@ -61896,6 +67944,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { iframe.name = Ext.id(); iframe.frameBorder = '0'; iframe.style.overflow = 'auto'; + iframe.src = Ext.SSL_SECURE_URL; this.wrap.dom.appendChild(iframe); this.iframe = iframe; @@ -61949,8 +67998,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { * set current design mode. To enable, mode can be true or 'on', off otherwise */ setDesignMode : function(mode){ - var doc ; - if(doc = this.getDoc()){ + var doc = this.getDoc(); + if (doc) { if(this.readOnly){ mode = false; } @@ -62005,27 +68054,38 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { * @param {Boolean} sourceEdit (optional) True for source edit, false for standard */ toggleSourceEdit : function(sourceEditMode){ - if(sourceEditMode === undefined){ + var iframeHeight, + elHeight; + + if (sourceEditMode === undefined) { sourceEditMode = !this.sourceEditMode; } this.sourceEditMode = sourceEditMode === true; var btn = this.tb.getComponent('sourceedit'); - if(btn.pressed !== this.sourceEditMode){ + if (btn.pressed !== this.sourceEditMode) { btn.toggle(this.sourceEditMode); - if(!btn.xtbHidden){ + if (!btn.xtbHidden) { return; } } - if(this.sourceEditMode){ + if (this.sourceEditMode) { + // grab the height of the containing panel before we hide the iframe + this.previousSize = this.getSize(); + + iframeHeight = Ext.get(this.iframe).getHeight(); + this.disableItems(true); this.syncValue(); this.iframe.className = 'x-hidden'; this.el.removeClass('x-hidden'); this.el.dom.removeAttribute('tabIndex'); this.el.focus(); - }else{ - if(this.initialized){ + this.el.dom.style.height = iframeHeight + 'px'; + } + else { + elHeight = parseInt(this.el.dom.style.height, 10); + if (this.initialized) { this.disableItems(this.readOnly); } this.pushValue(); @@ -62033,17 +68093,16 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { 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.setSize(this.previousSize); + delete this.previousSize; + this.iframe.style.height = elHeight + 'px'; } this.fireEvent('editmodechange', this, this.sourceEditMode); }, // private used internally - createLink : function(){ + createLink : function() { var url = prompt(this.createLinkText, this.defaultLinkValue); if(url && url != 'http:/'+'/'){ this.relayCmd('createlink', url); @@ -62141,9 +68200,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { if(Ext.isGecko){ // Gecko hack, see: https://bugzilla.mozilla.org/show_bug.cgi?id=232791#c8 this.setDesignMode(false); //toggle off first - + this.setDesignMode(true); } - this.setDesignMode(true); this.fireEvent('push', this, v); } @@ -62169,7 +68227,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { //Destroying the component during/before initEditor can cause issues. try{ var dbody = this.getEditorBody(), - ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat'), + ss = this.el.getStyles('font-size', 'font-family', 'background-image', 'background-repeat', 'background-color', 'color'), doc, fn; @@ -62216,7 +68274,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { }, // private - onDestroy : function(){ + beforeDestroy : function(){ if(this.monitorTask){ Ext.TaskMgr.stop(this.monitorTask); } @@ -62236,12 +68294,7 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { this.wrap.remove(); } } - - if(this.el){ - this.el.removeAllListeners(); - this.el.remove(); - } - this.purgeListeners(); + Ext.form.HtmlEditor.superclass.beforeDestroy.call(this); }, // private @@ -62698,7 +68751,8 @@ Ext.form.HtmlEditor = Ext.extend(Ext.form.Field, { * @hide */ }); -Ext.reg('htmleditor', Ext.form.HtmlEditor);/** +Ext.reg('htmleditor', Ext.form.HtmlEditor); +/** * @class Ext.form.TimeField * @extends Ext.form.ComboBox * Provides a time input field with a time dropdown and automatic time validation. Example usage: @@ -62717,13 +68771,13 @@ new Ext.form.TimeField({ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { /** * @cfg {Date/String} minValue - * The minimum allowed time. Can be either a Javascript date object with a valid time value or a string + * The minimum allowed time. Can be either a Javascript date object with a valid time value or a string * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to undefined). */ minValue : undefined, /** * @cfg {Date/String} maxValue - * The maximum allowed time. Can be either a Javascript date object with a valid time value or a string + * The maximum allowed time. Can be either a Javascript date object with a valid time value or a string * time in a valid format -- see {@link #format} and {@link #altFormats} (defaults to undefined). */ maxValue : undefined, @@ -62755,9 +68809,9 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { /** * @cfg {String} altFormats * Multiple date formats separated by "|" to try when parsing a user input value and it doesn't match the defined - * format (defaults to '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'). + * format (defaults to 'g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A'). */ - 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", + altFormats : "g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H|gi a|hi a|giA|hiA|gi A|hi A", /** * @cfg {Number} increment * The number of minutes between each time value in the list (defaults to 15). @@ -62770,12 +68824,14 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { triggerAction: 'all', // private override typeAhead: false, - + // private - This is the date to use when generating time values in the absence of either minValue - // or maxValue. Using the current date causes DST issues on DST boundary dates, so this is an + // or maxValue. Using the current date causes DST issues on DST boundary dates, so this is an // arbitrary "safe" date that can be any date aside from DST boundary dates. initDate: '1/1/2008', + initDateFormat: 'j/n/Y', + // private initComponent : function(){ if(Ext.isDefined(this.minValue)){ @@ -62789,7 +68845,7 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { } Ext.form.TimeField.superclass.initComponent.call(this); }, - + /** * Replaces any existing {@link #minValue} with the new time and refreshes the store. * @param {Date/String} value The minimum time that can be selected @@ -62807,13 +68863,13 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { this.setLimit(value, false, initial); return this; }, - + // private generateStore: function(initial){ var min = this.minValue || new Date(this.initDate).clearTime(), max = this.maxValue || new Date(this.initDate).clearTime().add('mi', (24 * 60) - 1), times = []; - + while(min <= max){ times.push(min.dateFormat(this.format)); min = min.add('mi', this.increment); @@ -62831,14 +68887,14 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { } if(d){ var val = new Date(this.initDate).clearTime(); - val.setHours(d.getHours(), d.getMinutes(), isMin ? 0 : 59, 0); + val.setHours(d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()); this[isMin ? 'minValue' : 'maxValue'] = val; if(!initial){ this.generateStore(); } } }, - + // inherited docs getValue : function(){ var v = Ext.form.TimeField.superclass.getValue.call(this); @@ -62852,33 +68908,208 @@ Ext.form.TimeField = Ext.extend(Ext.form.ComboBox, { // private overrides validateValue : Ext.form.DateField.prototype.validateValue, - parseDate : Ext.form.DateField.prototype.parseDate, + formatDate : Ext.form.DateField.prototype.formatDate, - // private - beforeBlur : function(){ - var v = this.parseDate(this.getRawValue()); - if(v){ - this.setValue(v.dateFormat(this.format)); + parseDate: function(value) { + if (!value || Ext.isDate(value)) { + return value; } - Ext.form.TimeField.superclass.beforeBlur.call(this); - } - /** - * @cfg {Boolean} grow @hide - */ - /** - * @cfg {Number} growMin @hide - */ - /** - * @cfg {Number} growMax @hide - */ - /** - * @hide - * @method autoSize - */ + var id = this.initDate + ' ', + idf = this.initDateFormat + ' ', + v = Date.parseDate(id + value, idf + this.format), // *** handle DST. note: this.format is a TIME-only format + af = this.altFormats; + + if (!v && af) { + if (!this.altFormatsArray) { + this.altFormatsArray = af.split("|"); + } + for (var i = 0, afa = this.altFormatsArray, len = afa.length; i < len && !v; i++) { + v = Date.parseDate(id + value, idf + afa[i]); + } + } + + return v; + } }); Ext.reg('timefield', Ext.form.TimeField);/** + * @class Ext.form.SliderField + * @extends Ext.form.Field + * Wraps a {@link Ext.slider.MultiSlider Slider} so it can be used as a form field. + * @constructor + * Creates a new SliderField + * @param {Object} config Configuration options. Note that you can pass in any slider configuration options, as well as + * as any field configuration options. + * @xtype sliderfield + */ +Ext.form.SliderField = Ext.extend(Ext.form.Field, { + + /** + * @cfg {Boolean} useTips + * True to use an Ext.slider.Tip to display tips for the value. Defaults to true. + */ + useTips : true, + + /** + * @cfg {Function} tipText + * A function used to display custom text for the slider tip. Defaults to null, which will + * use the default on the plugin. + */ + tipText : null, + + // private override + actionMode: 'wrap', + + /** + * Initialize the component. + * @private + */ + initComponent : function() { + var cfg = Ext.copyTo({ + id: this.id + '-slider' + }, this.initialConfig, ['vertical', 'minValue', 'maxValue', 'decimalPrecision', 'keyIncrement', 'increment', 'clickToChange', 'animate']); + + // only can use it if it exists. + if (this.useTips) { + var plug = this.tipText ? {getText: this.tipText} : {}; + cfg.plugins = [new Ext.slider.Tip(plug)]; + } + this.slider = new Ext.Slider(cfg); + Ext.form.SliderField.superclass.initComponent.call(this); + }, + + /** + * Set up the hidden field + * @param {Object} ct The container to render to. + * @param {Object} position The position in the container to render to. + * @private + */ + onRender : function(ct, position){ + this.autoCreate = { + id: this.id, + name: this.name, + type: 'hidden', + tag: 'input' + }; + Ext.form.SliderField.superclass.onRender.call(this, ct, position); + this.wrap = this.el.wrap({cls: 'x-form-field-wrap'}); + this.resizeEl = this.positionEl = this.wrap; + this.slider.render(this.wrap); + }, + + /** + * Ensure that the slider size is set automatically when the field resizes. + * @param {Object} w The width + * @param {Object} h The height + * @param {Object} aw The adjusted width + * @param {Object} ah The adjusted height + * @private + */ + onResize : function(w, h, aw, ah){ + Ext.form.SliderField.superclass.onResize.call(this, w, h, aw, ah); + this.slider.setSize(w, h); + }, + + /** + * Initialize any events for this class. + * @private + */ + initEvents : function(){ + Ext.form.SliderField.superclass.initEvents.call(this); + this.slider.on('change', this.onChange, this); + }, + + /** + * Utility method to set the value of the field when the slider changes. + * @param {Object} slider The slider object. + * @param {Object} v The new value. + * @private + */ + onChange : function(slider, v){ + this.setValue(v, undefined, true); + }, + + /** + * Enable the slider when the field is enabled. + * @private + */ + onEnable : function(){ + Ext.form.SliderField.superclass.onEnable.call(this); + this.slider.enable(); + }, + + /** + * Disable the slider when the field is disabled. + * @private + */ + onDisable : function(){ + Ext.form.SliderField.superclass.onDisable.call(this); + this.slider.disable(); + }, + + /** + * Ensure the slider is destroyed when the field is destroyed. + * @private + */ + beforeDestroy : function(){ + Ext.destroy(this.slider); + Ext.form.SliderField.superclass.beforeDestroy.call(this); + }, + + /** + * If a side icon is shown, do alignment to the slider + * @private + */ + alignErrorIcon : function(){ + this.errorIcon.alignTo(this.slider.el, 'tl-tr', [2, 0]); + }, + + /** + * Sets the minimum field value. + * @param {Number} v The new minimum value. + * @return {Ext.form.SliderField} this + */ + setMinValue : function(v){ + this.slider.setMinValue(v); + return this; + }, + + /** + * Sets the maximum field value. + * @param {Number} v The new maximum value. + * @return {Ext.form.SliderField} this + */ + setMaxValue : function(v){ + this.slider.setMaxValue(v); + return this; + }, + + /** + * Sets the value for this field. + * @param {Number} v The new value. + * @param {Boolean} animate (optional) Whether to animate the transition. If not specified, it will default to the animate config. + * @return {Ext.form.SliderField} this + */ + setValue : function(v, animate, /* private */ silent){ + // silent is used if the setValue method is invoked by the slider + // which means we don't need to set the value on the slider. + if(!silent){ + this.slider.setValue(v, animate); + } + return Ext.form.SliderField.superclass.setValue.call(this, this.slider.getValue()); + }, + + /** + * Gets the current value for this field. + * @return {Number} The current value. + */ + getValue : function(){ + return this.slider.getValue(); + } +}); + +Ext.reg('sliderfield', Ext.form.SliderField);/** * @class Ext.form.Label * @extends Ext.BoxComponent * Basic Label field. @@ -63044,6 +69275,11 @@ Ext.form.Action.prototype = { * during the time the action is being processed. */ +/** + * @cfg {Boolean} submitEmptyText If set to true, the emptyText value will be sent with the form + * when it is submitted. Defaults to true. + */ + /** * The type of action this Action instance performs. * Currently only "submit" and "load" are supported. @@ -63138,6 +69374,14 @@ buttons: [{ return this.result; }, + decodeResponse: function(response) { + try { + return Ext.decode(response.responseText); + } catch(e) { + return false; + } + }, + // utility functions used internally getUrl : function(appendParams){ var url = this.options.url || this.form.url || this.form.el.dom.action; @@ -63262,10 +69506,25 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { // private run : function(){ - var o = this.options; - var method = this.getMethod(); - var isGet = method == 'GET'; + var o = this.options, + method = this.getMethod(), + isGet = method == 'GET'; if(o.clientValidation === false || this.form.isValid()){ + if (o.submitEmptyText === false) { + var fields = this.form.items, + emptyFields = [], + setupEmptyFields = function(f){ + if (f.el.getValue() == f.emptyText) { + emptyFields.push(f); + f.el.dom.value = ""; + } + if(f.isComposite && f.rendered){ + f.items.each(setupEmptyFields); + } + }; + + fields.each(setupEmptyFields); + } Ext.Ajax.request(Ext.apply(this.createCallback(o), { form:this.form.el.dom, url:this.getUrl(isGet), @@ -63274,6 +69533,13 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { params:!isGet ? this.getParams() : null, isUpload: this.form.fileUpload })); + if (o.submitEmptyText === false) { + Ext.each(emptyFields, function(f) { + if (f.applyEmptyText) { + f.applyEmptyText(); + } + }); + } }else if (o.clientValidation !== false){ // client validation failed this.failureType = Ext.form.Action.CLIENT_INVALID; this.form.afterAction(this, false); @@ -63313,7 +69579,7 @@ Ext.extend(Ext.form.Action.Submit, Ext.form.Action, { errors : errors }; } - return Ext.decode(response.responseText); + return this.decodeResponse(response); } }); @@ -63419,7 +69685,7 @@ Ext.extend(Ext.form.Action.Load, Ext.form.Action, { data : data }; } - return Ext.decode(response.responseText); + return this.decodeResponse(response); } }); @@ -63533,7 +69799,7 @@ Ext.form.Action.DirectLoad = Ext.extend(Ext.form.Action.Load, { this.result = result; return result; }, - + success : function(response, trans){ if(trans.type == Ext.Direct.exceptions.SERVER){ response = {}; @@ -63665,7 +69931,7 @@ Ext.form.Action.DirectSubmit = Ext.extend(Ext.form.Action.Submit, { this.result = result; return result; }, - + success : function(response, trans){ if(trans.type == Ext.Direct.exceptions.SERVER){ response = {}; @@ -63701,7 +69967,7 @@ Ext.apply(Ext.form.VTypes, { timeMask: /[\d\s:amp]/i }); * - * Another example: + * Another example: *
              
               // custom Vtype for vtype:'IPAddress'
               Ext.apply(Ext.form.VTypes, {
              @@ -63718,7 +69984,7 @@ Ext.form.VTypes = function(){
                   // closure these in so they are only created once.
                   var alpha = /^[a-zA-Z_]+$/,
                       alphanum = /^[a-zA-Z0-9_]+$/,
              -        email = /^(\w+)([\-+.][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,
              +        email = /^(\w+)([\-+.\'][\w]+)*@(\w[\-\w]*\.){1,5}([A-Za-z]){2,6}$/,
                       url = /(((^https?)|(^ftp)):\/\/([\-\w]+\.)+\w{2,3}(\/[%\-\w]+(\.\w{2,})?)*(([\w\-\.\?\\\/+@&#;`~=%!]*)(\.\w{2,})?)*\/?)/i;
               
                   // All these messages and functions are configurable
              @@ -63727,7 +69993,7 @@ Ext.form.VTypes = function(){
                        * The function used to validate email addresses.  Note that this is a very basic validation -- complete
                        * validation per the email RFC specifications is very complex and beyond the scope of this class, although
                        * this function can be overridden if a more comprehensive validation scheme is desired.  See the validation
              -         * section of the Wikipedia article on email addresses 
              +         * section of the Wikipedia article on email addresses
                        * for additional information.  This implementation is intended to validate the following emails:
                        * 'barney@example.de', 'barney.rubble@example.com', 'barney-rubble@example.coop', 'barney+rubble@example.com'
                        * .
              @@ -63744,12 +70010,12 @@ Ext.form.VTypes = function(){
                        */
                       'emailText' : 'This field should be an e-mail address in the format "user@example.com"',
                       /**
              -         * The keystroke filter mask to be applied on email input.  See the {@link #email} method for 
              +         * The keystroke filter mask to be applied on email input.  See the {@link #email} method for
                        * information about more complex email validation. Defaults to:
              -         * /[a-z0-9_\.\-@]/i
              +         * /[a-z0-9_\.\-\+\'@]/i
                        * @type RegExp
                        */
              -        'emailMask' : /[a-z0-9_\.\-@]/i,
              +        'emailMask' : /[a-z0-9_\.\-\+\'@]/i,
               
                       /**
                        * The function used to validate URLs
              @@ -63765,7 +70031,7 @@ Ext.form.VTypes = function(){
                        * @type String
                        */
                       'urlText' : 'This field should be a URL in the format "http:/'+'/www.example.com"',
              -        
              +
                       /**
                        * The function used to validate alpha values
                        * @param {String} value The value
              @@ -63808,7 +70074,8 @@ Ext.form.VTypes = function(){
                        */
                       'alphanumMask' : /[a-z0-9_]/i
                   };
              -}();/**
              +}();
              +/**
                * @class Ext.grid.GridPanel
                * @extends Ext.Panel
                * 

              This class represents the primary interface of a component based grid control to represent data @@ -63818,9 +70085,9 @@ Ext.form.VTypes = function(){ *

              *
            • {@link Ext.grid.ColumnModel Column model} : Column makeup *
            • - *
            • {@link Ext.grid.GridView View} : Encapsulates the user interface + *
            • {@link Ext.grid.GridView View} : Encapsulates the user interface *
            • - *
            • {@link Ext.grid.AbstractSelectionModel selection model} : Selection behavior + *
            • {@link Ext.grid.AbstractSelectionModel selection model} : Selection behavior *
            • *
            *

            Example usage:

            @@ -63846,7 +70113,7 @@ var grid = new Ext.grid.GridPanel({ header: 'Last Updated', width: 135, dataIndex: 'lastChange', xtype: 'datecolumn', format: 'M d, Y' } - ], + ] }), {@link #viewConfig}: { {@link Ext.grid.GridView#forceFit forceFit}: true, @@ -63901,21 +70168,25 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { *

            See {@link #autoExpandMax} and {@link #autoExpandMin} also.

            */ autoExpandColumn : false, + /** * @cfg {Number} autoExpandMax The maximum width the {@link #autoExpandColumn} * can have (if enabled). Defaults to 1000. */ autoExpandMax : 1000, + /** * @cfg {Number} autoExpandMin The minimum width the {@link #autoExpandColumn} * can have (if enabled). Defaults to 50. */ autoExpandMin : 50, + /** * @cfg {Boolean} columnLines true to add css for column separation lines. * Default is false. */ columnLines : false, + /** * @cfg {Object} cm Shorthand for {@link #colModel}. */ @@ -63939,12 +70210,14 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * {0} is replaced with the number of selected rows. */ ddText : '{0} selected row{1}', + /** * @cfg {Boolean} deferRowRender

            Defaults to true to enable deferred row rendering.

            *

            This allows the GridPanel to be initially rendered empty, with the expensive update of the row * structure deferred so that layouts with GridPanels appear more quickly.

            */ deferRowRender : true, + /** * @cfg {Boolean} disableSelection

            true to disable selections in the grid. Defaults to false.

            *

            Ignored if a {@link #selModel SelectionModel} is specified.

            @@ -63958,11 +70231,13 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * with the {@link #enableHdMenu header menu}. */ enableColumnHide : true, + /** * @cfg {Boolean} enableColumnMove Defaults to true to enable drag and drop reorder of columns. false * to turn off column reordering via drag drop. */ enableColumnMove : true, + /** * @cfg {Boolean} enableDragDrop

            Enables dragging of the selected rows of the GridPanel. Defaults to false.

            *

            Setting this to true causes this GridPanel's {@link #getView GridView} to @@ -63975,10 +70250,12 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * to process the {@link Ext.grid.GridDragZone#getDragData data} which is provided.

            */ enableDragDrop : false, + /** * @cfg {Boolean} enableHdMenu Defaults to true to enable the drop down button for menu in the headers. */ enableHdMenu : true, + /** * @cfg {Boolean} hideHeaders True to hide the grid's header. Defaults to false. */ @@ -63987,6 +70264,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * loading. Defaults to false. */ loadMask : false, + /** * @cfg {Number} maxHeight Sets the maximum height of the grid - ignored if autoHeight is not on. */ @@ -63994,6 +70272,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * @cfg {Number} minColumnWidth The minimum width a column can be resized to. Defaults to 25. */ minColumnWidth : 25, + /** * @cfg {Object} sm Shorthand for {@link #selModel}. */ @@ -64012,11 +70291,13 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * modifier, or which uses a CSS selector of higher specificity.

            */ stripeRows : false, + /** * @cfg {Boolean} trackMouseOver True to highlight rows when the mouse is over. Default is true * for GridPanel, but false for EditorGridPanel. */ trackMouseOver : true, + /** * @cfg {Array} stateEvents * An array of events that, when fired, should trigger this component to save its state. @@ -64029,20 +70310,21 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * Component state.

            */ stateEvents : ['columnmove', 'columnresize', 'sortchange', 'groupchange'], + /** * @cfg {Object} view The {@link Ext.grid.GridView} used by the grid. This can be set * before a call to {@link Ext.Component#render render()}. */ view : null, - + /** * @cfg {Array} bubbleEvents *

            An array of events that, when fired, should be bubbled to any parent container. - * See {@link Ext.util.Observable#enableBubble}. + * See {@link Ext.util.Observable#enableBubble}. * Defaults to []. */ bubbleEvents: [], - + /** * @cfg {Object} viewConfig A config object that will be applied to the grid's UI view. Any of * the config options available for {@link Ext.grid.GridView} can be specified here. This option @@ -64051,14 +70333,15 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { // private rendered : false, + // private viewReady : false, // private - initComponent : function(){ + initComponent : function() { Ext.grid.GridPanel.superclass.initComponent.call(this); - if(this.columnLines){ + if (this.columnLines) { this.cls = (this.cls || '') + ' x-grid-with-col-lines'; } // override any provided value since it isn't valid @@ -64169,7 +70452,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * @param {Ext.EventObject} e */ 'headermousedown', - + /** * @event groupmousedown * Fires before a group header is clicked. Only applies for grids with a {@link Ext.grid.GroupingView GroupingView}. @@ -64179,7 +70462,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * @param {Ext.EventObject} e */ 'groupmousedown', - + /** * @event rowbodymousedown * Fires before the row body is clicked. Only applies for grids with {@link Ext.grid.GridView#enableRowBody enableRowBody} configured. @@ -64188,7 +70471,7 @@ Ext.grid.GridPanel = Ext.extend(Ext.Panel, { * @param {Ext.EventObject} e */ 'rowbodymousedown', - + /** * @event containermousedown * Fires before the container is clicked. The container consists of any part of the grid body that is not covered by a row. @@ -64289,7 +70572,7 @@ function(grid, rowIndex, columnIndex, e) { * @param {Ext.EventObject} e */ 'containerdblclick', - + /** * @event rowbodyclick * Fires when the row body is clicked. Only applies for grids with {@link Ext.grid.GridView#enableRowBody enableRowBody} configured. @@ -64306,7 +70589,7 @@ function(grid, rowIndex, columnIndex, e) { * @param {Ext.EventObject} e */ 'rowbodydblclick', - + /** * @event rowcontextmenu * Fires when a row is right clicked @@ -64401,7 +70684,7 @@ function(grid, rowIndex, columnIndex, e) { 'reconfigure', /** * @event viewready - * Fires when the grid view is available (use this for selecting a default row). + * Fires when the grid view is available (use this for selecting a default row). * @param {Grid} this */ 'viewready' @@ -64453,18 +70736,21 @@ function(grid, rowIndex, columnIndex, e) { store = this.store, s, c, - oldIndex; - + colIndex; + if(cs){ for(var i = 0, len = cs.length; i < len; i++){ s = cs[i]; c = cm.getColumnById(s.id); if(c){ - c.hidden = s.hidden; - c.width = s.width; - oldIndex = cm.getIndexById(s.id); - if(oldIndex != i){ - cm.moveColumn(oldIndex, i); + colIndex = cm.getIndexById(s.id); + cm.setState(colIndex, { + hidden: s.hidden, + width: s.width, + sortable: s.sortable + }); + if(colIndex != i){ + cm.moveColumn(colIndex, i); } } } @@ -64495,7 +70781,7 @@ function(grid, rowIndex, columnIndex, e) { store = this.store, ss, gs; - + for(var i = 0, c; (c = this.colModel.config[i]); i++){ o.columns[i] = { id: c.id, @@ -64504,6 +70790,9 @@ function(grid, rowIndex, columnIndex, e) { if(c.hidden){ o.columns[i].hidden = true; } + if(c.sortable){ + o.columns[i].sortable = true; + } } if(store){ ss = store.getSortState(); @@ -64525,9 +70814,12 @@ function(grid, rowIndex, columnIndex, e) { Ext.grid.GridPanel.superclass.afterRender.call(this); var v = this.view; this.on('bodyresize', v.layout, v); - v.layout(); + v.layout(true); if(this.deferRowRender){ - v.afterRender.defer(10, this.view); + if (!this.deferRowRenderTask){ + this.deferRowRenderTask = new Ext.util.DelayedTask(v.afterRender, this.view); + } + this.deferRowRenderTask.delay(10); }else{ v.afterRender(); } @@ -64568,6 +70860,9 @@ function(grid, rowIndex, columnIndex, e) { // private onDestroy : function(){ + if (this.deferRowRenderTask && this.deferRowRenderTask.cancel){ + this.deferRowRenderTask.cancel(); + } if(this.rendered){ Ext.destroy(this.view, this.loadMask); }else if(this.store && this.store.autoDestroy){ @@ -64580,31 +70875,6 @@ function(grid, rowIndex, columnIndex, e) { // private processEvent : function(name, e){ - this.fireEvent(name, e); - var t = e.getTarget(), - v = this.view, - header = v.findHeaderIndex(t); - - if(header !== false){ - this.fireEvent('header' + name, this, header, e); - }else{ - var row = v.findRowIndex(t), - cell, - body; - if(row !== false){ - this.fireEvent('row' + name, this, row, e); - cell = v.findCellIndex(t); - body = v.findRowBody(t); - if(cell !== false){ - this.fireEvent('cell' + name, this, row, cell, e); - } - if(body){ - this.fireEvent('rowbody' + name, this, row, e); - } - }else{ - this.fireEvent('container' + name, this, e); - } - } this.view.processEvent(name, e); }, @@ -64630,11 +70900,12 @@ function(grid, rowIndex, columnIndex, e) { // private walkCells : function(row, col, step, fn, scope){ - var cm = this.colModel, - clen = cm.getColumnCount(), - ds = this.store, - rlen = ds.getCount(), + var cm = this.colModel, + clen = cm.getColumnCount(), + ds = this.store, + rlen = ds.getCount(), first = true; + if(step < 0){ if(col < 0){ row--; @@ -64675,14 +70946,6 @@ function(grid, rowIndex, columnIndex, e) { return null; }, - // private - onResize : function(){ - Ext.grid.GridPanel.superclass.onResize.apply(this, arguments); - if(this.viewReady){ - this.view.layout(); - } - }, - /** * Returns the grid's underlying element. * @return {Element} The element @@ -64728,10 +70991,11 @@ function(grid, rowIndex, columnIndex, e) { * Returns the grid's GridView object. * @return {Ext.grid.GridView} The grid view */ - getView : function(){ - if(!this.view){ + getView : function() { + if (!this.view) { this.view = new Ext.grid.GridView(this.viewConfig); } + return this.view; }, /** @@ -64743,129 +71007,129 @@ function(grid, rowIndex, columnIndex, e) { return String.format(this.ddText, count, count == 1 ? '' : 's'); } - /** - * @cfg {String/Number} activeItem - * @hide + /** + * @cfg {String/Number} activeItem + * @hide */ - /** - * @cfg {Boolean} autoDestroy - * @hide + /** + * @cfg {Boolean} autoDestroy + * @hide */ - /** - * @cfg {Object/String/Function} autoLoad - * @hide + /** + * @cfg {Object/String/Function} autoLoad + * @hide */ - /** - * @cfg {Boolean} autoWidth - * @hide + /** + * @cfg {Boolean} autoWidth + * @hide */ - /** - * @cfg {Boolean/Number} bufferResize - * @hide + /** + * @cfg {Boolean/Number} bufferResize + * @hide */ - /** - * @cfg {String} defaultType - * @hide + /** + * @cfg {String} defaultType + * @hide */ - /** - * @cfg {Object} defaults - * @hide + /** + * @cfg {Object} defaults + * @hide */ - /** - * @cfg {Boolean} hideBorders - * @hide + /** + * @cfg {Boolean} hideBorders + * @hide */ - /** - * @cfg {Mixed} items - * @hide + /** + * @cfg {Mixed} items + * @hide */ - /** - * @cfg {String} layout - * @hide + /** + * @cfg {String} layout + * @hide */ - /** - * @cfg {Object} layoutConfig - * @hide + /** + * @cfg {Object} layoutConfig + * @hide */ - /** - * @cfg {Boolean} monitorResize - * @hide + /** + * @cfg {Boolean} monitorResize + * @hide */ - /** - * @property items - * @hide + /** + * @property items + * @hide */ - /** - * @method add - * @hide + /** + * @method add + * @hide */ - /** - * @method cascade - * @hide + /** + * @method cascade + * @hide */ - /** - * @method doLayout - * @hide + /** + * @method doLayout + * @hide */ - /** - * @method find - * @hide + /** + * @method find + * @hide */ - /** - * @method findBy - * @hide + /** + * @method findBy + * @hide */ - /** - * @method findById - * @hide + /** + * @method findById + * @hide */ - /** - * @method findByType - * @hide + /** + * @method findByType + * @hide */ - /** - * @method getComponent - * @hide + /** + * @method getComponent + * @hide */ - /** - * @method getLayout - * @hide + /** + * @method getLayout + * @hide */ - /** - * @method getUpdater - * @hide + /** + * @method getUpdater + * @hide */ - /** - * @method insert - * @hide + /** + * @method insert + * @hide */ - /** - * @method load - * @hide + /** + * @method load + * @hide */ - /** - * @method remove - * @hide + /** + * @method remove + * @hide */ - /** - * @event add - * @hide + /** + * @event add + * @hide */ - /** - * @event afterlayout - * @hide + /** + * @event afterlayout + * @hide */ - /** - * @event beforeadd - * @hide + /** + * @event beforeadd + * @hide */ - /** - * @event beforeremove - * @hide + /** + * @event beforeremove + * @hide */ - /** - * @event remove - * @hide + /** + * @event remove + * @hide */ @@ -64926,6 +71190,388 @@ function(grid, rowIndex, columnIndex, e) { */ }); Ext.reg('grid', Ext.grid.GridPanel);/** + * @class Ext.grid.PivotGrid + * @extends Ext.grid.GridPanel + *

            The PivotGrid component enables rapid summarization of large data sets. It provides a way to reduce a large set of + * data down into a format where trends and insights become more apparent. A classic example is in sales data; a company + * will often have a record of all sales it makes for a given period - this will often encompass thousands of rows of + * data. The PivotGrid allows you to see how well each salesperson performed, which cities generate the most revenue, + * how products perform between cities and so on.

            + *

            A PivotGrid is composed of two axes (left and top), one {@link #measure} and one {@link #aggregator aggregation} + * function. Each axis can contain one or more {@link #dimension}, which are ordered into a hierarchy. Dimensions on the + * left axis can also specify a width. Each dimension in each axis can specify its sort ordering, defaulting to "ASC", + * and must specify one of the fields in the {@link Ext.data.Record Record} used by the PivotGrid's + * {@link Ext.data.Store Store}.

            +
            
            +// This is the record representing a single sale
            +var SaleRecord = Ext.data.Record.create([
            +    {name: 'person',   type: 'string'},
            +    {name: 'product',  type: 'string'},
            +    {name: 'city',     type: 'string'},
            +    {name: 'state',    type: 'string'},
            +    {name: 'year',     type: 'int'},
            +    {name: 'value',    type: 'int'}
            +]);
            +
            +// A simple store that loads SaleRecord data from a url
            +var myStore = new Ext.data.Store({
            +    url: 'data.json',
            +    autoLoad: true,
            +    reader: new Ext.data.JsonReader({
            +        root: 'rows',
            +        idProperty: 'id'
            +    }, SaleRecord)
            +});
            +
            +// Create the PivotGrid itself, referencing the store
            +var pivot = new Ext.grid.PivotGrid({
            +    store     : myStore,
            +    aggregator: 'sum',
            +    measure   : 'value',
            +
            +    leftAxis: [
            +        {
            +            width: 60,
            +            dataIndex: 'product'
            +        },
            +        {
            +            width: 120,
            +            dataIndex: 'person',
            +            direction: 'DESC'
            +        }
            +    ],
            +
            +    topAxis: [
            +        {
            +            dataIndex: 'year'
            +        }
            +    ]
            +});
            +
            + *

            The specified {@link #measure} is the field from SaleRecord that is extracted from each combination + * of product and person (on the left axis) and year on the top axis. There may be several SaleRecords in the + * data set that share this combination, so an array of measure fields is produced. This array is then + * aggregated using the {@link #aggregator} function.

            + *

            The default aggregator function is sum, which simply adds up all of the extracted measure values. Other + * built-in aggregator functions are count, avg, min and max. In addition, you can specify your own function. + * In this example we show the code used to sum the measures, but you can return any value you like. See + * {@link #aggregator} for more details.

            +
            
            +new Ext.grid.PivotGrid({
            +    aggregator: function(records, measure) {
            +        var length = records.length,
            +            total  = 0,
            +            i;
            +
            +        for (i = 0; i < length; i++) {
            +            total += records[i].get(measure);
            +        }
            +
            +        return total;
            +    },
            +
            +    renderer: function(value) {
            +        return Math.round(value);
            +    },
            +
            +    //your normal config here
            +});
            +
            + *

            Renderers

            + *

            PivotGrid optionally accepts a {@link #renderer} function which can modify the data in each cell before it + * is rendered. The renderer is passed the value that would usually be placed in the cell and is expected to return + * the new value. For example let's imagine we had height data expressed as a decimal - here's how we might use a + * renderer to display the data in feet and inches notation:

            +
            
            +new Ext.grid.PivotGrid({
            +    //in each case the value is a decimal number of feet
            +    renderer  : function(value) {
            +        var feet   = Math.floor(value),
            +            inches = Math.round((value - feet) * 12);
            +
            +        return String.format("{0}' {1}\"", feet, inches);
            +    },
            +    //normal config here
            +});
            +
            + *

            Reconfiguring

            + *

            All aspects PivotGrid's configuration can be updated at runtime. It is easy to change the {@link #setMeasure measure}, + * {@link #setAggregator aggregation function}, {@link #setLeftAxis left} and {@link #setTopAxis top} axes and refresh the grid.

            + *

            In this case we reconfigure the PivotGrid to have city and year as the top axis dimensions, rendering the average sale + * value into the cells:

            +
            
            +//the left axis can also be changed
            +pivot.topAxis.setDimensions([
            +    {dataIndex: 'city', direction: 'DESC'},
            +    {dataIndex: 'year', direction: 'ASC'}
            +]);
            +
            +pivot.setMeasure('value');
            +pivot.setAggregator('avg');
            +
            +pivot.view.refresh(true);
            +
            + *

            See the {@link Ext.grid.PivotAxis PivotAxis} documentation for further detail on reconfiguring axes.

            + */ +Ext.grid.PivotGrid = Ext.extend(Ext.grid.GridPanel, { + + /** + * @cfg {String|Function} aggregator The aggregation function to use to combine the measures extracted + * for each dimension combination. Can be any of the built-in aggregators (sum, count, avg, min, max). + * Can also be a function which accepts two arguments (an array of Records to aggregate, and the measure + * to aggregate them on) and should return a String. + */ + aggregator: 'sum', + + /** + * @cfg {Function} renderer Optional renderer to pass values through before they are rendered to the dom. This + * gives an opportunity to modify cell contents after the value has been computed. + */ + renderer: undefined, + + /** + * @cfg {String} measure The field to extract from each Record when pivoting around the two axes. See the class + * introduction docs for usage + */ + + /** + * @cfg {Array|Ext.grid.PivotAxis} leftAxis Either and array of {@link #dimension} to use on the left axis, or + * a {@link Ext.grid.PivotAxis} instance. If an array is passed, it is turned into a PivotAxis internally. + */ + + /** + * @cfg {Array|Ext.grid.PivotAxis} topAxis Either and array of {@link #dimension} to use on the top axis, or + * a {@link Ext.grid.PivotAxis} instance. If an array is passed, it is turned into a PivotAxis internally. + */ + + //inherit docs + initComponent: function() { + Ext.grid.PivotGrid.superclass.initComponent.apply(this, arguments); + + this.initAxes(); + + //no resizing of columns is allowed yet in PivotGrid + this.enableColumnResize = false; + + this.viewConfig = Ext.apply(this.viewConfig || {}, { + forceFit: true + }); + + //TODO: dummy col model that is never used - GridView is too tightly integrated with ColumnModel + //in 3.x to remove this altogether. + this.colModel = new Ext.grid.ColumnModel({}); + }, + + /** + * Returns the function currently used to aggregate the records in each Pivot cell + * @return {Function} The current aggregator function + */ + getAggregator: function() { + if (typeof this.aggregator == 'string') { + return Ext.grid.PivotAggregatorMgr.types[this.aggregator]; + } else { + return this.aggregator; + } + }, + + /** + * Sets the function to use when aggregating data for each cell. + * @param {String|Function} aggregator The new aggregator function or named function string + */ + setAggregator: function(aggregator) { + this.aggregator = aggregator; + }, + + /** + * Sets the field name to use as the Measure in this Pivot Grid + * @param {String} measure The field to make the measure + */ + setMeasure: function(measure) { + this.measure = measure; + }, + + /** + * Sets the left axis of this pivot grid. Optionally refreshes the grid afterwards. + * @param {Ext.grid.PivotAxis} axis The pivot axis + * @param {Boolean} refresh True to immediately refresh the grid and its axes (defaults to false) + */ + setLeftAxis: function(axis, refresh) { + /** + * The configured {@link Ext.grid.PivotAxis} used as the left Axis for this Pivot Grid + * @property leftAxis + * @type Ext.grid.PivotAxis + */ + this.leftAxis = axis; + + if (refresh) { + this.view.refresh(); + } + }, + + /** + * Sets the top axis of this pivot grid. Optionally refreshes the grid afterwards. + * @param {Ext.grid.PivotAxis} axis The pivot axis + * @param {Boolean} refresh True to immediately refresh the grid and its axes (defaults to false) + */ + setTopAxis: function(axis, refresh) { + /** + * The configured {@link Ext.grid.PivotAxis} used as the top Axis for this Pivot Grid + * @property topAxis + * @type Ext.grid.PivotAxis + */ + this.topAxis = axis; + + if (refresh) { + this.view.refresh(); + } + }, + + /** + * @private + * Creates the top and left axes. Should usually only need to be called once from initComponent + */ + initAxes: function() { + var PivotAxis = Ext.grid.PivotAxis; + + if (!(this.leftAxis instanceof PivotAxis)) { + this.setLeftAxis(new PivotAxis({ + orientation: 'vertical', + dimensions : this.leftAxis || [], + store : this.store + })); + }; + + if (!(this.topAxis instanceof PivotAxis)) { + this.setTopAxis(new PivotAxis({ + orientation: 'horizontal', + dimensions : this.topAxis || [], + store : this.store + })); + }; + }, + + /** + * @private + * @return {Array} 2-dimensional array of cell data + */ + extractData: function() { + var records = this.store.data.items, + recCount = records.length, + cells = [], + record, i, j, k; + + if (recCount == 0) { + return []; + } + + var leftTuples = this.leftAxis.getTuples(), + leftCount = leftTuples.length, + topTuples = this.topAxis.getTuples(), + topCount = topTuples.length, + aggregator = this.getAggregator(); + + for (i = 0; i < recCount; i++) { + record = records[i]; + + for (j = 0; j < leftCount; j++) { + cells[j] = cells[j] || []; + + if (leftTuples[j].matcher(record) === true) { + for (k = 0; k < topCount; k++) { + cells[j][k] = cells[j][k] || []; + + if (topTuples[k].matcher(record)) { + cells[j][k].push(record); + } + } + } + } + } + + var rowCount = cells.length, + colCount, row; + + for (i = 0; i < rowCount; i++) { + row = cells[i]; + colCount = row.length; + + for (j = 0; j < colCount; j++) { + cells[i][j] = aggregator(cells[i][j], this.measure); + } + } + + return cells; + }, + + /** + * Returns the grid's GridView object. + * @return {Ext.grid.PivotGridView} The grid view + */ + getView: function() { + if (!this.view) { + this.view = new Ext.grid.PivotGridView(this.viewConfig); + } + + return this.view; + } +}); + +Ext.reg('pivotgrid', Ext.grid.PivotGrid); + + +Ext.grid.PivotAggregatorMgr = new Ext.AbstractManager(); + +Ext.grid.PivotAggregatorMgr.registerType('sum', function(records, measure) { + var length = records.length, + total = 0, + i; + + for (i = 0; i < length; i++) { + total += records[i].get(measure); + } + + return total; +}); + +Ext.grid.PivotAggregatorMgr.registerType('avg', function(records, measure) { + var length = records.length, + total = 0, + i; + + for (i = 0; i < length; i++) { + total += records[i].get(measure); + } + + return (total / length) || 'n/a'; +}); + +Ext.grid.PivotAggregatorMgr.registerType('min', function(records, measure) { + var data = [], + length = records.length, + i; + + for (i = 0; i < length; i++) { + data.push(records[i].get(measure)); + } + + return Math.min.apply(this, data) || 'n/a'; +}); + +Ext.grid.PivotAggregatorMgr.registerType('max', function(records, measure) { + var data = [], + length = records.length, + i; + + for (i = 0; i < length; i++) { + data.push(records[i].get(measure)); + } + + return Math.max.apply(this, data) || 'n/a'; +}); + +Ext.grid.PivotAggregatorMgr.registerType('count', function(records, measure) { + return records.length; +});/** * @class Ext.grid.GridView * @extends Ext.util.Observable *

            This class encapsulates the user interface of an {@link Ext.grid.GridPanel}. @@ -64955,7 +71601,7 @@ viewConfig: { } return 'x-grid3-row-collapsed'; } -}, +}, * @param {Record} record The {@link Ext.data.Record} corresponding to the current row. * @param {Number} index The row index. @@ -64976,10 +71622,12 @@ viewConfig: { * @method getRowClass * @return {String} a CSS class name to add to the row. */ + /** * @cfg {Boolean} enableRowBody True to add a second TR element per row that can be used to provide a row body * that spans beneath the data row. Use the {@link #getRowClass} method's rowParams config to customize the row body. */ + /** * @cfg {String} emptyText Default text (html tags are accepted) to display in the grid body when no rows * are available (defaults to ''). This value will be used to update the {@link #mainBody}: @@ -64987,8 +71635,9 @@ viewConfig: { this.mainBody.update('<div class="x-grid-empty">' + this.emptyText + '</div>'); */ + /** - * @cfg {Boolean} headersDisabled True to disable the grid column headers (defaults to false). + * @cfg {Boolean} headersDisabled True to disable the grid column headers (defaults to false). * Use the {@link Ext.grid.ColumnModel ColumnModel} {@link Ext.grid.ColumnModel#menuDisabled menuDisabled} * config to disable the menu for individual columns. While this config is true the * following will be disabled:

              @@ -64996,6 +71645,7 @@ viewConfig: { *
            • the trigger to reveal the menu.
            • *
            */ + /** *

            A customized implementation of a {@link Ext.dd.DragZone DragZone} which provides default implementations * of the template methods of DragZone to enable dragging of the selected rows of a GridPanel. @@ -65007,48 +71657,59 @@ viewConfig: { * @property dragZone * @type {Ext.grid.GridDragZone} */ + /** * @cfg {Boolean} deferEmptyText True to defer {@link #emptyText} being applied until the store's * first load (defaults to true). */ deferEmptyText : true, + /** * @cfg {Number} scrollOffset The amount of space to reserve for the vertical scrollbar * (defaults to undefined). If an explicit value isn't specified, this will be automatically * calculated. */ scrollOffset : undefined, + /** * @cfg {Boolean} autoFill * Defaults to false. Specify true to have the column widths re-proportioned - * when the grid is initially rendered. The + * when the grid is initially rendered. The * {@link Ext.grid.Column#width initially configured width} of each column will be adjusted * to fit the grid width and prevent horizontal scrolling. If columns are later resized (manually * or programmatically), the other columns in the grid will not be resized to fit the grid width. * See {@link #forceFit} also. */ autoFill : false, + /** * @cfg {Boolean} forceFit - * Defaults to false. Specify true to have the column widths re-proportioned - * at all times. The {@link Ext.grid.Column#width initially configured width} of each + *

            Defaults to false. Specify true to have the column widths re-proportioned + * at all times.

            + *

            The {@link Ext.grid.Column#width initially configured width} of each * column will be adjusted to fit the grid width and prevent horizontal scrolling. If columns are * later resized (manually or programmatically), the other columns in the grid will be resized - * to fit the grid width. See {@link #autoFill} also. + * to fit the grid width.

            + *

            Columns which are configured with fixed: true are omitted from being resized.

            + *

            See {@link #autoFill}.

            */ forceFit : false, + /** * @cfg {Array} sortClasses The CSS classes applied to a header when it is sorted. (defaults to ['sort-asc', 'sort-desc']) */ sortClasses : ['sort-asc', 'sort-desc'], + /** * @cfg {String} sortAscText The text displayed in the 'Sort Ascending' menu item (defaults to 'Sort Ascending') */ sortAscText : 'Sort Ascending', + /** * @cfg {String} sortDescText The text displayed in the 'Sort Descending' menu item (defaults to 'Sort Descending') */ sortDescText : 'Sort Descending', + /** * @cfg {String} columnsText The text displayed in the 'Columns' menu item (defaults to 'Columns') */ @@ -65075,17 +71736,23 @@ viewConfig: { borderWidth : 2, tdClass : 'x-grid3-cell', hdCls : 'x-grid3-hd', + + + /** + * @cfg {Boolean} markDirty True to show the dirty cell indicator when a cell has been modified. Defaults to true. + */ markDirty : true, /** * @cfg {Number} cellSelectorDepth The number of levels to search for cells in event delegation (defaults to 4) */ cellSelectorDepth : 4, + /** * @cfg {Number} rowSelectorDepth The number of levels to search for rows in event delegation (defaults to 10) */ rowSelectorDepth : 10, - + /** * @cfg {Number} rowBodySelectorDepth The number of levels to search for row bodies in event delegation (defaults to 10) */ @@ -65095,151 +71762,222 @@ viewConfig: { * @cfg {String} cellSelector The selector used to find cells internally (defaults to 'td.x-grid3-cell') */ cellSelector : 'td.x-grid3-cell', + /** * @cfg {String} rowSelector The selector used to find rows internally (defaults to 'div.x-grid3-row') */ rowSelector : 'div.x-grid3-row', - + /** * @cfg {String} rowBodySelector The selector used to find row bodies internally (defaults to 'div.x-grid3-row') */ rowBodySelector : 'div.x-grid3-row-body', - + // private firstRowCls: 'x-grid3-row-first', lastRowCls: 'x-grid3-row-last', rowClsRe: /(?:^|\s+)x-grid3-row-(first|last|alt)(?:\s+|$)/g, - constructor : function(config){ + /** + * @cfg {String} headerMenuOpenCls The CSS class to add to the header cell when its menu is visible. Defaults to 'x-grid3-hd-menu-open' + */ + headerMenuOpenCls: 'x-grid3-hd-menu-open', + + /** + * @cfg {String} rowOverCls The CSS class added to each row when it is hovered over. Defaults to 'x-grid3-row-over' + */ + rowOverCls: 'x-grid3-row-over', + + constructor : function(config) { Ext.apply(this, config); - // These events are only used internally by the grid components - this.addEvents( - /** - * @event beforerowremoved - * Internal UI Event. Fired before a row is removed. - * @param {Ext.grid.GridView} view - * @param {Number} rowIndex The index of the row to be removed. - * @param {Ext.data.Record} record The Record to be removed - */ - 'beforerowremoved', - /** - * @event beforerowsinserted - * Internal UI Event. Fired before rows are inserted. - * @param {Ext.grid.GridView} view - * @param {Number} firstRow The index of the first row to be inserted. - * @param {Number} lastRow The index of the last row to be inserted. - */ - 'beforerowsinserted', - /** - * @event beforerefresh - * Internal UI Event. Fired before the view is refreshed. - * @param {Ext.grid.GridView} view - */ - 'beforerefresh', - /** - * @event rowremoved - * Internal UI Event. Fired after a row is removed. - * @param {Ext.grid.GridView} view - * @param {Number} rowIndex The index of the row that was removed. - * @param {Ext.data.Record} record The Record that was removed - */ - 'rowremoved', - /** - * @event rowsinserted - * Internal UI Event. Fired after rows are inserted. - * @param {Ext.grid.GridView} view - * @param {Number} firstRow The index of the first inserted. - * @param {Number} lastRow The index of the last row inserted. - */ - 'rowsinserted', - /** - * @event rowupdated - * Internal UI Event. Fired after a row has been updated. - * @param {Ext.grid.GridView} view - * @param {Number} firstRow The index of the row updated. - * @param {Ext.data.record} record The Record backing the row updated. - */ - 'rowupdated', - /** - * @event refresh - * Internal UI Event. Fired after the GridView's body has been refreshed. - * @param {Ext.grid.GridView} view - */ - 'refresh' - ); - Ext.grid.GridView.superclass.constructor.call(this); + + // These events are only used internally by the grid components + this.addEvents( + /** + * @event beforerowremoved + * Internal UI Event. Fired before a row is removed. + * @param {Ext.grid.GridView} view + * @param {Number} rowIndex The index of the row to be removed. + * @param {Ext.data.Record} record The Record to be removed + */ + 'beforerowremoved', + + /** + * @event beforerowsinserted + * Internal UI Event. Fired before rows are inserted. + * @param {Ext.grid.GridView} view + * @param {Number} firstRow The index of the first row to be inserted. + * @param {Number} lastRow The index of the last row to be inserted. + */ + 'beforerowsinserted', + + /** + * @event beforerefresh + * Internal UI Event. Fired before the view is refreshed. + * @param {Ext.grid.GridView} view + */ + 'beforerefresh', + + /** + * @event rowremoved + * Internal UI Event. Fired after a row is removed. + * @param {Ext.grid.GridView} view + * @param {Number} rowIndex The index of the row that was removed. + * @param {Ext.data.Record} record The Record that was removed + */ + 'rowremoved', + + /** + * @event rowsinserted + * Internal UI Event. Fired after rows are inserted. + * @param {Ext.grid.GridView} view + * @param {Number} firstRow The index of the first inserted. + * @param {Number} lastRow The index of the last row inserted. + */ + 'rowsinserted', + + /** + * @event rowupdated + * Internal UI Event. Fired after a row has been updated. + * @param {Ext.grid.GridView} view + * @param {Number} firstRow The index of the row updated. + * @param {Ext.data.record} record The Record backing the row updated. + */ + 'rowupdated', + + /** + * @event refresh + * Internal UI Event. Fired after the GridView's body has been refreshed. + * @param {Ext.grid.GridView} view + */ + 'refresh' + ); + + Ext.grid.GridView.superclass.constructor.call(this); }, /* -------------------------------- UI Specific ----------------------------- */ - // private - initTemplates : function(){ - var ts = this.templates || {}; - if(!ts.master){ - ts.master = new Ext.Template( - '
            ', - '
            ', - '
            {header}
            ', - '
            {body}
            ', - '
            ', - '
             
            ', - '
             
            ', - '
            ' - ); - } + /** + * The master template to use when rendering the GridView. Has a default template + * @property Ext.Template + * @type masterTpl + */ + masterTpl: new Ext.Template( + '
            ', + '
            ', + '
            ', + '
            ', + '
            {header}
            ', + '
            ', + '
            ', + '
            ', + '
            ', + '
            {body}
            ', + '', + '
            ', + '
            ', + '
             
            ', + '
             
            ', + '
            ' + ), - if(!ts.header){ - ts.header = new Ext.Template( - '', - '{cells}', - '
            ' - ); - } + /** + * The template to use when rendering headers. Has a default template + * @property headerTpl + * @type Ext.Template + */ + headerTpl: new Ext.Template( + '', + '', + '{cells}', + '', + '
            ' + ), - if(!ts.hcell){ - ts.hcell = new Ext.Template( - '
            ', this.grid.enableHdMenu ? '' : '', - '{value}', - '
            ' - ); - } + /** + * The template to use when rendering the body. Has a default template + * @property bodyTpl + * @type Ext.Template + */ + bodyTpl: new Ext.Template('{rows}'), - if(!ts.body){ - ts.body = new Ext.Template('{rows}'); - } + /** + * The template to use to render each cell. Has a default template + * @property cellTpl + * @type Ext.Template + */ + cellTpl: new Ext.Template( + '', + '
            {value}
            ', + '' + ), - if(!ts.row){ - ts.row = new Ext.Template( - '
            ', - '{cells}', - (this.enableRowBody ? '' : ''), - '
            {body}
            ' - ); - } + /** + * @private + * Provides default templates if they are not given for this particular instance. Most of the templates are defined on + * the prototype, the ones defined inside this function are done so because they are based on Grid or GridView configuration + */ + initTemplates : function() { + var templates = this.templates || {}, + template, name, - if(!ts.cell){ - ts.cell = new Ext.Template( - '', - '
            {value}
            ', - '' - ); - } + headerCellTpl = new Ext.Template( + '', + '
            ', + this.grid.enableHdMenu ? '' : '', + '{value}', + '', + '
            ', + '' + ), - for(var k in ts){ - var t = ts[k]; - if(t && Ext.isFunction(t.compile) && !t.compiled){ - t.disableFormats = true; - t.compile(); + rowBodyText = [ + '', + '', + '
            {body}
            ', + '', + '' + ].join(""), + + innerText = [ + '', + '', + '{cells}', + this.enableRowBody ? rowBodyText : '', + '', + '
            ' + ].join(""); + + Ext.applyIf(templates, { + hcell : headerCellTpl, + cell : this.cellTpl, + body : this.bodyTpl, + header : this.headerTpl, + master : this.masterTpl, + row : new Ext.Template('
            ' + innerText + '
            '), + rowInner: new Ext.Template(innerText) + }); + + for (name in templates) { + template = templates[name]; + + if (template && Ext.isFunction(template.compile) && !template.compiled) { + template.disableFormats = true; + template.compile(); } } - this.templates = ts; + this.templates = templates; this.colRe = new RegExp('x-grid3-td-([^\\s]+)', ''); }, - // private - fly : function(el){ - if(!this._flyweight){ + /** + * @private + * Each GridView has its own private flyweight, accessed through this method + */ + fly : function(el) { + if (!this._flyweight) { this._flyweight = new Ext.Element.Flyweight(document.body); } this._flyweight.dom = el; @@ -65247,56 +71985,62 @@ viewConfig: { }, // private - getEditorParent : function(){ + getEditorParent : function() { return this.scroller.dom; }, - // private - initElements : function(){ - var E = Ext.Element; + /** + * @private + * Finds and stores references to important elements + */ + initElements : function() { + var Element = Ext.Element, + el = Ext.get(this.grid.getGridEl().dom.firstChild), + mainWrap = new Element(el.child('div.x-grid3-viewport')), + mainHd = new Element(mainWrap.child('div.x-grid3-header')), + scroller = new Element(mainWrap.child('div.x-grid3-scroller')); - 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); + if (this.grid.hideHeaders) { + 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'); + if (this.forceFit) { + scroller.setStyle('overflow-x', 'hidden'); } + /** * Read-only. The GridView's body Element which encapsulates all rows in the Grid. * This {@link Ext.Element Element} is only available after the GridPanel has been rendered. * @type Ext.Element * @property mainBody */ - this.mainBody = new E(this.scroller.dom.firstChild); - this.focusEl = new E(this.scroller.dom.childNodes[1]); + Ext.apply(this, { + el : el, + mainWrap: mainWrap, + scroller: scroller, + mainHd : mainHd, + innerHd : mainHd.child('div.x-grid3-header-inner').dom, + mainBody: new Element(Element.fly(scroller).child('div.x-grid3-body')), + focusEl : new Element(Element.fly(scroller).child('a')), + + resizeMarker: new Element(el.child('div.x-grid3-resize-marker')), + resizeProxy : new Element(el.child('div.x-grid3-resize-proxy')) + }); + this.focusEl.swallowEvent('click', true); - - this.resizeMarker = new E(cs[1]); - this.resizeProxy = new E(cs[2]); }, // private - getRows : function(){ + getRows : function() { return this.hasRows() ? this.mainBody.dom.childNodes : []; }, // finder methods, used with delegation // private - findCell : function(el){ - if(!el){ + findCell : function(el) { + if (!el) { return false; } return this.fly(el).findParent(this.cellSelector, this.cellSelectorDepth); @@ -65308,27 +72052,33 @@ viewConfig: { * @param {HTMLElement} el The target element * @return {Number} The column index, or false if the target element is not within a row of this GridView. */ - findCellIndex : function(el, requiredCls){ - var cell = this.findCell(el); - if(cell && (!requiredCls || this.fly(cell).hasClass(requiredCls))){ - return this.getCellIndex(cell); - } - return false; - }, + findCellIndex : function(el, requiredCls) { + var cell = this.findCell(el), + hasCls; - // private - getCellIndex : function(el){ - if(el){ - var m = el.className.match(this.colRe); - if(m && m[1]){ - return this.cm.getIndexById(m[1]); + if (cell) { + hasCls = this.fly(cell).hasClass(requiredCls); + if (!requiredCls || hasCls) { + return this.getCellIndex(cell); } } return false; }, // private - findHeaderCell : function(el){ + getCellIndex : function(el) { + if (el) { + var match = el.className.match(this.colRe); + + if (match && match[1]) { + return this.cm.getIndexById(match[1]); + } + } + return false; + }, + + // private + findHeaderCell : function(el) { var cell = this.findCell(el); return cell && this.fly(cell).hasClass(this.hdCls) ? cell : null; }, @@ -65343,33 +72093,34 @@ viewConfig: { * @param {HTMLElement} el The target HTMLElement * @return {HTMLElement} The row element, or null if the target element is not within a row of this GridView. */ - findRow : function(el){ - if(!el){ + findRow : function(el) { + if (!el) { return false; } return this.fly(el).findParent(this.rowSelector, this.rowSelectorDepth); }, /** - *

            Return the index of the grid row which contains the passed HTMLElement.

            + * Return the index of the grid row which contains the passed HTMLElement. * See also {@link #findCellIndex} * @param {HTMLElement} el The target HTMLElement * @return {Number} The row index, or false if the target element is not within a row of this GridView. */ - findRowIndex : function(el){ - var r = this.findRow(el); - return r ? r.rowIndex : false; + findRowIndex : function(el) { + var row = this.findRow(el); + return row ? row.rowIndex : false; }, - + /** * Return the HtmlElement representing the grid row body which contains the passed element. * @param {HTMLElement} el The target HTMLElement * @return {HTMLElement} The row body element, or null if the target element is not within a row body of this GridView. */ - findRowBody : function(el){ - if(!el){ + findRowBody : function(el) { + if (!el) { return false; } + return this.fly(el).findParent(this.rowBodySelector, this.rowBodySelectorDepth); }, @@ -65380,7 +72131,7 @@ viewConfig: { * @param {Number} index The row index * @return {HtmlElement} The div element. */ - getRow : function(row){ + getRow : function(row) { return this.getRows()[row]; }, @@ -65390,8 +72141,8 @@ viewConfig: { * @param {Number} col The column index of the cell. * @return {HtmlElement} The td at the specified coordinates. */ - getCell : function(row, col){ - return this.getRow(row).getElementsByTagName('td')[col]; + getCell : function(row, col) { + return Ext.fly(this.getRow(row)).query(this.cellSelector)[col]; }, /** @@ -65399,22 +72150,22 @@ viewConfig: { * @param {Number} index The column index * @return {HtmlElement} The td element. */ - getHeaderCell : function(index){ - return this.mainHd.dom.getElementsByTagName('td')[index]; + getHeaderCell : function(index) { + return this.mainHd.dom.getElementsByTagName('td')[index]; }, // manipulating elements // private - use getRowClass to apply custom row classes - addRowClass : function(row, cls){ - var r = this.getRow(row); - if(r){ - this.fly(r).addClass(cls); + addRowClass : function(rowId, cls) { + var row = this.getRow(rowId); + if (row) { + this.fly(row).addClass(cls); } }, // private - removeRowClass : function(row, cls){ + removeRowClass : function(row, cls) { var r = this.getRow(row); if(r){ this.fly(r).removeClass(cls); @@ -65422,283 +72173,362 @@ viewConfig: { }, // private - removeRow : function(row){ + removeRow : function(row) { Ext.removeNode(this.getRow(row)); this.syncFocusEl(row); }, - + // private - removeRows : function(firstRow, lastRow){ - var bd = this.mainBody.dom; - for(var rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ + removeRows : function(firstRow, lastRow) { + var bd = this.mainBody.dom, + rowIndex; + + for (rowIndex = firstRow; rowIndex <= lastRow; rowIndex++){ Ext.removeNode(bd.childNodes[firstRow]); } + this.syncFocusEl(firstRow); }, - // scrolling stuff + /* ----------------------------------- Scrolling functions -------------------------------------------*/ // private - getScrollState : function(){ + getScrollState : function() { var sb = this.scroller.dom; - return {left: sb.scrollLeft, top: sb.scrollTop}; + + return { + left: sb.scrollLeft, + top : sb.scrollTop + }; }, // private - restoreScroll : function(state){ + restoreScroll : function(state) { var sb = this.scroller.dom; sb.scrollLeft = state.left; - sb.scrollTop = state.top; + sb.scrollTop = state.top; }, /** * Scrolls the grid to the top */ - scrollToTop : function(){ - this.scroller.dom.scrollTop = 0; - this.scroller.dom.scrollLeft = 0; + scrollToTop : function() { + var dom = this.scroller.dom; + + dom.scrollTop = 0; + dom.scrollLeft = 0; }, // private - syncScroll : function(){ - this.syncHeaderScroll(); - var mb = this.scroller.dom; + syncScroll : function() { + this.syncHeaderScroll(); + var mb = this.scroller.dom; this.grid.fireEvent('bodyscroll', mb.scrollLeft, mb.scrollTop); }, // private - syncHeaderScroll : function(){ - var mb = this.scroller.dom; - this.innerHd.scrollLeft = mb.scrollLeft; - this.innerHd.scrollLeft = mb.scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore) + syncHeaderScroll : function() { + var innerHd = this.innerHd, + scrollLeft = this.scroller.dom.scrollLeft; + + innerHd.scrollLeft = scrollLeft; + innerHd.scrollLeft = scrollLeft; // second time for IE (1/2 time first fails, other browsers ignore) }, - // private - updateSortIcon : function(col, dir){ - var sc = this.sortClasses; - var hds = this.mainHd.select('td').removeClass(sc); - hds.item(col).addClass(sc[dir == 'DESC' ? 1 : 0]); + /** + * @private + * Ensures the given column has the given icon class + */ + updateSortIcon : function(col, dir) { + var sortClasses = this.sortClasses, + sortClass = sortClasses[dir == "DESC" ? 1 : 0], + headers = this.mainHd.select('td').removeClass(sortClasses); + + headers.item(col).addClass(sortClass); }, - // private - updateAllColumnWidths : function(){ - var tw = this.getTotalWidth(), - clen = this.cm.getColumnCount(), - ws = [], - len, - i; - for(i = 0; i < clen; i++){ - ws[i] = this.getColumnWidth(i); - } - this.innerHd.firstChild.style.width = this.getOffsetWidth(); - this.innerHd.firstChild.firstChild.style.width = tw; - this.mainBody.dom.style.width = tw; - for(i = 0; i < clen; i++){ - var hd = this.getHeaderCell(i); - hd.style.width = ws[i]; + /** + * @private + * Updates the size of every column and cell in the grid + */ + updateAllColumnWidths : function() { + var totalWidth = this.getTotalWidth(), + colCount = this.cm.getColumnCount(), + rows = this.getRows(), + rowCount = rows.length, + widths = [], + row, rowFirstChild, trow, i, j; + + for (i = 0; i < colCount; i++) { + widths[i] = this.getColumnWidth(i); + this.getHeaderCell(i).style.width = widths[i]; } - var ns = this.getRows(), row, trow; - for(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.updateHeaderWidth(); + + for (i = 0; i < rowCount; i++) { + row = rows[i]; + row.style.width = totalWidth; + rowFirstChild = row.firstChild; + + if (rowFirstChild) { + rowFirstChild.style.width = totalWidth; + trow = rowFirstChild.rows[0]; + + for (j = 0; j < colCount; j++) { + trow.childNodes[j].style.width = widths[j]; } } } - this.onAllColumnWidthsUpdated(ws, tw); + this.onAllColumnWidthsUpdated(widths, totalWidth); }, - // private - updateColumnWidth : function(col, width){ - var w = this.getColumnWidth(col); - var tw = this.getTotalWidth(); - this.innerHd.firstChild.style.width = this.getOffsetWidth(); - this.innerHd.firstChild.firstChild.style.width = tw; - this.mainBody.dom.style.width = tw; - var hd = this.getHeaderCell(col); - hd.style.width = w; + /** + * @private + * Called after a column's width has been updated, this resizes all of the cells for that column in each row + * @param {Number} column The column index + */ + updateColumnWidth : function(column, width) { + var columnWidth = this.getColumnWidth(column), + totalWidth = this.getTotalWidth(), + headerCell = this.getHeaderCell(column), + nodes = this.getRows(), + nodeCount = nodes.length, + row, i, firstChild; - 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.updateHeaderWidth(); + headerCell.style.width = columnWidth; + + for (i = 0; i < nodeCount; i++) { + row = nodes[i]; + firstChild = row.firstChild; + + row.style.width = totalWidth; + if (firstChild) { + firstChild.style.width = totalWidth; + firstChild.rows[0].childNodes[column].style.width = columnWidth; } } - this.onColumnWidthUpdated(col, w, tw); + this.onColumnWidthUpdated(column, columnWidth, totalWidth); }, - // private - updateColumnHidden : function(col, hidden){ - var tw = this.getTotalWidth(); - this.innerHd.firstChild.style.width = this.getOffsetWidth(); - this.innerHd.firstChild.firstChild.style.width = tw; - this.mainBody.dom.style.width = tw; - var display = hidden ? 'none' : ''; + /** + * @private + * Sets the hidden status of a given column. + * @param {Number} col The column index + * @param {Boolean} hidden True to make the column hidden + */ + updateColumnHidden : function(col, hidden) { + var totalWidth = this.getTotalWidth(), + display = hidden ? 'none' : '', + headerCell = this.getHeaderCell(col), + nodes = this.getRows(), + nodeCount = nodes.length, + row, rowFirstChild, i; - var hd = this.getHeaderCell(col); - hd.style.display = display; + this.updateHeaderWidth(); + headerCell.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; + for (i = 0; i < nodeCount; i++) { + row = nodes[i]; + row.style.width = totalWidth; + rowFirstChild = row.firstChild; + + if (rowFirstChild) { + rowFirstChild.style.width = totalWidth; + rowFirstChild.rows[0].childNodes[col].style.display = display; } } - this.onColumnHiddenUpdated(col, hidden, tw); - delete this.lastViewWidth; // force recalc + this.onColumnHiddenUpdated(col, hidden, totalWidth); + delete this.lastViewWidth; //recalc this.layout(); }, - // private - doRender : function(cs, rs, ds, startRow, colCount, stripe){ - var ts = this.templates, ct = ts.cell, rt = ts.row, last = colCount-1; - var tstyle = 'width:'+this.getTotalWidth()+';'; - // buffers - var buf = [], cb, c, p = {}, rp = {tstyle: tstyle}, r; - for(var j = 0, len = rs.length; j < len; j++){ - r = rs[j]; cb = []; - var rowIndex = (j+startRow); - for(var i = 0; i < colCount; i++){ - c = cs[i]; - p.id = c.id; - p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); - p.attr = p.cellAttr = ''; - p.value = c.renderer.call(c.scope, r.data[c.name], p, r, rowIndex, i, ds); - p.style = c.style; - if(Ext.isEmpty(p.value)){ - p.value = ' '; + /** + * @private + * Renders all of the rows to a string buffer and returns the string. This is called internally + * by renderRows and performs the actual string building for the rows - it does not inject HTML into the DOM. + * @param {Array} columns The column data acquired from getColumnData. + * @param {Array} records The array of records to render + * @param {Ext.data.Store} store The store to render the rows from + * @param {Number} startRow The index of the first row being rendered. Sometimes we only render a subset of + * the rows so this is used to maintain logic for striping etc + * @param {Number} colCount The total number of columns in the column model + * @param {Boolean} stripe True to stripe the rows + * @return {String} A string containing the HTML for the rendered rows + */ + doRender : function(columns, records, store, startRow, colCount, stripe) { + var templates = this.templates, + cellTemplate = templates.cell, + rowTemplate = templates.row, + last = colCount - 1, + tstyle = 'width:' + this.getTotalWidth() + ';', + // buffers + rowBuffer = [], + colBuffer = [], + rowParams = {tstyle: tstyle}, + meta = {}, + len = records.length, + alt, + column, + record, i, j, rowIndex; + + //build up each row's HTML + for (j = 0; j < len; j++) { + record = records[j]; + colBuffer = []; + + rowIndex = j + startRow; + + //build up each column's HTML + for (i = 0; i < colCount; i++) { + column = columns[i]; + + meta.id = column.id; + meta.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); + meta.attr = meta.cellAttr = ''; + meta.style = column.style; + meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store); + + if (Ext.isEmpty(meta.value)) { + meta.value = ' '; } - if(this.markDirty && r.dirty && Ext.isDefined(r.modified[c.name])){ - p.css += ' x-grid3-dirty-cell'; + + if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') { + meta.css += ' x-grid3-dirty-cell'; } - cb[cb.length] = ct.apply(p); + + colBuffer[colBuffer.length] = cellTemplate.apply(meta); } - var alt = []; - if(stripe && ((rowIndex+1) % 2 === 0)){ + + alt = []; + //set up row striping and row dirtiness CSS classes + if (stripe && ((rowIndex + 1) % 2 === 0)) { alt[0] = 'x-grid3-row-alt'; } - if(r.dirty){ + + if (record.dirty) { alt[1] = ' x-grid3-dirty-row'; } - rp.cols = colCount; - if(this.getRowClass){ - alt[2] = this.getRowClass(r, rowIndex, rp, ds); + + rowParams.cols = colCount; + + if (this.getRowClass) { + alt[2] = this.getRowClass(record, rowIndex, rowParams, store); } - rp.alt = alt.join(' '); - rp.cells = cb.join(''); - buf[buf.length] = rt.apply(rp); + + rowParams.alt = alt.join(' '); + rowParams.cells = colBuffer.join(''); + + rowBuffer[rowBuffer.length] = rowTemplate.apply(rowParams); } - return buf.join(''); + + return rowBuffer.join(''); }, - // private - processRows : function(startRow, skipStripe){ - if(!this.ds || this.ds.getCount() < 1){ + /** + * @private + * Adds CSS classes and rowIndex to each row + * @param {Number} startRow The row to start from (defaults to 0) + */ + processRows : function(startRow, skipStripe) { + if (!this.ds || this.ds.getCount() < 1) { return; } - var rows = this.getRows(), - len = rows.length, - i, r; - + + var rows = this.getRows(), + length = rows.length, + row, i; + skipStripe = skipStripe || !this.grid.stripeRows; - startRow = startRow || 0; - for(i = 0; icolumn->row +// We must allow a return of false at any of these levels to cancel the event processing. +// Particularly allowing rowmousedown to be cancellable by prior handlers which need to prevent selection. + if (row !== false) { + cell = this.findCellIndex(target); + if (cell !== false) { + col = grid.colModel.getColumnAt(cell); + if (grid.fireEvent('cell' + name, grid, row, cell, e) !== false) { + if (!col || (col.processEvent && (col.processEvent(name, e, grid, row, cell) !== false))) { + grid.fireEvent('row' + name, grid, row, e); + } + } + } else { + if (grid.fireEvent('row' + name, grid, row, e) !== false) { + (body = this.findRowBody(target)) && grid.fireEvent('rowbody' + name, grid, row, e); + } + } + } else { + grid.fireEvent('container' + name, grid, e); + } + } + }, + + /** + * @private + * Sizes the grid's header and body elements + */ + layout : function(initial) { + if (!this.mainBody) { return; // not rendered } - var g = this.grid; - var c = g.getGridEl(); - var csize = c.getSize(true); - var vw = csize.width; - if(!g.hideHeaders && (vw < 20 || csize.height < 20)){ // display: none? + var grid = this.grid, + gridEl = grid.getGridEl(), + gridSize = gridEl.getSize(true), + gridWidth = gridSize.width, + gridHeight = gridSize.height, + scroller = this.scroller, + scrollStyle, headerHeight, scrollHeight; + + if (gridWidth < 20 || gridHeight < 20) { return; } - if(g.autoHeight){ - this.scroller.dom.style.overflow = 'visible'; - if(Ext.isWebKit){ - this.scroller.dom.style.position = 'static'; + if (grid.autoHeight) { + scrollStyle = scroller.dom.style; + scrollStyle.overflow = 'visible'; + + if (Ext.isWebKit) { + scrollStyle.position = 'static'; } - }else{ - this.el.setSize(csize.width, csize.height); + } else { + this.el.setSize(gridWidth, gridHeight); - var hdHeight = this.mainHd.getHeight(); - var vh = csize.height - (hdHeight); + headerHeight = this.mainHd.getHeight(); + scrollHeight = gridHeight - headerHeight; - this.scroller.setSize(vw, vh); - if(this.innerHd){ - this.innerHd.style.width = (vw)+'px'; + scroller.setSize(gridWidth, scrollHeight); + + if (this.innerHd) { + this.innerHd.style.width = (gridWidth) + "px"; } } - if(this.forceFit){ - if(this.lastViewWidth != vw){ + + if (this.forceFit || (initial === true && this.autoFill)) { + if (this.lastViewWidth != gridWidth) { this.fitColumns(false, false); - this.lastViewWidth = vw; + this.lastViewWidth = gridWidth; } - }else { + } else { this.autoExpand(); this.syncHeaderScroll(); } - this.onLayout(vw, vh); + + this.onLayout(gridWidth, scrollHeight); }, // template functions for subclasses and plugins // these functions include precalculated values - onLayout : function(vw, vh){ + onLayout : function(vw, vh) { // do nothing }, - onColumnWidthUpdated : function(col, w, tw){ + onColumnWidthUpdated : function(col, w, tw) { //template method }, - onAllColumnWidthsUpdated : function(ws, tw){ + onAllColumnWidthsUpdated : function(ws, tw) { //template method }, - onColumnHiddenUpdated : function(col, hidden, tw){ + onColumnHiddenUpdated : function(col, hidden, tw) { // template method }, - updateColumnText : function(col, text){ + updateColumnText : function(col, text) { // template method }, - afterMove : function(colIndex){ + afterMove : function(colIndex) { // template method }, /* ----------------------------------- Core Specific -------------------------------------------*/ // private - init : function(grid){ + init : function(grid) { this.grid = grid; this.initTemplates(); @@ -65812,74 +72704,118 @@ viewConfig: { // private getColumnId : function(index){ - return this.cm.getColumnId(index); + return this.cm.getColumnId(index); }, - - // private + + // private getOffsetWidth : function() { return (this.cm.getTotalWidth() + this.getScrollOffset()) + 'px'; }, - - getScrollOffset: function(){ + + // private + getScrollOffset: function() { return Ext.num(this.scrollOffset, Ext.getScrollBarWidth()); }, - // private - renderHeaders : function(){ - var cm = this.cm, - ts = this.templates, - ct = ts.hcell, - cb = [], - p = {}, - len = cm.getColumnCount(), - last = len - 1; - - for(var i = 0; i < len; i++){ - p.id = cm.getColumnId(i); - p.value = cm.getColumnHeader(i) || ''; - p.style = this.getColumnStyle(i, true); - p.tooltip = this.getColumnTooltip(i); - p.css = i === 0 ? 'x-grid3-cell-first ' : (i == last ? 'x-grid3-cell-last ' : ''); - if(cm.config[i].align == 'right'){ - p.istyle = 'padding-right:16px'; + /** + * @private + * Renders the header row using the 'header' template. Does not inject the HTML into the DOM, just + * returns a string. + * @return {String} Rendered header row + */ + renderHeaders : function() { + var colModel = this.cm, + templates = this.templates, + headerTpl = templates.hcell, + properties = {}, + colCount = colModel.getColumnCount(), + last = colCount - 1, + cells = [], + i, cssCls; + + for (i = 0; i < colCount; i++) { + if (i == 0) { + cssCls = 'x-grid3-cell-first '; } else { - delete p.istyle; + cssCls = i == last ? 'x-grid3-cell-last ' : ''; } - cb[cb.length] = ct.apply(p); + + properties = { + id : colModel.getColumnId(i), + value : colModel.getColumnHeader(i) || '', + style : this.getColumnStyle(i, true), + css : cssCls, + tooltip: this.getColumnTooltip(i) + }; + + if (colModel.config[i].align == 'right') { + properties.istyle = 'padding-right: 16px;'; + } else { + delete properties.istyle; + } + + cells[i] = headerTpl.apply(properties); } - return ts.header.apply({cells: cb.join(''), tstyle:'width:'+this.getTotalWidth()+';'}); + + return templates.header.apply({ + cells : cells.join(""), + tstyle: String.format("width: {0};", this.getTotalWidth()) + }); }, - // private - getColumnTooltip : function(i){ - var tt = this.cm.getColumnTooltip(i); - if(tt){ - if(Ext.QuickTips.isEnabled()){ - return 'ext:qtip="'+tt+'"'; - }else{ - return 'title="'+tt+'"'; + /** + * @private + */ + getColumnTooltip : function(i) { + var tooltip = this.cm.getColumnTooltip(i); + if (tooltip) { + if (Ext.QuickTips.isEnabled()) { + return 'ext:qtip="' + tooltip + '"'; + } else { + return 'title="' + tooltip + '"'; } } + return ''; }, // private - beforeUpdate : function(){ + beforeUpdate : function() { this.grid.stopEditing(true); }, - // private - updateHeaders : function(){ + /** + * @private + * Re-renders the headers and ensures they are sized correctly + */ + updateHeaders : function() { this.innerHd.firstChild.innerHTML = this.renderHeaders(); - this.innerHd.firstChild.style.width = this.getOffsetWidth(); - this.innerHd.firstChild.firstChild.style.width = this.getTotalWidth(); + + this.updateHeaderWidth(false); + }, + + /** + * @private + * Ensures that the header is sized to the total width available to it + * @param {Boolean} updateMain True to update the mainBody's width also (defaults to true) + */ + updateHeaderWidth: function(updateMain) { + var innerHdChild = this.innerHd.firstChild, + totalWidth = this.getTotalWidth(); + + innerHdChild.style.width = this.getOffsetWidth(); + innerHdChild.firstChild.style.width = totalWidth; + + if (updateMain !== false) { + this.mainBody.dom.style.width = totalWidth; + } }, /** * Focuses the specified row. * @param {Number} row The row index */ - focusRow : function(row){ + focusRow : function(row) { this.focusCell(row, 0, false); }, @@ -65888,134 +72824,173 @@ viewConfig: { * @param {Number} row The row index * @param {Number} col The column index */ - focusCell : function(row, col, hscroll){ + 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); + + var focusEl = this.focusEl; + + if (Ext.isGecko) { + focusEl.focus(); + } else { + focusEl.focus.defer(1, focusEl); } }, - resolveCell : function(row, col, hscroll){ - if(!Ext.isNumber(row)){ + /** + * @private + * Finds the Elements corresponding to the given row and column indexes + */ + resolveCell : function(row, col, hscroll) { + if (!Ext.isNumber(row)) { row = row.rowIndex; } - if(!this.ds){ + + if (!this.ds) { return null; } - if(row < 0 || row >= this.ds.getCount()){ + + if (row < 0 || row >= this.ds.getCount()) { return null; } col = (col !== undefined ? col : 0); - var rowEl = this.getRow(row), - cm = this.cm, - colCount = cm.getColumnCount(), + var rowEl = this.getRow(row), + colModel = this.cm, + colCount = colModel.getColumnCount(), cellEl; - if(!(hscroll === false && col === 0)){ - while(col < colCount && cm.isHidden(col)){ + + if (!(hscroll === false && col === 0)) { + while (col < colCount && colModel.isHidden(col)) { col++; } + cellEl = this.getCell(row, col); } return {row: rowEl, cell: cellEl}; }, - getResolvedXY : function(resolved){ - if(!resolved){ + /** + * @private + * Returns the XY co-ordinates of a given row/cell resolution (see {@link #resolveCell}) + * @return {Array} X and Y coords + */ + getResolvedXY : function(resolved) { + if (!resolved) { return null; } - var s = this.scroller.dom, c = resolved.cell, r = resolved.row; - return c ? Ext.fly(c).getXY() : [this.el.getX(), Ext.fly(r).getY()]; + + var cell = resolved.cell, + row = resolved.row; + + if (cell) { + return Ext.fly(cell).getXY(); + } else { + return [this.el.getX(), Ext.fly(row).getY()]; + } }, - syncFocusEl : function(row, col, hscroll){ + /** + * @private + * Moves the focus element to the x and y co-ordinates of the given row and column + */ + syncFocusEl : function(row, col, hscroll) { var xy = row; - if(!Ext.isArray(xy)){ + + if (!Ext.isArray(xy)) { row = Math.min(row, Math.max(0, this.getRows().length-1)); + + if (isNaN(row)) { + return; + } + xy = this.getResolvedXY(this.resolveCell(row, col, hscroll)); } - this.focusEl.setXY(xy||this.scroller.getXY()); + + this.focusEl.setXY(xy || this.scroller.getXY()); }, - ensureVisible : function(row, col, hscroll){ + /** + * @private + */ + ensureVisible : function(row, col, hscroll) { var resolved = this.resolveCell(row, col, hscroll); - if(!resolved || !resolved.row){ - return; + + if (!resolved || !resolved.row) { + return null; } - var rowEl = resolved.row, + var rowEl = resolved.row, cellEl = resolved.cell, c = this.scroller.dom, + p = rowEl, ctop = 0, - p = rowEl, stop = this.el.dom; - - while(p && p != stop){ + + while (p && p != stop) { ctop += p.offsetTop; p = p.offsetParent; } - + ctop -= this.mainHd.dom.offsetHeight; stop = parseInt(c.scrollTop, 10); - + var cbot = ctop + rowEl.offsetHeight, ch = c.clientHeight, sbot = stop + ch; - - if(ctop < stop){ + + if (ctop < stop) { c.scrollTop = ctop; - }else if(cbot > sbot){ + } else if(cbot > sbot) { c.scrollTop = cbot-ch; } - if(hscroll !== false){ - var cleft = parseInt(cellEl.offsetLeft, 10); - var cright = cleft + cellEl.offsetWidth; + if (hscroll !== false) { + var cleft = parseInt(cellEl.offsetLeft, 10), + cright = cleft + cellEl.offsetWidth, + sleft = parseInt(c.scrollLeft, 10), + sright = sleft + c.clientWidth; - var sleft = parseInt(c.scrollLeft, 10); - var sright = sleft + c.clientWidth; - if(cleft < sleft){ + if (cleft < sleft) { c.scrollLeft = cleft; - }else if(cright > sright){ + } else if(cright > sright) { c.scrollLeft = cright-c.clientWidth; } } + return this.getResolvedXY(resolved); }, // private - insertRows : function(dm, firstRow, lastRow, isUpdate){ + insertRows : function(dm, firstRow, lastRow, isUpdate) { var last = dm.getCount() - 1; - if(!isUpdate && firstRow === 0 && lastRow >= last){ - this.fireEvent('beforerowsinserted', this, firstRow, lastRow); - this.refresh(); - this.fireEvent('rowsinserted', this, firstRow, lastRow); - }else{ - if(!isUpdate){ + if( !isUpdate && firstRow === 0 && lastRow >= last) { + this.fireEvent('beforerowsinserted', this, firstRow, lastRow); + this.refresh(); + this.fireEvent('rowsinserted', this, firstRow, lastRow); + } else { + if (!isUpdate) { this.fireEvent('beforerowsinserted', this, firstRow, lastRow); } var html = this.renderRows(firstRow, lastRow), before = this.getRow(firstRow); - if(before){ + if (before) { if(firstRow === 0){ Ext.fly(this.getRow(0)).removeClass(this.firstRowCls); } Ext.DomHelper.insertHtml('beforeBegin', before, html); - }else{ + } else { var r = this.getRow(last - 1); if(r){ Ext.fly(r).removeClass(this.lastRowCls); } Ext.DomHelper.insertHtml('beforeEnd', this.mainBody.dom, html); } - if(!isUpdate){ - this.fireEvent('rowsinserted', this, firstRow, lastRow); + if (!isUpdate) { this.processRows(firstRow); - }else if(firstRow === 0 || firstRow >= last){ + this.fireEvent('rowsinserted', this, firstRow, lastRow); + } else if (firstRow === 0 || firstRow >= last) { //ensure first/last row is kept after an update. Ext.fly(this.getRow(firstRow)).addClass(firstRow === 0 ? this.firstRowCls : this.lastRowCls); } @@ -66023,11 +72998,14 @@ viewConfig: { this.syncFocusEl(firstRow); }, - // private - deleteRows : function(dm, firstRow, lastRow){ - if(dm.getRowCount()<1){ + /** + * @private + * DEPRECATED - this doesn't appear to be called anywhere in the library, remove in 4.0. + */ + deleteRows : function(dm, firstRow, lastRow) { + if (dm.getRowCount() < 1) { this.refresh(); - }else{ + } else { this.fireEvent('beforerowsdeleted', this, firstRow, lastRow); this.removeRows(firstRow, lastRow); @@ -66037,146 +73015,226 @@ viewConfig: { } }, - // private - getColumnStyle : function(col, isHeader){ - var style = !isHeader ? (this.cm.config[col].css || '') : ''; - style += 'width:'+this.getColumnWidth(col)+';'; - if(this.cm.isHidden(col)){ - style += 'display:none;'; + /** + * @private + * Builds a CSS string for the given column index + * @param {Number} colIndex The column index + * @param {Boolean} isHeader True if getting the style for the column's header + * @return {String} The CSS string + */ + getColumnStyle : function(colIndex, isHeader) { + var colModel = this.cm, + colConfig = colModel.config, + style = isHeader ? '' : colConfig[colIndex].css || '', + align = colConfig[colIndex].align; + + style += String.format("width: {0};", this.getColumnWidth(colIndex)); + + if (colModel.isHidden(colIndex)) { + style += 'display: none; '; } - var align = this.cm.config[col].align; - if(align){ - style += 'text-align:'+align+';'; + + if (align) { + style += String.format("text-align: {0};", align); } + return style; }, - // private - getColumnWidth : function(col){ - var w = this.cm.getColumnWidth(col); - if(Ext.isNumber(w)){ - return (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2) ? w : (w - this.borderWidth > 0 ? w - this.borderWidth : 0)) + 'px'; + /** + * @private + * Returns the width of a given column minus its border width + * @return {Number} The column index + * @return {String|Number} The width in pixels + */ + getColumnWidth : function(column) { + var columnWidth = this.cm.getColumnWidth(column), + borderWidth = this.borderWidth; + + if (Ext.isNumber(columnWidth)) { + if (Ext.isBorderBox || (Ext.isWebKit && !Ext.isSafari2)) { + return columnWidth + "px"; + } else { + return Math.max(columnWidth - borderWidth, 0) + "px"; + } + } else { + return columnWidth; } - return w; }, - // private - getTotalWidth : function(){ - return this.cm.getTotalWidth()+'px'; + /** + * @private + * Returns the total width of all visible columns + * @return {String} + */ + getTotalWidth : function() { + return this.cm.getTotalWidth() + 'px'; }, - // private - fitColumns : function(preventRefresh, onlyExpand, omitColumn){ - var cm = this.cm, i; - var tw = cm.getTotalWidth(false); - var aw = this.grid.getGridEl().getWidth(true)-this.getScrollOffset(); + /** + * @private + * Resizes each column to fit the available grid width. + * TODO: The second argument isn't even used, remove it in 4.0 + * @param {Boolean} preventRefresh True to prevent resizing of each row to the new column sizes (defaults to false) + * @param {null} onlyExpand NOT USED, will be removed in 4.0 + * @param {Number} omitColumn The index of a column to leave at its current width. Defaults to undefined + * @return {Boolean} True if the operation succeeded, false if not or undefined if the grid view is not yet initialized + */ + fitColumns : function(preventRefresh, onlyExpand, omitColumn) { + var grid = this.grid, + colModel = this.cm, + totalColWidth = colModel.getTotalWidth(false), + gridWidth = this.getGridInnerWidth(), + extraWidth = gridWidth - totalColWidth, + columns = [], + extraCol = 0, + width = 0, + colWidth, fraction, i; - if(aw < 20){ // not initialized, so don't screw up the default widths - return; - } - var extra = aw - tw; - - if(extra === 0){ + // not initialized, so don't screw up the default widths + if (gridWidth < 20 || extraWidth === 0) { return false; } - var vc = cm.getColumnCount(true); - var ac = vc-(Ext.isNumber(omitColumn) ? 1 : 0); - if(ac === 0){ - ac = 1; + var visibleColCount = colModel.getColumnCount(true), + totalColCount = colModel.getColumnCount(false), + adjCount = visibleColCount - (Ext.isNumber(omitColumn) ? 1 : 0); + + if (adjCount === 0) { + adjCount = 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; + + //FIXME: the algorithm used here is odd and potentially confusing. Includes this for loop and the while after it. + for (i = 0; i < totalColCount; i++) { + if (!colModel.isFixed(i) && i !== omitColumn) { + colWidth = colModel.getColumnWidth(i); + columns.push(i, colWidth); + + if (!colModel.isHidden(i)) { + extraCol = i; + width += colWidth; + } } } - 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); + + fraction = (gridWidth - colModel.getTotalWidth()) / width; + + while (columns.length) { + colWidth = columns.pop(); + i = columns.pop(); + + colModel.setColumnWidth(i, Math.max(grid.minColumnWidth, Math.floor(colWidth + colWidth * fraction)), true); } - if((tw = cm.getTotalWidth(false)) > aw){ - var adjustCol = ac != vc ? omitColumn : extraCol; - cm.setColumnWidth(adjustCol, Math.max(1, - cm.getColumnWidth(adjustCol)- (tw-aw)), true); + //this has been changed above so remeasure now + totalColWidth = colModel.getTotalWidth(false); + + if (totalColWidth > gridWidth) { + var adjustCol = (adjCount == visibleColCount) ? extraCol : omitColumn, + newWidth = Math.max(1, colModel.getColumnWidth(adjustCol) - (totalColWidth - gridWidth)); + + colModel.setColumnWidth(adjustCol, newWidth, true); } - if(preventRefresh !== true){ + if (preventRefresh !== true) { this.updateAllColumnWidths(); } - return true; }, - // private - autoExpand : function(preventUpdate){ - var g = this.grid, cm = this.cm; - if(!this.userResized && g.autoExpandColumn){ - var tw = cm.getTotalWidth(false); - var aw = this.grid.getGridEl().getWidth(true)-this.getScrollOffset(); - if(tw != aw){ - var ci = cm.getIndexById(g.autoExpandColumn); - var currentWidth = cm.getColumnWidth(ci); - var cw = Math.min(Math.max(((aw-tw)+currentWidth), g.autoExpandMin), g.autoExpandMax); - if(cw != currentWidth){ - cm.setColumnWidth(ci, cw, true); - if(preventUpdate !== true){ - this.updateColumnWidth(ci, cw); + /** + * @private + * Resizes the configured autoExpandColumn to take the available width after the other columns have + * been accounted for + * @param {Boolean} preventUpdate True to prevent the resizing of all rows (defaults to false) + */ + autoExpand : function(preventUpdate) { + var grid = this.grid, + colModel = this.cm, + gridWidth = this.getGridInnerWidth(), + totalColumnWidth = colModel.getTotalWidth(false), + autoExpandColumn = grid.autoExpandColumn; + + if (!this.userResized && autoExpandColumn) { + if (gridWidth != totalColumnWidth) { + //if we are not already using all available width, resize the autoExpandColumn + var colIndex = colModel.getIndexById(autoExpandColumn), + currentWidth = colModel.getColumnWidth(colIndex), + desiredWidth = gridWidth - totalColumnWidth + currentWidth, + newWidth = Math.min(Math.max(desiredWidth, grid.autoExpandMin), grid.autoExpandMax); + + if (currentWidth != newWidth) { + colModel.setColumnWidth(colIndex, newWidth, true); + + if (preventUpdate !== true) { + this.updateColumnWidth(colIndex, newWidth); } } } } }, - // private - getColumnData : function(){ - // build a map for all the columns - var cs = [], cm = this.cm, colCount = cm.getColumnCount(); - for(var i = 0; i < colCount; i++){ - var name = cm.getDataIndex(i); - cs[i] = { - name : (!Ext.isDefined(name) ? this.ds.fields.get(i).name : name), - renderer : cm.getRenderer(i), - scope: cm.getRendererScope(i), - id : cm.getColumnId(i), - style : this.getColumnStyle(i) - }; - } - return cs; + /** + * Returns the total internal width available to the grid, taking the scrollbar into account + * @return {Number} The total width + */ + getGridInnerWidth: function() { + return this.grid.getGridEl().getWidth(true) - this.getScrollOffset(); }, - // private - renderRows : function(startRow, endRow){ - // pull in all the crap needed to render rows - var g = this.grid, cm = g.colModel, ds = g.store, stripe = g.stripeRows; - var colCount = cm.getColumnCount(); + /** + * @private + * Returns an array of column configurations - one for each column + * @return {Array} Array of column config objects. This includes the column name, renderer, id style and renderer + */ + getColumnData : function() { + var columns = [], + colModel = this.cm, + colCount = colModel.getColumnCount(), + fields = this.ds.fields, + i, name; - if(ds.getCount() < 1){ + for (i = 0; i < colCount; i++) { + name = colModel.getDataIndex(i); + + columns[i] = { + name : Ext.isDefined(name) ? name : (fields.get(i) ? fields.get(i).name : undefined), + renderer: colModel.getRenderer(i), + scope : colModel.getRendererScope(i), + id : colModel.getColumnId(i), + style : this.getColumnStyle(i) + }; + } + + return columns; + }, + + /** + * @private + * Renders rows between start and end indexes + * @param {Number} startRow Index of the first row to render + * @param {Number} endRow Index of the last row to render + */ + renderRows : function(startRow, endRow) { + var grid = this.grid, + store = grid.store, + stripe = grid.stripeRows, + colModel = grid.colModel, + colCount = colModel.getColumnCount(), + rowCount = store.getCount(), + records; + + if (rowCount < 1) { return ''; } - var cs = this.getColumnData(); - startRow = startRow || 0; - endRow = !Ext.isDefined(endRow) ? ds.getCount()-1 : endRow; + endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1; + records = store.getRange(startRow, endRow); - // records to render - var rs = ds.getRange(startRow, endRow); - - return this.doRender(cs, rs, ds, startRow, colCount, stripe); + return this.doRender(this.getColumnData(), records, store, startRow, colCount, stripe); }, // private @@ -66185,38 +73243,96 @@ viewConfig: { return this.templates.body.apply({rows: markup}); }, - // private - refreshRow : function(record){ - var ds = this.ds, index; - if(Ext.isNumber(record)){ - index = record; - record = ds.getAt(index); - if(!record){ - return; - } - }else{ - index = ds.indexOf(record); - if(index < 0){ - return; - } + /** + * @private + * Refreshes a row by re-rendering it. Fires the rowupdated event when done + */ + refreshRow: function(record) { + var store = this.ds, + colCount = this.cm.getColumnCount(), + columns = this.getColumnData(), + last = colCount - 1, + cls = ['x-grid3-row'], + rowParams = { + tstyle: String.format("width: {0};", this.getTotalWidth()) + }, + colBuffer = [], + cellTpl = this.templates.cell, + rowIndex, row, column, meta, css, i; + + if (Ext.isNumber(record)) { + rowIndex = record; + record = store.getAt(rowIndex); + } else { + rowIndex = store.indexOf(record); } - this.insertRows(ds, index, index, true); - this.getRow(index).rowIndex = index; - this.onRemove(ds, record, index+1, true); - this.fireEvent('rowupdated', this, index, record); + + //the record could not be found + if (!record || rowIndex < 0) { + return; + } + + //builds each column in this row + for (i = 0; i < colCount; i++) { + column = columns[i]; + + if (i == 0) { + css = 'x-grid3-cell-first'; + } else { + css = (i == last) ? 'x-grid3-cell-last ' : ''; + } + + meta = { + id : column.id, + style : column.style, + css : css, + attr : "", + cellAttr: "" + }; + // Need to set this after, because we pass meta to the renderer + meta.value = column.renderer.call(column.scope, record.data[column.name], meta, record, rowIndex, i, store); + + if (Ext.isEmpty(meta.value)) { + meta.value = ' '; + } + + if (this.markDirty && record.dirty && typeof record.modified[column.name] != 'undefined') { + meta.css += ' x-grid3-dirty-cell'; + } + + colBuffer[i] = cellTpl.apply(meta); + } + + row = this.getRow(rowIndex); + row.className = ''; + + if (this.grid.stripeRows && ((rowIndex + 1) % 2 === 0)) { + cls.push('x-grid3-row-alt'); + } + + if (this.getRowClass) { + rowParams.cols = colCount; + cls.push(this.getRowClass(record, rowIndex, rowParams, store)); + } + + this.fly(row).addClass(cls).setStyle(rowParams.tstyle); + rowParams.cells = colBuffer.join(""); + row.innerHTML = this.templates.rowInner.apply(rowParams); + + this.fireEvent('rowupdated', this, rowIndex, record); }, /** * Refreshs the grid UI * @param {Boolean} headersToo (optional) True to also refresh the headers */ - refresh : function(headersToo){ + refresh : function(headersToo) { this.fireEvent('beforerefresh', this); this.grid.stopEditing(true); var result = this.renderBody(); this.mainBody.update(result).setWidth(this.getTotalWidth()); - if(headersToo === true){ + if (headersToo === true) { this.updateHeaders(); this.updateHeaderSortState(); } @@ -66226,33 +73342,46 @@ viewConfig: { this.fireEvent('refresh', this); }, - // private - applyEmptyText : function(){ - if(this.emptyText && !this.hasRows()){ + /** + * @private + * Displays the configured emptyText if there are currently no rows to display + */ + applyEmptyText : function() { + if (this.emptyText && !this.hasRows()) { this.mainBody.update('
            ' + this.emptyText + '
            '); } }, - // private - updateHeaderSortState : function(){ + /** + * @private + * Adds sorting classes to the column headers based on the bound store's sortInfo. Fires the 'sortchange' event + * if the sorting has changed since this function was last run. + */ + updateHeaderSortState : function() { var state = this.ds.getSortState(); - if(!state){ + if (!state) { return; } - if(!this.sortState || (this.sortState.field != state.field || this.sortState.direction != state.direction)){ + + 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){ + if (sortColumn != -1) { var sortDir = state.direction; this.updateSortIcon(sortColumn, sortDir); } }, - // private - clearHeaderSortState : function(){ - if(!this.sortState){ + /** + * @private + * Removes any sorting indicator classes from the column headers + */ + clearHeaderSortState : function() { + if (!this.sortState) { return; } this.grid.fireEvent('sortchange', this.grid, null); @@ -66260,232 +73389,278 @@ viewConfig: { delete this.sortState; }, - // private - 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; + /** + * @private + * Destroys all objects associated with the GridView + */ + destroy : function() { + var me = this, + grid = me.grid, + gridEl = grid.getGridEl(), + dragZone = me.dragZone, + splitZone = me.splitZone, + columnDrag = me.columnDrag, + columnDrop = me.columnDrop, + scrollToTopTask = me.scrollToTopTask, + columnDragData, + columnDragProxy; + + if (scrollToTopTask && scrollToTopTask.cancel) { + scrollToTopTask.cancel(); } - this.initData(null, null); - this.purgeListeners(); - Ext.fly(this.innerHd).un("click", this.handleHdDown, this); + Ext.destroyMembers(me, 'colMenu', 'hmenu'); - if(this.grid.enableColumnMove){ + me.initData(null, null); + me.purgeListeners(); + + Ext.fly(me.innerHd).un("click", me.handleHdDown, me); + + if (grid.enableColumnMove) { + columnDragData = columnDrag.dragData; + columnDragProxy = columnDrag.proxy; Ext.destroy( - this.columnDrag.el, - this.columnDrag.proxy.ghost, - this.columnDrag.proxy.el, - this.columnDrop.el, - this.columnDrop.proxyTop, - this.columnDrop.proxyBottom, - this.columnDrag.dragData.ddel, - this.columnDrag.dragData.header + columnDrag.el, + columnDragProxy.ghost, + columnDragProxy.el, + columnDrop.el, + columnDrop.proxyTop, + columnDrop.proxyBottom, + columnDragData.ddel, + columnDragData.header ); - if (this.columnDrag.proxy.anim) { - Ext.destroy(this.columnDrag.proxy.anim); + + if (columnDragProxy.anim) { + Ext.destroy(columnDragProxy.anim); } - delete this.columnDrag.proxy.ghost; - delete this.columnDrag.dragData.ddel; - delete this.columnDrag.dragData.header; - this.columnDrag.destroy(); - delete Ext.dd.DDM.locationCache[this.columnDrag.id]; - delete this.columnDrag._domRef; - delete this.columnDrop.proxyTop; - delete this.columnDrop.proxyBottom; - this.columnDrop.destroy(); - delete Ext.dd.DDM.locationCache["gridHeader" + this.grid.getGridEl().id]; - delete this.columnDrop._domRef; - delete Ext.dd.DDM.ids[this.columnDrop.ddGroup]; + delete columnDragProxy.ghost; + delete columnDragData.ddel; + delete columnDragData.header; + columnDrag.destroy(); + + delete Ext.dd.DDM.locationCache[columnDrag.id]; + delete columnDrag._domRef; + + delete columnDrop.proxyTop; + delete columnDrop.proxyBottom; + columnDrop.destroy(); + delete Ext.dd.DDM.locationCache["gridHeader" + gridEl.id]; + delete columnDrop._domRef; + delete Ext.dd.DDM.ids[columnDrop.ddGroup]; } - if (this.splitZone){ // enableColumnResize - this.splitZone.destroy(); - delete this.splitZone._domRef; - delete Ext.dd.DDM.ids["gridSplitters" + this.grid.getGridEl().id]; + if (splitZone) { // enableColumnResize + splitZone.destroy(); + delete splitZone._domRef; + delete Ext.dd.DDM.ids["gridSplitters" + gridEl.id]; } - Ext.fly(this.innerHd).removeAllListeners(); - Ext.removeNode(this.innerHd); - delete this.innerHd; + Ext.fly(me.innerHd).removeAllListeners(); + Ext.removeNode(me.innerHd); + delete me.innerHd; Ext.destroy( - this.el, - this.mainWrap, - this.mainHd, - this.scroller, - this.mainBody, - this.focusEl, - this.resizeMarker, - this.resizeProxy, - this.activeHdBtn, - this.dragZone, - this.splitZone, - this._flyweight + me.el, + me.mainWrap, + me.mainHd, + me.scroller, + me.mainBody, + me.focusEl, + me.resizeMarker, + me.resizeProxy, + me.activeHdBtn, + me._flyweight, + dragZone, + splitZone ); - delete this.grid.container; + delete grid.container; - if(this.dragZone){ - this.dragZone.destroy(); + if (dragZone) { + dragZone.destroy(); } Ext.dd.DDM.currentTarget = null; - delete Ext.dd.DDM.locationCache[this.grid.getGridEl().id]; + delete Ext.dd.DDM.locationCache[gridEl.id]; - Ext.EventManager.removeResizeListener(this.onWindowResize, this); + Ext.EventManager.removeResizeListener(me.onWindowResize, me); }, // private - onDenyColumnHide : function(){ + onDenyColumnHide : function() { }, // private - render : function(){ - if(this.autoFill){ + render : function() { + if (this.autoFill) { var ct = this.grid.ownerCt; - if (ct && ct.getLayout()){ - ct.on('afterlayout', function(){ + + if (ct && ct.getLayout()) { + ct.on('afterlayout', function() { this.fitColumns(true, true); - this.updateHeaders(); - }, this, {single: true}); - }else{ - this.fitColumns(true, true); + this.updateHeaders(); + this.updateHeaderSortState(); + }, this, {single: true}); } - }else if(this.forceFit){ + } else if (this.forceFit) { this.fitColumns(true, false); - }else if(this.grid.autoExpandColumn){ + } else if (this.grid.autoExpandColumn) { this.autoExpand(true); } - this.renderUI(); + this.grid.getGridEl().dom.innerHTML = this.renderUI(); + + this.afterRenderUI(); }, /* --------------------------------- Model Events and Handlers --------------------------------*/ - // private - initData : function(ds, cm){ - if(this.ds){ - this.ds.un('load', this.onLoad, this); - this.ds.un('datachanged', this.onDataChange, this); - this.ds.un('add', this.onAdd, this); - this.ds.un('remove', this.onRemove, this); - this.ds.un('update', this.onUpdate, this); - this.ds.un('clear', this.onClear, this); - if(this.ds !== ds && this.ds.autoDestroy){ - this.ds.destroy(); + + /** + * @private + * Binds a new Store and ColumnModel to this GridView. Removes any listeners from the old objects (if present) + * and adds listeners to the new ones + * @param {Ext.data.Store} newStore The new Store instance + * @param {Ext.grid.ColumnModel} newColModel The new ColumnModel instance + */ + initData : function(newStore, newColModel) { + var me = this; + + if (me.ds) { + var oldStore = me.ds; + + oldStore.un('add', me.onAdd, me); + oldStore.un('load', me.onLoad, me); + oldStore.un('clear', me.onClear, me); + oldStore.un('remove', me.onRemove, me); + oldStore.un('update', me.onUpdate, me); + oldStore.un('datachanged', me.onDataChange, me); + + if (oldStore !== newStore && oldStore.autoDestroy) { + oldStore.destroy(); } } - if(ds){ - ds.on({ - scope: this, - load: this.onLoad, - datachanged: this.onDataChange, - add: this.onAdd, - remove: this.onRemove, - update: this.onUpdate, - clear: this.onClear - }); - } - 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); - } - if(cm){ - delete this.lastViewWidth; - cm.on({ - scope: this, - configchange: this.onColConfigChange, - widthchange: this.onColWidthChange, - headerchange: this.onHeaderChange, - hiddenchange: this.onHiddenChange, - columnmoved: this.onColumnMove + if (newStore) { + newStore.on({ + scope : me, + load : me.onLoad, + add : me.onAdd, + remove : me.onRemove, + update : me.onUpdate, + clear : me.onClear, + datachanged: me.onDataChange }); } - this.cm = cm; + + if (me.cm) { + var oldColModel = me.cm; + + oldColModel.un('configchange', me.onColConfigChange, me); + oldColModel.un('widthchange', me.onColWidthChange, me); + oldColModel.un('headerchange', me.onHeaderChange, me); + oldColModel.un('hiddenchange', me.onHiddenChange, me); + oldColModel.un('columnmoved', me.onColumnMove, me); + } + + if (newColModel) { + delete me.lastViewWidth; + + newColModel.on({ + scope : me, + configchange: me.onColConfigChange, + widthchange : me.onColWidthChange, + headerchange: me.onHeaderChange, + hiddenchange: me.onHiddenChange, + columnmoved : me.onColumnMove + }); + } + + me.ds = newStore; + me.cm = newColModel; }, // private onDataChange : function(){ - this.refresh(); + this.refresh(true); this.updateHeaderSortState(); this.syncFocusEl(0); }, // private - onClear : function(){ + onClear : function() { this.refresh(); this.syncFocusEl(0); }, // private - onUpdate : function(ds, record){ + onUpdate : function(store, record) { this.refreshRow(record); }, // private - onAdd : function(ds, records, index){ - - this.insertRows(ds, index, index + (records.length-1)); + onAdd : function(store, records, index) { + this.insertRows(store, index, index + (records.length-1)); }, // private - onRemove : function(ds, record, index, isUpdate){ - if(isUpdate !== true){ + onRemove : function(store, record, index, isUpdate) { + if (isUpdate !== true) { this.fireEvent('beforerowremoved', this, index, record); } + this.removeRow(index); - if(isUpdate !== true){ + + if (isUpdate !== true) { this.processRows(index); this.applyEmptyText(); this.fireEvent('rowremoved', this, index, record); } }, - // private - onLoad : function(){ - this.scrollToTop.defer(Ext.isGecko ? 1 : 0, this); + /** + * @private + * Called when a store is loaded, scrolls to the top row + */ + onLoad : function() { + if (Ext.isGecko) { + if (!this.scrollToTopTask) { + this.scrollToTopTask = new Ext.util.DelayedTask(this.scrollToTop, this); + } + this.scrollToTopTask.delay(1); + } else { + this.scrollToTop(); + } }, // private - onColWidthChange : function(cm, col, width){ + onColWidthChange : function(cm, col, width) { this.updateColumnWidth(col, width); }, // private - onHeaderChange : function(cm, col, text){ + onHeaderChange : function(cm, col, text) { this.updateHeaders(); }, // private - onHiddenChange : function(cm, col, hidden){ + onHiddenChange : function(cm, col, hidden) { this.updateColumnHidden(col, hidden); }, // private - onColumnMove : function(cm, oldIndex, newIndex){ + onColumnMove : function(cm, oldIndex, newIndex) { this.indexMap = null; - var s = this.getScrollState(); this.refresh(true); - this.restoreScroll(s); + this.restoreScroll(this.getScrollState()); + this.afterMove(newIndex); this.grid.fireEvent('columnmove', oldIndex, newIndex); }, // private - onColConfigChange : function(){ + onColConfigChange : function() { delete this.lastViewWidth; this.indexMap = null; this.refresh(true); @@ -66493,209 +73668,318 @@ viewConfig: { /* -------------------- UI Events and Handlers ------------------------------ */ // private - initUI : function(grid){ + initUI : function(grid) { grid.on('headerclick', this.onHeaderClick, this); }, // private - initEvents : function(){ - }, + initEvents : Ext.emptyFn, // private - onHeaderClick : function(g, index){ - if(this.headersDisabled || !this.cm.isSortable(index)){ + onHeaderClick : function(g, index) { + if (this.headersDisabled || !this.cm.isSortable(index)) { return; } g.stopEditing(true); g.store.sort(this.cm.getDataIndex(index)); }, - // private - onRowOver : function(e, t){ - var row; - if((row = this.findRowIndex(t)) !== false){ - this.addRowClass(row, 'x-grid3-row-over'); + /** + * @private + * Adds the hover class to a row when hovered over + */ + onRowOver : function(e, target) { + var row = this.findRowIndex(target); + + if (row !== false) { + this.addRowClass(row, this.rowOverCls); + } + }, + + /** + * @private + * Removes the hover class from a row on mouseout + */ + onRowOut : function(e, target) { + var row = this.findRowIndex(target); + + if (row !== false && !e.within(this.getRow(row), true)) { + this.removeRowClass(row, this.rowOverCls); } }, // private - 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'); - } - }, - - // private - handleWheel : function(e){ - e.stopPropagation(); - }, - - // private - onRowSelect : function(row){ + onRowSelect : function(row) { this.addRowClass(row, this.selectedRowClass); }, // private - onRowDeselect : function(row){ + onRowDeselect : function(row) { this.removeRowClass(row, this.selectedRowClass); }, // private - onCellSelect : function(row, col){ + onCellSelect : function(row, col) { var cell = this.getCell(row, col); - if(cell){ + if (cell) { this.fly(cell).addClass('x-grid3-cell-selected'); } }, // private - onCellDeselect : function(row, col){ + onCellDeselect : function(row, col) { var cell = this.getCell(row, col); - if(cell){ + if (cell) { this.fly(cell).removeClass('x-grid3-cell-selected'); } }, // private - onColumnSplitterMoved : function(i, w){ - this.userResized = true; - var cm = this.grid.colModel; - cm.setColumnWidth(i, w, true); + handleWheel : function(e) { + e.stopPropagation(); + }, - if(this.forceFit){ - this.fitColumns(true, false, i); + /** + * @private + * Called by the SplitDragZone when a drag has been completed. Resizes the columns + */ + onColumnSplitterMoved : function(cellIndex, width) { + this.userResized = true; + this.grid.colModel.setColumnWidth(cellIndex, width, true); + + if (this.forceFit) { + this.fitColumns(true, false, cellIndex); this.updateAllColumnWidths(); - }else{ - this.updateColumnWidth(i, w); + } else { + this.updateColumnWidth(cellIndex, width); this.syncHeaderScroll(); } - this.grid.fireEvent('columnresize', i, w); + this.grid.fireEvent('columnresize', cellIndex, width); }, - // private - handleHdMenuClick : function(item){ - var index = this.hdCtxIndex, - cm = this.cm, - ds = this.ds, - id = item.getItemId(); - switch(id){ - case 'asc': - ds.sort(cm.getDataIndex(index), 'ASC'); - break; - case 'desc': - ds.sort(cm.getDataIndex(index), 'DESC'); - break; - default: - index = cm.getIndexById(id.substr(4)); - if(index != -1){ - if(item.checked && cm.getColumnsBy(this.isHideableColumn, this).length <= 1){ - this.onDenyColumnHide(); - return false; - } - cm.setHidden(index, item.checked); - } - } - return true; - }, + /** + * @private + * Click handler for the shared column dropdown menu, called on beforeshow. Builds the menu + * which displays the list of columns for the user to show or hide. + */ + beforeColMenuShow : function() { + var colModel = this.cm, + colCount = colModel.getColumnCount(), + colMenu = this.colMenu, + i; - // private - isHideableColumn : function(c){ - return !c.hidden && !c.fixed; - }, + colMenu.removeAll(); - // private - beforeColMenuShow : function(){ - var cm = this.cm, colCount = cm.getColumnCount(); - this.colMenu.removeAll(); - for(var i = 0; i < colCount; i++){ - if(cm.config[i].fixed !== true && cm.config[i].hideable !== false){ - this.colMenu.add(new Ext.menu.CheckItem({ - itemId: 'col-'+cm.getColumnId(i), - text: cm.getColumnHeader(i), - checked: !cm.isHidden(i), - hideOnClick:false, - disabled: cm.config[i].hideable === false + for (i = 0; i < colCount; i++) { + if (colModel.config[i].hideable !== false) { + colMenu.add(new Ext.menu.CheckItem({ + text : colModel.getColumnHeader(i), + itemId : 'col-' + colModel.getColumnId(i), + checked : !colModel.isHidden(i), + disabled : colModel.config[i].hideable === false, + hideOnClick: false })); } } }, - // private - handleHdDown : function(e, t){ - if(Ext.fly(t).hasClass('x-grid3-hd-btn')){ - e.stopEvent(); - var hd = this.findHeaderCell(t); - Ext.fly(hd).addClass('x-grid3-hd-menu-open'); - var index = this.getCellIndex(hd); - this.hdCtxIndex = index; - var ms = this.hmenu.items, cm = this.cm; - ms.get('asc').setDisabled(!cm.isSortable(index)); - ms.get('desc').setDisabled(!cm.isSortable(index)); - this.hmenu.on('hide', function(){ - Ext.fly(hd).removeClass('x-grid3-hd-menu-open'); - }, this, {single:true}); - this.hmenu.show(t, 'tl-bl?'); + /** + * @private + * Attached as the 'itemclick' handler to the header menu and the column show/hide submenu (if available). + * Performs sorting if the sorter buttons were clicked, otherwise hides/shows the column that was clicked. + */ + handleHdMenuClick : function(item) { + var store = this.ds, + dataIndex = this.cm.getDataIndex(this.hdCtxIndex); + + switch (item.getItemId()) { + case 'asc': + store.sort(dataIndex, 'ASC'); + break; + case 'desc': + store.sort(dataIndex, 'DESC'); + break; + default: + this.handleHdMenuClickDefault(item); + } + return true; + }, + + /** + * Called by handleHdMenuClick if any button except a sort ASC/DESC button was clicked. The default implementation provides + * the column hide/show functionality based on the check state of the menu item. A different implementation can be provided + * if needed. + * @param {Ext.menu.BaseItem} item The menu item that was clicked + */ + handleHdMenuClickDefault: function(item) { + var colModel = this.cm, + itemId = item.getItemId(), + index = colModel.getIndexById(itemId.substr(4)); + + if (index != -1) { + if (item.checked && colModel.getColumnsBy(this.isHideableColumn, this).length <= 1) { + this.onDenyColumnHide(); + return; + } + colModel.setHidden(index, item.checked); } }, - // private - handleHdOver : function(e, t){ - var hd = this.findHeaderCell(t); - if(hd && !this.headersDisabled){ - this.activeHdRef = t; - this.activeHdIndex = this.getCellIndex(hd); - var fly = this.fly(hd); + /** + * @private + * Called when a header cell is clicked - shows the menu if the click happened over a trigger button + */ + handleHdDown : function(e, target) { + if (Ext.fly(target).hasClass('x-grid3-hd-btn')) { + e.stopEvent(); + + var colModel = this.cm, + header = this.findHeaderCell(target), + index = this.getCellIndex(header), + sortable = colModel.isSortable(index), + menu = this.hmenu, + menuItems = menu.items, + menuCls = this.headerMenuOpenCls; + + this.hdCtxIndex = index; + + Ext.fly(header).addClass(menuCls); + menuItems.get('asc').setDisabled(!sortable); + menuItems.get('desc').setDisabled(!sortable); + + menu.on('hide', function() { + Ext.fly(header).removeClass(menuCls); + }, this, {single:true}); + + menu.show(target, 'tl-bl?'); + } + }, + + /** + * @private + * Attached to the headers' mousemove event. This figures out the CSS cursor to use based on where the mouse is currently + * pointed. If the mouse is currently hovered over the extreme left or extreme right of any header cell and the cell next + * to it is resizable it is given the resize cursor, otherwise the cursor is set to an empty string. + */ + handleHdMove : function(e) { + var header = this.findHeaderCell(this.activeHdRef); + + if (header && !this.headersDisabled) { + var handleWidth = this.splitHandleWidth || 5, + activeRegion = this.activeHdRegion, + headerStyle = header.style, + colModel = this.cm, + cursor = '', + pageX = e.getPageX(); + + if (this.grid.enableColumnResize !== false) { + var activeHeaderIndex = this.activeHdIndex, + previousVisible = this.getPreviousVisible(activeHeaderIndex), + currentResizable = colModel.isResizable(activeHeaderIndex), + previousResizable = previousVisible && colModel.isResizable(previousVisible), + inLeftResizer = pageX - activeRegion.left <= handleWidth, + inRightResizer = activeRegion.right - pageX <= (!this.activeHdBtn ? handleWidth : 2); + + if (inLeftResizer && previousResizable) { + cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; // col-resize not always supported + } else if (inRightResizer && currentResizable) { + cursor = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize'; + } + } + + headerStyle.cursor = cursor; + } + }, + + /** + * @private + * Returns the index of the nearest currently visible header to the left of the given index. + * @param {Number} index The header index + * @return {Number/undefined} The index of the nearest visible header + */ + getPreviousVisible: function(index) { + while (index > 0) { + if (!this.cm.isHidden(index - 1)) { + return index; + } + index--; + } + return undefined; + }, + + /** + * @private + * Tied to the header element's mouseover event - adds the over class to the header cell if the menu is not disabled + * for that cell + */ + handleHdOver : function(e, target) { + var header = this.findHeaderCell(target); + + if (header && !this.headersDisabled) { + var fly = this.fly(header); + + this.activeHdRef = target; + this.activeHdIndex = this.getCellIndex(header); this.activeHdRegion = fly.getRegion(); - if(!this.cm.isMenuDisabled(this.activeHdIndex)){ + + if (!this.isMenuDisabled(this.activeHdIndex, fly)) { fly.addClass('x-grid3-hd-over'); this.activeHdBtn = fly.child('.x-grid3-hd-btn'); - if(this.activeHdBtn){ - this.activeHdBtn.dom.style.height = (hd.firstChild.offsetHeight-1)+'px'; + + if (this.activeHdBtn) { + this.activeHdBtn.dom.style.height = (header.firstChild.offsetHeight - 1) + 'px'; } } } }, - // private - handleHdMove : function(e, t){ - var hd = this.findHeaderCell(this.activeHdRef); - if(hd && !this.headersDisabled){ - var hw = this.splitHandleWidth || 5, - r = this.activeHdRegion, - x = e.getPageX(), - ss = hd.style, - cur = ''; - if(this.grid.enableColumnResize !== false){ - if(x - r.left <= hw && this.cm.isResizable(this.activeHdIndex-1)){ - cur = Ext.isAir ? 'move' : Ext.isWebKit ? 'e-resize' : 'col-resize'; // col-resize not always supported - }else if(r.right - x <= (!this.activeHdBtn ? hw : 2) && this.cm.isResizable(this.activeHdIndex)){ - cur = Ext.isAir ? 'move' : Ext.isWebKit ? 'w-resize' : 'col-resize'; - } - } - ss.cursor = cur; - } - }, + /** + * @private + * Tied to the header element's mouseout event. Removes the hover class from the header cell + */ + handleHdOut : function(e, target) { + var header = this.findHeaderCell(target); - // private - handleHdOut : function(e, t){ - var hd = this.findHeaderCell(t); - if(hd && (!Ext.isIE || !e.within(hd, true))){ + if (header && (!Ext.isIE || !e.within(header, true))) { this.activeHdRef = null; - this.fly(hd).removeClass('x-grid3-hd-over'); - hd.style.cursor = ''; + this.fly(header).removeClass('x-grid3-hd-over'); + header.style.cursor = ''; } }, - // private - hasRows : function(){ + /** + * @private + * Used by {@link #handleHdOver} to determine whether or not to show the header menu class on cell hover + * @param {Number} cellIndex The header cell index + * @param {Ext.Element} el The cell element currently being hovered over + */ + isMenuDisabled: function(cellIndex, el) { + return this.cm.isMenuDisabled(cellIndex); + }, + + /** + * @private + * Returns true if there are any rows rendered into the GridView + * @return {Boolean} True if any rows have been rendered + */ + hasRows : function() { var fc = this.mainBody.dom.firstChild; return fc && fc.nodeType == 1 && fc.className != 'x-grid-empty'; }, - // back compat - bind : function(d, c){ + /** + * @private + */ + isHideableColumn : function(c) { + return !c.hidden; + }, + + /** + * @private + * DEPRECATED - will be removed in Ext JS 5.0 + */ + bind : function(d, c) { this.initData(d, c); } }); @@ -66703,29 +73987,31 @@ viewConfig: { // private // This is a support class used internally by the Grid components -Ext.grid.GridView.SplitDragZone = function(grid, hd){ - this.grid = grid; - this.view = grid.getView(); - this.marker = this.view.resizeMarker; - this.proxy = this.view.resizeProxy; - Ext.grid.GridView.SplitDragZone.superclass.constructor.call(this, hd, - 'gridSplitters' + this.grid.getGridEl().id, { - dragElId : Ext.id(this.proxy.dom), resizeFrame:false - }); - this.scroll = false; - this.hw = this.view.splitHandleWidth || 5; -}; -Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { +Ext.grid.GridView.SplitDragZone = Ext.extend(Ext.dd.DDProxy, { + + constructor: 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; + }, b4StartDrag : function(x, y){ + this.dragHeadersDisabled = this.view.headersDisabled; 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); + var w = this.cm.getColumnWidth(this.cellIndex), + minw = Math.max(w-this.grid.minColumnWidth, 0); this.resetConstraints(); this.setXConstraint(minw, 1000); this.setYConstraint(0, 0); @@ -66734,18 +74020,21 @@ Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { this.startPos = x; Ext.dd.DDProxy.prototype.b4StartDrag.call(this, x, y); }, - + allowHeaderDrag : function(e){ return true; }, - handleMouseDown : function(e){ var t = this.view.findHeaderCell(e.getTarget()); if(t && this.allowHeaderDrag(e)){ - 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; + var xy = this.view.fly(t).getXY(), + x = xy[0], + exy = e.getXY(), + ex = exy[0], + w = t.offsetWidth, + adjust = false; + if((ex - x) <= this.hw){ adjust = -1; }else if((x+w) - ex <= this.hw){ @@ -66778,12 +74067,14 @@ Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { endDrag : function(e){ this.marker.hide(); - var v = this.view; - var endX = Math.max(this.minX, e.getPageX()); - var diff = endX - this.startPos; + var v = this.view, + endX = Math.max(this.minX, e.getPageX()), + diff = endX - this.startPos, + disabled = this.dragHeadersDisabled; + v.onColumnSplitterMoved(this.cellIndex, this.cm.getColumnWidth(this.cellIndex)+diff); setTimeout(function(){ - v.headersDisabled = false; + v.headersDisabled = disabled; }, 50); }, @@ -66791,6 +74082,766 @@ Ext.extend(Ext.grid.GridView.SplitDragZone, Ext.dd.DDProxy, { this.setDelta(0,0); } }); +/** + * @class Ext.grid.PivotGridView + * @extends Ext.grid.GridView + * Specialised GridView for rendering Pivot Grid components. Config can be passed to the PivotGridView via the PivotGrid constructor's + * viewConfig option: +
            
            +new Ext.grid.PivotGrid({
            +    viewConfig: {
            +        title: 'My Pivot Grid',
            +        getCellCls: function(value) {
            +            return value > 10 'red' : 'green';
            +        }
            +    }
            +});
            +
            + *

            Currently {@link #title} and {@link #getCellCls} are the only configuration options accepted by PivotGridView. All other + * interaction is performed via the {@link Ext.grid.PivotGrid PivotGrid} class.

            + */ +Ext.grid.PivotGridView = Ext.extend(Ext.grid.GridView, { + + /** + * The CSS class added to all group header cells. Defaults to 'grid-hd-group-cell' + * @property colHeaderCellCls + * @type String + */ + colHeaderCellCls: 'grid-hd-group-cell', + + /** + * @cfg {String} title Optional title to be placed in the top left corner of the PivotGrid. Defaults to an empty string. + */ + title: '', + + /** + * @cfg {Function} getCellCls Optional function which should return a CSS class name for each cell value. This is useful when + * color coding cells based on their value. Defaults to undefined. + */ + + /** + * Returns the headers to be rendered at the top of the grid. Should be a 2-dimensional array, where each item specifies the number + * of columns it groups (column in this case refers to normal grid columns). In the example below we have 5 city groups, which are + * each part of a continent supergroup. The colspan for each city group refers to the number of normal grid columns that group spans, + * so in this case the grid would be expected to have a total of 12 columns: +
            
            +[
            +    {
            +        items: [
            +            {header: 'England',   colspan: 5},
            +            {header: 'USA',       colspan: 3}
            +        ]
            +    },
            +    {
            +        items: [
            +            {header: 'London',    colspan: 2},
            +            {header: 'Cambridge', colspan: 3},
            +            {header: 'Palo Alto', colspan: 3}
            +        ]
            +    }
            +]
            +
            + * In the example above we have cities nested under countries. The nesting could be deeper if desired - e.g. Continent -> Country -> + * State -> City, or any other structure. The only constaint is that the same depth must be used throughout the structure. + * @return {Array} A tree structure containing the headers to be rendered. Must include the colspan property at each level, which should + * be the sum of all child nodes beneath this node. + */ + getColumnHeaders: function() { + return this.grid.topAxis.buildHeaders();; + }, + + /** + * Returns the headers to be rendered on the left of the grid. Should be a 2-dimensional array, where each item specifies the number + * of rows it groups. In the example below we have 5 city groups, which are each part of a continent supergroup. The rowspan for each + * city group refers to the number of normal grid columns that group spans, so in this case the grid would be expected to have a + * total of 12 rows: +
            
            +[
            +    {
            +        width: 90,
            +        items: [
            +            {header: 'England',   rowspan: 5},
            +            {header: 'USA',       rowspan: 3}
            +        ]
            +    },
            +    {
            +        width: 50,
            +        items: [
            +            {header: 'London',    rowspan: 2},
            +            {header: 'Cambridge', rowspan: 3},
            +            {header: 'Palo Alto', rowspan: 3}
            +        ]
            +    }
            +]
            +
            + * In the example above we have cities nested under countries. The nesting could be deeper if desired - e.g. Continent -> Country -> + * State -> City, or any other structure. The only constaint is that the same depth must be used throughout the structure. + * @return {Array} A tree structure containing the headers to be rendered. Must include the colspan property at each level, which should + * be the sum of all child nodes beneath this node. + * Each group may specify the width it should be rendered with. + * @return {Array} The row groups + */ + getRowHeaders: function() { + return this.grid.leftAxis.buildHeaders(); + }, + + /** + * @private + * Renders rows between start and end indexes + * @param {Number} startRow Index of the first row to render + * @param {Number} endRow Index of the last row to render + */ + renderRows : function(startRow, endRow) { + var grid = this.grid, + rows = grid.extractData(), + rowCount = rows.length, + templates = this.templates, + renderer = grid.renderer, + hasRenderer = typeof renderer == 'function', + getCellCls = this.getCellCls, + hasGetCellCls = typeof getCellCls == 'function', + cellTemplate = templates.cell, + rowTemplate = templates.row, + rowBuffer = [], + meta = {}, + tstyle = 'width:' + this.getGridInnerWidth() + 'px;', + colBuffer, colCount, column, i, row; + + startRow = startRow || 0; + endRow = Ext.isDefined(endRow) ? endRow : rowCount - 1; + + for (i = 0; i < rowCount; i++) { + row = rows[i]; + colCount = row.length; + colBuffer = []; + + //build up each column's HTML + for (var j = 0; j < colCount; j++) { + + meta.id = i + '-' + j; + meta.css = j === 0 ? 'x-grid3-cell-first ' : (j == (colCount - 1) ? 'x-grid3-cell-last ' : ''); + meta.attr = meta.cellAttr = ''; + meta.value = row[j]; + + if (Ext.isEmpty(meta.value)) { + meta.value = ' '; + } + + if (hasRenderer) { + meta.value = renderer(meta.value); + } + + if (hasGetCellCls) { + meta.css += getCellCls(meta.value) + ' '; + } + + colBuffer[colBuffer.length] = cellTemplate.apply(meta); + } + + rowBuffer[rowBuffer.length] = rowTemplate.apply({ + tstyle: tstyle, + cols : colCount, + cells : colBuffer.join(""), + alt : '' + }); + } + + return rowBuffer.join(""); + }, + + /** + * The master template to use when rendering the GridView. Has a default template + * @property Ext.Template + * @type masterTpl + */ + masterTpl: new Ext.Template( + '
            ', + '
            ', + '
            ', + '
            {title}
            ', + '
            ', + '
            ', + '
            ', + '
            ', + '
            ', + '
            ', + '
            ', + '
            {body}
            ', + '', + '
            ', + '
            ', + '
             
            ', + '
             
            ', + '
            ' + ), + + /** + * @private + * Adds a gcell template to the internal templates object. This is used to render the headers in a multi-level column header. + */ + initTemplates: function() { + Ext.grid.PivotGridView.superclass.initTemplates.apply(this, arguments); + + var templates = this.templates || {}; + if (!templates.gcell) { + templates.gcell = new Ext.XTemplate( + '', + '
            ', + this.grid.enableHdMenu ? '' : '', '{value}', + '
            ', + '' + ); + } + + this.templates = templates; + this.hrowRe = new RegExp("ux-grid-hd-group-row-(\\d+)", ""); + }, + + /** + * @private + * Sets up the reference to the row headers element + */ + initElements: function() { + Ext.grid.PivotGridView.superclass.initElements.apply(this, arguments); + + /** + * @property rowHeadersEl + * @type Ext.Element + * The element containing all row headers + */ + this.rowHeadersEl = new Ext.Element(this.scroller.child('div.x-grid3-row-headers')); + + /** + * @property headerTitleEl + * @type Ext.Element + * The element that contains the optional title (top left section of the pivot grid) + */ + this.headerTitleEl = new Ext.Element(this.mainHd.child('div.x-grid3-header-title')); + }, + + /** + * @private + * Takes row headers into account when calculating total available width + */ + getGridInnerWidth: function() { + var previousWidth = Ext.grid.PivotGridView.superclass.getGridInnerWidth.apply(this, arguments); + + return previousWidth - this.getTotalRowHeaderWidth(); + }, + + /** + * Returns the total width of all row headers as specified by {@link #getRowHeaders} + * @return {Number} The total width + */ + getTotalRowHeaderWidth: function() { + var headers = this.getRowHeaders(), + length = headers.length, + total = 0, + i; + + for (i = 0; i< length; i++) { + total += headers[i].width; + } + + return total; + }, + + /** + * @private + * Returns the total height of all column headers + * @return {Number} The total height + */ + getTotalColumnHeaderHeight: function() { + return this.getColumnHeaders().length * 21; + }, + + /** + * Inherit docs + * @private + * @param {HTMLElement} el + */ + getCellIndex : function(el) { + if (el) { + var match = el.className.match(this.colRe), + data; + + if (match && (data = match[1])) { + return parseInt(data.split('-')[1], 10); + } + } + return false; + }, + + + /** + * @private + * Slight specialisation of the GridView renderUI - just adds the row headers + */ + renderUI : function() { + var templates = this.templates, + innerWidth = this.getGridInnerWidth(); + + return templates.master.apply({ + body : templates.body.apply({rows:' '}), + ostyle: 'width:' + innerWidth + 'px', + bstyle: 'width:' + innerWidth + 'px' + }); + }, + + /** + * @private + * Make sure that the headers and rows are all sized correctly during layout + */ + onLayout: function(width, height) { + Ext.grid.PivotGridView.superclass.onLayout.apply(this, arguments); + + var width = this.getGridInnerWidth(); + + this.resizeColumnHeaders(width); + this.resizeAllRows(width); + }, + + /** + * Refreshs the grid UI + * @param {Boolean} headersToo (optional) True to also refresh the headers + */ + refresh : function(headersToo) { + this.fireEvent('beforerefresh', this); + this.grid.stopEditing(true); + + var result = this.renderBody(); + this.mainBody.update(result).setWidth(this.getGridInnerWidth()); + if (headersToo === true) { + this.updateHeaders(); + this.updateHeaderSortState(); + } + this.processRows(0, true); + this.layout(); + this.applyEmptyText(); + this.fireEvent('refresh', this); + }, + + /** + * @private + * Bypasses GridView's renderHeaders as they are taken care of separately by the PivotAxis instances + */ + renderHeaders: Ext.emptyFn, + + /** + * @private + * Taken care of by PivotAxis + */ + fitColumns: Ext.emptyFn, + + /** + * @private + * Called on layout, ensures that the width of each column header is correct. Omitting this can lead to faulty + * layouts when nested in a container. + * @param {Number} width The new width + */ + resizeColumnHeaders: function(width) { + var topAxis = this.grid.topAxis; + + if (topAxis.rendered) { + topAxis.el.setWidth(width); + } + }, + + /** + * @private + * Sets the row header div to the correct width. Should be called after rendering and reconfiguration of headers + */ + resizeRowHeaders: function() { + var rowHeaderWidth = this.getTotalRowHeaderWidth(), + marginStyle = String.format("margin-left: {0}px;", rowHeaderWidth); + + this.rowHeadersEl.setWidth(rowHeaderWidth); + this.mainBody.applyStyles(marginStyle); + Ext.fly(this.innerHd).applyStyles(marginStyle); + + this.headerTitleEl.setWidth(rowHeaderWidth); + this.headerTitleEl.setHeight(this.getTotalColumnHeaderHeight()); + }, + + /** + * @private + * Resizes all rendered rows to the given width. Usually called by onLayout + * @param {Number} width The new width + */ + resizeAllRows: function(width) { + var rows = this.getRows(), + length = rows.length, + i; + + for (i = 0; i < length; i++) { + Ext.fly(rows[i]).setWidth(width); + Ext.fly(rows[i]).child('table').setWidth(width); + } + }, + + /** + * @private + * Updates the Row Headers, deferring the updating of Column Headers to GridView + */ + updateHeaders: function() { + this.renderGroupRowHeaders(); + this.renderGroupColumnHeaders(); + }, + + /** + * @private + * Renders all row header groups at all levels based on the structure fetched from {@link #getGroupRowHeaders} + */ + renderGroupRowHeaders: function() { + var leftAxis = this.grid.leftAxis; + + this.resizeRowHeaders(); + leftAxis.rendered = false; + leftAxis.render(this.rowHeadersEl); + + this.setTitle(this.title); + }, + + /** + * Sets the title text in the top left segment of the PivotGridView + * @param {String} title The title + */ + setTitle: function(title) { + this.headerTitleEl.child('span').dom.innerHTML = title; + }, + + /** + * @private + * Renders all column header groups at all levels based on the structure fetched from {@link #getColumnHeaders} + */ + renderGroupColumnHeaders: function() { + var topAxis = this.grid.topAxis; + + topAxis.rendered = false; + topAxis.render(this.innerHd.firstChild); + }, + + /** + * @private + * Overridden to test whether the user is hovering over a group cell, in which case we don't show the menu + */ + isMenuDisabled: function(cellIndex, el) { + return true; + } +});/** + * @class Ext.grid.PivotAxis + * @extends Ext.Component + *

            PivotAxis is a class that supports a {@link Ext.grid.PivotGrid}. Each PivotGrid contains two PivotAxis instances - the left + * axis and the top axis. Each PivotAxis defines an ordered set of dimensions, each of which should correspond to a field in a + * Store's Record (see {@link Ext.grid.PivotGrid} documentation for further explanation).

            + *

            Developers should have little interaction with the PivotAxis instances directly as most of their management is performed by + * the PivotGrid. An exception is the dynamic reconfiguration of axes at run time - to achieve this we use PivotAxis's + * {@link #setDimensions} function and refresh the grid:

            +
            
            +var pivotGrid = new Ext.grid.PivotGrid({
            +    //some PivotGrid config here
            +});
            +
            +//change the left axis dimensions
            +pivotGrid.leftAxis.setDimensions([
            +    {
            +        dataIndex: 'person',
            +        direction: 'DESC',
            +        width    : 100
            +    },
            +    {
            +        dataIndex: 'product',
            +        direction: 'ASC',
            +        width    : 80
            +    }
            +]);
            +
            +pivotGrid.view.refresh(true);
            +
            + * This clears the previous dimensions on the axis and redraws the grid with the new dimensions. + */ +Ext.grid.PivotAxis = Ext.extend(Ext.Component, { + /** + * @cfg {String} orientation One of 'vertical' or 'horizontal'. Defaults to horizontal + */ + orientation: 'horizontal', + + /** + * @cfg {Number} defaultHeaderWidth The width to render each row header that does not have a width specified via + {@link #getRowGroupHeaders}. Defaults to 80. + */ + defaultHeaderWidth: 80, + + /** + * @private + * @cfg {Number} paddingWidth The amount of padding used by each cell. + * TODO: From 4.x onwards this can be removed as it won't be needed. For now it is used to account for the differences between + * the content box and border box measurement models + */ + paddingWidth: 7, + + /** + * Updates the dimensions used by this axis + * @param {Array} dimensions The new dimensions + */ + setDimensions: function(dimensions) { + this.dimensions = dimensions; + }, + + /** + * @private + * Builds the html table that contains the dimensions for this axis. This branches internally between vertical + * and horizontal orientations because the table structure is slightly different in each case + */ + onRender: function(ct, position) { + var rows = this.orientation == 'horizontal' + ? this.renderHorizontalRows() + : this.renderVerticalRows(); + + this.el = Ext.DomHelper.overwrite(ct.dom, {tag: 'table', cn: rows}, true); + }, + + /** + * @private + * Specialised renderer for horizontal oriented axes + * @return {Object} The HTML Domspec for a horizontal oriented axis + */ + renderHorizontalRows: function() { + var headers = this.buildHeaders(), + rowCount = headers.length, + rows = [], + cells, cols, colCount, i, j; + + for (i = 0; i < rowCount; i++) { + cells = []; + cols = headers[i].items; + colCount = cols.length; + + for (j = 0; j < colCount; j++) { + cells.push({ + tag: 'td', + html: cols[j].header, + colspan: cols[j].span + }); + } + + rows[i] = { + tag: 'tr', + cn: cells + }; + } + + return rows; + }, + + /** + * @private + * Specialised renderer for vertical oriented axes + * @return {Object} The HTML Domspec for a vertical oriented axis + */ + renderVerticalRows: function() { + var headers = this.buildHeaders(), + colCount = headers.length, + rowCells = [], + rows = [], + rowCount, col, row, colWidth, i, j; + + for (i = 0; i < colCount; i++) { + col = headers[i]; + colWidth = col.width || 80; + rowCount = col.items.length; + + for (j = 0; j < rowCount; j++) { + row = col.items[j]; + + rowCells[row.start] = rowCells[row.start] || []; + rowCells[row.start].push({ + tag : 'td', + html : row.header, + rowspan: row.span, + width : Ext.isBorderBox ? colWidth : colWidth - this.paddingWidth + }); + } + } + + rowCount = rowCells.length; + for (i = 0; i < rowCount; i++) { + rows[i] = { + tag: 'tr', + cn : rowCells[i] + }; + } + + return rows; + }, + + /** + * @private + * Returns the set of all unique tuples based on the bound store and dimension definitions. + * Internally we construct a new, temporary store to make use of the multi-sort capabilities of Store. In + * 4.x this functionality should have been moved to MixedCollection so this step should not be needed. + * @return {Array} All unique tuples + */ + getTuples: function() { + var newStore = new Ext.data.Store({}); + + newStore.data = this.store.data.clone(); + newStore.fields = this.store.fields; + + var sorters = [], + dimensions = this.dimensions, + length = dimensions.length, + i; + + for (i = 0; i < length; i++) { + sorters.push({ + field : dimensions[i].dataIndex, + direction: dimensions[i].direction || 'ASC' + }); + } + + newStore.sort(sorters); + + var records = newStore.data.items, + hashes = [], + tuples = [], + recData, hash, info, data, key; + + length = records.length; + + for (i = 0; i < length; i++) { + info = this.getRecordInfo(records[i]); + data = info.data; + hash = ""; + + for (key in data) { + hash += data[key] + '---'; + } + + if (hashes.indexOf(hash) == -1) { + hashes.push(hash); + tuples.push(info); + } + } + + newStore.destroy(); + + return tuples; + }, + + /** + * @private + */ + getRecordInfo: function(record) { + var dimensions = this.dimensions, + length = dimensions.length, + data = {}, + dimension, dataIndex, i; + + //get an object containing just the data we are interested in based on the configured dimensions + for (i = 0; i < length; i++) { + dimension = dimensions[i]; + dataIndex = dimension.dataIndex; + + data[dataIndex] = record.get(dataIndex); + } + + //creates a specialised matcher function for a given tuple. The returned function will return + //true if the record passed to it matches the dataIndex values of each dimension in this axis + var createMatcherFunction = function(data) { + return function(record) { + for (var dataIndex in data) { + if (record.get(dataIndex) != data[dataIndex]) { + return false; + } + } + + return true; + }; + }; + + return { + data: data, + matcher: createMatcherFunction(data) + }; + }, + + /** + * @private + * Uses the calculated set of tuples to build an array of headers that can be rendered into a table using rowspan or + * colspan. Basically this takes the set of tuples and spans any cells that run into one another, so if we had dimensions + * of Person and Product and several tuples containing different Products for the same Person, those Products would be + * spanned. + * @return {Array} The headers + */ + buildHeaders: function() { + var tuples = this.getTuples(), + rowCount = tuples.length, + dimensions = this.dimensions, + dimension, + colCount = dimensions.length, + headers = [], + tuple, rows, currentHeader, previousHeader, span, start, isLast, changed, i, j; + + for (i = 0; i < colCount; i++) { + dimension = dimensions[i]; + rows = []; + span = 0; + start = 0; + + for (j = 0; j < rowCount; j++) { + tuple = tuples[j]; + isLast = j == (rowCount - 1); + currentHeader = tuple.data[dimension.dataIndex]; + + /* + * 'changed' indicates that we need to create a new cell. This should be true whenever the cell + * above (previousHeader) is different from this cell, or when the cell on the previous dimension + * changed (e.g. if the current dimension is Product and the previous was Person, we need to start + * a new cell if Product is the same but Person changed, so we check the previous dimension and tuple) + */ + changed = previousHeader != undefined && previousHeader != currentHeader; + if (i > 0 && j > 0) { + changed = changed || tuple.data[dimensions[i-1].dataIndex] != tuples[j-1].data[dimensions[i-1].dataIndex]; + } + + if (changed) { + rows.push({ + header: previousHeader, + span : span, + start : start + }); + + start += span; + span = 0; + } + + if (isLast) { + rows.push({ + header: currentHeader, + span : span + 1, + start : start + }); + + start += span; + span = 0; + } + + previousHeader = currentHeader; + span++; + } + + headers.push({ + items: rows, + width: dimension.width || this.defaultHeaderWidth + }); + + previousHeader = undefined; + } + + return headers; + } +}); // private // This is a support class used internally by the Grid components Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, { @@ -66809,8 +74860,8 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, { }, getDragData : function(e){ - var t = Ext.lib.Event.getTarget(e); - var h = this.view.findHeaderCell(t); + var t = Ext.lib.Event.getTarget(e), + h = this.view.findHeaderCell(t); if(h){ return {ddel: h.firstChild, header:h}; } @@ -66818,6 +74869,8 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, { }, onInitDrag : function(e){ + // keep the value here so we can restore it; + this.dragHeadersDisabled = this.view.headersDisabled; this.view.headersDisabled = true; var clone = this.dragData.ddel.cloneNode(true); clone.id = Ext.id(); @@ -66827,16 +74880,18 @@ Ext.grid.HeaderDragZone = Ext.extend(Ext.dd.DragZone, { }, afterValidDrop : function(){ - var v = this.view; - setTimeout(function(){ - v.headersDisabled = false; - }, 50); + this.completeDrop(); }, afterInvalidDrop : function(){ - var v = this.view; + this.completeDrop(); + }, + + completeDrop: function(){ + var v = this.view, + disabled = this.dragHeadersDisabled; setTimeout(function(){ - v.headersDisabled = false; + v.headersDisabled = disabled; }, 50); } }); @@ -66868,8 +74923,8 @@ Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, { }, getTargetFromEvent : function(e){ - var t = Ext.lib.Event.getTarget(e); - var cindex = this.view.findCellIndex(t); + var t = Ext.lib.Event.getTarget(e), + cindex = this.view.findCellIndex(t); if(cindex !== false){ return this.view.getHeaderCell(cindex); } @@ -66900,9 +74955,11 @@ Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, { }, 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]; + var x = Ext.lib.Event.getPageX(e), + r = Ext.lib.Dom.getRegion(n.firstChild), + 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"; @@ -66952,12 +75009,12 @@ Ext.grid.HeaderDropZone = Ext.extend(Ext.dd.DropZone, { 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 cm = this.grid.colModel, + x = Ext.lib.Event.getPageX(e), + r = Ext.lib.Dom.getRegion(n.firstChild), + pt = (r.right - x) <= ((r.right-r.left)/2) ? "after" : "before", + oldIndex = this.view.getCellIndex(h), + newIndex = this.view.getCellIndex(n); if(pt == "after"){ newIndex++; } @@ -67220,24 +75277,27 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * {@link #defaults} config property. */ defaultWidth: 100, + /** * @cfg {Boolean} defaultSortable (optional) Default sortable of columns which have no * sortable specified (defaults to false). This property shall preferably be configured * through the {@link #defaults} config property. */ defaultSortable: false, + /** * @cfg {Array} columns An Array of object literals. The config options defined by * {@link Ext.grid.Column} are the options which may appear in the object literal for each * individual column definition. */ + /** * @cfg {Object} defaults Object literal which will be used to apply {@link Ext.grid.Column} * configuration options to all {@link #columns}. Configuration options specified with * individual {@link Ext.grid.Column column} configs will supersede these {@link #defaults}. */ - - constructor : function(config){ + + constructor : function(config) { /** * An Array of {@link Ext.grid.Column Column definition} objects representing the configuration * of this ColumnModel. See {@link Ext.grid.Column} for the configuration properties that may @@ -67245,12 +75305,13 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @property config * @type Array */ - if(config.columns){ + if (config.columns) { Ext.apply(this, config); this.setConfig(config.columns, true); - }else{ + } else { this.setConfig(config, true); } + this.addEvents( /** * @event widthchange @@ -67263,6 +75324,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Number} newWidth The new width */ "widthchange", + /** * @event headerchange * Fires when the text of a header changes. @@ -67271,6 +75333,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {String} newText The new header text */ "headerchange", + /** * @event hiddenchange * Fires when a column is hidden or "unhidden". @@ -67279,6 +75342,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Boolean} hidden true if hidden, false otherwise */ "hiddenchange", + /** * @event columnmoved * Fires when a column is moved. @@ -67287,6 +75351,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Number} newIndex */ "columnmoved", + /** * @event configchange * Fires when the configuration is changed @@ -67294,6 +75359,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { */ "configchange" ); + Ext.grid.ColumnModel.superclass.constructor.call(this); }, @@ -67302,11 +75368,11 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Number} index The column index * @return {String} the id */ - getColumnId : function(index){ + getColumnId : function(index) { return this.config[index].id; }, - getColumnAt : function(index){ + getColumnAt : function(index) { return this.config[index]; }, @@ -67320,12 +75386,19 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Boolean} initial Specify true to bypass cleanup which deletes the totalWidth * and destroys existing editors. */ - setConfig : function(config, initial){ + setConfig : function(config, initial) { var i, c, len; - if(!initial){ // cleanup + + if (!initial) { // cleanup delete this.totalWidth; - for(i = 0, len = this.config.length; i < len; i++){ - this.config[i].destroy(); + + for (i = 0, len = this.config.length; i < len; i++) { + c = this.config[i]; + + if (c.setEditor) { + //check here, in case we have a special column like a CheckboxSelectionModel + c.setEditor(null); + } } } @@ -67338,20 +75411,24 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { this.config = config; this.lookup = {}; - for(i = 0, len = config.length; i < len; i++){ + for (i = 0, len = config.length; i < len; i++) { c = Ext.applyIf(config[i], this.defaults); + // if no id, create one using column's ordinal position - if(Ext.isEmpty(c.id)){ + if (Ext.isEmpty(c.id)) { c.id = i; } - if(!c.isColumn){ + + if (!c.isColumn) { var Cls = Ext.grid.Column.types[c.xtype || 'gridcolumn']; c = new Cls(c); config[i] = c; } + this.lookup[c.id] = c; } - if(!initial){ + + if (!initial) { this.fireEvent('configchange', this); } }, @@ -67361,7 +75438,7 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {String} id The column id * @return {Object} the column */ - getColumnById : function(id){ + getColumnById : function(id) { return this.lookup[id]; }, @@ -67370,9 +75447,9 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {String} id The column id * @return {Number} the index, or -1 if not found */ - getIndexById : function(id){ - for(var i = 0, len = this.config.length; i < len; i++){ - if(this.config[i].id == id){ + getIndexById : function(id) { + for (var i = 0, len = this.config.length; i < len; i++) { + if (this.config[i].id == id) { return i; } } @@ -67384,10 +75461,12 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Number} oldIndex The index of the column to move. * @param {Number} newIndex The position at which to reinsert the coolumn. */ - moveColumn : function(oldIndex, newIndex){ - var c = this.config[oldIndex]; - this.config.splice(oldIndex, 1); - this.config.splice(newIndex, 0, c); + moveColumn : function(oldIndex, newIndex) { + var config = this.config, + c = config[oldIndex]; + + config.splice(oldIndex, 1); + config.splice(newIndex, 0, c); this.dataMap = null; this.fireEvent("columnmoved", this, oldIndex, newIndex); }, @@ -67397,17 +75476,22 @@ Ext.grid.ColumnModel = Ext.extend(Ext.util.Observable, { * @param {Boolean} visibleOnly Optional. Pass as true to only include visible columns. * @return {Number} */ - getColumnCount : function(visibleOnly){ - if(visibleOnly === true){ - var c = 0; - for(var i = 0, len = this.config.length; i < len; i++){ - if(!this.isHidden(i)){ + getColumnCount : function(visibleOnly) { + var length = this.config.length, + c = 0, + i; + + if (visibleOnly === true) { + for (i = 0; i < length; i++) { + if (!this.isHidden(i)) { c++; } } + return c; } - return this.config.length; + + return length; }, /** @@ -67425,15 +75509,21 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * is executed. Defaults to this ColumnModel. * @return {Array} result */ - getColumnsBy : function(fn, scope){ - var r = []; - for(var i = 0, len = this.config.length; i < len; i++){ - var c = this.config[i]; - if(fn.call(scope||this, c, i) === true){ - r[r.length] = c; + getColumnsBy : function(fn, scope) { + var config = this.config, + length = config.length, + result = [], + i, c; + + for (i = 0; i < length; i++){ + c = config[i]; + + if (fn.call(scope || this, c, i) === true) { + result[result.length] = c; } } - return r; + + return result; }, /** @@ -67441,7 +75531,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @return {Boolean} */ - isSortable : function(col){ + isSortable : function(col) { return !!this.config[col].sortable; }, @@ -67450,7 +75540,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @return {Boolean} */ - isMenuDisabled : function(col){ + isMenuDisabled : function(col) { return !!this.config[col].menuDisabled; }, @@ -67459,14 +75549,11 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index. * @return {Function} The function used to render the cell. See {@link #setRenderer}. */ - getRenderer : function(col){ - if(!this.config[col].renderer){ - return Ext.grid.ColumnModel.defaultRenderer; - } - return this.config[col].renderer; + getRenderer : function(col) { + return this.config[col].renderer || Ext.grid.ColumnModel.defaultRenderer; }, - - getRendererScope : function(col){ + + getRendererScope : function(col) { return this.config[col].scope; }, @@ -67487,7 +75574,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ *
          • colIndex : Number

            Column index

          • *
          • store : Ext.data.Store

            The {@link Ext.data.Store} object from which the Record was extracted.

          */ - setRenderer : function(col, fn){ + setRenderer : function(col, fn) { this.config[col].renderer = fn; }, @@ -67496,8 +75583,12 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @return {Number} */ - getColumnWidth : function(col){ - return this.config[col].width; + getColumnWidth : function(col) { + var width = this.config[col].width; + if(typeof width != 'number'){ + width = this.defaultWidth; + } + return width; }, /** @@ -67507,10 +75598,11 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Boolean} suppressEvent True to suppress firing the {@link #widthchange} * event. Defaults to false. */ - setColumnWidth : function(col, width, suppressEvent){ + setColumnWidth : function(col, width, suppressEvent) { this.config[col].width = width; this.totalWidth = null; - if(!suppressEvent){ + + if (!suppressEvent) { this.fireEvent("widthchange", this, col, width); } }, @@ -67520,11 +75612,11 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Boolean} includeHidden True to include hidden column widths * @return {Number} */ - getTotalWidth : function(includeHidden){ - if(!this.totalWidth){ + 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)){ + for (var i = 0, len = this.config.length; i < len; i++) { + if (includeHidden || !this.isHidden(i)) { this.totalWidth += this.getColumnWidth(i); } } @@ -67537,7 +75629,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @return {String} */ - getColumnHeader : function(col){ + getColumnHeader : function(col) { return this.config[col].header; }, @@ -67546,7 +75638,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @param {String} header The new header */ - setColumnHeader : function(col, header){ + setColumnHeader : function(col, header) { this.config[col].header = header; this.fireEvent("headerchange", this, col, header); }, @@ -67556,7 +75648,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @return {String} */ - getColumnTooltip : function(col){ + getColumnTooltip : function(col) { return this.config[col].tooltip; }, /** @@ -67564,7 +75656,7 @@ var columns = grid.getColumnModel().getColumnsBy(function(c){ * @param {Number} col The column index * @param {String} tooltip The new tooltip */ - setColumnTooltip : function(col, tooltip){ + setColumnTooltip : function(col, tooltip) { this.config[col].tooltip = tooltip; }, @@ -67577,7 +75669,7 @@ var fieldName = grid.getColumnModel().getDataIndex(columnIndex); * @param {Number} col The column index * @return {String} The column's dataIndex */ - getDataIndex : function(col){ + getDataIndex : function(col) { return this.config[col].dataIndex; }, @@ -67586,7 +75678,7 @@ var fieldName = grid.getColumnModel().getDataIndex(columnIndex); * @param {Number} col The column index * @param {String} dataIndex The new dataIndex */ - setDataIndex : function(col, dataIndex){ + setDataIndex : function(col, dataIndex) { this.config[col].dataIndex = dataIndex; }, @@ -67595,7 +75687,7 @@ var fieldName = grid.getColumnModel().getDataIndex(columnIndex); * @param {String} col The dataIndex to find * @return {Number} The column index, or -1 if no match was found */ - findColumnIndex : function(dataIndex){ + findColumnIndex : function(dataIndex) { var c = this.config; for(var i = 0, len = c.length; i < len; i++){ if(c[i].dataIndex == dataIndex){ @@ -67629,10 +75721,10 @@ var grid = new Ext.grid.GridPanel({ * @param {Number} rowIndex The row index * @return {Boolean} */ - isCellEditable : function(colIndex, rowIndex){ + isCellEditable : function(colIndex, rowIndex) { var c = this.config[colIndex], ed = c.editable; - + //force boolean return !!(ed || (!Ext.isDefined(ed) && c.editor)); }, @@ -67644,7 +75736,7 @@ var grid = new Ext.grid.GridPanel({ * @return {Ext.Editor} The {@link Ext.Editor Editor} that was created to wrap * the {@link Ext.form.Field Field} used to edit the cell. */ - getCellEditor : function(colIndex, rowIndex){ + getCellEditor : function(colIndex, rowIndex) { return this.config[colIndex].getCellEditor(rowIndex); }, @@ -67653,7 +75745,7 @@ var grid = new Ext.grid.GridPanel({ * @param {Number} col The column index * @param {Boolean} editable True if the column is editable */ - setEditable : function(col, editable){ + setEditable : function(col, editable) { this.config[col].editable = editable; }, @@ -67663,7 +75755,7 @@ var grid = new Ext.grid.GridPanel({ * @param {Number} colIndex The column index * @return {Boolean} */ - isHidden : function(colIndex){ + isHidden : function(colIndex) { return !!this.config[colIndex].hidden; // ensure returns boolean }, @@ -67673,7 +75765,7 @@ var grid = new Ext.grid.GridPanel({ * @param {Number} colIndex The column index * @return {Boolean} */ - isFixed : function(colIndex){ + isFixed : function(colIndex) { return !!this.config[colIndex].fixed; }, @@ -67681,9 +75773,10 @@ var grid = new Ext.grid.GridPanel({ * Returns true if the column can be resized * @return {Boolean} */ - isResizable : function(colIndex){ + isResizable : function(colIndex) { return colIndex >= 0 && this.config[colIndex].resizable !== false && this.config[colIndex].fixed !== true; }, + /** * Sets if a column is hidden.
          
          @@ -67692,7 +75785,7 @@ myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first colu
                * @param {Number} colIndex The column index
                * @param {Boolean} hidden True if the column is hidden
                */
          -    setHidden : function(colIndex, hidden){
          +    setHidden : function(colIndex, hidden) {
                   var c = this.config[colIndex];
                   if(c.hidden !== hidden){
                       c.hidden = hidden;
          @@ -67706,24 +75799,38 @@ myGrid.getColumnModel().setHidden(0, true); // hide column 0 (0 = the first colu
                * @param {Number} col The column index
                * @param {Object} editor The editor object
                */
          -    setEditor : function(col, editor){
          +    setEditor : function(col, editor) {
                   this.config[col].setEditor(editor);
               },
           
               /**
          -     * Destroys this column model by purging any event listeners, and removing any editors.
          +     * Destroys this column model by purging any event listeners. Destroys and dereferences all Columns.
                */
          -    destroy : function(){
          -        for(var i = 0, len = this.config.length; i < len; i++){
          -            this.config[i].destroy();
          +    destroy : function() {
          +        var length = this.config.length,
          +            i = 0;
          +
          +        for (; i < length; i++){
          +            this.config[i].destroy(); // Column's destroy encapsulates all cleanup.
                   }
          +        delete this.config;
          +        delete this.lookup;
                   this.purgeListeners();
          +    },
          +
          +    /**
          +     * @private
          +     * Setup any saved state for the column, ensures that defaults are applied.
          +     */
          +    setState : function(col, state) {
          +        state = Ext.applyIf(state, this.defaults);
          +        Ext.apply(this.config[col], state);
               }
           });
           
           // private
          -Ext.grid.ColumnModel.defaultRenderer = function(value){
          -    if(typeof value == "string" && value.length < 1){
          +Ext.grid.ColumnModel.defaultRenderer = function(value) {
          +    if (typeof value == "string" && value.length < 1) {
                   return " ";
               }
               return value;
          @@ -67740,7 +75847,7 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable,  {
                * @type Object
                * @property grid
                */
          -    
          +
               constructor : function(){
                   this.locked = false;
                   Ext.grid.AbstractSelectionModel.superclass.constructor.call(this);
          @@ -67749,6 +75856,11 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable,  {
               /** @ignore Called by the grid automatically. Do not call directly. */
               init : function(grid){
                   this.grid = grid;
          +        if(this.lockOnInit){
          +            delete this.lockOnInit;
          +            this.locked = false;
          +            this.lock();
          +        }
                   this.initEvents();
               },
           
          @@ -67756,14 +75868,50 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable,  {
                * Locks the selections.
                */
               lock : function(){
          +        if(!this.locked){
          +            this.locked = true;
          +            // If the grid has been set, then the view is already initialized.
          +            var g = this.grid;
          +            if(g){
          +                g.getView().on({
          +                    scope: this,
          +                    beforerefresh: this.sortUnLock,
          +                    refresh: this.sortLock
          +                });
          +            }else{
          +                this.lockOnInit = true;
          +            }
          +        }
          +    },
          +
          +    // set the lock states before and after a view refresh
          +    sortLock : function() {
                   this.locked = true;
               },
           
          +    // set the lock states before and after a view refresh
          +    sortUnLock : function() {
          +        this.locked = false;
          +    },
          +
               /**
                * Unlocks the selections.
                */
               unlock : function(){
          -        this.locked = false;
          +        if(this.locked){
          +            this.locked = false;
          +            var g = this.grid,
          +                gv;
          +
          +            // If the grid has been set, then the view is already initialized.
          +            if(g){
          +                gv = g.getView();
          +                gv.un('beforerefresh', this.sortUnLock, this);
          +                gv.un('refresh', this.sortLock, this);
          +            }else{
          +                delete this.lockOnInit;
          +            }
          +        }
               },
           
               /**
          @@ -67773,8 +75921,9 @@ Ext.grid.AbstractSelectionModel = Ext.extend(Ext.util.Observable,  {
               isLocked : function(){
                   return this.locked;
               },
          -    
          +
               destroy: function(){
          +        this.unlock();
                   this.purgeListeners();
               }
           });/**
          @@ -67854,34 +76003,8 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                   }
           
                   this.rowNav = new Ext.KeyNav(this.grid.getGridEl(), {
          -            'up' : function(e){
          -                if(!e.shiftKey || this.singleSelect){
          -                    this.selectPrevious(false);
          -                }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.singleSelect){
          -                    this.selectNext(false);
          -                }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();
          -                }
          -            },
          +            up: this.onKeyPress,
          +            down: this.onKeyPress,
                       scope: this
                   });
           
          @@ -67893,13 +76016,37 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                   });
               },
           
          +    onKeyPress : function(e, name){
          +        var up = name == 'up',
          +            method = up ? 'selectPrevious' : 'selectNext',
          +            add = up ? -1 : 1,
          +            last;
          +        if(!e.shiftKey || this.singleSelect){
          +            this[method](false);
          +        }else if(this.last !== false && this.lastActive !== false){
          +            last = this.last;
          +            this.selectRange(this.last,  this.lastActive + add);
          +            this.grid.getView().focusRow(this.lastActive);
          +            if(last !== false){
          +                this.last = last;
          +            }
          +        }else{
          +           this.selectFirstRow();
          +        }
          +    },
          +
               // private
               onRefresh : function(){
          -        var ds = this.grid.store, index;
          -        var s = this.getSelections();
          +        var ds = this.grid.store,
          +            s = this.getSelections(),
          +            i = 0,
          +            len = s.length,
          +            index, r;
          +
          +        this.silent = true;
                   this.clearSelections(true);
          -        for(var i = 0, len = s.length; i < len; i++){
          -            var r = s[i];
          +        for(; i < len; i++){
          +            r = s[i];
                       if((index = ds.indexOfId(r.id)) != -1){
                           this.selectRow(index, true);
                       }
          @@ -67907,6 +76054,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                   if(s.length != this.selections.getCount()){
                       this.fireEvent('selectionchange', this);
                   }
          +        this.silent = false;
               },
           
               // private
          @@ -67932,8 +76080,10 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                   if(!keepExisting){
                       this.clearSelections();
                   }
          -        var ds = this.grid.store;
          -        for(var i = 0, len = records.length; i < len; i++){
          +        var ds = this.grid.store,
          +            i = 0,
          +            len = records.length;
          +        for(; i < len; i++){
                       this.selectRow(ds.indexOf(records[i]), true);
                   }
               },
          @@ -68031,8 +76181,11 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                * @return {Boolean} true if all selections were iterated
                */
               each : function(fn, scope){
          -        var s = this.getSelections();
          -        for(var i = 0, len = s.length; i < len; i++){
          +        var s = this.getSelections(),
          +            i = 0,
          +            len = s.length;
          +
          +        for(; i < len; i++){
                       if(fn.call(scope || this, s[i], i) === false){
                           return false;
                       }
          @@ -68051,8 +76204,8 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                       return;
                   }
                   if(fast !== true){
          -            var ds = this.grid.store;
          -            var s = this.selections;
          +            var ds = this.grid.store,
          +                s = this.selections;
                       s.each(function(r){
                           this.deselectRow(ds.indexOfId(r.id));
                       }, this);
          @@ -68210,8 +76363,10 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                       if(!preventViewNotify){
                           this.grid.getView().onRowSelect(index);
                       }
          -            this.fireEvent('rowselect', this, index, r);
          -            this.fireEvent('selectionchange', this);
          +            if(!this.silent){
          +                this.fireEvent('rowselect', this, index, r);
          +                this.fireEvent('selectionchange', this);
          +            }
                   }
               },
           
          @@ -68245,13 +76400,6 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                   }
               },
           
          -    // private
          -    restoreLast : function(){
          -        if(this._last){
          -            this.last = this._last;
          -        }
          -    },
          -
               // private
               acceptsNav : function(row, col, cm){
                   return !cm.isHidden(col) && cm.isCellEditable(col, row);
          @@ -68264,8 +76412,9 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                       g = this.grid, 
                       last = g.lastEdit,
                       ed = g.activeEditor,
          +            shift = e.shiftKey,
                       ae, last, r, c;
          -        var shift = e.shiftKey;
          +
                   if(k == e.TAB){
                       e.stopEvent();
                       ed.completeEdit();
          @@ -68287,9 +76436,7 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                       r = newCell[0];
                       c = newCell[1];
           
          -            if(last.row != r){
          -                this.selectRow(r); // *** highlight newly-selected cell and update selection
          -            }
          +            this.onEditorSelect(r, last.row);
           
                       if(g.isEditor && g.editing){ // *** handle tabbing while editorgrid is in edit mode
                           ae = g.activeEditor;
          @@ -68302,21 +76449,26 @@ Ext.grid.RowSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel,  {
                   }
               },
               
          -    destroy : function(){
          -        if(this.rowNav){
          -            this.rowNav.disable();
          -            this.rowNav = null;
          +    onEditorSelect: function(row, lastRow){
          +        if(lastRow != row){
          +            this.selectRow(row); // *** highlight newly-selected cell and update selection
                   }
          +    },
          +
          +    destroy : function(){
          +        Ext.destroy(this.rowNav);
          +        this.rowNav = null;
                   Ext.grid.RowSelectionModel.superclass.destroy.call(this);
               }
          -});/**
          +});
          +/**
            * @class Ext.grid.Column
            * 

          This class encapsulates column configuration data to be used in the initialization of a * {@link Ext.grid.ColumnModel ColumnModel}.

          *

          While subclasses are provided to render data in different ways, this class renders a passed * data field unchanged and is usually used for textual columns.

          */ -Ext.grid.Column = Ext.extend(Object, { +Ext.grid.Column = Ext.extend(Ext.util.Observable, { /** * @cfg {Boolean} editable Optional. Defaults to true, enabling the configured * {@link #editor}. Set to false to initially disable editing on this column. @@ -68336,7 +76488,7 @@ Ext.grid.Column = Ext.extend(Object, { /** * @cfg {String} header Optional. The header text to be used as innerHTML * (html tags are accepted) to display in the Grid view. Note: to - * have a clickable header with no text displayed use ' '. + * have a clickable header with no text displayed use '&#160;'. */ /** * @cfg {Boolean} groupable Optional. If the grid is being rendered by an {@link Ext.grid.GroupingView}, this option @@ -68416,7 +76568,7 @@ Ext.grid.Column = Ext.extend(Object, { * @cfg {Boolean} hidden * Optional. true to initially hide this column. Defaults to false. * A hidden column {@link Ext.grid.GridPanel#enableColumnHide may be shown via the header row menu}. - * If a column is never to be shown, simply do not include this column in the Column Model at all. + * If a column is never to be shown, simply do not include this column in the Column Model at all. */ /** * @cfg {String} tooltip Optional. A text string to use as the column header's tooltip. If Quicktips @@ -68521,10 +76673,10 @@ var grid = new Ext.grid.GridPanel({ * Defaults to true. */ isColumn : true, - + constructor : function(config){ Ext.apply(this, config); - + if(Ext.isString(this.renderer)){ this.renderer = Ext.util.Format[this.renderer]; }else if(Ext.isObject(this.renderer)){ @@ -68534,10 +76686,69 @@ var grid = new Ext.grid.GridPanel({ if(!this.scope){ this.scope = this; } - + var ed = this.editor; delete this.editor; this.setEditor(ed); + this.addEvents( + /** + * @event click + * Fires when this Column is clicked. + * @param {Column} this + * @param {Grid} The owning GridPanel + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + 'click', + /** + * @event contextmenu + * Fires when this Column is right clicked. + * @param {Column} this + * @param {Grid} The owning GridPanel + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + 'contextmenu', + /** + * @event dblclick + * Fires when this Column is double clicked. + * @param {Column} this + * @param {Grid} The owning GridPanel + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + 'dblclick', + /** + * @event mousedown + * Fires when this Column receives a mousedown event. + * @param {Column} this + * @param {Grid} The owning GridPanel + * @param {Number} rowIndex + * @param {Ext.EventObject} e + */ + 'mousedown' + ); + Ext.grid.Column.superclass.constructor.call(this); + }, + + /** + * @private + * Process and refire events routed from the GridView's processEvent method. + * Returns the event handler's status to allow cancelling of GridView's bubbling process. + */ + processEvent : function(name, e, grid, rowIndex, colIndex){ + return this.fireEvent(name, this, grid, rowIndex, e); + }, + + /** + * @private + * Clean up. Remove any Editor. Remove any listeners. + */ + destroy: function() { + if(this.setEditor){ + this.setEditor(null); + } + this.purgeListeners(); }, /** @@ -68559,9 +76770,6 @@ var grid = new Ext.grid.GridPanel({ * @type Function */ renderer : function(value){ - if(Ext.isString(value) && value.length < 1){ - return ' '; - } return value; }, @@ -68569,14 +76777,20 @@ var grid = new Ext.grid.GridPanel({ getEditor: function(rowIndex){ return this.editable !== false ? this.editor : null; }, - + /** * Sets a new editor for this column. * @param {Ext.Editor/Ext.form.Field} editor The editor to set */ setEditor : function(editor){ - if(this.editor){ - this.editor.destroy(); + var ed = this.editor; + if(ed){ + if(ed.gridEditor){ + ed.gridEditor.destroy(); + delete ed.gridEditor; + }else{ + ed.destroy(); + } } this.editor = null; if(editor){ @@ -68584,17 +76798,9 @@ var grid = new Ext.grid.GridPanel({ if(!editor.isXType){ editor = Ext.create(editor, 'textfield'); } - //check if it's wrapped in an editor - if(!editor.startEdit){ - editor = new Ext.grid.GridEditor(editor); - } this.editor = editor; } }, - - destroy : function(){ - this.setEditor(null); - }, /** * Returns the {@link Ext.Editor editor} defined for this column that was created to wrap the {@link Ext.form.Field Field} @@ -68603,7 +76809,16 @@ var grid = new Ext.grid.GridPanel({ * @return {Ext.Editor} */ getCellEditor: function(rowIndex){ - return this.getEditor(rowIndex); + var ed = this.getEditor(rowIndex); + if(ed){ + if(!ed.startEdit){ + if(!ed.gridEditor){ + ed.gridEditor = new Ext.grid.GridEditor(ed); + } + ed = ed.gridEditor; + } + } + return ed; } }); @@ -68616,18 +76831,18 @@ var grid = new Ext.grid.GridPanel({ Ext.grid.BooleanColumn = Ext.extend(Ext.grid.Column, { /** * @cfg {String} trueText - * The string returned by the renderer when the column value is not falsey (defaults to 'true'). + * The string returned by the renderer when the column value is not falsy (defaults to 'true'). */ trueText: 'true', /** * @cfg {String} falseText - * The string returned by the renderer when the column value is falsey (but not undefined) (defaults to + * The string returned by the renderer when the column value is falsy (but not undefined) (defaults to * 'false'). */ falseText: 'false', /** * @cfg {String} undefinedText - * The string returned by the renderer when the column value is undefined (defaults to ' '). + * The string returned by the renderer when the column value is undefined (defaults to '&#160;'). */ undefinedText: ' ', @@ -68709,6 +76924,188 @@ Ext.grid.TemplateColumn = Ext.extend(Ext.grid.Column, { } }); +/** + * @class Ext.grid.ActionColumn + * @extends Ext.grid.Column + *

          A Grid column type which renders an icon, or a series of icons in a grid cell, and offers a scoped click + * handler for each icon. Example usage:

          +
          
          +new Ext.grid.GridPanel({
          +    store: myStore,
          +    columns: [
          +        {
          +            xtype: 'actioncolumn',
          +            width: 50,
          +            items: [
          +                {
          +                    icon   : 'sell.gif',                // Use a URL in the icon config
          +                    tooltip: 'Sell stock',
          +                    handler: function(grid, rowIndex, colIndex) {
          +                        var rec = store.getAt(rowIndex);
          +                        alert("Sell " + rec.get('company'));
          +                    }
          +                },
          +                {
          +                    getClass: function(v, meta, rec) {  // Or return a class from a function
          +                        if (rec.get('change') < 0) {
          +                            this.items[1].tooltip = 'Do not buy!';
          +                            return 'alert-col';
          +                        } else {
          +                            this.items[1].tooltip = 'Buy stock';
          +                            return 'buy-col';
          +                        }
          +                    },
          +                    handler: function(grid, rowIndex, colIndex) {
          +                        var rec = store.getAt(rowIndex);
          +                        alert("Buy " + rec.get('company'));
          +                    }
          +                }
          +            ]
          +        }
          +        //any other columns here
          +    ]
          +});
          +
          + *

          The action column can be at any index in the columns array, and a grid can have any number of + * action columns.

          + */ +Ext.grid.ActionColumn = Ext.extend(Ext.grid.Column, { + /** + * @cfg {String} icon + * The URL of an image to display as the clickable element in the column. + * Optional - defaults to {@link Ext#BLANK_IMAGE_URL Ext.BLANK_IMAGE_URL}. + */ + /** + * @cfg {String} iconCls + * A CSS class to apply to the icon image. To determine the class dynamically, configure the Column with a {@link #getClass} function. + */ + /** + * @cfg {Function} handler A function called when the icon is clicked. + * The handler is passed the following parameters:
            + *
          • grid : GridPanel
            The owning GridPanel.
          • + *
          • rowIndex : Number
            The row index clicked on.
          • + *
          • colIndex : Number
            The column index clicked on.
          • + *
          • item : Object
            The clicked item (or this Column if multiple + * {@link #items} were not configured).
          • + *
          • e : Event
            The click event.
          • + *
          + */ + /** + * @cfg {Object} scope The scope (this reference) in which the {@link #handler} + * and {@link #getClass} fuctions are executed. Defaults to this Column. + */ + /** + * @cfg {String} tooltip A tooltip message to be displayed on hover. {@link Ext.QuickTips#init Ext.QuickTips} must have + * been initialized. + */ + /** + * @cfg {Boolean} stopSelection Defaults to true. Prevent grid row selection upon mousedown. + */ + /** + * @cfg {Function} getClass A function which returns the CSS class to apply to the icon image. + * The function is passed the following parameters:
            + *
          • v : Object

            The value of the column's configured field (if any).

          • + *
          • metadata : Object

            An object in which you may set the following attributes:

              + *
            • css : String

              A CSS class name to add to the cell's TD element.

            • + *
            • attr : String

              An HTML attribute definition string to apply to the data container element within the table cell + * (e.g. 'style="color:red;"').

            • + *

          • + *
          • r : Ext.data.Record

            The Record providing the data.

          • + *
          • rowIndex : Number

            The row index..

          • + *
          • colIndex : Number

            The column index.

          • + *
          • store : Ext.data.Store

            The Store which is providing the data Model.

          • + *
          + */ + /** + * @cfg {Array} items An Array which may contain multiple icon definitions, each element of which may contain: + *
            + *
          • icon : String
            The url of an image to display as the clickable element + * in the column.
          • + *
          • iconCls : String
            A CSS class to apply to the icon image. + * To determine the class dynamically, configure the item with a getClass function.
          • + *
          • getClass : Function
            A function which returns the CSS class to apply to the icon image. + * The function is passed the following parameters:
              + *
            • v : Object

              The value of the column's configured field (if any).

            • + *
            • metadata : Object

              An object in which you may set the following attributes:

                + *
              • css : String

                A CSS class name to add to the cell's TD element.

              • + *
              • attr : String

                An HTML attribute definition string to apply to the data container element within the table cell + * (e.g. 'style="color:red;"').

              • + *

            • + *
            • r : Ext.data.Record

              The Record providing the data.

            • + *
            • rowIndex : Number

              The row index..

            • + *
            • colIndex : Number

              The column index.

            • + *
            • store : Ext.data.Store

              The Store which is providing the data Model.

            • + *
          • + *
          • handler : Function
            A function called when the icon is clicked.
          • + *
          • scope : Scope
            The scope (this reference) in which the + * handler and getClass functions are executed. Fallback defaults are this Column's + * configured scope, then this Column.
          • + *
          • tooltip : String
            A tooltip message to be displayed on hover. + * {@link Ext.QuickTips#init Ext.QuickTips} must have been initialized.
          • + *
          + */ + header: ' ', + + actionIdRe: /x-action-col-(\d+)/, + + /** + * @cfg {String} altText The alt text to use for the image element. Defaults to ''. + */ + altText: '', + + constructor: function(cfg) { + var me = this, + items = cfg.items || (me.items = [me]), + l = items.length, + i, + item; + + Ext.grid.ActionColumn.superclass.constructor.call(me, cfg); + +// Renderer closure iterates through items creating an element for each and tagging with an identifying +// class name x-action-col-{n} + me.renderer = function(v, meta) { +// Allow a configured renderer to create initial value (And set the other values in the "metadata" argument!) + v = Ext.isFunction(cfg.renderer) ? cfg.renderer.apply(this, arguments)||'' : ''; + + meta.css += ' x-action-col-cell'; + for (i = 0; i < l; i++) { + item = items[i]; + v += '' + (item.altText || me.altText) + ''; + } + return v; + }; + }, + + destroy: function() { + delete this.items; + delete this.renderer; + return Ext.grid.ActionColumn.superclass.destroy.apply(this, arguments); + }, + + /** + * @private + * Process and refire events routed from the GridView's processEvent method. + * Also fires any configured click handlers. By default, cancels the mousedown event to prevent selection. + * Returns the event handler's status to allow cancelling of GridView's bubbling process. + */ + processEvent : function(name, e, grid, rowIndex, colIndex){ + var m = e.getTarget().className.match(this.actionIdRe), + item, fn; + if (m && (item = this.items[parseInt(m[1], 10)])) { + if (name == 'click') { + (fn = item.handler || this.handler) && fn.call(item.scope||this.scope||this, grid, rowIndex, colIndex, item, e); + } else if ((name == 'mousedown') && (item.stopSelection !== false)) { + return false; + } + } + return Ext.grid.ActionColumn.superclass.processEvent.apply(this, arguments); + } +}); + /* * @property types * @type Object @@ -68729,7 +77126,8 @@ Ext.grid.Column.types = { booleancolumn: Ext.grid.BooleanColumn, numbercolumn: Ext.grid.NumberColumn, datecolumn: Ext.grid.DateColumn, - templatecolumn: Ext.grid.TemplateColumn + templatecolumn: Ext.grid.TemplateColumn, + actioncolumn: Ext.grid.ActionColumn };/** * @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 @@ -68772,6 +77170,7 @@ Ext.grid.RowNumberer = Ext.extend(Object, { // private fixed:true, + hideable: false, menuDisabled:true, dataIndex: '', id: 'numberer', @@ -68822,12 +77221,13 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { // private menuDisabled : true, fixed : true, + hideable: false, dataIndex : '', id : 'checker', + isColumn: true, // So that ColumnModel doesn't feed this through the Column constructor constructor : function(){ Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this, arguments); - if(this.checkOnly){ this.handleMouseDown = Ext.emptyFn; } @@ -68837,13 +77237,23 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { 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); - + Ext.fly(this.grid.getView().innerHd).on('mousedown', this.onHdMouseDown, this); }, this); }, + /** + * @private + * Process and refire events routed from the GridView's processEvent method. + */ + processEvent : function(name, e, grid, rowIndex, colIndex){ + if (name == 'mousedown') { + this.onMouseDown(e, e.getTarget()); + return false; + } else { + return Ext.grid.Column.prototype.processEvent.apply(this, arguments); + } + }, + // private onMouseDown : function(e, t){ if(e.button === 0 && t.className == 'x-grid3-row-checker'){ // Only fire if left-click @@ -68855,13 +77265,14 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { this.deselectRow(index); }else{ this.selectRow(index, true); + this.grid.getView().focusRow(index); } } } }, // private - onHdMouseDown : function(e, t){ + onHdMouseDown : function(e, t) { if(t.className == 'x-grid3-hd-checker'){ e.stopEvent(); var hd = Ext.fly(t.parentNode); @@ -68879,6 +77290,12 @@ Ext.grid.CheckboxSelectionModel = Ext.extend(Ext.grid.RowSelectionModel, { // private renderer : function(v, p, record){ return '
           
          '; + }, + + onEditorSelect: function(row, lastRow){ + if(lastRow != row && !this.checkOnly){ + this.selectRow(row); // *** highlight newly-selected cell and update selection + } } });/** * @class Ext.grid.CellSelectionModel @@ -68937,7 +77354,7 @@ Ext.grid.CellSelectionModel = Ext.extend(Ext.grid.AbstractSelectionModel, { /** @ignore */ initEvents : function(){ this.grid.on('cellmousedown', this.handleMouseDown, this); - this.grid.on(Ext.EventManager.useKeydown ? 'keydown' : 'keypress', this.handleKeyDown, this); + this.grid.on(Ext.EventManager.getKeyEvent(), this.handleKeyDown, this); this.grid.getView().on({ scope: this, refresh: this.onViewChange, @@ -69358,6 +77775,7 @@ grid.on('validateedit', function(e) { // private onEditComplete : function(ed, value, startValue){ this.editing = false; + this.lastActiveEditor = this.activeEditor; this.activeEditor = null; var r = ed.record, @@ -69731,8 +78149,13 @@ Ext.grid.PropertyColumnModel = Ext.extend(Ext.grid.ColumnModel, { // inherit docs destroy : function(){ Ext.grid.PropertyColumnModel.superclass.destroy.call(this); - for(var ed in this.editors){ - Ext.destroy(this.editors[ed]); + this.destroyEditors(this.editors); + this.destroyEditors(this.grid.customEditors); + }, + + destroyEditors: function(editors){ + for(var ed in editors){ + Ext.destroy(editors[ed]); } } }); @@ -69956,10 +78379,10 @@ Ext.reg("propertygrid", Ext.grid.PropertyGrid); * Adds the ability for single level grouping to the grid. A {@link Ext.data.GroupingStore GroupingStore} * must be used to enable grouping. Some grouping characteristics may also be configured at the * {@link Ext.grid.Column Column level}
            - *
          • {@link Ext.grid.Column#emptyGroupText emptyGroupText}
          • - *
          • {@link Ext.grid.Column#groupable groupable}
          • - *
          • {@link Ext.grid.Column#groupName groupName}
          • - *
          • {@link Ext.grid.Column#groupRender groupRender}
          • + *
          • {@link Ext.grid.Column#emptyGroupText emptyGroupText}
          • + *
          • {@link Ext.grid.Column#groupable groupable}
          • + *
          • {@link Ext.grid.Column#groupName groupName}
          • + *
          • {@link Ext.grid.Column#groupRender groupRender}
          • *
          *

          Sample usage:

          *
          
          @@ -70097,8 +78520,10 @@ var grid = new Ext.grid.GridPanel({
                * each column.
                */
           
          -    // private
          -    gidSeed : 1000,
          +    /**
          +     * @cfg {Boolean} cancelEditOnToggle True to cancel any editing when the group header is toggled. Defaults to true.
          +     */
          +    cancelEditOnToggle: true,
           
               // private
               initTemplates : function(){
          @@ -70117,11 +78542,10 @@ var grid = new Ext.grid.GridPanel({
                       );
                   }
                   this.startGroup.compile();
          -        if(!this.endGroup){
          +
          +        if (!this.endGroup) {
                       this.endGroup = '
        '; } - - this.endGroup = '
      '; }, // private @@ -70135,12 +78559,14 @@ var grid = new Ext.grid.GridPanel({ }, // private - onAdd : function(){ - if(this.canGroup() && !this.ignoreAdd){ + onAdd : function(ds, records, index) { + if (this.canGroup() && !this.ignoreAdd) { var ss = this.getScrollState(); + this.fireEvent('beforerowsinserted', ds, index, index + (records.length-1)); this.refresh(); this.restoreScroll(ss); - }else if(!this.canGroup()){ + this.fireEvent('rowsinserted', ds, index, index + (records.length-1)); + } else if (!this.canGroup()) { Ext.grid.GroupingView.superclass.onAdd.apply(this, arguments); } }, @@ -70174,14 +78600,13 @@ var grid = new Ext.grid.GridPanel({ } if((item = items.get('showGroups'))){ item.setDisabled(disabled); - item.setChecked(this.enableGrouping, true); + item.setChecked(this.canGroup(), true); } }, // private renderUI : function(){ - Ext.grid.GroupingView.superclass.renderUI.call(this); - this.mainBody.on('mousedown', this.interceptMouse, this); + var markup = Ext.grid.GroupingView.superclass.renderUI.call(this); if(this.enableGroupingMenu && this.hmenu){ this.hmenu.add('-',{ @@ -70202,37 +78627,46 @@ var grid = new Ext.grid.GridPanel({ } this.hmenu.on('beforeshow', this.beforeMenuShow, this); } + return markup; }, processEvent: function(name, e){ + Ext.grid.GroupingView.superclass.processEvent.call(this, name, e); var hd = e.getTarget('.x-grid-group-hd', this.mainBody); if(hd){ // group value is at the end of the string var field = this.getGroupField(), prefix = this.getPrefix(field), - groupValue = hd.id.substring(prefix.length); + groupValue = hd.id.substring(prefix.length), + emptyRe = new RegExp('gp-' + Ext.escapeRe(field) + '--hd'); // remove trailing '-hd' groupValue = groupValue.substr(0, groupValue.length - 3); - if(groupValue){ + + // also need to check for empty groups + if(groupValue || emptyRe.test(hd.id)){ this.grid.fireEvent('group' + name, this.grid, field, groupValue, e); } + if(name == 'mousedown' && e.button == 0){ + this.toggleGroup(hd.parentNode); + } } }, // private onGroupByClick : function(){ + var grid = this.grid; this.enableGrouping = true; - this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); - this.grid.fireEvent('groupchange', this, this.grid.store.getGroupState()); + grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex)); + grid.fireEvent('groupchange', grid, grid.store.getGroupState()); this.beforeMenuShow(); // Make sure the checkboxes get properly set when changing groups this.refresh(); }, // private onShowGroupsClick : function(mi, checked){ - this.enableGrouping = checked; + this.enableGrouping = checked; if(checked){ this.onGroupByClick(); }else{ @@ -70262,11 +78696,15 @@ var grid = new Ext.grid.GridPanel({ * @param {Boolean} expanded (optional) */ toggleGroup : function(group, expanded){ - var gel = Ext.get(group); + var gel = Ext.get(group), + id = Ext.util.Format.htmlEncode(gel.id); + expanded = Ext.isDefined(expanded) ? expanded : gel.hasClass('x-grid-group-collapsed'); - if(this.state[gel.id] !== expanded){ - this.grid.stopEditing(true); - this.state[gel.id] = expanded; + if(this.state[id] !== expanded){ + if (this.cancelEditOnToggle !== false) { + this.grid.stopEditing(true); + } + this.state[id] = expanded; gel[expanded ? 'removeClass' : 'addClass']('x-grid-group-collapsed'); } }, @@ -70296,20 +78734,12 @@ var grid = new Ext.grid.GridPanel({ this.toggleAllGroups(false); }, - // private - interceptMouse : function(e){ - var hd = e.getTarget('.x-grid-group-hd', this.mainBody); - if(hd){ - e.stopEvent(); - this.toggleGroup(hd.parentNode); - } - }, - // private getGroup : function(v, r, groupRenderer, rowIndex, colIndex, ds){ - var g = groupRenderer ? groupRenderer(v, {}, r, rowIndex, colIndex, ds) : String(v); + var column = this.cm.config[colIndex], + g = groupRenderer ? groupRenderer.call(column.scope, v, {}, r, rowIndex, colIndex, ds) : String(v); if(g === '' || g === ' '){ - g = this.cm.config[colIndex].emptyGroupText || this.emptyGroupText; + g = column.emptyGroupText || this.emptyGroupText; } return g; }, @@ -70330,6 +78760,32 @@ var grid = new Ext.grid.GridPanel({ } }, + afterRenderUI: function () { + Ext.grid.GroupingView.superclass.afterRenderUI.call(this); + + if (this.enableGroupingMenu && this.hmenu) { + this.hmenu.add('-',{ + itemId:'groupBy', + text: this.groupByText, + handler: this.onGroupByClick, + scope: this, + iconCls:'x-group-by-icon' + }); + + if (this.enableNoGroups) { + this.hmenu.add({ + itemId:'showGroups', + text: this.showGroupsText, + checked: true, + checkHandler: this.onShowGroupsClick, + scope: this + }); + } + + this.hmenu.on('beforeshow', this.beforeMenuShow, this); + } + }, + // private renderRows : function(){ var groupField = this.getGroupField(); @@ -70364,8 +78820,7 @@ var grid = new Ext.grid.GridPanel({ } if(!this.canGroup() || this.isUpdating){ - return Ext.grid.GroupingView.superclass.doRender.apply( - this, arguments); + return Ext.grid.GroupingView.superclass.doRender.apply(this, arguments); } var groupField = this.getGroupField(), @@ -70462,12 +78917,20 @@ var grid = new Ext.grid.GridPanel({ if(!this.canGroup()){ 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]; + var r = [], + gs = this.getGroups(), + g, + i = 0, + len = gs.length, + j, + jlen; + for(; i < len; ++i){ + g = gs[i].childNodes[1]; + if(g){ + g = g.childNodes; + for(j = 0, jlen = g.length; j < jlen; ++j){ + r[r.length] = g[j]; + } } } return r; @@ -70514,4 +78977,4 @@ var grid = new Ext.grid.GridPanel({ } }); // private -Ext.grid.GroupingView.GROUP_ID = 1000; +Ext.grid.GroupingView.GROUP_ID = 1000; \ No newline at end of file diff --git a/deluge/ui/web/js/ext-all.js b/deluge/ui/web/js/ext-all.js index 1594c7f15..5b0034a59 100644 --- a/deluge/ui/web/js/ext-all.js +++ b/deluge/ui/web/js/ext-all.js @@ -1,18 +1,11 @@ /* - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ -Ext.DomHelper=function(){var s=null,j=/^(?:br|frame|hr|img|input|link|meta|range|spacer|wbr|area|param|col)$/i,l=/^table|tbody|tr|td$/i,p,m="afterbegin",n="afterend",c="beforebegin",o="beforeend",a="",h="
      ",b=a+"",i=""+h,k=b+"",r=""+i;function g(w,y,x,z,v,t){var u=p.insertHtml(z,Ext.getDom(w),q(y));return x?Ext.get(u,true):u}function q(z){var v="",u,y,x,t,A;if(Ext.isString(z)){v=z}else{if(Ext.isArray(z)){for(var w=0;w"}}}return v}function e(A,x,w,y){s.innerHTML=[x,w,y].join("");var t=-1,v=s,u;while(++t "'+y+'"'},insertBefore:function(t,v,u){return g(t,v,u,c)},insertAfter:function(t,v,u){return g(t,v,u,n,"nextSibling")},insertFirst:function(t,v,u){return g(t,v,u,m,"firstChild")},append:function(t,v,u){return g(t,v,u,o,"",true)},overwrite:function(t,v,u){t=Ext.getDom(t);t.innerHTML=q(v);return u?Ext.get(t.firstChild):t.firstChild},createHtml:q};return p}();Ext.apply(Ext.DomHelper,function(){var d,a="afterbegin",g="afterend",h="beforebegin",c="beforeend";function e(l,n,m,p,k,i){l=Ext.getDom(l);var j;if(d.useDom){j=b(n,null);if(i){l.appendChild(j)}else{(k=="firstChild"?l:l.parentNode).insertBefore(j,l[k]||l)}}else{j=Ext.DomHelper.insertHtml(p,l,Ext.DomHelper.createHtml(n))}return m?Ext.get(j,true):j}function b(p,j){var l,m=document,k,i,n,q;if(Ext.isArray(p)){l=m.createDocumentFragment();Ext.each(p,function(o){b(o,l)})}else{if(Ext.isString(p)){l=m.createTextNode(p)}else{l=m.createElement(p.tag||"div");k=!!l.setAttribute;Ext.iterate(p,function(o,r){if(!/tag|children|cn|html|style/.test(o)){if(o=="cls"){l.className=r}else{if(k){l.setAttribute(o,r)}else{l[o]=r}}}});Ext.DomHelper.applyStyles(l,p.style);if((q=p.children||p.cn)){b(q,l)}else{if(p.html){l.innerHTML=p.html}}}}if(j){j.appendChild(l)}return l}d={createTemplate:function(j){var i=Ext.DomHelper.createHtml(j);return new Ext.Template(i)},useDom:false,insertBefore:function(i,k,j){return e(i,k,j,h)},insertAfter:function(i,k,j){return e(i,k,j,g,"nextSibling")},insertFirst:function(i,k,j){return e(i,k,j,a,"firstChild")},append:function(i,k,j){return e(i,k,j,c,"",true)},createDom:b};return d}());Ext.Template=function(d){var e=this,b=arguments,c=[];if(Ext.isArray(d)){d=d.join("")}else{if(b.length>1){Ext.each(b,function(a){if(Ext.isObject(a)){Ext.apply(e,a)}else{c.push(a)}});d=c.join("")}}e.html=d;if(e.compiled){e.compile()}};Ext.Template.prototype={re:/\{([\w-]+)\}/g,applyTemplate:function(a){var b=this;return b.compiled?b.compiled(a):b.html.replace(b.re,function(c,d){return a[d]!==undefined?a[d]:""})},set:function(a,c){var b=this;b.html=a;b.compiled=null;return c?b.compile():b},compile:function(){var me=this,sep=Ext.isGecko?"+":",";function fn(m,name){name="values['"+name+"']";return"'"+sep+"("+name+" == undefined ? '' : "+name+")"+sep+"'"}eval("this.compiled = function(values){ return "+(Ext.isGecko?"'":"['")+me.html.replace(/\\/g,"\\\\").replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn)+(Ext.isGecko?"';};":"'].join('');};"));return me},insertFirst:function(b,a,c){return this.doInsert("afterBegin",b,a,c)},insertBefore:function(b,a,c){return this.doInsert("beforeBegin",b,a,c)},insertAfter:function(b,a,c){return this.doInsert("afterEnd",b,a,c)},append:function(b,a,c){return this.doInsert("beforeEnd",b,a,c)},doInsert:function(c,e,b,a){e=Ext.getDom(e);var d=Ext.DomHelper.insertHtml(c,e,this.applyTemplate(b));return a?Ext.get(d,true):d},overwrite:function(b,a,c){b=Ext.getDom(b);b.innerHTML=this.applyTemplate(a);return c?Ext.get(b.firstChild,true):b.firstChild}};Ext.Template.prototype.apply=Ext.Template.prototype.applyTemplate;Ext.Template.from=function(b,a){b=Ext.getDom(b);return new Ext.Template(b.value||b.innerHTML,a||"")};Ext.apply(Ext.Template.prototype,{disableFormats:false,re:/\{([\w-]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?\}/g,applyTemplate:function(b){var g=this,a=g.disableFormats!==true,e=Ext.util.Format,c=g;if(g.compiled){return g.compiled(b)}function d(j,l,p,k){if(p&&a){if(p.substr(0,5)=="this."){return c.call(p.substr(5),b[l],b)}else{if(k){var o=/^\s*['"](.*)["']\s*$/;k=k.split(",");for(var n=0,h=k.length;n+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w-]+)\s?(?:(=|.=)\s?['"]?(.*?)["']?)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{4}", "{3}", "{1}");'},{re:/^#([\w-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var i=Ext.util,l=Ext.toArray,k=Ext.each,a=Ext.isObject,h=true,j=false;i.Observable=function(){var m=this,n=m.events;if(m.listeners){m.on(m.listeners);delete m.listeners}m.events=n||{}};i.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var m=l(arguments),o=m[0].toLowerCase(),p=this,n=h,s=p.events[o],r,t;if(p.eventsSuspended===h){if(r=p.eventQueue){r.push(m)}}else{if(a(s)&&s.bubble){if(s.fire.apply(s,m.slice(1))===j){return j}t=p.getBubbleTarget&&p.getBubbleTarget();if(t&&t.enableBubble){if(!t.events[o]||!Ext.isObject(t.events[o])||!t.events[o].bubble){t.enableBubble(o)}return t.fireEvent.apply(t,m)}}else{if(a(s)){m.shift();n=s.fire.apply(s,m)}}}return n},addListener:function(p,s,u,n){var r=this,q,v,t,m;if(a(p)){n=p;for(q in n){v=n[q];if(!r.filterOptRe.test(q)){r.addListener(q,v.fn||v,v.scope||n.scope,v.fn?v:n)}}}else{p=p.toLowerCase();m=r.events[p]||h;if(Ext.isBoolean(m)){r.events[p]=m=new i.Event(r,p)}m.addListener(s,u,a(n)?n:{})}},removeListener:function(m,o,n){var p=this.events[m.toLowerCase()];if(a(p)){p.removeListener(o,n)}},purgeListeners:function(){var o=this.events,m,n;for(n in o){m=o[n];if(a(m)){m.clearListeners()}}},addEvents:function(q){var p=this;p.events=p.events||{};if(Ext.isString(q)){var m=arguments,n=m.length;while(n--){p.events[m[n]]=p.events[m[n]]||h}}else{Ext.applyIf(p.events,q)}},hasListener:function(m){var n=this.events[m];return a(n)&&n.listeners.length>0},suspendEvents:function(m){this.eventsSuspended=h;if(m&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var m=this,n=m.eventQueue||[];m.eventsSuspended=j;delete m.eventQueue;k(n,function(o){m.fireEvent.apply(m,o)})}};var e=i.Observable.prototype;e.on=e.addListener;e.un=e.removeListener;i.Observable.releaseCapture=function(m){m.fireEvent=e.fireEvent};function g(n,p,m){return function(){if(p.target==arguments[0]){n.apply(m,l(arguments))}}}function c(p,q,m,n){m.task=new i.DelayedTask();return function(){m.task.delay(q.buffer,p,n,l(arguments))}}function d(o,p,n,m){return function(){p.removeListener(n,m);return o.apply(m,arguments)}}function b(p,q,m,n){return function(){var o=new i.DelayedTask();if(!m.tasks){m.tasks=[]}m.tasks.push(o);o.delay(q.delay||10,p,n,l(arguments))}}i.Event=function(n,m){this.name=m;this.obj=n;this.listeners=[]};i.Event.prototype={addListener:function(p,o,n){var q=this,m;o=o||q.obj;if(!q.isListening(p,o)){m=q.createListener(p,o,n);if(q.firing){q.listeners=q.listeners.slice(0)}q.listeners.push(m)}},createListener:function(q,p,r){r=r||{},p=p||this.obj;var m={fn:q,scope:p,options:r},n=q;if(r.target){n=g(n,r,p)}if(r.delay){n=b(n,r,m,p)}if(r.single){n=d(n,this,q,p)}if(r.buffer){n=c(n,r,m,p)}m.fireFn=n;return m},findListener:function(q,p){var r=this.listeners,n=r.length,m,o;while(n--){m=r[n];if(m){o=m.scope;if(m.fn==q&&(o==p||o==this.obj)){return n}}}return -1},isListening:function(n,m){return this.findListener(n,m)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=j;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=h}return o},clearListeners:function(){var o=this,m=o.listeners,n=m.length;while(n--){o.removeListener(m[n].fn,m[n].scope)}},fire:function(){var r=this,o=l(arguments),q=r.listeners,m=q.length,p=0,n;if(m>0){r.firing=h;for(;p<\/script>');b.getElementById(e).onreadystatechange=function(){if(this.readyState==w){c()}}}else{if(Ext.isWebKit){m=setInterval(function(){if(b.readyState==w){c()}},10)}}}l.on(v,"load",c)}function s(w,x){return function(){var y=Ext.toArray(arguments);if(x.target==Ext.EventObject.setEvent(y[0]).target){w.apply(this,y)}}}function t(x,y,w){return function(z){w.delay(y.buffer,x,null,[new Ext.EventObjectImpl(z)])}}function p(A,z,w,y,x){return function(B){Ext.EventManager.removeListener(z,w,y,x);A(B)}}function d(x,y,w){return function(A){var z=new Ext.util.DelayedTask(x);if(!w.tasks){w.tasks=[]}w.tasks.push(z);z.delay(y.delay||10,x,null,[new Ext.EventObjectImpl(A)])}}function h(B,A,w,D,E){var x=!Ext.isObject(w)?{}:w,y=Ext.getDom(B),z;D=D||x.fn;E=E||x.scope;if(!y){throw'Error listening for "'+A+'". Element "'+B+"\" doesn't exist."}function C(G){if(!Ext){return}G=Ext.EventObject.setEvent(G);var F;if(x.delegate){if(!(F=G.getTarget(x.delegate,y))){return}}else{F=G.target}if(x.stopEvent){G.stopEvent()}if(x.preventDefault){G.preventDefault()}if(x.stopPropagation){G.stopPropagation()}if(x.normalized){G=G.browserEvent}D.call(E||y,G,F,x)}if(x.target){C=s(C,x)}if(x.delay){C=d(C,x,D)}if(x.single){C=p(C,y,A,D,E)}if(x.buffer){z=new Ext.util.DelayedTask(C);C=t(C,x,z)}j(y,A,D,z,C,E);return C}var r={addListener:function(y,w,A,z,x){if(Ext.isObject(w)){var D=w,B,C;for(B in D){C=D[B];if(!g.test(B)){if(Ext.isFunction(C)){h(y,B,D,C,D.scope)}else{h(y,B,C)}}}}else{h(y,w,x,A,z)}},removeListener:function(y,C,G,H){y=Ext.getDom(y);var w=k(y),E=y&&(Ext.elCache[w].events)[C]||[],x,B,z,A,D,F;for(B=0,D=E.length;B=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{doResizeEvent:function(){var l=a.getViewHeight(),k=a.getViewWidth();if(g!=l||h!=k){c.fire(h=k,g=l)}},onWindowResize:function(m,l,k){if(!c){c=new Ext.util.Event();j=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}c.addListener(m,l,k)},fireWindowResize:function(){if(c){j.delay(100)}},onTextResize:function(n,m,k){if(!e){e=new Ext.util.Event();var l=new Ext.Element(document.createElement("div"));l.dom.className="x-text-resize";l.dom.innerHTML="X";l.appendTo(document.body);b=l.dom.offsetHeight;setInterval(function(){if(l.dom.offsetHeight!=b){e.fire(b,b=l.dom.offsetHeight)}},this.textResizeInterval)}e.addListener(n,m,k)},removeResizeListener:function(l,k){if(c){c.removeListener(l,k)}},fireResize:function(){if(c){c.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,useKeydown:d}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=45)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});(function(){var j=document;Ext.Element=function(o,p){var q=typeof o=="string"?j.getElementById(o):o,r;if(!q){return null}r=q.id;if(!p&&r&&Ext.elCache[r]){return Ext.elCache[r].el}this.dom=q;this.id=r||Ext.id(q)};var a=Ext.lib.Dom,g=Ext.DomHelper,m=Ext.lib.Event,e=Ext.lib.Anim,h=Ext.Element,b=Ext.elCache;h.prototype={set:function(t,q){var r=this.dom,p,s,q=(q!==false)&&!!r.setAttribute;for(p in t){if(t.hasOwnProperty(p)){s=t[p];if(p=="style"){g.applyStyles(r,s)}else{if(p=="cls"){r.className=s}else{if(q){r.setAttribute(p,s)}else{r[p]=s}}}}}return this},defaultUnit:"px",is:function(o){return Ext.DomQuery.is(this.dom,o)},focus:function(r,q){var o=this,q=q||o.dom;try{if(Number(r)){o.focus.defer(r,null,[null,q])}else{q.focus()}}catch(p){}return o},blur:function(){try{this.dom.blur()}catch(o){}return this},getValue:function(o){var p=this.dom.value;return o?parseInt(p,10):p},addListener:function(o,r,q,p){Ext.EventManager.on(this.dom,o,r,q||this,p);return this},removeListener:function(o,q,p){Ext.EventManager.removeListener(this.dom,o,q,p||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(o){if(o===""||o=="auto"||o===undefined){o=o||""}else{if(!isNaN(o)||!k.test(o)){o=o+(this.defaultUnit||"px")}}return o},load:function(p,q,o){Ext.Ajax.request(Ext.apply({params:q,url:p.url||p,callback:o,el:this.dom,indicatorText:p.indicatorText||""},Ext.isObject(p)?p:{}));return this},isBorderBox:function(){return i[(this.dom.tagName||"").toLowerCase()]||Ext.isBorderBox},remove:function(){var o=this,p=o.dom;if(p){delete o.dom;Ext.removeNode(p)}},hover:function(p,o,r,q){var s=this;s.on("mouseenter",p,r||s.dom,q);s.on("mouseleave",o,r||s.dom,q);return s},contains:function(o){return !o?false:Ext.lib.Dom.isAncestor(this.dom,o.dom?o.dom:o)},getAttributeNS:function(p,o){return this.getAttribute(o,p)},getAttribute:Ext.isIE?function(o,q){var r=this.dom,p=typeof r[q+":"+o];if(["undefined","unknown"].indexOf(p)==-1){return r[q+":"+o]}return r[o]}:function(o,p){var q=this.dom;return q.getAttributeNS(p,o)||q.getAttribute(p+":"+o)||q.getAttribute(o)||q[o]},update:function(o){if(this.dom){this.dom.innerHTML=o}return this}};var n=h.prototype;h.addMethods=function(p){Ext.apply(n,p)};n.on=n.addListener;n.un=n.removeListener;n.autoBoxAdjust=true;var k=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,d;h.get=function(p){var o,s,r;if(!p){return null}if(typeof p=="string"){if(!(s=j.getElementById(p))){return null}if(b[p]&&b[p].el){o=b[p].el;o.dom=s}else{o=h.addToCache(new h(s))}return o}else{if(p.tagName){if(!(r=p.id)){r=Ext.id(p)}if(b[r]&&b[r].el){o=b[r].el;o.dom=p}else{o=h.addToCache(new h(p))}return o}else{if(p instanceof h){if(p!=d){p.dom=j.getElementById(p.id)||p.dom}return p}else{if(p.isComposite){return p}else{if(Ext.isArray(p)){return h.select(p)}else{if(p==j){if(!d){var q=function(){};q.prototype=h.prototype;d=new q();d.dom=j}return d}}}}}}return null};h.addToCache=function(o,p){p=p||o.id;b[p]={el:o,data:{},events:{}};return o};h.data=function(p,o,q){p=h.get(p);if(!p){return null}var r=b[p.id].data;if(arguments.length==2){return r[o]}else{return(r[o]=q)}};function l(){if(!Ext.enableGarbageCollector){clearInterval(h.collectorThreadId)}else{var p,r,u,s;for(p in b){s=b[p];if(s.skipGC){continue}r=s.el;u=r.dom;if(!u||!u.parentNode||(!u.offsetParent&&!j.getElementById(p))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(u)}delete b[p]}}if(Ext.isIE){var q={};for(p in b){q[p]=b[p]}b=Ext.elCache=q}}}h.collectorThreadId=setInterval(l,30000);var c=function(){};c.prototype=h.prototype;h.Flyweight=function(o){this.dom=o};h.Flyweight.prototype=new c();h.Flyweight.prototype.isFlyweight=true;h._flyweights={};h.fly=function(q,o){var p=null;o=o||"_global";if(q=Ext.getDom(q)){(h._flyweights[o]=h._flyweights[o]||new h.Flyweight()).dom=q;p=h._flyweights[o]}return p};Ext.get=h.get;Ext.fly=h.fly;var i=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){i.button=1}})();Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!/\S/.test(g.nodeValue)){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(Ext.isFunction(callback)){callback()}return this}var id=Ext.id(),dom=this.dom;html+='';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(Ext.isFunction(callback)){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=Ext.isObject(a)?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.lib.Dom.getViewWidth():k.getWidth(),i=q.height||b?Ext.lib.Dom.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,h,c,a,k,l){var i=this,e=i.dom,j=!Ext.isEmpty(k),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(l,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:j});Ext.EventManager.onWindowResize(d,null);if(j){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(k)?k:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}B=B||[0,0];A=(!A||A=="?"?"tl-bl?":(!/-/.test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.lib.Dom.getViewWidth()-10,G=Ext.lib.Dom.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){throw"Element.alignTo with an invalid alignment "+A}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(nG+D){l=u?v.top-F:G+D-F}if(lA){o=A-p;l=true}if((n+B)>g){n=g-B;l=true}if(o "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods({select:function(a,b){return Ext.Element.select(a,b,this.dom)}});Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.apply(Ext.Element.prototype,function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{insertSibling:function(i,g,h){var j=this,e,d=(g||"before").toLowerCase()=="after",k;if(Ext.isArray(i)){k=j;Ext.each(i,function(l){e=Ext.fly(k,"_internal").insertSibling(l,g,h);if(d){k=e}});return e}i=i||{};if(i.nodeType||i.dom){e=j.dom.parentNode.insertBefore(c(i),d?j.dom.nextSibling:j.dom);if(!h){e=a(e)}}else{if(d&&!j.dom.nextSibling){e=b.append(j.dom.parentNode,i,!h)}else{e=b[d?"insertAfter":"insertBefore"](j.dom,i,!h)}}return e}}}());Ext.Element.addMethods(function(){var h={},x=/(-[a-z])/gi,b={},s=document.defaultView,u=Ext.isIE?"styleFloat":"cssFloat",C=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,A=Ext.Element,d="padding",c="margin",y="border",t="-left",q="-right",w="-top",o="-bottom",j="-width",r=Math,z="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",B="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+o+j},g={l:d+t,r:d+q,t:d+w,b:d+o},a={l:c+t,r:c+q,t:c+w,b:c+o},D=Ext.Element.data;function p(E,F){return F.charAt(1).toUpperCase()}function v(E){return h[E]||(h[E]=E=="float"?u:E.replace(x,p))}return{adjustWidth:function(E){var F=this;var G=Ext.isNumber(E);if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("lr")+F.getPadding("lr"))}return(G&&E<0)?0:E},adjustHeight:function(E){var F=this;var G=Ext.isNumber(E);if(G&&F.autoBoxAdjust&&!F.isBorderBox()){E-=(F.getBorderWidth("tb")+F.getPadding("tb"))}return(G&&E<0)?0:E},addClass:function(H){var I=this,G,E,F;H=Ext.isArray(H)?H:[H];for(G=0,E=H.length;G5?G.toLowerCase():F)},setStyle:function(I,H){var F,G,E;if(!Ext.isObject(I)){F={};F[I]=H;I=F}for(G in I){H=I[G];G=="opacity"?this.setOpacity(H):this.dom.style[v(G)]=H}return this},setOpacity:function(F,E){var I=this,G=I.dom.style;if(!E||!I.anim){if(Ext.isIE){var H=F<1?"alpha(opacity="+F*100+")":"",J=G.filter.replace(C,"").replace(l,"");G.zoom=1;G.filter=J+(J.length>0?" ":"")+H}else{G.opacity=F}}else{I.anim({opacity:{to:F}},I.preanim(arguments,1),null,0.35,"easeIn")}return I},clearOpacity:function(){var E=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(E.filter)){E.filter=E.filter.replace(C,"").replace(l,"")}}else{E.opacity=E["-moz-opacity"]=E["-khtml-opacity"]=""}return this},getHeight:function(G){var F=this,I=F.dom,H=Ext.isIE&&F.isStyle("display","none"),E=r.max(I.offsetHeight,H?0:I.clientHeight)||0;E=!G?E:E-F.getBorderWidth("tb")-F.getPadding("tb");return E<0?0:E},getWidth:function(F){var G=this,I=G.dom,H=Ext.isIE&&G.isStyle("display","none"),E=r.max(I.offsetWidth,H?0:I.clientWidth)||0;E=!F?E:E-G.getBorderWidth("lr")-G.getPadding("lr");return E<0?0:E},setWidth:function(F,E){var G=this;F=G.adjustWidth(F);!E||!G.anim?G.dom.style.width=G.addUnits(F):G.anim({width:{to:F}},G.preanim(arguments,1));return G},setHeight:function(E,F){var G=this;E=G.adjustHeight(E);!F||!G.anim?G.dom.style.height=G.addUnits(E):G.anim({height:{to:E}},G.preanim(arguments,1));return G},getBorderWidth:function(E){return this.addStyles(E,i)},getPadding:function(E){return this.addStyles(E,g)},clip:function(){var E=this,F=E.dom;if(!D(F,e)){D(F,e,true);D(F,B,{o:E.getStyle(k),x:E.getStyle(n),y:E.getStyle(m)});E.setStyle(k,z);E.setStyle(n,z);E.setStyle(m,z)}return E},unclip:function(){var E=this,G=E.dom;if(D(G,e)){D(G,e,false);var F=D(G,B);if(F.o){E.setStyle(k,F.o)}if(F.x){E.setStyle(n,F.x)}if(F.y){E.setStyle(m,F.y)}}return E},addStyles:function(J,I){var K=0,F=J.match(/\w/g),H;for(var G=0,E=F.length;G"+String.format(Ext.Element.boxMarkup,c)+"
      "));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var g=this;if(Ext.isObject(e)){c=e.height;e=e.width}e=g.adjustWidth(e);c=g.adjustHeight(c);if(!d||!g.anim){g.dom.style.width=g.addUnits(e);g.dom.style.height=g.addUnits(c)}else{g.anim({width:{to:e},height:{to:c}},g.preanim(arguments,2))}return g},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var g=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var g=document,h=this.dom,c=(h==g||h==g.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:h.clientWidth,height:h.clientHeight}}},getStyleSize:function(){var j=this,c,i,l=document,m=this.dom,e=(m==l||m==l.body),g=m.style;if(e){var k=Ext.lib.Dom;return{width:k.getViewWidth(),height:k.getViewHeight()}}if(g.width&&g.width!="auto"){c=parseFloat(g.width);if(j.isBorderBox()){c-=j.getFrameWidth("lr")}}if(g.height&&g.height!="auto"){i=parseFloat(g.height);if(j.isBorderBox()){i-=j.getFrameWidth("tb")}}return{width:c||j.getWidth(true),height:i||j.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,g={t:"top",l:"left",r:"right",b:"bottom"},h={};if(!d){for(c in e.margins){h[g[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return h}else{return e.addStyles.call(e,d,e.margins)}}}}());(function(){var a=Ext.lib.Dom,b="left",g="right",d="top",i="bottom",h="position",c="static",e="relative",j="auto",k="z-index";Ext.Element.addMethods({getX:function(){return a.getX(this.dom)},getY:function(){return a.getY(this.dom)},getXY:function(){return a.getXY(this.dom)},getOffsetsTo:function(l){var n=this.getXY(),m=Ext.fly(l,"_internal").getXY();return[n[0]-m[0],n[1]-m[1]]},setX:function(l,m){return this.setXY([l,this.getY()],this.animTest(arguments,m,1))},setY:function(m,l){return this.setXY([this.getX(),m],this.animTest(arguments,l,1))},setLeft:function(l){this.setStyle(b,this.addUnits(l));return this},setTop:function(l){this.setStyle(d,this.addUnits(l));return this},setRight:function(l){this.setStyle(g,this.addUnits(l));return this},setBottom:function(l){this.setStyle(i,this.addUnits(l));return this},setXY:function(n,l){var m=this;if(!l||!m.anim){a.setXY(m.dom,n)}else{m.anim({points:{to:n}},m.preanim(arguments,1),"motion")}return m},setLocation:function(l,n,m){return this.setXY([l,n],this.animTest(arguments,m,2))},moveTo:function(l,n,m){return this.setXY([l,n],this.animTest(arguments,m,2))},getLeft:function(l){return !l?this.getX():parseInt(this.getStyle(b),10)||0},getRight:function(l){var m=this;return !l?m.getX()+m.getWidth():(m.getLeft(true)+m.getWidth())||0},getTop:function(l){return !l?this.getY():parseInt(this.getStyle(d),10)||0},getBottom:function(l){var m=this;return !l?m.getY()+m.getHeight():(m.getTop(true)+m.getHeight())||0},position:function(p,o,l,n){var m=this;if(!p&&m.isStyle(h,c)){m.setStyle(h,e)}else{if(p){m.setStyle(h,p)}}if(o){m.setStyle(k,o)}if(l||n){m.setXY([l||false,n||false])}},clearPositioning:function(l){l=l||"";this.setStyle({left:l,right:l,top:l,bottom:l,"z-index":"",position:c});return this},getPositioning:function(){var m=this.getStyle(b);var n=this.getStyle(d);return{position:this.getStyle(h),left:m,right:m?"":this.getStyle(g),top:n,bottom:n?"":this.getStyle(i),"z-index":this.getStyle(k)}},setPositioning:function(l){var n=this,m=n.dom.style;n.setStyle(l);if(l.right==j){m.right=""}if(l.bottom==j){m.bottom=""}return n},translatePoints:function(m,u){u=isNaN(m[1])?u:m[1];m=isNaN(m[0])?m:m[0];var q=this,r=q.isStyle(h,e),s=q.getXY(),n=parseInt(q.getStyle(b),10),p=parseInt(q.getStyle(d),10);n=!isNaN(n)?n:(r?0:q.dom.offsetLeft);p=!isNaN(p)?p:(r?0:q.dom.offsetTop);return{left:(m-s[0]+n),top:(u-s[1]+p)}},animTest:function(m,l,n){return !!l&&this.preanim?this.preanim(m,n):false}})})();Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(j,p){var m=this,v,e,o,d=m.getBorderWidth,q=m.getPadding,g,a,u,n;if(!p){v=m.getXY()}else{e=parseInt(m.getStyle("left"),10)||0;o=parseInt(m.getStyle("top"),10)||0;v=[e,o]}var c=m.dom,s=c.offsetWidth,i=c.offsetHeight,k;if(!j){k={x:v[0],y:v[1],0:v[0],1:v[1],width:s,height:i}}else{g=d.call(m,"l")+q.call(m,"l");a=d.call(m,"r")+q.call(m,"r");u=d.call(m,"t")+q.call(m,"t");n=d.call(m,"b")+q.call(m,"b");k={x:v[0]+g,y:v[1]+u,0:v[0]+g,1:v[1]+u,width:s-(g+a),height:i-(u+n)}}k.right=k.x+k.width;k.bottom=k.y+k.height;return k},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.moveTo(e[j][0],e[j][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({isScrollable:function(){var a=this.dom;return a.scrollHeight>a.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,g=c.dom,h;if(!a||!c.anim){h="scroll"+(e?"Top":"Left"),g[h]=d}else{h="scroll"+(e?"Left":"Top"),c.anim({scroll:{to:e?[g[h],d]:[d,g[h]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,i){var p=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(p),k=g[0]+p.scrollLeft,u=g[1]+p.scrollTop,q=u+h.offsetHeight,d=k+h.offsetWidth,a=p.clientHeight,m=parseInt(p.scrollTop,10),s=parseInt(p.scrollLeft,10),j=m+a,n=s+p.clientWidth;if(h.offsetHeight>a||uj){p.scrollTop=q-a}}p.scrollTop=p.scrollTop;if(i!==false){if(h.offsetWidth>p.clientWidth||kn){p.scrollLeft=d-p.clientWidth}}p.scrollLeft=p.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.preanim(arguments,2))}return c}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.addMethods(function(){var h="visibility",d="display",b="hidden",j="none",a="originalDisplay",c="visibilityMode",e=Ext.Element.DISPLAY,g=Ext.Element.data,i=function(m){var l=g(m,a);if(l===undefined){g(m,a,l="")}return l},k=function(n){var l=g(n,c);if(l===undefined){g(n,c,l=1)}return l};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(l){g(this.dom,c,l);return this},animate:function(m,o,n,p,l){this.anim(m,{duration:o,callback:n,easing:p},l);return this},anim:function(o,p,m,r,n,l){m=m||"run";p=p||{};var q=this,s=Ext.lib.Anim[m](q.dom,o,(p.duration||r)||0.35,(p.easing||n)||"easeOut",function(){if(l){l.call(q)}if(p.callback){p.callback.call(p.scope||q,q,p)}},q);p.anim=s;return s},preanim:function(l,m){return !l[m]?false:(Ext.isObject(l[m])?l[m]:{duration:l[m+1],callback:l[m+2],easing:l[m+3]})},isVisible:function(){return !this.isStyle(h,b)&&!this.isStyle(d,j)},setVisible:function(p,m){var n=this,o=n.dom,l=k(this.dom)==e;if(!m||!n.anim){if(l){n.setDisplayed(p)}else{n.fixDisplay();o.style.visibility=p?"visible":b}}else{if(p){n.setOpacity(0.01);n.setVisible(true)}n.anim({opacity:{to:(p?1:0)}},n.preanim(arguments,1),null,0.35,"easeIn",function(){if(!p){o.style[l?d:h]=(l)?j:b;Ext.fly(o).setOpacity(1)}})}return n},toggle:function(l){var m=this;m.setVisible(!m.isVisible(),m.preanim(arguments,0));return m},setDisplayed:function(l){if(typeof l=="boolean"){l=l?i(this.dom):j}this.setStyle(d,l);return this},fixDisplay:function(){var l=this;if(l.isStyle(d,j)){l.setStyle(h,b);l.setStyle(d,i(this.dom));if(l.isStyle(d,j)){l.setStyle(d,"block")}}},hide:function(l){this.setVisible(false,this.preanim(arguments,0));return this},show:function(l){this.setVisible(true,this.preanim(arguments,0));return this}}}());Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!/^body/i.test(k.tagName)){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,n){var p=this,l=p.dom,o=Ext.DomHelper,m="ext-el-mask-msg",i,q;if(p.getStyle("position")=="static"){p.addClass(g)}if((i=e(l,"maskMsg"))){i.remove()}if((i=e(l,"mask"))){i.remove()}q=o.append(l,{cls:"ext-el-mask"},true);e(l,"mask",q);p.addClass(c);q.setDisplayed(true);if(typeof j=="string"){var k=o.append(l,{cls:m,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=n?m+" "+n:m;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(p)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&p.getStyle("height")=="auto"){q.setSize(undefined,p.getHeight())}return q},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined)}k.removeClass([c,g])},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className="ext-shim";i.src=Ext.SSL_SECURE_URL;j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(!Ext.isObject(b)||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(C.callback){C.callback.call(C.scope,p(B))}if(!C.concurrent){c(D).shift();p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(Ext.isString(d)){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;(function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(Ext.isFunction(b[c])){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}})();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=function(b,a){this.elements=[];this.add(b,a)};Ext.extend(Ext.CompositeElement,Ext.CompositeElementLite,{getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(j){Ext.apply(this,j);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText='
      '+n.indicatorText+"
      "}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText})}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:n.timeout||s.timeout},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n)}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n)}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||/multipart\/form-data/i.test(m.getAttribute("enctype"))){return s.doFormUpload.call(s,n,l,k)}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()))}n.headers=Ext.apply(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort()}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l=""}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n))}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId)}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,true,j)}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,false,j)}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden"});v.body.appendChild(r);Ext.fly(r).set({src:Ext.SSL_SECURE_URL});if(Ext.isIE){document.frames[l].name=l}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t)});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value}else{w.responseText=A.body.innerHTML}}w.responseXML=A.XMLDocument||A}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B)}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r)},100)}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(j){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,j){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(j)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var j=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}j.el=i;j.defaultUrl=null;j.addEvents(b,d,c);Ext.apply(j,Ext.Updater.defaults);j.transaction=null;j.refreshDelegate=j.refresh.createDelegate(j);j.updateDelegate=j.update.createDelegate(j);j.formUpdateDelegate=(j.formUpdate||function(){}).createDelegate(j);j.renderer=j.renderer||j.getDefaultRenderer();Ext.Updater.superclass.constructor.call(j)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,n,p,l){var k=this,h,j;if(k.fireEvent(b,k.el,i,n)!==false){if(Ext.isObject(i)){h=i;i=h.url;n=n||h.params;p=p||h.callback;l=l||h.discardUrl;j=h.scope;if(!Ext.isEmpty(h.nocache)){k.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){k.indicatorText='
      '+h.text+"
      "}if(!Ext.isEmpty(h.scripts)){k.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){k.timeout=h.timeout}}k.showLoading();if(!l){k.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(k)}var m=Ext.apply({},{url:i,params:(Ext.isFunction(n)&&j)?n.createDelegate(j):n,success:a,failure:e,scope:k,callback:undefined,timeout:(k.timeout*1000),disableCaching:k.disableCaching,argument:{options:h,url:i,form:null,callback:p,scope:j||window,params:n}},h);k.transaction=Ext.Ajax.request(m)}},formUpdate:function(k,h,j,l){var i=this;if(i.fireEvent(b,i.el,k,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}k=Ext.getDom(k);i.transaction=Ext.Ajax.request({form:k,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:k,callback:l,reset:j}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,j,l,m,h){var k=this;if(h){k.update(j||k.defaultUrl,l,m,true)}if(k.autoRefreshProcId){clearInterval(k.autoRefreshProcId)}k.autoRefreshProcId=setInterval(k.update.createDelegate(k,[j||k.defaultUrl,l,m,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'
      Loading...
      ',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"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 k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g= 0 && y >= 0){","v = new Date(y, 0, 1, h, i, s, ms);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y, m, d, h, i, s, ms);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=Date.parseRegexes.length,n=1,g=[],l=[],k=false,d="";for(var j=0;j Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:{g:1,c:"if (results[{0}] == 'am') {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(am|pm)"},A:{g:1,c:"if (results[{0}] == 'AM') {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return !Ext.isFunction(c)||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(m,a,l){var e,g,d=String(a).toUpperCase()=="DESC"?-1:1,j=[],b=this.keys,h=this.items;l=l||function(i,c){return i-c};for(e=0,g=h.length;ee?1:(g=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c]+>/gi,stripScriptsRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var w=this,i=w.html,p=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^]*?for="(.*?)"/,t=/^]*?if="(.*?)"/,v=/^]*?exec="(.*?)"/,q,o=0,j=[],n="values",u="parent",k="xindex",l="xcount",e="return ",c="with(values){ ";i=["",i,""].join("");while((q=i.match(p))){var b=q[0].match(d),a=q[0].match(t),y=q[0].match(v),g=null,h=null,r=null,x=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(n,u,k,l,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(y){g=y&&y[1]?y[1]:null;if(g){r=new Function(n,u,k,l,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(x){switch(x){case".":x=new Function(n,u,c+e+n+"; }");break;case"..":x=new Function(n,u,c+e+u+"; }");break;default:x=new Function(n,u,c+e+x+"; }")}}j.push({id:o,target:x,exec:r,test:h,body:q[1]||""});i=i.replace(q[0],"{xtpl"+o+"}");++o}Ext.each(j,function(m){w.compileTpl(m)});w.master=j[j.length-1];w.tpls=j};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,i,h,d,c){var g=this,e,k=g.tpls[a],j,b=[];if((k.test&&!k.test.call(g,i,h,d,c))||(k.exec&&k.exec.call(g,i,h,d,c))){return""}j=k.target?k.target.call(g,i,h):i;e=j.length;h=k.target?i:h;if(k.target&&Ext.isArray(j)){Ext.each(j,function(l,m){b[b.length]=k.compiled.call(g,l,h,m+1,e)});return b.join("")}return k.compiled.call(g,j,h,d,c)},compileTpl:function(tpl){var fm=Ext.util.Format,useF=this.disableFormats!==true,sep=Ext.isGecko?"+":",",body;function fn(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+"'"}function codeFn(m,code){return"'"+sep+"("+code.replace(/\\'/g,"'")+")"+sep+"'"}if(Ext.isGecko){body="tpl.compiled = function(values, parent, xindex, xcount){ return '"+tpl.body.replace(/(\r\n|\n)/g,"\\n").replace(/'/g,"\\'").replace(this.re,fn).replace(this.codeRe,codeFn)+"';};"}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},applyTemplate:function(a){return this.master.compiled.call(this,a,{},1,1)},compile:function(){return this}});Ext.XTemplate.prototype.apply=Ext.XTemplate.prototype.applyTemplate;Ext.XTemplate.from=function(a){a=Ext.getDom(a);return new Ext.XTemplate(a.value||a.innerHTML)};Ext.util.CSS=function(){var d=null;var c=document;var b=/(-[a-z])/gi;var a=function(e,g){return g.charAt(1).toUpperCase()};return{createStyleSheet:function(i,l){var h;var g=c.getElementsByTagName("head")[0];var k=c.createElement("style");k.setAttribute("type","text/css");if(l){k.setAttribute("id",l)}if(Ext.isIE){g.appendChild(k);h=k.styleSheet;h.cssText=i}else{try{k.appendChild(c.createTextNode(i))}catch(j){k.cssText=i}g.appendChild(k);h=k.styleSheet?k.styleSheet:(k.sheet||c.styleSheets[c.styleSheets.length-1])}this.cacheStyleSheet(h);return h},removeStyleSheet:function(g){var e=c.getElementById(g);if(e){e.parentNode.removeChild(e)}},swapStyleSheet:function(h,e){this.removeStyleSheet(h);var g=c.createElement("link");g.setAttribute("rel","stylesheet");g.setAttribute("type","text/css");g.setAttribute("id",h);g.setAttribute("href",e);c.getElementsByTagName("head")[0].appendChild(g)},refreshCache:function(){return this.getRules(true)},cacheStyleSheet:function(h){if(!d){d={}}try{var k=h.cssRules||h.rules;for(var g=k.length-1;g>=0;--g){d[k[g].selectorText.toLowerCase()]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets;for(var j=0,g=k.length;j=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;cj+o.left){k=j-l-c;g=true}if((i+e)>d+o.top){i=d-e-c;g=true}if(k=m){i=m-e-5}}n=[k,i];this.storeXY(n);a.setXY.call(this,n);this.sync()}}return this},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(i,h,k,l,j){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(l){l()}}.createDelegate(this);a.setVisible.call(this,true,true,k,g,j)}else{if(!i){this.hideUnders(true)}var g=l;if(h){g=function(){this.hideAction();if(l){l()}}.createDelegate(this)}a.setVisible.call(this,i,h,k,g,j);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(j,h,k,l,i){this.fixDisplay();this.beforeAction();this.storeXY(j);var g=this.createCB(l);a.setXY.call(this,j,h,k,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,j,k,i){this.setXY([g,this.getY()],h,j,k,i);return this},setY:function(k,g,i,j,h){this.setXY([this.getX(),k],g,i,j,h);return this},setSize:function(j,k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setSize.call(this,j,k,i,m,g,l);if(!i){g()}return this},setWidth:function(i,h,k,l,j){this.beforeAction();var g=this.createCB(l);a.setWidth.call(this,i,h,k,g,j);if(!h){g()}return this},setHeight:function(j,i,l,m,k){this.beforeAction();var g=this.createCB(m);a.setHeight.call(this,j,i,l,g,k);if(!i){g()}return this},setBounds:function(o,m,p,i,n,k,l,j){this.beforeAction();var g=this.createCB(l);if(!n){this.storeXY([o,m]);a.setXY.call(this,[o,m]);a.setSize.call(this,p,i,n,k,g,j);g()}else{a.setBounds.call(this,o,m,p,i,n,k,g,j)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0};var b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,r,q,g){if(!this.el){return}var n=this.adjusts,k=this.el.dom,u=k.style;var i=0;u.left=(b+n.l)+"px";u.top=(r+n.t)+"px";var p=(q+n.w),e=(g+n.h),j=p+"px",o=e+"px";if(u.width!=j||u.height!=o){u.width=j;u.height=o;if(!Ext.isIE){var m=k.childNodes;var c=Math.max(0,(p-12))+"px";m[0].childNodes[1].style.width=c;m[1].childNodes[1].style.width=c;m[2].childNodes[1].style.width=c;m[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[];var a=Ext.isIE?'
      ':'
      ';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height,b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(bthis.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b,this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),g=c.width,a=c.height,e;if(g!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");this.enableBubble(this.bubbleEvents);var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.initItems();this.layout=a;a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(h){a.push(this.add(h))},this);return a}var g=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,g,d)!==false&&this.onBeforeAdd(g)!==false){this.items.add(g);g.onAdded(this,d);this.onAdd(g);this.fireEvent("add",this,g,d)}return g},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(h,g){this.initItems();var e=arguments,d=e.length;if(d>2){var b=[];for(var j=d-1;j>=1;--j){b.push(this.insert(h,e[j]))}return b}var k=this.lookupComponent(this.applyDefaults(g));h=Math.min(h,this.items.length);if(this.fireEvent("beforeadd",this,k,h)!==false&&this.onBeforeAdd(k)!==false){if(k.ownerCt==this){this.items.remove(k)}this.items.insert(h,k);k.onAdded(this,h);this.onAdd(k);this.fireEvent("add",this,k,h)}return k},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d','','
      ','
      ',"
    ");a.disableFormats=true;return a.compile()})(),destroy:function(){if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{runLayout:function(){var a=this.container;a.doLayout();delete a.layoutPending}});Ext.Container.LAYOUTS.auto=Ext.layout.AutoLayout;Ext.layout.FitLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"fit",getLayoutTargetSize:function(){var a=this.container.getLayoutTarget();if(!a){return{}}return a.getStyleSize()},onLayout:function(a,b){Ext.layout.FitLayout.superclass.onLayout.call(this,a,b);if(!a.collapsed){this.setItemSize(this.activeItem||a.items.itemAt(0),this.getLayoutTargetSize())}},setItemSize:function(b,a){if(b&&a.height>0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",constructor:function(a){Ext.layout.CardLayout.superclass.constructor.call(this,a)},setActiveItem:function(c){var a=this.activeItem,b=this.container;c=b.getComponent(c);if(c&&a!=c){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}this.activeItem=c;delete c.deferLayout;c.show();this.layout();if(c.doLayout){c.doLayout()}c.fireEvent("activate",c)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",getLayoutTargetSize:function(){var a=this.container.getLayoutTarget();if(!a){return{}}return a.getStyleSize()},onLayout:function(l,o){Ext.layout.AnchorLayout.superclass.onLayout.call(this,l,o);var u=this.getLayoutTargetSize();var s=u.width,k=u.height;if(s<20&&k<20){return}var d,q;if(l.anchorSize){if(typeof l.anchorSize=="number"){d=l.anchorSize}else{d=l.anchorSize.width;q=l.anchorSize.height}}else{d=l.initialConfig.width;q=l.initialConfig.height}var n=this.getRenderedItems(l),m=n.length,j,p,r,g,b,e,t;for(j=0;j ');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){var a=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(b){if(!b.within(this.el,true)){a.delay(500)}},mouseover:function(b){a.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){Ext.destroy(this.miniCollapsedEl,this.collapsedEl)}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:false,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=a.labelSeparator||this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode)},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e,a)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e,a)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"anchor",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}},isValidParent:function(b,a){return this.innerCt&&b.getPositionEl().dom.parentNode==this.innerCt.dom},renderAll:function(a,b){if(!this.innerCt){this.innerCt=b.createChild({cls:this.innerCls});this.padding=this.parseMargins(this.padding)}Ext.layout.BoxLayout.superclass.renderAll.call(this,a,this.innerCt)},onLayout:function(a,b){this.renderAll(a,b)},getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a;if(b){a=b.getViewSize();a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},renderItem:function(a){if(Ext.isString(a.margins)){a.margins=this.parseMargins(a.margins)}else{if(!a.margins){a.margins=this.defaultMargins}}Ext.layout.BoxLayout.superclass.renderItem.apply(this,arguments)}});Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",onLayout:function(j,K){Ext.layout.VBoxLayout.superclass.onLayout.call(this,j,K);var k=this.getRenderedItems(j),m=k.length,I,D,o,s,z,p,v,r,e,A=this.getLayoutTargetSize(),q=A.width,F=A.height-this.scrollOffset,B=this.padding.left,u=this.padding.top,n=this.pack=="start",x=0,H=0,C=0,g=0,y=0,G=[],E=[];for(D=0;D0){p+=(v/2);r-=v}}I.setPosition(p,u);if(n&&I.flex){s=Math.max(0,G[y++]+(J-->0?1:0));I.setSize(r,s)}else{s=I.getHeight()}u+=s+o.bottom}if(D=K.getStyle("overflow")&&D!="hidden"&&!this.adjustmentPass){var b=this.getLayoutTargetSize();if(b.width!=A.width||b.height!=A.height){this.adjustmentPass=true;this.onLayout(j,K)}}delete this.adjustmentPass}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",onLayout:function(e,J){Ext.layout.HBoxLayout.superclass.onLayout.call(this,e,J);var g=this.getRenderedItems(e),j=g.length,H,D,n,d,q,s,A,v=this.getLayoutTargetSize(),p=v.width-this.scrollOffset,F=v.height,y=this.padding.left,r=this.padding.top,m=this.pack=="start",C=["stretch","stretchmax"].indexOf(this.align)==-1,G=0,x=0,z=0,k=0;for(D=0;D0?1:0));if(C){E.push(H.getHeight())}H.setSize(d,b)}else{d=H.getWidth()}y+=d+n.right}u=0;for(D=0;D0){H.setPosition(H.x,q)}}if(m&&H.flex){H.setHeight(q)}}}}if(D=J.getStyle("overflow")&&D!="hidden"&&!this.adjustmentPass){var a=this.getLayoutTargetSize();if(a.width!=v.width||a.height!=v.height){this.adjustmentPass=true;this.onLayout(e,J)}}delete this.adjustmentPass}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,triggerWidth:18,lastOverflow:false,noItemsMenuText:'
    (None)
    ',onLayout:function(d,h){if(!this.leftTr){var g=d.buttonAlign=="center"?"center":"left";h.addClass("x-toolbar-layout-ct");h.insertHtml("beforeEnd",'
    ');this.leftTr=h.child("tr.x-toolbar-left-row",true);this.rightTr=h.child("tr.x-toolbar-right-row",true);this.extrasTr=h.child("tr.x-toolbar-extras-row",true)}var j=d.buttonAlign=="right"?this.rightTr:this.leftTr,m=0,k=d.items.items;for(var b=0,e=k.length,l;b=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,a,d){var b=document.createElement("td");b.className="x-toolbar-cell";a.insertBefore(b,a.childNodes[d]||null);return b},hideItem:function(b){var a=(this.hiddens=this.hiddens||[]);a.push(b);b.xtbHidden=true;b.xtbWidth=b.getPositionEl().dom.parentNode.offsetWidth;b.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddens.remove(a);if(this.hiddens.length<1){delete this.hiddens}},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(n){if(this.container.enableOverflow===false){return}var m=n.dom.clientWidth,b=this.lastWidth||0,d=n.dom.firstChild.offsetWidth,l=m-this.triggerWidth,k=-1;this.lastWidth=m;if(d>m||(this.hiddens&&m>=b)){var e,h=this.container.items.items,g=h.length,j,a=0;for(e=0;el){if(!(j.hidden||j.xtbHidden)){this.hideItem(j)}}else{if(j.xtbHidden){this.unhideItem(j)}}}}}if(this.hiddens){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(e,b){var a=Ext.apply({},e.initialConfig),d=e.toggleGroup;Ext.apply(a,{text:e.overflowText||e.text,iconCls:e.iconCls,icon:e.icon,itemId:e.itemId,disabled:e.disabled,handler:e.handler,scope:e.scope,menu:e.menu,hideOnClick:b});if(d||e.enableToggle){Ext.apply(a,{group:d,checked:e.pressed,listeners:{checkchange:function(g,c){e.toggle(c)}}})}delete a.ownerCt;delete a.xtype;delete a.id;return a},addComponentToMenu:function(a,b){if(b instanceof Ext.Toolbar.Separator){a.add("-")}else{if(Ext.isFunction(b.isXType)){if(b.isXType("splitbutton")){a.add(this.createMenuConfig(b,true))}else{if(b.isXType("button")){a.add(this.createMenuConfig(b,!b.menu))}else{if(b.isXType("buttongroup")){b.items.each(function(c){this.addComponentToMenu(a,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(b){var g=this.container.items.items,a=g.length,k,j,d=function(h,c){return h.isXType("buttongroup")&&!(c instanceof Ext.Toolbar.Separator)};this.clearMenu();b.removeAll();for(var e=0;e','','',"","")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.getItemId();if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(g,b)}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(b){var a=b instanceof Ext.menu.Item;return{isMenuItem:a,needsIcon:!a&&(b.icon||b.iconCls),icon:b.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(b.iconCls||""),itemId:"x-menu-el-"+b.id,itemCls:"x-menu-list-item "}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);delete this.tbar}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);delete this.bbar}if(this.header===true){this.elements+=",header";delete this.header}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";delete this.footer}if(this.buttons){this.fbar=this.buttons;delete this.buttons}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,h=a.dom,k,i;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){i=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var j=this.bwrap?this.bwrap:a;this.tbar=j.down("."+this.tbarCls);this.body=j.down("."+this.bodyCls);this.bbar=j.down("."+this.bbarCls);this.footer=j.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);k=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];k.appendChild(c);k.appendChild(b);var l=k.firstChild.firstChild.firstChild;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",k.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(l)}else{this.createElement("header",h);this.createElement("bwrap",h);k=this.bwrap.dom;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",k);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML=''+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(i){this.addTool.apply(this,i)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var d=this.header,c=d.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{Ext.DomHelper.insertBefore(d.dom.firstChild,{tag:"img",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('
     
    ');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,this.adjustBodyHeight(a-this.getFrameHeight()));c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();if(a!==false){this.el.removeClass("x-panel-animated")}},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide();this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);this.afterEffect(a);this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show();this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(a,b){if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,this.adjustBodyHeight(b-this.getFrameHeight()));this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){a+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.getSize().height-this.getFrameHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.toolbars,this.tbar,this.bbar,this.body,this.mc,this.bwrap);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}else{Ext.destroy(this.topToolbar,this.bottomToolbar)}},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(g,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}}this.fireEvent("specialkey",g,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur!==true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate(' ');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(a){a=a.replace("#","");if(a!=this.value||this.allowReselect){var b=this.el;if(this.value){b.child("a.color-"+this.value).removeClass("x-color-palette-sel")}b.child("a.color-"+a).addClass("x-color-palette-sel");this.value=a;this.fireEvent("select",this,a)}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['','','",this.showToday?'':"",'
      
    '],c=this.dayNames,h;for(h=0;h<7;h++){var k=this.startDay+h;if(k>6){k=k-7}a.push("")}a[a.length]="";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]=""}a[a.length]=''}a.push("
    ",c[k].substr(0,1),"
    ');var j=document.createElement("div");j.className="x-date-picker";j.innerHTML=a.join("");e.dom.insertBefore(j,b);this.el=Ext.get(j);this.eventEl=Ext.get(j.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=[''];for(var b=0;b<6;b++){a.push('",'",b===0?'':'')}a.push('","
    ',Date.getShortMonthName(b),"',Date.getShortMonthName(b+6),"
    ");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(H,B){if(this.rendered){var a=this.activeDate,p=this.isVisible();this.activeDate=H;if(!B&&a&&this.el){var o=H.getTime();if(a.getMonth()==H.getMonth()&&a.getFullYear()==H.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==o){d.addClass("x-date-selected");if(p&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var k=H.getDaysInMonth(),q=H.getFirstDateOfMonth(),g=q.getDay()-this.startDay;if(g<0){g+=7}k+=g;var C=H.add("mo",-1),h=C.getDaysInMonth()-g,e=this.cells.elements,r=this.textNodes,z=86400000,E=(new Date(C.getFullYear(),C.getMonth(),h)).clearTime(),D=new Date().clearTime().getTime(),v=H.clearTime(true).getTime(),u=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,y=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,G=this.disabledDatesRE,s=this.disabledDatesText,J=this.disabledDays?this.disabledDays.join(""):false,F=this.disabledDaysText,A=this.format;if(this.showToday){var m=new Date().clearTime(),c=(my||(G&&A&&G.test(m.dateFormat(A)))||(J&&J.indexOf(m.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var l=function(K,d){d.title="";var i=E.getTime();d.firstChild.dateValue=i;if(i==D){d.className+=" x-date-today";d.title=K.todayText}if(i==v){d.className+=" x-date-selected";if(p){Ext.fly(d.firstChild).focus(50)}}if(iy){d.className=" x-date-disabled";d.title=K.maxText;return}if(J){if(J.indexOf(E.getDay())!=-1){d.title=F;d.className=" x-date-disabled"}}if(G&&A){var w=E.dateFormat(A);if(G.test(w)){d.title=s.replace("%0",w);d.className=" x-date-disabled"}}};var x=0;for(;xthis.clickRange[0]&&a.topc){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.Slider.superclass.afterRender.apply(this,arguments);if(this.value!==undefined){var a=this.normalizeValue(this.value);if(a!==this.value){delete this.value;this.setValue(a,false)}else{this.moveThumb(this.translateValue(a),false)}}},getRatio:function(){var a=this.innerEl.getWidth(),b=this.maxValue-this.minValue;return b==0?a:(a/b)},normalizeValue:function(a){a=this.doSnap(a);a=Ext.util.Format.round(a,this.decimalPrecision);a=a.constrain(this.minValue,this.maxValue);return a},setMinValue:function(a){this.minValue=a;this.syncThumb();if(this.valuea){this.setValue(a)}},setValue:function(b,a,c){b=this.normalizeValue(b);if(b!==this.value&&this.fireEvent("beforechange",this,b,this.value)!==false){this.value=b;this.moveThumb(this.translateValue(b),a!==false);this.fireEvent("change",this,b);if(c){this.fireEvent("changecomplete",this,b)}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(b,a){if(!a||this.animate===false){this.thumb.setLeft(b)}else{this.thumb.shift({left:b,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onBeforeDragStart:function(a){return !this.disabled},onDragStart:function(a){this.thumb.addClass("x-slider-thumb-drag");this.dragging=true;this.dragStartValue=this.value;this.fireEvent("dragstart",this,a)},onDrag:function(a){var b=this.innerEl.translatePoints(this.tracker.getXY());this.setValue(Ext.util.Format.round(this.reverseValue(b.left),this.decimalPrecision),false);this.fireEvent("drag",this,a)},onDragEnd:function(a){this.thumb.removeClass("x-slider-thumb-drag");this.dragging=false;this.fireEvent("dragend",this,a);if(this.dragStartValue!=this.value){this.fireEvent("changecomplete",this,this.value)}},onResize:function(a,b){this.innerEl.setWidth(a-(this.el.getPadding("l")+this.endEl.getPadding("r")));this.syncThumb();Ext.Slider.superclass.onResize.apply(this,arguments)},onDisable:function(){Ext.Slider.superclass.onDisable.call(this);this.thumb.addClass(this.disabledClass);if(Ext.isIE){var a=this.thumb.getXY();this.thumb.hide();this.innerEl.addClass(this.disabledClass).dom.disabled=true;if(!this.thumbHolder){this.thumbHolder=this.endEl.createChild({cls:"x-slider-thumb "+this.disabledClass})}this.thumbHolder.show().setXY(a)}},onEnable:function(){Ext.Slider.superclass.onEnable.call(this);this.thumb.removeClass(this.disabledClass);if(Ext.isIE){this.innerEl.removeClass(this.disabledClass).dom.disabled=false;if(this.thumbHolder){this.thumbHolder.hide()}this.thumb.show();this.syncThumb()}},syncThumb:function(){if(this.rendered){this.moveThumb(this.translateValue(this.value))}},getValue:function(){return this.value},beforeDestroy:function(){Ext.destroyMembers(this,"endEl","innerEl","thumb","halfThumb","focusEl","tracker","thumbHolder");Ext.Slider.superclass.beforeDestroy.call(this)}});Ext.reg("slider",Ext.Slider);Ext.Slider.Vertical={onResize:function(a,b){this.innerEl.setHeight(b-(this.el.getPadding("t")+this.endEl.getPadding("b")));this.syncThumb()},getRatio:function(){var b=this.innerEl.getHeight(),a=this.maxValue-this.minValue;return b/a},moveThumb:function(b,a){if(!a||this.animate===false){this.thumb.setBottom(b)}else{this.thumb.shift({bottom:b,stopFx:true,duration:0.35})}},onDrag:function(b){var c=this.innerEl.translatePoints(this.tracker.getXY()),a=this.innerEl.getHeight()-c.top;this.setValue(this.minValue+Ext.util.Format.round(a/this.getRatio(),this.decimalPrecision),false);this.fireEvent("drag",this,b)},onClickChange:function(b){if(b.left>this.clickRange[0]&&b.left','
    ','
    ','
    ',"
     
    ","
    ","
    ",'
    ',"
     
    ","
    ","
    ","");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(j,h,o){if(Ext.isNumber(h)){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var l=Ext.get(this.getEl()).getBox(),d=Ext.get(j),n=d.getScroll(),k,e=d.dom;if(e==document.body){k={x:n.left,y:n.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var m=d.getXY();k={x:m[0],y:m[1],width:e.clientWidth,height:e.clientHeight}}var i=l.y-k.y,g=l.x-k.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),k.width-g-l.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),k.height-i-l.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(k,g){if(!g){return k}else{if(g[0]>=k){return g[0]}else{for(var d=0,c=g.length;d=k){var j=k-g[d];var h=g[e]-k;return(h>j)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(h,c){var g=[];for(var e in h.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;dthis.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(n,o){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=n.getPoint();var b=[];var g=[];var l=[];var j=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(r,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var p in q.groups){if("string"!=typeof p){continue}for(h in this.ids[p]){var k=this.ids[p][h];if(!this.isTypeOfDD(k)){continue}if(k.isTarget&&!k.isLocked()&&((k!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,k,this.mode)){if(o){j.push(k)}else{if(!b[k.id]){d.push(k)}else{l.push(k)}this.dragOvers[k.id]=k}}}}}if(this.mode){if(g.length){q.b4DragOut(n,g);q.onDragOut(n,g)}if(d.length){q.onDragEnter(n,d)}if(l.length){q.b4DragOver(n,l);q.onDragOver(n,l)}if(j.length){q.b4DragDrop(n,j);q.onDragDrop(n,j)}}else{var m=0;for(h=0,m=g.length;h2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var p=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var j=e+k;var o=m+l;var i=(n+p-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i0&&k-pb&&g0&&l-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this)},onMouseDown:function(c,b){if(this.fireEvent("mousedown",this,c)!==false&&this.onBeforeStart(c)!==false){this.startXY=this.lastXY=c.getXY();this.dragTarget=this.delegate?b:this.el.dom;if(this.preventDefault!==false){c.preventDefault()}var a=Ext.getDoc();a.on("mouseup",this.onMouseUp,this);a.on("mousemove",this.onMouseMove,this);a.on("selectstart",this.stopSelect,this);if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this)}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart()}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc();b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();var a=this.active;this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(this.startXY);this.fireEvent("dragstart",this,this.startXY)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c);var a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(l){b=null;a()};var j=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var l=Ext.dd.ScrollManager;var m=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:l.increment;if(!l.animate){if(i.el.scroll(i.dir,m)){j()}}else{i.el.scroll(i.dir,m,true,l.animDuration,j)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(m,l){a();i.el=m;i.dir=l;var n=(m.ddScrollConfig&&m.ddScrollConfig.frequency)?m.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;i.id=setInterval(d,n)};var k=function(o,q){if(q||!c.dragCurrent){return}var s=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;s.refreshCache()}var t=Ext.lib.Event.getXY(o);var u=new Ext.lib.Point(t[0],t[1]);for(var m in e){var n=e[m],l=n._region;var p=n.ddScrollConfig?n.ddScrollConfig:s;if(l&&l.contains(u)&&n.isScrollable()){if(l.bottom-u.y<=p.vthresh){if(i.el!=n){g(n,"down")}return}else{if(l.right-u.x<=p.hthresh){if(i.el!=n){g(n,"left")}return}else{if(u.y-l.top<=p.vthresh){if(i.el!=n){g(n,"up")}return}else{if(u.x-l.left<=p.hthresh){if(i.el!=n){g(n,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(k,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(c,b){b=[].concat(b);for(var d=0,a=b.length;d=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){g.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(g.length){h.push(["create",g])}if(b.length){h.push(["update",b])}}j=h.length;if(j){e=++this.batchCounter;for(var d=0;d=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(h,b,g){if(this.isDestroyed===true){return}if(!h||g===false){if(g!==false){this.fireEvent("load",this,[],b)}if(b.callback){b.callback.call(b.scope||this,[],b,false,h)}return}var e=h.records,d=h.totalRecords||e.length;if(!b||b.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(var c=0,a=e.length;ch?1:(i=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.fields.each(function(d){if(c[d.name]!==d.defaultValue){a.data[d.name]=c[d.name]}});a.commit()}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.fields.each(function(d){if(c[d.name]!==d.defaultValue){a.data[d.name]=c[d.name]}})}a.commit()}},extractData:function(k,a){var j=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(k)&&!(this instanceof Ext.data.XmlReader)){k=[k]}var h=this.recordType.prototype.fields,o=h.items,m=h.length,c=[];if(a===true){var l=this.recordType;for(var e=0;e=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,g=0,e=true;if(this.meta.totalProperty){g=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:g||b.length}},readResponse:function(e,a){var d=Ext.DomQuery,g=a.responseXML;var b=new Ext.data.Response({action:e,success:this.getSuccess(g),message:this.getMessage(g),data:this.extractData(d.select(this.meta.record,g)||d.select(this.meta.root,g),false),raw:g});if(Ext.isEmpty(b.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(e===Ext.data.Api.actions.create){var c=Ext.isDefined(b.data);if(c&&Ext.isEmpty(b.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!c){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return b},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=function(g){return(!Ext.isEmpty(g[this.meta.record]))?g[this.meta.record]:g[this.meta.root]};if(l.idPath||l.idProperty){var d=this.createAccessor(l.idPath||l.idProperty);this.getId=function(g){var i=d(g)||g.id;return(i===undefined||i==="")?null:i}}else{this.getId=function(){return null}}var c=[];for(var b=0;b0){if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d1){for(var d=0,b=c.length;d0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d)}},doForm:function(j,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:j,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:j,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(g.result)?g.result:g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider; -/* - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license - */ -Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var k=this.el.getStyle("position");if(k!="absolute"&&k!="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 o=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var j=0,l=o.length;j0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-cd){c=b-d}}return c},onMouseMove:function(z){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(z.getPoint())){return}var t=this.curSize||this.startBox,l=this.startBox.x,k=this.startBox.y,c=l,b=k,m=t.width,u=t.height,d=m,o=u,n=this.minWidth,A=this.minHeight,s=this.maxWidth,D=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,B=z.getXY(),r=-(this.startPoint[0]-Math.max(this.minX,B[0])),p=-(this.startPoint[1]-Math.max(this.minY,B[1])),j=this.activeHandle.position,E,g;switch(j){case"east":m+=r;m=Math.min(Math.max(n,m),s);break;case"south":u+=p;u=Math.min(Math.max(A,u),D);break;case"southeast":m+=r;u+=p;m=Math.min(Math.max(n,m),s);u=Math.min(Math.max(A,u),D);break;case"north":p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"west":r=this.constrain(m,r,n,s);l+=r;m-=r;break;case"northeast":m+=r;m=Math.min(Math.max(n,m),s);p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"northwest":r=this.constrain(m,r,n,s);p=this.constrain(u,p,A,D);k+=p;u-=p;l+=r;m-=r;break;case"southwest":r=this.constrain(m,r,n,s);u+=p;u=Math.min(Math.max(A,u),D);l+=r;m-=r;break}var q=this.snap(m,i,n);var C=this.snap(u,a,A);if(q!=m||C!=u){switch(j){case"northeast":k-=C-u;break;case"north":k-=C-u;break;case"southwest":l-=q-m;break;case"west":l-=q-m;break;case"northwest":l-=q-m;k-=C-u;break}m=q;u=C}if(this.preserveRatio){switch(j){case"southeast":case"east":u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);break;case"south":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"northeast":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"north":E=m;m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);l+=(E-m)/2;break;case"southwest":u=o*(m/d);u=Math.min(Math.max(A,u),D);E=m;m=d*(u/o);l+=E-m;break;case"west":g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);k+=(g-u)/2;E=m;m=d*(u/o);l+=E-m;break;case"northwest":E=m;g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);k+=g-u;l+=E-m;break}}this.proxy.setBounds(l,k,m,u);if(this.dynamic){this.resizeElement()}}catch(v){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,g,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=g;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:" "});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();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)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b)}this.focus();this.updateHandles();this.saveState();this.doLayout()},focus:function(){var c=this.focusEl,a=this.defaultButton,b=typeof a;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){c=this.fbar.items.get(a)}else{if(Ext.isString(a)){c=Ext.getCmp(a)}else{c=a}}}c=c||this.focusEl;c.focus.defer(10,c)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:0.25,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:0.25,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25)}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus();if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){if(this.doAnchor){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this)}this.doAnchor=function(){this.alignTo(c,e,d)};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false};Ext.extend(Ext.Window.DD,Ext.dd.DD,{moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost();if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var g={};var d=[];var e=null;var c=function(j,i){return(!j._lastAccess||j._lastAccess0){l.sort(c);var k=l[0].manager.zseed;for(var m=0;m=0;--j){if(!d[j].hidden){b(d[j]);return}}b(null)};return{zseed:9000,register:function(i){if(i.manager){i.manager.unregister(i)}i.manager=this;g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete i.manager;delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(l,k){var m=[];for(var j=d.length-1;j>=0;--j){var n=d[j];if(l.call(k||n,n)!==false){m.push(n)}}return m},each:function(j,i){for(var k in g){if(g[k]&&typeof g[k]!="function"){if(j.call(i||g[k],g[k])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var u,b,q,t,h,l,s,a,n,p,j,g,r,v,o,i="",d="",m=["ok","yes","no","cancel"];var c=function(x){r[x].blur();if(u.isVisible()){u.hide();w();Ext.callback(b.fn,b.scope||window,[x,v.dom.value,b],1)}};var w=function(){if(b&&b.cls){u.el.removeClass(b.cls)}n.reset()};var e=function(z,x,y){if(b&&b.closable!==false){u.hide();w()}if(y){y.stopEvent()}};var k=function(x){var z=0,y;if(!x){Ext.each(m,function(A){r[A].hide()});return z}u.footer.dom.style.display="";Ext.iterate(r,function(A,B){y=x[A];if(y){B.show();B.setText(Ext.isString(y)?y:Ext.MessageBox.buttonText[A]);z+=B.getEl().getWidth()+15}else{B.hide()}});return z};return{getDialog:function(x){if(!u){var z=[];r={};Ext.each(m,function(A){z.push(r[A]=new Ext.Button({text:this.buttonText[A],handler:c.createCallback(A),hideMode:"offsets"}))},this);u=new Ext.Window({autoCreate:true,title:x,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:z,enableOverflow:false})});u.render(document.body);u.getEl().addClass("x-window-dlg");q=u.mask;h=u.body.createChild({html:'

    '});j=Ext.get(h.dom.firstChild);var y=h.dom.childNodes[1];l=Ext.get(y.firstChild);s=Ext.get(y.childNodes[2].firstChild);s.enableDisplayMode();s.addKeyListener([10,13],function(){if(u.isVisible()&&b&&b.buttons){if(b.buttons.ok){c("ok")}else{if(b.buttons.yes){c("yes")}}}});a=Ext.get(y.childNodes[2].childNodes[1]);a.enableDisplayMode();n=new Ext.ProgressBar({renderTo:h});h.createChild({cls:"x-clear"})}return u},updateText:function(A){if(!u.isVisible()&&!b.width){u.setSize(this.maxWidth,100)}l.update(A||" ");var y=d!=""?(j.getWidth()+j.getMargins("lr")):0,C=l.getWidth()+l.getMargins("lr"),z=u.getFrameWidth("lr"),B=u.body.getFrameWidth("lr"),x;if(Ext.isIE&&y>0){y+=3}x=Math.max(Math.min(b.width||y+C+z+B,b.maxWidth||this.maxWidth),Math.max(b.minWidth||this.minWidth,o||0));if(b.prompt===true){v.setWidth(x-y-z-B)}if(b.progress===true||b.wait===true){n.setSize(x-y-z-B)}if(Ext.isIE&&x==o){x+=4}u.setSize(x,"auto").center();return this},updateProgress:function(y,x,z){n.updateProgress(y,x);if(z){this.updateText(z)}return this},isVisible:function(){return u&&u.isVisible()},hide:function(){var x=u?u.activeGhost:null;if(this.isVisible()||x){u.hide();w();if(x){u.unghost(false,false)}}return this},show:function(A){if(this.isVisible()){this.hide()}b=A;var B=this.getDialog(b.title||" ");B.setTitle(b.title||" ");var x=(b.closable!==false&&b.progress!==true&&b.wait!==true);B.tools.close.setDisplayed(x);v=s;b.prompt=b.prompt||(b.multiline?true:false);if(b.prompt){if(b.multiline){s.hide();a.show();a.setHeight(Ext.isNumber(b.multiline)?b.multiline:this.defaultTextHeight);v=a}else{s.show();a.hide()}}else{s.hide();a.hide()}v.dom.value=b.value||"";if(b.prompt){B.focusEl=v}else{var z=b.buttons;var y=null;if(z&&z.ok){y=r.ok}else{if(z&&z.yes){y=r.yes}}if(y){B.focusEl=y}}if(b.iconCls){B.setIconClass(b.iconCls)}this.setIcon(Ext.isDefined(b.icon)?b.icon:i);o=k(b.buttons);n.setVisible(b.progress===true||b.wait===true);this.updateProgress(0,b.progressText);this.updateText(b.msg);if(b.cls){B.el.addClass(b.cls)}B.proxyDrag=b.proxyDrag===true;B.modal=b.modal!==false;B.mask=b.modal!==false?q:false;if(!B.isVisible()){document.body.appendChild(u.el.dom);B.setAnimateTarget(b.animEl);B.on("show",function(){if(x===true){B.keyMap.enable()}else{B.keyMap.disable()}},this,{single:true});B.show(b.animEl)}if(b.wait===true){n.wait(b.waitConfig)}return this},setIcon:function(x){if(!u){i=x;return}i=undefined;if(x&&x!=""){j.removeClass("x-hidden");j.replaceClass(d,x);h.addClass("x-dlg-icon");d=x}else{j.replaceClass(d,"x-hidden");h.removeClass("x-dlg-icon");d=""}return this},progress:function(z,y,x){this.show({title:z,msg:y,buttons:false,progress:true,closable:false,minWidth:this.minProgressWidth,progressText:x});return this},wait:function(z,y,x){this.show({title:y,msg:z,buttons:false,closable:false,wait:true,modal:true,minWidth:this.minProgressWidth,waitConfig:x});return this},alert:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.OK,fn:y,scope:x,minWidth:this.minWidth});return this},confirm:function(A,z,y,x){this.show({title:A,msg:z,buttons:this.YESNO,fn:y,scope:x,icon:this.QUESTION,minWidth:this.minWidth});return this},prompt:function(C,B,z,y,x,A){this.show({title:C,msg:B,buttons:this.OKCANCEL,fn:z,minWidth:this.minPromptWidth,scope:y,prompt:true,multiline:x,value:A});return this},OK:{ok:true},CANCEL:{cancel:true},OKCANCEL:{ok:true,cancel:true},YESNO:{yes:true,no:true},YESNOCANCEL:{yes:true,no:true,cancel:true},INFO:"ext-mb-info",WARNING:"ext-mb-warning",QUESTION:"ext-mb-question",ERROR:"ext-mb-error",defaultTextHeight:75,maxWidth:600,minWidth:100,minProgressWidth:250,minPromptWidth:250,buttonText:{ok:"OK",cancel:"Cancel",yes:"Yes",no:"No"}}}();Ext.Msg=Ext.MessageBox;Ext.dd.PanelProxy=function(a,b){this.panel=a;this.id=this.panel.id+"-ddproxy";Ext.apply(this,b)};Ext.dd.PanelProxy.prototype={insertProxy:true,setStatus:Ext.emptyFn,reset:Ext.emptyFn,update:Ext.emptyFn,stop:Ext.emptyFn,sync:Ext.emptyFn,getEl:function(){return this.ghost},getGhost:function(){return this.ghost},getProxy:function(){return this.proxy},hide:function(){if(this.ghost){if(this.proxy){this.proxy.remove();delete this.proxy}this.panel.el.dom.style.display="";this.ghost.remove();delete this.ghost}},show:function(){if(!this.ghost){this.ghost=this.panel.createGhost(undefined,undefined,Ext.getBody());this.ghost.setXY(this.panel.el.getXY());if(this.insertProxy){this.proxy=this.panel.el.insertSibling({cls:"x-panel-dd-spacer"});this.proxy.setSize(this.panel.getSize())}this.panel.el.dom.style.display="none"}},repair:function(b,c,a){this.hide();if(typeof c=="function"){c.call(a||this)}},moveProxy:function(a,b){if(this.proxy){a.insertBefore(this.proxy.dom,b)}}};Ext.Panel.DD=function(b,a){this.panel=b;this.dragData={panel:b};this.proxy=new Ext.dd.PanelProxy(b,a);Ext.Panel.DD.superclass.constructor.call(this,b.el,a);var c=b.header;if(c){this.setHandleElId(c.id)}(c?c:this.panel.body).setStyle("cursor","move");this.scroll=false};Ext.extend(Ext.Panel.DD,Ext.dd.DragSource,{showFrame:Ext.emptyFn,startDrag:Ext.emptyFn,b4StartDrag:function(a,b){this.proxy.show()},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c)},onInitDrag:function(a,b){this.onStartDrag(a,b);return true},createFrame:Ext.emptyFn,getDragEl:function(a){return this.proxy.ghost.dom},endDrag:function(a){this.proxy.hide();this.panel.saveState()},autoOffset:function(a,b){a-=this.startPageX;b-=this.startPageY;this.setDelta(a,b)}});Ext.state.Provider=function(){this.addEvents("statechange");this.state={};Ext.state.Provider.superclass.constructor.call(this)};Ext.extend(Ext.state.Provider,Ext.util.Observable,{get:function(b,a){return typeof this.state[b]=="undefined"?a:this.state[b]},clear:function(a){delete this.state[a];this.fireEvent("statechange",this,a,null)},set:function(a,b){this.state[a]=b;this.fireEvent("statechange",this,a,b)},decodeValue:function(b){var e=/^(a|n|d|b|s|o)\:(.*)$/;var g=e.exec(unescape(b));if(!g||!g[1]){return}var d=g[1];var a=g[2];switch(d){case"n":return parseFloat(a);case"d":return new Date(Date.parse(a));case"b":return(a=="1");case"a":var c=[];if(a!=""){Ext.each(a.split("^"),function(h){c.push(this.decodeValue(h))},this)}return c;case"o":var c={};if(a!=""){Ext.each(a.split("^"),function(i){var h=i.split("=");c[h[0]]=this.decodeValue(h[1])},this)}return c;default:return a}},encodeValue:function(c){var b;if(typeof c=="number"){b="n:"+c}else{if(typeof c=="boolean"){b="b:"+(c?"1":"0")}else{if(Ext.isDate(c)){b="d:"+c.toGMTString()}else{if(Ext.isArray(c)){var g="";for(var e=0,a=c.length;e-1){var e=this.isSelected(b);var c=this.all.elements[b];var d=this.bufferRender([a],b)[0];this.all.replaceElement(b,d,true);if(e){this.selected.replaceElement(c,d);this.all.item(b).addClass(this.selectedClass)}this.updateIndexes(b,b)}},onAdd:function(g,d,e){if(this.all.getCount()===0){this.refresh();return}var c=this.bufferRender(d,e),h,b=this.all.elements;if(e0){if(!b){this.selected.removeClass(this.selectedClass)}this.selected.clear();this.last=false;if(!a){this.fireEvent("selectionchange",this,this.selected.elements)}}},isSelected:function(a){return this.selected.contains(this.getNode(a))},deselect:function(a){if(this.isSelected(a)){a=this.getNode(a);this.selected.removeElement(a);if(this.last==a.viewIndex){this.last=false}Ext.fly(a).removeClass(this.selectedClass);this.fireEvent("selectionchange",this,this.selected.elements)}},select:function(d,g,b){if(Ext.isArray(d)){if(!g){this.clearSelections(true)}for(var c=0,a=d.length;c=a&&d[c];c--){b.push(d[c])}}return b},indexOf:function(a){a=this.getNode(a);if(Ext.isNumber(a.viewIndex)){return a.viewIndex}return this.all.indexOf(a)},onBeforeLoad:function(){if(this.loadingText){this.clearSelections(false,true);this.getTemplateTarget().update('
    '+this.loadingText+"
    ");this.all.clear()}},onDestroy:function(){this.all.clear();this.selected.clear();Ext.DataView.superclass.onDestroy.call(this);this.bindStore(null)}});Ext.DataView.prototype.setStore=Ext.DataView.prototype.bindStore;Ext.reg("dataview",Ext.DataView);Ext.list.ListView=Ext.extend(Ext.DataView,{itemSelector:"dl",selectedClass:"x-list-selected",overClass:"x-list-over",scrollOffset:undefined,columnResize:true,columnSort:true,maxWidth:Ext.isIE?99:100,initComponent:function(){if(this.columnResize){this.colResizer=new Ext.list.ColumnResizer(this.colResizer);this.colResizer.init(this)}if(this.columnSort){this.colSorter=new Ext.list.Sorter(this.columnSort);this.colSorter.init(this)}if(!this.internalTpl){this.internalTpl=new Ext.XTemplate('
    ','','
    ',"{header}","
    ","
    ",'
    ',"
    ",'
    ',"
    ")}if(!this.tpl){this.tpl=new Ext.XTemplate('',"
    ",'','
    ',' class="{cls}">',"{[values.tpl.apply(parent)]}","
    ","
    ",'
    ',"
    ","
    ")}var l=this.columns,h=0,k=0,m=l.length,b=[];for(var g=0;g10)){e.style.width=a+"px";g.style.width=a+"px"}else{e.style.width=b+"px";g.style.width=b+"px";setTimeout(function(){if((c.offsetWidth-c.clientWidth)>10){e.style.width=a+"px";g.style.width=a+"px"}},10)}}if(Ext.isNumber(d)){c.style.height=(d-g.parentNode.offsetHeight)+"px"}},updateIndexes:function(){Ext.list.ListView.superclass.updateIndexes.apply(this,arguments);this.verifyInternalSize()},findHeaderIndex:function(e){e=e.dom||e;var a=e.parentNode,d=a.parentNode.childNodes;for(var b=0,g;g=d[b];b++){if(g==a){return b}}return -1},setHdWidths:function(){var c=this.innerHd.dom.getElementsByTagName("div");for(var b=0,d=this.columns,a=d.length;b','','{text}',"");d.disableFormats=true;d.compile();Ext.TabPanel.prototype.itemTpl=d}this.items.each(this.initTab,this)},afterRender:function(){Ext.TabPanel.superclass.afterRender.call(this);if(this.autoTabs){this.readTabs(false)}if(this.activeTab!==undefined){var a=Ext.isObject(this.activeTab)?this.activeTab:this.items.get(this.activeTab);delete this.activeTab;this.setActiveTab(a)}},initEvents:function(){Ext.TabPanel.superclass.initEvents.call(this);this.mon(this.strip,{scope:this,mousedown:this.onStripMouseDown,contextmenu:this.onStripContextMenu});if(this.enableTabScroll){this.mon(this.strip,"mousewheel",this.onWheel,this)}},findTargets:function(c){var b=null,a=c.getTarget("li:not(.x-tab-edge)",this.strip);if(a){b=this.getComponent(a.id.split(this.idDelimiter)[1]);if(b.disabled){return{close:null,item:null,el:null}}}return{close:c.getTarget(".x-tab-strip-close",this.strip),item:b,el:a}},onStripMouseDown:function(b){if(b.button!==0){return}b.preventDefault();var a=this.findTargets(b);if(a.close){if(a.item.fireEvent("beforeclose",a.item)!==false){a.item.fireEvent("close",a.item);this.remove(a.item)}return}if(a.item&&a.item!=this.activeTab){this.setActiveTab(a.item)}},onStripContextMenu:function(b){b.preventDefault();var a=this.findTargets(b);if(a.item){this.fireEvent("contextmenu",this,a.item,b)}},readTabs:function(d){if(d===true){this.items.each(function(h){this.remove(h)},this)}var c=this.el.query(this.autoTabSelector);for(var b=0,a=c.length;b0){this.setActiveTab(0)}else{this.setActiveTab(null)}}}if(!this.destroying){this.delegateUpdates()}},onBeforeShowItem:function(a){if(a!=this.activeTab){this.setActiveTab(a);return false}},onItemDisabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).addClass("x-item-disabled")}this.stack.remove(b)},onItemEnabled:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).removeClass("x-item-disabled")}},onItemTitleChanged:function(b){var a=this.getTabEl(b);if(a){Ext.fly(a).child("span.x-tab-strip-text",true).innerHTML=b.title}},onItemIconChanged:function(d,a,c){var b=this.getTabEl(d);if(b){b=Ext.get(b);b.child("span.x-tab-strip-text").replaceClass(c,a);b[Ext.isEmpty(a)?"removeClass":"addClass"]("x-tab-with-icon")}},getTabEl:function(a){var b=this.getComponent(a);return b?b.tabEl:null},onResize:function(){Ext.TabPanel.superclass.onResize.apply(this,arguments);this.delegateUpdates()},beginUpdate:function(){this.suspendUpdates=true},endUpdate:function(){this.suspendUpdates=false;this.delegateUpdates()},hideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="none";this.delegateUpdates()}this.stack.remove(b)},unhideTabStripItem:function(b){b=this.getComponent(b);var a=this.getTabEl(b);if(a){a.style.display="";this.delegateUpdates()}},delegateUpdates:function(){if(this.suspendUpdates){return}if(this.resizeTabs&&this.rendered){this.autoSizeTabs()}if(this.enableTabScroll&&this.rendered){this.autoScrollTabs()}},autoSizeTabs:function(){var h=this.items.length,b=this.tabPosition!="bottom"?"header":"footer",c=this[b].dom.offsetWidth,a=this[b].dom.clientWidth;if(!this.resizeTabs||h<1||!a){return}var k=Math.max(Math.min(Math.floor((a-4)/h)-this.tabMargin,this.tabWidth),this.minTabWidth);this.lastTabWidth=k;var m=this.strip.query("li:not(.x-tab-edge)");for(var e=0,j=m.length;e20?c:20);if(!this.scrolling){if(!this.scrollLeft){this.createScrollers()}else{this.scrollLeft.show();this.scrollRight.show()}}this.scrolling=true;if(i>(a-c)){e.scrollLeft=a-c}else{this.scrollToTab(this.activeTab,false)}this.updateScrollButtons()}},createScrollers:function(){this.pos.addClass("x-tab-scrolling-"+this.tabPosition);var c=this.stripWrap.dom.offsetHeight;var a=this.pos.insertFirst({cls:"x-tab-scroller-left"});a.setHeight(c);a.addClassOnOver("x-tab-scroller-left-over");this.leftRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.onScrollLeft,scope:this});this.scrollLeft=a;var b=this.pos.insertFirst({cls:"x-tab-scroller-right"});b.setHeight(c);b.addClassOnOver("x-tab-scroller-right-over");this.rightRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.onScrollRight,scope:this});this.scrollRight=b},getScrollWidth:function(){return this.edge.getOffsetsTo(this.stripWrap)[0]+this.getScrollPos()},getScrollPos:function(){return parseInt(this.stripWrap.dom.scrollLeft,10)||0},getScrollArea:function(){return parseInt(this.stripWrap.dom.clientWidth,10)||0},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},getScrollIncrement:function(){return this.scrollIncrement||(this.resizeTabs?this.lastTabWidth+2:100)},scrollToTab:function(e,a){if(!e){return}var c=this.getTabEl(e),h=this.getScrollPos(),d=this.getScrollArea(),g=Ext.fly(c).getOffsetsTo(this.stripWrap)[0]+h,b=g+c.offsetWidth;if(g(h+d)){this.scrollTo(b-d,a)}}},scrollTo:function(b,a){this.stripWrap.scrollTo("left",b,a?this.getScrollAnim():false);if(!a){this.updateScrollButtons()}},onWheel:function(g){var h=g.getWheelDelta()*this.wheelIncrement*-1;g.stopEvent();var i=this.getScrollPos(),c=i+h,a=this.getScrollWidth()-this.getScrollArea();var b=Math.max(0,Math.min(a,c));if(b!=i){this.scrollTo(b,false)}},onScrollRight:function(){var a=this.getScrollWidth()-this.getScrollArea(),c=this.getScrollPos(),b=Math.min(a,c+this.getScrollIncrement());if(b!=c){this.scrollTo(b,this.animScroll)}},onScrollLeft:function(){var b=this.getScrollPos(),a=Math.max(0,b-this.getScrollIncrement());if(a!=b){this.scrollTo(a,this.animScroll)}},updateScrollButtons:function(){var a=this.getScrollPos();this.scrollLeft[a===0?"addClass":"removeClass"]("x-tab-scroller-left-disabled");this.scrollRight[a>=(this.getScrollWidth()-this.getScrollArea())?"addClass":"removeClass"]("x-tab-scroller-right-disabled")},beforeDestroy:function(){Ext.destroy(this.leftRepeater,this.rightRepeater);this.deleteMembers("strip","edge","scrollLeft","scrollRight","stripWrap");this.activeTab=null;Ext.TabPanel.superclass.beforeDestroy.apply(this)}});Ext.reg("tabpanel",Ext.TabPanel);Ext.TabPanel.prototype.activate=Ext.TabPanel.prototype.setActiveTab;Ext.TabPanel.AccessStack=function(){var a=[];return{add:function(b){a.push(b);if(a.length>10){a.shift()}},remove:function(e){var d=[];for(var c=0,b=a.length;c','  ','  ','  ',"");Ext.Button.buttonTemplate.compile()}this.template=Ext.Button.buttonTemplate}var b,d=this.getTemplateArgs();if(a){b=this.template.insertBefore(a,d,true)}else{b=this.template.append(c,d,true)}this.btnEl=b.child(this.buttonSelector);this.mon(this.btnEl,{scope:this,focus:this.onFocus,blur:this.onBlur});this.initButtonEl(b,this.btnEl);Ext.ButtonToggleMgr.register(this)},initButtonEl:function(b,c){this.el=b;this.setIcon(this.icon);this.setText(this.text);this.setIconClass(this.iconCls);if(Ext.isDefined(this.tabIndex)){c.dom.tabIndex=this.tabIndex}if(this.tooltip){this.setTooltip(this.tooltip,true)}if(this.handleMouseEvents){this.mon(b,{scope:this,mouseover:this.onMouseOver,mousedown:this.onMouseDown})}if(this.menu){this.mon(this.menu,{scope:this,show:this.onMenuShow,hide:this.onMenuHide})}if(this.repeat){var a=new Ext.util.ClickRepeater(b,Ext.isObject(this.repeat)?this.repeat:{});this.mon(a,"click",this.onClick,this)}this.mon(b,this.clickEvent,this.onClick,this)},afterRender:function(){Ext.Button.superclass.afterRender.call(this);this.useSetClass=true;this.setButtonClass();this.doc=Ext.getDoc();this.doAutoWidth()},setIconClass:function(a){this.iconCls=a;if(this.el){this.btnEl.dom.className="";this.btnEl.addClass(["x-btn-text",a||""]);this.setButtonClass()}return this},setTooltip:function(b,a){if(this.rendered){if(!a){this.clearTip()}if(Ext.isObject(b)){Ext.QuickTips.register(Ext.apply({target:this.btnEl.id},b));this.tooltip=b}else{this.btnEl.dom[this.tooltipType]=b}}else{this.tooltip=b}return this},clearTip:function(){if(Ext.isObject(this.tooltip)){Ext.QuickTips.unregister(this.btnEl)}},beforeDestroy:function(){if(this.rendered){this.clearTip()}if(this.menu&&this.destroyMenu!==false){Ext.destroy(this.menu)}Ext.destroy(this.repeater)},onDestroy:function(){if(this.rendered){this.doc.un("mouseover",this.monitorMouseOver,this);this.doc.un("mouseup",this.onMouseUp,this);delete this.doc;delete this.btnEl;Ext.ButtonToggleMgr.unregister(this)}Ext.Button.superclass.onDestroy.call(this)},doAutoWidth:function(){if(this.el&&this.text&&this.width===undefined){this.el.setWidth("auto");if(Ext.isIE7&&Ext.isStrict){var a=this.btnEl;if(a&&a.getWidth()>20){a.clip();a.setWidth(Ext.util.TextMetrics.measure(a,this.text).width+a.getFrameWidth("lr"))}}if(this.minWidth){if(this.el.getWidth()a}else{return c.getPageY()>this.btnEl.getRegion().bottom}},onClick:function(b,a){b.preventDefault();if(!this.disabled){if(this.isClickOnArrow(b)){if(this.menu&&!this.menu.isVisible()&&!this.ignoreNextClick){this.showMenu()}this.fireEvent("arrowclick",this,b);if(this.arrowHandler){this.arrowHandler.call(this.scope||this,this,b)}}else{if(this.enableToggle){this.toggle()}this.fireEvent("click",this,b);if(this.handler){this.handler.call(this.scope||this,this,b)}}}},isMenuTriggerOver:function(a){return this.menu&&a.target.tagName==this.arrowSelector},isMenuTriggerOut:function(b,a){return this.menu&&b.target.tagName!=this.arrowSelector}});Ext.reg("splitbutton",Ext.SplitButton);Ext.CycleButton=Ext.extend(Ext.SplitButton,{getItemText:function(a){if(a&&this.showText===true){var b="";if(this.prependText){b+=this.prependText}b+=a.text;return b}return undefined},setActiveItem:function(c,a){if(!Ext.isObject(c)){c=this.menu.getComponent(c)}if(c){if(!this.rendered){this.text=this.getItemText(c);this.iconCls=c.iconCls}else{var b=this.getItemText(c);if(b){this.setText(b)}this.setIconClass(c.iconCls)}this.activeItem=c;if(!c.checked){c.setChecked(true,false)}if(this.forceIcon){this.setIconClass(this.forceIcon)}if(!a){this.fireEvent("change",this,c)}}},getActiveItem:function(){return this.activeItem},initComponent:function(){this.addEvents("change");if(this.changeHandler){this.on("change",this.changeHandler,this.scope||this);delete this.changeHandler}this.itemCount=this.items.length;this.menu={cls:"x-cycle-menu",items:[]};var a=0;Ext.each(this.items,function(c,b){Ext.apply(c,{group:c.group||this.id,itemIndex:b,checkHandler:this.checkHandler,scope:this,checked:c.checked||false});this.menu.items.push(c);if(c.checked){a=b}},this);Ext.CycleButton.superclass.initComponent.call(this);this.on("click",this.toggleSelected,this);this.setActiveItem(a,true)},checkHandler:function(a,b){if(b){this.setActiveItem(a)}},toggleSelected:function(){var a=this.menu;a.render();if(!a.hasLayout){a.doLayout()}var d,b;for(var c=1;c"){b=new a.Fill()}else{b=new a.TextItem(b)}}}this.applyDefaults(b)}else{if(b.isFormField||b.render){b=this.createComponent(b)}else{if(b.tag){b=new a.Item({autoEl:b})}else{if(b.tagName){b=new a.Item({el:b})}else{if(Ext.isObject(b)){b=b.xtype?this.createComponent(b):this.constructButton(b)}}}}}return b},applyDefaults:function(e){if(!Ext.isString(e)){e=Ext.Toolbar.superclass.applyDefaults.call(this,e);var b=this.internalDefaults;if(e.events){Ext.applyIf(e.initialConfig,b);Ext.apply(e,b)}else{Ext.applyIf(e,b)}}return e},addSeparator:function(){return this.add(new a.Separator())},addSpacer:function(){return this.add(new a.Spacer())},addFill:function(){this.add(new a.Fill())},addElement:function(b){return this.addItem(new a.Item({el:b}))},addItem:function(b){return this.add.apply(this,arguments)},addButton:function(c){if(Ext.isArray(c)){var e=[];for(var d=0,b=c.length;d");this.items.push(this.displayItem=new a.TextItem({}))}Ext.PagingToolbar.superclass.initComponent.call(this);this.addEvents("change","beforechange");this.on("afterlayout",this.onFirstLayout,this,{single:true});this.cursor=0;this.bindStore(this.store,true)},onFirstLayout:function(){if(this.dsLoaded){this.onLoad.apply(this,this.dsLoaded)}},updateInfo:function(){if(this.displayItem){var b=this.store.getCount();var c=b==0?this.emptyMsg:String.format(this.displayMsg,this.cursor+1,this.cursor+b,this.store.getTotalCount());this.displayItem.setText(c)}},onLoad:function(b,e,j){if(!this.rendered){this.dsLoaded=[b,e,j];return}var g=this.getParams();this.cursor=(j.params&&j.params[g.start])?j.params[g.start]:0;var i=this.getPageData(),c=i.activePage,h=i.pages;this.afterTextItem.setText(String.format(this.afterPageText,i.pages));this.inputItem.setValue(c);this.first.setDisabled(c==1);this.prev.setDisabled(c==1);this.next.setDisabled(c==h);this.last.setDisabled(c==h);this.refresh.enable();this.updateInfo();this.fireEvent("change",this,i)},getPageData:function(){var b=this.store.getTotalCount();return{total:b,activePage:Math.ceil((this.cursor+this.pageSize)/this.pageSize),pages:b=1&g<=j.pages){i.setValue(g)}}}}}},getParams:function(){return this.paramNames||this.store.paramNames},beforeLoad:function(){if(this.rendered&&this.refresh){this.refresh.disable()}},doLoad:function(d){var c={},b=this.getParams();c[b.start]=d;c[b.limit]=this.pageSize;if(this.fireEvent("beforechange",this,c)!==false){this.store.load({params:c})}},moveFirst:function(){this.doLoad(0)},movePrevious:function(){this.doLoad(Math.max(0,this.cursor-this.pageSize))},moveNext:function(){this.doLoad(this.cursor+this.pageSize)},moveLast:function(){var c=this.store.getTotalCount(),b=c%this.pageSize;this.doLoad(b?(c-b):c-this.pageSize)},doRefresh:function(){this.doLoad(this.cursor)},bindStore:function(c,d){var b;if(!d&&this.store){if(c!==this.store&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.beforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.onLoadError,this)}if(!c){this.store=null}}if(c){c=Ext.StoreMgr.lookup(c);c.on({scope:this,beforeload:this.beforeLoad,load:this.onLoad,exception:this.onLoadError});b=true}this.store=c;if(b){this.onLoad(c,null,{})}},unbind:function(b){this.bindStore(null)},bind:function(b){this.bindStore(b)},onDestroy:function(){this.bindStore(null);Ext.PagingToolbar.superclass.onDestroy.call(this)}})})();Ext.reg("paging",Ext.PagingToolbar);Ext.History=(function(){var e,c;var k=false;var d;function g(){var l=top.location.href,m=l.indexOf("#");return m>=0?l.substr(m+1):null}function a(){c.value=d}function h(l){d=l;Ext.History.fireEvent("change",l)}function i(m){var l=['
    ',Ext.util.Format.htmlEncode(m),"
    "].join("");try{var o=e.contentWindow.document;o.open();o.write(l);o.close();return true}catch(n){return false}}function b(){if(!e.contentWindow||!e.contentWindow.document){setTimeout(b,10);return}var o=e.contentWindow.document;var m=o.getElementById("state");var l=m?m.innerText:null;var n=g();setInterval(function(){o=e.contentWindow.document;m=o.getElementById("state");var q=m?m.innerText:null;var p=g();if(q!==l){l=q;h(l);top.location.hash=l;n=l;a()}else{if(p!==n){n=p;i(p)}}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}function j(){d=c.value?c.value:g();if(Ext.isIE){b()}else{var l=g();setInterval(function(){var m=g();if(m!==l){l=m;h(l);a()}},50);k=true;Ext.History.fireEvent("ready",Ext.History)}}return{fieldId:"x-history-field",iframeId:"x-history-frame",events:{},init:function(m,l){if(k){Ext.callback(m,l,[this]);return}if(!Ext.isReady){Ext.onReady(function(){Ext.History.init(m,l)});return}c=Ext.getDom(Ext.History.fieldId);if(Ext.isIE){e=Ext.getDom(Ext.History.iframeId)}this.addEvents("ready","change");if(m){this.on("ready",m,l,{single:true})}j()},add:function(l,m){if(m!==false){if(this.getToken()==l){return true}}if(Ext.isIE){return i(l)}else{top.location.hash=l;return true}},back:function(){history.go(-1)},forward:function(){history.go(1)},getToken:function(){return k?d:g()}}})();Ext.apply(Ext.History,new Ext.util.Observable());Ext.Tip=Ext.extend(Ext.Panel,{minWidth:40,maxWidth:300,shadow:"sides",defaultAlign:"tl-bl?",autoRender:true,quickShowInterval:250,frame:true,hidden:true,baseCls:"x-tip",floating:{shadow:true,shim:true,useDisplay:true,constrain:false},autoHeight:true,closeAction:"hide",initComponent:function(){Ext.Tip.superclass.initComponent.call(this);if(this.closable&&!this.title){this.elements+=",header"}},afterRender:function(){Ext.Tip.superclass.afterRender.call(this);if(this.closable){this.addTool({id:"close",handler:this[this.closeAction],scope:this})}},showAt:function(a){Ext.Tip.superclass.show.call(this);if(this.measureWidth!==false&&(!this.initialConfig||typeof this.initialConfig.width!="number")){this.doAutoWidth()}if(this.constrainPosition){a=this.el.adjustForConstraints(a)}this.setPagePosition(a[0],a[1])},doAutoWidth:function(a){a=a||0;var b=this.body.getTextWidth();if(this.title){b=Math.max(b,this.header.child("span").getTextWidth(this.title))}b+=this.getFrameWidth()+(this.closable?20:0)+this.body.getPadding("lr")+a;this.setWidth(b.constrain(this.minWidth,this.maxWidth));if(Ext.isIE7&&!this.repainted){this.el.repaint();this.repainted=true}},showBy:function(a,b){if(!this.rendered){this.render(Ext.getBody())}this.showAt(this.el.getAlignToXY(a,b||this.defaultAlign))},initDraggable:function(){this.dd=new Ext.Tip.DD(this,typeof this.draggable=="boolean"?null:this.draggable);this.header.addClass("x-tip-draggable")}});Ext.reg("tip",Ext.Tip);Ext.Tip.DD=function(b,a){Ext.apply(this,a);this.tip=b;Ext.Tip.DD.superclass.constructor.call(this,b.el.id,"WindowDD-"+b.id);this.setHandleElId(b.header.id);this.scroll=false};Ext.extend(Ext.Tip.DD,Ext.dd.DD,{moveOnly:true,scroll:false,headerOffsets:[100,25],startDrag:function(){this.tip.el.disableShadow()},endDrag:function(a){this.tip.el.enableShadow(true)}});Ext.ToolTip=Ext.extend(Ext.Tip,{showDelay:500,hideDelay:200,dismissDelay:5000,trackMouse:false,anchorToTarget:true,anchorOffset:0,targetCounter:0,constrainPosition:false,initComponent:function(){Ext.ToolTip.superclass.initComponent.call(this);this.lastActive=new Date();this.initTarget(this.target);this.origAnchor=this.anchor},onRender:function(b,a){Ext.ToolTip.superclass.onRender.call(this,b,a);this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl=this.el.createChild({cls:"x-tip-anchor "+this.anchorCls})},afterRender:function(){Ext.ToolTip.superclass.afterRender.call(this);this.anchorEl.setStyle("z-index",this.el.getZIndex()+1)},initTarget:function(c){var a;if((a=Ext.get(c))){if(this.target){var b=Ext.get(this.target);this.mun(b,"mouseover",this.onTargetOver,this);this.mun(b,"mouseout",this.onTargetOut,this);this.mun(b,"mousemove",this.onMouseMove,this)}this.mon(a,{mouseover:this.onTargetOver,mouseout:this.onTargetOut,mousemove:this.onMouseMove,scope:this});this.target=a}if(this.anchor){this.anchorTarget=this.target}},onMouseMove:function(b){var a=this.delegate?b.getTarget(this.delegate):this.triggerElement=true;if(a){this.targetXY=b.getXY();if(a===this.triggerElement){if(!this.hidden&&this.trackMouse){this.setPagePosition(this.getTargetXY())}}else{this.hide();this.lastActive=new Date(0);this.onTargetOver(b)}}else{if(!this.closable&&this.isVisible()){this.hide()}}},getTargetXY:function(){if(this.delegate){this.anchorTarget=this.triggerElement}if(this.anchor){this.targetCounter++;var c=this.getOffsets(),l=(this.anchorToTarget&&!this.trackMouse)?this.el.getAlignToXY(this.anchorTarget,this.getAnchorAlign()):this.targetXY,a=Ext.lib.Dom.getViewWidth()-5,h=Ext.lib.Dom.getViewHeight()-5,i=document.documentElement,e=document.body,k=(i.scrollLeft||e.scrollLeft||0)+5,j=(i.scrollTop||e.scrollTop||0)+5,b=[l[0]+c[0],l[1]+c[1]],g=this.getSize();this.anchorEl.removeClass(this.anchorCls);if(this.targetCounter<2){if(b[0]a){if(this.anchorToTarget){this.defaultAlign="r-l";if(this.mouseOffset){this.mouseOffset[0]*=-1}}this.anchor="right";return this.getTargetXY()}if(b[1]h){if(this.anchorToTarget){this.defaultAlign="b-t";if(this.mouseOffset){this.mouseOffset[1]*=-1}}this.anchor="bottom";return this.getTargetXY()}}this.anchorCls="x-tip-anchor-"+this.getAnchorPosition();this.anchorEl.addClass(this.anchorCls);this.targetCounter=0;return b}else{var d=this.getMouseOffset();return[this.targetXY[0]+d[0],this.targetXY[1]+d[1]]}},getMouseOffset:function(){var a=this.anchor?[0,0]:[15,18];if(this.mouseOffset){a[0]+=this.mouseOffset[0];a[1]+=this.mouseOffset[1]}return a},getAnchorPosition:function(){if(this.anchor){this.tipAnchor=this.anchor.charAt(0)}else{var a=this.defaultAlign.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!a){throw"AnchorTip.defaultAlign is invalid"}this.tipAnchor=a[1].charAt(0)}switch(this.tipAnchor){case"t":return"top";case"b":return"bottom";case"r":return"right"}return"left"},getAnchorAlign:function(){switch(this.anchor){case"top":return"tl-bl";case"left":return"tl-tr";case"right":return"tr-tl";default:return"bl-tl"}},getOffsets:function(){var b,a=this.getAnchorPosition().charAt(0);if(this.anchorToTarget&&!this.trackMouse){switch(a){case"t":b=[0,9];break;case"b":b=[0,-13];break;case"r":b=[-13,0];break;default:b=[9,0];break}}else{switch(a){case"t":b=[-15-this.anchorOffset,30];break;case"b":b=[-19-this.anchorOffset,-13-this.el.dom.offsetHeight];break;case"r":b=[-15-this.el.dom.offsetWidth,-13-this.anchorOffset];break;default:b=[25,-13-this.anchorOffset];break}}var c=this.getMouseOffset();b[0]+=c[0];b[1]+=c[1];return b},onTargetOver:function(b){if(this.disabled||b.within(this.target.dom,true)){return}var a=b.getTarget(this.delegate);if(a){this.triggerElement=a;this.clearTimer("hide");this.targetXY=b.getXY();this.delayShow()}},delayShow:function(){if(this.hidden&&!this.showTimer){if(this.lastActive.getElapsed()=c){d=c-b-5}}return{x:a,y:d}},beforeDestroy:function(){this.clearTimers();Ext.destroy(this.anchorEl);delete this.anchorEl;delete this.target;delete this.anchorTarget;delete this.triggerElement;Ext.ToolTip.superclass.beforeDestroy.call(this)},onDestroy:function(){Ext.getDoc().un("mousedown",this.onDocMouseDown,this);Ext.ToolTip.superclass.onDestroy.call(this)}});Ext.reg("tooltip",Ext.ToolTip);Ext.QuickTip=Ext.extend(Ext.ToolTip,{interceptTitles:false,tagConfig:{namespace:"ext",attribute:"qtip",width:"qwidth",target:"target",title:"qtitle",hide:"hide",cls:"qclass",align:"qalign",anchor:"anchor"},initComponent:function(){this.target=this.target||Ext.getDoc();this.targets=this.targets||{};Ext.QuickTip.superclass.initComponent.call(this)},register:function(e){var h=Ext.isArray(e)?e:arguments;for(var g=0,a=h.length;g1){var d=function(i,h){if(i&&h){var j=h.findChild(a,b);if(j){j.select();if(g){g(true,j)}}else{if(g){g(false,j)}}}else{if(g){g(false,j)}}};this.expandPath(c.join(this.pathSeparator),a,d)}else{this.root.select();if(g){g(true,this.root)}}},getTreeEl:function(){return this.body},onRender:function(b,a){Ext.tree.TreePanel.superclass.onRender.call(this,b,a);this.el.addClass("x-tree");this.innerCt=this.body.createChild({tag:"ul",cls:"x-tree-root-ct "+(this.useArrows?"x-tree-arrows":this.lines?"x-tree-lines":"x-tree-no-lines")})},initEvents:function(){Ext.tree.TreePanel.superclass.initEvents.call(this);if(this.containerScroll){Ext.dd.ScrollManager.register(this.body)}if((this.enableDD||this.enableDrop)&&!this.dropZone){this.dropZone=new Ext.tree.TreeDropZone(this,this.dropConfig||{ddGroup:this.ddGroup||"TreeDD",appendOnly:this.ddAppendOnly===true})}if((this.enableDD||this.enableDrag)&&!this.dragZone){this.dragZone=new Ext.tree.TreeDragZone(this,this.dragConfig||{ddGroup:this.ddGroup||"TreeDD",scroll:this.ddScroll})}this.getSelectionModel().init(this)},afterRender:function(){Ext.tree.TreePanel.superclass.afterRender.call(this);this.renderRoot()},beforeDestroy:function(){if(this.rendered){Ext.dd.ScrollManager.unregister(this.body);Ext.destroy(this.dropZone,this.dragZone)}Ext.destroy(this.root,this.loader);this.nodeHash=this.root=this.loader=null;Ext.tree.TreePanel.superclass.beforeDestroy.call(this)}});Ext.tree.TreePanel.nodeTypes={};Ext.reg("treepanel",Ext.tree.TreePanel);Ext.tree.TreeEventModel=function(a){this.tree=a;this.tree.on("render",this.initEvents,this)};Ext.tree.TreeEventModel.prototype={initEvents:function(){var a=this.tree;if(a.trackMouseOver!==false){a.mon(a.innerCt,{scope:this,mouseover:this.delegateOver,mouseout:this.delegateOut})}a.mon(a.getTreeEl(),{scope:this,click:this.delegateClick,dblclick:this.delegateDblClick,contextmenu:this.delegateContextMenu})},getNode:function(b){var a;if(a=b.getTarget(".x-tree-node-el",10)){var c=Ext.fly(a,"_treeEvents").getAttribute("tree-node-id","ext");if(c){return this.tree.getNodeById(c)}}return null},getNodeTarget:function(b){var a=b.getTarget(".x-tree-node-icon",1);if(!a){a=b.getTarget(".x-tree-node-el",6)}return a},delegateOut:function(b,a){if(!this.beforeEvent(b)){return}if(b.getTarget(".x-tree-ec-icon",1)){var c=this.getNode(b);this.onIconOut(b,c);if(c==this.lastEcOver){delete this.lastEcOver}}if((a=this.getNodeTarget(b))&&!b.within(a,true)){this.onNodeOut(b,this.getNode(b))}},delegateOver:function(b,a){if(!this.beforeEvent(b)){return}if(Ext.isGecko&&!this.trackingDoc){Ext.getBody().on("mouseover",this.trackExit,this);this.trackingDoc=true}if(this.lastEcOver){this.onIconOut(b,this.lastEcOver);delete this.lastEcOver}if(b.getTarget(".x-tree-ec-icon",1)){this.lastEcOver=this.getNode(b);this.onIconOver(b,this.lastEcOver)}if(a=this.getNodeTarget(b)){this.onNodeOver(b,this.getNode(b))}},trackExit:function(a){if(this.lastOverNode){if(this.lastOverNode.ui&&!a.within(this.lastOverNode.ui.getEl())){this.onNodeOut(a,this.lastOverNode)}delete this.lastOverNode;Ext.getBody().un("mouseover",this.trackExit,this);this.trackingDoc=false}},delegateClick:function(b,a){if(this.beforeEvent(b)){if(b.getTarget("input[type=checkbox]",1)){this.onCheckboxClick(b,this.getNode(b))}else{if(b.getTarget(".x-tree-ec-icon",1)){this.onIconClick(b,this.getNode(b))}else{if(this.getNodeTarget(b)){this.onNodeClick(b,this.getNode(b))}else{this.onContainerEvent(b,"click")}}}}},delegateDblClick:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeDblClick(b,this.getNode(b))}else{this.onContainerEvent(b,"dblclick")}}},delegateContextMenu:function(b,a){if(this.beforeEvent(b)){if(this.getNodeTarget(b)){this.onNodeContextMenu(b,this.getNode(b))}else{this.onContainerEvent(b,"contextmenu")}}},onContainerEvent:function(b,a){this.tree.fireEvent("container"+a,this.tree,b)},onNodeClick:function(b,a){a.ui.onClick(b)},onNodeOver:function(b,a){this.lastOverNode=a;a.ui.onOver(b)},onNodeOut:function(b,a){a.ui.onOut(b)},onIconOver:function(b,a){a.ui.addClass("x-tree-ec-over")},onIconOut:function(b,a){a.ui.removeClass("x-tree-ec-over")},onIconClick:function(b,a){a.ui.ecClick(b)},onCheckboxClick:function(b,a){a.ui.onCheckChange(b)},onNodeDblClick:function(b,a){a.ui.onDblClick(b)},onNodeContextMenu:function(b,a){a.ui.onContextMenu(b)},beforeEvent:function(b){var a=this.getNode(b);if(this.disabled||!a||!a.ui){b.stopEvent();return false}return true},disable:function(){this.disabled=true},enable:function(){this.disabled=false}};Ext.tree.DefaultSelectionModel=function(a){this.selNode=null;this.addEvents("selectionchange","beforeselect");Ext.apply(this,a);Ext.tree.DefaultSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.DefaultSelectionModel,Ext.util.Observable,{init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){this.select(a)},select:function(c,a){if(!Ext.fly(c.ui.wrap).isVisible()&&a){return a.call(this,c)}var b=this.selNode;if(c==b){c.ui.onSelectedChange(true)}else{if(this.fireEvent("beforeselect",this,c,b)!==false){if(b&&b.ui){b.ui.onSelectedChange(false)}this.selNode=c;c.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,c,b)}}return c},unselect:function(b,a){if(this.selNode==b){this.clearSelections(a)}},clearSelections:function(a){var b=this.selNode;if(b){b.ui.onSelectedChange(false);this.selNode=null;if(a!==true){this.fireEvent("selectionchange",this,null)}}return b},getSelectedNode:function(){return this.selNode},isSelected:function(a){return this.selNode==a},selectPrevious:function(a){if(!(a=a||this.selNode||this.lastSelNode)){return null}var c=a.previousSibling;if(c){if(!c.isExpanded()||c.childNodes.length<1){return this.select(c,this.selectPrevious)}else{var b=c.lastChild;while(b&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()&&b.childNodes.length>0){b=b.lastChild}return this.select(b,this.selectPrevious)}}else{if(a.parentNode&&(this.tree.rootVisible||!a.parentNode.isRoot)){return this.select(a.parentNode,this.selectPrevious)}}return null},selectNext:function(b){if(!(b=b||this.selNode||this.lastSelNode)){return null}if(b.firstChild&&b.isExpanded()&&Ext.fly(b.ui.wrap).isVisible()){return this.select(b.firstChild,this.selectNext)}else{if(b.nextSibling){return this.select(b.nextSibling,this.selectNext)}else{if(b.parentNode){var a=null;b.parentNode.bubble(function(){if(this.nextSibling){a=this.getOwnerTree().selModel.select(this.nextSibling,this.selectNext);return false}});return a}}}return null},onKeyDown:function(c){var b=this.selNode||this.lastSelNode;var d=this;if(!b){return}var a=c.getKey();switch(a){case c.DOWN:c.stopEvent();this.selectNext();break;case c.UP:c.stopEvent();this.selectPrevious();break;case c.RIGHT:c.preventDefault();if(b.hasChildNodes()){if(!b.isExpanded()){b.expand()}else{if(b.firstChild){this.select(b.firstChild,c)}}}break;case c.LEFT:c.preventDefault();if(b.hasChildNodes()&&b.isExpanded()){b.collapse()}else{if(b.parentNode&&(this.tree.rootVisible||b.parentNode!=this.tree.getRootNode())){this.select(b.parentNode,c)}}break}}});Ext.tree.MultiSelectionModel=function(a){this.selNodes=[];this.selMap={};this.addEvents("selectionchange");Ext.apply(this,a);Ext.tree.MultiSelectionModel.superclass.constructor.call(this)};Ext.extend(Ext.tree.MultiSelectionModel,Ext.util.Observable,{init:function(a){this.tree=a;a.mon(a.getTreeEl(),"keydown",this.onKeyDown,this);a.on("click",this.onNodeClick,this)},onNodeClick:function(a,b){if(b.ctrlKey&&this.isSelected(a)){this.unselect(a)}else{this.select(a,b,b.ctrlKey)}},select:function(a,c,b){if(b!==true){this.clearSelections(true)}if(this.isSelected(a)){this.lastSelNode=a;return a}this.selNodes.push(a);this.selMap[a.id]=a;this.lastSelNode=a;a.ui.onSelectedChange(true);this.fireEvent("selectionchange",this,this.selNodes);return a},unselect:function(b){if(this.selMap[b.id]){b.ui.onSelectedChange(false);var c=this.selNodes;var a=c.indexOf(b);if(a!=-1){this.selNodes.splice(a,1)}delete this.selMap[b.id];this.fireEvent("selectionchange",this,this.selNodes)}},clearSelections:function(b){var d=this.selNodes;if(d.length>0){for(var c=0,a=d.length;c0},isExpandable:function(){return this.attributes.expandable||this.hasChildNodes()},appendChild:function(e){var g=false;if(Ext.isArray(e)){g=e}else{if(arguments.length>1){g=arguments}}if(g){for(var d=0,a=g.length;d0){var g=d?function(){e.apply(d,arguments)}:e;c.sort(g);for(var b=0;b
    ','',this.indentMarkup,"",'','',g?('':"/>")):"",'',e.text,"
    ",'',""].join("");if(l!==true&&e.nextSibling&&(b=e.nextSibling.ui.getEl())){this.wrap=Ext.DomHelper.insertHtml("beforeBegin",b,d)}else{this.wrap=Ext.DomHelper.insertHtml("beforeEnd",j,d)}this.elNode=this.wrap.childNodes[0];this.ctNode=this.wrap.childNodes[1];var i=this.elNode.childNodes;this.indentNode=i[0];this.ecNode=i[1];this.iconNode=i[2];var h=3;if(g){this.checkbox=i[3];this.checkbox.defaultChecked=this.checkbox.checked;h++}this.anchor=i[h];this.textNode=i[h].firstChild},getAnchor:function(){return this.anchor},getTextEl:function(){return this.textNode},getIconEl:function(){return this.iconNode},isChecked:function(){return this.checkbox?this.checkbox.checked:false},updateExpandIcon:function(){if(this.rendered){var g=this.node,d,c,a=g.isLast()?"x-tree-elbow-end":"x-tree-elbow",e=g.hasChildNodes();if(e||g.attributes.expandable){if(g.expanded){a+="-minus";d="x-tree-node-collapsed";c="x-tree-node-expanded"}else{a+="-plus";d="x-tree-node-expanded";c="x-tree-node-collapsed"}if(this.wasLeaf){this.removeClass("x-tree-node-leaf");this.wasLeaf=false}if(this.c1!=d||this.c2!=c){Ext.fly(this.elNode).replaceClass(d,c);this.c1=d;this.c2=c}}else{if(!this.wasLeaf){Ext.fly(this.elNode).replaceClass("x-tree-node-expanded","x-tree-node-collapsed");delete this.c1;delete this.c2;this.wasLeaf=true}}var b="x-tree-ec-icon "+a;if(this.ecc!=b){this.ecNode.className=b;this.ecc=b}}},onIdChange:function(a){if(this.rendered){this.elNode.setAttribute("ext:tree-node-id",a)}},getChildIndent:function(){if(!this.childIndent){var a=[],b=this.node;while(b){if(!b.isRoot||(b.isRoot&&b.ownerTree.rootVisible)){if(!b.isLast()){a.unshift('')}else{a.unshift('')}}b=b.parentNode}this.childIndent=a.join("")}return this.childIndent},renderIndent:function(){if(this.rendered){var a="",b=this.node.parentNode;if(b){a=b.ui.getChildIndent()}if(this.indentMarkup!=a){this.indentNode.innerHTML=a;this.indentMarkup=a}this.updateExpandIcon()}},destroy:function(){if(this.elNode){Ext.dd.Registry.unregister(this.elNode.id)}Ext.each(["textnode","anchor","checkbox","indentNode","ecNode","iconNode","elNode","ctNode","wrap","holder"],function(a){if(this[a]){Ext.fly(this[a]).remove();delete this[a]}},this);delete this.node}};Ext.tree.RootTreeNodeUI=Ext.extend(Ext.tree.TreeNodeUI,{render:function(){if(!this.rendered){var a=this.node.ownerTree.innerCt.dom;this.node.expanded=true;a.innerHTML='
    ';this.wrap=this.ctNode=a.firstChild}},collapse:Ext.emptyFn,expand:Ext.emptyFn});Ext.tree.TreeLoader=function(a){this.baseParams={};Ext.apply(this,a);this.addEvents("beforeload","load","loadexception");Ext.tree.TreeLoader.superclass.constructor.call(this);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}};Ext.extend(Ext.tree.TreeLoader,Ext.util.Observable,{uiProviders:{},clearOnLoad:true,paramOrder:undefined,paramsAsHash:false,nodeParameter:"node",directFn:undefined,load:function(b,c,a){if(this.clearOnLoad){while(b.firstChild){b.removeChild(b.firstChild)}}if(this.doPreload(b)){this.runCallback(c,a||b,[b])}else{if(this.directFn||this.dataUrl||this.url){this.requestData(b,c,a||b)}}},doPreload:function(d){if(d.attributes.children){if(d.childNodes.length<1){var c=d.attributes.children;d.beginUpdate();for(var b=0,a=c.length;b-1){c=[]}for(var d=0,a=b.length;dl){return e?-1:+1}else{return 0}}}};Ext.tree.TreeSorter.prototype={doSort:function(a){a.sort(this.sortFn)},compareNodes:function(b,a){return(b.text.toUpperCase()>a.text.toUpperCase()?1:-1)},updateSort:function(a,b){if(b.childrenRendered){this.doSort.defer(1,this,[b])}},updateSortParent:function(a){var b=a.parentNode;if(b&&b.childrenRendered){this.doSort.defer(1,this,[b])}}};if(Ext.dd.DropZone){Ext.tree.TreeDropZone=function(a,b){this.allowParentInsert=b.allowParentInsert||false;this.allowContainerDrop=b.allowContainerDrop||false;this.appendOnly=b.appendOnly||false;Ext.tree.TreeDropZone.superclass.constructor.call(this,a.getTreeEl(),b);this.tree=a;this.dragOverData={};this.lastInsertClass="x-tree-no-status"};Ext.extend(Ext.tree.TreeDropZone,Ext.dd.DropZone,{ddGroup:"TreeDD",expandDelay:1000,expandNode:function(a){if(a.hasChildNodes()&&!a.isExpanded()){a.expand(false,null,this.triggerCacheRefresh.createDelegate(this))}},queueExpand:function(a){this.expandProcId=this.expandNode.defer(this.expandDelay,this,[a])},cancelExpand:function(){if(this.expandProcId){clearTimeout(this.expandProcId);this.expandProcId=false}},isValidDropPoint:function(a,k,i,d,c){if(!a||!c){return false}var g=a.node;var h=c.node;if(!(g&&g.isTarget&&k)){return false}if(k=="append"&&g.allowChildren===false){return false}if((k=="above"||k=="below")&&(g.parentNode&&g.parentNode.allowChildren===false)){return false}if(h&&(g==h||h.contains(g))){return false}var b=this.dragOverData;b.tree=this.tree;b.target=g;b.data=c;b.point=k;b.source=i;b.rawEvent=d;b.dropNode=h;b.cancel=false;var j=this.tree.fireEvent("nodedragover",b);return b.cancel===false&&j!==false},getDropPoint:function(h,g,l){var m=g.node;if(m.isRoot){return m.allowChildren!==false?"append":false}var c=g.ddel;var o=Ext.lib.Dom.getY(c),j=o+c.offsetHeight;var i=Ext.lib.Event.getPageY(h);var k=m.allowChildren===false||m.isLeaf();if(this.appendOnly||m.parentNode.allowChildren===false){return k?false:"append"}var d=false;if(!this.allowParentInsert){d=m.hasChildNodes()&&m.isExpanded()}var a=(j-o)/(k?2:3);if(i>=o&&i<(o+a)){return"above"}else{if(!d&&(k||i>=j-a&&i<=j)){return"below"}else{return"append"}}},onNodeEnter:function(d,a,c,b){this.cancelExpand()},onContainerOver:function(a,c,b){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,c,b)){return this.dropAllowed}return this.dropNotAllowed},onNodeOver:function(b,i,h,g){var k=this.getDropPoint(h,b,i);var c=b.node;if(!this.expandProcId&&k=="append"&&c.hasChildNodes()&&!b.node.isExpanded()){this.queueExpand(c)}else{if(k!="append"){this.cancelExpand()}}var d=this.dropNotAllowed;if(this.isValidDropPoint(b,k,i,h,g)){if(k){var a=b.ddel;var j;if(k=="above"){d=b.node.isFirst()?"x-tree-drop-ok-above":"x-tree-drop-ok-between";j="x-tree-drag-insert-above"}else{if(k=="below"){d=b.node.isLast()?"x-tree-drop-ok-below":"x-tree-drop-ok-between";j="x-tree-drag-insert-below"}else{d="x-tree-drop-ok-append";j="x-tree-drag-append"}}if(this.lastInsertClass!=j){Ext.fly(a).replaceClass(this.lastInsertClass,j);this.lastInsertClass=j}}}return d},onNodeOut:function(d,a,c,b){this.cancelExpand();this.removeDropIndicators(d)},onNodeDrop:function(i,b,h,d){var a=this.getDropPoint(h,i,b);var g=i.node;g.ui.startDrop();if(!this.isValidDropPoint(i,a,b,h,d)){g.ui.endDrop();return false}var c=d.node||(b.getTreeNode?b.getTreeNode(d,g,a,h):null);return this.processDrop(g,d,a,b,h,c)},onContainerDrop:function(a,g,c){if(this.allowContainerDrop&&this.isValidDropPoint({ddel:this.tree.getRootNode().ui.elNode,node:this.tree.getRootNode()},"append",a,g,c)){var d=this.tree.getRootNode();d.ui.startDrop();var b=c.node||(a.getTreeNode?a.getTreeNode(c,d,"append",g):null);return this.processDrop(d,c,"append",a,g,b)}return false},processDrop:function(j,h,b,a,i,d){var g={tree:this.tree,target:j,data:h,point:b,source:a,rawEvent:i,dropNode:d,cancel:!d,dropStatus:false};var c=this.tree.fireEvent("beforenodedrop",g);if(c===false||g.cancel===true||!g.dropNode){j.ui.endDrop();return g.dropStatus}j=g.target;if(b=="append"&&!j.isExpanded()){j.expand(false,null,function(){this.completeDrop(g)}.createDelegate(this))}else{this.completeDrop(g)}return true},completeDrop:function(h){var d=h.dropNode,e=h.point,c=h.target;if(!Ext.isArray(d)){d=[d]}var g;for(var b=0,a=d.length;bd.offsetLeft){e.scrollLeft=d.offsetLeft}var a=Math.min(this.maxWidth,(e.clientWidth>20?e.clientWidth:e.offsetWidth)-Math.max(0,d.offsetLeft-e.scrollLeft)-5);this.setSize(a,"")},triggerEdit:function(a,c){this.completeEdit();if(a.attributes.editable!==false){this.editNode=a;if(this.tree.autoScroll){Ext.fly(a.ui.getEl()).scrollIntoView(this.tree.body)}var b=a.text||"";if(!Ext.isGecko&&Ext.isEmpty(a.text)){a.setText(" ")}this.autoEditTimer=this.startEdit.defer(this.editDelay,this,[a.ui.textNode,b]);return false}},bindScroll:function(){this.tree.getTreeEl().on("scroll",this.cancelEdit,this)},beforeNodeClick:function(a,b){clearTimeout(this.autoEditTimer);if(this.tree.getSelectionModel().isSelected(a)){b.stopEvent();return this.triggerEdit(a)}},onNodeDblClick:function(a,b){clearTimeout(this.autoEditTimer)},updateNode:function(a,b){this.tree.getTreeEl().un("scroll",this.cancelEdit,this);this.editNode.setText(b)},onHide:function(){Ext.tree.TreeEditor.superclass.onHide.call(this);if(this.editNode){this.editNode.ui.focus.defer(50,this.editNode.ui)}},onSpecialKey:function(c,b){var a=b.getKey();if(a==b.ESC){b.stopEvent();this.cancelEdit()}else{if(a==b.ENTER&&!b.hasModifier()){b.stopEvent();this.completeEdit()}}},onDestroy:function(){clearTimeout(this.autoEditTimer);Ext.tree.TreeEditor.superclass.onDestroy.call(this);var a=this.tree;a.un("beforeclick",this.beforeNodeClick,this);a.un("dblclick",this.onNodeDblClick,this)}}); +(function(){var h=Ext.util,j=Ext.each,g=true,i=false;h.Observable=function(){var k=this,l=k.events;if(k.listeners){k.on(k.listeners);delete k.listeners}k.events=l||{}};h.Observable.prototype={filterOptRe:/^(?:scope|delay|buffer|single)$/,fireEvent:function(){var k=Array.prototype.slice.call(arguments,0),m=k[0].toLowerCase(),n=this,l=g,p=n.events[m],s,o,r;if(n.eventsSuspended===g){if(o=n.eventQueue){o.push(k)}}else{if(typeof p=="object"){if(p.bubble){if(p.fire.apply(p,k.slice(1))===i){return i}r=n.getBubbleTarget&&n.getBubbleTarget();if(r&&r.enableBubble){s=r.events[m];if(!s||typeof s!="object"||!s.bubble){r.enableBubble(m)}return r.fireEvent.apply(r,k)}}else{k.shift();l=p.fire.apply(p,k)}}}return l},addListener:function(k,m,l,r){var n=this,q,s,p;if(typeof k=="object"){r=k;for(q in r){s=r[q];if(!n.filterOptRe.test(q)){n.addListener(q,s.fn||s,s.scope||r.scope,s.fn?s:r)}}}else{k=k.toLowerCase();p=n.events[k]||g;if(typeof p=="boolean"){n.events[k]=p=new h.Event(n,k)}p.addListener(m,l,typeof r=="object"?r:{})}},removeListener:function(k,m,l){var n=this.events[k.toLowerCase()];if(typeof n=="object"){n.removeListener(m,l)}},purgeListeners:function(){var m=this.events,k,l;for(l in m){k=m[l];if(typeof k=="object"){k.clearListeners()}}},addEvents:function(n){var m=this;m.events=m.events||{};if(typeof n=="string"){var k=arguments,l=k.length;while(l--){m.events[k[l]]=m.events[k[l]]||g}}else{Ext.applyIf(m.events,n)}},hasListener:function(k){var l=this.events[k.toLowerCase()];return typeof l=="object"&&l.listeners.length>0},suspendEvents:function(k){this.eventsSuspended=g;if(k&&!this.eventQueue){this.eventQueue=[]}},resumeEvents:function(){var k=this,l=k.eventQueue||[];k.eventsSuspended=i;delete k.eventQueue;j(l,function(m){k.fireEvent.apply(k,m)})}};var d=h.Observable.prototype;d.on=d.addListener;d.un=d.removeListener;h.Observable.releaseCapture=function(k){k.fireEvent=d.fireEvent};function e(l,m,k){return function(){if(m.target==arguments[0]){l.apply(k,Array.prototype.slice.call(arguments,0))}}}function b(n,p,k,m){k.task=new h.DelayedTask();return function(){k.task.delay(p.buffer,n,m,Array.prototype.slice.call(arguments,0))}}function c(m,n,l,k){return function(){n.removeListener(l,k);return m.apply(k,arguments)}}function a(n,p,k,m){return function(){var l=new h.DelayedTask(),o=Array.prototype.slice.call(arguments,0);if(!k.tasks){k.tasks=[]}k.tasks.push(l);l.delay(p.delay||10,function(){k.tasks.remove(l);n.apply(m,o)},m)}}h.Event=function(l,k){this.name=k;this.obj=l;this.listeners=[]};h.Event.prototype={addListener:function(o,n,m){var p=this,k;n=n||p.obj;if(!p.isListening(o,n)){k=p.createListener(o,n,m);if(p.firing){p.listeners=p.listeners.slice(0)}p.listeners.push(k)}},createListener:function(p,n,q){q=q||{};n=n||this.obj;var k={fn:p,scope:n,options:q},m=p;if(q.target){m=e(m,q,n)}if(q.delay){m=a(m,q,k,n)}if(q.single){m=c(m,this,p,n)}if(q.buffer){m=b(m,q,k,n)}k.fireFn=m;return k},findListener:function(o,n){var p=this.listeners,m=p.length,k;n=n||this.obj;while(m--){k=p[m];if(k){if(k.fn==o&&k.scope==n){return m}}}return -1},isListening:function(l,k){return this.findListener(l,k)!=-1},removeListener:function(r,q){var p,m,n,s=this,o=i;if((p=s.findListener(r,q))!=-1){if(s.firing){s.listeners=s.listeners.slice(0)}m=s.listeners[p];if(m.task){m.task.cancel();delete m.task}n=m.tasks&&m.tasks.length;if(n){while(n--){m.tasks[n].cancel()}delete m.tasks}s.listeners.splice(p,1);o=g}return o},clearListeners:function(){var n=this,k=n.listeners,m=k.length;while(m--){n.removeListener(k[m].fn,k[m].scope)}},fire:function(){var q=this,p=q.listeners,k=p.length,o=0,m;if(k>0){q.firing=g;var n=Array.prototype.slice.call(arguments,0);for(;o",i="",b=a+"",j=""+i,l=b+"",w=""+j;function h(B,D,C,E,A,y){var z=r.insertHtml(E,Ext.getDom(B),u(D));return C?Ext.get(z,true):z}function u(D){var z="",y,C,B,E;if(typeof D=="string"){z=D}else{if(Ext.isArray(D)){for(var A=0;A"}}}return z}function g(F,C,B,D){x.innerHTML=[C,B,D].join("");var y=-1,A=x,z;while(++y "'+D+'"'},insertBefore:function(y,A,z){return h(y,A,z,c)},insertAfter:function(y,A,z){return h(y,A,z,p,"nextSibling")},insertFirst:function(y,A,z){return h(y,A,z,n,"firstChild")},append:function(y,A,z){return h(y,A,z,q,"",true)},overwrite:function(y,A,z){y=Ext.getDom(y);y.innerHTML=u(A);return z?Ext.get(y.firstChild):y.firstChild},createHtml:u};return r}();Ext.Template=function(h){var j=this,c=arguments,e=[],d;if(Ext.isArray(h)){h=h.join("")}else{if(c.length>1){for(var g=0,b=c.length;g+~]\s?|\s|$)/,tagTokenRe=/^(#)?([\w\-\*]+)/,nthRe=/(\d*)n\+?(\d*)/,nthRe2=/\D/,isIE=window.ActiveXObject?true:false,key=30803;eval("var batch = 30803;");function child(parent,index){var i=0,n=parent.firstChild;while(n){if(n.nodeType==1){if(++i==index){return n}}n=n.nextSibling}return null}function next(n){while((n=n.nextSibling)&&n.nodeType!=1){}return n}function prev(n){while((n=n.previousSibling)&&n.nodeType!=1){}return n}function children(parent){var n=parent.firstChild,nodeIndex=-1,nextNode;while(n){nextNode=n.nextSibling;if(n.nodeType==3&&!nonSpace.test(n.nodeValue)){parent.removeChild(n)}else{n.nodeIndex=++nodeIndex}n=nextNode}return this}function byClassName(nodeSet,cls){if(!cls){return nodeSet}var result=[],ri=-1;for(var i=0,ci;ci=nodeSet[i];i++){if((" "+ci.className+" ").indexOf(cls)!=-1){result[++ri]=ci}}return result}function attrValue(n,attr){if(!n.tagName&&typeof n.length!="undefined"){n=n[0]}if(!n){return null}if(attr=="for"){return n.htmlFor}if(attr=="class"||attr=="className"){return n.className}return n.getAttribute(attr)||n[attr]}function getNodes(ns,mode,tagName){var result=[],ri=-1,cs;if(!ns){return result}tagName=tagName||"*";if(typeof ns.getElementsByTagName!="undefined"){ns=[ns]}if(!mode){for(var i=0,ni;ni=ns[i];i++){cs=ni.getElementsByTagName(tagName);for(var j=0,ci;ci=cs[j];j++){result[++ri]=ci}}}else{if(mode=="/"||mode==">"){var utag=tagName.toUpperCase();for(var i=0,ni,cn;ni=ns[i];i++){cn=ni.childNodes;for(var j=0,cj;cj=cn[j];j++){if(cj.nodeName==utag||cj.nodeName==tagName||tagName=="*"){result[++ri]=cj}}}}else{if(mode=="+"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(n&&(n.nodeName==utag||n.nodeName==tagName||tagName=="*")){result[++ri]=n}}}else{if(mode=="~"){var utag=tagName.toUpperCase();for(var i=0,n;n=ns[i];i++){while((n=n.nextSibling)){if(n.nodeName==utag||n.nodeName==tagName||tagName=="*"){result[++ri]=n}}}}}}}return result}function concat(a,b){if(b.slice){return a.concat(b)}for(var i=0,l=b.length;i1){return nodup(results)}return results},isXml:function(el){var docEl=(el?el.ownerDocument||el:0).documentElement;return docEl?docEl.nodeName!=="HTML":false},select:document.querySelectorAll?function(path,root,type){root=root||document;if(!Ext.DomQuery.isXml(root)){try{var cs=root.querySelectorAll(path);return Ext.toArray(cs)}catch(ex){}}return Ext.DomQuery.jsSelect.call(this,path,root,type)}:function(path,root,type){return Ext.DomQuery.jsSelect.call(this,path,root,type)},selectNode:function(path,root){return Ext.DomQuery.select(path,root)[0]},selectValue:function(path,root,defaultValue){path=path.replace(trimRe,"");if(!valueCache[path]){valueCache[path]=Ext.DomQuery.compile(path,"select")}var n=valueCache[path](root),v;n=n[0]?n[0]:n;if(typeof n.normalize=="function"){n.normalize()}v=(n&&n.firstChild?n.firstChild.nodeValue:null);return((v===null||v===undefined||v==="")?defaultValue:v)},selectNumber:function(path,root,defaultValue){var v=Ext.DomQuery.selectValue(path,root,defaultValue||0);return parseFloat(v)},is:function(el,ss){if(typeof el=="string"){el=document.getElementById(el)}var isArray=Ext.isArray(el),result=Ext.DomQuery.filter(isArray?el:[el],ss);return isArray?(result.length==el.length):(result.length>0)},filter:function(els,ss,nonMatches){ss=ss.replace(trimRe,"");if(!simpleCache[ss]){simpleCache[ss]=Ext.DomQuery.compile(ss,"simple")}var result=simpleCache[ss](els);return nonMatches?quickDiff(result,els):result},matchers:[{re:/^\.([\w\-]+)/,select:'n = byClassName(n, " {1} ");'},{re:/^\:([\w\-]+)(?:\(((?:[^\s>\/]*|.*?))\))?/,select:'n = byPseudo(n, "{1}", "{2}");'},{re:/^(?:([\[\{])(?:@)?([\w\-]+)\s?(?:(=|.=)\s?(["']?)(.*?)\4)?[\]\}])/,select:'n = byAttribute(n, "{2}", "{5}", "{3}", "{1}");'},{re:/^#([\w\-]+)/,select:'n = byId(n, "{1}");'},{re:/^@([\w\-]+)/,select:'return {firstChild:{nodeValue:attrValue(n, "{1}")}};'}],operators:{"=":function(a,v){return a==v},"!=":function(a,v){return a!=v},"^=":function(a,v){return a&&a.substr(0,v.length)==v},"$=":function(a,v){return a&&a.substr(a.length-v.length)==v},"*=":function(a,v){return a&&a.indexOf(v)!==-1},"%=":function(a,v){return(a%v)==0},"|=":function(a,v){return a&&(a==v||a.substr(0,v.length+1)==v+"-")},"~=":function(a,v){return a&&(" "+a+" ").indexOf(" "+v+" ")!=-1}},pseudos:{"first-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.previousSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"last-child":function(c){var r=[],ri=-1,n;for(var i=0,ci;ci=n=c[i];i++){while((n=n.nextSibling)&&n.nodeType!=1){}if(!n){r[++ri]=ci}}return r},"nth-child":function(c,a){var r=[],ri=-1,m=nthRe.exec(a=="even"&&"2n"||a=="odd"&&"2n+1"||!nthRe2.test(a)&&"n+"+a||a),f=(m[1]||1)-0,l=m[2]-0;for(var i=0,n;n=c[i];i++){var pn=n.parentNode;if(batch!=pn._batch){var j=0;for(var cn=pn.firstChild;cn;cn=cn.nextSibling){if(cn.nodeType==1){cn.nodeIndex=++j}}pn._batch=batch}if(f==1){if(l==0||n.nodeIndex==l){r[++ri]=n}}else{if((n.nodeIndex+l)%f==0){r[++ri]=n}}}return r},"only-child":function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(!prev(ci)&&!next(ci)){r[++ri]=ci}}return r},empty:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var cns=ci.childNodes,j=0,cn,empty=true;while(cn=cns[j]){++j;if(cn.nodeType==1||cn.nodeType==3){empty=false;break}}if(empty){r[++ri]=ci}}return r},contains:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if((ci.textContent||ci.innerText||"").indexOf(v)!=-1){r[++ri]=ci}}return r},nodeValue:function(c,v){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.firstChild&&ci.firstChild.nodeValue==v){r[++ri]=ci}}return r},checked:function(c){var r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(ci.checked==true){r[++ri]=ci}}return r},not:function(c,ss){return Ext.DomQuery.filter(c,ss,true)},any:function(c,selectors){var ss=selectors.split("|"),r=[],ri=-1,s;for(var i=0,ci;ci=c[i];i++){for(var j=0;s=ss[j];j++){if(Ext.DomQuery.is(ci,s)){r[++ri]=ci;break}}}return r},odd:function(c){return this["nth-child"](c,"odd")},even:function(c){return this["nth-child"](c,"even")},nth:function(c,a){return c[a-1]||[]},first:function(c){return c[0]||[]},last:function(c){return c[c.length-1]||[]},has:function(c,ss){var s=Ext.DomQuery.select,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){if(s(ss,ci).length>0){r[++ri]=ci}}return r},next:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=next(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r},prev:function(c,ss){var is=Ext.DomQuery.is,r=[],ri=-1;for(var i=0,ci;ci=c[i];i++){var n=prev(ci);if(n&&is(n,ss)){r[++ri]=ci}}return r}}}}();Ext.query=Ext.DomQuery.select;Ext.util.DelayedTask=function(d,c,a){var e=this,g,b=function(){clearInterval(g);g=null;d.apply(c,a||[])};e.delay=function(i,k,j,h){e.cancel();d=k||d;c=j||c;a=h||a;g=setInterval(b,i)};e.cancel=function(){if(g){clearInterval(g);g=null}}};(function(){var h=document;Ext.Element=function(l,m){var n=typeof l=="string"?h.getElementById(l):l,o;if(!n){return null}o=n.id;if(!m&&o&&Ext.elCache[o]){return Ext.elCache[o].el}this.dom=n;this.id=o||Ext.id(n)};var d=Ext.DomHelper,e=Ext.Element,a=Ext.elCache;e.prototype={set:function(q,m){var n=this.dom,l,p,m=(m!==false)&&!!n.setAttribute;for(l in q){if(q.hasOwnProperty(l)){p=q[l];if(l=="style"){d.applyStyles(n,p)}else{if(l=="cls"){n.className=p}else{if(m){n.setAttribute(l,p)}else{n[l]=p}}}}}return this},defaultUnit:"px",is:function(l){return Ext.DomQuery.is(this.dom,l)},focus:function(o,n){var l=this,n=n||l.dom;try{if(Number(o)){l.focus.defer(o,null,[null,n])}else{n.focus()}}catch(m){}return l},blur:function(){try{this.dom.blur()}catch(l){}return this},getValue:function(l){var m=this.dom.value;return l?parseInt(m,10):m},addListener:function(l,o,n,m){Ext.EventManager.on(this.dom,l,o,n||this,m);return this},removeListener:function(l,n,m){Ext.EventManager.removeListener(this.dom,l,n,m||this);return this},removeAllListeners:function(){Ext.EventManager.removeAll(this.dom);return this},purgeAllListeners:function(){Ext.EventManager.purgeElement(this,true);return this},addUnits:function(l){if(l===""||l=="auto"||l===undefined){l=l||""}else{if(!isNaN(l)||!i.test(l)){l=l+(this.defaultUnit||"px")}}return l},load:function(m,n,l){Ext.Ajax.request(Ext.apply({params:n,url:m.url||m,callback:l,el:this.dom,indicatorText:m.indicatorText||""},Ext.isObject(m)?m:{}));return this},isBorderBox:function(){return Ext.isBorderBox||Ext.isForcedBorderBox||g[(this.dom.tagName||"").toLowerCase()]},remove:function(){var l=this,m=l.dom;if(m){delete l.dom;Ext.removeNode(m)}},hover:function(m,l,o,n){var p=this;p.on("mouseenter",m,o||p.dom,n);p.on("mouseleave",l,o||p.dom,n);return p},contains:function(l){return !l?false:Ext.lib.Dom.isAncestor(this.dom,l.dom?l.dom:l)},getAttributeNS:function(m,l){return this.getAttribute(l,m)},getAttribute:(function(){var p=document.createElement("table"),o=false,m="getAttribute" in p,l=/undefined|unknown/;if(m){try{p.getAttribute("ext:qtip")}catch(n){o=true}return function(q,s){var r=this.dom,t;if(r.getAttributeNS){t=r.getAttributeNS(s,q)||null}if(t==null){if(s){if(o&&r.tagName.toUpperCase()=="TABLE"){try{t=r.getAttribute(s+":"+q)}catch(u){t=""}}else{t=r.getAttribute(s+":"+q)}}else{t=r.getAttribute(q)||r[q]}}return t||""}}else{return function(q,s){var r=this.om,u,t;if(s){t=r[s+":"+q];u=l.test(typeof t)?undefined:t}else{u=r[q]}return u||""}}p=null})(),update:function(l){if(this.dom){this.dom.innerHTML=l}return this}};var k=e.prototype;e.addMethods=function(l){Ext.apply(k,l)};k.on=k.addListener;k.un=k.removeListener;k.autoBoxAdjust=true;var i=/\d+(px|em|%|en|ex|pt|in|cm|mm|pc)$/i,c;e.get=function(m){var l,p,o;if(!m){return null}if(typeof m=="string"){if(!(p=h.getElementById(m))){return null}if(a[m]&&a[m].el){l=a[m].el;l.dom=p}else{l=e.addToCache(new e(p))}return l}else{if(m.tagName){if(!(o=m.id)){o=Ext.id(m)}if(a[o]&&a[o].el){l=a[o].el;l.dom=m}else{l=e.addToCache(new e(m))}return l}else{if(m instanceof e){if(m!=c){if(Ext.isIE&&(m.id==undefined||m.id=="")){m.dom=m.dom}else{m.dom=h.getElementById(m.id)||m.dom}}return m}else{if(m.isComposite){return m}else{if(Ext.isArray(m)){return e.select(m)}else{if(m==h){if(!c){var n=function(){};n.prototype=e.prototype;c=new n();c.dom=h}return c}}}}}}return null};e.addToCache=function(l,m){m=m||l.id;a[m]={el:l,data:{},events:{}};return l};e.data=function(m,l,n){m=e.get(m);if(!m){return null}var o=a[m.id].data;if(arguments.length==2){return o[l]}else{return(o[l]=n)}};function j(){if(!Ext.enableGarbageCollector){clearInterval(e.collectorThreadId)}else{var l,n,q,p;for(l in a){p=a[l];if(p.skipGC){continue}n=p.el;q=n.dom;if(!q||!q.parentNode||(!q.offsetParent&&!h.getElementById(l))){if(Ext.enableListenerCollection){Ext.EventManager.removeAll(q)}delete a[l]}}if(Ext.isIE){var m={};for(l in a){m[l]=a[l]}a=Ext.elCache=m}}}e.collectorThreadId=setInterval(j,30000);var b=function(){};b.prototype=e.prototype;e.Flyweight=function(l){this.dom=l};e.Flyweight.prototype=new b();e.Flyweight.prototype.isFlyweight=true;e._flyweights={};e.fly=function(n,l){var m=null;l=l||"_global";if(n=Ext.getDom(n)){(e._flyweights[l]=e._flyweights[l]||new e.Flyweight()).dom=n;m=e._flyweights[l]}return m};Ext.get=e.get;Ext.fly=e.fly;var g=Ext.isStrict?{select:1}:{input:1,select:1,textarea:1};if(Ext.isIE||Ext.isGecko){g.button=1}})();Ext.Element.addMethods(function(){var d="parentNode",b="nextSibling",c="previousSibling",e=Ext.DomQuery,a=Ext.get;return{findParent:function(m,l,h){var j=this.dom,g=document.body,k=0,i;if(Ext.isGecko&&Object.prototype.toString.call(j)=="[object XULElement]"){return null}l=l||50;if(isNaN(l)){i=Ext.getDom(l);l=Number.MAX_VALUE}while(j&&j.nodeType==1&&k "+g,this.dom);return h?i:a(i)},parent:function(g,h){return this.matchNode(d,d,g,h)},next:function(g,h){return this.matchNode(b,b,g,h)},prev:function(g,h){return this.matchNode(c,c,g,h)},first:function(g,h){return this.matchNode(b,"firstChild",g,h)},last:function(g,h){return this.matchNode(c,"lastChild",g,h)},matchNode:function(h,k,g,i){var j=this.dom[k];while(j){if(j.nodeType==1&&(!g||e.is(j,g))){return !i?a(j):j}j=j[h]}return null}}}());Ext.Element.addMethods(function(){var c=Ext.getDom,a=Ext.get,b=Ext.DomHelper;return{appendChild:function(d){return a(d).appendTo(this)},appendTo:function(d){c(d).appendChild(this.dom);return this},insertBefore:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d);return this},insertAfter:function(d){(d=c(d)).parentNode.insertBefore(this.dom,d.nextSibling);return this},insertFirst:function(e,d){e=e||{};if(e.nodeType||e.dom||typeof e=="string"){e=c(e);this.dom.insertBefore(e,this.dom.firstChild);return !d?a(e):e}else{return this.createChild(e,this.dom.firstChild,d)}},replace:function(d){d=a(d);this.insertBefore(d);d.remove();return this},replaceWith:function(d){var e=this;if(d.nodeType||d.dom||typeof d=="string"){d=c(d);e.dom.parentNode.insertBefore(d,e.dom)}else{d=b.insertBefore(e.dom,d)}delete Ext.elCache[e.id];Ext.removeNode(e.dom);e.id=Ext.id(e.dom=d);Ext.Element.addToCache(e.isFlyweight?new Ext.Element(e.dom):e);return e},createChild:function(e,d,g){e=e||{tag:"div"};return d?b.insertBefore(d,e,g!==true):b[!this.dom.firstChild?"overwrite":"append"](this.dom,e,g!==true)},wrap:function(d,e){var g=b.insertBefore(this.dom,d||{tag:"div"},!e);g.dom?g.dom.appendChild(this.dom):g.appendChild(this.dom);return g},insertHtml:function(e,g,d){var h=b.insertHtml(e,this.dom,g);return d?Ext.get(h):h}}}());Ext.Element.addMethods(function(){var A=Ext.supports,h={},x=/(-[a-z])/gi,s=document.defaultView,D=/alpha\(opacity=(.*)\)/i,l=/^\s+|\s+$/g,B=Ext.Element,u=/\s+/,b=/\w/g,d="padding",c="margin",y="border",t="-left",q="-right",w="-top",o="-bottom",j="-width",r=Math,z="hidden",e="isClipped",k="overflow",n="overflow-x",m="overflow-y",C="originalClip",i={l:y+t+j,r:y+q+j,t:y+w+j,b:y+o+j},g={l:d+t,r:d+q,t:d+w,b:d+o},a={l:c+t,r:c+q,t:c+w,b:c+o},E=Ext.Element.data;function p(F,G){return G.charAt(1).toUpperCase()}function v(F){return h[F]||(h[F]=F=="float"?(A.cssFloat?"cssFloat":"styleFloat"):F.replace(x,p))}return{adjustWidth:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("lr")+G.getPadding("lr"))}return(H&&F<0)?0:F},adjustHeight:function(F){var G=this;var H=(typeof F=="number");if(H&&G.autoBoxAdjust&&!G.isBorderBox()){F-=(G.getBorderWidth("tb")+G.getPadding("tb"))}return(H&&F<0)?0:F},addClass:function(J){var K=this,I,F,H,G=[];if(!Ext.isArray(J)){if(typeof J=="string"&&!this.hasClass(J)){K.dom.className+=" "+J}}else{for(I=0,F=J.length;I5?H.toLowerCase():G)},setStyle:function(I,H){var F,G;if(typeof I!="object"){F={};F[I]=H;I=F}for(G in I){H=I[G];G=="opacity"?this.setOpacity(H):this.dom.style[v(G)]=H}return this},setOpacity:function(G,F){var J=this,H=J.dom.style;if(!F||!J.anim){if(Ext.isIE){var I=G<1?"alpha(opacity="+G*100+")":"",K=H.filter.replace(D,"").replace(l,"");H.zoom=1;H.filter=K+(K.length>0?" ":"")+I}else{H.opacity=G}}else{J.anim({opacity:{to:G}},J.preanim(arguments,1),null,0.35,"easeIn")}return J},clearOpacity:function(){var F=this.dom.style;if(Ext.isIE){if(!Ext.isEmpty(F.filter)){F.filter=F.filter.replace(D,"").replace(l,"")}}else{F.opacity=F["-moz-opacity"]=F["-khtml-opacity"]=""}return this},getHeight:function(H){var G=this,J=G.dom,I=Ext.isIE&&G.isStyle("display","none"),F=r.max(J.offsetHeight,I?0:J.clientHeight)||0;F=!H?F:F-G.getBorderWidth("tb")-G.getPadding("tb");return F<0?0:F},getWidth:function(G){var H=this,J=H.dom,I=Ext.isIE&&H.isStyle("display","none"),F=r.max(J.offsetWidth,I?0:J.clientWidth)||0;F=!G?F:F-H.getBorderWidth("lr")-H.getPadding("lr");return F<0?0:F},setWidth:function(G,F){var H=this;G=H.adjustWidth(G);!F||!H.anim?H.dom.style.width=H.addUnits(G):H.anim({width:{to:G}},H.preanim(arguments,1));return H},setHeight:function(F,G){var H=this;F=H.adjustHeight(F);!G||!H.anim?H.dom.style.height=H.addUnits(F):H.anim({height:{to:F}},H.preanim(arguments,1));return H},getBorderWidth:function(F){return this.addStyles(F,i)},getPadding:function(F){return this.addStyles(F,g)},clip:function(){var F=this,G=F.dom;if(!E(G,e)){E(G,e,true);E(G,C,{o:F.getStyle(k),x:F.getStyle(n),y:F.getStyle(m)});F.setStyle(k,z);F.setStyle(n,z);F.setStyle(m,z)}return F},unclip:function(){var F=this,H=F.dom;if(E(H,e)){E(H,e,false);var G=E(H,C);if(G.o){F.setStyle(k,G.o)}if(G.x){F.setStyle(n,G.x)}if(G.y){F.setStyle(m,G.y)}}return F},addStyles:function(M,L){var J=0,K=M.match(b),I,H,G,F=K.length;for(G=0;Ga.clientHeight||a.scrollWidth>a.clientWidth},scrollTo:function(a,b){this.dom["scroll"+(/top/i.test(a)?"Top":"Left")]=b;return this},getScroll:function(){var i=this.dom,h=document,a=h.body,c=h.documentElement,b,g,e;if(i==h||i==a){if(Ext.isIE&&Ext.isStrict){b=c.scrollLeft;g=c.scrollTop}else{b=window.pageXOffset;g=window.pageYOffset}e={left:b||(a?a.scrollLeft:0),top:g||(a?a.scrollTop:0)}}else{e={left:i.scrollLeft,top:i.scrollTop}}return e}});Ext.Element.VISIBILITY=1;Ext.Element.DISPLAY=2;Ext.Element.OFFSETS=3;Ext.Element.ASCLASS=4;Ext.Element.visibilityCls="x-hide-nosize";Ext.Element.addMethods(function(){var e=Ext.Element,p="opacity",j="visibility",g="display",d="hidden",n="offsets",k="asclass",m="none",a="nosize",b="originalDisplay",c="visibilityMode",h="isVisible",i=e.data,l=function(r){var q=i(r,b);if(q===undefined){i(r,b,q="")}return q},o=function(r){var q=i(r,c);if(q===undefined){i(r,c,q=1)}return q};return{originalDisplay:"",visibilityMode:1,setVisibilityMode:function(q){i(this.dom,c,q);return this},animate:function(r,t,s,u,q){this.anim(r,{duration:t,callback:s,easing:u},q);return this},anim:function(t,u,r,w,s,q){r=r||"run";u=u||{};var v=this,x=Ext.lib.Anim[r](v.dom,t,(u.duration||w)||0.35,(u.easing||s)||"easeOut",function(){if(q){q.call(v)}if(u.callback){u.callback.call(u.scope||v,v,u)}},v);u.anim=x;return x},preanim:function(q,r){return !q[r]?false:(typeof q[r]=="object"?q[r]:{duration:q[r+1],callback:q[r+2],easing:q[r+3]})},isVisible:function(){var q=this,s=q.dom,r=i(s,h);if(typeof r=="boolean"){return r}r=!q.isStyle(j,d)&&!q.isStyle(g,m)&&!((o(s)==e.ASCLASS)&&q.hasClass(q.visibilityCls||e.visibilityCls));i(s,h,r);return r},setVisible:function(t,q){var w=this,r,y,x,v,u=w.dom,s=o(u);if(typeof q=="string"){switch(q){case g:s=e.DISPLAY;break;case j:s=e.VISIBILITY;break;case n:s=e.OFFSETS;break;case a:case k:s=e.ASCLASS;break}w.setVisibilityMode(s);q=false}if(!q||!w.anim){if(s==e.ASCLASS){w[t?"removeClass":"addClass"](w.visibilityCls||e.visibilityCls)}else{if(s==e.DISPLAY){return w.setDisplayed(t)}else{if(s==e.OFFSETS){if(!t){w.hideModeStyles={position:w.getStyle("position"),top:w.getStyle("top"),left:w.getStyle("left")};w.applyStyles({position:"absolute",top:"-10000px",left:"-10000px"})}else{w.applyStyles(w.hideModeStyles||{position:"",top:"",left:""});delete w.hideModeStyles}}else{w.fixDisplay();u.style.visibility=t?"visible":d}}}}else{if(t){w.setOpacity(0.01);w.setVisible(true)}w.anim({opacity:{to:(t?1:0)}},w.preanim(arguments,1),null,0.35,"easeIn",function(){t||w.setVisible(false).setOpacity(1)})}i(u,h,t);return w},hasMetrics:function(){var q=this.dom;return this.isVisible()||(o(q)==e.VISIBILITY)},toggle:function(q){var r=this;r.setVisible(!r.isVisible(),r.preanim(arguments,0));return r},setDisplayed:function(q){if(typeof q=="boolean"){q=q?l(this.dom):m}this.setStyle(g,q);return this},fixDisplay:function(){var q=this;if(q.isStyle(g,m)){q.setStyle(j,d);q.setStyle(g,l(this.dom));if(q.isStyle(g,m)){q.setStyle(g,"block")}}},hide:function(q){if(typeof q=="string"){this.setVisible(false,q);return this}this.setVisible(false,this.preanim(arguments,0));return this},show:function(q){if(typeof q=="string"){this.setVisible(true,q);return this}this.setVisible(true,this.preanim(arguments,0));return this}}}());(function(){var y=null,A=undefined,k=true,t=false,j="setX",h="setY",a="setXY",n="left",l="bottom",s="top",m="right",q="height",g="width",i="points",w="hidden",z="absolute",u="visible",e="motion",o="position",r="easeOut",d=new Ext.Element.Flyweight(),v={},x=function(B){return B||{}},p=function(B){d.dom=B;d.id=Ext.id(B);return d},c=function(B){if(!v[B]){v[B]=[]}return v[B]},b=function(C,B){v[C]=B};Ext.enableFx=k;Ext.Fx={switchStatements:function(C,D,B){return D.apply(this,B[C])},slideIn:function(H,E){E=x(E);var J=this,G=J.dom,M=G.style,O,B,L,D,C,M,I,N,K,F;H=H||"t";J.queueFx(E,function(){O=p(G).getXY();p(G).fixDisplay();B=p(G).getFxRestore();L={x:O[0],y:O[1],0:O[0],1:O[1],width:G.offsetWidth,height:G.offsetHeight};L.right=L.x+L.width;L.bottom=L.y+L.height;p(G).setWidth(L.width).setHeight(L.height);D=p(G).fxWrap(B.pos,E,w);M.visibility=u;M.position=z;function P(){p(G).fxUnwrap(D,B.pos,E);M.width=B.width;M.height=B.height;p(G).afterFx(E)}N={to:[L.x,L.y]};K={to:L.width};F={to:L.height};function Q(U,R,V,S,X,Z,ac,ab,aa,W,T){var Y={};p(U).setWidth(V).setHeight(S);if(p(U)[X]){p(U)[X](Z)}R[ac]=R[ab]="0";if(aa){Y.width=aa}if(W){Y.height=W}if(T){Y.points=T}return Y}I=p(G).switchStatements(H.toLowerCase(),Q,{t:[D,M,L.width,0,y,y,n,l,y,F,y],l:[D,M,0,L.height,y,y,m,s,K,y,y],r:[D,M,L.width,L.height,j,L.right,n,s,y,y,N],b:[D,M,L.width,L.height,h,L.bottom,n,s,y,F,N],tl:[D,M,0,0,y,y,m,l,K,F,N],bl:[D,M,0,0,h,L.y+L.height,m,s,K,F,N],br:[D,M,0,0,a,[L.right,L.bottom],n,s,K,F,N],tr:[D,M,0,0,j,L.x+L.width,n,l,K,F,N]});M.visibility=u;p(D).show();arguments.callee.anim=p(D).fxanim(I,E,e,0.5,r,P)});return J},slideOut:function(F,D){D=x(D);var H=this,E=H.dom,K=E.style,L=H.getXY(),C,B,I,J,G={to:0};F=F||"t";H.queueFx(D,function(){B=p(E).getFxRestore();I={x:L[0],y:L[1],0:L[0],1:L[1],width:E.offsetWidth,height:E.offsetHeight};I.right=I.x+I.width;I.bottom=I.y+I.height;p(E).setWidth(I.width).setHeight(I.height);C=p(E).fxWrap(B.pos,D,u);K.visibility=u;K.position=z;p(C).setWidth(I.width).setHeight(I.height);function M(){D.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).fxUnwrap(C,B.pos,D);K.width=B.width;K.height=B.height;p(E).afterFx(D)}function N(O,W,U,X,S,V,R,T,Q){var P={};O[W]=O[U]="0";P[X]=S;if(V){P[V]=R}if(T){P[T]=Q}return P}J=p(E).switchStatements(F.toLowerCase(),N,{t:[K,n,l,q,G],l:[K,m,s,g,G],r:[K,n,s,g,G,i,{to:[I.right,I.y]}],b:[K,n,s,q,G,i,{to:[I.x,I.bottom]}],tl:[K,m,l,g,G,q,G],bl:[K,m,s,g,G,q,G,i,{to:[I.x,I.bottom]}],br:[K,n,s,g,G,q,G,i,{to:[I.x+I.width,I.bottom]}],tr:[K,n,l,g,G,q,G,i,{to:[I.right,I.y]}]});arguments.callee.anim=p(C).fxanim(J,D,e,0.5,r,M)});return H},puff:function(H){H=x(H);var F=this,G=F.dom,C=G.style,D,B,E;F.queueFx(H,function(){D=p(G).getWidth();B=p(G).getHeight();p(G).clearOpacity();p(G).show();E=p(G).getFxRestore();function I(){H.useDisplay?p(G).setDisplayed(t):p(G).hide();p(G).clearOpacity();p(G).setPositioning(E.pos);C.width=E.width;C.height=E.height;C.fontSize="";p(G).afterFx(H)}arguments.callee.anim=p(G).fxanim({width:{to:p(G).adjustWidth(D*2)},height:{to:p(G).adjustHeight(B*2)},points:{by:[-D*0.5,-B*0.5]},opacity:{to:0},fontSize:{to:200,unit:"%"}},H,e,0.5,r,I)});return F},switchOff:function(F){F=x(F);var D=this,E=D.dom,B=E.style,C;D.queueFx(F,function(){p(E).clearOpacity();p(E).clip();C=p(E).getFxRestore();function G(){F.useDisplay?p(E).setDisplayed(t):p(E).hide();p(E).clearOpacity();p(E).setPositioning(C.pos);B.width=C.width;B.height=C.height;p(E).afterFx(F)}p(E).fxanim({opacity:{to:0.3}},y,y,0.1,y,function(){p(E).clearOpacity();(function(){p(E).fxanim({height:{to:1},points:{by:[0,p(E).getHeight()*0.5]}},F,e,0.3,"easeIn",G)}).defer(100)})});return D},highlight:function(D,H){H=x(H);var F=this,G=F.dom,B=H.attr||"backgroundColor",C={},E;F.queueFx(H,function(){p(G).clearOpacity();p(G).show();function I(){G.style[B]=E;p(G).afterFx(H)}E=G.style[B];C[B]={from:D||"ffff9c",to:H.endColor||p(G).getColor(B)||"ffffff"};arguments.callee.anim=p(G).fxanim(C,H,"color",1,"easeIn",I)});return F},frame:function(B,E,H){H=x(H);var D=this,G=D.dom,C,F;D.queueFx(H,function(){B=B||"#C3DAF9";if(B.length==6){B="#"+B}E=E||1;p(G).show();var L=p(G).getXY(),J={x:L[0],y:L[1],0:L[0],1:L[1],width:G.offsetWidth,height:G.offsetHeight},I=function(){C=p(document.body||document.documentElement).createChild({style:{position:z,"z-index":35000,border:"0px solid "+B}});return C.queueFx({},K)};arguments.callee.anim={isAnimated:true,stop:function(){E=0;C.stopFx()}};function K(){var M=Ext.isBorderBox?2:1;F=C.anim({top:{from:J.y,to:J.y-20},left:{from:J.x,to:J.x-20},borderWidth:{from:0,to:10},opacity:{from:1,to:0},height:{from:J.height,to:J.height+20*M},width:{from:J.width,to:J.width+20*M}},{duration:H.duration||1,callback:function(){C.remove();--E>0?I():p(G).afterFx(H)}});arguments.callee.anim={isAnimated:true,stop:function(){F.stop()}}}I()});return D},pause:function(D){var C=this.dom,B;this.queueFx({},function(){B=setTimeout(function(){p(C).afterFx({})},D*1000);arguments.callee.anim={isAnimated:true,stop:function(){clearTimeout(B);p(C).afterFx({})}}});return this},fadeIn:function(D){D=x(D);var B=this,C=B.dom,E=D.endOpacity||1;B.queueFx(D,function(){p(C).setOpacity(0);p(C).fixDisplay();C.style.visibility=u;arguments.callee.anim=p(C).fxanim({opacity:{to:E}},D,y,0.5,r,function(){if(E==1){p(C).clearOpacity()}p(C).afterFx(D)})});return B},fadeOut:function(E){E=x(E);var C=this,D=C.dom,B=D.style,F=E.endOpacity||0;C.queueFx(E,function(){arguments.callee.anim=p(D).fxanim({opacity:{to:F}},E,y,0.5,r,function(){if(F==0){Ext.Element.data(D,"visibilityMode")==Ext.Element.DISPLAY||E.useDisplay?B.display="none":B.visibility=w;p(D).clearOpacity()}p(D).afterFx(E)})});return C},scale:function(B,C,D){this.shift(Ext.apply({},D,{width:B,height:C}));return this},shift:function(D){D=x(D);var C=this.dom,B={};this.queueFx(D,function(){for(var E in D){if(D[E]!=A){B[E]={to:D[E]}}}B.width?B.width.to=p(C).adjustWidth(D.width):B;B.height?B.height.to=p(C).adjustWidth(D.height):B;if(B.x||B.y||B.xy){B.points=B.xy||{to:[B.x?B.x.to:p(C).getX(),B.y?B.y.to:p(C).getY()]}}arguments.callee.anim=p(C).fxanim(B,D,e,0.35,r,function(){p(C).afterFx(D)})});return this},ghost:function(E,C){C=x(C);var G=this,D=G.dom,J=D.style,H={opacity:{to:0},points:{}},K=H.points,B,I,F;E=E||"b";G.queueFx(C,function(){B=p(D).getFxRestore();I=p(D).getWidth();F=p(D).getHeight();function L(){C.useDisplay?p(D).setDisplayed(t):p(D).hide();p(D).clearOpacity();p(D).setPositioning(B.pos);J.width=B.width;J.height=B.height;p(D).afterFx(C)}K.by=p(D).switchStatements(E.toLowerCase(),function(N,M){return[N,M]},{t:[0,-F],l:[-I,0],r:[I,0],b:[0,F],tl:[-I,-F],bl:[-I,F],br:[I,F],tr:[I,-F]});arguments.callee.anim=p(D).fxanim(H,C,e,0.5,r,L)});return G},syncFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:k,stopFx:t});return B},sequenceFx:function(){var B=this;B.fxDefaults=Ext.apply(B.fxDefaults||{},{block:t,concurrent:t,stopFx:t});return B},nextFx:function(){var B=c(this.dom.id)[0];if(B){B.call(this)}},hasActiveFx:function(){return c(this.dom.id)[0]},stopFx:function(B){var C=this,E=C.dom.id;if(C.hasActiveFx()){var D=c(E)[0];if(D&&D.anim){if(D.anim.isAnimated){b(E,[D]);D.anim.stop(B!==undefined?B:k)}else{b(E,[])}}}return C},beforeFx:function(B){if(this.hasActiveFx()&&!B.concurrent){if(B.stopFx){this.stopFx();return k}return t}return k},hasFxBlock:function(){var B=c(this.dom.id);return B&&B[0]&&B[0].block},queueFx:function(E,B){var C=p(this.dom);if(!C.hasFxBlock()){Ext.applyIf(E,C.fxDefaults);if(!E.concurrent){var D=C.beforeFx(E);B.block=E.block;c(C.dom.id).push(B);if(D){C.nextFx()}}else{B.call(C)}}return C},fxWrap:function(H,F,D){var E=this.dom,C,B;if(!F.wrap||!(C=Ext.getDom(F.wrap))){if(F.fixPosition){B=p(E).getXY()}var G=document.createElement("div");G.style.visibility=D;C=E.parentNode.insertBefore(G,E);p(C).setPositioning(H);if(p(C).isStyle(o,"static")){p(C).position("relative")}p(E).clearPositioning("auto");p(C).clip();C.appendChild(E);if(B){p(C).setXY(B)}}return C},fxUnwrap:function(C,F,E){var D=this.dom;p(D).clearPositioning();p(D).setPositioning(F);if(!E.wrap){var B=p(C).dom.parentNode;B.insertBefore(D,C);p(C).remove()}},getFxRestore:function(){var B=this.dom.style;return{pos:this.getPositioning(),width:B.width,height:B.height}},afterFx:function(C){var B=this.dom,D=B.id;if(C.afterStyle){p(B).setStyle(C.afterStyle)}if(C.afterCls){p(B).addClass(C.afterCls)}if(C.remove==k){p(B).remove()}if(C.callback){C.callback.call(C.scope,p(B))}if(!C.concurrent){c(D).shift();p(B).nextFx()}},fxanim:function(E,F,C,G,D,B){C=C||"run";F=F||{};var H=Ext.lib.Anim[C](this.dom,E,(F.duration||G)||0.35,(F.easing||D)||r,B,this);F.anim=H;return H}};Ext.Fx.resize=Ext.Fx.scale;Ext.Element.addMethods(Ext.Fx)})();Ext.CompositeElementLite=function(b,a){this.elements=[];this.add(b,a);this.el=new Ext.Element.Flyweight()};Ext.CompositeElementLite.prototype={isComposite:true,getElement:function(a){var b=this.el;b.dom=a;b.id=a.id;return b},transformElement:function(a){return Ext.getDom(a)},getCount:function(){return this.elements.length},add:function(d,b){var e=this,g=e.elements;if(!d){return this}if(typeof d=="string"){d=Ext.Element.selectorFunction(d,b)}else{if(d.isComposite){d=d.elements}else{if(!Ext.isIterable(d)){d=[d]}}}for(var c=0,a=d.length;c-1){c=Ext.getDom(c);if(a){g=this.elements[b];g.parentNode.insertBefore(c,g);Ext.removeNode(g)}this.elements.splice(b,1,c)}return this},clear:function(){this.elements=[]}};Ext.CompositeElementLite.prototype.on=Ext.CompositeElementLite.prototype.addListener;Ext.CompositeElementLite.importElementMethods=function(){var c,b=Ext.Element.prototype,a=Ext.CompositeElementLite.prototype;for(c in b){if(typeof b[c]=="function"){(function(d){a[d]=a[d]||function(){return this.invoke(d,arguments)}}).call(a,c)}}};Ext.CompositeElementLite.importElementMethods();if(Ext.DomQuery){Ext.Element.selectorFunction=Ext.DomQuery.select}Ext.Element.select=function(a,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;(function(){var b="beforerequest",e="requestcomplete",d="requestexception",h=undefined,c="load",i="POST",a="GET",g=window;Ext.data.Connection=function(j){Ext.apply(this,j);this.addEvents(b,e,d);Ext.data.Connection.superclass.constructor.call(this)};Ext.extend(Ext.data.Connection,Ext.util.Observable,{timeout:30000,autoAbort:false,disableCaching:true,disableCachingParam:"_dc",request:function(n){var s=this;if(s.fireEvent(b,s,n)){if(n.el){if(!Ext.isEmpty(n.indicatorText)){s.indicatorText='
    '+n.indicatorText+"
    "}if(s.indicatorText){Ext.getDom(n.el).innerHTML=s.indicatorText}n.success=(Ext.isFunction(n.success)?n.success:function(){}).createInterceptor(function(o){Ext.getDom(n.el).innerHTML=o.responseText})}var l=n.params,k=n.url||s.url,j,q={success:s.handleResponse,failure:s.handleFailure,scope:s,argument:{options:n},timeout:Ext.num(n.timeout,s.timeout)},m,t;if(Ext.isFunction(l)){l=l.call(n.scope||g,n)}l=Ext.urlEncode(s.extraParams,Ext.isObject(l)?Ext.urlEncode(l):l);if(Ext.isFunction(k)){k=k.call(n.scope||g,n)}if((m=Ext.getDom(n.form))){k=k||m.action;if(n.isUpload||(/multipart\/form-data/i.test(m.getAttribute("enctype")))){return s.doFormUpload.call(s,n,l,k)}t=Ext.lib.Ajax.serializeForm(m);l=l?(l+"&"+t):t}j=n.method||s.method||((l||n.xmlData||n.jsonData)?i:a);if(j===a&&(s.disableCaching&&n.disableCaching!==false)||n.disableCaching===true){var r=n.disableCachingParam||s.disableCachingParam;k=Ext.urlAppend(k,r+"="+(new Date().getTime()))}n.headers=Ext.applyIf(n.headers||{},s.defaultHeaders||{});if(n.autoAbort===true||s.autoAbort){s.abort()}if((j==a||n.xmlData||n.jsonData)&&l){k=Ext.urlAppend(k,l);l=""}return(s.transId=Ext.lib.Ajax.request(j,k,q,l,n))}else{return n.callback?n.callback.apply(n.scope,[n,h,h]):null}},isLoading:function(j){return j?Ext.lib.Ajax.isCallInProgress(j):!!this.transId},abort:function(j){if(j||this.isLoading()){Ext.lib.Ajax.abort(j||this.transId)}},handleResponse:function(j){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(e,this,j,k);if(k.success){k.success.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,true,j)}},handleFailure:function(j,l){this.transId=false;var k=j.argument.options;j.argument=k?k.argument:null;this.fireEvent(d,this,j,k,l);if(k.failure){k.failure.call(k.scope,j,k)}if(k.callback){k.callback.call(k.scope,k,false,j)}},doFormUpload:function(q,j,k){var l=Ext.id(),v=document,r=v.createElement("iframe"),m=Ext.getDom(q.form),u=[],t,p="multipart/form-data",n={target:m.target,method:m.method,encoding:m.encoding,enctype:m.enctype,action:m.action};Ext.fly(r).set({id:l,name:l,cls:"x-hidden",src:Ext.SSL_SECURE_URL});v.body.appendChild(r);if(Ext.isIE){document.frames[l].name=l}Ext.fly(m).set({target:l,method:i,enctype:p,encoding:p,action:k||n.action});Ext.iterate(Ext.urlDecode(j,false),function(w,o){t=v.createElement("input");Ext.fly(t).set({type:"hidden",value:o,name:w});m.appendChild(t);u.push(t)});function s(){var x=this,w={responseText:"",responseXML:null,argument:q.argument},A,z;try{A=r.contentWindow.document||r.contentDocument||g.frames[l].document;if(A){if(A.body){if(/textarea/i.test((z=A.body.firstChild||{}).tagName)){w.responseText=z.value}else{w.responseText=A.body.innerHTML}}w.responseXML=A.XMLDocument||A}}catch(y){}Ext.EventManager.removeListener(r,c,s,x);x.fireEvent(e,x,w,q);function o(D,C,B){if(Ext.isFunction(D)){D.apply(C,B)}}o(q.success,q.scope,[w,q]);o(q.callback,q.scope,[q,true,w]);if(!x.debugUploads){setTimeout(function(){Ext.removeNode(r)},100)}}Ext.EventManager.on(r,c,s,this);m.submit();Ext.fly(m).set(n);Ext.each(u,function(o){Ext.removeNode(o)})}})})();Ext.Ajax=new Ext.data.Connection({autoAbort:false,serializeForm:function(a){return Ext.lib.Ajax.serializeForm(a)}});Ext.util.JSON=new (function(){var useHasOwn=!!{}.hasOwnProperty,isNative=function(){var useNative=null;return function(){if(useNative===null){useNative=Ext.USE_NATIVE_JSON&&window.JSON&&JSON.toString()=="[object JSON]"}return useNative}}(),pad=function(n){return n<10?"0"+n:n},doDecode=function(json){return json?eval("("+json+")"):""},doEncode=function(o){if(!Ext.isDefined(o)||o===null){return"null"}else{if(Ext.isArray(o)){return encodeArray(o)}else{if(Ext.isDate(o)){return Ext.util.JSON.encodeDate(o)}else{if(Ext.isString(o)){return encodeString(o)}else{if(typeof o=="number"){return isFinite(o)?String(o):"null"}else{if(Ext.isBoolean(o)){return String(o)}else{var a=["{"],b,i,v;for(i in o){if(!o.getElementsByTagName){if(!useHasOwn||o.hasOwnProperty(i)){v=o[i];switch(typeof v){case"undefined":case"function":case"unknown":break;default:if(b){a.push(",")}a.push(doEncode(i),":",v===null?"null":doEncode(v));b=true}}}}a.push("}");return a.join("")}}}}}}},m={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},encodeString=function(s){if(/["\\\x00-\x1f]/.test(s)){return'"'+s.replace(/([\x00-\x1f\\"])/g,function(a,b){var c=m[b];if(c){return c}c=b.charCodeAt();return"\\u00"+Math.floor(c/16).toString(16)+(c%16).toString(16)})+'"'}return'"'+s+'"'},encodeArray=function(o){var a=["["],b,i,l=o.length,v;for(i=0;i
    ';e.body.appendChild(g);d=g.lastChild;if((c=e.defaultView)){if(c.getComputedStyle(g.firstChild.firstChild,null).marginRight!="0px"){b.correctRightMargin=false}if(c.getComputedStyle(d,null).backgroundColor!="transparent"){b.correctTransparentColor=false}}b.cssFloat=!!d.style.cssFloat;e.body.removeChild(g)};if(Ext.isReady){a()}else{Ext.onReady(a)}})();Ext.EventObject=function(){var b=Ext.lib.Event,c=/(dbl)?click/,a={3:13,63234:37,63235:39,63232:38,63233:40,63276:33,63277:34,63272:46,63273:36,63275:35},d=Ext.isIE?{1:0,4:1,2:2}:{0:0,1:1,2:2};Ext.EventObjectImpl=function(g){if(g){this.setEvent(g.browserEvent||g)}};Ext.EventObjectImpl.prototype={setEvent:function(h){var g=this;if(h==g||(h&&h.browserEvent)){return h}g.browserEvent=h;if(h){g.button=h.button?d[h.button]:(h.which?h.which-1:-1);if(c.test(h.type)&&g.button==-1){g.button=0}g.type=h.type;g.shiftKey=h.shiftKey;g.ctrlKey=h.ctrlKey||h.metaKey||false;g.altKey=h.altKey;g.keyCode=h.keyCode;g.charCode=h.charCode;g.target=b.getTarget(h);g.xy=b.getXY(h)}else{g.button=-1;g.shiftKey=false;g.ctrlKey=false;g.altKey=false;g.keyCode=0;g.charCode=0;g.target=null;g.xy=[0,0]}return g},stopEvent:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopEvent(e.browserEvent)}},preventDefault:function(){if(this.browserEvent){b.preventDefault(this.browserEvent)}},stopPropagation:function(){var e=this;if(e.browserEvent){if(e.browserEvent.type=="mousedown"){Ext.EventManager.stoppedMouseDownEvent.fire(e)}b.stopPropagation(e.browserEvent)}},getCharCode:function(){return this.charCode||this.keyCode},getKey:function(){return this.normalizeKey(this.keyCode||this.charCode)},normalizeKey:function(e){return Ext.isSafari?(a[e]||e):e},getPageX:function(){return this.xy[0]},getPageY:function(){return this.xy[1]},getXY:function(){return this.xy},getTarget:function(g,h,e){return g?Ext.fly(this.target).findParent(g,h,e):(e?Ext.get(this.target):this.target)},getRelatedTarget:function(){return this.browserEvent?b.getRelatedTarget(this.browserEvent):null},getWheelDelta:function(){var g=this.browserEvent;var h=0;if(g.wheelDelta){h=g.wheelDelta/120}else{if(g.detail){h=-g.detail/3}}return h},within:function(h,i,e){if(h){var g=this[i?"getRelatedTarget":"getTarget"]();return g&&((e?(g==Ext.getDom(h)):false)||Ext.fly(h).contains(g))}return false}};return new Ext.EventObjectImpl()}();Ext.Loader=Ext.apply({},{load:function(j,i,k,c){var k=k||this,g=document.getElementsByTagName("head")[0],b=document.createDocumentFragment(),a=j.length,h=0,e=this;var l=function(m){g.appendChild(e.buildScriptTag(j[m],d))};var d=function(){h++;if(a==h&&typeof i=="function"){i.call(k)}else{if(c===true){l(h)}}};if(c===true){l.call(this,0)}else{Ext.each(j,function(n,m){b.appendChild(this.buildScriptTag(n,d))},this);g.appendChild(b)}},buildScriptTag:function(b,c){var a=document.createElement("script");a.type="text/javascript";a.src=b;if(a.readyState){a.onreadystatechange=function(){if(a.readyState=="loaded"||a.readyState=="complete"){a.onreadystatechange=null;c()}}}else{a.onload=c}return a}});Ext.ns("Ext.grid","Ext.list","Ext.dd","Ext.tree","Ext.form","Ext.menu","Ext.state","Ext.layout.boxOverflow","Ext.app","Ext.ux","Ext.chart","Ext.direct","Ext.slider");Ext.apply(Ext,function(){var c=Ext,a=0,b=null;return{emptyFn:function(){},BLANK_IMAGE_URL:Ext.isIE6||Ext.isIE7||Ext.isAir?"http://www.extjs.com/s.gif":"data:image/gif;base64,R0lGODlhAQABAID/AMDAwAAAACH5BAEAAAAALAAAAAABAAEAAAICRAEAOw==",extendX:function(d,e){return Ext.extend(d,e(d.prototype))},getDoc:function(){return Ext.get(document)},num:function(e,d){e=Number(Ext.isEmpty(e)||Ext.isArray(e)||typeof e=="boolean"||(typeof e=="string"&&e.trim().length==0)?NaN:e);return isNaN(e)?d:e},value:function(g,d,e){return Ext.isEmpty(g,e)?d:g},escapeRe:function(d){return d.replace(/([-.*+?^${}()|[\]\/\\])/g,"\\$1")},sequence:function(h,d,g,e){h[d]=h[d].createSequence(g,e)},addBehaviors:function(i){if(!Ext.isReady){Ext.onReady(function(){Ext.addBehaviors(i)})}else{var e={},h,d,g;for(d in i){if((h=d.split("@"))[1]){g=h[0];if(!e[g]){e[g]=Ext.select(g)}e[g].on(h[1],i[d])}}e=null}},getScrollBarWidth:function(g){if(!Ext.isReady){return 0}if(g===true||b===null){var i=Ext.getBody().createChild('
    '),h=i.child("div",true);var e=h.offsetWidth;i.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=h.offsetWidth;i.remove();b=e-d+2}return b},combine:function(){var g=arguments,e=g.length,j=[];for(var h=0;hh?1:-1};Ext.each(d,function(h){g=e(g,h)==1?g:h});return g},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(g){e+=g});return e},partition:function(d,e){var g=[[],[]];Ext.each(d,function(j,k,h){g[(e&&e(j,k,h))||(!e&&j)?0:1].push(j)});return g},invoke:function(d,e){var h=[],g=Array.prototype.slice.call(arguments,2);Ext.each(d,function(j,k){if(j&&typeof j[e]=="function"){h.push(j[e].apply(j,g))}else{h.push(undefined)}});return h},pluck:function(d,g){var e=[];Ext.each(d,function(h){e.push(h[g])});return e},zip:function(){var n=Ext.partition(arguments,function(i){return typeof i!="function"}),k=n[0],m=n[1][0],d=Ext.max(Ext.pluck(k,"length")),h=[];for(var l=0;l=a.left&&b.right<=a.right&&b.top>=a.top&&b.bottom<=a.bottom)},getArea:function(){var a=this;return((a.bottom-a.top)*(a.right-a.left))},intersect:function(h){var g=this,d=Math.max(g.top,h.top),e=Math.min(g.right,h.right),a=Math.min(g.bottom,h.bottom),c=Math.max(g.left,h.left);if(a>=d&&e>=c){return new Ext.lib.Region(d,e,a,c)}},union:function(h){var g=this,d=Math.min(g.top,h.top),e=Math.max(g.right,h.right),a=Math.max(g.bottom,h.bottom),c=Math.min(g.left,h.left);return new Ext.lib.Region(d,e,a,c)},constrainTo:function(b){var a=this;a.top=a.top.constrain(b.top,b.bottom);a.bottom=a.bottom.constrain(b.top,b.bottom);a.left=a.left.constrain(b.left,b.right);a.right=a.right.constrain(b.left,b.right);return a},adjust:function(d,c,a,g){var e=this;e.top+=d;e.left+=c;e.right+=g;e.bottom+=a;return e}};Ext.lib.Region.getRegion=function(e){var h=Ext.lib.Dom.getXY(e),d=h[1],g=h[0]+e.offsetWidth,a=h[1]+e.offsetHeight,c=h[0];return new Ext.lib.Region(d,g,a,c)};Ext.lib.Point=function(a,c){if(Ext.isArray(a)){c=a[1];a=a[0]}var b=this;b.x=b.right=b.left=b[0]=a;b.y=b.top=b.bottom=b[1]=c};Ext.lib.Point.prototype=new Ext.lib.Region();Ext.apply(Ext.DomHelper,function(){var e,a="afterbegin",h="afterend",i="beforebegin",d="beforeend",b=/tag|children|cn|html$/i;function g(m,p,n,q,l,j){m=Ext.getDom(m);var k;if(e.useDom){k=c(p,null);if(j){m.appendChild(k)}else{(l=="firstChild"?m:m.parentNode).insertBefore(k,m[l]||m)}}else{k=Ext.DomHelper.insertHtml(q,m,Ext.DomHelper.createHtml(p))}return n?Ext.get(k,true):k}function c(j,r){var k,u=document,p,s,m,t;if(Ext.isArray(j)){k=u.createDocumentFragment();for(var q=0,n=j.length;q0){return setTimeout(d,c)}d();return 0},createSequence:function(c,b,a){if(!Ext.isFunction(b)){return c}else{return function(){var d=c.apply(this||window,arguments);b.apply(a||this||window,arguments);return d}}}};Ext.defer=Ext.util.Functions.defer;Ext.createInterceptor=Ext.util.Functions.createInterceptor;Ext.createSequence=Ext.util.Functions.createSequence;Ext.createDelegate=Ext.util.Functions.createDelegate;Ext.apply(Ext.util.Observable.prototype,function(){function a(j){var i=(this.methodEvents=this.methodEvents||{})[j],d,c,g,h=this;if(!i){this.methodEvents[j]=i={};i.originalFn=this[j];i.methodName=j;i.before=[];i.after=[];var b=function(l,k,e){if((c=l.apply(k||h,e))!==undefined){if(typeof c=="object"){if(c.returnValue!==undefined){d=c.returnValue}else{d=c}g=!!c.cancel}else{if(c===false){g=true}else{d=c}}}};this[j]=function(){var l=Array.prototype.slice.call(arguments,0),k;d=c=undefined;g=false;for(var m=0,e=i.before.length;m=525:!((Ext.isGecko&&!Ext.isWindows)||Ext.isOpera);return{_unload:function(){Ext.EventManager.un(window,"resize",this.fireWindowResize,this);c.call(Ext.EventManager)},doResizeEvent:function(){var m=a.getViewHeight(),l=a.getViewWidth();if(h!=m||i!=l){d.fire(i=l,h=m)}},onWindowResize:function(n,m,l){if(!d){d=new Ext.util.Event();k=new Ext.util.DelayedTask(this.doResizeEvent);Ext.EventManager.on(window,"resize",this.fireWindowResize,this)}d.addListener(n,m,l)},fireWindowResize:function(){if(d){k.delay(100)}},onTextResize:function(o,n,l){if(!g){g=new Ext.util.Event();var m=new Ext.Element(document.createElement("div"));m.dom.className="x-text-resize";m.dom.innerHTML="X";m.appendTo(document.body);b=m.dom.offsetHeight;setInterval(function(){if(m.dom.offsetHeight!=b){g.fire(b,b=m.dom.offsetHeight)}},this.textResizeInterval)}g.addListener(o,n,l)},removeResizeListener:function(m,l){if(d){d.removeListener(m,l)}},fireResize:function(){if(d){d.fire(a.getViewWidth(),a.getViewHeight())}},textResizeInterval:50,ieDeferSrc:false,getKeyEvent:function(){return e?"keydown":"keypress"},useKeydown:e}}());Ext.EventManager.on=Ext.EventManager.addListener;Ext.apply(Ext.EventObjectImpl.prototype,{BACKSPACE:8,TAB:9,NUM_CENTER:12,ENTER:13,RETURN:13,SHIFT:16,CTRL:17,CONTROL:17,ALT:18,PAUSE:19,CAPS_LOCK:20,ESC:27,SPACE:32,PAGE_UP:33,PAGEUP:33,PAGE_DOWN:34,PAGEDOWN:34,END:35,HOME:36,LEFT:37,UP:38,RIGHT:39,DOWN:40,PRINT_SCREEN:44,INSERT:45,DELETE:46,ZERO:48,ONE:49,TWO:50,THREE:51,FOUR:52,FIVE:53,SIX:54,SEVEN:55,EIGHT:56,NINE:57,A:65,B:66,C:67,D:68,E:69,F:70,G:71,H:72,I:73,J:74,K:75,L:76,M:77,N:78,O:79,P:80,Q:81,R:82,S:83,T:84,U:85,V:86,W:87,X:88,Y:89,Z:90,CONTEXT_MENU:93,NUM_ZERO:96,NUM_ONE:97,NUM_TWO:98,NUM_THREE:99,NUM_FOUR:100,NUM_FIVE:101,NUM_SIX:102,NUM_SEVEN:103,NUM_EIGHT:104,NUM_NINE:105,NUM_MULTIPLY:106,NUM_PLUS:107,NUM_MINUS:109,NUM_PERIOD:110,NUM_DIVISION:111,F1:112,F2:113,F3:114,F4:115,F5:116,F6:117,F7:118,F8:119,F9:120,F10:121,F11:122,F12:123,isNavKeyPress:function(){var b=this,a=this.normalizeKey(b.keyCode);return(a>=33&&a<=40)||a==b.RETURN||a==b.TAB||a==b.ESC},isSpecialKey:function(){var a=this.normalizeKey(this.keyCode);return(this.type=="keypress"&&this.ctrlKey)||this.isNavKeyPress()||(a==this.BACKSPACE)||(a>=16&&a<=20)||(a>=44&&a<=46)},getPoint:function(){return new Ext.lib.Point(this.xy[0],this.xy[1])},hasModifier:function(){return((this.ctrlKey||this.altKey)||this.shiftKey)}});Ext.Element.addMethods({swallowEvent:function(a,b){var d=this;function c(g){g.stopPropagation();if(b){g.preventDefault()}}if(Ext.isArray(a)){Ext.each(a,function(g){d.on(g,c)});return d}d.on(a,c);return d},relayEvent:function(a,b){this.on(a,function(c){b.fireEvent(a,c)})},clean:function(b){var d=this,e=d.dom,g=e.firstChild,c=-1;if(Ext.Element.data(e,"isCleaned")&&b!==true){return d}while(g){var a=g.nextSibling;if(g.nodeType==3&&!(/\S/.test(g.nodeValue))){e.removeChild(g)}else{g.nodeIndex=++c}g=a}Ext.Element.data(e,"isCleaned",true);return d},load:function(){var a=this.getUpdater();a.update.apply(a,arguments);return this},getUpdater:function(){return this.updateManager||(this.updateManager=new Ext.Updater(this))},update:function(html,loadScripts,callback){if(!this.dom){return this}html=html||"";if(loadScripts!==true){this.dom.innerHTML=html;if(typeof callback=="function"){callback()}return this}var id=Ext.id(),dom=this.dom;html+='';Ext.lib.Event.onAvailable(id,function(){var DOC=document,hd=DOC.getElementsByTagName("head")[0],re=/(?:]*)?>)((\n|\r|.)*?)(?:<\/script>)/ig,srcRe=/\ssrc=([\'\"])(.*?)\1/i,typeRe=/\stype=([\'\"])(.*?)\1/i,match,attrs,srcMatch,typeMatch,el,s;while((match=re.exec(html))){attrs=match[1];srcMatch=attrs?attrs.match(srcRe):false;if(srcMatch&&srcMatch[2]){s=DOC.createElement("script");s.src=srcMatch[2];typeMatch=attrs.match(typeRe);if(typeMatch&&typeMatch[2]){s.type=typeMatch[2]}hd.appendChild(s)}else{if(match[2]&&match[2].length>0){if(window.execScript){window.execScript(match[2])}else{window.eval(match[2])}}}}el=DOC.getElementById(id);if(el){Ext.removeNode(el)}if(typeof callback=="function"){callback()}});dom.innerHTML=html.replace(/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,"");return this},removeAllListeners:function(){this.removeAnchor();Ext.EventManager.removeAll(this.dom);return this},createProxy:function(a,e,d){a=(typeof a=="object")?a:{tag:"div",cls:a};var c=this,b=e?Ext.DomHelper.append(e,a,true):Ext.DomHelper.insertBefore(c.dom,a,true);if(d&&c.setBox&&c.getBox){b.setBox(c.getBox())}return b}});Ext.Element.prototype.getUpdateManager=Ext.Element.prototype.getUpdater;Ext.Element.addMethods({getAnchorXY:function(e,l,q){e=(e||"tl").toLowerCase();q=q||{};var k=this,b=k.dom==document.body||k.dom==document,n=q.width||b?Ext.lib.Dom.getViewWidth():k.getWidth(),i=q.height||b?Ext.lib.Dom.getViewHeight():k.getHeight(),p,a=Math.round,c=k.getXY(),m=k.getScroll(),j=b?m.left:!l?c[0]:0,g=b?m.top:!l?c[1]:0,d={c:[a(n*0.5),a(i*0.5)],t:[a(n*0.5),0],l:[0,a(i*0.5)],r:[n,a(i*0.5)],b:[a(n*0.5),i],tl:[0,0],bl:[0,i],br:[n,i],tr:[n,0]};p=d[e];return[p[0]+j,p[1]+g]},anchorTo:function(b,h,c,a,k,l){var i=this,e=i.dom,j=!Ext.isEmpty(k),d=function(){Ext.fly(e).alignTo(b,h,c,a);Ext.callback(l,Ext.fly(e))},g=this.getAnchor();this.removeAnchor();Ext.apply(g,{fn:d,scroll:j});Ext.EventManager.onWindowResize(d,null);if(j){Ext.EventManager.on(window,"scroll",d,null,{buffer:!isNaN(k)?k:50})}d.call(i);return i},removeAnchor:function(){var b=this,a=this.getAnchor();if(a&&a.fn){Ext.EventManager.removeResizeListener(a.fn);if(a.scroll){Ext.EventManager.un(window,"scroll",a.fn)}delete a.fn}return b},getAnchor:function(){var b=Ext.Element.data,c=this.dom;if(!c){return}var a=b(c,"_anchor");if(!a){a=b(c,"_anchor",{})}return a},getAlignToXY:function(g,A,B){g=Ext.get(g);if(!g||!g.dom){throw"Element.alignToXY with an element that doesn't exist"}B=B||[0,0];A=(!A||A=="?"?"tl-bl?":(!(/-/).test(A)&&A!==""?"tl-"+A:A||"tl-bl")).toLowerCase();var K=this,H=K.dom,M,L,n,l,s,F,v,t=Ext.lib.Dom.getViewWidth()-10,G=Ext.lib.Dom.getViewHeight()-10,b,i,j,k,u,z,N=document,J=N.documentElement,q=N.body,E=(J.scrollLeft||q.scrollLeft||0)+5,D=(J.scrollTop||q.scrollTop||0)+5,I=false,e="",a="",C=A.match(/^([a-z]+)-([a-z]+)(\?)?$/);if(!C){throw"Element.alignTo with an invalid alignment "+A}e=C[1];a=C[2];I=!!C[3];M=K.getAnchorXY(e,true);L=g.getAnchorXY(a,false);n=L[0]-M[0]+B[0];l=L[1]-M[1]+B[1];if(I){s=K.getWidth();F=K.getHeight();v=g.getRegion();b=e.charAt(0);i=e.charAt(e.length-1);j=a.charAt(0);k=a.charAt(a.length-1);u=((b=="t"&&j=="b")||(b=="b"&&j=="t"));z=((i=="r"&&k=="l")||(i=="l"&&k=="r"));if(n+s>t+E){n=z?v.left-s:t+E-s}if(nG+D){l=u?v.top-F:G+D-F}if(lB){p=B-q;m=true}if((o+C)>g){o=g-C;m=true}if(p"+String.format(Ext.Element.boxMarkup,c)+"
    "));Ext.DomQuery.selectNode("."+c+"-mc",d.dom).appendChild(this.dom);return d},setSize:function(e,c,d){var g=this;if(typeof e=="object"){c=e.height;e=e.width}e=g.adjustWidth(e);c=g.adjustHeight(c);if(!d||!g.anim){g.dom.style.width=g.addUnits(e);g.dom.style.height=g.addUnits(c)}else{g.anim({width:{to:e},height:{to:c}},g.preanim(arguments,2))}return g},getComputedHeight:function(){var d=this,c=Math.max(d.dom.offsetHeight,d.dom.clientHeight);if(!c){c=parseFloat(d.getStyle("height"))||0;if(!d.isBorderBox()){c+=d.getFrameWidth("tb")}}return c},getComputedWidth:function(){var c=Math.max(this.dom.offsetWidth,this.dom.clientWidth);if(!c){c=parseFloat(this.getStyle("width"))||0;if(!this.isBorderBox()){c+=this.getFrameWidth("lr")}}return c},getFrameWidth:function(d,c){return c&&this.isBorderBox()?0:(this.getPadding(d)+this.getBorderWidth(d))},addClassOnOver:function(c){this.hover(function(){Ext.fly(this,a).addClass(c)},function(){Ext.fly(this,a).removeClass(c)});return this},addClassOnFocus:function(c){this.on("focus",function(){Ext.fly(this,a).addClass(c)},this.dom);this.on("blur",function(){Ext.fly(this,a).removeClass(c)},this.dom);return this},addClassOnClick:function(c){var d=this.dom;this.on("mousedown",function(){Ext.fly(d,a).addClass(c);var g=Ext.getDoc(),e=function(){Ext.fly(d,a).removeClass(c);g.removeListener("mouseup",e)};g.on("mouseup",e)});return this},getViewSize:function(){var g=document,h=this.dom,c=(h==g||h==g.body);if(c){var e=Ext.lib.Dom;return{width:e.getViewWidth(),height:e.getViewHeight()}}else{return{width:h.clientWidth,height:h.clientHeight}}},getStyleSize:function(){var j=this,c,i,l=document,m=this.dom,e=(m==l||m==l.body),g=m.style;if(e){var k=Ext.lib.Dom;return{width:k.getViewWidth(),height:k.getViewHeight()}}if(g.width&&g.width!="auto"){c=parseFloat(g.width);if(j.isBorderBox()){c-=j.getFrameWidth("lr")}}if(g.height&&g.height!="auto"){i=parseFloat(g.height);if(j.isBorderBox()){i-=j.getFrameWidth("tb")}}return{width:c||j.getWidth(true),height:i||j.getHeight(true)}},getSize:function(c){return{width:this.getWidth(c),height:this.getHeight(c)}},repaint:function(){var c=this.dom;this.addClass("x-repaint");setTimeout(function(){Ext.fly(c).removeClass("x-repaint")},1);return this},unselectable:function(){this.dom.unselectable="on";return this.swallowEvent("selectstart",true).applyStyles("-moz-user-select:none;-khtml-user-select:none;").addClass("x-unselectable")},getMargins:function(d){var e=this,c,g={t:"top",l:"left",r:"right",b:"bottom"},h={};if(!d){for(c in e.margins){h[g[c]]=parseFloat(e.getStyle(e.margins[c]))||0}return h}else{return e.addStyles.call(e,d,e.margins)}}}}());Ext.Element.addMethods({setBox:function(e,g,b){var d=this,a=e.width,c=e.height;if((g&&!d.autoBoxAdjust)&&!d.isBorderBox()){a-=(d.getBorderWidth("lr")+d.getPadding("lr"));c-=(d.getBorderWidth("tb")+d.getPadding("tb"))}d.setBounds(e.x,e.y,a,c,d.animTest.call(d,arguments,b,2));return d},getBox:function(j,p){var m=this,v,e,o,d=m.getBorderWidth,q=m.getPadding,g,a,u,n;if(!p){v=m.getXY()}else{e=parseInt(m.getStyle("left"),10)||0;o=parseInt(m.getStyle("top"),10)||0;v=[e,o]}var c=m.dom,s=c.offsetWidth,i=c.offsetHeight,k;if(!j){k={x:v[0],y:v[1],0:v[0],1:v[1],width:s,height:i}}else{g=d.call(m,"l")+q.call(m,"l");a=d.call(m,"r")+q.call(m,"r");u=d.call(m,"t")+q.call(m,"t");n=d.call(m,"b")+q.call(m,"b");k={x:v[0]+g,y:v[1]+u,0:v[0]+g,1:v[1]+u,width:s-(g+a),height:i-(u+n)}}k.right=k.x+k.width;k.bottom=k.y+k.height;return k},move:function(j,b,c){var g=this,m=g.getXY(),k=m[0],i=m[1],d=[k-b,i],l=[k+b,i],h=[k,i-b],a=[k,i+b],e={l:d,left:d,r:l,right:l,t:h,top:h,up:h,b:a,bottom:a,down:a};j=j.toLowerCase();g.moveTo(e[j][0],e[j][1],g.animTest.call(g,arguments,c,2))},setLeftTop:function(d,c){var b=this,a=b.dom.style;a.left=b.addUnits(d);a.top=b.addUnits(c);return b},getRegion:function(){return Ext.lib.Dom.getRegion(this.dom)},setBounds:function(b,g,d,a,c){var e=this;if(!c||!e.anim){e.setSize(d,a);e.setLocation(b,g)}else{e.anim({points:{to:[b,g]},width:{to:e.adjustWidth(d)},height:{to:e.adjustHeight(a)}},e.preanim(arguments,4),"motion")}return e},setRegion:function(b,a){return this.setBounds(b.left,b.top,b.right-b.left,b.bottom-b.top,this.animTest.call(this,arguments,a,1))}});Ext.Element.addMethods({scrollTo:function(b,d,a){var e=/top/i.test(b),c=this,g=c.dom,h;if(!a||!c.anim){h="scroll"+(e?"Top":"Left");g[h]=d}else{h="scroll"+(e?"Left":"Top");c.anim({scroll:{to:e?[g[h],d]:[d,g[h]]}},c.preanim(arguments,2),"scroll")}return c},scrollIntoView:function(e,i){var p=Ext.getDom(e)||Ext.getBody().dom,h=this.dom,g=this.getOffsetsTo(p),k=g[0]+p.scrollLeft,u=g[1]+p.scrollTop,q=u+h.offsetHeight,d=k+h.offsetWidth,a=p.clientHeight,m=parseInt(p.scrollTop,10),s=parseInt(p.scrollLeft,10),j=m+a,n=s+p.clientWidth;if(h.offsetHeight>a||uj){p.scrollTop=q-a}}p.scrollTop=p.scrollTop;if(i!==false){if(h.offsetWidth>p.clientWidth||kn){p.scrollLeft=d-p.clientWidth}}p.scrollLeft=p.scrollLeft}return this},scrollChildIntoView:function(b,a){Ext.fly(b,"_scrollChildIntoView").scrollIntoView(this,a)},scroll:function(m,b,d){if(!this.isScrollable()){return false}var e=this.dom,g=e.scrollLeft,p=e.scrollTop,n=e.scrollWidth,k=e.scrollHeight,i=e.clientWidth,a=e.clientHeight,c=false,o,j={l:Math.min(g+b,n-i),r:o=Math.max(g-b,0),t:Math.max(p-b,0),b:Math.min(p+b,k-a)};j.d=j.b;j.u=j.t;m=m.substr(0,1);if((o=j[m])>-1){c=true;this.scrollTo(m=="l"||m=="r"?"left":"top",o,this.preanim(arguments,2))}return c}});Ext.Element.addMethods(function(){var d="visibility",b="display",a="hidden",h="none",c="x-masked",g="x-masked-relative",e=Ext.Element.data;return{isVisible:function(i){var j=!this.isStyle(d,a)&&!this.isStyle(b,h),k=this.dom.parentNode;if(i!==true||!j){return j}while(k&&!(/^body/i.test(k.tagName))){if(!Ext.fly(k,"_isVisible").isVisible()){return false}k=k.parentNode}return true},isDisplayed:function(){return !this.isStyle(b,h)},enableDisplayMode:function(i){this.setVisibilityMode(Ext.Element.DISPLAY);if(!Ext.isEmpty(i)){e(this.dom,"originalDisplay",i)}return this},mask:function(j,n){var p=this,l=p.dom,o=Ext.DomHelper,m="ext-el-mask-msg",i,q;if(!/^body/i.test(l.tagName)&&p.getStyle("position")=="static"){p.addClass(g)}if(i=e(l,"maskMsg")){i.remove()}if(i=e(l,"mask")){i.remove()}q=o.append(l,{cls:"ext-el-mask"},true);e(l,"mask",q);p.addClass(c);q.setDisplayed(true);if(typeof j=="string"){var k=o.append(l,{cls:m,cn:{tag:"div"}},true);e(l,"maskMsg",k);k.dom.className=n?m+" "+n:m;k.dom.firstChild.innerHTML=j;k.setDisplayed(true);k.center(p)}if(Ext.isIE&&!(Ext.isIE7&&Ext.isStrict)&&p.getStyle("height")=="auto"){q.setSize(undefined,p.getHeight())}return q},unmask:function(){var k=this,l=k.dom,i=e(l,"mask"),j=e(l,"maskMsg");if(i){if(j){j.remove();e(l,"maskMsg",undefined)}i.remove();e(l,"mask",undefined);k.removeClass([c,g])}},isMasked:function(){var i=e(this.dom,"mask");return i&&i.isVisible()},createShim:function(){var i=document.createElement("iframe"),j;i.frameBorder="0";i.className="ext-shim";i.src=Ext.SSL_SECURE_URL;j=Ext.get(this.dom.parentNode.insertBefore(i,this.dom));j.autoBoxAdjust=false;return j}}}());Ext.Element.addMethods({addKeyListener:function(b,d,c){var a;if(typeof b!="object"||Ext.isArray(b)){a={key:b,fn:d,scope:c}}else{a={key:b.key,shift:b.shift,ctrl:b.ctrl,alt:b.alt,fn:d,scope:c}}return new Ext.KeyMap(this,a)},addKeyMap:function(a){return new Ext.KeyMap(this,a)}});Ext.CompositeElementLite.importElementMethods();Ext.apply(Ext.CompositeElementLite.prototype,{addElements:function(c,a){if(!c){return this}if(typeof c=="string"){c=Ext.Element.selectorFunction(c,a)}var b=this.elements;Ext.each(c,function(d){b.push(Ext.get(d))});return this},first:function(){return this.item(0)},last:function(){return this.item(this.getCount()-1)},contains:function(a){return this.indexOf(a)!=-1},removeElement:function(d,e){var c=this,a=this.elements,b;Ext.each(d,function(g){if((b=(a[g]||a[g=c.indexOf(g)]))){if(e){if(b.dom){b.remove()}else{Ext.removeNode(b)}}a.splice(g,1)}});return this}});Ext.CompositeElement=Ext.extend(Ext.CompositeElementLite,{constructor:function(b,a){this.elements=[];this.add(b,a)},getElement:function(a){return a},transformElement:function(a){return Ext.get(a)}});Ext.Element.select=function(a,d,b){var c;if(typeof a=="string"){c=Ext.Element.selectorFunction(a,b)}else{if(a.length!==undefined){c=a}else{throw"Invalid selector"}}return(d===true)?new Ext.CompositeElement(c):new Ext.CompositeElementLite(c)};Ext.select=Ext.Element.select;Ext.UpdateManager=Ext.Updater=Ext.extend(Ext.util.Observable,function(){var b="beforeupdate",d="update",c="failure";function a(h){var i=this;i.transaction=null;if(h.argument.form&&h.argument.reset){try{h.argument.form.reset()}catch(j){}}if(i.loadScripts){i.renderer.render(i.el,h,i,g.createDelegate(i,[h]))}else{i.renderer.render(i.el,h,i);g.call(i,h)}}function g(h,i,j){this.fireEvent(i||d,this.el,h);if(Ext.isFunction(h.argument.callback)){h.argument.callback.call(h.argument.scope,this.el,Ext.isEmpty(j)?true:false,h,h.argument.options)}}function e(h){g.call(this,h,c,!!(this.transaction=null))}return{constructor:function(i,h){var j=this;i=Ext.get(i);if(!h&&i.updateManager){return i.updateManager}j.el=i;j.defaultUrl=null;j.addEvents(b,d,c);Ext.apply(j,Ext.Updater.defaults);j.transaction=null;j.refreshDelegate=j.refresh.createDelegate(j);j.updateDelegate=j.update.createDelegate(j);j.formUpdateDelegate=(j.formUpdate||function(){}).createDelegate(j);j.renderer=j.renderer||j.getDefaultRenderer();Ext.Updater.superclass.constructor.call(j)},setRenderer:function(h){this.renderer=h},getRenderer:function(){return this.renderer},getDefaultRenderer:function(){return new Ext.Updater.BasicRenderer()},setDefaultUrl:function(h){this.defaultUrl=h},getEl:function(){return this.el},update:function(i,n,p,l){var k=this,h,j;if(k.fireEvent(b,k.el,i,n)!==false){if(Ext.isObject(i)){h=i;i=h.url;n=n||h.params;p=p||h.callback;l=l||h.discardUrl;j=h.scope;if(!Ext.isEmpty(h.nocache)){k.disableCaching=h.nocache}if(!Ext.isEmpty(h.text)){k.indicatorText='
    '+h.text+"
    "}if(!Ext.isEmpty(h.scripts)){k.loadScripts=h.scripts}if(!Ext.isEmpty(h.timeout)){k.timeout=h.timeout}}k.showLoading();if(!l){k.defaultUrl=i}if(Ext.isFunction(i)){i=i.call(k)}var m=Ext.apply({},{url:i,params:(Ext.isFunction(n)&&j)?n.createDelegate(j):n,success:a,failure:e,scope:k,callback:undefined,timeout:(k.timeout*1000),disableCaching:k.disableCaching,argument:{options:h,url:i,form:null,callback:p,scope:j||window,params:n}},h);k.transaction=Ext.Ajax.request(m)}},formUpdate:function(k,h,j,l){var i=this;if(i.fireEvent(b,i.el,k,h)!==false){if(Ext.isFunction(h)){h=h.call(i)}k=Ext.getDom(k);i.transaction=Ext.Ajax.request({form:k,url:h,success:a,failure:e,scope:i,timeout:(i.timeout*1000),argument:{url:h,form:k,callback:l,reset:j}});i.showLoading.defer(1,i)}},startAutoRefresh:function(i,j,l,m,h){var k=this;if(h){k.update(j||k.defaultUrl,l,m,true)}if(k.autoRefreshProcId){clearInterval(k.autoRefreshProcId)}k.autoRefreshProcId=setInterval(k.update.createDelegate(k,[j||k.defaultUrl,l,m,true]),i*1000)},stopAutoRefresh:function(){if(this.autoRefreshProcId){clearInterval(this.autoRefreshProcId);delete this.autoRefreshProcId}},isAutoRefreshing:function(){return !!this.autoRefreshProcId},showLoading:function(){if(this.showLoadIndicator){this.el.dom.innerHTML=this.indicatorText}},abort:function(){if(this.transaction){Ext.Ajax.abort(this.transaction)}},isUpdating:function(){return this.transaction?Ext.Ajax.isLoading(this.transaction):false},refresh:function(h){if(this.defaultUrl){this.update(this.defaultUrl,null,h,true)}}}}());Ext.Updater.defaults={timeout:30,disableCaching:false,showLoadIndicator:true,indicatorText:'
    Loading...
    ',loadScripts:false,sslBlankUrl:Ext.SSL_SECURE_URL};Ext.Updater.updateElement=function(d,c,e,b){var a=Ext.get(d).getUpdater();Ext.apply(a,b);a.update(c,e,b?b.callback:null)};Ext.Updater.BasicRenderer=function(){};Ext.Updater.BasicRenderer.prototype={render:function(c,a,b,d){c.update(a.responseText,b.loadScripts,d)}};(function(){Date.useStrict=false;function b(d){var c=Array.prototype.slice.call(arguments,1);return d.replace(/\{(\d+)\}/g,function(e,g){return c[g]})}Date.formatCodeToRegex=function(d,c){var e=Date.parseCodes[d];if(e){e=typeof e=="function"?e():e;Date.parseCodes[d]=e}return e?Ext.applyIf({c:e.c?b(e.c,c||"{0}"):e.c},e):{g:0,c:null,s:Ext.escapeRe(d)}};var a=Date.formatCodeToRegex;Ext.apply(Date,{parseFunctions:{"M$":function(d,c){var e=new RegExp("\\/Date\\(([-+])?(\\d+)(?:[+-]\\d{4})?\\)\\/");var g=(d||"").match(e);return g?new Date(((g[1]||"")+g[2])*1):null}},parseRegexes:[],formatFunctions:{"M$":function(){return"\\/Date("+this.getTime()+")\\/"}},y2kYear:50,MILLI:"ms",SECOND:"s",MINUTE:"mi",HOUR:"h",DAY:"d",MONTH:"mo",YEAR:"y",defaults:{},dayNames:["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],monthNames:["January","February","March","April","May","June","July","August","September","October","November","December"],monthNumbers:{Jan:0,Feb:1,Mar:2,Apr:3,May:4,Jun:5,Jul:6,Aug:7,Sep:8,Oct:9,Nov:10,Dec:11},getShortMonthName:function(c){return Date.monthNames[c].substring(0,3)},getShortDayName:function(c){return Date.dayNames[c].substring(0,3)},getMonthNumber:function(c){return Date.monthNumbers[c.substring(0,1).toUpperCase()+c.substring(1,3).toLowerCase()]},formatContainsHourInfo:(function(){var d=/(\\.)/g,c=/([gGhHisucUOPZ]|M\$)/;return function(e){return c.test(e.replace(d,""))}})(),formatCodes:{d:"String.leftPad(this.getDate(), 2, '0')",D:"Date.getShortDayName(this.getDay())",j:"this.getDate()",l:"Date.dayNames[this.getDay()]",N:"(this.getDay() ? this.getDay() : 7)",S:"this.getSuffix()",w:"this.getDay()",z:"this.getDayOfYear()",W:"String.leftPad(this.getWeekOfYear(), 2, '0')",F:"Date.monthNames[this.getMonth()]",m:"String.leftPad(this.getMonth() + 1, 2, '0')",M:"Date.getShortMonthName(this.getMonth())",n:"(this.getMonth() + 1)",t:"this.getDaysInMonth()",L:"(this.isLeapYear() ? 1 : 0)",o:"(this.getFullYear() + (this.getWeekOfYear() == 1 && this.getMonth() > 0 ? +1 : (this.getWeekOfYear() >= 52 && this.getMonth() < 11 ? -1 : 0)))",Y:"String.leftPad(this.getFullYear(), 4, '0')",y:"('' + this.getFullYear()).substring(2, 4)",a:"(this.getHours() < 12 ? 'am' : 'pm')",A:"(this.getHours() < 12 ? 'AM' : 'PM')",g:"((this.getHours() % 12) ? this.getHours() % 12 : 12)",G:"this.getHours()",h:"String.leftPad((this.getHours() % 12) ? this.getHours() % 12 : 12, 2, '0')",H:"String.leftPad(this.getHours(), 2, '0')",i:"String.leftPad(this.getMinutes(), 2, '0')",s:"String.leftPad(this.getSeconds(), 2, '0')",u:"String.leftPad(this.getMilliseconds(), 3, '0')",O:"this.getGMTOffset()",P:"this.getGMTOffset(true)",T:"this.getTimezone()",Z:"(this.getTimezoneOffset() * -60)",c:function(){for(var k="Y-m-dTH:i:sP",h=[],g=0,d=k.length;g= 0 && y >= 0){","v = new Date(y < 100 ? 100 : y, 0, 1, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","v = !strict? v : (strict === true && (z <= 364 || (v.isLeapYear() && z <= 365))? v.add(Date.DAY, z) : null);","}else if(strict === true && !Date.isValid(y, m + 1, d, h, i, s, ms)){","v = null;","}else{","v = new Date(y < 100 ? 100 : y, m, d, h, i, s, ms).add(Date.YEAR, y < 100 ? y - 100 : 0);","}","}","}","if(v){","if(zz != null){","v = v.add(Date.SECOND, -v.getTimezoneOffset() * 60 - zz);","}else if(o){","v = v.add(Date.MINUTE, -v.getTimezoneOffset() + (sn == '+'? -1 : 1) * (hr * 60 + mn));","}","}","return v;"].join("\n");return function(m){var e=Date.parseRegexes.length,o=1,g=[],l=[],k=false,d="",j=0,h,n;for(;j Date.y2kYear ? 1900 + ty : 2000 + ty;\n",s:"(\\d{1,2})"},a:function(){return a("A")},A:{calcLast:true,g:1,c:"if (/(am)/i.test(results[{0}])) {\nif (!h || h == 12) { h = 0; }\n} else { if (!h || h < 12) { h = (h || 0) + 12; }}",s:"(AM|PM|am|pm)"},g:function(){return a("G")},G:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{1,2})"},h:function(){return a("H")},H:{g:1,c:"h = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},i:{g:1,c:"i = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},s:{g:1,c:"s = parseInt(results[{0}], 10);\n",s:"(\\d{2})"},u:{g:1,c:"ms = results[{0}]; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n",s:"(\\d+)"},O:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(3,5) / 60),","mn = o.substring(3,5) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{4})"},P:{g:1,c:["o = results[{0}];","var sn = o.substring(0,1),","hr = o.substring(1,3)*1 + Math.floor(o.substring(4,6) / 60),","mn = o.substring(4,6) % 60;","o = ((-12 <= (hr*60 + mn)/60) && ((hr*60 + mn)/60 <= 14))? (sn + String.leftPad(hr, 2, '0') + String.leftPad(mn, 2, '0')) : null;\n"].join("\n"),s:"([+-]\\d{2}:\\d{2})"},T:{g:0,c:null,s:"[A-Z]{1,4}"},Z:{g:1,c:"zz = results[{0}] * 1;\nzz = (-43200 <= zz && zz <= 50400)? zz : null;\n",s:"([+-]?\\d{1,5})"},c:function(){var e=[],c=[a("Y",1),a("m",2),a("d",3),a("h",4),a("i",5),a("s",6),{c:"ms = results[7] || '0'; ms = parseInt(ms, 10)/Math.pow(10, ms.length - 3);\n"},{c:["if(results[8]) {","if(results[8] == 'Z'){","zz = 0;","}else if (results[8].indexOf(':') > -1){",a("P",8).c,"}else{",a("O",8).c,"}","}"].join("\n")}];for(var g=0,d=c.length;g0?"-":"+")+String.leftPad(Math.floor(Math.abs(this.getTimezoneOffset())/60),2,"0")+(a?":":"")+String.leftPad(Math.abs(this.getTimezoneOffset()%60),2,"0")},getDayOfYear:function(){var b=0,e=this.clone(),a=this.getMonth(),c;for(c=0,e.setDate(1),e.setMonth(0);c28){a=Math.min(a,this.getFirstDateOfMonth().add("mo",c).getLastDateOfMonth().getDate())}e.setDate(a);e.setMonth(this.getMonth()+c);break;case Date.YEAR:e.setFullYear(this.getFullYear()+c);break}return e},between:function(c,a){var b=this.getTime();return c.getTime()<=b&&b<=a.getTime()}});Date.prototype.format=Date.prototype.dateFormat;if(Ext.isSafari&&(navigator.userAgent.match(/WebKit\/(\d+)/)[1]||NaN)<420){Ext.apply(Date.prototype,{_xMonth:Date.prototype.setMonth,_xDate:Date.prototype.setDate,setMonth:function(a){if(a<=-1){var d=Math.ceil(-a),c=Math.ceil(d/12),b=(d%12)?12-d%12:0;this.setFullYear(this.getFullYear()-c);return this._xMonth(b)}else{return this._xMonth(a)}},setDate:function(a){return this.setTime(this.getTime()-(this.getDate()-a)*86400000)}})}Ext.util.MixedCollection=function(b,a){this.items=[];this.map={};this.keys=[];this.length=0;this.addEvents("clear","add","replace","remove","sort");this.allowFunctions=b===true;if(a){this.getKey=a}Ext.util.MixedCollection.superclass.constructor.call(this)};Ext.extend(Ext.util.MixedCollection,Ext.util.Observable,{allowFunctions:false,add:function(b,c){if(arguments.length==1){c=arguments[0];b=this.getKey(c)}if(typeof b!="undefined"&&b!==null){var a=this.map[b];if(typeof a!="undefined"){return this.replace(b,c)}this.map[b]=c}this.length++;this.items.push(c);this.keys.push(b);this.fireEvent("add",this.length-1,c,b);return c},getKey:function(a){return a.id},replace:function(c,d){if(arguments.length==1){d=arguments[0];c=this.getKey(d)}var a=this.map[c];if(typeof c=="undefined"||c===null||typeof a=="undefined"){return this.add(c,d)}var b=this.indexOfKey(c);this.items[b]=d;this.map[c]=d;this.fireEvent("replace",c,a,d);return d},addAll:function(e){if(arguments.length>1||Ext.isArray(e)){var b=arguments.length>1?arguments:e;for(var d=0,a=b.length;d=this.length){return this.add(b,c)}this.length++;this.items.splice(a,0,c);if(typeof b!="undefined"&&b!==null){this.map[b]=c}this.keys.splice(a,0,b);this.fireEvent("add",a,c,b);return c},remove:function(a){return this.removeAt(this.indexOf(a))},removeAt:function(a){if(a=0){this.length--;var c=this.items[a];this.items.splice(a,1);var b=this.keys[a];if(typeof b!="undefined"){delete this.map[b]}this.keys.splice(a,1);this.fireEvent("remove",c,b);return c}return false},removeKey:function(a){return this.removeAt(this.indexOfKey(a))},getCount:function(){return this.length},indexOf:function(a){return this.items.indexOf(a)},indexOfKey:function(a){return this.keys.indexOf(a)},item:function(b){var a=this.map[b],c=a!==undefined?a:(typeof b=="number")?this.items[b]:undefined;return typeof c!="function"||this.allowFunctions?c:null},itemAt:function(a){return this.items[a]},key:function(a){return this.map[a]},contains:function(a){return this.indexOf(a)!=-1},containsKey:function(a){return typeof this.map[a]!="undefined"},clear:function(){this.length=0;this.items=[];this.keys=[];this.map={};this.fireEvent("clear")},first:function(){return this.items[0]},last:function(){return this.items[this.length-1]},_sort:function(k,a,j){var d,e,b=String(a).toUpperCase()=="DESC"?-1:1,h=[],l=this.keys,g=this.items;j=j||function(i,c){return i-c};for(d=0,e=g.length;de?1:(g=a;c--){d[d.length]=b[c]}}return d},filter:function(c,b,d,a){if(Ext.isEmpty(b,false)){return this.clone()}b=this.createValueMatcher(b,d,a);return this.filterBy(function(e){return e&&b.test(e[c])})},filterBy:function(g,e){var h=new Ext.util.MixedCollection();h.getKey=this.getKey;var b=this.keys,d=this.items;for(var c=0,a=d.length;c]+>/gi,stripScriptsRe=/(?:)((\n|\r|.)*?)(?:<\/script>)/ig,nl2brRe=/\r?\n/g;return{ellipsis:function(value,len,word){if(value&&value.length>len){if(word){var vs=value.substr(0,len-2),index=Math.max(vs.lastIndexOf(" "),vs.lastIndexOf("."),vs.lastIndexOf("!"),vs.lastIndexOf("?"));if(index==-1||index<(len-15)){return value.substr(0,len-3)+"..."}else{return vs.substr(0,index)+"..."}}else{return value.substr(0,len-3)+"..."}}return value},undef:function(value){return value!==undefined?value:""},defaultValue:function(value,defaultValue){return value!==undefined&&value!==""?value:defaultValue},htmlEncode:function(value){return !value?value:String(value).replace(/&/g,"&").replace(/>/g,">").replace(/").replace(/</g,"<").replace(/"/g,'"').replace(/&/g,"&")},trim:function(value){return String(value).replace(trimRe,"")},substr:function(value,start,length){return String(value).substr(start,length)},lowercase:function(value){return String(value).toLowerCase()},uppercase:function(value){return String(value).toUpperCase()},capitalize:function(value){return !value?value:value.charAt(0).toUpperCase()+value.substr(1).toLowerCase()},call:function(value,fn){if(arguments.length>2){var args=Array.prototype.slice.call(arguments,2);args.unshift(value);return eval(fn).apply(window,args)}else{return eval(fn).call(window,value)}},usMoney:function(v){v=(Math.round((v-0)*100))/100;v=(v==Math.floor(v))?v+".00":((v*10==Math.floor(v*10))?v+"0":v);v=String(v);var ps=v.split("."),whole=ps[0],sub=ps[1]?"."+ps[1]:".00",r=/(\d+)(\d{3})/;while(r.test(whole)){whole=whole.replace(r,"$1,$2")}v=whole+sub;if(v.charAt(0)=="-"){return"-$"+v.substr(1)}return"$"+v},date:function(v,format){if(!v){return""}if(!Ext.isDate(v)){v=new Date(Date.parse(v))}return v.dateFormat(format||"m/d/Y")},dateRenderer:function(format){return function(v){return Ext.util.Format.date(v,format)}},stripTags:function(v){return !v?v:String(v).replace(stripTagsRE,"")},stripScripts:function(v){return !v?v:String(v).replace(stripScriptsRe,"")},fileSize:function(size){if(size<1024){return size+" bytes"}else{if(size<1048576){return(Math.round(((size*10)/1024))/10)+" KB"}else{return(Math.round(((size*10)/1048576))/10)+" MB"}}},math:function(){var fns={};return function(v,a){if(!fns[a]){fns[a]=new Function("v","return v "+a+";")}return fns[a](v)}}(),round:function(value,precision){var result=Number(value);if(typeof precision=="number"){precision=Math.pow(10,precision);result=Math.round(value*precision)/precision}return result},number:function(v,format){if(!format){return v}v=Ext.num(v,NaN);if(isNaN(v)){return""}var comma=",",dec=".",i18n=false,neg=v<0;v=Math.abs(v);if(format.substr(format.length-2)=="/i"){format=format.substr(0,format.length-2);i18n=true;comma=".";dec=","}var hasComma=format.indexOf(comma)!=-1,psplit=(i18n?format.replace(/[^\d\,]/g,""):format.replace(/[^\d\.]/g,"")).split(dec);if(1")}}}();Ext.XTemplate=function(){Ext.XTemplate.superclass.constructor.apply(this,arguments);var y=this,j=y.html,q=/]*>((?:(?=([^<]+))\2|<(?!tpl\b[^>]*>))*?)<\/tpl>/,d=/^]*?for="(.*?)"/,v=/^]*?if="(.*?)"/,x=/^]*?exec="(.*?)"/,r,p=0,k=[],o="values",w="parent",l="xindex",n="xcount",e="return ",c="with(values){ ";j=["",j,""].join("");while((r=j.match(q))){var b=r[0].match(d),a=r[0].match(v),A=r[0].match(x),g=null,h=null,t=null,z=b&&b[1]?b[1]:"";if(a){g=a&&a[1]?a[1]:null;if(g){h=new Function(o,w,l,n,c+e+(Ext.util.Format.htmlDecode(g))+"; }")}}if(A){g=A&&A[1]?A[1]:null;if(g){t=new Function(o,w,l,n,c+(Ext.util.Format.htmlDecode(g))+"; }")}}if(z){switch(z){case".":z=new Function(o,w,c+e+o+"; }");break;case"..":z=new Function(o,w,c+e+w+"; }");break;default:z=new Function(o,w,c+e+z+"; }")}}k.push({id:p,target:z,exec:t,test:h,body:r[1]||""});j=j.replace(r[0],"{xtpl"+p+"}");++p}for(var u=k.length-1;u>=0;--u){y.compileTpl(k[u])}y.master=k[k.length-1];y.tpls=k};Ext.extend(Ext.XTemplate,Ext.Template,{re:/\{([\w\-\.\#]+)(?:\:([\w\.]*)(?:\((.*?)?\))?)?(\s?[\+\-\*\\]\s?[\d\.\+\-\*\\\(\)]+)?\}/g,codeRe:/\{\[((?:\\\]|.|\n)*?)\]\}/g,applySubTemplate:function(a,k,j,d,c){var h=this,g,m=h.tpls[a],l,b=[];if((m.test&&!m.test.call(h,k,j,d,c))||(m.exec&&m.exec.call(h,k,j,d,c))){return""}l=m.target?m.target.call(h,k,j):k;g=l.length;j=m.target?k:j;if(m.target&&Ext.isArray(l)){for(var e=0,g=l.length;e=0;--g){d[k[g].selectorText.toLowerCase()]=k[g]}}catch(i){}},getRules:function(h){if(d===null||h){d={};var k=c.styleSheets;for(var j=0,g=k.length;j=37&&a<=40){b.stopEvent()}},destroy:function(){this.disable()},enable:function(){if(this.disabled){if(Ext.isSafari2){this.el.on("keyup",this.stopKeyUp,this)}this.el.on(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=false}},disable:function(){if(!this.disabled){if(Ext.isSafari2){this.el.un("keyup",this.stopKeyUp,this)}this.el.un(this.isKeydown()?"keydown":"keypress",this.relay,this);this.disabled=true}},setDisabled:function(a){this[a?"disable":"enable"]()},isKeydown:function(){return this.forceKeyDown||Ext.EventManager.useKeydown}};Ext.KeyMap=function(c,b,a){this.el=Ext.get(c);this.eventName=a||"keydown";this.bindings=[];if(b){this.addBinding(b)}this.enable()};Ext.KeyMap.prototype={stopEvent:false,addBinding:function(b){if(Ext.isArray(b)){Ext.each(b,function(j){this.addBinding(j)},this);return}var k=b.key,g=b.fn||b.handler,l=b.scope;if(b.stopEvent){this.stopEvent=b.stopEvent}if(typeof k=="string"){var h=[];var e=k.toUpperCase();for(var c=0,d=e.length;c2)?a[2]:null;var h=(i>3)?a[3]:"/";var d=(i>4)?a[4]:null;var g=(i>5)?a[5]:false;document.cookie=c+"="+escape(e)+((b===null)?"":("; expires="+b.toGMTString()))+((h===null)?"":("; path="+h))+((d===null)?"":("; domain="+d))+((g===true)?"; secure":"")},get:function(d){var b=d+"=";var g=b.length;var a=document.cookie.length;var e=0;var c=0;while(e0){return this.ownerCt.items.itemAt(a-1)}}return null},getBubbleTarget:function(){return this.ownerCt}});Ext.reg("component",Ext.Component);Ext.Action=Ext.extend(Object,{constructor:function(a){this.initialConfig=a;this.itemId=a.itemId=(a.itemId||a.id||Ext.id());this.items=[]},isAction:true,setText:function(a){this.initialConfig.text=a;this.callEach("setText",[a])},getText:function(){return this.initialConfig.text},setIconClass:function(a){this.initialConfig.iconCls=a;this.callEach("setIconClass",[a])},getIconClass:function(){return this.initialConfig.iconCls},setDisabled:function(a){this.initialConfig.disabled=a;this.callEach("setDisabled",[a])},enable:function(){this.setDisabled(false)},disable:function(){this.setDisabled(true)},isDisabled:function(){return this.initialConfig.disabled},setHidden:function(a){this.initialConfig.hidden=a;this.callEach("setVisible",[!a])},show:function(){this.setHidden(false)},hide:function(){this.setHidden(true)},isHidden:function(){return this.initialConfig.hidden},setHandler:function(b,a){this.initialConfig.handler=b;this.initialConfig.scope=a;this.callEach("setHandler",[b,a])},each:function(b,a){Ext.each(this.items,b,a)},callEach:function(e,b){var d=this.items;for(var c=0,a=d.length;cj+o.left){k=j-l-c;g=true}if((i+e)>d+o.top){i=d-e-c;g=true}if(k=m){i=m-e-5}}n=[k,i];this.storeXY(n);a.setXY.call(this,n);this.sync()}}return this},getConstrainOffset:function(){return this.shadowOffset},isVisible:function(){return this.visible},showAction:function(){this.visible=true;if(this.useDisplay===true){this.setDisplayed("")}else{if(this.lastXY){a.setXY.call(this,this.lastXY)}else{if(this.lastLT){a.setLeftTop.call(this,this.lastLT[0],this.lastLT[1])}}}},hideAction:function(){this.visible=false;if(this.useDisplay===true){this.setDisplayed(false)}else{this.setLeftTop(-10000,-10000)}},setVisible:function(i,h,k,l,j){if(i){this.showAction()}if(h&&i){var g=function(){this.sync(true);if(l){l()}}.createDelegate(this);a.setVisible.call(this,true,true,k,g,j)}else{if(!i){this.hideUnders(true)}var g=l;if(h){g=function(){this.hideAction();if(l){l()}}.createDelegate(this)}a.setVisible.call(this,i,h,k,g,j);if(i){this.sync(true)}else{if(!h){this.hideAction()}}}return this},storeXY:function(c){delete this.lastLT;this.lastXY=c},storeLeftTop:function(d,c){delete this.lastXY;this.lastLT=[d,c]},beforeFx:function(){this.beforeAction();return Ext.Layer.superclass.beforeFx.apply(this,arguments)},afterFx:function(){Ext.Layer.superclass.afterFx.apply(this,arguments);this.sync(this.isVisible())},beforeAction:function(){if(!this.updating&&this.shadow){this.shadow.hide()}},setLeft:function(c){this.storeLeftTop(c,this.getTop(true));a.setLeft.apply(this,arguments);this.sync();return this},setTop:function(c){this.storeLeftTop(this.getLeft(true),c);a.setTop.apply(this,arguments);this.sync();return this},setLeftTop:function(d,c){this.storeLeftTop(d,c);a.setLeftTop.apply(this,arguments);this.sync();return this},setXY:function(j,h,k,l,i){this.fixDisplay();this.beforeAction();this.storeXY(j);var g=this.createCB(l);a.setXY.call(this,j,h,k,g,i);if(!h){g()}return this},createCB:function(e){var d=this;return function(){d.constrainXY();d.sync(true);if(e){e()}}},setX:function(g,h,j,k,i){this.setXY([g,this.getY()],h,j,k,i);return this},setY:function(k,g,i,j,h){this.setXY([this.getX(),k],g,i,j,h);return this},setSize:function(j,k,i,m,n,l){this.beforeAction();var g=this.createCB(n);a.setSize.call(this,j,k,i,m,g,l);if(!i){g()}return this},setWidth:function(i,h,k,l,j){this.beforeAction();var g=this.createCB(l);a.setWidth.call(this,i,h,k,g,j);if(!h){g()}return this},setHeight:function(j,i,l,m,k){this.beforeAction();var g=this.createCB(m);a.setHeight.call(this,j,i,l,g,k);if(!i){g()}return this},setBounds:function(o,m,p,i,n,k,l,j){this.beforeAction();var g=this.createCB(l);if(!n){this.storeXY([o,m]);a.setXY.call(this,[o,m]);a.setSize.call(this,p,i,n,k,g,j);g()}else{a.setBounds.call(this,o,m,p,i,n,k,g,j)}return this},setZIndex:function(c){this.zindex=c;this.setStyle("z-index",c+2);if(this.shadow){this.shadow.setZIndex(c+1)}if(this.shim){this.shim.setStyle("z-index",c)}return this}})})();Ext.Shadow=function(d){Ext.apply(this,d);if(typeof this.mode!="string"){this.mode=this.defaultMode}var e=this.offset,c={h:0},b=Math.floor(this.offset/2);switch(this.mode.toLowerCase()){case"drop":c.w=0;c.l=c.t=e;c.t-=1;if(Ext.isIE){c.l-=this.offset+b;c.t-=this.offset+b;c.w-=b;c.h-=b;c.t+=1}break;case"sides":c.w=(e*2);c.l=-e;c.t=e-1;if(Ext.isIE){c.l-=(this.offset-b);c.t-=this.offset+b;c.l+=1;c.w-=(this.offset-b)*2;c.w-=b+1;c.h-=1}break;case"frame":c.w=c.h=(e*2);c.l=c.t=-e;c.t+=1;c.h-=2;if(Ext.isIE){c.l-=(this.offset-b);c.t-=(this.offset-b);c.l+=1;c.w-=(this.offset+b+1);c.h-=(this.offset+b);c.h+=1}break}this.adjusts=c};Ext.Shadow.prototype={offset:4,defaultMode:"drop",show:function(a){a=Ext.get(a);if(!this.el){this.el=Ext.Shadow.Pool.pull();if(this.el.dom.nextSibling!=a.dom){this.el.insertBefore(a)}}this.el.setStyle("z-index",this.zIndex||parseInt(a.getStyle("z-index"),10)-1);if(Ext.isIE){this.el.dom.style.filter="progid:DXImageTransform.Microsoft.alpha(opacity=50) progid:DXImageTransform.Microsoft.Blur(pixelradius="+(this.offset)+")"}this.realign(a.getLeft(true),a.getTop(true),a.getWidth(),a.getHeight());this.el.dom.style.display="block"},isVisible:function(){return this.el?true:false},realign:function(b,r,q,g){if(!this.el){return}var n=this.adjusts,k=this.el.dom,u=k.style,i=0,p=(q+n.w),e=(g+n.h),j=p+"px",o=e+"px",m,c;u.left=(b+n.l)+"px";u.top=(r+n.t)+"px";if(u.width!=j||u.height!=o){u.width=j;u.height=o;if(!Ext.isIE){m=k.childNodes;c=Math.max(0,(p-12))+"px";m[0].childNodes[1].style.width=c;m[1].childNodes[1].style.width=c;m[2].childNodes[1].style.width=c;m[1].style.height=Math.max(0,(e-12))+"px"}}},hide:function(){if(this.el){this.el.dom.style.display="none";Ext.Shadow.Pool.push(this.el);delete this.el}},setZIndex:function(a){this.zIndex=a;if(this.el){this.el.setStyle("z-index",a)}}};Ext.Shadow.Pool=function(){var b=[],a=Ext.isIE?'
    ':'
    ';return{pull:function(){var c=b.shift();if(!c){c=Ext.get(Ext.DomHelper.insertHtml("beforeBegin",document.body.firstChild,a));c.autoBoxAdjust=false}return c},push:function(c){b.push(c)}}}();Ext.BoxComponent=Ext.extend(Ext.Component,{initComponent:function(){Ext.BoxComponent.superclass.initComponent.call(this);this.addEvents("resize","move")},boxReady:false,deferHeight:false,setSize:function(b,d){if(typeof b=="object"){d=b.height;b=b.width}if(Ext.isDefined(b)&&Ext.isDefined(this.boxMinWidth)&&(bthis.boxMaxWidth)){b=this.boxMaxWidth}if(Ext.isDefined(d)&&Ext.isDefined(this.boxMaxHeight)&&(d>this.boxMaxHeight)){d=this.boxMaxHeight}if(!this.boxReady){this.width=b;this.height=d;return this}if(this.cacheSizes!==false&&this.lastSize&&this.lastSize.width==b&&this.lastSize.height==d){return this}this.lastSize={width:b,height:d};var c=this.adjustSize(b,d),g=c.width,a=c.height,e;if(g!==undefined||a!==undefined){e=this.getResizeEl();if(!this.deferHeight&&g!==undefined&&a!==undefined){e.setSize(g,a)}else{if(!this.deferHeight&&a!==undefined){e.setHeight(a)}else{if(g!==undefined){e.setWidth(g)}}}this.onResize(g,a,b,d);this.fireEvent("resize",this,g,a,b,d)}return this},setWidth:function(a){return this.setSize(a)},setHeight:function(a){return this.setSize(undefined,a)},getSize:function(){return this.getResizeEl().getSize()},getWidth:function(){return this.getResizeEl().getWidth()},getHeight:function(){return this.getResizeEl().getHeight()},getOuterSize:function(){var a=this.getResizeEl();return{width:a.getWidth()+a.getMargins("lr"),height:a.getHeight()+a.getMargins("tb")}},getPosition:function(a){var b=this.getPositionEl();if(a===true){return[b.getLeft(true),b.getTop(true)]}return this.xy||b.getXY()},getBox:function(a){var c=this.getPosition(a);var b=this.getSize();b.x=c[0];b.y=c[1];return b},updateBox:function(a){this.setSize(a.width,a.height);this.setPagePosition(a.x,a.y);return this},getResizeEl:function(){return this.resizeEl||this.el},setAutoScroll:function(a){if(this.rendered){this.getContentTarget().setOverflow(a?"auto":"")}this.autoScroll=a;return this},setPosition:function(a,g){if(a&&typeof a[1]=="number"){g=a[1];a=a[0]}this.x=a;this.y=g;if(!this.boxReady){return this}var b=this.adjustPosition(a,g);var e=b.x,d=b.y;var c=this.getPositionEl();if(e!==undefined||d!==undefined){if(e!==undefined&&d!==undefined){c.setLeftTop(e,d)}else{if(e!==undefined){c.setLeft(e)}else{if(d!==undefined){c.setTop(d)}}}this.onPosition(e,d);this.fireEvent("move",this,e,d)}return this},setPagePosition:function(a,c){if(a&&typeof a[1]=="number"){c=a[1];a=a[0]}this.pageX=a;this.pageY=c;if(!this.boxReady){return}if(a===undefined||c===undefined){return}var b=this.getPositionEl().translatePoints(a,c);this.setPosition(b.left,b.top);return this},afterRender:function(){Ext.BoxComponent.superclass.afterRender.call(this);if(this.resizeEl){this.resizeEl=Ext.get(this.resizeEl)}if(this.positionEl){this.positionEl=Ext.get(this.positionEl)}this.boxReady=true;Ext.isDefined(this.autoScroll)&&this.setAutoScroll(this.autoScroll);this.setSize(this.width,this.height);if(this.x||this.y){this.setPosition(this.x,this.y)}else{if(this.pageX||this.pageY){this.setPagePosition(this.pageX,this.pageY)}}},syncSize:function(){delete this.lastSize;this.setSize(this.autoWidth?undefined:this.getResizeEl().getWidth(),this.autoHeight?undefined:this.getResizeEl().getHeight());return this},onResize:function(d,b,a,c){},onPosition:function(a,b){},adjustSize:function(a,b){if(this.autoWidth){a="auto"}if(this.autoHeight){b="auto"}return{width:a,height:b}},adjustPosition:function(a,b){return{x:a,y:b}}});Ext.reg("box",Ext.BoxComponent);Ext.Spacer=Ext.extend(Ext.BoxComponent,{autoEl:"div"});Ext.reg("spacer",Ext.Spacer);Ext.SplitBar=function(c,e,b,d,a){this.el=Ext.get(c,true);this.el.dom.unselectable="on";this.resizingEl=Ext.get(e,true);this.orientation=b||Ext.SplitBar.HORIZONTAL;this.minSize=0;this.maxSize=2000;this.animate=false;this.useShim=false;this.shim=null;if(!a){this.proxy=Ext.SplitBar.createProxy(this.orientation)}else{this.proxy=Ext.get(a).dom}this.dd=new Ext.dd.DDProxy(this.el.dom.id,"XSplitBars",{dragElId:this.proxy.id});this.dd.b4StartDrag=this.onStartProxyDrag.createDelegate(this);this.dd.endDrag=this.onEndProxyDrag.createDelegate(this);this.dragSpecs={};this.adapter=new Ext.SplitBar.BasicLayoutAdapter();this.adapter.init(this);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.placement=d||(this.el.getX()>this.resizingEl.getX()?Ext.SplitBar.LEFT:Ext.SplitBar.RIGHT);this.el.addClass("x-splitbar-h")}else{this.placement=d||(this.el.getY()>this.resizingEl.getY()?Ext.SplitBar.TOP:Ext.SplitBar.BOTTOM);this.el.addClass("x-splitbar-v")}this.addEvents("resize","moved","beforeresize","beforeapply");Ext.SplitBar.superclass.constructor.call(this)};Ext.extend(Ext.SplitBar,Ext.util.Observable,{onStartProxyDrag:function(a,e){this.fireEvent("beforeresize",this);this.overlay=Ext.DomHelper.append(document.body,{cls:"x-drag-overlay",html:" "},true);this.overlay.unselectable();this.overlay.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.overlay.show();Ext.get(this.proxy).setDisplayed("block");var c=this.adapter.getElementSize(this);this.activeMinSize=this.getMinimumSize();this.activeMaxSize=this.getMaximumSize();var d=c-this.activeMinSize;var b=Math.max(this.activeMaxSize-c,0);if(this.orientation==Ext.SplitBar.HORIZONTAL){this.dd.resetConstraints();this.dd.setXConstraint(this.placement==Ext.SplitBar.LEFT?d:b,this.placement==Ext.SplitBar.LEFT?b:d,this.tickSize);this.dd.setYConstraint(0,0)}else{this.dd.resetConstraints();this.dd.setXConstraint(0,0);this.dd.setYConstraint(this.placement==Ext.SplitBar.TOP?d:b,this.placement==Ext.SplitBar.TOP?b:d,this.tickSize)}this.dragSpecs.startSize=c;this.dragSpecs.startPoint=[a,e];Ext.dd.DDProxy.prototype.b4StartDrag.call(this.dd,a,e)},onEndProxyDrag:function(c){Ext.get(this.proxy).setDisplayed(false);var b=Ext.lib.Event.getXY(c);if(this.overlay){Ext.destroy(this.overlay);delete this.overlay}var a;if(this.orientation==Ext.SplitBar.HORIZONTAL){a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.LEFT?b[0]-this.dragSpecs.startPoint[0]:this.dragSpecs.startPoint[0]-b[0])}else{a=this.dragSpecs.startSize+(this.placement==Ext.SplitBar.TOP?b[1]-this.dragSpecs.startPoint[1]:this.dragSpecs.startPoint[1]-b[1])}a=Math.min(Math.max(a,this.activeMinSize),this.activeMaxSize);if(a!=this.dragSpecs.startSize){if(this.fireEvent("beforeapply",this,a)!==false){this.adapter.setElementSize(this,a);this.fireEvent("moved",this,a);this.fireEvent("resize",this,a)}}},getAdapter:function(){return this.adapter},setAdapter:function(a){this.adapter=a;this.adapter.init(this)},getMinimumSize:function(){return this.minSize},setMinimumSize:function(a){this.minSize=a},getMaximumSize:function(){return this.maxSize},setMaximumSize:function(a){this.maxSize=a},setCurrentSize:function(b){var a=this.animate;this.animate=false;this.adapter.setElementSize(this,b);this.animate=a},destroy:function(a){Ext.destroy(this.shim,Ext.get(this.proxy));this.dd.unreg();if(a){this.el.remove()}this.purgeListeners()}});Ext.SplitBar.createProxy=function(b){var c=new Ext.Element(document.createElement("div"));document.body.appendChild(c.dom);c.unselectable();var a="x-splitbar-proxy";c.addClass(a+" "+(b==Ext.SplitBar.HORIZONTAL?a+"-h":a+"-v"));return c.dom};Ext.SplitBar.BasicLayoutAdapter=function(){};Ext.SplitBar.BasicLayoutAdapter.prototype={init:function(a){},getElementSize:function(a){if(a.orientation==Ext.SplitBar.HORIZONTAL){return a.resizingEl.getWidth()}else{return a.resizingEl.getHeight()}},setElementSize:function(b,a,c){if(b.orientation==Ext.SplitBar.HORIZONTAL){if(!b.animate){b.resizingEl.setWidth(a);if(c){c(b,a)}}else{b.resizingEl.setWidth(a,true,0.1,c,"easeOut")}}else{if(!b.animate){b.resizingEl.setHeight(a);if(c){c(b,a)}}else{b.resizingEl.setHeight(a,true,0.1,c,"easeOut")}}}};Ext.SplitBar.AbsoluteLayoutAdapter=function(a){this.basic=new Ext.SplitBar.BasicLayoutAdapter();this.container=Ext.get(a)};Ext.SplitBar.AbsoluteLayoutAdapter.prototype={init:function(a){this.basic.init(a)},getElementSize:function(a){return this.basic.getElementSize(a)},setElementSize:function(b,a,c){this.basic.setElementSize(b,a,this.moveSplitter.createDelegate(this,[b]))},moveSplitter:function(a){var b=Ext.SplitBar;switch(a.placement){case b.LEFT:a.el.setX(a.resizingEl.getRight());break;case b.RIGHT:a.el.setStyle("right",(this.container.getWidth()-a.resizingEl.getLeft())+"px");break;case b.TOP:a.el.setY(a.resizingEl.getBottom());break;case b.BOTTOM:a.el.setY(a.resizingEl.getTop()-a.el.getHeight());break}}};Ext.SplitBar.VERTICAL=1;Ext.SplitBar.HORIZONTAL=2;Ext.SplitBar.LEFT=1;Ext.SplitBar.RIGHT=2;Ext.SplitBar.TOP=3;Ext.SplitBar.BOTTOM=4;Ext.Container=Ext.extend(Ext.BoxComponent,{bufferResize:50,autoDestroy:true,forceLayout:false,defaultType:"panel",resizeEvent:"resize",bubbleEvents:["add","remove"],initComponent:function(){Ext.Container.superclass.initComponent.call(this);this.addEvents("afterlayout","beforeadd","beforeremove","add","remove");var a=this.items;if(a){delete this.items;this.add(a)}},initItems:function(){if(!this.items){this.items=new Ext.util.MixedCollection(false,this.getComponentId);this.getLayout()}},setLayout:function(a){if(this.layout&&this.layout!=a){this.layout.setContainer(null)}this.layout=a;this.initItems();a.setContainer(this)},afterRender:function(){Ext.Container.superclass.afterRender.call(this);if(!this.layout){this.layout="auto"}if(Ext.isObject(this.layout)&&!this.layout.layout){this.layoutConfig=this.layout;this.layout=this.layoutConfig.type}if(Ext.isString(this.layout)){this.layout=new Ext.Container.LAYOUTS[this.layout.toLowerCase()](this.layoutConfig)}this.setLayout(this.layout);if(this.activeItem!==undefined&&this.layout.setActiveItem){var a=this.activeItem;delete this.activeItem;this.layout.setActiveItem(a)}if(!this.ownerCt){this.doLayout(false,true)}if(this.monitorResize===true){Ext.EventManager.onWindowResize(this.doLayout,this,[false])}},getLayoutTarget:function(){return this.el},getComponentId:function(a){return a.getItemId()},add:function(b){this.initItems();var e=arguments.length>1;if(e||Ext.isArray(b)){var a=[];Ext.each(e?arguments:b,function(h){a.push(this.add(h))},this);return a}var g=this.lookupComponent(this.applyDefaults(b));var d=this.items.length;if(this.fireEvent("beforeadd",this,g,d)!==false&&this.onBeforeAdd(g)!==false){this.items.add(g);g.onAdded(this,d);this.onAdd(g);this.fireEvent("add",this,g,d)}return g},onAdd:function(a){},onAdded:function(a,b){this.ownerCt=a;this.initRef();this.cascade(function(d){d.initRef()});this.fireEvent("added",this,a,b)},insert:function(e,b){var d=arguments,h=d.length,a=[],g,j;this.initItems();if(h>2){for(g=h-1;g>=1;--g){a.push(this.insert(e,d[g]))}return a}j=this.lookupComponent(this.applyDefaults(b));e=Math.min(e,this.items.length);if(this.fireEvent("beforeadd",this,j,e)!==false&&this.onBeforeAdd(j)!==false){if(j.ownerCt==this){this.items.remove(j)}this.items.insert(e,j);j.onAdded(this,e);this.onAdd(j);this.fireEvent("add",this,j,e)}return j},applyDefaults:function(b){var a=this.defaults;if(a){if(Ext.isFunction(a)){a=a.call(this,b)}if(Ext.isString(b)){b=Ext.ComponentMgr.get(b);Ext.apply(b,a)}else{if(!b.events){Ext.applyIf(b.isAction?b.initialConfig:b,a)}else{Ext.apply(b,a)}}}return b},onBeforeAdd:function(a){if(a.ownerCt){a.ownerCt.remove(a,false)}if(this.hideBorders===true){a.border=(a.border===true)}},remove:function(a,b){this.initItems();var d=this.getComponent(a);if(d&&this.fireEvent("beforeremove",this,d)!==false){this.doRemove(d,b);this.fireEvent("remove",this,d)}return d},onRemove:function(a){},doRemove:function(e,d){var b=this.layout,a=b&&this.rendered;if(a){b.onRemove(e)}this.items.remove(e);e.onRemoved();this.onRemove(e);if(d===true||(d!==false&&this.autoDestroy)){e.destroy()}if(a){b.afterRemove(e)}},removeAll:function(c){this.initItems();var e,g=[],b=[];this.items.each(function(h){g.push(h)});for(var d=0,a=g.length;d','','
    ','
    ',"");a.disableFormats=true;return a.compile()})(),destroy:function(){if(this.resizeTask&&this.resizeTask.cancel){this.resizeTask.cancel()}if(this.container){this.container.un(this.container.resizeEvent,this.onResize,this)}if(!Ext.isEmpty(this.targetCls)){var a=this.container.getLayoutTarget();if(a){a.removeClass(this.targetCls)}}}});Ext.layout.AutoLayout=Ext.extend(Ext.layout.ContainerLayout,{type:"auto",monitorResize:true,onLayout:function(d,g){Ext.layout.AutoLayout.superclass.onLayout.call(this,d,g);var e=this.getRenderedItems(d),a=e.length,b,h;for(b=0;b0){b.setSize(a)}}});Ext.Container.LAYOUTS.fit=Ext.layout.FitLayout;Ext.layout.CardLayout=Ext.extend(Ext.layout.FitLayout,{deferredRender:false,layoutOnCardChange:false,renderHidden:true,type:"card",setActiveItem:function(d){var a=this.activeItem,b=this.container;d=b.getComponent(d);if(d&&a!=d){if(a){a.hide();if(a.hidden!==true){return false}a.fireEvent("deactivate",a)}var c=d.doLayout&&(this.layoutOnCardChange||!d.rendered);this.activeItem=d;delete d.deferLayout;d.show();this.layout();if(c){d.doLayout()}d.fireEvent("activate",d)}},renderAll:function(a,b){if(this.deferredRender){this.renderItem(this.activeItem,undefined,b)}else{Ext.layout.CardLayout.superclass.renderAll.call(this,a,b)}}});Ext.Container.LAYOUTS.card=Ext.layout.CardLayout;Ext.layout.AnchorLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"anchor",defaultAnchor:"100%",parseAnchorRE:/^(r|right|b|bottom)$/i,getLayoutTargetSize:function(){var b=this.container.getLayoutTarget(),a={};if(b){a=b.getViewSize();if(Ext.isIE&&Ext.isStrict&&a.width==0){a=b.getStyleSize()}a.width-=b.getPadding("lr");a.height-=b.getPadding("tb")}return a},onLayout:function(m,w){Ext.layout.AnchorLayout.superclass.onLayout.call(this,m,w);var p=this.getLayoutTargetSize(),k=p.width,o=p.height,q=w.getStyle("overflow"),n=this.getRenderedItems(m),t=n.length,g=[],j,a,v,l,h,c,e,d,u=0,s,b;if(k<20&&o<20){return}if(m.anchorSize){if(typeof m.anchorSize=="number"){a=m.anchorSize}else{a=m.anchorSize.width;v=m.anchorSize.height}}else{a=m.initialConfig.width;v=m.initialConfig.height}for(s=0;s ');b.disableFormats=true;b.compile();Ext.layout.BorderLayout.Region.prototype.toolTemplate=b}this.collapsedEl=this.targetEl.createChild({cls:"x-layout-collapsed x-layout-collapsed-"+this.position,id:this.panel.id+"-xcollapsed"});this.collapsedEl.enableDisplayMode("block");if(this.collapseMode=="mini"){this.collapsedEl.addClass("x-layout-cmini-"+this.position);this.miniCollapsedEl=this.collapsedEl.createChild({cls:"x-layout-mini x-layout-mini-"+this.position,html:" "});this.miniCollapsedEl.addClassOnOver("x-layout-mini-over");this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this.onExpandClick,this,{stopEvent:true})}else{if(this.collapsible!==false&&!this.hideCollapseTool){var a=this.expandToolEl=this.toolTemplate.append(this.collapsedEl.dom,{id:"expand-"+this.position},true);a.addClassOnOver("x-tool-expand-"+this.position+"-over");a.on("click",this.onExpandClick,this,{stopEvent:true})}if(this.floatable!==false||this.titleCollapse){this.collapsedEl.addClassOnOver("x-layout-collapsed-over");this.collapsedEl.on("click",this[this.floatable?"collapseClick":"onExpandClick"],this)}}}return this.collapsedEl},onExpandClick:function(a){if(this.isSlid){this.panel.expand(false)}else{this.panel.expand()}},onCollapseClick:function(a){this.panel.collapse()},beforeCollapse:function(c,a){this.lastAnim=a;if(this.splitEl){this.splitEl.hide()}this.getCollapsedEl().show();var b=this.panel.getEl();this.originalZIndex=b.getStyle("z-index");b.setStyle("z-index",100);this.isCollapsed=true;this.layout.layout()},onCollapse:function(a){this.panel.el.setStyle("z-index",1);if(this.lastAnim===false||this.panel.animCollapse===false){this.getCollapsedEl().dom.style.visibility="visible"}else{this.getCollapsedEl().slideIn(this.panel.slideAnchor,{duration:0.2})}this.state.collapsed=true;this.panel.saveState()},beforeExpand:function(a){if(this.isSlid){this.afterSlideIn()}var b=this.getCollapsedEl();this.el.show();if(this.position=="east"||this.position=="west"){this.panel.setSize(undefined,b.getHeight())}else{this.panel.setSize(b.getWidth(),undefined)}b.hide();b.dom.style.visibility="hidden";this.panel.el.setStyle("z-index",this.floatingZIndex)},onExpand:function(){this.isCollapsed=false;if(this.splitEl){this.splitEl.show()}this.layout.layout();this.panel.el.setStyle("z-index",this.originalZIndex);this.state.collapsed=false;this.panel.saveState()},collapseClick:function(a){if(this.isSlid){a.stopPropagation();this.slideIn()}else{a.stopPropagation();this.slideOut()}},onHide:function(){if(this.isCollapsed){this.getCollapsedEl().hide()}else{if(this.splitEl){this.splitEl.hide()}}},onShow:function(){if(this.isCollapsed){this.getCollapsedEl().show()}else{if(this.splitEl){this.splitEl.show()}}},isVisible:function(){return !this.panel.hidden},getMargins:function(){return this.isCollapsed&&this.cmargins?this.cmargins:this.margins},getSize:function(){return this.isCollapsed?this.getCollapsedEl().getSize():this.panel.getSize()},setPanel:function(a){this.panel=a},getMinWidth:function(){return this.minWidth},getMinHeight:function(){return this.minHeight},applyLayoutCollapsed:function(a){var b=this.getCollapsedEl();b.setLeftTop(a.x,a.y);b.setSize(a.width,a.height)},applyLayout:function(a){if(this.isCollapsed){this.applyLayoutCollapsed(a)}else{this.panel.setPosition(a.x,a.y);this.panel.setSize(a.width,a.height)}},beforeSlide:function(){this.panel.beforeEffect()},afterSlide:function(){this.panel.afterEffect()},initAutoHide:function(){if(this.autoHide!==false){if(!this.autoHideHd){this.autoHideSlideTask=new Ext.util.DelayedTask(this.slideIn,this);this.autoHideHd={mouseout:function(a){if(!a.within(this.el,true)){this.autoHideSlideTask.delay(500)}},mouseover:function(a){this.autoHideSlideTask.cancel()},scope:this}}this.el.on(this.autoHideHd);this.collapsedEl.on(this.autoHideHd)}},clearAutoHide:function(){if(this.autoHide!==false){this.el.un("mouseout",this.autoHideHd.mouseout);this.el.un("mouseover",this.autoHideHd.mouseover);this.collapsedEl.un("mouseout",this.autoHideHd.mouseout);this.collapsedEl.un("mouseover",this.autoHideHd.mouseover)}},clearMonitor:function(){Ext.getDoc().un("click",this.slideInIf,this)},slideOut:function(){if(this.isSlid||this.el.hasActiveFx()){return}this.isSlid=true;var b=this.panel.tools,c,a;if(b&&b.toggle){b.toggle.hide()}this.el.show();a=this.panel.collapsed;this.panel.collapsed=false;if(this.position=="east"||this.position=="west"){c=this.panel.deferHeight;this.panel.deferHeight=false;this.panel.setSize(undefined,this.collapsedEl.getHeight());this.panel.deferHeight=c}else{this.panel.setSize(this.collapsedEl.getWidth(),undefined)}this.panel.collapsed=a;this.restoreLT=[this.el.dom.style.left,this.el.dom.style.top];this.el.alignTo(this.collapsedEl,this.getCollapseAnchor());this.el.setStyle("z-index",this.floatingZIndex+2);this.panel.el.replaceClass("x-panel-collapsed","x-panel-floating");if(this.animFloat!==false){this.beforeSlide();this.el.slideIn(this.getSlideAnchor(),{callback:function(){this.afterSlide();this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)},scope:this,block:true})}else{this.initAutoHide();Ext.getDoc().on("click",this.slideInIf,this)}},afterSlideIn:function(){this.clearAutoHide();this.isSlid=false;this.clearMonitor();this.el.setStyle("z-index","");this.panel.el.replaceClass("x-panel-floating","x-panel-collapsed");this.el.dom.style.left=this.restoreLT[0];this.el.dom.style.top=this.restoreLT[1];var a=this.panel.tools;if(a&&a.toggle){a.toggle.show()}},slideIn:function(a){if(!this.isSlid||this.el.hasActiveFx()){Ext.callback(a);return}this.isSlid=false;if(this.animFloat!==false){this.beforeSlide();this.el.slideOut(this.getSlideAnchor(),{callback:function(){this.el.hide();this.afterSlide();this.afterSlideIn();Ext.callback(a)},scope:this,block:true})}else{this.el.hide();this.afterSlideIn()}},slideInIf:function(a){if(!a.within(this.el)){this.slideIn()}},anchors:{west:"left",east:"right",north:"top",south:"bottom"},sanchors:{west:"l",east:"r",north:"t",south:"b"},canchors:{west:"tl-tr",east:"tr-tl",north:"tl-bl",south:"bl-tl"},getAnchor:function(){return this.anchors[this.position]},getCollapseAnchor:function(){return this.canchors[this.position]},getSlideAnchor:function(){return this.sanchors[this.position]},getAlignAdj:function(){var a=this.cmargins;switch(this.position){case"west":return[0,0];break;case"east":return[0,0];break;case"north":return[0,0];break;case"south":return[0,0];break}},getExpandAdj:function(){var b=this.collapsedEl,a=this.cmargins;switch(this.position){case"west":return[-(a.right+b.getWidth()+a.left),0];break;case"east":return[a.right+b.getWidth()+a.left,0];break;case"north":return[0,-(a.top+a.bottom+b.getHeight())];break;case"south":return[0,a.top+a.bottom+b.getHeight()];break}},destroy:function(){if(this.autoHideSlideTask&&this.autoHideSlideTask.cancel){this.autoHideSlideTask.cancel()}Ext.destroyMembers(this,"miniCollapsedEl","collapsedEl","expandToolEl")}};Ext.layout.BorderLayout.SplitRegion=function(b,a,c){Ext.layout.BorderLayout.SplitRegion.superclass.constructor.call(this,b,a,c);this.applyLayout=this.applyFns[c]};Ext.extend(Ext.layout.BorderLayout.SplitRegion,Ext.layout.BorderLayout.Region,{splitTip:"Drag to resize.",collapsibleSplitTip:"Drag to resize. Double click to hide.",useSplitTips:false,splitSettings:{north:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.TOP,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},south:{orientation:Ext.SplitBar.VERTICAL,placement:Ext.SplitBar.BOTTOM,maxFn:"getVMaxSize",minProp:"minHeight",maxProp:"maxHeight"},east:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.RIGHT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"},west:{orientation:Ext.SplitBar.HORIZONTAL,placement:Ext.SplitBar.LEFT,maxFn:"getHMaxSize",minProp:"minWidth",maxProp:"maxWidth"}},applyFns:{west:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;this.panel.setPosition(c.x,c.y);var a=d.offsetWidth;b.left=(c.x+c.width-a)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},east:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetWidth;this.panel.setPosition(c.x+a,c.y);b.left=(c.x)+"px";b.top=(c.y)+"px";b.height=Math.max(0,c.height)+"px";this.panel.setSize(c.width-a,c.height)},north:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y);b.left=(c.x)+"px";b.top=(c.y+c.height-a)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)},south:function(c){if(this.isCollapsed){return this.applyLayoutCollapsed(c)}var d=this.splitEl.dom,b=d.style;var a=d.offsetHeight;this.panel.setPosition(c.x,c.y+a);b.left=(c.x)+"px";b.top=(c.y)+"px";b.width=Math.max(0,c.width)+"px";this.panel.setSize(c.width,c.height-a)}},render:function(a,c){Ext.layout.BorderLayout.SplitRegion.superclass.render.call(this,a,c);var d=this.position;this.splitEl=a.createChild({cls:"x-layout-split x-layout-split-"+d,html:" ",id:this.panel.id+"-xsplit"});if(this.collapseMode=="mini"){this.miniSplitEl=this.splitEl.createChild({cls:"x-layout-mini x-layout-mini-"+d,html:" "});this.miniSplitEl.addClassOnOver("x-layout-mini-over");this.miniSplitEl.on("click",this.onCollapseClick,this,{stopEvent:true})}var b=this.splitSettings[d];this.split=new Ext.SplitBar(this.splitEl.dom,c.el,b.orientation);this.split.tickSize=this.tickSize;this.split.placement=b.placement;this.split.getMaximumSize=this[b.maxFn].createDelegate(this);this.split.minSize=this.minSize||this[b.minProp];this.split.on("beforeapply",this.onSplitMove,this);this.split.useShim=this.useShim===true;this.maxSize=this.maxSize||this[b.maxProp];if(c.hidden){this.splitEl.hide()}if(this.useSplitTips){this.splitEl.dom.title=this.collapsible?this.collapsibleSplitTip:this.splitTip}if(this.collapsible){this.splitEl.on("dblclick",this.onCollapseClick,this)}},getSize:function(){if(this.isCollapsed){return this.collapsedEl.getSize()}var a=this.panel.getSize();if(this.position=="north"||this.position=="south"){a.height+=this.splitEl.dom.offsetHeight}else{a.width+=this.splitEl.dom.offsetWidth}return a},getHMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getWidth()+a.el.getWidth())-a.getMinWidth())},getVMaxSize:function(){var b=this.maxSize||10000;var a=this.layout.center;return Math.min(b,(this.el.getHeight()+a.el.getHeight())-a.getMinHeight())},onSplitMove:function(b,a){var c=this.panel.getSize();this.lastSplitSize=a;if(this.position=="north"||this.position=="south"){this.panel.setSize(c.width,a);this.state.height=a}else{this.panel.setSize(a,c.height);this.state.width=a}this.layout.layout();this.panel.saveState();return false},getSplitBar:function(){return this.split},destroy:function(){Ext.destroy(this.miniSplitEl,this.split,this.splitEl);Ext.layout.BorderLayout.SplitRegion.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.border=Ext.layout.BorderLayout;Ext.layout.FormLayout=Ext.extend(Ext.layout.AnchorLayout,{labelSeparator:":",trackLabels:true,type:"form",onRemove:function(d){Ext.layout.FormLayout.superclass.onRemove.call(this,d);if(this.trackLabels){d.un("show",this.onFieldShow,this);d.un("hide",this.onFieldHide,this)}var b=d.getPositionEl(),a=d.getItemCt&&d.getItemCt();if(d.rendered&&a){if(b&&b.dom){b.insertAfter(a)}Ext.destroy(a);Ext.destroyMembers(d,"label","itemCt");if(d.customItemCt){Ext.destroyMembers(d,"getItemCt","customItemCt")}}},setContainer:function(a){Ext.layout.FormLayout.superclass.setContainer.call(this,a);if(a.labelAlign){a.addClass("x-form-label-"+a.labelAlign)}if(a.hideLabels){Ext.apply(this,{labelStyle:"display:none",elementStyle:"padding-left:0;",labelAdjust:0})}else{this.labelSeparator=Ext.isDefined(a.labelSeparator)?a.labelSeparator:this.labelSeparator;a.labelWidth=a.labelWidth||100;if(Ext.isNumber(a.labelWidth)){var b=Ext.isNumber(a.labelPad)?a.labelPad:5;Ext.apply(this,{labelAdjust:a.labelWidth+b,labelStyle:"width:"+a.labelWidth+"px;",elementStyle:"padding-left:"+(a.labelWidth+b)+"px"})}if(a.labelAlign=="top"){Ext.apply(this,{labelStyle:"width:auto;",labelAdjust:0,elementStyle:"padding-left:0;"})}}},isHide:function(a){return a.hideLabel||this.container.hideLabels},onFieldShow:function(a){a.getItemCt().removeClass("x-hide-"+a.hideMode);if(a.isComposite){a.doLayout()}},onFieldHide:function(a){a.getItemCt().addClass("x-hide-"+a.hideMode)},getLabelStyle:function(e){var b="",c=[this.labelStyle,e];for(var d=0,a=c.length;d=b)||(this.cells[c]&&this.cells[c][a])){if(b&&a>=b){c++;a=0}else{a++}}return[a,c]},renderItem:function(e,a,d){if(!this.table){this.table=d.createChild(Ext.apply({tag:"table",cls:"x-table-layout",cellspacing:0,cn:{tag:"tbody"}},this.tableAttrs),null,true)}if(e&&!e.rendered){e.render(this.getNextCell(e));this.configureItem(e)}else{if(e&&!this.isValidParent(e,d)){var b=this.getNextCell(e);b.insertBefore(e.getPositionEl().dom,null);e.container=Ext.get(b);this.configureItem(e)}}},isValidParent:function(b,a){return b.getPositionEl().up("table",5).dom.parentNode===(a.dom||a)},destroy:function(){delete this.table;Ext.layout.TableLayout.superclass.destroy.call(this)}});Ext.Container.LAYOUTS.table=Ext.layout.TableLayout;Ext.layout.AbsoluteLayout=Ext.extend(Ext.layout.AnchorLayout,{extraCls:"x-abs-layout-item",type:"absolute",onLayout:function(a,b){b.position();this.paddingLeft=b.getPadding("l");this.paddingTop=b.getPadding("t");Ext.layout.AbsoluteLayout.superclass.onLayout.call(this,a,b)},adjustWidthAnchor:function(b,a){return b?b-a.getPosition(true)[0]+this.paddingLeft:b},adjustHeightAnchor:function(b,a){return b?b-a.getPosition(true)[1]+this.paddingTop:b}});Ext.Container.LAYOUTS.absolute=Ext.layout.AbsoluteLayout;Ext.layout.BoxLayout=Ext.extend(Ext.layout.ContainerLayout,{defaultMargins:{left:0,top:0,right:0,bottom:0},padding:"0",pack:"start",monitorResize:true,type:"box",scrollOffset:0,extraCls:"x-box-item",targetCls:"x-box-layout-ct",innerCls:"x-box-inner",constructor:function(a){Ext.layout.BoxLayout.superclass.constructor.call(this,a);if(Ext.isString(this.defaultMargins)){this.defaultMargins=this.parseMargins(this.defaultMargins)}var d=this.overflowHandler;if(typeof d=="string"){d={type:d}}var c="none";if(d&&d.type!=undefined){c=d.type}var b=Ext.layout.boxOverflow[c];if(b[this.type]){b=b[this.type]}this.overflowHandler=new b(this,d)},onLayout:function(b,h){Ext.layout.BoxLayout.superclass.onLayout.call(this,b,h);var d=this.getLayoutTargetSize(),i=this.getVisibleItems(b),c=this.calculateChildBoxes(i,d),g=c.boxes,j=c.meta;if(d.width>0){var k=this.overflowHandler,a=j.tooNarrow?"handleOverflow":"clearOverflow";var e=k[a](c,d);if(e){if(e.targetSize){d=e.targetSize}if(e.recalculate){i=this.getVisibleItems(b);c=this.calculateChildBoxes(i,d);g=c.boxes}}}this.layoutTargetLastSize=d;this.childBoxCache=c;this.updateInnerCtSize(d,c);this.updateChildBoxes(g);this.handleTargetOverflow(d,b,h)},updateChildBoxes:function(c){for(var b=0,e=c.length;b(None)',constructor:function(a){Ext.layout.boxOverflow.Menu.superclass.constructor.apply(this,arguments);this.menuItems=[]},createInnerElements:function(){if(!this.afterCt){this.afterCt=this.layout.innerCt.insertSibling({cls:this.afterCls},"before")}},clearOverflow:function(a,g){var e=g.width+(this.afterCt?this.afterCt.getWidth():0),b=this.menuItems;this.hideTrigger();for(var c=0,d=b.length;ci.width;return l}},handleOverflow:function(d,h){this.showTrigger();var k=h.width-this.afterCt.getWidth(),l=d.boxes,e=0,r=false;for(var o=0,c=l.length;o=0;j--){var q=l[j].component,p=l[j].left+l[j].width;if(p>=k){this.menuItems.unshift({component:q,width:l[j].width});q.hide()}else{break}}}if(this.menuItems.length==0){this.hideTrigger()}return{targetSize:{height:h.height,width:k},recalculate:r}}});Ext.layout.boxOverflow.menu.hbox=Ext.layout.boxOverflow.HorizontalMenu;Ext.layout.boxOverflow.Scroller=Ext.extend(Ext.layout.boxOverflow.None,{animateScroll:true,scrollIncrement:100,wheelIncrement:3,scrollRepeatInterval:400,scrollDuration:0.4,beforeCls:"x-strip-left",afterCls:"x-strip-right",scrollerCls:"x-strip-scroller",beforeScrollerCls:"x-strip-scroller-left",afterScrollerCls:"x-strip-scroller-right",createWheelListener:function(){this.layout.innerCt.on({scope:this,mousewheel:function(a){a.stopEvent();this.scrollBy(a.getWheelDelta()*this.wheelIncrement*-1,false)}})},handleOverflow:function(a,b){this.createInnerElements();this.showScrollers()},clearOverflow:function(){this.hideScrollers()},showScrollers:function(){this.createScrollers();this.beforeScroller.show();this.afterScroller.show();this.updateScrollButtons()},hideScrollers:function(){if(this.beforeScroller!=undefined){this.beforeScroller.hide();this.afterScroller.hide()}},createScrollers:function(){if(!this.beforeScroller&&!this.afterScroller){var a=this.beforeCt.createChild({cls:String.format("{0} {1} ",this.scrollerCls,this.beforeScrollerCls)});var b=this.afterCt.createChild({cls:String.format("{0} {1}",this.scrollerCls,this.afterScrollerCls)});a.addClassOnOver(this.beforeScrollerCls+"-hover");b.addClassOnOver(this.afterScrollerCls+"-hover");a.setVisibilityMode(Ext.Element.DISPLAY);b.setVisibilityMode(Ext.Element.DISPLAY);this.beforeRepeater=new Ext.util.ClickRepeater(a,{interval:this.scrollRepeatInterval,handler:this.scrollLeft,scope:this});this.afterRepeater=new Ext.util.ClickRepeater(b,{interval:this.scrollRepeatInterval,handler:this.scrollRight,scope:this});this.beforeScroller=a;this.afterScroller=b}},destroy:function(){Ext.destroy(this.beforeScroller,this.afterScroller,this.beforeRepeater,this.afterRepeater,this.beforeCt,this.afterCt)},scrollBy:function(b,a){this.scrollTo(this.getScrollPosition()+b,a)},getItem:function(a){if(Ext.isString(a)){a=Ext.getCmp(a)}else{if(Ext.isNumber(a)){a=this.items[a]}}return a},getScrollAnim:function(){return{duration:this.scrollDuration,callback:this.updateScrollButtons,scope:this}},updateScrollButtons:function(){if(this.beforeScroller==undefined||this.afterScroller==undefined){return}var d=this.atExtremeBefore()?"addClass":"removeClass",c=this.atExtremeAfter()?"addClass":"removeClass",a=this.beforeScrollerCls+"-disabled",b=this.afterScrollerCls+"-disabled";this.beforeScroller[d](a);this.afterScroller[c](b);this.scrolling=false},atExtremeBefore:function(){return this.getScrollPosition()===0},scrollLeft:function(a){this.scrollBy(-this.scrollIncrement,a)},scrollRight:function(a){this.scrollBy(this.scrollIncrement,a)},scrollToItem:function(d,b){d=this.getItem(d);if(d!=undefined){var a=this.getItemVisibility(d);if(!a.fullyVisible){var c=d.getBox(true,true),e=c.x;if(a.hiddenRight){e-=(this.layout.innerCt.getWidth()-c.width)}this.scrollTo(e,b)}}},getItemVisibility:function(e){var d=this.getItem(e).getBox(true,true),a=d.x,c=d.x+d.width,g=this.getScrollPosition(),b=this.layout.innerCt.getWidth()+g;return{hiddenLeft:ab,fullyVisible:a>g&&c=this.getMaxScrollBottom()}});Ext.layout.boxOverflow.scroller.vbox=Ext.layout.boxOverflow.VerticalScroller;Ext.layout.boxOverflow.HorizontalScroller=Ext.extend(Ext.layout.boxOverflow.Scroller,{handleOverflow:function(a,b){Ext.layout.boxOverflow.HorizontalScroller.superclass.handleOverflow.apply(this,arguments);return{targetSize:{height:b.height,width:b.width-(this.beforeCt.getWidth()+this.afterCt.getWidth())}}},createInnerElements:function(){var a=this.layout.innerCt;if(!this.beforeCt){this.afterCt=a.insertSibling({cls:this.afterCls},"before");this.beforeCt=a.insertSibling({cls:this.beforeCls},"before");this.createWheelListener()}},scrollTo:function(a,b){var d=this.getScrollPosition(),c=a.constrain(0,this.getMaxScrollRight());if(c!=d&&!this.scrolling){if(b==undefined){b=this.animateScroll}this.layout.innerCt.scrollTo("left",c,b?this.getScrollAnim():false);if(b){this.scrolling=true}else{this.scrolling=false;this.updateScrollButtons()}}},getScrollPosition:function(){return parseInt(this.layout.innerCt.dom.scrollLeft,10)||0},getMaxScrollRight:function(){return this.layout.innerCt.dom.scrollWidth-this.layout.innerCt.getWidth()},atExtremeAfter:function(){return this.getScrollPosition()>=this.getMaxScrollRight()}});Ext.layout.boxOverflow.scroller.hbox=Ext.layout.boxOverflow.HorizontalScroller;Ext.layout.HBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"top",type:"hbox",calculateChildBoxes:function(r,b){var F=r.length,R=this.padding,D=R.top,U=R.left,y=D+R.bottom,O=U+R.right,a=b.width-this.scrollOffset,e=b.height,o=Math.max(0,e-y),P=this.pack=="start",W=this.pack=="center",A=this.pack=="end",L=0,Q=0,T=0,l=0,X=0,H=[],k,J,M,V,w,j,S,I,c,x,q,N;for(S=0;Sa;var n=Math.max(0,a-L-O);if(p){for(S=0;S0){var C=[];for(var E=0,v=F;Ei.available?1:-1});for(var S=0,v=C.length;S0){I.top=D+q+(z/2)}}U+=I.width+w.right}return{boxes:H,meta:{maxHeight:Q,nonFlexWidth:L,desiredWidth:l,minimumWidth:X,shortfall:l-a,tooNarrow:p}}}});Ext.Container.LAYOUTS.hbox=Ext.layout.HBoxLayout;Ext.layout.VBoxLayout=Ext.extend(Ext.layout.BoxLayout,{align:"left",type:"vbox",calculateChildBoxes:function(o,b){var E=o.length,R=this.padding,C=R.top,V=R.left,x=C+R.bottom,O=V+R.right,a=b.width-this.scrollOffset,c=b.height,K=Math.max(0,a-O),P=this.pack=="start",X=this.pack=="center",z=this.pack=="end",k=0,u=0,U=0,L=0,m=0,G=[],h,I,N,W,t,g,T,H,S,w,n,d,r;for(T=0;Tc;var q=Math.max(0,(c-k-x));if(l){for(T=0,r=E;T0){var J=[];for(var D=0,r=E;Di.available?1:-1});for(var T=0,r=J.length;T0){H.left=V+w+(y/2)}}C+=H.height+t.bottom}return{boxes:G,meta:{maxWidth:u,nonFlexHeight:k,desiredHeight:L,minimumHeight:m,shortfall:L-c,tooNarrow:l}}}});Ext.Container.LAYOUTS.vbox=Ext.layout.VBoxLayout;Ext.layout.ToolbarLayout=Ext.extend(Ext.layout.ContainerLayout,{monitorResize:true,type:"toolbar",triggerWidth:18,noItemsMenuText:'
    (None)
    ',lastOverflow:false,tableHTML:['',"","",'",'","","","
    ','',"",'',"","
    ","
    ','',"","","","","","","
    ",'',"",'',"","
    ","
    ",'',"",'',"","
    ","
    ","
    "].join(""),onLayout:function(e,j){if(!this.leftTr){var h=e.buttonAlign=="center"?"center":"left";j.addClass("x-toolbar-layout-ct");j.insertHtml("beforeEnd",String.format(this.tableHTML,h));this.leftTr=j.child("tr.x-toolbar-left-row",true);this.rightTr=j.child("tr.x-toolbar-right-row",true);this.extrasTr=j.child("tr.x-toolbar-extras-row",true);if(this.hiddenItem==undefined){this.hiddenItems=[]}}var k=e.buttonAlign=="right"?this.rightTr:this.leftTr,l=e.items.items,d=0;for(var b=0,g=l.length,m;b=0&&(d=e[a]);a--){if(!d.firstChild){b.removeChild(d)}}},insertCell:function(e,b,a){var d=document.createElement("td");d.className="x-toolbar-cell";b.insertBefore(d,b.childNodes[a]||null);return d},hideItem:function(a){this.hiddenItems.push(a);a.xtbHidden=true;a.xtbWidth=a.getPositionEl().dom.parentNode.offsetWidth;a.hide()},unhideItem:function(a){a.show();a.xtbHidden=false;this.hiddenItems.remove(a)},getItemWidth:function(a){return a.hidden?(a.xtbWidth||0):a.getPositionEl().dom.parentNode.offsetWidth},fitToSize:function(k){if(this.container.enableOverflow===false){return}var b=k.dom.clientWidth,j=k.dom.firstChild.offsetWidth,m=b-this.triggerWidth,a=this.lastWidth||0,c=this.hiddenItems,e=c.length!=0,n=b>=a;this.lastWidth=b;if(j>b||(e&&n)){var l=this.container.items.items,h=l.length,d=0,o;for(var g=0;gm){if(!(o.hidden||o.xtbHidden)){this.hideItem(o)}}else{if(o.xtbHidden){this.unhideItem(o)}}}}}e=c.length!=0;if(e){this.initMore();if(!this.lastOverflow){this.container.fireEvent("overflowchange",this.container,true);this.lastOverflow=true}}else{if(this.more){this.clearMenu();this.more.destroy();delete this.more;if(this.lastOverflow){this.container.fireEvent("overflowchange",this.container,false);this.lastOverflow=false}}}},createMenuConfig:function(c,a){var b=Ext.apply({},c.initialConfig),d=c.toggleGroup;Ext.copyTo(b,c,["iconCls","icon","itemId","disabled","handler","scope","menu"]);Ext.apply(b,{text:c.overflowText||c.text,hideOnClick:a});if(d||c.enableToggle){Ext.apply(b,{group:d,checked:c.pressed,listeners:{checkchange:function(g,e){c.toggle(e)}}})}delete b.ownerCt;delete b.xtype;delete b.id;return b},addComponentToMenu:function(b,a){if(a instanceof Ext.Toolbar.Separator){b.add("-")}else{if(Ext.isFunction(a.isXType)){if(a.isXType("splitbutton")){b.add(this.createMenuConfig(a,true))}else{if(a.isXType("button")){b.add(this.createMenuConfig(a,!a.menu))}else{if(a.isXType("buttongroup")){a.items.each(function(c){this.addComponentToMenu(b,c)},this)}}}}}},clearMenu:function(){var a=this.moreMenu;if(a&&a.items){a.items.each(function(b){delete b.menu})}},beforeMoreShow:function(h){var b=this.container.items.items,a=b.length,g,e;var c=function(j,i){return j.isXType("buttongroup")&&!(i instanceof Ext.Toolbar.Separator)};this.clearMenu();h.removeAll();for(var d=0;d','','{altText}',"","")}if(g&&!g.rendered){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}var d=this.getItemArgs(g);g.render(g.positionEl=b?this.itemTpl.insertBefore(b,d,true):this.itemTpl.append(e,d,true));g.positionEl.menuItemId=g.getItemId();if(!d.isMenuItem&&d.needsIcon){g.positionEl.addClass("x-menu-list-item-indent")}this.configureItem(g)}else{if(g&&!this.isValidParent(g,e)){if(Ext.isNumber(b)){b=e.dom.childNodes[b]}e.dom.insertBefore(g.getActionEl().dom,b||null)}}},getItemArgs:function(d){var a=d instanceof Ext.menu.Item,b=!(a||d instanceof Ext.menu.Separator);return{isMenuItem:a,needsIcon:b&&(d.icon||d.iconCls),icon:d.icon||Ext.BLANK_IMAGE_URL,iconCls:"x-menu-item-icon "+(d.iconCls||""),itemId:"x-menu-el-"+d.id,itemCls:"x-menu-list-item ",altText:d.altText||""}},isValidParent:function(b,a){return b.el.up("li.x-menu-list-item",5).dom.parentNode===(a.dom||a)},onLayout:function(a,b){Ext.layout.MenuLayout.superclass.onLayout.call(this,a,b);this.doAutoSize()},doAutoSize:function(){var c=this.container,a=c.width;if(c.floating){if(a){c.setWidth(a)}else{if(Ext.isIE){c.setWidth(Ext.isStrict&&(Ext.isIE7||Ext.isIE8||Ext.isIE9)?"auto":c.minWidth);var d=c.getEl(),b=d.dom.offsetWidth;c.setWidth(c.getLayoutTarget().getWidth()+d.getFrameWidth("lr"))}}}}});Ext.Container.LAYOUTS.menu=Ext.layout.MenuLayout;Ext.Viewport=Ext.extend(Ext.Container,{initComponent:function(){Ext.Viewport.superclass.initComponent.call(this);document.getElementsByTagName("html")[0].className+=" x-viewport";this.el=Ext.getBody();this.el.setHeight=Ext.emptyFn;this.el.setWidth=Ext.emptyFn;this.el.setSize=Ext.emptyFn;this.el.dom.scroll="no";this.allowDomMove=false;this.autoWidth=true;this.autoHeight=true;Ext.EventManager.onWindowResize(this.fireResize,this);this.renderTo=this.el},fireResize:function(a,b){this.fireEvent("resize",this,a,b,a,b)}});Ext.reg("viewport",Ext.Viewport);Ext.Panel=Ext.extend(Ext.Container,{baseCls:"x-panel",collapsedCls:"x-panel-collapsed",maskDisabled:true,animCollapse:Ext.enableFx,headerAsText:true,buttonAlign:"right",collapsed:false,collapseFirst:true,minButtonWidth:75,elements:"body",preventBodyReset:false,padding:undefined,resizeEvent:"bodyresize",toolTarget:"header",collapseEl:"bwrap",slideAnchor:"t",disabledClass:"",deferHeight:true,expandDefaults:{duration:0.25},collapseDefaults:{duration:0.25},initComponent:function(){Ext.Panel.superclass.initComponent.call(this);this.addEvents("bodyresize","titlechange","iconchange","collapse","expand","beforecollapse","beforeexpand","beforeclose","close","activate","deactivate");if(this.unstyled){this.baseCls="x-plain"}this.toolbars=[];if(this.tbar){this.elements+=",tbar";this.topToolbar=this.createToolbar(this.tbar);this.tbar=null}if(this.bbar){this.elements+=",bbar";this.bottomToolbar=this.createToolbar(this.bbar);this.bbar=null}if(this.header===true){this.elements+=",header";this.header=null}else{if(this.headerCfg||(this.title&&this.header!==false)){this.elements+=",header"}}if(this.footerCfg||this.footer===true){this.elements+=",footer";this.footer=null}if(this.buttons){this.fbar=this.buttons;this.buttons=null}if(this.fbar){this.createFbar(this.fbar)}if(this.autoLoad){this.on("render",this.doAutoLoad,this,{delay:10})}},createFbar:function(b){var a=this.minButtonWidth;this.elements+=",footer";this.fbar=this.createToolbar(b,{buttonAlign:this.buttonAlign,toolbarCls:"x-panel-fbar",enableOverflow:false,defaults:function(d){return{minWidth:d.minWidth||a}}});this.fbar.items.each(function(d){d.minWidth=d.minWidth||this.minButtonWidth},this);this.buttons=this.fbar.items.items},createToolbar:function(b,c){var a;if(Ext.isArray(b)){b={items:b}}a=b.events?Ext.apply(b,c):this.createComponent(Ext.apply({},b,c),"toolbar");this.toolbars.push(a);return a},createElement:function(a,c){if(this[a]){c.appendChild(this[a].dom);return}if(a==="bwrap"||this.elements.indexOf(a)!=-1){if(this[a+"Cfg"]){this[a]=Ext.fly(c).createChild(this[a+"Cfg"])}else{var b=document.createElement("div");b.className=this[a+"Cls"];this[a]=Ext.get(c.appendChild(b))}if(this[a+"CssClass"]){this[a].addClass(this[a+"CssClass"])}if(this[a+"Style"]){this[a].applyStyles(this[a+"Style"])}}},onRender:function(g,e){Ext.Panel.superclass.onRender.call(this,g,e);this.createClasses();var a=this.el,h=a.dom,k,i;if(this.collapsible&&!this.hideCollapseTool){this.tools=this.tools?this.tools.slice(0):[];this.tools[this.collapseFirst?"unshift":"push"]({id:"toggle",handler:this.toggleCollapse,scope:this})}if(this.tools){i=this.tools;this.elements+=(this.header!==false)?",header":""}this.tools={};a.addClass(this.baseCls);if(h.firstChild){this.header=a.down("."+this.headerCls);this.bwrap=a.down("."+this.bwrapCls);var j=this.bwrap?this.bwrap:a;this.tbar=j.down("."+this.tbarCls);this.body=j.down("."+this.bodyCls);this.bbar=j.down("."+this.bbarCls);this.footer=j.down("."+this.footerCls);this.fromMarkup=true}if(this.preventBodyReset===true){a.addClass("x-panel-reset")}if(this.cls){a.addClass(this.cls)}if(this.buttons){this.elements+=",footer"}if(this.frame){a.insertHtml("afterBegin",String.format(Ext.Element.boxMarkup,this.baseCls));this.createElement("header",h.firstChild.firstChild.firstChild);this.createElement("bwrap",h);k=this.bwrap.dom;var c=h.childNodes[1],b=h.childNodes[2];k.appendChild(c);k.appendChild(b);var l=k.firstChild.firstChild.firstChild;this.createElement("tbar",l);this.createElement("body",l);this.createElement("bbar",l);this.createElement("footer",k.lastChild.firstChild.firstChild);if(!this.footer){this.bwrap.dom.lastChild.className+=" x-panel-nofooter"}this.ft=Ext.get(this.bwrap.dom.lastChild);this.mc=Ext.get(l)}else{this.createElement("header",h);this.createElement("bwrap",h);k=this.bwrap.dom;this.createElement("tbar",k);this.createElement("body",k);this.createElement("bbar",k);this.createElement("footer",k);if(!this.header){this.body.addClass(this.bodyCls+"-noheader");if(this.tbar){this.tbar.addClass(this.tbarCls+"-noheader")}}}if(Ext.isDefined(this.padding)){this.body.setStyle("padding",this.body.addUnits(this.padding))}if(this.border===false){this.el.addClass(this.baseCls+"-noborder");this.body.addClass(this.bodyCls+"-noborder");if(this.header){this.header.addClass(this.headerCls+"-noborder")}if(this.footer){this.footer.addClass(this.footerCls+"-noborder")}if(this.tbar){this.tbar.addClass(this.tbarCls+"-noborder")}if(this.bbar){this.bbar.addClass(this.bbarCls+"-noborder")}}if(this.bodyBorder===false){this.body.addClass(this.bodyCls+"-noborder")}this.bwrap.enableDisplayMode("block");if(this.header){this.header.unselectable();if(this.headerAsText){this.header.dom.innerHTML=''+this.header.dom.innerHTML+"";if(this.iconCls){this.setIconClass(this.iconCls)}}}if(this.floating){this.makeFloating(this.floating)}if(this.collapsible&&this.titleCollapse&&this.header){this.mon(this.header,"click",this.toggleCollapse,this);this.header.setStyle("cursor","pointer")}if(i){this.addTool.apply(this,i)}if(this.fbar){this.footer.addClass("x-panel-btns");this.fbar.ownerCt=this;this.fbar.render(this.footer);this.footer.createChild({cls:"x-clear"})}if(this.tbar&&this.topToolbar){this.topToolbar.ownerCt=this;this.topToolbar.render(this.tbar)}if(this.bbar&&this.bottomToolbar){this.bottomToolbar.ownerCt=this;this.bottomToolbar.render(this.bbar)}},setIconClass:function(b){var a=this.iconCls;this.iconCls=b;if(this.rendered&&this.header){if(this.frame){this.header.addClass("x-panel-icon");this.header.replaceClass(a,this.iconCls)}else{var e=this.header,c=e.child("img.x-panel-inline-icon");if(c){Ext.fly(c).replaceClass(a,this.iconCls)}else{var d=e.child("span."+this.headerTextCls);if(d){Ext.DomHelper.insertBefore(d.dom,{tag:"img",alt:"",src:Ext.BLANK_IMAGE_URL,cls:"x-panel-inline-icon "+this.iconCls})}}}}this.fireEvent("iconchange",this,b,a)},makeFloating:function(a){this.floating=true;this.el=new Ext.Layer(Ext.apply({},a,{shadow:Ext.isDefined(this.shadow)?this.shadow:"sides",shadowOffset:this.shadowOffset,constrain:false,shim:this.shim===false?false:undefined}),this.el)},getTopToolbar:function(){return this.topToolbar},getBottomToolbar:function(){return this.bottomToolbar},getFooterToolbar:function(){return this.fbar},addButton:function(a,c,b){if(!this.fbar){this.createFbar([])}if(c){if(Ext.isString(a)){a={text:a}}a=Ext.apply({handler:c,scope:b},a)}return this.fbar.add(a)},addTool:function(){if(!this.rendered){if(!this.tools){this.tools=[]}Ext.each(arguments,function(a){this.tools.push(a)},this);return}if(!this[this.toolTarget]){return}if(!this.toolTemplate){var h=new Ext.Template('
     
    ');h.disableFormats=true;h.compile();Ext.Panel.prototype.toolTemplate=h}for(var g=0,d=arguments,c=d.length;g0){Ext.each(this.toolbars,function(c){c.doLayout(undefined,a)});this.syncHeight()}},syncHeight:function(){var b=this.toolbarHeight,c=this.body,a=this.lastSize.height,d;if(this.autoHeight||!Ext.isDefined(a)||a=="auto"){return}if(b!=this.getToolbarHeight()){b=Math.max(0,a-this.getFrameHeight());c.setHeight(b);d=c.getSize();this.toolbarHeight=this.getToolbarHeight();this.onBodyResize(d.width,d.height)}},onShow:function(){if(this.floating){return this.el.show()}Ext.Panel.superclass.onShow.call(this)},onHide:function(){if(this.floating){return this.el.hide()}Ext.Panel.superclass.onHide.call(this)},createToolHandler:function(c,a,d,b){return function(g){c.removeClass(d);if(a.stopEvent!==false){g.stopEvent()}if(a.handler){a.handler.call(a.scope||c,g,c,b,a)}}},afterRender:function(){if(this.floating&&!this.hidden){this.el.show()}if(this.title){this.setTitle(this.title)}Ext.Panel.superclass.afterRender.call(this);if(this.collapsed){this.collapsed=false;this.collapse(false)}this.initEvents()},getKeyMap:function(){if(!this.keyMap){this.keyMap=new Ext.KeyMap(this.el,this.keys)}return this.keyMap},initEvents:function(){if(this.keys){this.getKeyMap()}if(this.draggable){this.initDraggable()}if(this.toolbars.length>0){Ext.each(this.toolbars,function(a){a.doLayout();a.on({scope:this,afterlayout:this.syncHeight,remove:this.syncHeight})},this);this.syncHeight()}},initDraggable:function(){this.dd=new Ext.Panel.DD(this,Ext.isBoolean(this.draggable)?null:this.draggable)},beforeEffect:function(a){if(this.floating){this.el.beforeAction()}if(a!==false){this.el.addClass("x-panel-animated")}},afterEffect:function(a){this.syncShadow();this.el.removeClass("x-panel-animated")},createEffect:function(c,b,d){var e={scope:d,block:true};if(c===true){e.callback=b;return e}else{if(!c.callback){e.callback=b}else{e.callback=function(){b.call(d);Ext.callback(c.callback,c.scope)}}}return Ext.applyIf(e,c)},collapse:function(b){if(this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforecollapse",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.beforeEffect(a);this.onCollapse(a,b);return this},onCollapse:function(a,b){if(a){this[this.collapseEl].slideOut(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterCollapse,this),this.collapseDefaults))}else{this[this.collapseEl].hide(this.hideMode);this.afterCollapse(false)}},afterCollapse:function(a){this.collapsed=true;this.el.addClass(this.collapsedCls);if(a!==false){this[this.collapseEl].hide(this.hideMode)}this.afterEffect(a);this.cascade(function(b){if(b.lastSize){b.lastSize={width:undefined,height:undefined}}});this.fireEvent("collapse",this)},expand:function(b){if(!this.collapsed||this.el.hasFxBlock()||this.fireEvent("beforeexpand",this,b)===false){return}var a=b===true||(b!==false&&this.animCollapse);this.el.removeClass(this.collapsedCls);this.beforeEffect(a);this.onExpand(a,b);return this},onExpand:function(a,b){if(a){this[this.collapseEl].slideIn(this.slideAnchor,Ext.apply(this.createEffect(b||true,this.afterExpand,this),this.expandDefaults))}else{this[this.collapseEl].show(this.hideMode);this.afterExpand(false)}},afterExpand:function(a){this.collapsed=false;if(a!==false){this[this.collapseEl].show(this.hideMode)}this.afterEffect(a);if(this.deferLayout){delete this.deferLayout;this.doLayout(true)}this.fireEvent("expand",this)},toggleCollapse:function(a){this[this.collapsed?"expand":"collapse"](a);return this},onDisable:function(){if(this.rendered&&this.maskDisabled){this.el.mask()}Ext.Panel.superclass.onDisable.call(this)},onEnable:function(){if(this.rendered&&this.maskDisabled){this.el.unmask()}Ext.Panel.superclass.onEnable.call(this)},onResize:function(g,d,c,e){var a=g,b=d;if(Ext.isDefined(a)||Ext.isDefined(b)){if(!this.collapsed){if(Ext.isNumber(a)){this.body.setWidth(a=this.adjustBodyWidth(a-this.getFrameWidth()))}else{if(a=="auto"){a=this.body.setWidth("auto").dom.offsetWidth}else{a=this.body.dom.offsetWidth}}if(this.tbar){this.tbar.setWidth(a);if(this.topToolbar){this.topToolbar.setSize(a)}}if(this.bbar){this.bbar.setWidth(a);if(this.bottomToolbar){this.bottomToolbar.setSize(a);if(Ext.isIE){this.bbar.setStyle("position","static");this.bbar.setStyle("position","")}}}if(this.footer){this.footer.setWidth(a);if(this.fbar){this.fbar.setSize(Ext.isIE?(a-this.footer.getFrameWidth("lr")):"auto")}}if(Ext.isNumber(b)){b=Math.max(0,b-this.getFrameHeight());this.body.setHeight(b)}else{if(b=="auto"){this.body.setHeight(b)}}if(this.disabled&&this.el._mask){this.el._mask.setSize(this.el.dom.clientWidth,this.el.getHeight())}}else{this.queuedBodySize={width:a,height:b};if(!this.queuedExpand&&this.allowQueuedExpand!==false){this.queuedExpand=true;this.on("expand",function(){delete this.queuedExpand;this.onResize(this.queuedBodySize.width,this.queuedBodySize.height)},this,{single:true})}}this.onBodyResize(a,b)}this.syncShadow();Ext.Panel.superclass.onResize.call(this,g,d,c,e)},onBodyResize:function(a,b){this.fireEvent("bodyresize",this,a,b)},getToolbarHeight:function(){var a=0;if(this.rendered){Ext.each(this.toolbars,function(b){a+=b.getHeight()},this)}return a},adjustBodyHeight:function(a){return a},adjustBodyWidth:function(a){return a},onPosition:function(){this.syncShadow()},getFrameWidth:function(){var b=this.el.getFrameWidth("lr")+this.bwrap.getFrameWidth("lr");if(this.frame){var a=this.bwrap.dom.firstChild;b+=(Ext.fly(a).getFrameWidth("l")+Ext.fly(a.firstChild).getFrameWidth("r"));b+=this.mc.getFrameWidth("lr")}return b},getFrameHeight:function(){var a=this.el.getFrameWidth("tb")+this.bwrap.getFrameWidth("tb");a+=(this.tbar?this.tbar.getHeight():0)+(this.bbar?this.bbar.getHeight():0);if(this.frame){a+=this.el.dom.firstChild.offsetHeight+this.ft.dom.offsetHeight+this.mc.getFrameWidth("tb")}else{a+=(this.header?this.header.getHeight():0)+(this.footer?this.footer.getHeight():0)}return a},getInnerWidth:function(){return this.getSize().width-this.getFrameWidth()},getInnerHeight:function(){return this.body.getHeight()},syncShadow:function(){if(this.floating){this.el.sync(true)}},getLayoutTarget:function(){return this.body},getContentTarget:function(){return this.body},setTitle:function(b,a){this.title=b;if(this.header&&this.headerAsText){this.header.child("span").update(b)}if(a){this.setIconClass(a)}this.fireEvent("titlechange",this,b);return this},getUpdater:function(){return this.body.getUpdater()},load:function(){var a=this.body.getUpdater();a.update.apply(a,arguments);return this},beforeDestroy:function(){Ext.Panel.superclass.beforeDestroy.call(this);if(this.header){this.header.removeAllListeners()}if(this.tools){for(var a in this.tools){Ext.destroy(this.tools[a])}}if(this.toolbars.length>0){Ext.each(this.toolbars,function(b){b.un("afterlayout",this.syncHeight,this);b.un("remove",this.syncHeight,this)},this)}if(Ext.isArray(this.buttons)){while(this.buttons.length){Ext.destroy(this.buttons[0])}}if(this.rendered){Ext.destroy(this.ft,this.header,this.footer,this.tbar,this.bbar,this.body,this.mc,this.bwrap,this.dd);if(this.fbar){Ext.destroy(this.fbar,this.fbar.el)}}Ext.destroy(this.toolbars)},createClasses:function(){this.headerCls=this.baseCls+"-header";this.headerTextCls=this.baseCls+"-header-text";this.bwrapCls=this.baseCls+"-bwrap";this.tbarCls=this.baseCls+"-tbar";this.bodyCls=this.baseCls+"-body";this.bbarCls=this.baseCls+"-bbar";this.footerCls=this.baseCls+"-footer"},createGhost:function(a,e,b){var d=document.createElement("div");d.className="x-panel-ghost "+(a?a:"");if(this.header){d.appendChild(this.el.dom.firstChild.cloneNode(true))}Ext.fly(d.appendChild(document.createElement("ul"))).setHeight(this.bwrap.getHeight());d.style.width=this.el.dom.offsetWidth+"px";if(!b){this.container.dom.appendChild(d)}else{Ext.getDom(b).appendChild(d)}if(e!==false&&this.el.useShim!==false){var c=new Ext.Layer({shadow:false,useDisplay:true,constrain:false},d);c.show();return c}else{return new Ext.Element(d)}},doAutoLoad:function(){var a=this.body.getUpdater();if(this.renderer){a.setRenderer(this.renderer)}a.update(Ext.isObject(this.autoLoad)?this.autoLoad:{url:this.autoLoad})},getTool:function(a){return this.tools[a]}});Ext.reg("panel",Ext.Panel);Ext.Editor=function(b,a){if(b.field){this.field=Ext.create(b.field,"textfield");a=Ext.apply({},b);delete a.field}else{this.field=b}Ext.Editor.superclass.constructor.call(this,a)};Ext.extend(Ext.Editor,Ext.Component,{allowBlur:true,value:"",alignment:"c-c?",offsets:[0,0],shadow:"frame",constrain:false,swallowKeys:true,completeOnEnter:true,cancelOnEsc:true,updateEl:false,initComponent:function(){Ext.Editor.superclass.initComponent.call(this);this.addEvents("beforestartedit","startedit","beforecomplete","complete","canceledit","specialkey")},onRender:function(b,a){this.el=new Ext.Layer({shadow:this.shadow,cls:"x-editor",parentEl:b,shim:this.shim,shadowOffset:this.shadowOffset||4,id:this.id,constrain:this.constrain});if(this.zIndex){this.el.setZIndex(this.zIndex)}this.el.setStyle("overflow",Ext.isGecko?"auto":"hidden");if(this.field.msgTarget!="title"){this.field.msgTarget="qtip"}this.field.inEditor=true;this.mon(this.field,{scope:this,blur:this.onBlur,specialkey:this.onSpecialKey});if(this.field.grow){this.mon(this.field,"autosize",this.el.sync,this.el,{delay:1})}this.field.render(this.el).show();this.field.getEl().dom.name="";if(this.swallowKeys){this.field.el.swallowEvent(["keypress","keydown"])}},onSpecialKey:function(g,d){var b=d.getKey(),a=this.completeOnEnter&&b==d.ENTER,c=this.cancelOnEsc&&b==d.ESC;if(a||c){d.stopEvent();if(a){this.completeEdit()}else{this.cancelEdit()}if(g.triggerBlur){g.triggerBlur()}}this.fireEvent("specialkey",g,d)},startEdit:function(b,c){if(this.editing){this.completeEdit()}this.boundEl=Ext.get(b);var a=c!==undefined?c:this.boundEl.dom.innerHTML;if(!this.rendered){this.render(this.parentEl||document.body)}if(this.fireEvent("beforestartedit",this,this.boundEl,a)!==false){this.startValue=a;this.field.reset();this.field.setValue(a);this.realign(true);this.editing=true;this.show()}},doAutoSize:function(){if(this.autoSize){var b=this.boundEl.getSize(),a=this.field.getSize();switch(this.autoSize){case"width":this.setSize(b.width,a.height);break;case"height":this.setSize(a.width,b.height);break;case"none":this.setSize(a.width,a.height);break;default:this.setSize(b.width,b.height)}}},setSize:function(a,b){delete this.field.lastSize;this.field.setSize(a,b);if(this.el){if(Ext.isGecko2||Ext.isOpera||(Ext.isIE7&&Ext.isStrict)){this.el.setSize(a,b)}this.el.sync()}},realign:function(a){if(a===true){this.doAutoSize()}this.el.alignTo(this.boundEl,this.alignment,this.offsets)},completeEdit:function(a){if(!this.editing){return}if(this.field.assertValue){this.field.assertValue()}var b=this.getValue();if(!this.field.isValid()){if(this.revertInvalid!==false){this.cancelEdit(a)}return}if(String(b)===String(this.startValue)&&this.ignoreNoChange){this.hideEdit(a);return}if(this.fireEvent("beforecomplete",this,b,this.startValue)!==false){b=this.getValue();if(this.updateEl&&this.boundEl){this.boundEl.update(b)}this.hideEdit(a);this.fireEvent("complete",this,b,this.startValue)}},onShow:function(){this.el.show();if(this.hideEl!==false){this.boundEl.hide()}this.field.show().focus(false,true);this.fireEvent("startedit",this.boundEl,this.startValue)},cancelEdit:function(a){if(this.editing){var b=this.getValue();this.setValue(this.startValue);this.hideEdit(a);this.fireEvent("canceledit",this,b,this.startValue)}},hideEdit:function(a){if(a!==true){this.editing=false;this.hide()}},onBlur:function(){if(this.allowBlur===true&&this.editing&&this.selectSameEditor!==true){this.completeEdit()}},onHide:function(){if(this.editing){this.completeEdit();return}this.field.blur();if(this.field.collapse){this.field.collapse()}this.el.hide();if(this.hideEl!==false){this.boundEl.show()}},setValue:function(a){this.field.setValue(a)},getValue:function(){return this.field.getValue()},beforeDestroy:function(){Ext.destroyMembers(this,"field");delete this.parentEl;delete this.boundEl}});Ext.reg("editor",Ext.Editor);Ext.ColorPalette=Ext.extend(Ext.Component,{itemCls:"x-color-palette",value:null,clickEvent:"click",ctype:"Ext.ColorPalette",allowReselect:false,colors:["000000","993300","333300","003300","003366","000080","333399","333333","800000","FF6600","808000","008000","008080","0000FF","666699","808080","FF0000","FF9900","99CC00","339966","33CCCC","3366FF","800080","969696","FF00FF","FFCC00","FFFF00","00FF00","00FFFF","00CCFF","993366","C0C0C0","FF99CC","FFCC99","FFFF99","CCFFCC","CCFFFF","99CCFF","CC99FF","FFFFFF"],initComponent:function(){Ext.ColorPalette.superclass.initComponent.call(this);this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope,true)}},onRender:function(b,a){this.autoEl={tag:"div",cls:this.itemCls};Ext.ColorPalette.superclass.onRender.call(this,b,a);var c=this.tpl||new Ext.XTemplate(' ');c.overwrite(this.el,this.colors);this.mon(this.el,this.clickEvent,this.handleClick,this,{delegate:"a"});if(this.clickEvent!="click"){this.mon(this.el,"click",Ext.emptyFn,this,{delegate:"a",preventDefault:true})}},afterRender:function(){Ext.ColorPalette.superclass.afterRender.call(this);if(this.value){var a=this.value;this.value=null;this.select(a,true)}},handleClick:function(b,a){b.preventDefault();if(!this.disabled){var d=a.className.match(/(?:^|\s)color-(.{6})(?:\s|$)/)[1];this.select(d.toUpperCase())}},select:function(b,a){b=b.replace("#","");if(b!=this.value||this.allowReselect){var c=this.el;if(this.value){c.child("a.color-"+this.value).removeClass("x-color-palette-sel")}c.child("a.color-"+b).addClass("x-color-palette-sel");this.value=b;if(a!==true){this.fireEvent("select",this,b)}}}});Ext.reg("colorpalette",Ext.ColorPalette);Ext.DatePicker=Ext.extend(Ext.BoxComponent,{todayText:"Today",okText:" OK ",cancelText:"Cancel",todayTip:"{0} (Spacebar)",minText:"This date is before the minimum date",maxText:"This date is after the maximum date",format:"m/d/y",disabledDaysText:"Disabled",disabledDatesText:"Disabled",monthNames:Date.monthNames,dayNames:Date.dayNames,nextText:"Next Month (Control+Right)",prevText:"Previous Month (Control+Left)",monthYearText:"Choose a month (Control+Up/Down to move years)",startDay:0,showToday:true,focusOnSelect:true,initHour:12,initComponent:function(){Ext.DatePicker.superclass.initComponent.call(this);this.value=this.value?this.value.clearTime(true):new Date().clearTime();this.addEvents("select");if(this.handler){this.on("select",this.handler,this.scope||this)}this.initDisabledDays()},initDisabledDays:function(){if(!this.disabledDatesRE&&this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){if(Ext.isArray(a)){this.disabledDates=a;this.disabledDatesRE=null}else{this.disabledDatesRE=a}this.initDisabledDays();this.update(this.value,true)},setDisabledDays:function(a){this.disabledDays=a;this.update(this.value,true)},setMinDate:function(a){this.minDate=a;this.update(this.value,true)},setMaxDate:function(a){this.maxDate=a;this.update(this.value,true)},setValue:function(a){this.value=a.clearTime(true);this.update(this.value)},getValue:function(){return this.value},focus:function(){this.update(this.activeDate)},onEnable:function(a){Ext.DatePicker.superclass.onEnable.call(this);this.doDisabled(false);this.update(a?this.value:this.activeDate);if(Ext.isIE){this.el.repaint()}},onDisable:function(){Ext.DatePicker.superclass.onDisable.call(this);this.doDisabled(true);if(Ext.isIE&&!Ext.isIE8){Ext.each([].concat(this.textNodes,this.el.query("th span")),function(a){Ext.fly(a).repaint()})}},doDisabled:function(a){this.keyNav.setDisabled(a);this.prevRepeater.setDisabled(a);this.nextRepeater.setDisabled(a);if(this.showToday){this.todayKeyListener.setDisabled(a);this.todayBtn.setDisabled(a)}},onRender:function(e,b){var a=['','','",this.showToday?'':"",'
      
    '],c=this.dayNames,h;for(h=0;h<7;h++){var k=this.startDay+h;if(k>6){k=k-7}a.push("")}a[a.length]="";for(h=0;h<42;h++){if(h%7===0&&h!==0){a[a.length]=""}a[a.length]=''}a.push("
    ",c[k].substr(0,1),"
    ');var j=document.createElement("div");j.className="x-date-picker";j.innerHTML=a.join("");e.dom.insertBefore(j,b);this.el=Ext.get(j);this.eventEl=Ext.get(j.firstChild);this.prevRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-left a"),{handler:this.showPrevMonth,scope:this,preventDefault:true,stopDefault:true});this.nextRepeater=new Ext.util.ClickRepeater(this.el.child("td.x-date-right a"),{handler:this.showNextMonth,scope:this,preventDefault:true,stopDefault:true});this.monthPicker=this.el.down("div.x-date-mp");this.monthPicker.enableDisplayMode("block");this.keyNav=new Ext.KeyNav(this.eventEl,{left:function(d){if(d.ctrlKey){this.showPrevMonth()}else{this.update(this.activeDate.add("d",-1))}},right:function(d){if(d.ctrlKey){this.showNextMonth()}else{this.update(this.activeDate.add("d",1))}},up:function(d){if(d.ctrlKey){this.showNextYear()}else{this.update(this.activeDate.add("d",-7))}},down:function(d){if(d.ctrlKey){this.showPrevYear()}else{this.update(this.activeDate.add("d",7))}},pageUp:function(d){this.showNextMonth()},pageDown:function(d){this.showPrevMonth()},enter:function(d){d.stopPropagation();return true},scope:this});this.el.unselectable();this.cells=this.el.select("table.x-date-inner tbody td");this.textNodes=this.el.query("table.x-date-inner tbody span");this.mbtn=new Ext.Button({text:" ",tooltip:this.monthYearText,renderTo:this.el.child("td.x-date-middle",true)});this.mbtn.el.child("em").addClass("x-btn-arrow");if(this.showToday){this.todayKeyListener=this.eventEl.addKeyListener(Ext.EventObject.SPACE,this.selectToday,this);var g=(new Date()).dateFormat(this.format);this.todayBtn=new Ext.Button({renderTo:this.el.child("td.x-date-bottom",true),text:String.format(this.todayText,g),tooltip:String.format(this.todayTip,g),handler:this.selectToday,scope:this})}this.mon(this.eventEl,"mousewheel",this.handleMouseWheel,this);this.mon(this.eventEl,"click",this.handleDateClick,this,{delegate:"a.x-date-date"});this.mon(this.mbtn,"click",this.showMonthPicker,this);this.onEnable(true)},createMonthPicker:function(){if(!this.monthPicker.dom.firstChild){var a=[''];for(var b=0;b<6;b++){a.push('",'",b===0?'':'')}a.push('","
    ',Date.getShortMonthName(b),"',Date.getShortMonthName(b+6),"
    ");this.monthPicker.update(a.join(""));this.mon(this.monthPicker,"click",this.onMonthClick,this);this.mon(this.monthPicker,"dblclick",this.onMonthDblClick,this);this.mpMonths=this.monthPicker.select("td.x-date-mp-month");this.mpYears=this.monthPicker.select("td.x-date-mp-year");this.mpMonths.each(function(c,d,e){e+=1;if((e%2)===0){c.dom.xmonth=5+Math.round(e*0.5)}else{c.dom.xmonth=Math.round((e-1)*0.5)}})}},showMonthPicker:function(){if(!this.disabled){this.createMonthPicker();var a=this.el.getSize();this.monthPicker.setSize(a);this.monthPicker.child("table").setSize(a);this.mpSelMonth=(this.activeDate||this.value).getMonth();this.updateMPMonth(this.mpSelMonth);this.mpSelYear=(this.activeDate||this.value).getFullYear();this.updateMPYear(this.mpSelYear);this.monthPicker.slideIn("t",{duration:0.2})}},updateMPYear:function(e){this.mpyear=e;var c=this.mpYears.elements;for(var b=1;b<=10;b++){var d=c[b-1],a;if((b%2)===0){a=e+Math.round(b*0.5);d.firstChild.innerHTML=a;d.xyear=a}else{a=e-(5-Math.round(b*0.5));d.firstChild.innerHTML=a;d.xyear=a}this.mpYears.item(b-1)[a==this.mpSelYear?"addClass":"removeClass"]("x-date-mp-sel")}},updateMPMonth:function(a){this.mpMonths.each(function(b,c,d){b[b.dom.xmonth==a?"addClass":"removeClass"]("x-date-mp-sel")})},selectMPMonth:function(a){},onMonthClick:function(g,b){g.stopEvent();var c=new Ext.Element(b),a;if(c.is("button.x-date-mp-cancel")){this.hideMonthPicker()}else{if(c.is("button.x-date-mp-ok")){var h=new Date(this.mpSelYear,this.mpSelMonth,(this.activeDate||this.value).getDate());if(h.getMonth()!=this.mpSelMonth){h=new Date(this.mpSelYear,this.mpSelMonth,1).getLastDateOfMonth()}this.update(h);this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-month",2))){this.mpMonths.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelMonth=a.dom.xmonth}else{if((a=c.up("td.x-date-mp-year",2))){this.mpYears.removeClass("x-date-mp-sel");a.addClass("x-date-mp-sel");this.mpSelYear=a.dom.xyear}else{if(c.is("a.x-date-mp-prev")){this.updateMPYear(this.mpyear-10)}else{if(c.is("a.x-date-mp-next")){this.updateMPYear(this.mpyear+10)}}}}}}},onMonthDblClick:function(d,b){d.stopEvent();var c=new Ext.Element(b),a;if((a=c.up("td.x-date-mp-month",2))){this.update(new Date(this.mpSelYear,a.dom.xmonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}else{if((a=c.up("td.x-date-mp-year",2))){this.update(new Date(a.dom.xyear,this.mpSelMonth,(this.activeDate||this.value).getDate()));this.hideMonthPicker()}}},hideMonthPicker:function(a){if(this.monthPicker){if(a===true){this.monthPicker.hide()}else{this.monthPicker.slideOut("t",{duration:0.2})}}},showPrevMonth:function(a){this.update(this.activeDate.add("mo",-1))},showNextMonth:function(a){this.update(this.activeDate.add("mo",1))},showPrevYear:function(){this.update(this.activeDate.add("y",-1))},showNextYear:function(){this.update(this.activeDate.add("y",1))},handleMouseWheel:function(a){a.stopEvent();if(!this.disabled){var b=a.getWheelDelta();if(b>0){this.showPrevMonth()}else{if(b<0){this.showNextMonth()}}}},handleDateClick:function(b,a){b.stopEvent();if(!this.disabled&&a.dateValue&&!Ext.fly(a.parentNode).hasClass("x-date-disabled")){this.cancelFocus=this.focusOnSelect===false;this.setValue(new Date(a.dateValue));delete this.cancelFocus;this.fireEvent("select",this,this.value)}},selectToday:function(){if(this.todayBtn&&!this.todayBtn.disabled){this.setValue(new Date().clearTime());this.fireEvent("select",this,this.value)}},update:function(G,A){if(this.rendered){var a=this.activeDate,p=this.isVisible();this.activeDate=G;if(!A&&a&&this.el){var o=G.getTime();if(a.getMonth()==G.getMonth()&&a.getFullYear()==G.getFullYear()){this.cells.removeClass("x-date-selected");this.cells.each(function(d){if(d.dom.firstChild.dateValue==o){d.addClass("x-date-selected");if(p&&!this.cancelFocus){Ext.fly(d.dom.firstChild).focus(50)}return false}},this);return}}var k=G.getDaysInMonth(),q=G.getFirstDateOfMonth(),g=q.getDay()-this.startDay;if(g<0){g+=7}k+=g;var B=G.add("mo",-1),h=B.getDaysInMonth()-g,e=this.cells.elements,r=this.textNodes,D=(new Date(B.getFullYear(),B.getMonth(),h,this.initHour)),C=new Date().clearTime().getTime(),v=G.clearTime(true).getTime(),u=this.minDate?this.minDate.clearTime(true):Number.NEGATIVE_INFINITY,y=this.maxDate?this.maxDate.clearTime(true):Number.POSITIVE_INFINITY,F=this.disabledDatesRE,s=this.disabledDatesText,I=this.disabledDays?this.disabledDays.join(""):false,E=this.disabledDaysText,z=this.format;if(this.showToday){var m=new Date().clearTime(),c=(my||(F&&z&&F.test(m.dateFormat(z)))||(I&&I.indexOf(m.getDay())!=-1));if(!this.disabled){this.todayBtn.setDisabled(c);this.todayKeyListener[c?"disable":"enable"]()}}var l=function(J,d){d.title="";var i=D.clearTime(true).getTime();d.firstChild.dateValue=i;if(i==C){d.className+=" x-date-today";d.title=J.todayText}if(i==v){d.className+=" x-date-selected";if(p){Ext.fly(d.firstChild).focus(50)}}if(iy){d.className=" x-date-disabled";d.title=J.maxText;return}if(I){if(I.indexOf(D.getDay())!=-1){d.title=E;d.className=" x-date-disabled"}}if(F&&z){var w=D.dateFormat(z);if(F.test(w)){d.title=s.replace("%0",w);d.className=" x-date-disabled"}}};var x=0;for(;x=a.value){d=a.value}}c.setValue(b,d,false);c.fireEvent("drag",c,g,this)},getNewValue:function(){var a=this.slider,b=a.innerEl.translatePoints(this.tracker.getXY());return Ext.util.Format.round(a.reverseValue(b.left),a.decimalPrecision)},onDragEnd:function(c){var a=this.slider,b=this.value;this.el.removeClass("x-slider-thumb-drag");this.dragging=false;a.fireEvent("dragend",a,c);if(this.dragStartValue!=b){a.fireEvent("changecomplete",a,b,this)}},destroy:function(){Ext.destroyMembers(this,"tracker","el")}});Ext.slider.MultiSlider=Ext.extend(Ext.BoxComponent,{vertical:false,minValue:0,maxValue:100,decimalPrecision:0,keyIncrement:1,increment:0,clickRange:[5,15],clickToChange:true,animate:true,constrainThumbs:true,topThumbZIndex:10000,initComponent:function(){if(!Ext.isDefined(this.value)){this.value=this.minValue}this.thumbs=[];Ext.slider.MultiSlider.superclass.initComponent.call(this);this.keyIncrement=Math.max(this.increment,this.keyIncrement);this.addEvents("beforechange","change","changecomplete","dragstart","drag","dragend");if(this.values==undefined||Ext.isEmpty(this.values)){this.values=[0]}var a=this.values;for(var b=0;bthis.clickRange[0]&&c.top=c){d+=c}else{if(a*2<-c){d-=c}}}return d.constrain(this.minValue,this.maxValue)},afterRender:function(){Ext.slider.MultiSlider.superclass.afterRender.apply(this,arguments);for(var c=0;ce?e:c.value}this.syncThumb()},setValue:function(d,c,b,g){var a=this.thumbs[d],e=a.el;c=this.normalizeValue(c);if(c!==a.value&&this.fireEvent("beforechange",this,c,a.value,a)!==false){a.value=c;if(this.rendered){this.moveThumb(d,this.translateValue(c),b!==false);this.fireEvent("change",this,c,a);if(g){this.fireEvent("changecomplete",this,c,a)}}}},translateValue:function(a){var b=this.getRatio();return(a*b)-(this.minValue*b)-this.halfThumb},reverseValue:function(b){var a=this.getRatio();return(b+(this.minValue*a))/a},moveThumb:function(d,c,b){var a=this.thumbs[d].el;if(!b||this.animate===false){a.setLeft(c)}else{a.shift({left:c,stopFx:true,duration:0.35})}},focus:function(){this.focusEl.focus(10)},onResize:function(c,e){var b=this.thumbs,a=b.length,d=0;for(;dthis.clickRange[0]&&c.left','
    ','
    ','
    ',"
     
    ","
    ","
    ",'
    ',"
     
    ","
    ","
    ","");this.el=a?c.insertBefore(a,{cls:this.baseCls},true):c.append(d,{cls:this.baseCls},true);if(this.id){this.el.dom.id=this.id}var b=this.el.dom.firstChild;this.progressBar=Ext.get(b.firstChild);if(this.textEl){this.textEl=Ext.get(this.textEl);delete this.textTopEl}else{this.textTopEl=Ext.get(this.progressBar.dom.firstChild);var e=Ext.get(b.childNodes[1]);this.textTopEl.setStyle("z-index",99).addClass("x-hidden");this.textEl=new Ext.CompositeElement([this.textTopEl.dom.firstChild,e.dom.firstChild]);this.textEl.setWidth(b.offsetWidth)}this.progressBar.setHeight(b.offsetHeight)},afterRender:function(){Ext.ProgressBar.superclass.afterRender.call(this);if(this.value){this.updateProgress(this.value,this.text)}else{this.updateText(this.text)}},updateProgress:function(c,d,b){this.value=c||0;if(d){this.updateText(d)}if(this.rendered&&!this.isDestroyed){var a=Math.floor(c*this.el.dom.firstChild.offsetWidth);this.progressBar.setWidth(a,b===true||(b!==false&&this.animate));if(this.textTopEl){this.textTopEl.removeClass("x-hidden").setWidth(a)}}this.fireEvent("update",this,c,d);return this},wait:function(b){if(!this.waitTimer){var a=this;b=b||{};this.updateText(b.text);this.waitTimer=Ext.TaskMgr.start({run:function(c){var d=b.increment||10;c-=1;this.updateProgress(((((c+d)%d)+1)*(100/d))*0.01,null,b.animate)},interval:b.interval||1000,duration:b.duration,onStop:function(){if(b.fn){b.fn.apply(b.scope||this)}this.reset()},scope:a})}return this},isWaiting:function(){return this.waitTimer!==null},updateText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text)}return this},syncProgressBar:function(){if(this.value){this.updateProgress(this.value,this.text)}return this},setSize:function(a,c){Ext.ProgressBar.superclass.setSize.call(this,a,c);if(this.textTopEl){var b=this.el.dom.firstChild;this.textEl.setSize(b.offsetWidth,b.offsetHeight)}this.syncProgressBar();return this},reset:function(a){this.updateProgress(0);if(this.textTopEl){this.textTopEl.addClass("x-hidden")}this.clearTimer();if(a===true){this.hide()}return this},clearTimer:function(){if(this.waitTimer){this.waitTimer.onStop=null;Ext.TaskMgr.stop(this.waitTimer);this.waitTimer=null}},onDestroy:function(){this.clearTimer();if(this.rendered){if(this.textEl.isComposite){this.textEl.clear()}Ext.destroyMembers(this,"textEl","progressBar","textTopEl")}Ext.ProgressBar.superclass.onDestroy.call(this)}});Ext.reg("progress",Ext.ProgressBar);(function(){var a=Ext.EventManager;var b=Ext.lib.Dom;Ext.dd.DragDrop=function(e,c,d){if(e){this.init(e,c,d)}};Ext.dd.DragDrop.prototype={id:null,config:null,dragElId:null,handleElId:null,invalidHandleTypes:null,invalidHandleIds:null,invalidHandleClasses:null,startPageX:0,startPageY:0,groups:null,locked:false,lock:function(){this.locked=true},moveOnly:false,unlock:function(){this.locked=false},isTarget:true,padding:null,_domRef:null,__ygDragDrop:true,constrainX:false,constrainY:false,minX:0,maxX:0,minY:0,maxY:0,maintainOffset:false,xTicks:null,yTicks:null,primaryButtonOnly:true,available:false,hasOuterHandles:false,b4StartDrag:function(c,d){},startDrag:function(c,d){},b4Drag:function(c){},onDrag:function(c){},onDragEnter:function(c,d){},b4DragOver:function(c){},onDragOver:function(c,d){},b4DragOut:function(c){},onDragOut:function(c,d){},b4DragDrop:function(c){},onDragDrop:function(c,d){},onInvalidDrop:function(c){},b4EndDrag:function(c){},endDrag:function(c){},b4MouseDown:function(c){},onMouseDown:function(c){},onMouseUp:function(c){},onAvailable:function(){},defaultPadding:{left:0,right:0,top:0,bottom:0},constrainTo:function(j,h,o){if(Ext.isNumber(h)){h={left:h,right:h,top:h,bottom:h}}h=h||this.defaultPadding;var l=Ext.get(this.getEl()).getBox(),d=Ext.get(j),n=d.getScroll(),k,e=d.dom;if(e==document.body){k={x:n.left,y:n.top,width:Ext.lib.Dom.getViewWidth(),height:Ext.lib.Dom.getViewHeight()}}else{var m=d.getXY();k={x:m[0],y:m[1],width:e.clientWidth,height:e.clientHeight}}var i=l.y-k.y,g=l.x-k.x;this.resetConstraints();this.setXConstraint(g-(h.left||0),k.width-g-l.width-(h.right||0),this.xTickSize);this.setYConstraint(i-(h.top||0),k.height-i-l.height-(h.bottom||0),this.yTickSize)},getEl:function(){if(!this._domRef){this._domRef=Ext.getDom(this.id)}return this._domRef},getDragEl:function(){return Ext.getDom(this.dragElId)},init:function(e,c,d){this.initTarget(e,c,d);a.on(this.id,"mousedown",this.handleMouseDown,this)},initTarget:function(e,c,d){this.config=d||{};this.DDM=Ext.dd.DDM;this.groups={};if(typeof e!=="string"){e=Ext.id(e)}this.id=e;this.addToGroup((c)?c:"default");this.handleElId=e;this.setDragElId(e);this.invalidHandleTypes={A:"A"};this.invalidHandleIds={};this.invalidHandleClasses=[];this.applyConfig();this.handleOnAvailable()},applyConfig:function(){this.padding=this.config.padding||[0,0,0,0];this.isTarget=(this.config.isTarget!==false);this.maintainOffset=(this.config.maintainOffset);this.primaryButtonOnly=(this.config.primaryButtonOnly!==false)},handleOnAvailable:function(){this.available=true;this.resetConstraints();this.onAvailable()},setPadding:function(e,c,g,d){if(!c&&0!==c){this.padding=[e,e,e,e]}else{if(!g&&0!==g){this.padding=[e,c,e,c]}else{this.padding=[e,c,g,d]}}},setInitPosition:function(g,e){var h=this.getEl();if(!this.DDM.verifyEl(h)){return}var d=g||0;var c=e||0;var i=b.getXY(h);this.initPageX=i[0]-d;this.initPageY=i[1]-c;this.lastPageX=i[0];this.lastPageY=i[1];this.setStartPosition(i)},setStartPosition:function(d){var c=d||b.getXY(this.getEl());this.deltaSetXY=null;this.startPageX=c[0];this.startPageY=c[1]},addToGroup:function(c){this.groups[c]=true;this.DDM.regDragDrop(this,c)},removeFromGroup:function(c){if(this.groups[c]){delete this.groups[c]}this.DDM.removeDDFromGroup(this,c)},setDragElId:function(c){this.dragElId=c},setHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.handleElId=c;this.DDM.regHandle(this.id,c)},setOuterHandleElId:function(c){if(typeof c!=="string"){c=Ext.id(c)}a.on(c,"mousedown",this.handleMouseDown,this);this.setHandleElId(c);this.hasOuterHandles=true},unreg:function(){a.un(this.id,"mousedown",this.handleMouseDown);this._domRef=null;this.DDM._remove(this)},destroy:function(){this.unreg()},isLocked:function(){return(this.DDM.isLocked()||this.locked)},handleMouseDown:function(g,d){if(this.primaryButtonOnly&&g.button!=0){return}if(this.isLocked()){return}this.DDM.refreshCache(this.groups);var c=new Ext.lib.Point(Ext.lib.Event.getPageX(g),Ext.lib.Event.getPageY(g));if(!this.hasOuterHandles&&!this.DDM.isOverTarget(c,this)){}else{if(this.clickValidator(g)){this.setStartPosition();this.b4MouseDown(g);this.onMouseDown(g);this.DDM.handleMouseDown(g,this);this.DDM.stopEvent(g)}else{}}},clickValidator:function(d){var c=d.getTarget();return(this.isValidHandleChild(c)&&(this.id==this.handleElId||this.DDM.handleWasClicked(c,this.id)))},addInvalidHandleType:function(c){var d=c.toUpperCase();this.invalidHandleTypes[d]=d},addInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}this.invalidHandleIds[c]=c},addInvalidHandleClass:function(c){this.invalidHandleClasses.push(c)},removeInvalidHandleType:function(c){var d=c.toUpperCase();delete this.invalidHandleTypes[d]},removeInvalidHandleId:function(c){if(typeof c!=="string"){c=Ext.id(c)}delete this.invalidHandleIds[c]},removeInvalidHandleClass:function(d){for(var e=0,c=this.invalidHandleClasses.length;e=this.minX;d=d-c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}for(d=this.initPageX;d<=this.maxX;d=d+c){if(!e[d]){this.xTicks[this.xTicks.length]=d;e[d]=true}}this.xTicks.sort(this.DDM.numericSort)},setYTicks:function(g,c){this.yTicks=[];this.yTickSize=c;var e={};for(var d=this.initPageY;d>=this.minY;d=d-c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}for(d=this.initPageY;d<=this.maxY;d=d+c){if(!e[d]){this.yTicks[this.yTicks.length]=d;e[d]=true}}this.yTicks.sort(this.DDM.numericSort)},setXConstraint:function(e,d,c){this.leftConstraint=e;this.rightConstraint=d;this.minX=this.initPageX-e;this.maxX=this.initPageX+d;if(c){this.setXTicks(this.initPageX,c)}this.constrainX=true},clearConstraints:function(){this.constrainX=false;this.constrainY=false;this.clearTicks()},clearTicks:function(){this.xTicks=null;this.yTicks=null;this.xTickSize=0;this.yTickSize=0},setYConstraint:function(c,e,d){this.topConstraint=c;this.bottomConstraint=e;this.minY=this.initPageY-c;this.maxY=this.initPageY+e;if(d){this.setYTicks(this.initPageY,d)}this.constrainY=true},resetConstraints:function(){if(this.initPageX||this.initPageX===0){var d=(this.maintainOffset)?this.lastPageX-this.initPageX:0;var c=(this.maintainOffset)?this.lastPageY-this.initPageY:0;this.setInitPosition(d,c)}else{this.setInitPosition()}if(this.constrainX){this.setXConstraint(this.leftConstraint,this.rightConstraint,this.xTickSize)}if(this.constrainY){this.setYConstraint(this.topConstraint,this.bottomConstraint,this.yTickSize)}},getTick:function(k,g){if(!g){return k}else{if(g[0]>=k){return g[0]}else{for(var d=0,c=g.length;d=k){var j=k-g[d];var h=g[e]-k;return(h>j)?g[d]:g[e]}}return g[g.length-1]}}},toString:function(){return("DragDrop "+this.id)}}})();if(!Ext.dd.DragDropMgr){Ext.dd.DragDropMgr=function(){var a=Ext.EventManager;return{ids:{},handleIds:{},dragCurrent:null,dragOvers:{},deltaX:0,deltaY:0,preventDefault:true,stopPropagation:true,initialized:false,locked:false,init:function(){this.initialized=true},POINT:0,INTERSECT:1,mode:0,_execOnAll:function(d,c){for(var e in this.ids){for(var b in this.ids[e]){var g=this.ids[e][b];if(!this.isTypeOfDD(g)){continue}g[d].apply(g,c)}}},_onLoad:function(){this.init();a.on(document,"mouseup",this.handleMouseUp,this,true);a.on(document,"mousemove",this.handleMouseMove,this,true);a.on(window,"unload",this._onUnload,this,true);a.on(window,"resize",this._onResize,this,true)},_onResize:function(b){this._execOnAll("resetConstraints",[])},lock:function(){this.locked=true},unlock:function(){this.locked=false},isLocked:function(){return this.locked},locationCache:{},useCache:true,clickPixelThresh:3,clickTimeThresh:350,dragThreshMet:false,clickTimeout:null,startX:0,startY:0,regDragDrop:function(c,b){if(!this.initialized){this.init()}if(!this.ids[b]){this.ids[b]={}}this.ids[b][c.id]=c},removeDDFromGroup:function(d,b){if(!this.ids[b]){this.ids[b]={}}var c=this.ids[b];if(c&&c[d.id]){delete c[d.id]}},_remove:function(c){for(var b in c.groups){if(b&&this.ids[b]&&this.ids[b][c.id]){delete this.ids[b][c.id]}}delete this.handleIds[c.id]},regHandle:function(c,b){if(!this.handleIds[c]){this.handleIds[c]={}}this.handleIds[c][b]=b},isDragDrop:function(b){return(this.getDDById(b))?true:false},getRelated:function(h,c){var g=[];for(var e in h.groups){for(var d in this.ids[e]){var b=this.ids[e][d];if(!this.isTypeOfDD(b)){continue}if(!c||b.isTarget){g[g.length]=b}}}return g},isLegalTarget:function(g,e){var c=this.getRelated(g,true);for(var d=0,b=c.length;dthis.clickPixelThresh||b>this.clickPixelThresh){this.startDrag(this.startX,this.startY)}}if(this.dragThreshMet){this.dragCurrent.b4Drag(d);this.dragCurrent.onDrag(d);if(!this.dragCurrent.moveOnly){this.fireEvents(d,false)}}this.stopEvent(d);return true},fireEvents:function(n,o){var q=this.dragCurrent;if(!q||q.isLocked()){return}var r=n.getPoint();var b=[];var g=[];var l=[];var j=[];var d=[];for(var h in this.dragOvers){var c=this.dragOvers[h];if(!this.isTypeOfDD(c)){continue}if(!this.isOverTarget(r,c,this.mode)){g.push(c)}b[h]=true;delete this.dragOvers[h]}for(var p in q.groups){if("string"!=typeof p){continue}for(h in this.ids[p]){var k=this.ids[p][h];if(!this.isTypeOfDD(k)){continue}if(k.isTarget&&!k.isLocked()&&((k!=q)||(q.ignoreSelf===false))){if(this.isOverTarget(r,k,this.mode)){if(o){j.push(k)}else{if(!b[k.id]){d.push(k)}else{l.push(k)}this.dragOvers[k.id]=k}}}}}if(this.mode){if(g.length){q.b4DragOut(n,g);q.onDragOut(n,g)}if(d.length){q.onDragEnter(n,d)}if(l.length){q.b4DragOver(n,l);q.onDragOver(n,l)}if(j.length){q.b4DragDrop(n,j);q.onDragDrop(n,j)}}else{var m=0;for(h=0,m=g.length;h2000){}else{setTimeout(b._addListeners,10);if(document&&document.body){b._timeoutCount+=1}}}},handleWasClicked:function(b,d){if(this.isHandle(d,b.id)){return true}else{var c=b.parentNode;while(c){if(this.isHandle(d,c.id)){return true}else{c=c.parentNode}}}return false}}}();Ext.dd.DDM=Ext.dd.DragDropMgr;Ext.dd.DDM._addListeners()}Ext.dd.DD=function(c,a,b){if(c){this.init(c,a,b)}};Ext.extend(Ext.dd.DD,Ext.dd.DragDrop,{scroll:true,autoOffset:function(c,b){var a=c-this.startPageX;var d=b-this.startPageY;this.setDelta(a,d)},setDelta:function(b,a){this.deltaX=b;this.deltaY=a},setDragElPos:function(c,b){var a=this.getDragEl();this.alignElWithMouse(a,c,b)},alignElWithMouse:function(c,h,g){var e=this.getTargetCoord(h,g);var b=c.dom?c:Ext.fly(c,"_dd");if(!this.deltaSetXY){var i=[e.x,e.y];b.setXY(i);var d=b.getLeft(true);var a=b.getTop(true);this.deltaSetXY=[d-e.x,a-e.y]}else{b.setLeftTop(e.x+this.deltaSetXY[0],e.y+this.deltaSetXY[1])}this.cachePosition(e.x,e.y);this.autoScroll(e.x,e.y,c.offsetHeight,c.offsetWidth);return e},cachePosition:function(b,a){if(b){this.lastPageX=b;this.lastPageY=a}else{var c=Ext.lib.Dom.getXY(this.getEl());this.lastPageX=c[0];this.lastPageY=c[1]}},autoScroll:function(l,k,e,m){if(this.scroll){var n=Ext.lib.Dom.getViewHeight();var b=Ext.lib.Dom.getViewWidth();var p=this.DDM.getScrollTop();var d=this.DDM.getScrollLeft();var j=e+k;var o=m+l;var i=(n+p-k-this.deltaY);var g=(b+d-l-this.deltaX);var c=40;var a=(document.all)?80:30;if(j>n&&i0&&k-pb&&g0&&l-dthis.maxX){a=this.maxX}}if(this.constrainY){if(dthis.maxY){d=this.maxY}}a=this.getTick(a,this.xTicks);d=this.getTick(d,this.yTicks);return{x:a,y:d}},applyConfig:function(){Ext.dd.DD.superclass.applyConfig.call(this);this.scroll=(this.config.scroll!==false)},b4MouseDown:function(a){this.autoOffset(a.getPageX(),a.getPageY())},b4Drag:function(a){this.setDragElPos(a.getPageX(),a.getPageY())},toString:function(){return("DD "+this.id)}});Ext.dd.DDProxy=function(c,a,b){if(c){this.init(c,a,b);this.initFrame()}};Ext.dd.DDProxy.dragElId="ygddfdiv";Ext.extend(Ext.dd.DDProxy,Ext.dd.DD,{resizeFrame:true,centerFrame:false,createFrame:function(){var b=this;var a=document.body;if(!a||!a.firstChild){setTimeout(function(){b.createFrame()},50);return}var d=this.getDragEl();if(!d){d=document.createElement("div");d.id=this.dragElId;var c=d.style;c.position="absolute";c.visibility="hidden";c.cursor="move";c.border="2px solid #aaa";c.zIndex=999;a.insertBefore(d,a.firstChild)}},initFrame:function(){this.createFrame()},applyConfig:function(){Ext.dd.DDProxy.superclass.applyConfig.call(this);this.resizeFrame=(this.config.resizeFrame!==false);this.centerFrame=(this.config.centerFrame);this.setDragElId(this.config.dragElId||Ext.dd.DDProxy.dragElId)},showFrame:function(e,d){var c=this.getEl();var a=this.getDragEl();var b=a.style;this._resizeProxy();if(this.centerFrame){this.setDelta(Math.round(parseInt(b.width,10)/2),Math.round(parseInt(b.height,10)/2))}this.setDragElPos(e,d);Ext.fly(a).show()},_resizeProxy:function(){if(this.resizeFrame){var a=this.getEl();Ext.fly(this.getDragEl()).setSize(a.offsetWidth,a.offsetHeight)}},b4MouseDown:function(b){var a=b.getPageX();var c=b.getPageY();this.autoOffset(a,c);this.setDragElPos(a,c)},b4StartDrag:function(a,b){this.showFrame(a,b)},b4EndDrag:function(a){Ext.fly(this.getDragEl()).hide()},endDrag:function(c){var b=this.getEl();var a=this.getDragEl();a.style.visibility="";this.beforeMove();b.style.visibility="hidden";Ext.dd.DDM.moveToEl(b,a);a.style.visibility="hidden";b.style.visibility="";this.afterDrag()},beforeMove:function(){},afterDrag:function(){},toString:function(){return("DDProxy "+this.id)}});Ext.dd.DDTarget=function(c,a,b){if(c){this.initTarget(c,a,b)}};Ext.extend(Ext.dd.DDTarget,Ext.dd.DragDrop,{getDragEl:Ext.emptyFn,isValidHandleChild:Ext.emptyFn,startDrag:Ext.emptyFn,endDrag:Ext.emptyFn,onDrag:Ext.emptyFn,onDragDrop:Ext.emptyFn,onDragEnter:Ext.emptyFn,onDragOut:Ext.emptyFn,onDragOver:Ext.emptyFn,onInvalidDrop:Ext.emptyFn,onMouseDown:Ext.emptyFn,onMouseUp:Ext.emptyFn,setXConstraint:Ext.emptyFn,setYConstraint:Ext.emptyFn,resetConstraints:Ext.emptyFn,clearConstraints:Ext.emptyFn,clearTicks:Ext.emptyFn,setInitPosition:Ext.emptyFn,setDragElId:Ext.emptyFn,setHandleElId:Ext.emptyFn,setOuterHandleElId:Ext.emptyFn,addInvalidHandleClass:Ext.emptyFn,addInvalidHandleId:Ext.emptyFn,addInvalidHandleType:Ext.emptyFn,removeInvalidHandleClass:Ext.emptyFn,removeInvalidHandleId:Ext.emptyFn,removeInvalidHandleType:Ext.emptyFn,toString:function(){return("DDTarget "+this.id)}});Ext.dd.DragTracker=Ext.extend(Ext.util.Observable,{active:false,tolerance:5,autoStart:false,constructor:function(a){Ext.apply(this,a);this.addEvents("mousedown","mouseup","mousemove","dragstart","dragend","drag");this.dragRegion=new Ext.lib.Region(0,0,0,0);if(this.el){this.initEl(this.el)}Ext.dd.DragTracker.superclass.constructor.call(this,a)},initEl:function(a){this.el=Ext.get(a);a.on("mousedown",this.onMouseDown,this,this.delegate?{delegate:this.delegate}:undefined)},destroy:function(){this.el.un("mousedown",this.onMouseDown,this);delete this.el},onMouseDown:function(b,a){if(this.fireEvent("mousedown",this,b)!==false&&this.onBeforeStart(b)!==false){this.startXY=this.lastXY=b.getXY();this.dragTarget=this.delegate?a:this.el.dom;if(this.preventDefault!==false){b.preventDefault()}Ext.getDoc().on({scope:this,mouseup:this.onMouseUp,mousemove:this.onMouseMove,selectstart:this.stopSelect});if(this.autoStart){this.timer=this.triggerStart.defer(this.autoStart===true?1000:this.autoStart,this,[b])}}},onMouseMove:function(d,c){if(this.active&&Ext.isIE&&!d.browserEvent.button){d.preventDefault();this.onMouseUp(d);return}d.preventDefault();var b=d.getXY(),a=this.startXY;this.lastXY=b;if(!this.active){if(Math.abs(a[0]-b[0])>this.tolerance||Math.abs(a[1]-b[1])>this.tolerance){this.triggerStart(d)}else{return}}this.fireEvent("mousemove",this,d);this.onDrag(d);this.fireEvent("drag",this,d)},onMouseUp:function(c){var b=Ext.getDoc(),a=this.active;b.un("mousemove",this.onMouseMove,this);b.un("mouseup",this.onMouseUp,this);b.un("selectstart",this.stopSelect,this);c.preventDefault();this.clearStart();this.active=false;delete this.elRegion;this.fireEvent("mouseup",this,c);if(a){this.onEnd(c);this.fireEvent("dragend",this,c)}},triggerStart:function(a){this.clearStart();this.active=true;this.onStart(a);this.fireEvent("dragstart",this,a)},clearStart:function(){if(this.timer){clearTimeout(this.timer);delete this.timer}},stopSelect:function(a){a.stopEvent();return false},onBeforeStart:function(a){},onStart:function(a){},onDrag:function(a){},onEnd:function(a){},getDragTarget:function(){return this.dragTarget},getDragCt:function(){return this.el},getXY:function(a){return a?this.constrainModes[a].call(this,this.lastXY):this.lastXY},getOffset:function(c){var b=this.getXY(c),a=this.startXY;return[a[0]-b[0],a[1]-b[1]]},constrainModes:{point:function(b){if(!this.elRegion){this.elRegion=this.getDragCt().getRegion()}var a=this.dragRegion;a.left=b[0];a.top=b[1];a.right=b[0];a.bottom=b[1];a.constrainTo(this.elRegion);return[a.left,a.top]}}});Ext.dd.ScrollManager=function(){var c=Ext.dd.DragDropMgr;var e={};var b=null;var i={};var h=function(l){b=null;a()};var j=function(){if(c.dragCurrent){c.refreshCache(c.dragCurrent.groups)}};var d=function(){if(c.dragCurrent){var l=Ext.dd.ScrollManager;var m=i.el.ddScrollConfig?i.el.ddScrollConfig.increment:l.increment;if(!l.animate){if(i.el.scroll(i.dir,m)){j()}}else{i.el.scroll(i.dir,m,true,l.animDuration,j)}}};var a=function(){if(i.id){clearInterval(i.id)}i.id=0;i.el=null;i.dir=""};var g=function(m,l){a();i.el=m;i.dir=l;var o=m.ddScrollConfig?m.ddScrollConfig.ddGroup:undefined,n=(m.ddScrollConfig&&m.ddScrollConfig.frequency)?m.ddScrollConfig.frequency:Ext.dd.ScrollManager.frequency;if(o===undefined||c.dragCurrent.ddGroup==o){i.id=setInterval(d,n)}};var k=function(o,q){if(q||!c.dragCurrent){return}var s=Ext.dd.ScrollManager;if(!b||b!=c.dragCurrent){b=c.dragCurrent;s.refreshCache()}var t=Ext.lib.Event.getXY(o);var u=new Ext.lib.Point(t[0],t[1]);for(var m in e){var n=e[m],l=n._region;var p=n.ddScrollConfig?n.ddScrollConfig:s;if(l&&l.contains(u)&&n.isScrollable()){if(l.bottom-u.y<=p.vthresh){if(i.el!=n){g(n,"down")}return}else{if(l.right-u.x<=p.hthresh){if(i.el!=n){g(n,"left")}return}else{if(u.y-l.top<=p.vthresh){if(i.el!=n){g(n,"up")}return}else{if(u.x-l.left<=p.hthresh){if(i.el!=n){g(n,"right")}return}}}}}}a()};c.fireEvents=c.fireEvents.createSequence(k,c);c.stopDrag=c.stopDrag.createSequence(h,c);return{register:function(n){if(Ext.isArray(n)){for(var m=0,l=n.length;m]+>/gi,asText:function(a){return String(a).replace(this.stripTagsRE,"")},asUCText:function(a){return String(a).toUpperCase().replace(this.stripTagsRE,"")},asUCString:function(a){return String(a).toUpperCase()},asDate:function(a){if(!a){return 0}if(Ext.isDate(a)){return a.getTime()}return Date.parse(String(a))},asFloat:function(a){var b=parseFloat(String(a).replace(/,/g,""));return isNaN(b)?0:b},asInt:function(a){var b=parseInt(String(a).replace(/,/g,""),10);return isNaN(b)?0:b}};Ext.data.Record=function(a,b){this.id=(b||b===0)?b:Ext.data.Record.id(this);this.data=a||{}};Ext.data.Record.create=function(e){var c=Ext.extend(Ext.data.Record,{});var d=c.prototype;d.fields=new Ext.util.MixedCollection(false,function(g){return g.name});for(var b=0,a=e.length;b-1){a.join(null);this.data.removeAt(b)}if(this.pruneModifiedRecords){this.modified.remove(a)}if(this.snapshot){this.snapshot.remove(a)}if(b>-1){this.fireEvent("remove",this,a,b)}},removeAt:function(a){this.remove(this.getAt(a))},removeAll:function(b){var a=[];this.each(function(c){a.push(c)});this.clearData();if(this.snapshot){this.snapshot.clear()}if(this.pruneModifiedRecords){this.modified=[]}if(b!==true){this.fireEvent("clear",this,a)}},onClear:function(b,a){Ext.each(a,function(d,c){this.destroyRecord(this,d,c)},this)},insert:function(d,c){var e,a,b;c=[].concat(c);for(e=0,a=c.length;e=0;d--){if(b[d].phantom===true){var a=b.splice(d,1).shift();if(a.isValid()){g.push(a)}}else{if(!b[d].isValid()){b.splice(d,1)}}}if(g.length){h.push(["create",g])}if(b.length){h.push(["update",b])}}j=h.length;if(j){e=++this.batchCounter;for(d=0;d=0;b--){this.modified.splice(this.modified.indexOf(a[b]),1)}}else{this.modified.splice(this.modified.indexOf(a),1)}},reMap:function(b){if(Ext.isArray(b)){for(var d=0,a=b.length;d=0;c--){this.insert(b[c].lastIndex,b[c])}}},handleException:function(a){Ext.handleError(a)},reload:function(a){this.load(Ext.applyIf(a||{},this.lastOptions))},loadRecords:function(b,l,h){var e,g;if(this.isDestroyed===true){return}if(!b||h===false){if(h!==false){this.fireEvent("load",this,[],l)}if(l.callback){l.callback.call(l.scope||this,[],l,false,b)}return}var a=b.records,j=b.totalRecords||a.length;if(!l||l.add!==true){if(this.pruneModifiedRecords){this.modified=[]}for(e=0,g=a.length;e-1){this.doUpdate(d)}else{k.push(d);++c}}this.totalLength=Math.max(j,this.data.length+c);this.add(k)}this.fireEvent("load",this,a,l);if(l.callback){l.callback.call(l.scope||this,a,l,true)}},loadData:function(c,a){var b=this.reader.readRecords(c);this.loadRecords(b,{add:a},true)},getCount:function(){return this.data.length||0},getTotalCount:function(){return this.totalLength||0},getSortState:function(){return this.sortInfo},applySort:function(){if((this.sortInfo||this.multiSortInfo)&&!this.remoteSort){this.sortData()}},sortData:function(){var a=this.hasMultiSort?this.multiSortInfo:this.sortInfo,k=a.direction||"ASC",h=a.sorters,c=[];if(!this.hasMultiSort){h=[{direction:k,field:a.field}]}for(var d=0,b=h.length;d1){for(var p=1,o=c.length;ph?1:(i=0;b--){if(Ext.isArray(c)){this.realize(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.realize(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(!this.isData(c)){throw new Ext.data.DataReader.Error("realize",a)}a.phantom=false;a._phid=a.id;a.id=this.getId(c);a.data=c;a.commit();a.store.reMap(a)}},update:function(a,c){if(Ext.isArray(a)){for(var b=a.length-1;b>=0;b--){if(Ext.isArray(c)){this.update(a.splice(b,1).shift(),c.splice(b,1).shift())}else{this.update(a.splice(b,1).shift(),c)}}}else{if(Ext.isArray(c)&&c.length==1){c=c.shift()}if(this.isData(c)){a.data=Ext.apply(a.data,c)}a.commit()}},extractData:function(k,a){var j=(this instanceof Ext.data.JsonReader)?"json":"node";var c=[];if(this.isData(k)&&!(this instanceof Ext.data.XmlReader)){k=[k]}var h=this.recordType.prototype.fields,o=h.items,m=h.length,c=[];if(a===true){var l=this.recordType;for(var e=0;e=0){return new Function("obj","return obj"+(b>0?".":"")+c)}return function(d){return d[c]}}}(),extractValues:function(h,d,a){var g,c={};for(var e=0;e<\u003fxml version="{version}" encoding="{encoding}"\u003f><{documentRoot}><{name}>{value}<{root}><{parent.record}><{name}>{value}',render:function(b,c,a){c=this.toArray(c);b.xmlData=this.tpl.applyTemplate({version:this.xmlVersion,encoding:this.xmlEncoding,documentRoot:(c.length>0||this.forceDocumentRoot===true)?this.documentRoot:false,record:this.meta.record,root:this.root,baseParams:c,records:(Ext.isArray(a[0]))?a:[a]})},createRecord:function(a){return this.toArray(this.toHash(a))},updateRecord:function(a){return this.toArray(this.toHash(a))},destroyRecord:function(b){var a={};a[this.meta.idProperty]=b.id;return this.toArray(a)}});Ext.data.XmlReader=function(a,b){a=a||{};Ext.applyIf(a,{idProperty:a.idProperty||a.idPath||a.id,successProperty:a.successProperty||a.success});Ext.data.XmlReader.superclass.constructor.call(this,a,b||a.fields)};Ext.extend(Ext.data.XmlReader,Ext.data.DataReader,{read:function(a){var b=a.responseXML;if(!b){throw {message:"XmlReader.read: XML Document not available"}}return this.readRecords(b)},readRecords:function(d){this.xmlData=d;var a=d.documentElement||d,c=Ext.DomQuery,g=0,e=true;if(this.meta.totalProperty){g=this.getTotal(a,0)}if(this.meta.successProperty){e=this.getSuccess(a)}var b=this.extractData(c.select(this.meta.record,a),true);return{success:e,records:b,totalRecords:g||b.length}},readResponse:function(g,b){var e=Ext.DomQuery,h=b.responseXML,a=h.documentElement||h;var c=new Ext.data.Response({action:g,success:this.getSuccess(a),message:this.getMessage(a),data:this.extractData(e.select(this.meta.record,a)||e.select(this.meta.root,a),false),raw:h});if(Ext.isEmpty(c.success)){throw new Ext.data.DataReader.Error("successProperty-response",this.meta.successProperty)}if(g===Ext.data.Api.actions.create){var d=Ext.isDefined(c.data);if(d&&Ext.isEmpty(c.data)){throw new Ext.data.JsonReader.Error("root-empty",this.meta.root)}else{if(!d){throw new Ext.data.JsonReader.Error("root-undefined-response",this.meta.root)}}}return c},getSuccess:function(){return true},buildExtractors:function(){if(this.ef){return}var l=this.meta,h=this.recordType,e=h.prototype.fields,k=e.items,j=e.length;if(l.totalProperty){this.getTotal=this.createAccessor(l.totalProperty)}if(l.successProperty){this.getSuccess=this.createAccessor(l.successProperty)}if(l.messageProperty){this.getMessage=this.createAccessor(l.messageProperty)}this.getRoot=function(g){return(!Ext.isEmpty(g[this.meta.record]))?g[this.meta.record]:g[this.meta.root]};if(l.idPath||l.idProperty){var d=this.createAccessor(l.idPath||l.idProperty);this.getId=function(g){var i=d(g)||g.id;return(i===undefined||i==="")?null:i}}else{this.getId=function(){return null}}var c=[];for(var b=0;b0&&c[0].field==this.groupField){c.shift()}this.groupField=e;this.groupDir=d;this.applyGroupField();var b=function(){this.fireEvent("groupchange",this,this.getGroupState())};if(this.groupOnSort){this.sort(e,d);b.call(this);return}if(this.remoteGroup){this.on("load",b,this,{single:true});this.reload()}else{this.sort(c);b.call(this)}},sort:function(h,c){if(this.remoteSort){return Ext.data.GroupingStore.superclass.sort.call(this,h,c)}var g=[];if(Ext.isArray(arguments[0])){g=arguments[0]}else{if(h==undefined){g=this.sortInfo?[this.sortInfo]:[]}else{var e=this.fields.get(h);if(!e){return false}var b=e.name,a=this.sortInfo||null,d=this.sortToggle?this.sortToggle[b]:null;if(!c){if(a&&a.field==b){c=(this.sortToggle[b]||"ASC").toggle("ASC","DESC")}else{c=e.sortDir}}this.sortToggle[b]=c;this.sortInfo={field:b,direction:c};g=[this.sortInfo]}}if(this.groupField){g.unshift({direction:this.groupDir,field:this.groupField})}return this.multiSort.call(this,g,c)},applyGroupField:function(){if(this.remoteGroup){if(!this.baseParams){this.baseParams={}}Ext.apply(this.baseParams,{groupBy:this.groupField,groupDir:this.groupDir});var a=this.lastOptions;if(a&&a.params){a.params.groupDir=this.groupDir;delete a.params.groupBy}}},applyGrouping:function(a){if(this.groupField!==false){this.groupBy(this.groupField,true,this.groupDir);return true}else{if(a===true){this.fireEvent("datachanged",this)}return false}},getGroupState:function(){return this.groupOnSort&&this.groupField!==false?(this.sortInfo?this.sortInfo.field:undefined):this.groupField}});Ext.reg("groupingstore",Ext.data.GroupingStore);Ext.data.DirectProxy=function(a){Ext.apply(this,a);if(typeof this.paramOrder=="string"){this.paramOrder=this.paramOrder.split(/[\s,|]/)}Ext.data.DirectProxy.superclass.constructor.call(this,a)};Ext.extend(Ext.data.DirectProxy,Ext.data.DataProxy,{paramOrder:undefined,paramsAsHash:true,directFn:undefined,doRequest:function(b,c,a,e,k,l,n){var j=[],h=this.api[b]||this.directFn;switch(b){case Ext.data.Api.actions.create:j.push(a.jsonData);break;case Ext.data.Api.actions.read:if(h.directCfg.method.len>0){if(this.paramOrder){for(var d=0,g=this.paramOrder.length;d1){for(var d=0,b=c.length;d0){this.doSend(a==1?this.callBuffer[0]:this.callBuffer);this.callBuffer=[]}},queueTransaction:function(a){if(a.form){this.processForm(a);return}this.callBuffer.push(a);if(this.enableBuffer){if(!this.callTask){this.callTask=new Ext.util.DelayedTask(this.combineAndSend,this)}this.callTask.delay(Ext.isNumber(this.enableBuffer)?this.enableBuffer:10)}else{this.combineAndSend()}},doCall:function(i,a,b){var h=null,e=b[a.len],g=b[a.len+1];if(a.len!==0){h=b.slice(0,a.len)}var d=new Ext.Direct.Transaction({provider:this,args:b,action:i,method:a.name,data:h,cb:g&&Ext.isFunction(e)?e.createDelegate(g):e});if(this.fireEvent("beforecall",this,d,a)!==false){Ext.Direct.addTransaction(d);this.queueTransaction(d);this.fireEvent("call",this,d,a)}},doForm:function(j,b,g,i,e){var d=new Ext.Direct.Transaction({provider:this,action:j,method:b.name,args:[g,i,e],cb:e&&Ext.isFunction(i)?i.createDelegate(e):i,isForm:true});if(this.fireEvent("beforecall",this,d,b)!==false){Ext.Direct.addTransaction(d);var a=String(g.getAttribute("enctype")).toLowerCase()=="multipart/form-data",h={extTID:d.tid,extAction:j,extMethod:b.name,extType:"rpc",extUpload:String(a)};Ext.apply(d,{form:Ext.getDom(g),isUpload:a,params:i&&Ext.isObject(i.params)?Ext.apply(h,i.params):h});this.fireEvent("call",this,d,b);this.processForm(d)}},processForm:function(a){Ext.Ajax.request({url:this.url,params:a.params,callback:this.onData,scope:this,form:a.form,isUpload:a.isUpload,ts:a})},createMethod:function(d,a){var b;if(!a.formHandler){b=function(){this.doCall(d,a,Array.prototype.slice.call(arguments,0))}.createDelegate(this)}else{b=function(e,g,c){this.doForm(d,a,e,g,c)}.createDelegate(this)}b.directCfg={action:d,method:a};return b},getTransaction:function(a){return a&&a.tid?Ext.Direct.getTransaction(a.tid):null},doCallback:function(c,g){var d=g.status?"success":"failure";if(c&&c.cb){var b=c.cb,a=Ext.isDefined(g.result)?g.result:g.data;if(Ext.isFunction(b)){b(a,g)}else{Ext.callback(b[d],b.scope,[a,g]);Ext.callback(b.callback,b.scope,[a,g])}}}});Ext.Direct.PROVIDERS.remoting=Ext.direct.RemotingProvider;Ext.Resizable=Ext.extend(Ext.util.Observable,{constructor:function(d,e){this.el=Ext.get(d);if(e&&e.wrap){e.resizeChild=this.el;this.el=this.el.wrap(typeof e.wrap=="object"?e.wrap:{cls:"xresizable-wrap"});this.el.id=this.el.dom.id=e.resizeChild.id+"-rzwrap";this.el.setStyle("overflow","hidden");this.el.setPositioning(e.resizeChild.getPositioning());e.resizeChild.clearPositioning();if(!e.width||!e.height){var g=e.resizeChild.getSize();this.el.setSize(g.width,g.height)}if(e.pinned&&!e.adjustments){e.adjustments="auto"}}this.proxy=this.el.createProxy({tag:"div",cls:"x-resizable-proxy",id:this.el.id+"-rzproxy"},Ext.getBody());this.proxy.unselectable();this.proxy.enableDisplayMode("block");Ext.apply(this,e);if(this.pinned){this.disableTrackOver=true;this.el.addClass("x-resizable-pinned")}var k=this.el.getStyle("position");if(k!="absolute"&&k!="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 o=this.handles.split(/\s*?[,;]\s*?| /);var c=Ext.Resizable.positions;for(var j=0,l=o.length;j0){if(a>(e/2)){d=c+(e-a)}else{d=c-a}}return Math.max(b,d)},resizeElement:function(){var a=this.proxy.getBox();if(this.updateBox){this.el.setBox(a,false,this.animate,this.duration,null,this.easing)}else{this.el.setSize(a.width,a.height,this.animate,this.duration,null,this.easing)}this.updateChildSize();if(!this.dynamic){this.proxy.hide()}if(this.draggable&&this.constrainTo){this.dd.resetConstraints();this.dd.constrainTo(this.constrainTo)}return a},constrain:function(b,c,a,d){if(b-cd){c=b-d}}return c},onMouseMove:function(z){if(this.enabled&&this.activeHandle){try{if(this.resizeRegion&&!this.resizeRegion.contains(z.getPoint())){return}var t=this.curSize||this.startBox,l=this.startBox.x,k=this.startBox.y,c=l,b=k,m=t.width,u=t.height,d=m,o=u,n=this.minWidth,A=this.minHeight,s=this.maxWidth,D=this.maxHeight,i=this.widthIncrement,a=this.heightIncrement,B=z.getXY(),r=-(this.startPoint[0]-Math.max(this.minX,B[0])),p=-(this.startPoint[1]-Math.max(this.minY,B[1])),j=this.activeHandle.position,E,g;switch(j){case"east":m+=r;m=Math.min(Math.max(n,m),s);break;case"south":u+=p;u=Math.min(Math.max(A,u),D);break;case"southeast":m+=r;u+=p;m=Math.min(Math.max(n,m),s);u=Math.min(Math.max(A,u),D);break;case"north":p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"west":r=this.constrain(m,r,n,s);l+=r;m-=r;break;case"northeast":m+=r;m=Math.min(Math.max(n,m),s);p=this.constrain(u,p,A,D);k+=p;u-=p;break;case"northwest":r=this.constrain(m,r,n,s);p=this.constrain(u,p,A,D);k+=p;u-=p;l+=r;m-=r;break;case"southwest":r=this.constrain(m,r,n,s);u+=p;u=Math.min(Math.max(A,u),D);l+=r;m-=r;break}var q=this.snap(m,i,n);var C=this.snap(u,a,A);if(q!=m||C!=u){switch(j){case"northeast":k-=C-u;break;case"north":k-=C-u;break;case"southwest":l-=q-m;break;case"west":l-=q-m;break;case"northwest":l-=q-m;k-=C-u;break}m=q;u=C}if(this.preserveRatio){switch(j){case"southeast":case"east":u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);break;case"south":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"northeast":m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);break;case"north":E=m;m=d*(u/o);m=Math.min(Math.max(n,m),s);u=o*(m/d);l+=(E-m)/2;break;case"southwest":u=o*(m/d);u=Math.min(Math.max(A,u),D);E=m;m=d*(u/o);l+=E-m;break;case"west":g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);k+=(g-u)/2;E=m;m=d*(u/o);l+=E-m;break;case"northwest":E=m;g=u;u=o*(m/d);u=Math.min(Math.max(A,u),D);m=d*(u/o);k+=g-u;l+=E-m;break}}this.proxy.setBounds(l,k,m,u);if(this.dynamic){this.resizeElement()}}catch(v){}}},handleOver:function(){if(this.enabled){this.el.addClass("x-resizable-over")}},handleOut:function(){if(!this.resizing){this.el.removeClass("x-resizable-over")}},getEl:function(){return this.el},getResizeChild:function(){return this.resizeChild},destroy:function(b){Ext.destroy(this.dd,this.overlay,this.proxy);this.overlay=null;this.proxy=null;var c=Ext.Resizable.positions;for(var a in c){if(typeof c[a]!="function"&&this[c[a]]){this[c[a]].destroy()}}if(b){this.el.update("");Ext.destroy(this.el);this.el=null}this.purgeListeners()},syncHandleHeight:function(){var a=this.el.getHeight(true);if(this.west){this.west.el.setHeight(a)}if(this.east){this.east.el.setHeight(a)}}});Ext.Resizable.positions={n:"north",s:"south",e:"east",w:"west",se:"southeast",sw:"southwest",nw:"northwest",ne:"northeast"};Ext.Resizable.Handle=Ext.extend(Object,{constructor:function(d,g,c,e,a){if(!this.tpl){var b=Ext.DomHelper.createTemplate({tag:"div",cls:"x-resizable-handle x-resizable-handle-{0}"});b.compile();Ext.Resizable.Handle.prototype.tpl=b}this.position=g;this.rz=d;this.el=this.tpl.append(d.el.dom,[this.position],true);this.el.unselectable();if(e){this.el.setOpacity(0)}if(!Ext.isEmpty(a)){this.el.addClass(a)}this.el.on("mousedown",this.onMouseDown,this);if(!c){this.el.on({scope:this,mouseover:this.onMouseOver,mouseout:this.onMouseOut})}},afterResize:function(a){},onMouseDown:function(a){this.rz.onMouseDown(this,a)},onMouseOver:function(a){this.rz.handleOver(this,a)},onMouseOut:function(a){this.rz.handleOut(this,a)},destroy:function(){Ext.destroy(this.el);this.el=null}});Ext.Window=Ext.extend(Ext.Panel,{baseCls:"x-window",resizable:true,draggable:true,closable:true,closeAction:"close",constrain:false,constrainHeader:false,plain:false,minimizable:false,maximizable:false,minHeight:100,minWidth:200,expandOnShow:true,showAnimDuration:0.25,hideAnimDuration:0.25,collapsible:false,initHidden:undefined,hidden:true,elements:"header,body",frame:true,floating:true,initComponent:function(){this.initTools();Ext.Window.superclass.initComponent.call(this);this.addEvents("resize","maximize","minimize","restore");if(Ext.isDefined(this.initHidden)){this.hidden=this.initHidden}if(this.hidden===false){this.hidden=true;this.show()}},getState:function(){return Ext.apply(Ext.Window.superclass.getState.call(this)||{},this.getBox(true))},onRender:function(b,a){Ext.Window.superclass.onRender.call(this,b,a);if(this.plain){this.el.addClass("x-window-plain")}this.focusEl=this.el.createChild({tag:"a",href:"#",cls:"x-dlg-focus",tabIndex:"-1",html:" "});this.focusEl.swallowEvent("click",true);this.proxy=this.el.createProxy("x-window-proxy");this.proxy.enableDisplayMode("block");if(this.modal){this.mask=this.container.createChild({cls:"ext-el-mask"},this.el.dom);this.mask.enableDisplayMode("block");this.mask.hide();this.mon(this.mask,"click",this.focus,this)}if(this.maximizable){this.mon(this.header,"dblclick",this.toggleMaximize,this)}},initEvents:function(){Ext.Window.superclass.initEvents.call(this);if(this.animateTarget){this.setAnimateTarget(this.animateTarget)}if(this.resizable){this.resizer=new Ext.Resizable(this.el,{minWidth:this.minWidth,minHeight:this.minHeight,handles:this.resizeHandles||"all",pinned:true,resizeElement:this.resizerAction,handleCls:"x-window-handle"});this.resizer.window=this;this.mon(this.resizer,"beforeresize",this.beforeResize,this)}if(this.draggable){this.header.addClass("x-window-draggable")}this.mon(this.el,"mousedown",this.toFront,this);this.manager=this.manager||Ext.WindowMgr;this.manager.register(this);if(this.maximized){this.maximized=false;this.maximize()}if(this.closable){var a=this.getKeyMap();a.on(27,this.onEsc,this);a.disable()}},initDraggable:function(){this.dd=new Ext.Window.DD(this)},onEsc:function(a,b){if(this.activeGhost){this.unghost()}b.stopEvent();this[this.closeAction]()},beforeDestroy:function(){if(this.rendered){this.hide();this.clearAnchor();Ext.destroy(this.focusEl,this.resizer,this.dd,this.proxy,this.mask)}Ext.Window.superclass.beforeDestroy.call(this)},onDestroy:function(){if(this.manager){this.manager.unregister(this)}Ext.Window.superclass.onDestroy.call(this)},initTools:function(){if(this.minimizable){this.addTool({id:"minimize",handler:this.minimize.createDelegate(this,[])})}if(this.maximizable){this.addTool({id:"maximize",handler:this.maximize.createDelegate(this,[])});this.addTool({id:"restore",handler:this.restore.createDelegate(this,[]),hidden:true})}if(this.closable){this.addTool({id:"close",handler:this[this.closeAction].createDelegate(this,[])})}},resizerAction:function(){var a=this.proxy.getBox();this.proxy.hide();this.window.handleResize(a);return a},beforeResize:function(){this.resizer.minHeight=Math.max(this.minHeight,this.getFrameHeight()+40);this.resizer.minWidth=Math.max(this.minWidth,this.getFrameWidth()+40);this.resizeBox=this.el.getBox()},updateHandles:function(){if(Ext.isIE&&this.resizer){this.resizer.syncHandleHeight();this.el.repaint()}},handleResize:function(b){var a=this.resizeBox;if(a.x!=b.x||a.y!=b.y){this.updateBox(b)}else{this.setSize(b);if(Ext.isIE6&&Ext.isStrict){this.doLayout()}}this.focus();this.updateHandles();this.saveState()},focus:function(){var e=this.focusEl,a=this.defaultButton,c=typeof a,d,b;if(Ext.isDefined(a)){if(Ext.isNumber(a)&&this.fbar){e=this.fbar.items.get(a)}else{if(Ext.isString(a)){e=Ext.getCmp(a)}else{e=a}}d=e.getEl();b=Ext.getDom(this.container);if(d&&b){if(b!=document.body&&!Ext.lib.Region.getRegion(b).contains(Ext.lib.Region.getRegion(d.dom))){return}}}e=e||this.focusEl;e.focus.defer(10,e)},setAnimateTarget:function(a){a=Ext.get(a);this.animateTarget=a},beforeShow:function(){delete this.el.lastXY;delete this.el.lastLT;if(this.x===undefined||this.y===undefined){var a=this.el.getAlignToXY(this.container,"c-c");var b=this.el.translatePoints(a[0],a[1]);this.x=this.x===undefined?b.left:this.x;this.y=this.y===undefined?b.top:this.y}this.el.setLeftTop(this.x,this.y);if(this.expandOnShow){this.expand(false)}if(this.modal){Ext.getBody().addClass("x-body-masked");this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true));this.mask.show()}},show:function(c,a,b){if(!this.rendered){this.render(Ext.getBody())}if(this.hidden===false){this.toFront();return this}if(this.fireEvent("beforeshow",this)===false){return this}if(a){this.on("show",a,b,{single:true})}this.hidden=false;if(Ext.isDefined(c)){this.setAnimateTarget(c)}this.beforeShow();if(this.animateTarget){this.animShow()}else{this.afterShow()}return this},afterShow:function(b){if(this.isDestroyed){return false}this.proxy.hide();this.el.setStyle("display","block");this.el.show();if(this.maximized){this.fitContainer()}if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.onWindowResize(this.onWindowResize,this)}this.doConstrain();this.doLayout();if(this.keyMap){this.keyMap.enable()}this.toFront();this.updateHandles();if(b&&(Ext.isIE||Ext.isWebKit)){var a=this.getSize();this.onResize(a.width,a.height)}this.onShow();this.fireEvent("show",this)},animShow:function(){this.proxy.show();this.proxy.setBox(this.animateTarget.getBox());this.proxy.setOpacity(0);var a=this.getBox();this.el.setStyle("display","none");this.proxy.shift(Ext.apply(a,{callback:this.afterShow.createDelegate(this,[true],false),scope:this,easing:"easeNone",duration:this.showAnimDuration,opacity:0.5}))},hide:function(c,a,b){if(this.hidden||this.fireEvent("beforehide",this)===false){return this}if(a){this.on("hide",a,b,{single:true})}this.hidden=true;if(c!==undefined){this.setAnimateTarget(c)}if(this.modal){this.mask.hide();Ext.getBody().removeClass("x-body-masked")}if(this.animateTarget){this.animHide()}else{this.el.hide();this.afterHide()}return this},afterHide:function(){this.proxy.hide();if(this.monitorResize||this.modal||this.constrain||this.constrainHeader){Ext.EventManager.removeResizeListener(this.onWindowResize,this)}if(this.keyMap){this.keyMap.disable()}this.onHide();this.fireEvent("hide",this)},animHide:function(){this.proxy.setOpacity(0.5);this.proxy.show();var a=this.getBox(false);this.proxy.setBox(a);this.el.hide();this.proxy.shift(Ext.apply(this.animateTarget.getBox(),{callback:this.afterHide,scope:this,duration:this.hideAnimDuration,easing:"easeNone",opacity:0}))},onShow:Ext.emptyFn,onHide:Ext.emptyFn,onWindowResize:function(){if(this.maximized){this.fitContainer()}if(this.modal){this.mask.setSize("100%","100%");var a=this.mask.dom.offsetHeight;this.mask.setSize(Ext.lib.Dom.getViewWidth(true),Ext.lib.Dom.getViewHeight(true))}this.doConstrain()},doConstrain:function(){if(this.constrain||this.constrainHeader){var b;if(this.constrain){b={right:this.el.shadowOffset,left:this.el.shadowOffset,bottom:this.el.shadowOffset}}else{var a=this.getSize();b={right:-(a.width-100),bottom:-(a.height-25+this.el.getConstrainOffset())}}var c=this.el.getConstrainToXY(this.container,true,b);if(c){this.setPosition(c[0],c[1])}}},ghost:function(a){var c=this.createGhost(a);var b=this.getBox(true);c.setLeftTop(b.x,b.y);c.setWidth(b.width);this.el.hide();this.activeGhost=c;return c},unghost:function(b,a){if(!this.activeGhost){return}if(b!==false){this.el.show();this.focus.defer(10,this);if(Ext.isMac&&Ext.isGecko2){this.cascade(this.setAutoScroll)}}if(a!==false){this.setPosition(this.activeGhost.getLeft(true),this.activeGhost.getTop(true))}this.activeGhost.hide();this.activeGhost.remove();delete this.activeGhost},minimize:function(){this.fireEvent("minimize",this);return this},close:function(){if(this.fireEvent("beforeclose",this)!==false){if(this.hidden){this.doClose()}else{this.hide(null,this.doClose,this)}}},doClose:function(){this.fireEvent("close",this);this.destroy()},maximize:function(){if(!this.maximized){this.expand(false);this.restoreSize=this.getSize();this.restorePos=this.getPosition(true);if(this.maximizable){this.tools.maximize.hide();this.tools.restore.show()}this.maximized=true;this.el.disableShadow();if(this.dd){this.dd.lock()}if(this.collapsible){this.tools.toggle.hide()}this.el.addClass("x-window-maximized");this.container.addClass("x-window-maximized-ct");this.setPosition(0,0);this.fitContainer();this.fireEvent("maximize",this)}return this},restore:function(){if(this.maximized){var a=this.tools;this.el.removeClass("x-window-maximized");if(a.restore){a.restore.hide()}if(a.maximize){a.maximize.show()}this.setPosition(this.restorePos[0],this.restorePos[1]);this.setSize(this.restoreSize.width,this.restoreSize.height);delete this.restorePos;delete this.restoreSize;this.maximized=false;this.el.enableShadow(true);if(this.dd){this.dd.unlock()}if(this.collapsible&&a.toggle){a.toggle.show()}this.container.removeClass("x-window-maximized-ct");this.doConstrain();this.fireEvent("restore",this)}return this},toggleMaximize:function(){return this[this.maximized?"restore":"maximize"]()},fitContainer:function(){var a=this.container.getViewSize(false);this.setSize(a.width,a.height)},setZIndex:function(a){if(this.modal){this.mask.setStyle("z-index",a)}this.el.setZIndex(++a);a+=5;if(this.resizer){this.resizer.proxy.setStyle("z-index",++a)}this.lastZIndex=a},alignTo:function(b,a,c){var d=this.el.getAlignToXY(b,a,c);this.setPagePosition(d[0],d[1]);return this},anchorTo:function(c,e,d,b){this.clearAnchor();this.anchorTarget={el:c,alignment:e,offsets:d};Ext.EventManager.onWindowResize(this.doAnchor,this);var a=typeof b;if(a!="undefined"){Ext.EventManager.on(window,"scroll",this.doAnchor,this,{buffer:a=="number"?b:50})}return this.doAnchor()},doAnchor:function(){var a=this.anchorTarget;this.alignTo(a.el,a.alignment,a.offsets);return this},clearAnchor:function(){if(this.anchorTarget){Ext.EventManager.removeResizeListener(this.doAnchor,this);Ext.EventManager.un(window,"scroll",this.doAnchor,this);delete this.anchorTarget}return this},toFront:function(a){if(this.manager.bringToFront(this)){if(!a||!a.getTarget().focus){this.focus()}}return this},setActive:function(a){if(a){if(!this.maximized){this.el.enableShadow(true)}this.fireEvent("activate",this)}else{this.el.disableShadow();this.fireEvent("deactivate",this)}},toBack:function(){this.manager.sendToBack(this);return this},center:function(){var a=this.el.getAlignToXY(this.container,"c-c");this.setPagePosition(a[0],a[1]);return this}});Ext.reg("window",Ext.Window);Ext.Window.DD=Ext.extend(Ext.dd.DD,{constructor:function(a){this.win=a;Ext.Window.DD.superclass.constructor.call(this,a.el.id,"WindowDD-"+a.id);this.setHandleElId(a.header.id);this.scroll=false},moveOnly:true,headerOffsets:[100,25],startDrag:function(){var a=this.win;this.proxy=a.ghost(a.initialConfig.cls);if(a.constrain!==false){var c=a.el.shadowOffset;this.constrainTo(a.container,{right:c,left:c,bottom:c})}else{if(a.constrainHeader!==false){var b=this.proxy.getSize();this.constrainTo(a.container,{right:-(b.width-this.headerOffsets[0]),bottom:-(b.height-this.headerOffsets[1])})}}},b4Drag:Ext.emptyFn,onDrag:function(a){this.alignElWithMouse(this.proxy,a.getPageX(),a.getPageY())},endDrag:function(a){this.win.unghost();this.win.saveState()}});Ext.WindowGroup=function(){var g={};var d=[];var e=null;var c=function(j,i){return(!j._lastAccess||j._lastAccess0){l.sort(c);var k=l[0].manager.zseed;for(var m=0;m=0;--j){if(!d[j].hidden){b(d[j]);return}}b(null)};return{zseed:9000,register:function(i){if(i.manager){i.manager.unregister(i)}i.manager=this;g[i.id]=i;d.push(i);i.on("hide",a)},unregister:function(i){delete i.manager;delete g[i.id];i.un("hide",a);d.remove(i)},get:function(i){return typeof i=="object"?i:g[i]},bringToFront:function(i){i=this.get(i);if(i!=e){i._lastAccess=new Date().getTime();h();return true}return false},sendToBack:function(i){i=this.get(i);i._lastAccess=-(new Date().getTime());h();return i},hideAll:function(){for(var i in g){if(g[i]&&typeof g[i]!="function"&&g[i].isVisible()){g[i].hide()}}},getActive:function(){return e},getBy:function(l,k){var m=[];for(var j=d.length-1;j>=0;--j){var n=d[j];if(l.call(k||n,n)!==false){m.push(n)}}return m},each:function(j,i){for(var k in g){if(g[k]&&typeof g[k]!="function"){if(j.call(i||g[k],g[k])===false){return}}}}}};Ext.WindowMgr=new Ext.WindowGroup();Ext.MessageBox=function(){var u,b,q,t,h,l,s,a,n,p,j,g,r,v,o,i="",d="",m=["ok","yes","no","cancel"];var c=function(x){r[x].blur();if(u.isVisible()){u.hide();w();Ext.callback(b.fn,b.scope||window,[x,v.dom.value,b],1)}};var w=function(){if(b&&b.cls){u.el.removeClass(b.cls)}n.reset()};var e=function(z,x,y){if(b&&b.closable!==false){u.hide();w()}if(y){y.stopEvent()}};var k=function(x){var z=0,y;if(!x){Ext.each(m,function(A){r[A].hide()});return z}u.footer.dom.style.display="";Ext.iterate(r,function(A,B){y=x[A];if(y){B.show();B.setText(Ext.isString(y)?y:Ext.MessageBox.buttonText[A]);z+=B.getEl().getWidth()+15}else{B.hide()}});return z};return{getDialog:function(x){if(!u){var z=[];r={};Ext.each(m,function(A){z.push(r[A]=new Ext.Button({text:this.buttonText[A],handler:c.createCallback(A),hideMode:"offsets"}))},this);u=new Ext.Window({autoCreate:true,title:x,resizable:false,constrain:true,constrainHeader:true,minimizable:false,maximizable:false,stateful:false,modal:true,shim:true,buttonAlign:"center",width:400,height:100,minHeight:80,plain:true,footer:true,closable:true,close:function(){if(b&&b.buttons&&b.buttons.no&&!b.buttons.cancel){c("no")}else{c("cancel")}},fbar:new Ext.Toolbar({items:z,enableOverflow:false})});u.render(document.body);u.getEl().addClass("x-window-dlg");q=u.mask;h=u.body.createChild({html:'

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

    ");this.deferFocus()}}}}}}}(),getToolbar:function(){return this.tb},buttonTips:{bold:{title:"Bold (Ctrl+B)",text:"Make the selected text bold.",cls:"x-html-editor-tip"},italic:{title:"Italic (Ctrl+I)",text:"Make the selected text italic.",cls:"x-html-editor-tip"},underline:{title:"Underline (Ctrl+U)",text:"Underline the selected text.",cls:"x-html-editor-tip"},increasefontsize:{title:"Grow Text",text:"Increase the font size.",cls:"x-html-editor-tip"},decreasefontsize:{title:"Shrink Text",text:"Decrease the font size.",cls:"x-html-editor-tip"},backcolor:{title:"Text Highlight Color",text:"Change the background color of the selected text.",cls:"x-html-editor-tip"},forecolor:{title:"Font Color",text:"Change the color of the selected text.",cls:"x-html-editor-tip"},justifyleft:{title:"Align Text Left",text:"Align text to the left.",cls:"x-html-editor-tip"},justifycenter:{title:"Center Text",text:"Center text in the editor.",cls:"x-html-editor-tip"},justifyright:{title:"Align Text Right",text:"Align text to the right.",cls:"x-html-editor-tip"},insertunorderedlist:{title:"Bullet List",text:"Start a bulleted list.",cls:"x-html-editor-tip"},insertorderedlist:{title:"Numbered List",text:"Start a numbered list.",cls:"x-html-editor-tip"},createlink:{title:"Hyperlink",text:"Make the selected text a hyperlink.",cls:"x-html-editor-tip"},sourceedit:{title:"Source Edit",text:"Switch to source editing mode.",cls:"x-html-editor-tip"}}});Ext.reg("htmleditor",Ext.form.HtmlEditor);Ext.form.TimeField=Ext.extend(Ext.form.ComboBox,{minValue:undefined,maxValue:undefined,minText:"The time in this field must be equal to or after {0}",maxText:"The time in this field must be equal to or before {0}",invalidText:"{0} is not a valid time",format:"g:i A",altFormats:"g:ia|g:iA|g:i a|g:i A|h:i|g:i|H:i|ga|ha|gA|h a|g a|g A|gi|hi|gia|hia|g|H",increment:15,mode:"local",triggerAction:"all",typeAhead:false,initDate:"1/1/2008",initComponent:function(){if(Ext.isDefined(this.minValue)){this.setMinValue(this.minValue,true)}if(Ext.isDefined(this.maxValue)){this.setMaxValue(this.maxValue,true)}if(!this.store){this.generateStore(true)}Ext.form.TimeField.superclass.initComponent.call(this)},setMinValue:function(b,a){this.setLimit(b,true,a);return this},setMaxValue:function(b,a){this.setLimit(b,false,a);return this},generateStore:function(b){var c=this.minValue||new Date(this.initDate).clearTime(),a=this.maxValue||new Date(this.initDate).clearTime().add("mi",(24*60)-1),d=[];while(c<=a){d.push(c.dateFormat(this.format));c=c.add("mi",this.increment)}this.bindStore(d,b)},setLimit:function(b,g,a){var e;if(Ext.isString(b)){e=this.parseDate(b)}else{if(Ext.isDate(b)){e=b}}if(e){var c=new Date(this.initDate).clearTime();c.setHours(e.getHours(),e.getMinutes(),g?0:59,0);this[g?"minValue":"maxValue"]=c;if(!a){this.generateStore()}}},getValue:function(){var a=Ext.form.TimeField.superclass.getValue.call(this);return this.formatDate(this.parseDate(a))||""},setValue:function(a){return Ext.form.TimeField.superclass.setValue.call(this,this.formatDate(this.parseDate(a)))},validateValue:Ext.form.DateField.prototype.validateValue,parseDate:Ext.form.DateField.prototype.parseDate,formatDate:Ext.form.DateField.prototype.formatDate,beforeBlur:function(){var a=this.parseDate(this.getRawValue());if(a){this.setValue(a.dateFormat(this.format))}Ext.form.TimeField.superclass.beforeBlur.call(this)}});Ext.reg("timefield",Ext.form.TimeField);Ext.form.Label=Ext.extend(Ext.BoxComponent,{onRender:function(b,a){if(!this.el){this.el=document.createElement("label");this.el.id=this.getId();this.el.innerHTML=this.text?Ext.util.Format.htmlEncode(this.text):(this.html||"");if(this.forId){this.el.setAttribute("for",this.forId)}}Ext.form.Label.superclass.onRender.call(this,b,a)},setText:function(a,b){var c=b===false;this[!c?"text":"html"]=a;delete this[c?"text":"html"];if(this.rendered){this.el.dom.innerHTML=b!==false?Ext.util.Format.htmlEncode(a):a}return this}});Ext.reg("label",Ext.form.Label);Ext.form.Action=function(b,a){this.form=b;this.options=a||{}};Ext.form.Action.CLIENT_INVALID="client";Ext.form.Action.SERVER_INVALID="server";Ext.form.Action.CONNECT_FAILURE="connect";Ext.form.Action.LOAD_FAILURE="load";Ext.form.Action.prototype={type:"default",run:function(a){},success:function(a){},handleResponse:function(a){},failure:function(a){this.response=a;this.failureType=Ext.form.Action.CONNECT_FAILURE;this.form.afterAction(this,false)},processResponse:function(a){this.response=a;if(!a.responseText&&!a.responseXML){return true}this.result=this.handleResponse(a);return this.result},getUrl:function(c){var a=this.options.url||this.form.url||this.form.el.dom.action;if(c){var b=this.getParams();if(b){a=Ext.urlAppend(a,b)}}return a},getMethod:function(){return(this.options.method||this.form.method||this.form.el.dom.method||"POST").toUpperCase()},getParams:function(){var a=this.form.baseParams;var b=this.options.params;if(b){if(typeof b=="object"){b=Ext.urlEncode(Ext.applyIf(b,a))}else{if(typeof b=="string"&&a){b+="&"+Ext.urlEncode(a)}}}else{if(a){b=Ext.urlEncode(a)}}return b},createCallback:function(a){var a=a||{};return{success:this.success,failure:this.failure,scope:this,timeout:(a.timeout*1000)||(this.form.timeout*1000),upload:this.form.fileUpload?this.success:undefined}}};Ext.form.Action.Submit=function(b,a){Ext.form.Action.Submit.superclass.constructor.call(this,b,a)};Ext.extend(Ext.form.Action.Submit,Ext.form.Action,{type:"submit",run:function(){var b=this.options;var c=this.getMethod();var a=c=="GET";if(b.clientValidation===false||this.form.isValid()){Ext.Ajax.request(Ext.apply(this.createCallback(b),{form:this.form.el.dom,url:this.getUrl(a),method:c,headers:b.headers,params:!a?this.getParams():null,isUpload:this.form.fileUpload}))}else{if(b.clientValidation!==false){this.failureType=Ext.form.Action.CLIENT_INVALID;this.form.afterAction(this,false)}}},success:function(b){var a=this.processResponse(b);if(a===true||a.success){this.form.afterAction(this,true);return}if(a.errors){this.form.markInvalid(a.errors)}this.failureType=Ext.form.Action.SERVER_INVALID;this.form.afterAction(this,false)},handleResponse:function(c){if(this.form.errorReader){var b=this.form.errorReader.read(c);var g=[];if(b.records){for(var d=0,a=b.records.length;d=0){if(!d){c=g-1}d=false;while(c>=0){if(e.call(j||this,k,c,i)===true){return[k,c]}c--}k--}}else{if(c>=g){k++;d=false}while(k','
    ','
    {header}
    ','
    {body}
    ',"
    ",'
     
    ','
     
    ',"")}if(!c.header){c.header=new Ext.Template('','{cells}',"
    ")}if(!c.hcell){c.hcell=new Ext.Template('
    ',this.grid.enableHdMenu?'':"",'{value}',"
    ")}if(!c.body){c.body=new Ext.Template("{rows}")}if(!c.row){c.row=new Ext.Template('
    ',"{cells}",(this.enableRowBody?'':""),"
    {body}
    ")}if(!c.cell){c.cell=new Ext.Template('','
    {value}
    ',"")}for(var a in c){var b=c[a];if(b&&Ext.isFunction(b.compile)&&!b.compiled){b.disableFormats=true;b.compile()}}this.templates=c;this.colRe=new RegExp("x-grid3-td-([^\\s]+)","")},fly:function(a){if(!this._flyweight){this._flyweight=new Ext.Element.Flyweight(document.body)}this._flyweight.dom=a;return this._flyweight},getEditorParent:function(){return this.scroller.dom},initElements:function(){var c=Ext.Element;var b=this.grid.getGridEl().dom.firstChild;var a=b.childNodes;this.el=new c(b);this.mainWrap=new c(a[0]);this.mainHd=new c(this.mainWrap.dom.firstChild);if(this.grid.hideHeaders){this.mainHd.setDisplayed(false)}this.innerHd=this.mainHd.dom.firstChild;this.scroller=new c(this.mainWrap.dom.childNodes[1]);if(this.forceFit){this.scroller.setStyle("overflow-x","hidden")}this.mainBody=new c(this.scroller.dom.firstChild);this.focusEl=new c(this.scroller.dom.childNodes[1]);this.focusEl.swallowEvent("click",true);this.resizeMarker=new c(a[1]);this.resizeProxy=new c(a[2])},getRows:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},findCell:function(a){if(!a){return false}return this.fly(a).findParent(this.cellSelector,this.cellSelectorDepth)},findCellIndex:function(c,b){var a=this.findCell(c);if(a&&(!b||this.fly(a).hasClass(b))){return this.getCellIndex(a)}return false},getCellIndex:function(b){if(b){var a=b.className.match(this.colRe);if(a&&a[1]){return this.cm.getIndexById(a[1])}}return false},findHeaderCell:function(b){var a=this.findCell(b);return a&&this.fly(a).hasClass(this.hdCls)?a:null},findHeaderIndex:function(a){return this.findCellIndex(a,this.hdCls)},findRow:function(a){if(!a){return false}return this.fly(a).findParent(this.rowSelector,this.rowSelectorDepth)},findRowIndex:function(a){var b=this.findRow(a);return b?b.rowIndex:false},findRowBody:function(a){if(!a){return false}return this.fly(a).findParent(this.rowBodySelector,this.rowBodySelectorDepth)},getRow:function(a){return this.getRows()[a]},getCell:function(b,a){return this.getRow(b).getElementsByTagName("td")[a]},getHeaderCell:function(a){return this.mainHd.dom.getElementsByTagName("td")[a]},addRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).addClass(a)}},removeRowClass:function(c,a){var b=this.getRow(c);if(b){this.fly(b).removeClass(a)}},removeRow:function(a){Ext.removeNode(this.getRow(a));this.syncFocusEl(a)},removeRows:function(c,a){var b=this.mainBody.dom;for(var d=c;d<=a;d++){Ext.removeNode(b.childNodes[c])}this.syncFocusEl(c)},getScrollState:function(){var a=this.scroller.dom;return{left:a.scrollLeft,top:a.scrollTop}},restoreScroll:function(a){var b=this.scroller.dom;b.scrollLeft=a.left;b.scrollTop=a.top},scrollToTop:function(){this.scroller.dom.scrollTop=0;this.scroller.dom.scrollLeft=0},syncScroll:function(){this.syncHeaderScroll();var a=this.scroller.dom;this.grid.fireEvent("bodyscroll",a.scrollLeft,a.scrollTop)},syncHeaderScroll:function(){var a=this.scroller.dom;this.innerHd.scrollLeft=a.scrollLeft;this.innerHd.scrollLeft=a.scrollLeft},updateSortIcon:function(b,a){var d=this.sortClasses;var c=this.mainHd.select("td").removeClass(d);c.item(b).addClass(d[a=="DESC"?1:0])},updateAllColumnWidths:function(){var d=this.getTotalWidth(),l=this.cm.getColumnCount(),g=[],e,b;for(b=0;b=this.ds.getCount()){return null}d=(d!==undefined?d:0);var c=this.getRow(h),a=this.cm,e=a.getColumnCount(),b;if(!(g===false&&d===0)){while(dm){n.scrollTop=q-a}}if(e!==false){var l=parseInt(h.offsetLeft,10);var j=l+h.offsetWidth;var i=parseInt(n.scrollLeft,10);var b=i+n.clientWidth;if(lb){n.scrollLeft=j-n.clientWidth}}}return this.getResolvedXY(r)},insertRows:function(a,i,e,h){var d=a.getCount()-1;if(!h&&i===0&&e>=d){this.fireEvent("beforerowsinserted",this,i,e);this.refresh();this.fireEvent("rowsinserted",this,i,e)}else{if(!h){this.fireEvent("beforerowsinserted",this,i,e)}var b=this.renderRows(i,e),g=this.getRow(i);if(g){if(i===0){Ext.fly(this.getRow(0)).removeClass(this.firstRowCls)}Ext.DomHelper.insertHtml("beforeBegin",g,b)}else{var c=this.getRow(d-1);if(c){Ext.fly(c).removeClass(this.lastRowCls)}Ext.DomHelper.insertHtml("beforeEnd",this.mainBody.dom,b)}if(!h){this.fireEvent("rowsinserted",this,i,e);this.processRows(i)}else{if(i===0||i>=d){Ext.fly(this.getRow(i)).addClass(i===0?this.firstRowCls:this.lastRowCls)}}}this.syncFocusEl(i)},deleteRows:function(a,c,b){if(a.getRowCount()<1){this.refresh()}else{this.fireEvent("beforerowsdeleted",this,c,b);this.removeRows(c,b);this.processRows(c);this.fireEvent("rowsdeleted",this,c,b)}},getColumnStyle:function(a,c){var b=!c?(this.cm.config[a].css||""):"";b+="width:"+this.getColumnWidth(a)+";";if(this.cm.isHidden(a)){b+="display:none;"}var d=this.cm.config[a].align;if(d){b+="text-align:"+d+";"}return b},getColumnWidth:function(b){var a=this.cm.getColumnWidth(b);if(Ext.isNumber(a)){return(Ext.isBorderBox||(Ext.isWebKit&&!Ext.isSafari2)?a:(a-this.borderWidth>0?a-this.borderWidth:0))+"px"}return a},getTotalWidth:function(){return this.cm.getTotalWidth()+"px"},fitColumns:function(d,h,j){var q=this.cm,k;var l=q.getTotalWidth(false);var a=this.grid.getGridEl().getWidth(true)-this.getScrollOffset();if(a<20){return}var e=a-l;if(e===0){return false}var m=q.getColumnCount(true);var s=m-(Ext.isNumber(j)?1:0);if(s===0){s=1;j=undefined}var r=q.getColumnCount();var o=[];var n=0;var c=0;var p;for(k=0;ka){var g=s!=m?j:n;q.setColumnWidth(g,Math.max(1,q.getColumnWidth(g)-(l-a)),true)}if(d!==true){this.updateAllColumnWidths()}return true},autoExpand:function(b){var i=this.grid,a=this.cm;if(!this.userResized&&i.autoExpandColumn){var d=a.getTotalWidth(false);var j=this.grid.getGridEl().getWidth(true)-this.getScrollOffset();if(d!=j){var h=a.getIndexById(i.autoExpandColumn);var e=a.getColumnWidth(h);var c=Math.min(Math.max(((j-d)+e),i.autoExpandMin),i.autoExpandMax);if(c!=e){a.setColumnWidth(h,c,true);if(b!==true){this.updateColumnWidth(h,c)}}}}},getColumnData:function(){var d=[],a=this.cm,e=a.getColumnCount();for(var c=0;c'+this.emptyText+"")}},updateHeaderSortState:function(){var b=this.ds.getSortState();if(!b){return}if(!this.sortState||(this.sortState.field!=b.field||this.sortState.direction!=b.direction)){this.grid.fireEvent("sortchange",this.grid,b)}this.sortState=b;var c=this.cm.findColumnIndex(b.field);if(c!=-1){var a=b.direction;this.updateSortIcon(c,a)}},clearHeaderSortState:function(){if(!this.sortState){return}this.grid.fireEvent("sortchange",this.grid,null);this.mainHd.select("td").removeClass(this.sortClasses);delete this.sortState},destroy:function(){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.initData(null,null);this.purgeListeners();Ext.fly(this.innerHd).un("click",this.handleHdDown,this);if(this.grid.enableColumnMove){Ext.destroy(this.columnDrag.el,this.columnDrag.proxy.ghost,this.columnDrag.proxy.el,this.columnDrop.el,this.columnDrop.proxyTop,this.columnDrop.proxyBottom,this.columnDrag.dragData.ddel,this.columnDrag.dragData.header);if(this.columnDrag.proxy.anim){Ext.destroy(this.columnDrag.proxy.anim)}delete this.columnDrag.proxy.ghost;delete this.columnDrag.dragData.ddel;delete this.columnDrag.dragData.header;this.columnDrag.destroy();delete Ext.dd.DDM.locationCache[this.columnDrag.id];delete this.columnDrag._domRef;delete this.columnDrop.proxyTop;delete this.columnDrop.proxyBottom;this.columnDrop.destroy();delete Ext.dd.DDM.locationCache["gridHeader"+this.grid.getGridEl().id];delete this.columnDrop._domRef;delete Ext.dd.DDM.ids[this.columnDrop.ddGroup]}if(this.splitZone){this.splitZone.destroy();delete this.splitZone._domRef;delete Ext.dd.DDM.ids["gridSplitters"+this.grid.getGridEl().id]}Ext.fly(this.innerHd).removeAllListeners();Ext.removeNode(this.innerHd);delete this.innerHd;Ext.destroy(this.el,this.mainWrap,this.mainHd,this.scroller,this.mainBody,this.focusEl,this.resizeMarker,this.resizeProxy,this.activeHdBtn,this.dragZone,this.splitZone,this._flyweight);delete this.grid.container;if(this.dragZone){this.dragZone.destroy()}Ext.dd.DDM.currentTarget=null;delete Ext.dd.DDM.locationCache[this.grid.getGridEl().id];Ext.EventManager.removeResizeListener(this.onWindowResize,this)},onDenyColumnHide:function(){},render:function(){if(this.autoFill){var a=this.grid.ownerCt;if(a&&a.getLayout()){a.on("afterlayout",function(){this.fitColumns(true,true);this.updateHeaders()},this,{single:true})}else{this.fitColumns(true,true)}}else{if(this.forceFit){this.fitColumns(true,false)}else{if(this.grid.autoExpandColumn){this.autoExpand(true)}}}this.renderUI()},initData:function(b,a){if(this.ds){this.ds.un("load",this.onLoad,this);this.ds.un("datachanged",this.onDataChange,this);this.ds.un("add",this.onAdd,this);this.ds.un("remove",this.onRemove,this);this.ds.un("update",this.onUpdate,this);this.ds.un("clear",this.onClear,this);if(this.ds!==b&&this.ds.autoDestroy){this.ds.destroy()}}if(b){b.on({scope:this,load:this.onLoad,datachanged:this.onDataChange,add:this.onAdd,remove:this.onRemove,update:this.onUpdate,clear:this.onClear})}this.ds=b;if(this.cm){this.cm.un("configchange",this.onColConfigChange,this);this.cm.un("widthchange",this.onColWidthChange,this);this.cm.un("headerchange",this.onHeaderChange,this);this.cm.un("hiddenchange",this.onHiddenChange,this);this.cm.un("columnmoved",this.onColumnMove,this)}if(a){delete this.lastViewWidth;a.on({scope:this,configchange:this.onColConfigChange,widthchange:this.onColWidthChange,headerchange:this.onHeaderChange,hiddenchange:this.onHiddenChange,columnmoved:this.onColumnMove})}this.cm=a},onDataChange:function(){this.refresh();this.updateHeaderSortState();this.syncFocusEl(0)},onClear:function(){this.refresh();this.syncFocusEl(0)},onUpdate:function(b,a){this.refreshRow(a)},onAdd:function(c,a,b){this.insertRows(c,b,b+(a.length-1))},onRemove:function(d,a,b,c){if(c!==true){this.fireEvent("beforerowremoved",this,b,a)}this.removeRow(b);if(c!==true){this.processRows(b);this.applyEmptyText();this.fireEvent("rowremoved",this,b,a)}},onLoad:function(){this.scrollToTop.defer(Ext.isGecko?1:0,this)},onColWidthChange:function(a,b,c){this.updateColumnWidth(b,c)},onHeaderChange:function(a,b,c){this.updateHeaders()},onHiddenChange:function(a,b,c){this.updateColumnHidden(b,c)},onColumnMove:function(a,d,b){this.indexMap=null;var c=this.getScrollState();this.refresh(true);this.restoreScroll(c);this.afterMove(b);this.grid.fireEvent("columnmove",d,b)},onColConfigChange:function(){delete this.lastViewWidth;this.indexMap=null;this.refresh(true)},initUI:function(a){a.on("headerclick",this.onHeaderClick,this)},initEvents:function(){},onHeaderClick:function(b,a){if(this.headersDisabled||!this.cm.isSortable(a)){return}b.stopEditing(true);b.store.sort(this.cm.getDataIndex(a))},onRowOver:function(b,a){var c;if((c=this.findRowIndex(a))!==false){this.addRowClass(c,"x-grid3-row-over")}},onRowOut:function(b,a){var c;if((c=this.findRowIndex(a))!==false&&!b.within(this.getRow(c),true)){this.removeRowClass(c,"x-grid3-row-over")}},handleWheel:function(a){a.stopPropagation()},onRowSelect:function(a){this.addRowClass(a,this.selectedRowClass)},onRowDeselect:function(a){this.removeRowClass(a,this.selectedRowClass)},onCellSelect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).addClass("x-grid3-cell-selected")}},onCellDeselect:function(c,b){var a=this.getCell(c,b);if(a){this.fly(a).removeClass("x-grid3-cell-selected")}},onColumnSplitterMoved:function(c,b){this.userResized=true;var a=this.grid.colModel;a.setColumnWidth(c,b,true);if(this.forceFit){this.fitColumns(true,false,c);this.updateAllColumnWidths()}else{this.updateColumnWidth(c,b);this.syncHeaderScroll()}this.grid.fireEvent("columnresize",c,b)},handleHdMenuClick:function(c){var b=this.hdCtxIndex,a=this.cm,d=this.ds,e=c.getItemId();switch(e){case"asc":d.sort(a.getDataIndex(b),"ASC");break;case"desc":d.sort(a.getDataIndex(b),"DESC");break;default:b=a.getIndexById(e.substr(4));if(b!=-1){if(c.checked&&a.getColumnsBy(this.isHideableColumn,this).length<=1){this.onDenyColumnHide();return false}a.setHidden(b,c.checked)}}return true},isHideableColumn:function(a){return !a.hidden&&!a.fixed},beforeColMenuShow:function(){var a=this.cm,c=a.getColumnCount();this.colMenu.removeAll();for(var b=0;b=0&&this.config[a].resizable!==false&&this.config[a].fixed!==true},setHidden:function(a,b){var d=this.config[a];if(d.hidden!==b){d.hidden=b;this.totalWidth=null;this.fireEvent("hiddenchange",this,a,b)}},setEditor:function(a,b){this.config[a].setEditor(b)},destroy:function(){for(var b=0,a=this.config.length;b0},isSelected:function(a){var b=Ext.isNumber(a)?this.grid.store.getAt(a):a;return(b&&this.selections.key(b.id)?true:false)},isIdSelected:function(a){return(this.selections.key(a)?true:false)},handleMouseDown:function(d,i,h){if(h.button!==0||this.isLocked()){return}var a=this.grid.getView();if(h.shiftKey&&!this.singleSelect&&this.last!==false){var c=this.last;this.selectRange(c,i,h.ctrlKey);this.last=c;a.focusRow(i)}else{var b=this.isSelected(i);if(h.ctrlKey&&b){this.deselectRow(i)}else{if(!b||this.getCount()>1){this.selectRow(i,h.ctrlKey||h.shiftKey);a.focusRow(i)}}}},selectRows:function(c,d){if(!d){this.clearSelections()}for(var b=0,a=c.length;b=a;c--){this.selectRow(c,true)}}},deselectRange:function(c,b,a){if(this.isLocked()){return}for(var d=c;d<=b;d++){this.deselectRow(d,a)}},selectRow:function(b,d,a){if(this.isLocked()||(b<0||b>=this.grid.store.getCount())||(d&&this.isSelected(b))){return}var c=this.grid.store.getAt(b);if(c&&this.fireEvent("beforerowselect",this,b,d,c)!==false){if(!d||this.singleSelect){this.clearSelections()}this.selections.add(c);this.last=this.lastActive=b;if(!a){this.grid.getView().onRowSelect(b)}this.fireEvent("rowselect",this,b,c);this.fireEvent("selectionchange",this)}},deselectRow:function(b,a){if(this.isLocked()){return}if(this.last==b){this.last=false}if(this.lastActive==b){this.lastActive=false}var c=this.grid.store.getAt(b);if(c){this.selections.remove(c);if(!a){this.grid.getView().onRowDeselect(b)}this.fireEvent("rowdeselect",this,b,c);this.fireEvent("selectionchange",this)}},restoreLast:function(){if(this._last){this.last=this._last}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)},onEditorKey:function(n,l){var d=l.getKey(),h,i=this.grid,o=i.lastEdit,j=i.activeEditor,p,o,a,m;var b=l.shiftKey;if(d==l.TAB){l.stopEvent();j.completeEdit();if(b){h=i.walkCells(j.row,j.col-1,-1,this.acceptsNav,this)}else{h=i.walkCells(j.row,j.col+1,1,this.acceptsNav,this)}}else{if(d==l.ENTER){if(this.moveEditorOnEnter!==false){if(b){h=i.walkCells(o.row-1,o.col,-1,this.acceptsNav,this)}else{h=i.walkCells(o.row+1,o.col,1,this.acceptsNav,this)}}}}if(h){a=h[0];m=h[1];if(o.row!=a){this.selectRow(a)}if(i.isEditor&&i.editing){p=i.activeEditor;if(p&&p.field.triggerBlur){p.field.triggerBlur()}}i.startEditing(a,m)}},destroy:function(){if(this.rowNav){this.rowNav.disable();this.rowNav=null}Ext.grid.RowSelectionModel.superclass.destroy.call(this)}});Ext.grid.Column=Ext.extend(Object,{isColumn:true,constructor:function(b){Ext.apply(this,b);if(Ext.isString(this.renderer)){this.renderer=Ext.util.Format[this.renderer]}else{if(Ext.isObject(this.renderer)){this.scope=this.renderer.scope;this.renderer=this.renderer.fn}}if(!this.scope){this.scope=this}var a=this.editor;delete this.editor;this.setEditor(a)},renderer:function(a){if(Ext.isString(a)&&a.length<1){return" "}return a},getEditor:function(a){return this.editable!==false?this.editor:null},setEditor:function(a){if(this.editor){this.editor.destroy()}this.editor=null;if(a){if(!a.isXType){a=Ext.create(a,"textfield")}if(!a.startEdit){a=new Ext.grid.GridEditor(a)}this.editor=a}},destroy:function(){this.setEditor(null)},getCellEditor:function(a){return this.getEditor(a)}});Ext.grid.BooleanColumn=Ext.extend(Ext.grid.Column,{trueText:"true",falseText:"false",undefinedText:" ",constructor:function(a){Ext.grid.BooleanColumn.superclass.constructor.call(this,a);var c=this.trueText,d=this.falseText,b=this.undefinedText;this.renderer=function(e){if(e===undefined){return b}if(!e||e==="false"){return d}return c}}});Ext.grid.NumberColumn=Ext.extend(Ext.grid.Column,{format:"0,000.00",constructor:function(a){Ext.grid.NumberColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.numberRenderer(this.format)}});Ext.grid.DateColumn=Ext.extend(Ext.grid.Column,{format:"m/d/Y",constructor:function(a){Ext.grid.DateColumn.superclass.constructor.call(this,a);this.renderer=Ext.util.Format.dateRenderer(this.format)}});Ext.grid.TemplateColumn=Ext.extend(Ext.grid.Column,{constructor:function(a){Ext.grid.TemplateColumn.superclass.constructor.call(this,a);var b=(!Ext.isPrimitive(this.tpl)&&this.tpl.compile)?this.tpl:new Ext.XTemplate(this.tpl);this.renderer=function(d,e,c){return b.apply(c.data)};this.tpl=b}});Ext.grid.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=Ext.extend(Object,{header:"",width:23,sortable:false,constructor:function(a){Ext.apply(this,a);if(this.rowspan){this.renderer=this.renderer.createDelegate(this)}},fixed:true,menuDisabled:true,dataIndex:"",id:"numberer",rowspan:undefined,renderer:function(b,c,a,d){if(this.rowspan){c.cellAttr='rowspan="'+this.rowspan+'"'}return d+1}});Ext.grid.CheckboxSelectionModel=Ext.extend(Ext.grid.RowSelectionModel,{header:'
     
    ',width:20,sortable:false,menuDisabled:true,fixed:true,dataIndex:"",id:"checker",constructor:function(){Ext.grid.CheckboxSelectionModel.superclass.constructor.apply(this,arguments);if(this.checkOnly){this.handleMouseDown=Ext.emptyFn}},initEvents:function(){Ext.grid.CheckboxSelectionModel.superclass.initEvents.call(this);this.grid.on("render",function(){var a=this.grid.getView();a.mainBody.on("mousedown",this.onMouseDown,this);Ext.fly(a.innerHd).on("mousedown",this.onHdMouseDown,this)},this)},onMouseDown:function(c,b){if(c.button===0&&b.className=="x-grid3-row-checker"){c.stopEvent();var d=c.getTarget(".x-grid3-row");if(d){var a=d.rowIndex;if(this.isSelected(a)){this.deselectRow(a)}else{this.selectRow(a,true)}}}},onHdMouseDown:function(c,a){if(a.className=="x-grid3-hd-checker"){c.stopEvent();var b=Ext.fly(a.parentNode);var d=b.hasClass("x-grid3-hd-checker-on");if(d){b.removeClass("x-grid3-hd-checker-on");this.clearSelections()}else{b.addClass("x-grid3-hd-checker-on");this.selectAll()}}},renderer:function(b,c,a){return'
     
    '}});Ext.grid.CellSelectionModel=Ext.extend(Ext.grid.AbstractSelectionModel,{constructor:function(a){Ext.apply(this,a);this.selection=null;this.addEvents("beforecellselect","cellselect","selectionchange");Ext.grid.CellSelectionModel.superclass.constructor.call(this)},initEvents:function(){this.grid.on("cellmousedown",this.handleMouseDown,this);this.grid.on(Ext.EventManager.useKeydown?"keydown":"keypress",this.handleKeyDown,this);this.grid.getView().on({scope:this,refresh:this.onViewChange,rowupdated:this.onRowUpdated,beforerowremoved:this.clearSelections,beforerowsinserted:this.clearSelections});if(this.grid.isEditor){this.grid.on("beforeedit",this.beforeEdit,this)}},beforeEdit:function(a){this.select(a.row,a.column,false,true,a.record)},onRowUpdated:function(a,b,c){if(this.selection&&this.selection.record==c){a.onCellSelect(b,this.selection.cell[1])}},onViewChange:function(){this.clearSelections(true)},getSelectedCell:function(){return this.selection?this.selection.cell:null},clearSelections:function(b){var a=this.selection;if(a){if(b!==true){this.grid.view.onCellDeselect(a.cell[0],a.cell[1])}this.selection=null;this.fireEvent("selectionchange",this,null)}},hasSelection:function(){return this.selection?true:false},handleMouseDown:function(b,d,a,c){if(c.button!==0||this.isLocked()){return}this.select(d,a)},select:function(g,c,b,e,d){if(this.fireEvent("beforecellselect",this,g,c)!==false){this.clearSelections();d=d||this.grid.store.getAt(g);this.selection={record:d,cell:[g,c]};if(!b){var a=this.grid.getView();a.onCellSelect(g,c);if(e!==true){a.focusCell(g,c)}}this.fireEvent("cellselect",this,g,c);this.fireEvent("selectionchange",this,this.selection)}},isSelectable:function(c,b,a){return !a.isHidden(b)},onEditorKey:function(b,a){if(a.getKey()==a.TAB){this.handleKeyDown(a)}},handleKeyDown:function(j){if(!j.isNavKeyPress()){return}var d=j.getKey(),i=this.grid,p=this.selection,b=this,m=function(g,c,e){return i.walkCells(g,c,e,i.isEditor&&i.editing?b.acceptsNav:b.isSelectable,b)},o,h,a,l,n;switch(d){case j.ESC:case j.PAGE_UP:case j.PAGE_DOWN:break;default:j.stopEvent();break}if(!p){o=m(0,0,1);if(o){this.select(o[0],o[1])}return}o=p.cell;a=o[0];l=o[1];switch(d){case j.TAB:if(j.shiftKey){h=m(a,l-1,-1)}else{h=m(a,l+1,1)}break;case j.DOWN:h=m(a+1,l,1);break;case j.UP:h=m(a-1,l,-1);break;case j.RIGHT:h=m(a,l+1,1);break;case j.LEFT:h=m(a,l-1,-1);break;case j.ENTER:if(i.isEditor&&!i.editing){i.startEditing(a,l);return}break}if(h){a=h[0];l=h[1];this.select(a,l);if(i.isEditor&&i.editing){n=i.activeEditor;if(n&&n.field.triggerBlur){n.field.triggerBlur()}i.startEditing(a,l)}}},acceptsNav:function(c,b,a){return !a.isHidden(b)&&a.isCellEditable(b,c)}});Ext.grid.EditorGridPanel=Ext.extend(Ext.grid.GridPanel,{clicksToEdit:2,forceValidation:false,isEditor:true,detectEdit:false,autoEncode:false,trackMouseOver:false,initComponent:function(){Ext.grid.EditorGridPanel.superclass.initComponent.call(this);if(!this.selModel){this.selModel=new Ext.grid.CellSelectionModel()}this.activeEditor=null;this.addEvents("beforeedit","afteredit","validateedit")},initEvents:function(){Ext.grid.EditorGridPanel.superclass.initEvents.call(this);this.getGridEl().on("mousewheel",this.stopEditing.createDelegate(this,[true]),this);this.on("columnresize",this.stopEditing,this,[true]);if(this.clicksToEdit==1){this.on("cellclick",this.onCellDblClick,this)}else{var a=this.getView();if(this.clicksToEdit=="auto"&&a.mainBody){a.mainBody.on("mousedown",this.onAutoEditClick,this)}this.on("celldblclick",this.onCellDblClick,this)}},onResize:function(){Ext.grid.EditorGridPanel.superclass.onResize.apply(this,arguments);var a=this.activeEditor;if(this.editing&&a){a.realign(true)}},onCellDblClick:function(b,c,a){this.startEditing(c,a)},onAutoEditClick:function(c,b){if(c.button!==0){return}var g=this.view.findRowIndex(b),a=this.view.findCellIndex(b);if(g!==false&&a!==false){this.stopEditing();if(this.selModel.getSelectedCell){var d=this.selModel.getSelectedCell();if(d&&d[0]===g&&d[1]===a){this.startEditing(g,a)}}else{if(this.selModel.isSelected(g)){this.startEditing(g,a)}}}},onEditComplete:function(b,d,a){this.editing=false;this.activeEditor=null;var c=b.record,h=this.colModel.getDataIndex(b.col);d=this.postEditValue(d,a,c,h);if(this.forceValidation===true||String(d)!==String(a)){var g={grid:this,record:c,field:h,originalValue:a,value:d,row:b.row,column:b.col,cancel:false};if(this.fireEvent("validateedit",g)!==false&&!g.cancel&&String(d)!==String(a)){c.set(h,g.value);delete g.cancel;this.fireEvent("afteredit",g)}}this.view.focusCell(b.row,b.col)},startEditing:function(i,c){this.stopEditing();if(this.colModel.isCellEditable(c,i)){this.view.ensureVisible(i,c,true);var d=this.store.getAt(i),h=this.colModel.getDataIndex(c),g={grid:this,record:d,field:h,value:d.data[h],row:i,column:c,cancel:false};if(this.fireEvent("beforeedit",g)!==false&&!g.cancel){this.editing=true;var b=this.colModel.getCellEditor(c,i);if(!b){return}if(!b.rendered){b.parentEl=this.view.getEditorParent(b);b.on({scope:this,render:{fn:function(e){e.field.focus(false,true)},single:true,scope:this},specialkey:function(k,j){this.getSelectionModel().onEditorKey(k,j)},complete:this.onEditComplete,canceledit:this.stopEditing.createDelegate(this,[true])})}Ext.apply(b,{row:i,col:c,record:d});this.lastEdit={row:i,col:c};this.activeEditor=b;b.selectSameEditor=(this.activeEditor==this.lastActiveEditor);var a=this.preEditValue(d,h);b.startEdit(this.view.getCell(i,c).firstChild,Ext.isDefined(a)?a:"");(function(){delete b.selectSameEditor}).defer(50)}}},preEditValue:function(a,c){var b=a.data[c];return this.autoEncode&&Ext.isString(b)?Ext.util.Format.htmlDecode(b):b},postEditValue:function(c,a,b,d){return this.autoEncode&&Ext.isString(c)?Ext.util.Format.htmlEncode(c):c},stopEditing:function(b){if(this.editing){var a=this.lastActiveEditor=this.activeEditor;if(a){a[b===true?"cancelEdit":"completeEdit"]();this.view.focusCell(a.row,a.col)}this.activeEditor=null}this.editing=false}});Ext.reg("editorgrid",Ext.grid.EditorGridPanel);Ext.grid.GridEditor=function(b,a){Ext.grid.GridEditor.superclass.constructor.call(this,b,a);b.monitorTab=false};Ext.extend(Ext.grid.GridEditor,Ext.Editor,{alignment:"tl-tl",autoSize:"width",hideEl:false,cls:"x-small-editor x-grid-editor",shim:false,shadow:false});Ext.grid.PropertyRecord=Ext.data.Record.create([{name:"name",type:"string"},"value"]);Ext.grid.PropertyStore=Ext.extend(Ext.util.Observable,{constructor:function(a,b){this.grid=a;this.store=new Ext.data.Store({recordType:Ext.grid.PropertyRecord});this.store.on("update",this.onUpdate,this);if(b){this.setSource(b)}Ext.grid.PropertyStore.superclass.constructor.call(this)},setSource:function(c){this.source=c;this.store.removeAll();var b=[];for(var a in c){if(this.isEditableValue(c[a])){b.push(new Ext.grid.PropertyRecord({name:a,value:c[a]},a))}}this.store.loadRecords({records:b},{},true)},onUpdate:function(e,a,d){if(d==Ext.data.Record.EDIT){var b=a.data.value;var c=a.modified.value;if(this.grid.fireEvent("beforepropertychange",this.source,a.id,b,c)!==false){this.source[a.id]=b;a.commit();this.grid.fireEvent("propertychange",this.source,a.id,b,c)}else{a.reject()}}},getProperty:function(a){return this.store.getAt(a)},isEditableValue:function(a){return Ext.isPrimitive(a)||Ext.isDate(a)},setValue:function(d,c,a){var b=this.getRec(d);if(b){b.set("value",c);this.source[d]=c}else{if(a){this.source[d]=c;b=new Ext.grid.PropertyRecord({name:d,value:c},d);this.store.add(b)}}},remove:function(b){var a=this.getRec(b);if(a){this.store.remove(a);delete this.source[b]}},getRec:function(a){return this.store.getById(a)},getSource:function(){return this.source}});Ext.grid.PropertyColumnModel=Ext.extend(Ext.grid.ColumnModel,{nameText:"Name",valueText:"Value",dateFormat:"m/j/Y",trueText:"true",falseText:"false",constructor:function(c,b){var d=Ext.grid,e=Ext.form;this.grid=c;d.PropertyColumnModel.superclass.constructor.call(this,[{header:this.nameText,width:50,sortable:true,dataIndex:"name",id:"name",menuDisabled:true},{header:this.valueText,width:50,resizable:false,dataIndex:"value",id:"value",menuDisabled:true}]);this.store=b;var a=new e.Field({autoCreate:{tag:"select",children:[{tag:"option",value:"true",html:this.trueText},{tag:"option",value:"false",html:this.falseText}]},getValue:function(){return this.el.dom.value=="true"}});this.editors={date:new d.GridEditor(new e.DateField({selectOnFocus:true})),string:new d.GridEditor(new e.TextField({selectOnFocus:true})),number:new d.GridEditor(new e.NumberField({selectOnFocus:true,style:"text-align:left;"})),"boolean":new d.GridEditor(a,{autoSize:"both"})};this.renderCellDelegate=this.renderCell.createDelegate(this);this.renderPropDelegate=this.renderProp.createDelegate(this)},renderDate:function(a){return a.dateFormat(this.dateFormat)},renderBool:function(a){return this[a?"trueText":"falseText"]},isCellEditable:function(a,b){return a==1},getRenderer:function(a){return a==1?this.renderCellDelegate:this.renderPropDelegate},renderProp:function(a){return this.getPropertyName(a)},renderCell:function(d,b,c){var a=this.grid.customRenderers[c.get("name")];if(a){return a.apply(this,arguments)}var e=d;if(Ext.isDate(d)){e=this.renderDate(d)}else{if(typeof d=="boolean"){e=this.renderBool(d)}}return Ext.util.Format.htmlEncode(e)},getPropertyName:function(b){var a=this.grid.propertyNames;return a&&a[b]?a[b]:b},getCellEditor:function(a,e){var b=this.store.getProperty(e),d=b.data.name,c=b.data.value;if(this.grid.customEditors[d]){return this.grid.customEditors[d]}if(Ext.isDate(c)){return this.editors.date}else{if(typeof c=="number"){return this.editors.number}else{if(typeof c=="boolean"){return this.editors["boolean"]}else{return this.editors.string}}}},destroy:function(){Ext.grid.PropertyColumnModel.superclass.destroy.call(this);for(var a in this.editors){Ext.destroy(this.editors[a])}}});Ext.grid.PropertyGrid=Ext.extend(Ext.grid.EditorGridPanel,{enableColumnMove:false,stripeRows:false,trackMouseOver:false,clicksToEdit:1,enableHdMenu:false,viewConfig:{forceFit:true},initComponent:function(){this.customRenderers=this.customRenderers||{};this.customEditors=this.customEditors||{};this.lastEditRow=null;var b=new Ext.grid.PropertyStore(this);this.propStore=b;var a=new Ext.grid.PropertyColumnModel(this,b);b.store.sort("name","ASC");this.addEvents("beforepropertychange","propertychange");this.cm=a;this.ds=b.store;Ext.grid.PropertyGrid.superclass.initComponent.call(this);this.mon(this.selModel,"beforecellselect",function(e,d,c){if(c===0){this.startEditing.defer(200,this,[d,1]);return false}},this)},onRender:function(){Ext.grid.PropertyGrid.superclass.onRender.apply(this,arguments);this.getGridEl().addClass("x-props-grid")},afterRender:function(){Ext.grid.PropertyGrid.superclass.afterRender.apply(this,arguments);if(this.source){this.setSource(this.source)}},setSource:function(a){this.propStore.setSource(a)},getSource:function(){return this.propStore.getSource()},setProperty:function(c,b,a){this.propStore.setValue(c,b,a)},removeProperty:function(a){this.propStore.remove(a)}});Ext.reg("propertygrid",Ext.grid.PropertyGrid);Ext.grid.GroupingView=Ext.extend(Ext.grid.GridView,{groupByText:"Group By This Field",showGroupsText:"Show in Groups",hideGroupedColumn:false,showGroupName:true,startCollapsed:false,enableGrouping:true,enableGroupingMenu:true,enableNoGroups:true,emptyGroupText:"(None)",ignoreAdd:false,groupTextTpl:"{text}",groupMode:"value",gidSeed:1000,initTemplates:function(){Ext.grid.GroupingView.superclass.initTemplates.call(this);this.state={};var a=this.grid.getSelectionModel();a.on(a.selectRow?"beforerowselect":"beforecellselect",this.onBeforeRowSelect,this);if(!this.startGroup){this.startGroup=new Ext.XTemplate('
    ','
    ',this.groupTextTpl,"
    ",'
    ')}this.startGroup.compile();if(!this.endGroup){this.endGroup="
    "}this.endGroup=""},findGroup:function(a){return Ext.fly(a).up(".x-grid-group",this.mainBody.dom)},getGroups:function(){return this.hasRows()?this.mainBody.dom.childNodes:[]},onAdd:function(){if(this.canGroup()&&!this.ignoreAdd){var a=this.getScrollState();this.refresh();this.restoreScroll(a)}else{if(!this.canGroup()){Ext.grid.GroupingView.superclass.onAdd.apply(this,arguments)}}},onRemove:function(e,a,b,d){Ext.grid.GroupingView.superclass.onRemove.apply(this,arguments);var c=document.getElementById(a._groupId);if(c&&c.childNodes[1].childNodes.length<1){Ext.removeNode(c)}this.applyEmptyText()},refreshRow:function(a){if(this.ds.getCount()==1){this.refresh()}else{this.isUpdating=true;Ext.grid.GroupingView.superclass.refreshRow.apply(this,arguments);this.isUpdating=false}},beforeMenuShow:function(){var c,a=this.hmenu.items,b=this.cm.config[this.hdCtxIndex].groupable===false;if((c=a.get("groupBy"))){c.setDisabled(b)}if((c=a.get("showGroups"))){c.setDisabled(b);c.setChecked(this.enableGrouping,true)}},renderUI:function(){Ext.grid.GroupingView.superclass.renderUI.call(this);this.mainBody.on("mousedown",this.interceptMouse,this);if(this.enableGroupingMenu&&this.hmenu){this.hmenu.add("-",{itemId:"groupBy",text:this.groupByText,handler:this.onGroupByClick,scope:this,iconCls:"x-group-by-icon"});if(this.enableNoGroups){this.hmenu.add({itemId:"showGroups",text:this.showGroupsText,checked:true,checkHandler:this.onShowGroupsClick,scope:this})}this.hmenu.on("beforeshow",this.beforeMenuShow,this)}},processEvent:function(b,h){var g=h.getTarget(".x-grid-group-hd",this.mainBody);if(g){var d=this.getGroupField(),c=this.getPrefix(d),a=g.id.substring(c.length);a=a.substr(0,a.length-3);if(a){this.grid.fireEvent("group"+b,this.grid,d,a,h)}}},onGroupByClick:function(){this.enableGrouping=true;this.grid.store.groupBy(this.cm.getDataIndex(this.hdCtxIndex));this.grid.fireEvent("groupchange",this,this.grid.store.getGroupState());this.beforeMenuShow();this.refresh()},onShowGroupsClick:function(a,b){this.enableGrouping=b;if(b){this.onGroupByClick()}else{this.grid.store.clearGrouping();this.grid.fireEvent("groupchange",this,null)}},toggleRowIndex:function(c,a){if(!this.canGroup()){return}var b=this.getRow(c);if(b){this.toggleGroup(this.findGroup(b),a)}},toggleGroup:function(c,b){var a=Ext.get(c);b=Ext.isDefined(b)?b:a.hasClass("x-grid-group-collapsed");if(this.state[a.id]!==b){this.grid.stopEditing(true);this.state[a.id]=b;a[b?"removeClass":"addClass"]("x-grid-group-collapsed")}},toggleAllGroups:function(c){var b=this.getGroups();for(var d=0,a=b.length;d0){for(var ag=0;ag0){var af=c(Z);if(af){if(G(p[ag].swfVersion)&&!(N.wk&&N.wk<312)){x(Z,true);if(ac){ab.success=true;ab.ref=A(Z);ac(ab)}}else{if(p[ag].expressInstall&&B()){var aj={};aj.data=p[ag].expressInstall;aj.width=af.getAttribute("width")||"0";aj.height=af.getAttribute("height")||"0";if(af.getAttribute("class")){aj.styleclass=af.getAttribute("class")}if(af.getAttribute("align")){aj.align=af.getAttribute("align")}var ai={};var Y=af.getElementsByTagName("param");var ad=Y.length;for(var ae=0;ae'}}ab.outerHTML='"+ag+"";O[O.length]=aj.id;Y=c(aj.id)}else{var aa=D(s);aa.setAttribute("type",r);for(var ad in aj){if(aj[ad]!=Object.prototype[ad]){if(ad.toLowerCase()=="styleclass"){aa.setAttribute("class",aj[ad])}else{if(ad.toLowerCase()!="classid"){aa.setAttribute(ad,aj[ad])}}}}for(var ac in ah){if(ah[ac]!=Object.prototype[ac]&&ac.toLowerCase()!="movie"){e(aa,ac,ah[ac])}}ab.parentNode.replaceChild(aa,ab);Y=aa}}return Y}function e(aa,Y,Z){var ab=D("param");ab.setAttribute("name",Y);ab.setAttribute("value",Z);aa.appendChild(ab)}function z(Z){var Y=c(Z);if(Y&&Y.nodeName=="OBJECT"){if(N.ie&&N.win){Y.style.display="none";(function(){if(Y.readyState==4){b(Z)}else{setTimeout(arguments.callee,10)}})()}else{Y.parentNode.removeChild(Y)}}}function b(aa){var Z=c(aa);if(Z){for(var Y in Z){if(typeof Z[Y]=="function"){Z[Y]=null}}Z.parentNode.removeChild(Z)}}function c(aa){var Y=null;try{Y=k.getElementById(aa)}catch(Z){}return Y}function D(Y){return k.createElement(Y)}function j(aa,Y,Z){aa.attachEvent(Y,Z);J[J.length]=[aa,Y,Z]}function G(aa){var Z=N.pv,Y=aa.split(".");Y[0]=parseInt(Y[0],10);Y[1]=parseInt(Y[1],10)||0;Y[2]=parseInt(Y[2],10)||0;return(Z[0]>Y[0]||(Z[0]==Y[0]&&Z[1]>Y[1])||(Z[0]==Y[0]&&Z[1]==Y[1]&&Z[2]>=Y[2]))?true:false}function w(ad,Z,ae,ac){if(N.ie&&N.mac){return}var ab=k.getElementsByTagName("head")[0];if(!ab){return}var Y=(ae&&typeof ae=="string")?ae:"screen";if(ac){o=null;H=null}if(!o||H!=Y){var aa=D("style");aa.setAttribute("type","text/css");aa.setAttribute("media",Y);o=ab.appendChild(aa);if(N.ie&&N.win&&typeof k.styleSheets!=E&&k.styleSheets.length>0){o=k.styleSheets[k.styleSheets.length-1]}H=Y}if(N.ie&&N.win){if(o&&typeof o.addRule==s){o.addRule(ad,Z)}}else{if(o&&typeof k.createTextNode!=E){o.appendChild(k.createTextNode(ad+" {"+Z+"}"))}}}function x(aa,Y){if(!n){return}var Z=Y?"visible":"hidden";if(K&&c(aa)){c(aa).style.visibility=Z}else{w("#"+aa,"visibility:"+Z)}}function M(Z){var aa=/[\\\"<>\.;]/;var Y=aa.exec(Z)!=null;return Y&&typeof encodeURIComponent!=E?encodeURIComponent(Z):Z}var d=function(){if(N.ie&&N.win){window.attachEvent("onunload",function(){var ad=J.length;for(var ac=0;ac0){for(h=0;h-1&&e.position=="left"){e.position="bottom"}return e},onDestroy:function(){Ext.chart.CartesianChart.superclass.onDestroy.call(this);Ext.each(this.labelFn,function(a){this.removeFnProxy(a)},this)}});Ext.reg("cartesianchart",Ext.chart.CartesianChart);Ext.chart.LineChart=Ext.extend(Ext.chart.CartesianChart,{type:"line"});Ext.reg("linechart",Ext.chart.LineChart);Ext.chart.ColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"column"});Ext.reg("columnchart",Ext.chart.ColumnChart);Ext.chart.StackedColumnChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackcolumn"});Ext.reg("stackedcolumnchart",Ext.chart.StackedColumnChart);Ext.chart.BarChart=Ext.extend(Ext.chart.CartesianChart,{type:"bar"});Ext.reg("barchart",Ext.chart.BarChart);Ext.chart.StackedBarChart=Ext.extend(Ext.chart.CartesianChart,{type:"stackbar"});Ext.reg("stackedbarchart",Ext.chart.StackedBarChart);Ext.chart.Axis=function(a){Ext.apply(this,a)};Ext.chart.Axis.prototype={type:null,orientation:"horizontal",reverse:false,labelFunction:null,hideOverlappingLabels:true,labelSpacing:2};Ext.chart.NumericAxis=Ext.extend(Ext.chart.Axis,{type:"numeric",minimum:NaN,maximum:NaN,majorUnit:NaN,minorUnit:NaN,snapToUnits:true,alwaysShowZero:true,scale:"linear",roundMajorUnit:true,calculateByLabelSize:true,position:"left",adjustMaximumByMajorUnit:true,adjustMinimumByMajorUnit:true});Ext.chart.TimeAxis=Ext.extend(Ext.chart.Axis,{type:"time",minimum:null,maximum:null,majorUnit:NaN,majorTimeUnit:null,minorUnit:NaN,minorTimeUnit:null,snapToUnits:true,stackingEnabled:false,calculateByLabelSize:true});Ext.chart.CategoryAxis=Ext.extend(Ext.chart.Axis,{type:"category",categoryNames:null,calculateCategoryCount:false});Ext.chart.Series=function(a){Ext.apply(this,a)};Ext.chart.Series.prototype={type:null,displayName:null};Ext.chart.CartesianSeries=Ext.extend(Ext.chart.Series,{xField:null,yField:null,showInLegend:true,axis:"primary"});Ext.chart.ColumnSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"column"});Ext.chart.LineSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"line"});Ext.chart.BarSeries=Ext.extend(Ext.chart.CartesianSeries,{type:"bar"});Ext.chart.PieSeries=Ext.extend(Ext.chart.Series,{type:"pie",dataField:null,categoryField:null});Ext.menu.Menu=Ext.extend(Ext.Container,{minWidth:120,shadow:"sides",subMenuAlign:"tl-tr?",defaultAlign:"tl-bl?",allowOtherMenus:false,ignoreParentClicks:false,enableScrolling:true,maxHeight:null,scrollIncrement:24,showSeparator:true,defaultOffsets:[0,0],plain:false,floating:true,zIndex:15000,hidden:true,layout:"menu",hideMode:"offsets",scrollerHeight:8,autoLayout:true,defaultType:"menuitem",bufferResize:false,initComponent:function(){if(Ext.isArray(this.initialConfig)){Ext.apply(this,{items:this.initialConfig})}this.addEvents("click","mouseover","mouseout","itemclick");Ext.menu.MenuMgr.register(this);if(this.floating){Ext.EventManager.onWindowResize(this.hide,this)}else{if(this.initialConfig.hidden!==false){this.hidden=false}this.internalDefaults={hideOnClick:false}}Ext.menu.Menu.superclass.initComponent.call(this);if(this.autoLayout){var a=this.doLayout.createDelegate(this,[]);this.on({add:a,remove:a})}},getLayoutTarget:function(){return this.ul},onRender:function(b,a){if(!b){b=Ext.getBody()}var c={id:this.getId(),cls:"x-menu "+((this.floating)?"x-menu-floating x-layer ":"")+(this.cls||"")+(this.plain?" x-menu-plain":"")+(this.showSeparator?"":" x-menu-nosep"),style:this.style,cn:[{tag:"a",cls:"x-menu-focus",href:"#",onclick:"return false;",tabIndex:"-1"},{tag:"ul",cls:"x-menu-list"}]};if(this.floating){this.el=new Ext.Layer({shadow:this.shadow,dh:c,constrain:false,parentEl:b,zindex:this.zIndex})}else{this.el=b.createChild(c)}Ext.menu.Menu.superclass.onRender.call(this,b,a);if(!this.keyNav){this.keyNav=new Ext.menu.MenuNav(this)}this.focusEl=this.el.child("a.x-menu-focus");this.ul=this.el.child("ul.x-menu-list");this.mon(this.ul,{scope:this,click:this.onClick,mouseover:this.onMouseOver,mouseout:this.onMouseOut});if(this.enableScrolling){this.mon(this.el,{scope:this,delegate:".x-menu-scroller",click:this.onScroll,mouseover:this.deactivateActive})}},findTargetItem:function(b){var a=b.getTarget(".x-menu-list-item",this.ul,true);if(a&&a.menuItemId){return this.items.get(a.menuItemId)}},onClick:function(b){var a=this.findTargetItem(b);if(a){if(a.isFormField){this.setActiveItem(a)}else{if(a instanceof Ext.menu.BaseItem){if(a.menu&&this.ignoreParentClicks){a.expandMenu();b.preventDefault()}else{if(a.onClick){a.onClick(b);this.fireEvent("click",this,a,b)}}}}}},setActiveItem:function(a,b){if(a!=this.activeItem){this.deactivateActive();if((this.activeItem=a).isFormField){a.focus()}else{a.activate(b)}}else{if(b){a.expandMenu()}}},deactivateActive:function(){var b=this.activeItem;if(b){if(b.isFormField){if(b.collapse){b.collapse()}}else{b.deactivate()}delete this.activeItem}},tryActivate:function(g,e){var b=this.items;for(var c=g,a=b.length;c>=0&&c=a.scrollHeight){this.onScrollerOut(null,b)}},onScrollerIn:function(d,b){var a=this.ul.dom,c=Ext.fly(b).is(".x-menu-scroller-top");if(c?a.scrollTop>0:a.scrollTop+this.activeMaxc){b=c;a=i-h}else{if(bb&&b>0){this.activeMax=b-this.scrollerHeight*2-this.el.getFrameWidth("tb")-Ext.num(this.el.shadowOffset,0);this.ul.setHeight(this.activeMax);this.createScrollers();this.el.select(".x-menu-scroller").setDisplayed("")}else{this.ul.setHeight(d);this.el.select(".x-menu-scroller").setDisplayed("none")}this.ul.dom.scrollTop=0;return a},createScrollers:function(){if(!this.scroller){this.scroller={pos:0,top:this.el.insertFirst({tag:"div",cls:"x-menu-scroller x-menu-scroller-top",html:" "}),bottom:this.el.createChild({tag:"div",cls:"x-menu-scroller x-menu-scroller-bottom",html:" "})};this.scroller.top.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.topRepeater=new Ext.util.ClickRepeater(this.scroller.top,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.top],false)}});this.scroller.bottom.hover(this.onScrollerIn,this.onScrollerOut,this);this.scroller.bottomRepeater=new Ext.util.ClickRepeater(this.scroller.bottom,{listeners:{click:this.onScroll.createDelegate(this,[null,this.scroller.bottom],false)}})}},onLayout:function(){if(this.isVisible()){if(this.enableScrolling){this.constrainScroll(this.el.getTop())}if(this.floating){this.el.sync()}}},focus:function(){if(!this.hidden){this.doFocus.defer(50,this)}},doFocus:function(){if(!this.hidden){this.focusEl.focus()}},hide:function(a){if(!this.isDestroyed){this.deepHide=a;Ext.menu.Menu.superclass.hide.call(this);delete this.deepHide}},onHide:function(){Ext.menu.Menu.superclass.onHide.call(this);this.deactivateActive();if(this.el&&this.floating){this.el.hide()}var a=this.parentMenu;if(this.deepHide===true&&a){if(a.floating){a.hide(true)}else{a.deactivateActive()}}},lookupComponent:function(a){if(Ext.isString(a)){a=(a=="separator"||a=="-")?new Ext.menu.Separator():new Ext.menu.TextItem(a);this.applyDefaults(a)}else{if(Ext.isObject(a)){a=this.getMenuItem(a)}else{if(a.tagName||a.el){a=new Ext.BoxComponent({el:a})}}}return a},applyDefaults:function(b){if(!Ext.isString(b)){b=Ext.menu.Menu.superclass.applyDefaults.call(this,b);var a=this.internalDefaults;if(a){if(b.events){Ext.applyIf(b.initialConfig,a);Ext.apply(b,a)}else{Ext.applyIf(b,a)}}}return b},getMenuItem:function(a){a.ownerCt=this;if(!a.isXType){if(!a.xtype&&Ext.isBoolean(a.checked)){return new Ext.menu.CheckItem(a)}return Ext.create(a,this.defaultType)}return a},addSeparator:function(){return this.add(new Ext.menu.Separator())},addElement:function(a){return this.add(new Ext.menu.BaseItem({el:a}))},addItem:function(a){return this.add(a)},addMenuItem:function(a){return this.add(this.getMenuItem(a))},addText:function(a){return this.add(new Ext.menu.TextItem(a))},onDestroy:function(){Ext.EventManager.removeResizeListener(this.hide,this);var a=this.parentMenu;if(a&&a.activeChild==this){delete a.activeChild}delete this.parentMenu;Ext.menu.Menu.superclass.onDestroy.call(this);Ext.menu.MenuMgr.unregister(this);if(this.keyNav){this.keyNav.disable()}var b=this.scroller;if(b){Ext.destroy(b.topRepeater,b.bottomRepeater,b.top,b.bottom)}Ext.destroy(this.el,this.focusEl,this.ul)}});Ext.reg("menu",Ext.menu.Menu);Ext.menu.MenuNav=Ext.extend(Ext.KeyNav,function(){function a(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)-1,-1)){c.tryActivate(c.items.length-1,-1)}}function b(d,c){if(!c.tryActivate(c.items.indexOf(c.activeItem)+1,1)){c.tryActivate(0,1)}}return{constructor:function(c){Ext.menu.MenuNav.superclass.constructor.call(this,c.el);this.scope=this.menu=c},doRelay:function(g,d){var c=g.getKey();if(this.menu.activeItem&&this.menu.activeItem.isFormField&&c!=g.TAB){return false}if(!this.menu.activeItem&&g.isNavKeyPress()&&c!=g.SPACE&&c!=g.RETURN){this.menu.tryActivate(0,1);return false}return d.call(this.scope||this,g,this.menu)},tab:function(d,c){d.stopEvent();if(d.shiftKey){a(d,c)}else{b(d,c)}},up:a,down:b,right:function(d,c){if(c.activeItem){c.activeItem.expandMenu(true)}},left:function(d,c){c.hide();if(c.parentMenu&&c.parentMenu.activeItem){c.parentMenu.activeItem.activate()}},enter:function(d,c){if(c.activeItem){d.stopPropagation();c.activeItem.onClick(d);c.fireEvent("click",this,c.activeItem);return true}}}}());Ext.menu.MenuMgr=function(){var h,e,b,d={},a=false,l=new Date();function n(){h={};e=new Ext.util.MixedCollection();b=Ext.getDoc().addKeyListener(27,j);b.disable()}function j(){if(e&&e.length>0){var o=e.clone();o.each(function(p){p.hide()});return true}return false}function g(o){e.remove(o);if(e.length<1){b.disable();Ext.getDoc().un("mousedown",m);a=false}}function k(o){var p=e.last();l=new Date();e.add(o);if(!a){b.enable();Ext.getDoc().on("mousedown",m);a=true}if(o.parentMenu){o.getEl().setZIndex(parseInt(o.parentMenu.getEl().getStyle("z-index"),10)+3);o.parentMenu.activeChild=o}else{if(p&&!p.isDestroyed&&p.isVisible()){o.getEl().setZIndex(parseInt(p.getEl().getStyle("z-index"),10)+3)}}}function c(o){if(o.activeChild){o.activeChild.hide()}if(o.autoHideTimer){clearTimeout(o.autoHideTimer);delete o.autoHideTimer}}function i(o){var p=o.parentMenu;if(!p&&!o.allowOtherMenus){j()}else{if(p&&p.activeChild){p.activeChild.hide()}}}function m(o){if(l.getElapsed()>50&&e.length>0&&!o.getTarget(".x-menu")){j()}}return{hideAll:function(){return j()},register:function(o){if(!h){n()}h[o.id]=o;o.on({beforehide:c,hide:g,beforeshow:i,show:k})},get:function(o){if(typeof o=="string"){if(!h){return null}return h[o]}else{if(o.events){return o}else{if(typeof o.length=="number"){return new Ext.menu.Menu({items:o})}else{return Ext.create(o,"menu")}}}},unregister:function(o){delete h[o.id];o.un("beforehide",c);o.un("hide",g);o.un("beforeshow",i);o.un("show",k)},registerCheckable:function(o){var p=o.group;if(p){if(!d[p]){d[p]=[]}d[p].push(o)}},unregisterCheckable:function(o){var p=o.group;if(p){d[p].remove(o)}},onCheckChange:function(q,r){if(q.group&&r){var t=d[q.group],p=0,o=t.length,s;for(;p',' target="{hrefTarget}"',"",">",'{altText}','{text}',"")}var c=this.getTemplateArgs();this.el=b?this.itemTpl.insertBefore(b,c,true):this.itemTpl.append(d,c,true);this.iconEl=this.el.child("img.x-menu-item-icon");this.textEl=this.el.child(".x-menu-item-text");if(!this.href){this.mon(this.el,"click",Ext.emptyFn,null,{preventDefault:true})}Ext.menu.Item.superclass.onRender.call(this,d,b)},getTemplateArgs:function(){return{id:this.id,cls:this.itemCls+(this.menu?" x-menu-item-arrow":"")+(this.cls?" "+this.cls:""),href:this.href||"#",hrefTarget:this.hrefTarget,icon:this.icon||Ext.BLANK_IMAGE_URL,iconCls:this.iconCls||"",text:this.itemText||this.text||" ",altText:this.altText||""}},setText:function(a){this.text=a||" ";if(this.rendered){this.textEl.update(this.text);this.parentMenu.layout.doAutoSize()}},setIconClass:function(a){var b=this.iconCls;this.iconCls=a;if(this.rendered){this.iconEl.replaceClass(b,this.iconCls)}},beforeDestroy:function(){clearTimeout(this.showTimer);clearTimeout(this.hideTimer);if(this.menu){delete this.menu.ownerCt;this.menu.destroy()}Ext.menu.Item.superclass.beforeDestroy.call(this)},handleClick:function(a){if(!this.href){a.stopEvent()}Ext.menu.Item.superclass.handleClick.apply(this,arguments)},activate:function(a){if(Ext.menu.Item.superclass.activate.apply(this,arguments)){this.focus();if(a){this.expandMenu()}}return true},shouldDeactivate:function(a){if(Ext.menu.Item.superclass.shouldDeactivate.call(this,a)){if(this.menu&&this.menu.isVisible()){return !this.menu.getEl().getRegion().contains(a.getPoint())}return true}return false},deactivate:function(){Ext.menu.Item.superclass.deactivate.apply(this,arguments);this.hideMenu()},expandMenu:function(a){if(!this.disabled&&this.menu){clearTimeout(this.hideTimer);delete this.hideTimer;if(!this.menu.isVisible()&&!this.showTimer){this.showTimer=this.deferExpand.defer(this.showDelay,this,[a])}else{if(this.menu.isVisible()&&a){this.menu.tryActivate(0,1)}}}},deferExpand:function(a){delete this.showTimer;this.menu.show(this.container,this.parentMenu.subMenuAlign||"tl-tr?",this.parentMenu);if(a){this.menu.tryActivate(0,1)}},hideMenu:function(){clearTimeout(this.showTimer);delete this.showTimer;if(!this.hideTimer&&this.menu&&this.menu.isVisible()){this.hideTimer=this.deferHide.defer(this.hideDelay,this)}},deferHide:function(){delete this.hideTimer;if(this.menu.over){this.parentMenu.setActiveItem(this,false)}else{this.menu.hide()}}});Ext.reg("menuitem",Ext.menu.Item);Ext.menu.CheckItem=Ext.extend(Ext.menu.Item,{itemCls:"x-menu-item x-menu-check-item",groupClass:"x-menu-group-item",checked:false,ctype:"Ext.menu.CheckItem",initComponent:function(){Ext.menu.CheckItem.superclass.initComponent.call(this);this.addEvents("beforecheckchange","checkchange");if(this.checkHandler){this.on("checkchange",this.checkHandler,this.scope)}Ext.menu.MenuMgr.registerCheckable(this)},onRender:function(a){Ext.menu.CheckItem.superclass.onRender.apply(this,arguments);if(this.group){this.el.addClass(this.groupClass)}if(this.checked){this.checked=false;this.setChecked(true,true)}},destroy:function(){Ext.menu.MenuMgr.unregisterCheckable(this);Ext.menu.CheckItem.superclass.destroy.apply(this,arguments)},setChecked:function(b,a){var c=a===true;if(this.checked!=b&&(c||this.fireEvent("beforecheckchange",this,b)!==false)){Ext.menu.MenuMgr.onCheckChange(this,b);if(this.container){this.container[b?"addClass":"removeClass"]("x-menu-item-checked")}this.checked=b;if(!c){this.fireEvent("checkchange",this,b)}}},handleClick:function(a){if(!this.disabled&&!(this.checked&&this.group)){this.setChecked(!this.checked)}Ext.menu.CheckItem.superclass.handleClick.apply(this,arguments)}});Ext.reg("menucheckitem",Ext.menu.CheckItem);Ext.menu.DateMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,pickerId:null,cls:"x-date-menu",initComponent:function(){this.on("beforeshow",this.onBeforeShow,this);if(this.strict=(Ext.isIE7&&Ext.isStrict)){this.on("show",this.onShow,this,{single:true,delay:20})}Ext.apply(this,{plain:true,showSeparator:false,items:this.picker=new Ext.DatePicker(Ext.applyIf({internalRender:this.strict||!Ext.isIE,ctCls:"x-menu-date-item",id:this.pickerId},this.initialConfig))});this.picker.purgeListeners();Ext.menu.DateMenu.superclass.initComponent.call(this);this.relayEvents(this.picker,["select"]);this.on("show",this.picker.focus,this.picker);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}},onBeforeShow:function(){if(this.picker){this.picker.hideMonthPicker(true)}},onShow:function(){var a=this.picker.getEl();a.setWidth(a.getWidth())}});Ext.reg("datemenu",Ext.menu.DateMenu);Ext.menu.ColorMenu=Ext.extend(Ext.menu.Menu,{enableScrolling:false,hideOnClick:true,cls:"x-color-menu",paletteId:null,initComponent:function(){Ext.apply(this,{plain:true,showSeparator:false,items:this.palette=new Ext.ColorPalette(Ext.applyIf({id:this.paletteId},this.initialConfig))});this.palette.purgeListeners();Ext.menu.ColorMenu.superclass.initComponent.call(this);this.relayEvents(this.palette,["select"]);this.on("select",this.menuHide,this);if(this.handler){this.on("select",this.handler,this.scope||this)}},menuHide:function(){if(this.hideOnClick){this.hide(true)}}});Ext.reg("colormenu",Ext.menu.ColorMenu);Ext.form.Field=Ext.extend(Ext.BoxComponent,{invalidClass:"x-form-invalid",invalidText:"The value in this field is invalid",focusClass:"x-form-focus",validationEvent:"keyup",validateOnBlur:true,validationDelay:250,defaultAutoCreate:{tag:"input",type:"text",size:"20",autocomplete:"off"},fieldClass:"x-form-field",msgTarget:"qtip",msgFx:"normal",readOnly:false,disabled:false,submitValue:true,isFormField:true,msgDisplay:"",hasFocus:false,initComponent:function(){Ext.form.Field.superclass.initComponent.call(this);this.addEvents("focus","blur","specialkey","change","invalid","valid")},getName:function(){return this.rendered&&this.el.dom.name?this.el.dom.name:this.name||this.id||""},onRender:function(c,a){if(!this.el){var b=this.getAutoCreate();if(!b.name){b.name=this.name||this.id}if(this.inputType){b.type=this.inputType}this.autoEl=b}Ext.form.Field.superclass.onRender.call(this,c,a);if(this.submitValue===false){this.el.dom.removeAttribute("name")}var d=this.el.dom.type;if(d){if(d=="password"){d="text"}this.el.addClass("x-form-"+d)}if(this.readOnly){this.setReadOnly(true)}if(this.tabIndex!==undefined){this.el.dom.setAttribute("tabIndex",this.tabIndex)}this.el.addClass([this.fieldClass,this.cls])},getItemCt:function(){return this.itemCt},initValue:function(){if(this.value!==undefined){this.setValue(this.value)}else{if(!Ext.isEmpty(this.el.dom.value)&&this.el.dom.value!=this.emptyText){this.setValue(this.el.dom.value)}}this.originalValue=this.getValue()},isDirty:function(){if(this.disabled||!this.rendered){return false}return String(this.getValue())!==String(this.originalValue)},setReadOnly:function(a){if(this.rendered){this.el.dom.readOnly=a}this.readOnly=a},afterRender:function(){Ext.form.Field.superclass.afterRender.call(this);this.initEvents();this.initValue()},fireKey:function(a){if(a.isSpecialKey()){this.fireEvent("specialkey",this,a)}},reset:function(){this.setValue(this.originalValue);this.clearInvalid()},initEvents:function(){this.mon(this.el,Ext.EventManager.getKeyEvent(),this.fireKey,this);this.mon(this.el,"focus",this.onFocus,this);this.mon(this.el,"blur",this.onBlur,this,this.inEditor?{buffer:10}:null)},preFocus:Ext.emptyFn,onFocus:function(){this.preFocus();if(this.focusClass){this.el.addClass(this.focusClass)}if(!this.hasFocus){this.hasFocus=true;this.startValue=this.getValue();this.fireEvent("focus",this)}},beforeBlur:Ext.emptyFn,onBlur:function(){this.beforeBlur();if(this.focusClass){this.el.removeClass(this.focusClass)}this.hasFocus=false;if(this.validationEvent!==false&&(this.validateOnBlur||this.validationEvent=="blur")){this.validate()}var a=this.getValue();if(String(a)!==String(this.startValue)){this.fireEvent("change",this,a,this.startValue)}this.fireEvent("blur",this);this.postBlur()},postBlur:Ext.emptyFn,isValid:function(a){if(this.disabled){return true}var c=this.preventMark;this.preventMark=a===true;var b=this.validateValue(this.processValue(this.getRawValue()),a);this.preventMark=c;return b},validate:function(){if(this.disabled||this.validateValue(this.processValue(this.getRawValue()))){this.clearInvalid();return true}return false},processValue:function(a){return a},validateValue:function(b){var a=this.getErrors(b)[0];if(a==undefined){return true}else{this.markInvalid(a);return false}},getErrors:function(){return[]},getActiveError:function(){return this.activeError||""},markInvalid:function(c){if(this.rendered&&!this.preventMark){c=c||this.invalidText;var a=this.getMessageHandler();if(a){a.mark(this,c)}else{if(this.msgTarget){this.el.addClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML=c;b.style.display=this.msgDisplay}}}}this.setActiveError(c)},clearInvalid:function(){if(this.rendered&&!this.preventMark){this.el.removeClass(this.invalidClass);var a=this.getMessageHandler();if(a){a.clear(this)}else{if(this.msgTarget){this.el.removeClass(this.invalidClass);var b=Ext.getDom(this.msgTarget);if(b){b.innerHTML="";b.style.display="none"}}}}this.unsetActiveError()},setActiveError:function(b,a){this.activeError=b;if(a!==true){this.fireEvent("invalid",this,b)}},unsetActiveError:function(a){delete this.activeError;if(a!==true){this.fireEvent("valid",this)}},getMessageHandler:function(){return Ext.form.MessageTargets[this.msgTarget]},getErrorCt:function(){return this.el.findParent(".x-form-element",5,true)||this.el.findParent(".x-form-field-wrap",5,true)},alignErrorEl:function(){this.errorEl.setWidth(this.getErrorCt().getWidth(true)-20)},alignErrorIcon:function(){this.errorIcon.alignTo(this.el,"tl-tr",[2,0])},getRawValue:function(){var a=this.rendered?this.el.getValue():Ext.value(this.value,"");if(a===this.emptyText){a=""}return a},getValue:function(){if(!this.rendered){return this.value}var a=this.el.getValue();if(a===this.emptyText||a===undefined){a=""}return a},setRawValue:function(a){return this.rendered?(this.el.dom.value=(Ext.isEmpty(a)?"":a)):""},setValue:function(a){this.value=a;if(this.rendered){this.el.dom.value=(Ext.isEmpty(a)?"":a);this.validate()}return this},append:function(a){this.setValue([this.getValue(),a].join(""))}});Ext.form.MessageTargets={qtip:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.qtip=b;a.el.dom.qclass="x-form-invalid-tip";if(Ext.QuickTips){Ext.QuickTips.enable()}},clear:function(a){a.el.removeClass(a.invalidClass);a.el.dom.qtip=""}},title:{mark:function(a,b){a.el.addClass(a.invalidClass);a.el.dom.title=b},clear:function(a){a.el.dom.title=""}},under:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorEl){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorEl=a.createChild({cls:"x-form-invalid-msg"});b.on("resize",b.alignErrorEl,b);b.on("destroy",function(){Ext.destroy(this.errorEl)},b)}b.alignErrorEl();b.errorEl.update(c);Ext.form.Field.msgFx[b.msgFx].show(b.errorEl,b)},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorEl){Ext.form.Field.msgFx[a.msgFx].hide(a.errorEl,a)}else{a.el.dom.title=""}}},side:{mark:function(b,c){b.el.addClass(b.invalidClass);if(!b.errorIcon){var a=b.getErrorCt();if(!a){b.el.dom.title=c;return}b.errorIcon=a.createChild({cls:"x-form-invalid-icon"});if(b.ownerCt){b.ownerCt.on("afterlayout",b.alignErrorIcon,b);b.ownerCt.on("expand",b.alignErrorIcon,b)}b.on("resize",b.alignErrorIcon,b);b.on("destroy",function(){Ext.destroy(this.errorIcon)},b)}b.alignErrorIcon();b.errorIcon.dom.qtip=c;b.errorIcon.dom.qclass="x-form-invalid-tip";b.errorIcon.show()},clear:function(a){a.el.removeClass(a.invalidClass);if(a.errorIcon){a.errorIcon.dom.qtip="";a.errorIcon.hide()}else{a.el.dom.title=""}}}};Ext.form.Field.msgFx={normal:{show:function(a,b){a.setDisplayed("block")},hide:function(a,b){a.setDisplayed(false).update("")}},slide:{show:function(a,b){a.slideIn("t",{stopFx:true})},hide:function(a,b){a.slideOut("t",{stopFx:true,useDisplay:true})}},slideRight:{show:function(a,b){a.fixDisplay();a.alignTo(b.el,"tl-tr");a.slideIn("l",{stopFx:true})},hide:function(a,b){a.slideOut("l",{stopFx:true,useDisplay:true})}}};Ext.reg("field",Ext.form.Field);Ext.form.TextField=Ext.extend(Ext.form.Field,{grow:false,growMin:30,growMax:800,vtype:null,maskRe:null,disableKeyFilter:false,allowBlank:true,minLength:0,maxLength:Number.MAX_VALUE,minLengthText:"The minimum length for this field is {0}",maxLengthText:"The maximum length for this field is {0}",selectOnFocus:false,blankText:"This field is required",validator:null,regex:null,regexText:"",emptyText:null,emptyClass:"x-form-empty-field",initComponent:function(){Ext.form.TextField.superclass.initComponent.call(this);this.addEvents("autosize","keydown","keyup","keypress")},initEvents:function(){Ext.form.TextField.superclass.initEvents.call(this);if(this.validationEvent=="keyup"){this.validationTask=new Ext.util.DelayedTask(this.validate,this);this.mon(this.el,"keyup",this.filterValidation,this)}else{if(this.validationEvent!==false&&this.validationEvent!="blur"){this.mon(this.el,this.validationEvent,this.validate,this,{buffer:this.validationDelay})}}if(this.selectOnFocus||this.emptyText){this.mon(this.el,"mousedown",this.onMouseDown,this);if(this.emptyText){this.applyEmptyText()}}if(this.maskRe||(this.vtype&&this.disableKeyFilter!==true&&(this.maskRe=Ext.form.VTypes[this.vtype+"Mask"]))){this.mon(this.el,"keypress",this.filterKeys,this)}if(this.grow){this.mon(this.el,"keyup",this.onKeyUpBuffered,this,{buffer:50});this.mon(this.el,"click",this.autoSize,this)}if(this.enableKeyEvents){this.mon(this.el,{scope:this,keyup:this.onKeyUp,keydown:this.onKeyDown,keypress:this.onKeyPress})}},onMouseDown:function(a){if(!this.hasFocus){this.mon(this.el,"mouseup",Ext.emptyFn,this,{single:true,preventDefault:true})}},processValue:function(a){if(this.stripCharsRe){var b=a.replace(this.stripCharsRe,"");if(b!==a){this.setRawValue(b);return b}}return a},filterValidation:function(a){if(!a.isNavKeyPress()){this.validationTask.delay(this.validationDelay)}},onDisable:function(){Ext.form.TextField.superclass.onDisable.call(this);if(Ext.isIE){this.el.dom.unselectable="on"}},onEnable:function(){Ext.form.TextField.superclass.onEnable.call(this);if(Ext.isIE){this.el.dom.unselectable=""}},onKeyUpBuffered:function(a){if(this.doAutoSize(a)){this.autoSize()}},doAutoSize:function(a){return !a.isNavKeyPress()},onKeyUp:function(a){this.fireEvent("keyup",this,a)},onKeyDown:function(a){this.fireEvent("keydown",this,a)},onKeyPress:function(a){this.fireEvent("keypress",this,a)},reset:function(){Ext.form.TextField.superclass.reset.call(this);this.applyEmptyText()},applyEmptyText:function(){if(this.rendered&&this.emptyText&&this.getRawValue().length<1&&!this.hasFocus){this.setRawValue(this.emptyText);this.el.addClass(this.emptyClass)}},preFocus:function(){var a=this.el,b;if(this.emptyText){if(a.dom.value==this.emptyText){this.setRawValue("");b=true}a.removeClass(this.emptyClass)}if(this.selectOnFocus||b){a.dom.select()}},postBlur:function(){this.applyEmptyText()},filterKeys:function(b){if(b.ctrlKey){return}var a=b.getKey();if(Ext.isGecko&&(b.isNavKeyPress()||a==b.BACKSPACE||(a==b.DELETE&&b.button==-1))){return}var c=String.fromCharCode(b.getCharCode());if(!Ext.isGecko&&b.isSpecialKey()&&!c){return}if(!this.maskRe.test(c)){b.stopEvent()}},setValue:function(a){if(this.emptyText&&this.el&&!Ext.isEmpty(a)){this.el.removeClass(this.emptyClass)}Ext.form.TextField.superclass.setValue.apply(this,arguments);this.applyEmptyText();this.autoSize();return this},getErrors:function(a){var d=Ext.form.TextField.superclass.getErrors.apply(this,arguments);a=Ext.isDefined(a)?a:this.processValue(this.getRawValue());if(Ext.isFunction(this.validator)){var c=this.validator(a);if(c!==true){d.push(c)}}if(a.length<1||a===this.emptyText){if(this.allowBlank){return d}else{d.push(this.blankText)}}if(!this.allowBlank&&(a.length<1||a===this.emptyText)){d.push(this.blankText)}if(a.lengththis.maxLength){d.push(String.format(this.maxLengthText,this.maxLength))}if(this.vtype){var b=Ext.form.VTypes;if(!b[this.vtype](a,this)){d.push(this.vtypeText||b[this.vtype+"Text"])}}if(this.regex&&!this.regex.test(a)){d.push(this.regexText)}return d},selectText:function(h,a){var c=this.getRawValue();var e=false;if(c.length>0){h=h===undefined?0:h;a=a===undefined?c.length:a;var g=this.el.dom;if(g.setSelectionRange){g.setSelectionRange(h,a)}else{if(g.createTextRange){var b=g.createTextRange();b.moveStart("character",h);b.moveEnd("character",a-c.length);b.select()}}e=Ext.isGecko||Ext.isOpera}else{e=true}if(e){this.focus()}},autoSize:function(){if(!this.grow||!this.rendered){return}if(!this.metrics){this.metrics=Ext.util.TextMetrics.createInstance(this.el)}var c=this.el;var b=c.dom.value;var e=document.createElement("div");e.appendChild(document.createTextNode(b));b=e.innerHTML;Ext.removeNode(e);e=null;b+=" ";var a=Math.min(this.growMax,Math.max(this.metrics.getWidth(b)+10,this.growMin));this.el.setWidth(a);this.fireEvent("autosize",this,a)},onDestroy:function(){if(this.validationTask){this.validationTask.cancel();this.validationTask=null}Ext.form.TextField.superclass.onDestroy.call(this)}});Ext.reg("textfield",Ext.form.TextField);Ext.form.TriggerField=Ext.extend(Ext.form.TextField,{defaultAutoCreate:{tag:"input",type:"text",size:"16",autocomplete:"off"},hideTrigger:false,editable:true,readOnly:false,wrapFocusClass:"x-trigger-wrap-focus",autoSize:Ext.emptyFn,monitorTab:true,deferHeight:true,mimicing:false,actionMode:"wrap",defaultTriggerWidth:17,onResize:function(a,c){Ext.form.TriggerField.superclass.onResize.call(this,a,c);var b=this.getTriggerWidth();if(Ext.isNumber(a)){this.el.setWidth(a-b)}this.wrap.setWidth(this.el.getWidth()+b)},getTriggerWidth:function(){var a=this.trigger.getWidth();if(!this.hideTrigger&&!this.readOnly&&a===0){a=this.defaultTriggerWidth}return a},alignErrorIcon:function(){if(this.wrap){this.errorIcon.alignTo(this.wrap,"tl-tr",[2,0])}},onRender:function(b,a){this.doc=Ext.isIE?Ext.getBody():Ext.getDoc();Ext.form.TriggerField.superclass.onRender.call(this,b,a);this.wrap=this.el.wrap({cls:"x-form-field-wrap x-form-field-trigger-wrap"});this.trigger=this.wrap.createChild(this.triggerConfig||{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.triggerClass});this.initTrigger();if(!this.width){this.wrap.setWidth(this.el.getWidth()+this.trigger.getWidth())}this.resizeEl=this.positionEl=this.wrap},getWidth:function(){return(this.el.getWidth()+this.trigger.getWidth())},updateEditState:function(){if(this.rendered){if(this.readOnly){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this);this.trigger.setDisplayed(false)}else{if(!this.editable){this.el.dom.readOnly=true;this.el.addClass("x-trigger-noedit");this.mon(this.el,"click",this.onTriggerClick,this)}else{this.el.dom.readOnly=false;this.el.removeClass("x-trigger-noedit");this.mun(this.el,"click",this.onTriggerClick,this)}this.trigger.setDisplayed(!this.hideTrigger)}this.onResize(this.width||this.wrap.getWidth())}},setHideTrigger:function(a){if(a!=this.hideTrigger){this.hideTrigger=a;this.updateEditState()}},setEditable:function(a){if(a!=this.editable){this.editable=a;this.updateEditState()}},setReadOnly:function(a){if(a!=this.readOnly){this.readOnly=a;this.updateEditState()}},afterRender:function(){Ext.form.TriggerField.superclass.afterRender.call(this);this.updateEditState()},initTrigger:function(){this.mon(this.trigger,"click",this.onTriggerClick,this,{preventDefault:true});this.trigger.addClassOnOver("x-form-trigger-over");this.trigger.addClassOnClick("x-form-trigger-click")},onDestroy:function(){Ext.destroy(this.trigger,this.wrap);if(this.mimicing){this.doc.un("mousedown",this.mimicBlur,this)}delete this.doc;Ext.form.TriggerField.superclass.onDestroy.call(this)},onFocus:function(){Ext.form.TriggerField.superclass.onFocus.call(this);if(!this.mimicing){this.wrap.addClass(this.wrapFocusClass);this.mimicing=true;this.doc.on("mousedown",this.mimicBlur,this,{delay:10});if(this.monitorTab){this.on("specialkey",this.checkTab,this)}}},checkTab:function(a,b){if(b.getKey()==b.TAB){this.triggerBlur()}},onBlur:Ext.emptyFn,mimicBlur:function(a){if(!this.isDestroyed&&!this.wrap.contains(a.target)&&this.validateBlur(a)){this.triggerBlur()}},triggerBlur:function(){this.mimicing=false;this.doc.un("mousedown",this.mimicBlur,this);if(this.monitorTab&&this.el){this.un("specialkey",this.checkTab,this)}Ext.form.TriggerField.superclass.onBlur.call(this);if(this.wrap){this.wrap.removeClass(this.wrapFocusClass)}},beforeBlur:Ext.emptyFn,validateBlur:function(a){return true},onTriggerClick:Ext.emptyFn});Ext.form.TwinTriggerField=Ext.extend(Ext.form.TriggerField,{initComponent:function(){Ext.form.TwinTriggerField.superclass.initComponent.call(this);this.triggerConfig={tag:"span",cls:"x-form-twin-triggers",cn:[{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger1Class},{tag:"img",src:Ext.BLANK_IMAGE_URL,alt:"",cls:"x-form-trigger "+this.trigger2Class}]}},getTrigger:function(a){return this.triggers[a]},afterRender:function(){Ext.form.TwinTriggerField.superclass.afterRender.call(this);var c=this.triggers,b=0,a=c.length;for(;b")}}d.innerHTML=a;b=Math.min(this.growMax,Math.max(d.offsetHeight,this.growMin));if(b!=this.lastHeight){this.lastHeight=b;this.el.setHeight(b);this.fireEvent("autosize",this,b)}}});Ext.reg("textarea",Ext.form.TextArea);Ext.form.NumberField=Ext.extend(Ext.form.TextField,{fieldClass:"x-form-field x-form-num-field",allowDecimals:true,decimalSeparator:".",decimalPrecision:2,allowNegative:true,minValue:Number.NEGATIVE_INFINITY,maxValue:Number.MAX_VALUE,minText:"The minimum value for this field is {0}",maxText:"The maximum value for this field is {0}",nanText:"{0} is not a valid number",baseChars:"0123456789",autoStripChars:false,initEvents:function(){var a=this.baseChars+"";if(this.allowDecimals){a+=this.decimalSeparator}if(this.allowNegative){a+="-"}a=Ext.escapeRe(a);this.maskRe=new RegExp("["+a+"]");if(this.autoStripChars){this.stripCharsRe=new RegExp("[^"+a+"]","gi")}Ext.form.NumberField.superclass.initEvents.call(this)},getErrors:function(b){var c=Ext.form.NumberField.superclass.getErrors.apply(this,arguments);b=Ext.isDefined(b)?b:this.processValue(this.getRawValue());if(b.length<1){return c}b=String(b).replace(this.decimalSeparator,".");if(isNaN(b)){c.push(String.format(this.nanText,b))}var a=this.parseValue(b);if(athis.maxValue){c.push(String.format(this.maxText,this.maxValue))}return c},getValue:function(){return this.fixPrecision(this.parseValue(Ext.form.NumberField.superclass.getValue.call(this)))},setValue:function(a){a=Ext.isNumber(a)?a:parseFloat(String(a).replace(this.decimalSeparator,"."));a=this.fixPrecision(a);a=isNaN(a)?"":String(a).replace(".",this.decimalSeparator);return Ext.form.NumberField.superclass.setValue.call(this,a)},setMinValue:function(a){this.minValue=Ext.num(a,Number.NEGATIVE_INFINITY)},setMaxValue:function(a){this.maxValue=Ext.num(a,Number.MAX_VALUE)},parseValue:function(a){a=parseFloat(String(a).replace(this.decimalSeparator,"."));return isNaN(a)?"":a},fixPrecision:function(b){var a=isNaN(b);if(!this.allowDecimals||this.decimalPrecision==-1||a||!b){return a?"":b}return parseFloat(parseFloat(b).toFixed(this.decimalPrecision))},beforeBlur:function(){var a=this.parseValue(this.getRawValue());if(!Ext.isEmpty(a)){this.setValue(a)}}});Ext.reg("numberfield",Ext.form.NumberField);Ext.form.DateField=Ext.extend(Ext.form.TriggerField,{format:"m/d/Y",altFormats:"m/d/Y|n/j/Y|n/j/y|m/j/y|n/d/y|m/j/Y|n/d/Y|m-d-y|m-d-Y|m/d|m-d|md|mdy|mdY|d|Y-m-d|n-j|n/j",disabledDaysText:"Disabled",disabledDatesText:"Disabled",minText:"The date in this field must be equal to or after {0}",maxText:"The date in this field must be equal to or before {0}",invalidText:"{0} is not a valid date - it must be in the format {1}",triggerClass:"x-form-date-trigger",showToday:true,startDay:0,defaultAutoCreate:{tag:"input",type:"text",size:"10",autocomplete:"off"},initTime:"12",initTimeFormat:"H",safeParse:function(b,c){if(Date.formatContainsHourInfo(c)){return Date.parseDate(b,c)}else{var a=Date.parseDate(b+" "+this.initTime,c+" "+this.initTimeFormat);if(a){return a.clearTime()}}},initComponent:function(){Ext.form.DateField.superclass.initComponent.call(this);this.addEvents("select");if(Ext.isString(this.minValue)){this.minValue=this.parseDate(this.minValue)}if(Ext.isString(this.maxValue)){this.maxValue=this.parseDate(this.maxValue)}this.disabledDatesRE=null;this.initDisabledDays()},initEvents:function(){Ext.form.DateField.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{down:function(a){this.onTriggerClick()},scope:this,forceKeyDown:true})},initDisabledDays:function(){if(this.disabledDates){var b=this.disabledDates,a=b.length-1,c="(?:";Ext.each(b,function(g,e){c+=Ext.isDate(g)?"^"+Ext.escapeRe(g.dateFormat(this.format))+"$":b[e];if(e!=a){c+="|"}},this);this.disabledDatesRE=new RegExp(c+")")}},setDisabledDates:function(a){this.disabledDates=a;this.initDisabledDays();if(this.menu){this.menu.picker.setDisabledDates(this.disabledDatesRE)}},setDisabledDays:function(a){this.disabledDays=a;if(this.menu){this.menu.picker.setDisabledDays(a)}},setMinValue:function(a){this.minValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMinDate(this.minValue)}},setMaxValue:function(a){this.maxValue=(Ext.isString(a)?this.parseDate(a):a);if(this.menu){this.menu.picker.setMaxDate(this.maxValue)}},getErrors:function(e){var h=Ext.form.DateField.superclass.getErrors.apply(this,arguments);e=this.formatDate(e||this.processValue(this.getRawValue()));if(e.length<1){return h}var c=e;e=this.parseDate(e);if(!e){h.push(String.format(this.invalidText,c,this.format));return h}var g=e.getTime();if(this.minValue&&gthis.maxValue.clearTime().getTime()){h.push(String.format(this.maxText,this.formatDate(this.maxValue)))}if(this.disabledDays){var a=e.getDay();for(var b=0;b
    {'+this.displayField+"}
    "}this.view=new Ext.DataView({applyTo:this.innerList,tpl:this.tpl,singleSelect:true,selectedClass:this.selectedClass,itemSelector:this.itemSelector||"."+a+"-item",emptyText:this.listEmptyText,deferEmptyText:false});this.mon(this.view,{containerclick:this.onViewClick,click:this.onViewClick,scope:this});this.bindStore(this.store,true);if(this.resizable){this.resizer=new Ext.Resizable(this.list,{pinned:true,handles:"se"});this.mon(this.resizer,"resize",function(g,d,e){this.maxHeight=e-this.handleHeight-this.list.getFrameWidth("tb")-this.assetHeight;this.listWidth=d;this.innerList.setWidth(d-this.list.getFrameWidth("lr"));this.restrictHeight()},this);this[this.pageSize?"footer":"innerList"].setStyle("margin-bottom",this.handleHeight+"px")}}},getListParent:function(){return document.body},getStore:function(){return this.store},bindStore:function(a,b){if(this.store&&!b){if(this.store!==a&&this.store.autoDestroy){this.store.destroy()}else{this.store.un("beforeload",this.onBeforeLoad,this);this.store.un("load",this.onLoad,this);this.store.un("exception",this.collapse,this)}if(!a){this.store=null;if(this.view){this.view.bindStore(null)}if(this.pageTb){this.pageTb.bindStore(null)}}}if(a){if(!b){this.lastQuery=null;if(this.pageTb){this.pageTb.bindStore(a)}}this.store=Ext.StoreMgr.lookup(a);this.store.on({scope:this,beforeload:this.onBeforeLoad,load:this.onLoad,exception:this.collapse});if(this.view){this.view.bindStore(a)}}},reset:function(){if(this.clearFilterOnReset&&this.mode=="local"){this.store.clearFilter()}Ext.form.ComboBox.superclass.reset.call(this)},initEvents:function(){Ext.form.ComboBox.superclass.initEvents.call(this);this.keyNav=new Ext.KeyNav(this.el,{up:function(a){this.inKeyMode=true;this.selectPrev()},down:function(a){if(!this.isExpanded()){this.onTriggerClick()}else{this.inKeyMode=true;this.selectNext()}},enter:function(a){this.onViewClick()},esc:function(a){this.collapse()},tab:function(a){if(this.forceSelection===true){this.collapse()}else{this.onViewClick(false)}return true},scope:this,doRelay:function(c,b,a){if(a=="down"||this.scope.isExpanded()){var d=Ext.KeyNav.prototype.doRelay.apply(this,arguments);if(!Ext.isIE&&Ext.EventManager.useKeydown){this.scope.fireKey(c)}return d}return true},forceKeyDown:true,defaultEventAction:"stopEvent"});this.queryDelay=Math.max(this.queryDelay||10,this.mode=="local"?10:250);this.dqTask=new Ext.util.DelayedTask(this.initQuery,this);if(this.typeAhead){this.taTask=new Ext.util.DelayedTask(this.onTypeAhead,this)}if(!this.enableKeyEvents){this.mon(this.el,"keyup",this.onKeyUp,this)}},onDestroy:function(){if(this.dqTask){this.dqTask.cancel();this.dqTask=null}this.bindStore(null);Ext.destroy(this.resizer,this.view,this.pageTb,this.list);Ext.destroyMembers(this,"hiddenField");Ext.form.ComboBox.superclass.onDestroy.call(this)},fireKey:function(a){if(!this.isExpanded()){Ext.form.ComboBox.superclass.fireKey.call(this,a)}},onResize:function(a,b){Ext.form.ComboBox.superclass.onResize.apply(this,arguments);if(!isNaN(a)&&this.isVisible()&&this.list){this.doResize(a)}else{this.bufferSize=a}},doResize:function(a){if(!Ext.isDefined(this.listWidth)){var b=Math.max(a,this.minListWidth);this.list.setWidth(b);this.innerList.setWidth(b-this.list.getFrameWidth("lr"))}},onEnable:function(){Ext.form.ComboBox.superclass.onEnable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=false}},onDisable:function(){Ext.form.ComboBox.superclass.onDisable.apply(this,arguments);if(this.hiddenField){this.hiddenField.disabled=true}},onBeforeLoad:function(){if(!this.hasFocus){return}this.innerList.update(this.loadingText?'
    '+this.loadingText+"
    ":"");this.restrictHeight();this.selectedIndex=-1},onLoad:function(){if(!this.hasFocus){return}if(this.store.getCount()>0||this.listEmptyText){this.expand();this.restrictHeight();if(this.lastQuery==this.allQuery){if(this.editable){this.el.dom.select()}if(this.autoSelect!==false&&!this.selectByValue(this.value,true)){this.select(0,true)}}else{if(this.autoSelect!==false){this.selectNext()}if(this.typeAhead&&this.lastKey!=Ext.EventObject.BACKSPACE&&this.lastKey!=Ext.EventObject.DELETE){this.taTask.delay(this.typeAheadDelay)}}}else{this.collapse()}},onTypeAhead:function(){if(this.store.getCount()>0){var b=this.store.getAt(0);var c=b.data[this.displayField];var a=c.length;var d=this.getRawValue().length;if(d!=a){this.setRawValue(c);this.selectText(d,c.length)}}},assertValue:function(){var b=this.getRawValue(),a;if(this.valueField&&Ext.isDefined(this.value)){a=this.findRecord(this.valueField,this.value)}if(!a||a.get(this.displayField)!=b){a=this.findRecord(this.displayField,b)}if(!a&&this.forceSelection){if(b.length>0&&b!=this.emptyText){this.el.dom.value=Ext.value(this.lastSelectionText,"");this.applyEmptyText()}else{this.clearValue()}}else{if(a&&this.valueField){if(this.value==b){return}b=a.get(this.valueField||this.displayField)}this.setValue(b)}},onSelect:function(a,b){if(this.fireEvent("beforeselect",this,a,b)!==false){this.setValue(a.data[this.valueField||this.displayField]);this.collapse();this.fireEvent("select",this,a,b)}},getName:function(){var a=this.hiddenField;return a&&a.name?a.name:this.hiddenName||Ext.form.ComboBox.superclass.getName.call(this)},getValue:function(){if(this.valueField){return Ext.isDefined(this.value)?this.value:""}else{return Ext.form.ComboBox.superclass.getValue.call(this)}},clearValue:function(){if(this.hiddenField){this.hiddenField.value=""}this.setRawValue("");this.lastSelectionText="";this.applyEmptyText();this.value=""},setValue:function(a){var c=a;if(this.valueField){var b=this.findRecord(this.valueField,a);if(b){c=b.data[this.displayField]}else{if(Ext.isDefined(this.valueNotFoundText)){c=this.valueNotFoundText}}}this.lastSelectionText=c;if(this.hiddenField){this.hiddenField.value=Ext.value(a,"")}Ext.form.ComboBox.superclass.setValue.call(this,c);this.value=a;return this},findRecord:function(c,b){var a;if(this.store.getCount()>0){this.store.each(function(d){if(d.data[c]==b){a=d;return false}})}return a},onViewMove:function(b,a){this.inKeyMode=false},onViewOver:function(d,b){if(this.inKeyMode){return}var c=this.view.findItemFromChild(b);if(c){var a=this.view.indexOf(c);this.select(a,false)}},onViewClick:function(b){var a=this.view.getSelectedIndexes()[0],c=this.store,d=c.getAt(a);if(d){this.onSelect(d,a)}else{this.collapse()}if(b!==false){this.el.focus()}},restrictHeight:function(){this.innerList.dom.style.height="";var b=this.innerList.dom,e=this.list.getFrameWidth("tb")+(this.resizable?this.handleHeight:0)+this.assetHeight,c=Math.max(b.clientHeight,b.offsetHeight,b.scrollHeight),a=this.getPosition()[1]-Ext.getBody().getScroll().top,g=Ext.lib.Dom.getViewHeight()-a-this.getSize().height,d=Math.max(a,g,this.minHeight||0)-this.list.shadowOffset-e-5;c=Math.min(c,d,this.maxHeight);this.innerList.setHeight(c);this.list.beginUpdate();this.list.setHeight(c+e);this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.endUpdate()},isExpanded:function(){return this.list&&this.list.isVisible()},selectByValue:function(a,c){if(!Ext.isEmpty(a,true)){var b=this.findRecord(this.valueField||this.displayField,a);if(b){this.select(this.store.indexOf(b),c);return true}}return false},select:function(a,c){this.selectedIndex=a;this.view.select(a);if(c!==false){var b=this.view.getNode(a);if(b){this.innerList.scrollChildIntoView(b,false)}}},selectNext:function(){var a=this.store.getCount();if(a>0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex0){if(this.selectedIndex==-1){this.select(0)}else{if(this.selectedIndex!==0){this.select(this.selectedIndex-1)}}}},onKeyUp:function(b){var a=b.getKey();if(this.editable!==false&&this.readOnly!==true&&(a==b.BACKSPACE||!b.isSpecialKey())){this.lastKey=a;this.dqTask.delay(this.queryDelay)}Ext.form.ComboBox.superclass.onKeyUp.call(this,b)},validateBlur:function(){return !this.list||!this.list.isVisible()},initQuery:function(){this.doQuery(this.getRawValue())},beforeBlur:function(){this.assertValue()},postBlur:function(){Ext.form.ComboBox.superclass.postBlur.call(this);this.collapse();this.inKeyMode=false},doQuery:function(c,b){c=Ext.isEmpty(c)?"":c;var a={query:c,forceAll:b,combo:this,cancel:false};if(this.fireEvent("beforequery",a)===false||a.cancel){return false}c=a.query;b=a.forceAll;if(b===true||(c.length>=this.minChars)){if(this.lastQuery!==c){this.lastQuery=c;if(this.mode=="local"){this.selectedIndex=-1;if(b){this.store.clearFilter()}else{this.store.filter(this.displayField,c)}this.onLoad()}else{this.store.baseParams[this.queryParam]=c;this.store.load({params:this.getParams(c)});this.expand()}}else{this.selectedIndex=-1;this.onLoad()}}},getParams:function(a){var b={},c=this.store.paramNames;if(this.pageSize){b[c.start]=0;b[c.limit]=this.pageSize}return b},collapse:function(){if(!this.isExpanded()){return}this.list.hide();Ext.getDoc().un("mousewheel",this.collapseIf,this);Ext.getDoc().un("mousedown",this.collapseIf,this);this.fireEvent("collapse",this)},collapseIf:function(a){if(!this.isDestroyed&&!a.within(this.wrap)&&!a.within(this.list)){this.collapse()}},expand:function(){if(this.isExpanded()||!this.hasFocus){return}if(this.title||this.pageSize){this.assetHeight=0;if(this.title){this.assetHeight+=this.header.getHeight()}if(this.pageSize){this.assetHeight+=this.footer.getHeight()}}if(this.bufferSize){this.doResize(this.bufferSize);delete this.bufferSize}this.list.alignTo.apply(this.list,[this.el].concat(this.listAlign));this.list.setZIndex(this.getZIndex());this.list.show();if(Ext.isGecko2){this.innerList.setOverflow("auto")}this.mon(Ext.getDoc(),{scope:this,mousewheel:this.collapseIf,mousedown:this.collapseIf});this.fireEvent("expand",this)},onTriggerClick:function(){if(this.readOnly||this.disabled){return}if(this.isExpanded()){this.collapse();this.el.focus()}else{this.onFocus({});if(this.triggerAction=="all"){this.doQuery(this.allQuery,true)}else{this.doQuery(this.getRawValue())}this.el.focus()}}});Ext.reg("combo",Ext.form.ComboBox);Ext.form.Checkbox=Ext.extend(Ext.form.Field,{focusClass:undefined,fieldClass:"x-form-field",checked:false,boxLabel:" ",defaultAutoCreate:{tag:"input",type:"checkbox",autocomplete:"off"},actionMode:"wrap",initComponent:function(){Ext.form.Checkbox.superclass.initComponent.call(this);this.addEvents("check")},onResize:function(){Ext.form.Checkbox.superclass.onResize.apply(this,arguments);if(!this.boxLabel&&!this.fieldLabel){this.el.alignTo(this.wrap,"c-c")}},initEvents:function(){Ext.form.Checkbox.superclass.initEvents.call(this);this.mon(this.el,{scope:this,click:this.onClick,change:this.onClick})},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,onRender:function(b,a){Ext.form.Checkbox.superclass.onRender.call(this,b,a);if(this.inputValue!==undefined){this.el.dom.value=this.inputValue}this.wrap=this.el.wrap({cls:"x-form-check-wrap"});if(this.boxLabel){this.wrap.createChild({tag:"label",htmlFor:this.el.id,cls:"x-form-cb-label",html:this.boxLabel})}if(this.checked){this.setValue(true)}else{this.checked=this.el.dom.checked}if(Ext.isIE&&!Ext.isStrict){this.wrap.repaint()}this.resizeEl=this.positionEl=this.wrap},onDestroy:function(){Ext.destroy(this.wrap);Ext.form.Checkbox.superclass.onDestroy.call(this)},initValue:function(){this.originalValue=this.getValue()},getValue:function(){if(this.rendered){return this.el.dom.checked}return this.checked},onClick:function(){if(this.el.dom.checked!=this.checked){this.setValue(this.el.dom.checked)}},setValue:function(a){var c=this.checked,b=this.inputValue;if(a===false){this.checked=false}else{this.checked=(a===true||a==="true"||a=="1"||(b?a==b:String(a).toLowerCase()=="on"))}if(this.rendered){this.el.dom.checked=this.checked;this.el.dom.defaultChecked=this.checked}if(c!=this.checked){this.fireEvent("check",this,this.checked);if(this.handler){this.handler.call(this.scope||this,this,this.checked)}}return this}});Ext.reg("checkbox",Ext.form.Checkbox);Ext.form.CheckboxGroup=Ext.extend(Ext.form.Field,{columns:"auto",vertical:false,allowBlank:true,blankText:"You must select at least one item in this group",defaultType:"checkbox",groupCls:"x-form-check-group",initComponent:function(){this.addEvents("change");this.on("change",this.validate,this);Ext.form.CheckboxGroup.superclass.initComponent.call(this)},onRender:function(j,g){if(!this.el){var p={autoEl:{id:this.id},cls:this.groupCls,layout:"column",renderTo:j,bufferResize:false};var a={xtype:"container",defaultType:this.defaultType,layout:"form",defaults:{hideLabel:true,anchor:"100%"}};if(this.items[0].items){Ext.apply(p,{layoutConfig:{columns:this.items.length},defaults:this.defaults,items:this.items});for(var e=0,m=this.items.length;e0&&e%r==0){o++}if(this.items[e].fieldLabel){this.items[e].hideLabel=false}n[o].items.push(this.items[e])}}else{for(var e=0,m=this.items.length;e-1){b.setValue(true)}})},getBox:function(b){var a=null;this.eachItem(function(c){if(b==c||c.dataIndex==b||c.id==b||c.getName()==b){a=c;return false}});return a},getValue:function(){var a=[];this.eachItem(function(b){if(b.checked){a.push(b)}});return a},eachItem:function(b,a){if(this.items&&this.items.each){this.items.each(b,a||this)}},getRawValue:Ext.emptyFn,setRawValue:Ext.emptyFn});Ext.reg("checkboxgroup",Ext.form.CheckboxGroup);Ext.form.CompositeField=Ext.extend(Ext.form.Field,{defaultMargins:"0 5 0 0",skipLastItemMargin:true,isComposite:true,combineErrors:true,labelConnector:", ",initComponent:function(){var g=[],b=this.items,e;for(var d=0,c=b.length;d")},sortErrors:function(){var a=this.items;this.fieldErrors.sort("ASC",function(g,d){var c=function(b){return function(i){return i.getName()==b}};var h=a.findIndexBy(c(g.field)),e=a.findIndexBy(c(d.field));return h1){var a=this.getBox(c);if(a){a.setValue(b);if(a.checked){this.eachItem(function(d){if(d!==a){d.setValue(false)}})}}}else{this.setValueForItem(c)}},setValueForItem:function(a){a=String(a).split(",")[0];this.eachItem(function(b){b.setValue(a==b.inputValue)})},fireChecked:function(){if(!this.checkTask){this.checkTask=new Ext.util.DelayedTask(this.bufferChecked,this)}this.checkTask.delay(10)},bufferChecked:function(){var a=null;this.eachItem(function(b){if(b.checked){a=b;return false}});this.fireEvent("change",this,a)},onDestroy:function(){if(this.checkTask){this.checkTask.cancel();this.checkTask=null}Ext.form.RadioGroup.superclass.onDestroy.call(this)}});Ext.reg("radiogroup",Ext.form.RadioGroup);Ext.form.Hidden=Ext.extend(Ext.form.Field,{inputType:"hidden",shouldLayout:false,onRender:function(){Ext.form.Hidden.superclass.onRender.apply(this,arguments)},initEvents:function(){this.originalValue=this.getValue()},setSize:Ext.emptyFn,setWidth:Ext.emptyFn,setHeight:Ext.emptyFn,setPosition:Ext.emptyFn,setPagePosition:Ext.emptyFn,markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn});Ext.reg("hidden",Ext.form.Hidden);Ext.form.BasicForm=Ext.extend(Ext.util.Observable,{constructor:function(b,a){Ext.apply(this,a);if(Ext.isString(this.paramOrder)){this.paramOrder=this.paramOrder.split(/[\s,|]/)}this.items=new Ext.util.MixedCollection(false,function(c){return c.getItemId()});this.addEvents("beforeaction","actionfailed","actioncomplete");if(b){this.initEl(b)}Ext.form.BasicForm.superclass.constructor.call(this)},timeout:30,paramOrder:undefined,paramsAsHash:false,waitTitle:"Please Wait...",activeAction:null,trackResetOnLoad:false,initEl:function(a){this.el=Ext.get(a);this.id=this.el.id||Ext.id();if(!this.standardSubmit){this.el.on("submit",this.onSubmit,this)}this.el.addClass("x-form")},getEl:function(){return this.el},onSubmit:function(a){a.stopEvent()},destroy:function(a){if(a!==true){this.items.each(function(b){Ext.destroy(b)});Ext.destroy(this.el)}this.items.clear();this.purgeListeners()},isValid:function(){var a=true;this.items.each(function(b){if(!b.validate()){a=false}});return a},isDirty:function(){var a=false;this.items.each(function(b){if(b.isDirty()){a=true;return false}});return a},doAction:function(b,a){if(Ext.isString(b)){b=new Ext.form.Action.ACTION_TYPES[b](this,a)}if(this.fireEvent("beforeaction",this,b)!==false){this.beforeAction(b);b.run.defer(100,b)}return this},submit:function(b){b=b||{};if(this.standardSubmit){var a=b.clientValidation===false||this.isValid();if(a){var c=this.el.dom;if(this.url&&Ext.isEmpty(c.action)){c.action=this.url}c.submit()}return a}var d=String.format("{0}submit",this.api?"direct":"");this.doAction(d,b);return this},load:function(a){var b=String.format("{0}load",this.api?"direct":"");this.doAction(b,a);return this},updateRecord:function(b){b.beginEdit();var a=b.fields,d,c;a.each(function(e){d=this.findField(e.name);if(d){c=d.getValue();if(Ext.type(c)!==false&&c.getGroupValue){c=c.getGroupValue()}else{if(d.eachItem){c=[];d.eachItem(function(g){c.push(g.getValue())})}}b.set(e.name,c)}},this);b.endEdit();return this},loadRecord:function(a){this.setValues(a.data);return this},beforeAction:function(a){this.items.each(function(c){if(c.isFormField&&c.syncValue){c.syncValue()}});var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.mask(b.waitMsg,"x-mask-loading")}else{if(this.waitMsgTarget){this.waitMsgTarget=Ext.get(this.waitMsgTarget);this.waitMsgTarget.mask(b.waitMsg,"x-mask-loading")}else{Ext.MessageBox.wait(b.waitMsg,b.waitTitle||this.waitTitle)}}}},afterAction:function(a,c){this.activeAction=null;var b=a.options;if(b.waitMsg){if(this.waitMsgTarget===true){this.el.unmask()}else{if(this.waitMsgTarget){this.waitMsgTarget.unmask()}else{Ext.MessageBox.updateProgress(1);Ext.MessageBox.hide()}}}if(c){if(b.reset){this.reset()}Ext.callback(b.success,b.scope,[this,a]);this.fireEvent("actioncomplete",this,a)}else{Ext.callback(b.failure,b.scope,[this,a]);this.fireEvent("actionfailed",this,a)}},findField:function(c){var b=this.items.get(c);if(!Ext.isObject(b)){var a=function(d){if(d.isFormField){if(d.dataIndex==c||d.id==c||d.getName()==c){b=d;return false}else{if(d.isComposite){return d.items.each(a)}else{if(d instanceof Ext.form.CheckboxGroup&&d.rendered){return d.eachItem(a)}}}}};this.items.each(a)}return b||null},markInvalid:function(h){if(Ext.isArray(h)){for(var c=0,a=h.length;c':">"),c,"")}return d.join("")},createToolbar:function(e){var c=[];var a=Ext.QuickTips&&Ext.QuickTips.isEnabled();function d(j,h,i){return{itemId:j,cls:"x-btn-icon",iconCls:"x-edit-"+j,enableToggle:h!==false,scope:e,handler:i||e.relayBtnCmd,clickEvent:"mousedown",tooltip:a?e.buttonTips[j]||undefined:undefined,overflowText:e.buttonTips[j].title||undefined,tabIndex:-1}}if(this.enableFont&&!Ext.isSafari2){var g=new Ext.Toolbar.Item({autoEl:{tag:"select",cls:"x-font-select",html:this.createFontOptions()}});c.push(g,"-")}if(this.enableFormat){c.push(d("bold"),d("italic"),d("underline"))}if(this.enableFontSize){c.push("-",d("increasefontsize",false,this.adjustFont),d("decreasefontsize",false,this.adjustFont))}if(this.enableColors){c.push("-",{itemId:"forecolor",cls:"x-btn-icon",iconCls:"x-edit-forecolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.forecolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({allowReselect:true,focus:Ext.emptyFn,value:"000000",plain:true,listeners:{scope:this,select:function(i,h){this.execCmd("forecolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}},clickEvent:"mousedown"})},{itemId:"backcolor",cls:"x-btn-icon",iconCls:"x-edit-backcolor",clickEvent:"mousedown",tooltip:a?e.buttonTips.backcolor||undefined:undefined,tabIndex:-1,menu:new Ext.menu.ColorMenu({focus:Ext.emptyFn,value:"FFFFFF",plain:true,allowReselect:true,listeners:{scope:this,select:function(i,h){if(Ext.isGecko){this.execCmd("useCSS",false);this.execCmd("hilitecolor",h);this.execCmd("useCSS",true);this.deferFocus()}else{this.execCmd(Ext.isOpera?"hilitecolor":"backcolor",Ext.isWebKit||Ext.isIE?"#"+h:h);this.deferFocus()}}},clickEvent:"mousedown"})})}if(this.enableAlignments){c.push("-",d("justifyleft"),d("justifycenter"),d("justifyright"))}if(!Ext.isSafari2){if(this.enableLinks){c.push("-",d("createlink",false,this.createLink))}if(this.enableLists){c.push("-",d("insertorderedlist"),d("insertunorderedlist"))}if(this.enableSourceEdit){c.push("-",d("sourceedit",true,function(h){this.toggleSourceEdit(!this.sourceEditMode)}))}}var b=new Ext.Toolbar({renderTo:this.wrap.dom.firstChild,items:c});if(g){this.fontSelect=g.el;this.mon(this.fontSelect,"change",function(){var h=this.fontSelect.dom.value;this.relayCmd("fontname",h);this.deferFocus()},this)}this.mon(b.el,"click",function(h){h.preventDefault()});this.tb=b;this.tb.doLayout()},onDisable:function(){this.wrap.mask();Ext.form.HtmlEditor.superclass.onDisable.call(this)},onEnable:function(){this.wrap.unmask();Ext.form.HtmlEditor.superclass.onEnable.call(this)},setReadOnly:function(b){Ext.form.HtmlEditor.superclass.setReadOnly.call(this,b);if(this.initialized){if(Ext.isIE){this.getEditorBody().contentEditable=!b}else{this.setDesignMode(!b)}var a=this.getEditorBody();if(a){a.style.cursor=this.readOnly?"default":"text"}this.disableItems(b)}},getDocMarkup:function(){var a=Ext.fly(this.iframe).getHeight()-this.iframePad*2;return String.format('',this.iframePad,a)},getEditorBody:function(){var a=this.getDoc();return a.body||a.documentElement},getDoc:function(){return Ext.isIE?this.getWin().document:(this.iframe.contentDocument||this.getWin().document)},getWin:function(){return Ext.isIE?this.iframe.contentWindow:window.frames[this.iframe.name]},onRender:function(b,a){Ext.form.HtmlEditor.superclass.onRender.call(this,b,a);this.el.dom.style.border="0 none";this.el.dom.setAttribute("tabIndex",-1);this.el.addClass("x-hidden");if(Ext.isIE){this.el.applyStyles("margin-top:-1px;margin-bottom:-1px;")}this.wrap=this.el.wrap({cls:"x-html-editor-wrap",cn:{cls:"x-html-editor-tb"}});this.createToolbar(this);this.disableItems(true);this.tb.doLayout();this.createIFrame();if(!this.width){var c=this.el.getSize();this.setSize(c.width,this.height||c.height)}this.resizeEl=this.positionEl=this.wrap},createIFrame:function(){var a=document.createElement("iframe");a.name=Ext.id();a.frameBorder="0";a.style.overflow="auto";a.src=Ext.SSL_SECURE_URL;this.wrap.dom.appendChild(a);this.iframe=a;this.monitorTask=Ext.TaskMgr.start({run:this.checkDesignMode,scope:this,interval:100})},initFrame:function(){Ext.TaskMgr.stop(this.monitorTask);var b=this.getDoc();this.win=this.getWin();b.open();b.write(this.getDocMarkup());b.close();var a={run:function(){var c=this.getDoc();if(c.body||c.readyState=="complete"){Ext.TaskMgr.stop(a);this.setDesignMode(true);this.initEditor.defer(10,this)}},interval:10,duration:10000,scope:this};Ext.TaskMgr.start(a)},checkDesignMode:function(){if(this.wrap&&this.wrap.dom.offsetWidth){var a=this.getDoc();if(!a){return}if(!a.editorInitialized||this.getDesignMode()!="on"){this.initFrame()}}},setDesignMode:function(b){var a=this.getDoc();if(a){if(this.readOnly){b=false}a.designMode=(/on|true/i).test(String(b).toLowerCase())?"on":"off"}},getDesignMode:function(){var a=this.getDoc();if(!a){return""}return String(a.designMode).toLowerCase()},disableItems:function(a){if(this.fontSelect){this.fontSelect.dom.disabled=a}this.tb.items.each(function(b){if(b.getItemId()!="sourceedit"){b.setDisabled(a)}})},onResize:function(b,c){Ext.form.HtmlEditor.superclass.onResize.apply(this,arguments);if(this.el&&this.iframe){if(Ext.isNumber(b)){var e=b-this.wrap.getFrameWidth("lr");this.el.setWidth(e);this.tb.setWidth(e);this.iframe.style.width=Math.max(e,0)+"px"}if(Ext.isNumber(c)){var a=c-this.wrap.getFrameWidth("tb")-this.tb.el.getHeight();this.el.setHeight(a);this.iframe.style.height=Math.max(a,0)+"px";var d=this.getEditorBody();if(d){d.style.height=Math.max((a-(this.iframePad*2)),0)+"px"}}}},toggleSourceEdit:function(b){var d,a;if(b===undefined){b=!this.sourceEditMode}this.sourceEditMode=b===true;var c=this.tb.getComponent("sourceedit");if(c.pressed!==this.sourceEditMode){c.toggle(this.sourceEditMode);if(!c.xtbHidden){return}}if(this.sourceEditMode){this.previousSize=this.getSize();d=Ext.get(this.iframe).getHeight();this.disableItems(true);this.syncValue();this.iframe.className="x-hidden";this.el.removeClass("x-hidden");this.el.dom.removeAttribute("tabIndex");this.el.focus();this.el.dom.style.height=d+"px"}else{a=parseInt(this.el.dom.style.height,10);if(this.initialized){this.disableItems(this.readOnly)}this.pushValue();this.iframe.className="";this.el.addClass("x-hidden");this.el.dom.setAttribute("tabIndex",-1);this.deferFocus();this.setSize(this.previousSize);delete this.previousSize;this.iframe.style.height=a+"px"}this.fireEvent("editmodechange",this,this.sourceEditMode)},createLink:function(){var a=prompt(this.createLinkText,this.defaultLinkValue);if(a&&a!="http://"){this.relayCmd("createlink",a)}},initEvents:function(){this.originalValue=this.getValue()},markInvalid:Ext.emptyFn,clearInvalid:Ext.emptyFn,setValue:function(a){Ext.form.HtmlEditor.superclass.setValue.call(this,a);this.pushValue();return this},cleanHtml:function(a){a=String(a);if(Ext.isWebKit){a=a.replace(/\sclass="(?:Apple-style-span|khtml-block-placeholder)"/gi,"")}if(a.charCodeAt(0)==this.defaultValue.replace(/\D/g,"")){a=a.substring(1)}return a},syncValue:function(){if(this.initialized){var d=this.getEditorBody();var c=d.innerHTML;if(Ext.isWebKit){var b=d.getAttribute("style");var a=b.match(/text-align:(.*?);/i);if(a&&a[1]){c='
    '+c+"
    "}}c=this.cleanHtml(c);if(this.fireEvent("beforesync",this,c)!==false){this.el.dom.value=c;this.fireEvent("sync",this,c)}}},getValue:function(){this[this.sourceEditMode?"pushValue":"syncValue"]();return Ext.form.HtmlEditor.superclass.getValue.call(this)},pushValue:function(){if(this.initialized){var a=this.el.dom.value;if(!this.activated&&a.length<1){a=this.defaultValue}if(this.fireEvent("beforepush",this,a)!==false){this.getEditorBody().innerHTML=a;if(Ext.isGecko){this.setDesignMode(false);this.setDesignMode(true)}this.fireEvent("push",this,a)}}},deferFocus:function(){this.focus.defer(10,this)},focus:function(){if(this.win&&!this.sourceEditMode){this.win.focus()}else{this.el.focus()}},initEditor:function(){try{var c=this.getEditorBody(),a=this.el.getStyles("font-size","font-family","background-image","background-repeat","background-color","color"),g,b;a["background-attachment"]="fixed";c.bgProperties="fixed";Ext.DomHelper.applyStyles(c,a);g=this.getDoc();if(g){try{Ext.EventManager.removeAll(g)}catch(d){}}b=this.onEditorEvent.createDelegate(this);Ext.EventManager.on(g,{mousedown:b,dblclick:b,click:b,keyup:b,buffer:100});if(Ext.isGecko){Ext.EventManager.on(g,"keypress",this.applyCommand,this)}if(Ext.isIE||Ext.isWebKit||Ext.isOpera){Ext.EventManager.on(g,"keydown",this.fixKeys,this)}g.editorInitialized=true;this.initialized=true;this.pushValue();this.setReadOnly(this.readOnly);this.fireEvent("initialize",this)}catch(d){}},beforeDestroy:function(){if(this.monitorTask){Ext.TaskMgr.stop(this.monitorTask)}if(this.rendered){Ext.destroy(this.tb);var b=this.getDoc();if(b){try{Ext.EventManager.removeAll(b);for(var c in b){delete b[c]}}catch(a){}}if(this.wrap){this.wrap.dom.innerHTML="";this.wrap.remove()}}Ext.form.HtmlEditor.superclass.beforeDestroy.call(this)},onFirstFocus:function(){this.activated=true;this.disableItems(this.readOnly);if(Ext.isGecko){this.win.focus();var a=this.win.getSelection();if(!a.focusNode||a.focusNode.nodeType!=3){var b=a.getRangeAt(0);b.selectNodeContents(this.getEditorBody());b.collapse(true);this.deferFocus()}try{this.execCmd("useCSS",true);this.execCmd("styleWithCSS",false)}catch(c){}}this.fireEvent("activate",this)},adjustFont:function(b){var d=b.getItemId()=="increasefontsize"?1:-1,c=this.getDoc(),a=parseInt(c.queryCommandValue("FontSize")||2,10);if((Ext.isSafari&&!Ext.isSafari2)||Ext.isChrome||Ext.isAir){if(a<=10){a=1+d}else{if(a<=13){a=2+d}else{if(a<=16){a=3+d}else{if(a<=18){a=4+d}else{if(a<=24){a=5+d}else{a=6+d}}}}}a=a.constrain(1,6)}else{if(Ext.isSafari){d*=2}a=Math.max(1,a+d)+(Ext.isSafari?"px":0)}this.execCmd("FontSize",a)},onEditorEvent:function(a){this.updateToolbar()},updateToolbar:function(){if(this.readOnly){return}if(!this.activated){this.onFirstFocus();return}var b=this.tb.items.map,c=this.getDoc();if(this.enableFont&&!Ext.isSafari2){var a=(c.queryCommandValue("FontName")||this.defaultFont).toLowerCase();if(a!=this.fontSelect.dom.value){this.fontSelect.dom.value=a}}if(this.enableFormat){b.bold.toggle(c.queryCommandState("bold"));b.italic.toggle(c.queryCommandState("italic"));b.underline.toggle(c.queryCommandState("underline"))}if(this.enableAlignments){b.justifyleft.toggle(c.queryCommandState("justifyleft"));b.justifycenter.toggle(c.queryCommandState("justifycenter"));b.justifyright.toggle(c.queryCommandState("justifyright"))}if(!Ext.isSafari2&&this.enableLists){b.insertorderedlist.toggle(c.queryCommandState("insertorderedlist"));b.insertunorderedlist.toggle(c.queryCommandState("insertunorderedlist"))}Ext.menu.MenuMgr.hideAll();this.syncValue()},relayBtnCmd:function(a){this.relayCmd(a.getItemId())},relayCmd:function(b,a){(function(){this.focus();this.execCmd(b,a);this.updateToolbar()}).defer(10,this)},execCmd:function(b,a){var c=this.getDoc();c.execCommand(b,false,a===undefined?null:a);this.syncValue()},applyCommand:function(b){if(b.ctrlKey){var d=b.getCharCode(),a;if(d>0){d=String.fromCharCode(d);switch(d){case"b":a="bold";break;case"i":a="italic";break;case"u":a="underline";break}if(a){this.win.focus();this.execCmd(a);this.deferFocus();b.preventDefault()}}}},insertAtCursor:function(c){if(!this.activated){return}if(Ext.isIE){this.win.focus();var b=this.getDoc(),a=b.selection.createRange();if(a){a.pasteHTML(c);this.syncValue();this.deferFocus()}}else{this.win.focus();this.execCmd("InsertHTML",c);this.deferFocus()}},fixKeys:function(){if(Ext.isIE){return function(g){var a=g.getKey(),d=this.getDoc(),b;if(a==g.TAB){g.stopEvent();b=d.selection.createRange();if(b){b.collapse(true);b.pasteHTML("    ");this.deferFocus()}}else{if(a==g.ENTER){b=d.selection.createRange();if(b){var c=b.parentElement();if(!c||c.tagName.toLowerCase()!="li"){g.stopEvent();b.pasteHTML("
    ");b.collapse(false);b.select()}}}}}}else{if(Ext.isOpera){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.win.focus();this.execCmd("InsertHTML","    ");this.deferFocus()}}}else{if(Ext.isWebKit){return function(b){var a=b.getKey();if(a==b.TAB){b.stopEvent();this.execCmd("InsertText","\t");this.deferFocus()}else{if(a==b.ENTER){b.stopEvent();this.execCmd("InsertHtml","

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

    - *

    The value is deemed to be empty if it is

      - *
    • null
    • - *
    • undefined
    • - *
    • an empty array
    • - *
    • a zero length string (Unless the allowBlank parameter is true)
    • - *
    - * @param {Mixed} value The value to test - * @param {Mixed} defaultValue The value to return if the original value is empty - * @param {Boolean} allowBlank (optional) true to allow zero length strings to qualify as non-empty (defaults to false) - * @return {Mixed} value, if non-empty, else defaultValue - */ - value : function(v, defaultValue, allowBlank){ - return Ext.isEmpty(v, allowBlank) ? defaultValue : v; - }, - - /** - * Escapes the passed string for use in a regular expression - * @param {String} str - * @return {String} - */ - escapeRe : function(s) { - return s.replace(/([-.*+?^${}()|[\]\/\\])/g, "\\$1"); - }, - - sequence : function(o, name, fn, scope){ - o[name] = o[name].createSequence(fn, scope); - }, - - /** - * Applies event listeners to elements by selectors when the document is ready. - * The event name is specified with an @ suffix. - *
    
    -Ext.addBehaviors({
    -    // add a listener for click on all anchors in element with id foo
    -    '#foo a@click' : function(e, t){
    -        // do something
    -    },
    -    
    -    // add the same listener to multiple selectors (separated by comma BEFORE the @)
    -    '#foo a, #bar span.some-class@mouseover' : function(){
    -        // do something
    -    }
    -});
    -         * 
    - * @param {Object} obj The list of behaviors to apply - */ - addBehaviors : function(o){ - if(!Ext.isReady){ - Ext.onReady(function(){ - Ext.addBehaviors(o); - }); - } else { - var cache = {}, // simple cache for applying multiple behaviors to same selector does query multiple times - parts, - b, - s; - for (b in o) { - if ((parts = b.split('@'))[1]) { // for Object prototype breakers - s = parts[0]; - if(!cache[s]){ - cache[s] = Ext.select(s); - } - cache[s].on(parts[1], o[b]); - } - } - cache = null; - } - }, - - /** - * Utility method for getting the width of the browser scrollbar. This can differ depending on - * operating system settings, such as the theme or font size. - * @param {Boolean} force (optional) true to force a recalculation of the value. - * @return {Number} The width of the scrollbar. - */ - getScrollBarWidth: function(force){ - if(!Ext.isReady){ - return 0; - } - - if(force === true || scrollWidth === null){ - // Append our div, do our calculation and then remove it - var div = Ext.getBody().createChild('
    '), - child = div.child('div', true); - var w1 = child.offsetWidth; - div.setStyle('overflow', (Ext.isWebKit || Ext.isGecko) ? 'auto' : 'scroll'); - var w2 = child.offsetWidth; - div.remove(); - // Need to add 2 to ensure we leave enough space - scrollWidth = w1 - w2 + 2; - } - return scrollWidth; - }, - - - // 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; - }, - - /** - * Copies a set of named properties fom the source object to the destination object. - *

    example:

    
    -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');
    -    }
    -});
    -         * 
    - * @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. - */ - copyTo : function(dest, source, names){ - if(Ext.isString(names)){ - names = names.split(/[,;\s]/); - } - Ext.each(names, function(name){ - if(source.hasOwnProperty(name)){ - dest[name] = source[name]; - } - }, this); - return dest; - }, - - /** - * 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}, {@link Ext.Component}, or an Array of either of these to destroy - * @param {Mixed} arg2 (optional) - * @param {Mixed} etc... (optional) - */ - destroy : function(){ - Ext.each(arguments, function(arg){ - if(arg){ - if(Ext.isArray(arg)){ - this.destroy.apply(this, arg); - }else if(Ext.isFunction(arg.destroy)){ - arg.destroy(); - }else if(arg.dom){ - arg.remove(); - } - } - }, this); - }, - - /** - * 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]]; - } - }, - - /** - * Creates a copy of the passed Array with falsy values removed. - * @param {Array/NodeList} arr The Array from which to remove falsy values. - * @return {Array} The new, compressed Array. - */ - clean : function(arr){ - var ret = []; - Ext.each(arr, function(v){ - if(!!v){ - ret.push(v); - } - }); - return ret; - }, - - /** - * Creates a copy of the passed Array, filtered to contain only unique values. - * @param {Array} arr The Array to filter - * @return {Array} The new Array containing unique values. - */ - unique : function(arr){ - var ret = [], - collect = {}; - - Ext.each(arr, function(v) { - if(!collect[v]){ - ret.push(v); - } - collect[v] = true; - }); - return ret; - }, - - /** - * Recursively flattens into 1-d Array. Injects Arrays inline. - * @param {Array} arr The array to flatten - * @return {Array} The new, flattened array. - */ - flatten : function(arr){ - var worker = []; - function rFlatten(a) { - Ext.each(a, function(v) { - if(Ext.isArray(v)){ - rFlatten(v); - }else{ - worker.push(v); - } - }); - return worker; - } - return rFlatten(arr); - }, - - /** - * Returns the minimum value in the Array. - * @param {Array|NodeList} arr The Array from which to select the minimum value. - * @param {Function} comp (optional) a function to perform the comparision which determines minimization. - * If omitted the "<" operator will be used. Note: gt = 1; eq = 0; lt = -1 - * @return {Object} The minimum value in the Array. - */ - min : function(arr, comp){ - var ret = arr[0]; - comp = comp || function(a,b){ return a < b ? -1 : 1; }; - Ext.each(arr, function(v) { - ret = comp(ret, v) == -1 ? ret : v; - }); - return ret; - }, - - /** - * Returns the maximum value in the Array - * @param {Array|NodeList} arr The Array from which to select the maximum value. - * @param {Function} comp (optional) a function to perform the comparision which determines maximization. - * If omitted the ">" operator will be used. Note: gt = 1; eq = 0; lt = -1 - * @return {Object} The maximum value in the Array. - */ - max : function(arr, comp){ - var ret = arr[0]; - comp = comp || function(a,b){ return a > b ? 1 : -1; }; - Ext.each(arr, function(v) { - ret = comp(ret, v) == 1 ? ret : v; - }); - return ret; - }, - - /** - * Calculates the mean of the Array - * @param {Array} arr The Array to calculate the mean value of. - * @return {Number} The mean. - */ - mean : function(arr){ - return arr.length > 0 ? Ext.sum(arr) / arr.length : undefined; - }, - - /** - * Calculates the sum of the Array - * @param {Array} arr The Array to calculate the sum value of. - * @return {Number} The sum. - */ - sum : function(arr){ - var ret = 0; - Ext.each(arr, function(v) { - ret += v; - }); - return ret; - }, - - /** - * Partitions the set into two sets: a true set and a false set. - * Example: - * Example2: - *
    
    -// Example 1:
    -Ext.partition([true, false, true, true, false]); // [[true, true, true], [false, false]]
    -
    -// Example 2:
    -Ext.partition(
    -    Ext.query("p"),
    -    function(val){
    -        return val.className == "class1"
    -    }
    -);
    -// true are those paragraph elements with a className of "class1",
    -// false set are those that do not have that className.
    -         * 
    - * @param {Array|NodeList} arr The array to partition - * @param {Function} truth (optional) a function to determine truth. If this is omitted the element - * itself must be able to be evaluated for its truthfulness. - * @return {Array} [true,false] - */ - partition : function(arr, truth){ - var ret = [[],[]]; - Ext.each(arr, function(v, i, a) { - ret[ (truth && truth(v, i, a)) || (!truth && v) ? 0 : 1].push(v); - }); - return ret; - }, - - /** - * Invokes a method on each item in an Array. - *
    
    -// Example:
    -Ext.invoke(Ext.query("p"), "getAttribute", "id");
    -// [el1.getAttribute("id"), el2.getAttribute("id"), ..., elN.getAttribute("id")]
    -         * 
    - * @param {Array|NodeList} arr The Array of items to invoke the method on. - * @param {String} methodName The method name to invoke. - * @param {Anything} ... Arguments to send into the method invocation. - * @return {Array} The results of invoking the method on each item in the array. - */ - invoke : function(arr, methodName){ - var ret = [], - args = Array.prototype.slice.call(arguments, 2); - Ext.each(arr, function(v,i) { - if (v && Ext.isFunction(v[methodName])) { - ret.push(v[methodName].apply(v, args)); - } else { - ret.push(undefined); - } - }); - return ret; - }, - - /** - * Plucks the value of a property from each item in the Array - *
    
    -// Example:
    -Ext.pluck(Ext.query("p"), "className"); // [el1.className, el2.className, ..., elN.className]
    -         * 
    - * @param {Array|NodeList} arr The Array of items to pluck the value from. - * @param {String} prop The property name to pluck from each element. - * @return {Array} The value from each item in the Array. - */ - pluck : function(arr, prop){ - var ret = []; - Ext.each(arr, function(v) { - ret.push( v[prop] ); - }); - return ret; - }, - - /** - *

    Zips N sets together.

    - *
    
    -// Example 1:
    -Ext.zip([1,2,3],[4,5,6]); // [[1,4],[2,5],[3,6]]
    -// Example 2:
    -Ext.zip(
    -    [ "+", "-", "+"],
    -    [  12,  10,  22],
    -    [  43,  15,  96],
    -    function(a, b, c){
    -        return "$" + a + "" + b + "." + c
    -    }
    -); // ["$+12.43", "$-10.15", "$+22.96"]
    -         * 
    - * @param {Arrays|NodeLists} arr This argument may be repeated. Array(s) to contribute values. - * @param {Function} zipper (optional) The last item in the argument list. This will drive how the items are zipped together. - * @return {Array} The zipped set. - */ - zip : function(){ - var parts = Ext.partition(arguments, function( val ){ return !Ext.isFunction(val); }), - arrs = parts[0], - fn = parts[1][0], - len = Ext.max(Ext.pluck(arrs, "length")), - ret = []; - - for (var i = 0; i < len; i++) { - ret[i] = []; - if(fn){ - ret[i] = fn.apply(fn, Ext.pluck(arrs, i)); - }else{ - for (var j = 0, aLen = arrs.length; j < aLen; j++){ - ret[i].push( arrs[j][i] ); - } - } - } - return ret; - }, - - /** - * This is shorthand reference to {@link Ext.ComponentMgr#get}. - * Looks up an existing {@link Ext.Component Component} by {@link Ext.Component#id id} - * @param {String} id The component {@link Ext.Component#id id} - * @return Ext.Component The Component, undefined if not found, or null if a - * Class was found. - */ - getCmp : function(id){ - return Ext.ComponentMgr.get(id); - }, - - /** - * 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: E.isIE6 || (E.isMac && E.isGecko2), - - // 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:
      - *
    • string: If the object passed is a string
    • - *
    • number: If the object passed is a number
    • - *
    • boolean: If the object passed is a boolean value
    • - *
    • date: If the object passed is a Date object
    • - *
    • function: If the object passed is a function reference
    • - *
    • object: If the object passed is an object
    • - *
    • array: If the object passed is an array
    • - *
    • regexp: If the object passed is a regular expression
    • - *
    • element: If the object passed is a DOM Element
    • - *
    • nodelist: If the object passed is a DOM NodeList
    • - *
    • textnode: If the object passed is a DOM text node and contains something other than whitespace
    • - *
    • whitespace: If the object passed is a DOM text node and contains only whitespace
    • - *
    - * @param {Mixed} object - * @return {String} - */ - type : function(o){ - if(o === undefined || o === null){ - return false; - } - if(o.htmlElement){ - return 'element'; - } - var t = typeof o; - if(t == 'object' && o.nodeName) { - switch(o.nodeType) { - case 1: return 'element'; - case 3: return (/\S/).test(o.nodeValue) ? 'textnode' : 'whitespace'; - } - } - if(t == 'object' || t == 'function') { - switch(o.constructor) { - case Array: return 'array'; - case RegExp: return 'regexp'; - case Date: return 'date'; - } - if(Ext.isNumber(o.length) && Ext.isFunction(o.item)) { - return 'nodelist'; - } - } - return t; - }, - - intercept : function(o, name, fn, scope){ - o[name] = o[name].createInterceptor(fn, scope); - }, - - // internal - callback : function(cb, scope, args, delay){ - if(Ext.isFunction(cb)){ - if(delay){ - cb.defer(delay, scope, args || []); - }else{ - cb.apply(scope, args || []); - } - } - } - }; -}()); - -/** - * @class Function - * These functions are available on every Function object (any JavaScript function). - */ -Ext.apply(Function.prototype, { - /** - * Create a combined function call sequence of the original function + the passed function. - * The resulting function returns the results of the original function. - * The passed fcn is called with the parameters of the original function. Example usage: - *
    
    -var sayHi = function(name){
    -    alert('Hi, ' + name);
    -}
    -
    -sayHi('Fred'); // alerts "Hi, Fred"
    -
    -var sayGoodbye = sayHi.createSequence(function(name){
    -    alert('Bye, ' + name);
    -});
    -
    -sayGoodbye('Fred'); // both alerts show
    -
    - * @param {Function} fcn The function to sequence - * @param {Object} scope (optional) The scope (this reference) in which the passed function is executed. - * If omitted, defaults to the scope in which the original function is called or the browser window. - * @return {Function} The new function - */ - createSequence : function(fcn, scope){ - var method = this; - return !Ext.isFunction(fcn) ? - this : - function(){ - var retval = method.apply(this || window, arguments); - fcn.apply(scope || this || window, arguments); - return retval; - }; - } -}); - - -/** - * @class String - * These functions are available as static methods on the JavaScript String object. - */ -Ext.applyIf(String, { - - /** - * Escapes the passed string for ' and \ - * @param {String} string The string to escape - * @return {String} The escaped string - * @static - */ - escape : function(string) { - return string.replace(/('|\\)/g, "\\$1"); - }, - - /** - * Pads the left side of a string with a specified character. This is especially useful - * for normalizing number and date strings. Example usage: - *
    
    -var s = String.leftPad('123', 5, '0');
    -// s now contains the string: '00123'
    -     * 
    - * @param {String} string The original string - * @param {Number} size The total length of the output string - * @param {String} char (optional) The character with which to pad the original string (defaults to empty string " ") - * @return {String} The padded string - * @static - */ - leftPad : function (val, size, ch) { - var result = String(val); - if(!ch) { - ch = " "; - } - while (result.length < size) { - result = ch + result; - } - return result; - } -}); - -/** - * Utility function that allows you to easily switch a string between two alternating values. The passed value - * is compared to the current string, and if they are equal, the other value that was passed in is returned. If - * they are already different, the first value passed in is returned. Note that this method returns the new value - * but does not change the current string. - *
    
    -// alternate sort directions
    -sort = sort.toggle('ASC', 'DESC');
    -
    -// instead of conditional logic:
    -sort = (sort == 'ASC' ? 'DESC' : 'ASC');
    -
    - * @param {String} value The value to compare to the current string - * @param {String} other The new value to use if the string already equals the first value passed in - * @return {String} The new value - */ -String.prototype.toggle = function(value, other){ - return this == value ? other : value; -}; - -/** - * Trims whitespace from either end of a string, leaving spaces within the string intact. Example: - *
    
    -var s = '  foo bar  ';
    -alert('-' + s + '-');         //alerts "- foo bar -"
    -alert('-' + s.trim() + '-');  //alerts "-foo bar-"
    -
    - * @return {String} The trimmed string - */ -String.prototype.trim = function(){ - var re = /^\s+|\s+$/g; - return function(){ return this.replace(re, ""); }; -}(); - -// 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()); -}; - - -/** - * @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 Ext.util.TaskRunner * Provides the ability to execute one or more arbitrary tasks in a multithreaded @@ -1713,7 +1080,7 @@ Ext.applyIf(Number.prototype, { // Start a simple clock task that updates a div once per second var updateClock = function(){ Ext.fly('clock').update(new Date().format('g:i:s A')); -} +} var task = { run: updateClock, interval: 1000 //1 second @@ -1728,47 +1095,48 @@ Ext.TaskMgr.start({ }); *
    - * Also see {@link Ext.util.DelayedTask}. - * + *

    See the {@link #start} method for details about how to configure a task object.

    + * Also see {@link Ext.util.DelayedTask}. + * * @constructor * @param {Number} interval (optional) The minimum precision in milliseconds supported by this TaskRunner instance * (defaults to 10) */ Ext.util.TaskRunner = function(interval){ interval = interval || 10; - var tasks = [], - removeQueue = [], - id = 0, - running = false, + var tasks = [], + removeQueue = [], + id = 0, + running = false, - // private - stopThread = function(){ + // private + stopThread = function(){ running = false; clearInterval(id); id = 0; }, - // private - startThread = function(){ + // private + startThread = function(){ if(!running){ running = true; id = setInterval(runTasks, interval); } }, - // private - removeTask = function(t){ + // private + removeTask = function(t){ removeQueue.push(t); if(t.onStop){ t.onStop.apply(t.scope || t); } }, - - // private - runTasks = function(){ - var rqLen = removeQueue.length, - now = new Date().getTime(); - + + // private + runTasks = function(){ + var rqLen = removeQueue.length, + now = new Date().getTime(); + if(rqLen > 0){ for(var i = 0; i < rqLen; i++){ tasks.remove(removeQueue[i]); @@ -1778,7 +1146,7 @@ Ext.util.TaskRunner = function(interval){ stopThread(); return; } - } + } for(var i = 0, t, itime, rt, len = tasks.length; i < len; ++i){ t = tasks[i]; itime = now - t.taskRunTime; @@ -1799,21 +1167,25 @@ Ext.util.TaskRunner = function(interval){ /** * Starts a new task. * @method start - * @param {Object} task A config object that supports the following properties:
      - *
    • run : Function
      The function to execute each time the task is run. The - * function will be called at each interval and passed the args argument if specified. If a - * particular scope is required, be sure to specify it using the scope argument.
    • + * @param {Object} task

      A config object that supports the following properties:

        + *
      • run : Function

        The function to execute each time the task is invoked. The + * function will be called at each interval and passed the args argument if specified, and the + * current invocation count if not.

        + *

        If a particular scope (this reference) is required, be sure to specify it using the scope argument.

        + *

        Return false from this function to terminate the task.

      • *
      • interval : Number
        The frequency in milliseconds with which the task - * should be executed.
      • + * should be invoked. *
      • args : Array
        (optional) An array of arguments to be passed to the function - * specified by run.
      • + * specified by run. If not specified, the current invocation count is passed. *
      • scope : Object
        (optional) The scope (this reference) in which to execute the * run function. Defaults to the task config object.
      • - *
      • duration : Number
        (optional) The length of time in milliseconds to execute + *
      • duration : Number
        (optional) The length of time in milliseconds to invoke * the task before stopping automatically (defaults to indefinite).
      • - *
      • repeat : Number
        (optional) The number of times to execute the task before + *
      • repeat : Number
        (optional) The number of times to invoke the task before * stopping automatically (defaults to indefinite).
      • - *
      + *

    + *

    Before each invocation, Ext injects the property taskRunCount into the task object so + * that calculations based on the repeat count can be performed.

    * @return {Object} The task */ this.start = function(task){ @@ -1867,173 +1239,174 @@ var task = { } Ext.TaskMgr.start(task);
    + *

    See the {@link #start} method for details about how to configure a task object.

    * @singleton */ -Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ - var libFlyweight; - - function fly(el) { - if (!libFlyweight) { - libFlyweight = new Ext.Element.Flyweight(); - } - libFlyweight.dom = el; - return libFlyweight; - } - - (function(){ - var doc = document, - isCSS1 = doc.compatMode == "CSS1Compat", - MAX = Math.max, - ROUND = Math.round, - PARSEINT = parseInt; - - Ext.lib.Dom = { - isAncestor : function(p, c) { - var ret = false; - - p = Ext.getDom(p); - c = Ext.getDom(c); - if (p && c) { - if (p.contains) { - return p.contains(c); - } else if (p.compareDocumentPosition) { - return !!(p.compareDocumentPosition(c) & 16); - } else { - while (c = c.parentNode) { - ret = c == p || ret; - } - } - } - return ret; - }, - - getViewWidth : function(full) { - return full ? this.getDocumentWidth() : this.getViewportWidth(); - }, - - getViewHeight : function(full) { - return full ? this.getDocumentHeight() : this.getViewportHeight(); - }, - - getDocumentHeight: function() { - return MAX(!isCSS1 ? doc.body.scrollHeight : doc.documentElement.scrollHeight, this.getViewportHeight()); - }, - - getDocumentWidth: function() { - return MAX(!isCSS1 ? doc.body.scrollWidth : doc.documentElement.scrollWidth, this.getViewportWidth()); - }, - - getViewportHeight: function(){ - return Ext.isIE ? - (Ext.isStrict ? doc.documentElement.clientHeight : doc.body.clientHeight) : - self.innerHeight; - }, - - getViewportWidth : function() { - return !Ext.isStrict && !Ext.isOpera ? doc.body.clientWidth : - Ext.isIE ? doc.documentElement.clientWidth : self.innerWidth; - }, - - getY : function(el) { - return this.getXY(el)[1]; - }, - - getX : function(el) { - return this.getXY(el)[0]; - }, - - getXY : function(el) { - var p, - pe, - b, - bt, - bl, - dbd, - x = 0, - y = 0, - scroll, - hasAbsolute, - bd = (doc.body || doc.documentElement), - ret = [0,0]; - - el = Ext.getDom(el); - - if(el != bd){ - if (el.getBoundingClientRect) { - b = el.getBoundingClientRect(); - scroll = fly(document).getScroll(); - ret = [ROUND(b.left + scroll.left), ROUND(b.top + scroll.top)]; - } else { - p = el; - hasAbsolute = fly(el).isStyle("position", "absolute"); - - while (p) { - pe = fly(p); - x += p.offsetLeft; - y += p.offsetTop; - - hasAbsolute = hasAbsolute || pe.isStyle("position", "absolute"); - - if (Ext.isGecko) { - y += bt = PARSEINT(pe.getStyle("borderTopWidth"), 10) || 0; - x += bl = PARSEINT(pe.getStyle("borderLeftWidth"), 10) || 0; - - if (p != el && !pe.isStyle('overflow','visible')) { - x += bl; - y += bt; - } - } - p = p.offsetParent; - } - - if (Ext.isSafari && hasAbsolute) { - x -= bd.offsetLeft; - y -= bd.offsetTop; - } - - if (Ext.isGecko && !hasAbsolute) { - 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).isStyle("display", "inline"))) { - x -= p.scrollLeft; - y -= p.scrollTop; - } - p = p.parentNode; - } - ret = [x,y]; - } - } - return ret - }, - - setXY : function(el, xy) { - (el = Ext.fly(el, '_setXY')).position(); - - var pts = el.translatePoints(xy), - style = el.dom.style, - pos; - - for (pos in pts) { - if(!isNaN(pts[pos])) style[pos] = pts[pos] + "px" - } - }, - - setX : function(el, x) { - this.setXY(el, [x, false]); - }, - - setY : function(el, y) { - this.setXY(el, [false, y]); - } - }; -})();Ext.lib.Dom.getRegion = function(el) { - return Ext.lib.Region.getRegion(el); -};Ext.lib.Event = function() { +Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ + var libFlyweight; + + function fly(el) { + if (!libFlyweight) { + libFlyweight = new Ext.Element.Flyweight(); + } + libFlyweight.dom = el; + return libFlyweight; + } + + (function(){ + var doc = document, + isCSS1 = doc.compatMode == "CSS1Compat", + MAX = Math.max, + ROUND = Math.round, + PARSEINT = parseInt; + + Ext.lib.Dom = { + isAncestor : function(p, c) { + var ret = false; + + p = Ext.getDom(p); + c = Ext.getDom(c); + if (p && c) { + if (p.contains) { + return p.contains(c); + } else if (p.compareDocumentPosition) { + return !!(p.compareDocumentPosition(c) & 16); + } else { + while (c = c.parentNode) { + ret = c == p || ret; + } + } + } + return ret; + }, + + getViewWidth : function(full) { + return full ? this.getDocumentWidth() : this.getViewportWidth(); + }, + + getViewHeight : function(full) { + return full ? this.getDocumentHeight() : this.getViewportHeight(); + }, + + getDocumentHeight: function() { + return MAX(!isCSS1 ? doc.body.scrollHeight : doc.documentElement.scrollHeight, this.getViewportHeight()); + }, + + getDocumentWidth: function() { + return MAX(!isCSS1 ? doc.body.scrollWidth : doc.documentElement.scrollWidth, this.getViewportWidth()); + }, + + getViewportHeight: function(){ + return Ext.isIE ? + (Ext.isStrict ? doc.documentElement.clientHeight : doc.body.clientHeight) : + self.innerHeight; + }, + + getViewportWidth : function() { + return !Ext.isStrict && !Ext.isOpera ? doc.body.clientWidth : + Ext.isIE ? doc.documentElement.clientWidth : self.innerWidth; + }, + + getY : function(el) { + return this.getXY(el)[1]; + }, + + getX : function(el) { + return this.getXY(el)[0]; + }, + + getXY : function(el) { + var p, + pe, + b, + bt, + bl, + dbd, + x = 0, + y = 0, + scroll, + hasAbsolute, + bd = (doc.body || doc.documentElement), + ret = [0,0]; + + el = Ext.getDom(el); + + if(el != bd){ + if (el.getBoundingClientRect) { + b = el.getBoundingClientRect(); + scroll = fly(document).getScroll(); + ret = [ROUND(b.left + scroll.left), ROUND(b.top + scroll.top)]; + } else { + p = el; + hasAbsolute = fly(el).isStyle("position", "absolute"); + + while (p) { + pe = fly(p); + x += p.offsetLeft; + y += p.offsetTop; + + hasAbsolute = hasAbsolute || pe.isStyle("position", "absolute"); + + if (Ext.isGecko) { + y += bt = PARSEINT(pe.getStyle("borderTopWidth"), 10) || 0; + x += bl = PARSEINT(pe.getStyle("borderLeftWidth"), 10) || 0; + + if (p != el && !pe.isStyle('overflow','visible')) { + x += bl; + y += bt; + } + } + p = p.offsetParent; + } + + if (Ext.isSafari && hasAbsolute) { + x -= bd.offsetLeft; + y -= bd.offsetTop; + } + + if (Ext.isGecko && !hasAbsolute) { + 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).isStyle("display", "inline"))) { + x -= p.scrollLeft; + y -= p.scrollTop; + } + p = p.parentNode; + } + ret = [x,y]; + } + } + return ret; + }, + + setXY : function(el, xy) { + (el = Ext.fly(el, '_setXY')).position(); + + var pts = el.translatePoints(xy), + style = el.dom.style, + pos; + + for (pos in pts) { + if (!isNaN(pts[pos])) { + style[pos] = pts[pos] + "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, unloadListeners = {}, retryCount = 0, @@ -2046,10 +1419,8 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ // constants POLL_RETRYS = 200, POLL_INTERVAL = 20, - EL = 0, TYPE = 0, FN = 1, - WFN = 2, OBJ = 2, ADJ_SCOPE = 3, SCROLLLEFT = 'scrollLeft', @@ -2128,20 +1499,22 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ function _tryPreloadAttach() { var ret = false, notAvail = [], - element, i, len, v, + element, i, v, override, tryAgain = !loadComplete || (retryCount > 0); - if (!locked) { + if(!locked){ locked = true; - for (i = 0, len = onAvailStack.length; i < len; i++) { + for(i = 0; i < onAvailStack.length; ++i){ v = onAvailStack[i]; if(v && (element = doc.getElementById(v.id))){ if(!v.checkReady || loadComplete || element.nextSibling || (doc && doc.body)) { - element = v.override ? (v.override === true ? v.obj : v.override) : element; + override = v.override; + element = override ? (override === true ? v.obj : override) : element; v.fn.call(element, v.obj); onAvailStack.remove(v); - } else { + --i; + }else{ notAvail.push(v); } } @@ -2155,7 +1528,6 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ clearInterval(_interval); _interval = null; } - ret = !(locked = false); } return ret; @@ -2270,8 +1642,8 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ getRelatedTarget : function(ev) { ev = ev.browserEvent || ev; return this.resolveTextNode(ev.relatedTarget || - (ev.type == MOUSEOUT ? ev.toElement : - ev.type == MOUSEOVER ? ev.fromElement : null)); + (/(mouseout|mouseleave)/.test(ev.type) ? ev.toElement : + /(mouseover|mouseenter)/.test(ev.type) ? ev.fromElement : null)); }, getPageX : function(ev) { @@ -2306,6 +1678,9 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ if (ev.preventDefault) { ev.preventDefault(); } else { + if (ev.keyCode) { + ev.keyCode = 0; + } ev.returnValue = false; } }, @@ -2343,18 +1718,17 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ _load : function(e) { loadComplete = true; - var EU = Ext.lib.Event; + if (Ext.isIE && e !== true) { - // IE8 complains that _load is null or not an object - // so lets remove self via arguments.callee + // IE8 complains that _load is null or not an object + // so lets remove self via arguments.callee doRemove(win, "load", arguments.callee); } }, _unload : function(e) { var EU = Ext.lib.Event, - i, j, l, v, ul, id, len, index, scope; - + i, v, ul, id, len, scope; for (id in unloadListeners) { ul = unloadListeners[id]; @@ -2369,7 +1743,6 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ } }; - unloadListeners = null; Ext.EventManager._unload(); doRemove(win, UNLOAD, EU._unload); @@ -2389,1230 +1762,1148 @@ Ext.TaskMgr = new Ext.util.TaskRunner();(function(){ return pub; }(); -/* -* 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 = function() { - var activeX = ['MSXML2.XMLHTTP.3.0', - 'MSXML2.XMLHTTP', - 'Microsoft.XMLHTTP'], - CONTENTTYPE = 'Content-Type'; - - // private - function setHeader(o) { - var conn = o.conn, - prop; - - function setTheHeaders(conn, headers){ - for (prop in headers) { - if (headers.hasOwnProperty(prop)) { - conn.setRequestHeader(prop, headers[prop]); - } - } - } - - if (pub.defaultHeaders) { - setTheHeaders(conn, pub.defaultHeaders); - } - - if (pub.headers) { - setTheHeaders(conn, pub.headers); - delete pub.headers; - } - } - - // private - function createExceptionObject(tId, callbackArg, isAbort, isTimeout) { - return { - tId : tId, - status : isAbort ? -1 : 0, - statusText : isAbort ? 'transaction aborted' : 'communication failure', - isAbort: isAbort, - isTimeout: isTimeout, - argument : callbackArg - }; - } - - // private - function initHeader(label, value) { - (pub.headers = pub.headers || {})[label] = value; - } - - // private - function createResponseObject(o, callbackArg) { - var headerObj = {}, - headerStr, - conn = o.conn, - t, - s; - - try { - headerStr = o.conn.getAllResponseHeaders(); - Ext.each(headerStr.replace(/\r\n/g, '\n').split('\n'), function(v){ - t = v.indexOf(':'); - if(t >= 0){ - s = v.substr(0, t).toLowerCase(); - if(v.charAt(t + 1) == ' '){ - ++t; - } - headerObj[s] = v.substr(t + 1); - } - }); - } catch(e) {} - - return { - tId : o.tId, - status : conn.status, - statusText : conn.statusText, - getResponseHeader : function(header){return headerObj[header.toLowerCase()];}, - getAllResponseHeaders : function(){return headerStr}, - responseText : conn.responseText, - responseXML : conn.responseXML, - argument : callbackArg - }; - } - - // private - function releaseObject(o) { - o.conn = null; - o = null; - } - - // private - function handleTransactionResponse(o, callback, isAbort, isTimeout) { - if (!callback) { - 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) || (Ext.isIE && httpStatus == 1223)) { - responseObject = 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 = createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false), isTimeout); - if (callback.failure) { - if (!callback.scope) { - callback.failure(responseObject); - } - else { - callback.failure.apply(callback.scope, [responseObject]); - } - } - break; - default: - responseObject = createResponseObject(o, callback.argument); - if (callback.failure) { - if (!callback.scope) { - callback.failure(responseObject); - } - else { - callback.failure.apply(callback.scope, [responseObject]); - } - } - } - } - - releaseObject(o); - responseObject = null; - } - - // private - function handleReadyState(o, callback){ - callback = callback || {}; - var conn = o.conn, - tId = o.tId, - poll = pub.poll, - cbTimeout = callback.timeout || null; - - if (cbTimeout) { - pub.timeout[tId] = setTimeout(function() { - pub.abort(o, callback, true); - }, cbTimeout); - } - - poll[tId] = setInterval( - function() { - if (conn && conn.readyState == 4) { - clearInterval(poll[tId]); - poll[tId] = null; - - if (cbTimeout) { - clearTimeout(pub.timeout[tId]); - pub.timeout[tId] = null; - } - - handleTransactionResponse(o, callback); - } - }, - pub.pollInterval); - } - - // private - function asyncRequest(method, uri, callback, postData) { - var o = getConnectionObject() || null; - - if (o) { - o.conn.open(method, uri, true); - - if (pub.useDefaultXhrHeader) { - initHeader('X-Requested-With', pub.defaultXhrHeader); - } - - if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])){ - initHeader(CONTENTTYPE, pub.defaultPostHeader); - } - - if (pub.defaultHeaders || pub.headers) { - setHeader(o); - } - - handleReadyState(o, callback); - o.conn.send(postData || null); - } - return o; - } - - // private - function getConnectionObject() { - var o; - - try { - if (o = createXhrObject(pub.transactionId)) { - pub.transactionId++; - } - } catch(e) { - } finally { - return o; - } - } - - // private - function createXhrObject(transactionId) { - var http; - - try { - http = new XMLHttpRequest(); - } catch(e) { - for (var i = 0; i < activeX.length; ++i) { - try { - http = new ActiveXObject(activeX[i]); - break; - } catch(e) {} - } - } finally { - return {conn : http, tId : transactionId}; - } - } - - var pub = { - request : function(method, uri, cb, data, options) { - if(options){ - var me = this, - xmlData = options.xmlData, - jsonData = options.jsonData, - hs; - - Ext.applyIf(me, options); - - if(xmlData || jsonData){ - hs = me.headers; - if(!hs || !hs[CONTENTTYPE]){ - initHeader(CONTENTTYPE, xmlData ? 'text/xml' : 'application/json'); - } - data = xmlData || (!Ext.isPrimitive(jsonData) ? Ext.encode(jsonData) : jsonData); - } - } - return asyncRequest(method || options.method || "POST", uri, cb, data); - }, - - serializeForm : function(form) { - var fElements = form.elements || (document.forms[form] || Ext.getDom(form)).elements, - hasSubmit = false, - encoder = encodeURIComponent, - element, - options, - name, - val, - data = '', - type; - - Ext.each(fElements, function(element) { - name = element.name; - type = element.type; - - if (!element.disabled && name){ - if(/select-(one|multiple)/i.test(type)) { - Ext.each(element.options, function(opt) { - if (opt.selected) { - data += String.format("{0}={1}&", encoder(name), encoder((opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttribute('value') !== null) ? opt.value : opt.text)); - } - }); - } else if(!/file|undefined|reset|button/i.test(type)) { - if(!(/radio|checkbox/i.test(type) && !element.checked) && !(type == 'submit' && hasSubmit)){ - - data += encoder(name) + '=' + encoder(element.value) + '&'; - hasSubmit = /submit/i.test(type); - } - } - } - }); - return data.substr(0, data.length - 1); - }, - - useDefaultHeader : true, - defaultPostHeader : 'application/x-www-form-urlencoded; charset=UTF-8', - useDefaultXhrHeader : true, - defaultXhrHeader : 'XMLHttpRequest', - poll : {}, - timeout : {}, - pollInterval : 50, - transactionId : 0, - -// This is never called - Is it worth exposing this? -// setProgId : function(id) { -// activeX.unshift(id); -// }, - -// This is never called - Is it worth exposing this? -// setDefaultPostHeader : function(b) { -// this.useDefaultHeader = b; -// }, - -// This is never called - Is it worth exposing this? -// setDefaultXhrHeader : function(b) { -// this.useDefaultXhrHeader = b; -// }, - -// This is never called - Is it worth exposing this? -// setPollingInterval : function(i) { -// if (typeof i == 'number' && isFinite(i)) { -// this.pollInterval = i; -// } -// }, - -// This is never called - Is it worth exposing this? -// resetDefaultHeaders : function() { -// this.defaultHeaders = null; -// }, - - abort : function(o, callback, isTimeout) { - var me = this, - tId = o.tId, - isAbort = false; - - if (me.isCallInProgress(o)) { - o.conn.abort(); - clearInterval(me.poll[tId]); - me.poll[tId] = null; - clearTimeout(pub.timeout[tId]); - me.timeout[tId] = null; - - handleTransactionResponse(o, callback, (isAbort = true), isTimeout); - } - return isAbort; - }, - - isCallInProgress : function(o) { - // if there is a connection and readyState is not 0 or 4 - return o.conn && !{0:true,4:true}[o.conn.readyState]; - } - }; - return pub; - }(); Ext.lib.Region = function(t, r, b, l) { - var me = this; - me.top = t; - me[1] = t; - me.right = r; - me.bottom = b; - me.left = l; - me[0] = l; - }; - - Ext.lib.Region.prototype = { - contains : function(region) { - var me = this; - return ( region.left >= me.left && - region.right <= me.right && - region.top >= me.top && - region.bottom <= me.bottom ); - - }, - - getArea : function() { - var me = this; - return ( (me.bottom - me.top) * (me.right - me.left) ); - }, - - intersect : function(region) { - var me = this, - t = Math.max(me.top, region.top), - r = Math.min(me.right, region.right), - b = Math.min(me.bottom, region.bottom), - l = Math.max(me.left, region.left); - - if (b >= t && r >= l) { - return new Ext.lib.Region(t, r, b, l); - } - }, - - union : function(region) { - var me = this, - t = Math.min(me.top, region.top), - r = Math.max(me.right, region.right), - b = Math.max(me.bottom, region.bottom), - l = Math.min(me.left, region.left); - - return new Ext.lib.Region(t, r, b, l); - }, - - constrainTo : function(r) { - var me = this; - me.top = me.top.constrain(r.top, r.bottom); - me.bottom = me.bottom.constrain(r.top, r.bottom); - me.left = me.left.constrain(r.left, r.right); - me.right = me.right.constrain(r.left, r.right); - return me; - }, - - adjust : function(t, l, b, r) { - var me = this; - me.top += t; - me.left += l; - me.right += r; - me.bottom += b; - return me; - } - }; - - Ext.lib.Region.getRegion = function(el) { - var p = Ext.lib.Dom.getXY(el), - t = p[1], - r = p[0] + el.offsetWidth, - b = p[1] + el.offsetHeight, - 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]; - } - var me = this; - me.x = me.right = me.left = me[0] = x; - me.y = me.top = me.bottom = me[1] = y; - }; - - Ext.lib.Point.prototype = new Ext.lib.Region(); -(function(){ - var EXTLIB = Ext.lib, - 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, - isset = function(v){ - return typeof v !== 'undefined'; - }, - now = function(){ - return new Date(); - }; - - EXTLIB.Anim = { - motion : function(el, args, duration, easing, cb, scope) { - return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); - }, - - 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() { - if(Ext.isFunction(cb)){ - cb.call(scope); - } - }); - return anim; - } - }; - - EXTLIB.AnimBase = function(el, attributes, duration, method) { - if (el) { - this.init(el, attributes, duration, method); - } - }; - - EXTLIB.AnimBase.prototype = { - doMethod: function(attr, start, end) { - var me = this; - return me.method(me.curFrame, start, end - start, me.totalFrames); - }, - - - setAttr: function(attr, val, unit) { - if (noNegatives.test(attr) && val < 0) { - val = 0; - } - Ext.fly(this.el, '_anim').setStyle(attr, val + unit); - }, - - - getAttr: function(attr) { - var el = Ext.fly(this.el), - val = el.getStyle(attr), - a = offsetAttribute.exec(attr) || [] - - if (val !== 'auto' && !offsetUnit.test(val)) { - return parseFloat(val); - } - - return (!!(a[2]) || (el.getStyle('position') == 'absolute' && !!(a[3]))) ? el.dom['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)] : 0; - }, - - - getDefaultUnit: function(attr) { - return defaultUnit.test(attr) ? 'px' : ''; - }, - - animateX : function(callback, scope) { - var me = this, - f = function() { - me.onComplete.removeListener(f); - if (Ext.isFunction(callback)) { - callback.call(scope || me, me); - } - }; - me.onComplete.addListener(f, me); - me.animate(); - }, - - - setRunAttr: function(attr) { - var me = this, - a = this.attributes[attr], - to = a.to, - by = a.by, - from = a.from, - unit = a.unit, - ra = (this.runAttrs[attr] = {}), - end; - - if (!isset(to) && !isset(by)){ - return false; - } - - var start = isset(from) ? from : me.getAttr(attr); - if (isset(to)) { - end = to; - }else if(isset(by)) { - if (Ext.isArray(start)){ - end = []; - for(var i=0,len=start.length; i 0 && isFinite(tweak)){ - if(tween.curFrame + tweak >= frames){ - tweak = frames - (frame + 1); - } - tween.curFrame += tweak; - } - }; - }; - - EXTLIB.Bezier = new function() { - - this.getPosition = function(points, t) { - var n = points.length, - tmp = [], - c = 1 - t, - i, - j; - - for (i = 0; i < n; ++i) { - tmp[i] = [points[i][0], points[i][1]]; - } - - for (j = 1; j < n; ++j) { - for (i = 0; i < n - j; ++i) { - tmp[i][0] = c * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; - tmp[i][1] = c * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; - } - } - - return [ tmp[0][0], tmp[0][1] ]; - - }; - }; - - - EXTLIB.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; - } - }; - - (function() { - EXTLIB.Motion = function(el, attributes, duration, method) { - if (el) { - EXTLIB.Motion.superclass.constructor.call(this, el, attributes, duration, method); - } - }; - - Ext.extend(EXTLIB.Motion, Ext.lib.AnimBase); - - var superclass = EXTLIB.Motion.superclass, - proto = EXTLIB.Motion.prototype, - pointsRe = /^points$/i; - - Ext.apply(EXTLIB.Motion.prototype, { - setAttr: function(attr, val, unit){ - var me = this, - setAttr = superclass.setAttr; - - if (pointsRe.test(attr)) { - unit = unit || 'px'; - setAttr.call(me, 'left', val[0], unit); - setAttr.call(me, 'top', val[1], unit); - } else { - setAttr.call(me, attr, val, unit); - } - }, - - getAttr: function(attr){ - var me = this, - getAttr = superclass.getAttr; - - return pointsRe.test(attr) ? [getAttr.call(me, 'left'), getAttr.call(me, 'top')] : getAttr.call(me, attr); - }, - - doMethod: function(attr, start, end){ - var me = this; - - return pointsRe.test(attr) - ? EXTLIB.Bezier.getPosition(me.runAttrs[attr], me.method(me.curFrame, 0, 100, me.totalFrames) / 100) - : superclass.doMethod.call(me, attr, start, end); - }, - - setRunAttr: function(attr){ - if(pointsRe.test(attr)){ - - var me = this, - el = this.el, - points = this.attributes.points, - control = points.control || [], - from = points.from, - to = points.to, - by = points.by, - DOM = EXTLIB.Dom, - start, - i, - end, - len, - ra; - - - 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(); - DOM.setXY(el, isset(from) ? from : DOM.getXY(el)); - start = me.getAttr('points'); - - - if(isset(to)){ - end = translateValues.call(me, to, start); - for (i = 0,len = control.length; i < len; ++i) { - control[i] = translateValues.call(me, control[i], start); - } - } else if (isset(by)) { - end = [start[0] + by[0], start[1] + by[1]]; - - for (i = 0,len = control.length; i < len; ++i) { - control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; - } - } - - ra = this.runAttrs[attr] = [start]; - if (control.length > 0) { - ra = ra.concat(control); - } - - ra[ra.length] = end; - }else{ - superclass.setRunAttr.call(this, attr); - } - } - }); - - var translateValues = function(val, start) { - var pageXY = EXTLIB.Dom.getXY(this.el); - return [val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1]]; - }; - })(); -})();// Easing functions -(function(){ - // shortcuts to aid compression - var abs = Math.abs, - pi = Math.PI, - asin = Math.asin, - pow = Math.pow, - sin = Math.sin, - EXTLIB = Ext.lib; - - Ext.apply(EXTLIB.Easing, { - - easeBoth: function (t, b, c, d) { - return ((t /= d / 2) < 1) ? c / 2 * t * t + b : -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) { - return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t + b : -c / 2 * ((t -= 2) * t * t * t - 2) + b; - }, - - elasticIn: function (t, b, c, d, a, p) { - if (t == 0 || (t /= d) == 1) { - return t == 0 ? b : b + c; - } - p = p || (d * .3); - - var s; - if (a >= abs(c)) { - s = p / (2 * pi) * asin(c / a); - } else { - a = c; - s = p / 4; - } - - return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b; - - }, - - elasticOut: function (t, b, c, d, a, p) { - if (t == 0 || (t /= d) == 1) { - return t == 0 ? b : b + c; - } - p = p || (d * .3); - - var s; - if (a >= abs(c)) { - s = p / (2 * pi) * asin(c / a); - } else { - a = c; - s = p / 4; - } - - return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b; - }, - - elasticBoth: function (t, b, c, d, a, p) { - if (t == 0 || (t /= d / 2) == 2) { - return t == 0 ? b : b + c; - } - - p = p || (d * (.3 * 1.5)); - - var s; - if (a >= abs(c)) { - s = p / (2 * pi) * asin(c / a); - } else { - a = c; - s = p / 4; - } - - return t < 1 ? - -.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b : - a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b; - }, - - backIn: function (t, b, c, d, s) { - s = s || 1.70158; - return c * (t /= d) * t * ((s + 1) * t - s) + b; - }, - - - backOut: function (t, b, c, d, s) { - if (!s) { - s = 1.70158; - } - return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; - }, - - - backBoth: function (t, b, c, d, s) { - s = s || 1.70158; - - return ((t /= d / 2 ) < 1) ? - c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : - c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; - }, - - - bounceIn: function (t, b, c, d) { - return c - EXTLIB.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) { - return (t < d / 2) ? - EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b : - EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b; - } - }); -})(); - -(function() { - var EXTLIB = Ext.lib; - // Color Animation - EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) { - return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim); - } - - EXTLIB.ColorAnim = function(el, attributes, duration, method) { - EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); - }; - - Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase); - - var superclass = EXTLIB.ColorAnim.superclass, - colorRE = /color$/i, - transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/, - rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, - hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, - hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i, - isset = function(v){ - return typeof v !== 'undefined'; - } - - // private - function parseColor(s) { - var pi = parseInt, - base, - out = null, - c; - - if (s.length == 3) { - return s; - } - - Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){ - base = (idx % 2 == 0) ? 16 : 10; - c = re.exec(s); - if(c && c.length == 4){ - out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)]; - return false; - } - }); - return out; - } - - Ext.apply(EXTLIB.ColorAnim.prototype, { - getAttr : function(attr) { - var me = this, - el = me.el, - val; - if(colorRE.test(attr)){ - while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){ - el = el.parentNode; - val = "fff"; - } - }else{ - val = superclass.getAttr.call(me, attr); - } - return val; - }, - - doMethod : function(attr, start, end) { - var me = this, - val, - floor = Math.floor, - i, - len, - v; - - if(colorRE.test(attr)){ - val = []; - - for(i = 0, len = start.length; i < len; i++) { - v = start[i]; - val[i] = superclass.doMethod.call(me, attr, v, end[i]); - } - val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')'; - }else{ - val = superclass.doMethod.call(me, attr, start, end); - } - return val; - }, - - setRunAttr : function(attr) { - var me = this, - a = me.attributes[attr], - to = a.to, - by = a.by, - ra; - - superclass.setRunAttr.call(me, attr); - ra = me.runAttrs[attr]; - if(colorRE.test(attr)){ - var start = parseColor(ra.start), - end = parseColor(ra.end); - - if(!isset(to) && isset(by)){ - end = parseColor(by); - for(var i=0,len=start.length; i= 0){ + s = v.substr(0, t).toLowerCase(); + if(v.charAt(t + 1) == ' '){ + ++t; + } + headerObj[s] = v.substr(t + 1); + } + }); + } catch(e) {} + + return { + tId : o.tId, + // Normalize the status and statusText when IE returns 1223, see the above link. + status : isBrokenStatus ? 204 : conn.status, + statusText : isBrokenStatus ? 'No Content' : conn.statusText, + getResponseHeader : function(header){return headerObj[header.toLowerCase()];}, + getAllResponseHeaders : function(){return headerStr;}, + responseText : conn.responseText, + responseXML : conn.responseXML, + argument : callbackArg + }; + } + + // private + function releaseObject(o) { + if (o.tId) { + pub.conn[o.tId] = null; + } + o.conn = null; + o = null; + } + + // private + function handleTransactionResponse(o, callback, isAbort, isTimeout) { + if (!callback) { + 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) || (Ext.isIE && httpStatus == 1223)) { + responseObject = 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 = createExceptionObject(o.tId, callback.argument, (isAbort ? isAbort : false), isTimeout); + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + break; + default: + responseObject = createResponseObject(o, callback.argument); + if (callback.failure) { + if (!callback.scope) { + callback.failure(responseObject); + } + else { + callback.failure.apply(callback.scope, [responseObject]); + } + } + } + } + + releaseObject(o); + responseObject = null; + } + + function checkResponse(o, callback, conn, tId, poll, cbTimeout){ + if (conn && conn.readyState == 4) { + clearInterval(poll[tId]); + poll[tId] = null; + + if (cbTimeout) { + clearTimeout(pub.timeout[tId]); + pub.timeout[tId] = null; + } + handleTransactionResponse(o, callback); + } + } + + function checkTimeout(o, callback){ + pub.abort(o, callback, true); + } + + + // private + function handleReadyState(o, callback){ + callback = callback || {}; + var conn = o.conn, + tId = o.tId, + poll = pub.poll, + cbTimeout = callback.timeout || null; + + if (cbTimeout) { + pub.conn[tId] = conn; + pub.timeout[tId] = setTimeout(checkTimeout.createCallback(o, callback), cbTimeout); + } + poll[tId] = setInterval(checkResponse.createCallback(o, callback, conn, tId, poll, cbTimeout), pub.pollInterval); + } + + // private + function asyncRequest(method, uri, callback, postData) { + var o = getConnectionObject() || null; + + if (o) { + o.conn.open(method, uri, true); + + if (pub.useDefaultXhrHeader) { + initHeader('X-Requested-With', pub.defaultXhrHeader); + } + + if(postData && pub.useDefaultHeader && (!pub.headers || !pub.headers[CONTENTTYPE])){ + initHeader(CONTENTTYPE, pub.defaultPostHeader); + } + + if (pub.defaultHeaders || pub.headers) { + setHeader(o); + } + + handleReadyState(o, callback); + o.conn.send(postData || null); + } + return o; + } + + // private + function getConnectionObject() { + var o; + + try { + if (o = createXhrObject(pub.transactionId)) { + pub.transactionId++; + } + } catch(e) { + } finally { + return o; + } + } + + // private + function createXhrObject(transactionId) { + var http; + + try { + http = new XMLHttpRequest(); + } catch(e) { + for (var i = Ext.isIE6 ? 1 : 0; i < activeX.length; ++i) { + try { + http = new ActiveXObject(activeX[i]); + break; + } catch(e) {} + } + } finally { + return {conn : http, tId : transactionId}; + } + } + + var pub = { + request : function(method, uri, cb, data, options) { + if(options){ + var me = this, + xmlData = options.xmlData, + jsonData = options.jsonData, + hs; + + Ext.applyIf(me, options); + + if(xmlData || jsonData){ + hs = me.headers; + if(!hs || !hs[CONTENTTYPE]){ + initHeader(CONTENTTYPE, xmlData ? 'text/xml' : 'application/json'); + } + data = xmlData || (!Ext.isPrimitive(jsonData) ? Ext.encode(jsonData) : jsonData); + } + } + return asyncRequest(method || options.method || "POST", uri, cb, data); + }, + + serializeForm : function(form) { + var fElements = form.elements || (document.forms[form] || Ext.getDom(form)).elements, + hasSubmit = false, + encoder = encodeURIComponent, + name, + data = '', + type, + hasValue; + + Ext.each(fElements, function(element){ + name = element.name; + type = element.type; + + if (!element.disabled && name) { + if (/select-(one|multiple)/i.test(type)) { + Ext.each(element.options, function(opt){ + if (opt.selected) { + hasValue = opt.hasAttribute ? opt.hasAttribute('value') : opt.getAttributeNode('value').specified; + data += String.format("{0}={1}&", encoder(name), encoder(hasValue ? opt.value : opt.text)); + } + }); + } else if (!(/file|undefined|reset|button/i.test(type))) { + if (!(/radio|checkbox/i.test(type) && !element.checked) && !(type == 'submit' && hasSubmit)) { + data += encoder(name) + '=' + encoder(element.value) + '&'; + hasSubmit = /submit/i.test(type); + } + } + } + }); + return data.substr(0, data.length - 1); + }, + + useDefaultHeader : true, + defaultPostHeader : 'application/x-www-form-urlencoded; charset=UTF-8', + useDefaultXhrHeader : true, + defaultXhrHeader : 'XMLHttpRequest', + poll : {}, + timeout : {}, + conn: {}, + pollInterval : 50, + transactionId : 0, + +// This is never called - Is it worth exposing this? +// setProgId : function(id) { +// activeX.unshift(id); +// }, + +// This is never called - Is it worth exposing this? +// setDefaultPostHeader : function(b) { +// this.useDefaultHeader = b; +// }, + +// This is never called - Is it worth exposing this? +// setDefaultXhrHeader : function(b) { +// this.useDefaultXhrHeader = b; +// }, + +// This is never called - Is it worth exposing this? +// setPollingInterval : function(i) { +// if (typeof i == 'number' && isFinite(i)) { +// this.pollInterval = i; +// } +// }, + +// This is never called - Is it worth exposing this? +// resetDefaultHeaders : function() { +// this.defaultHeaders = null; +// }, + + abort : function(o, callback, isTimeout) { + var me = this, + tId = o.tId, + isAbort = false; + + if (me.isCallInProgress(o)) { + o.conn.abort(); + clearInterval(me.poll[tId]); + me.poll[tId] = null; + clearTimeout(pub.timeout[tId]); + me.timeout[tId] = null; + + handleTransactionResponse(o, callback, (isAbort = true), isTimeout); + } + return isAbort; + }, + + isCallInProgress : function(o) { + // if there is a connection and readyState is not 0 or 4 + return o.conn && !{0:true,4:true}[o.conn.readyState]; + } + }; + return pub; +}();(function(){ + var EXTLIB = Ext.lib, + 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, + isset = function(v){ + return typeof v !== 'undefined'; + }, + now = function(){ + return new Date(); + }; + + EXTLIB.Anim = { + motion : function(el, args, duration, easing, cb, scope) { + return this.run(el, args, duration, easing, cb, scope, Ext.lib.Motion); + }, + + 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() { + if(Ext.isFunction(cb)){ + cb.call(scope); + } + }); + return anim; + } + }; + + EXTLIB.AnimBase = function(el, attributes, duration, method) { + if (el) { + this.init(el, attributes, duration, method); + } + }; + + EXTLIB.AnimBase.prototype = { + doMethod: function(attr, start, end) { + var me = this; + return me.method(me.curFrame, start, end - start, me.totalFrames); + }, + + + setAttr: function(attr, val, unit) { + if (noNegatives.test(attr) && val < 0) { + val = 0; + } + Ext.fly(this.el, '_anim').setStyle(attr, val + unit); + }, + + + getAttr: function(attr) { + var el = Ext.fly(this.el), + val = el.getStyle(attr), + a = offsetAttribute.exec(attr) || []; + + if (val !== 'auto' && !offsetUnit.test(val)) { + return parseFloat(val); + } + + return (!!(a[2]) || (el.getStyle('position') == 'absolute' && !!(a[3]))) ? el.dom['offset' + a[0].charAt(0).toUpperCase() + a[0].substr(1)] : 0; + }, + + + getDefaultUnit: function(attr) { + return defaultUnit.test(attr) ? 'px' : ''; + }, + + animateX : function(callback, scope) { + var me = this, + f = function() { + me.onComplete.removeListener(f); + if (Ext.isFunction(callback)) { + callback.call(scope || me, me); + } + }; + me.onComplete.addListener(f, me); + me.animate(); + }, + + + setRunAttr: function(attr) { + var me = this, + a = this.attributes[attr], + to = a.to, + by = a.by, + from = a.from, + unit = a.unit, + ra = (this.runAttrs[attr] = {}), + end; + + if (!isset(to) && !isset(by)){ + return false; + } + + var start = isset(from) ? from : me.getAttr(attr); + if (isset(to)) { + end = to; + }else if(isset(by)) { + if (Ext.isArray(start)){ + end = []; + for(var i=0,len=start.length; i 0 && isFinite(tweak)){ + if(tween.curFrame + tweak >= frames){ + tweak = frames - (frame + 1); + } + tween.curFrame += tweak; + } + }; + }; + + EXTLIB.Bezier = new function() { + + this.getPosition = function(points, t) { + var n = points.length, + tmp = [], + c = 1 - t, + i, + j; + + for (i = 0; i < n; ++i) { + tmp[i] = [points[i][0], points[i][1]]; + } + + for (j = 1; j < n; ++j) { + for (i = 0; i < n - j; ++i) { + tmp[i][0] = c * tmp[i][0] + t * tmp[parseInt(i + 1, 10)][0]; + tmp[i][1] = c * tmp[i][1] + t * tmp[parseInt(i + 1, 10)][1]; + } + } + + return [ tmp[0][0], tmp[0][1] ]; + + }; + }; + + + EXTLIB.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; + } + }; + + (function() { + EXTLIB.Motion = function(el, attributes, duration, method) { + if (el) { + EXTLIB.Motion.superclass.constructor.call(this, el, attributes, duration, method); + } + }; + + Ext.extend(EXTLIB.Motion, Ext.lib.AnimBase); + + var superclass = EXTLIB.Motion.superclass, + pointsRe = /^points$/i; + + Ext.apply(EXTLIB.Motion.prototype, { + setAttr: function(attr, val, unit){ + var me = this, + setAttr = superclass.setAttr; + + if (pointsRe.test(attr)) { + unit = unit || 'px'; + setAttr.call(me, 'left', val[0], unit); + setAttr.call(me, 'top', val[1], unit); + } else { + setAttr.call(me, attr, val, unit); + } + }, + + getAttr: function(attr){ + var me = this, + getAttr = superclass.getAttr; + + return pointsRe.test(attr) ? [getAttr.call(me, 'left'), getAttr.call(me, 'top')] : getAttr.call(me, attr); + }, + + doMethod: function(attr, start, end){ + var me = this; + + return pointsRe.test(attr) + ? EXTLIB.Bezier.getPosition(me.runAttrs[attr], me.method(me.curFrame, 0, 100, me.totalFrames) / 100) + : superclass.doMethod.call(me, attr, start, end); + }, + + setRunAttr: function(attr){ + if(pointsRe.test(attr)){ + + var me = this, + el = this.el, + points = this.attributes.points, + control = points.control || [], + from = points.from, + to = points.to, + by = points.by, + DOM = EXTLIB.Dom, + start, + i, + end, + len, + ra; + + + 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(); + DOM.setXY(el, isset(from) ? from : DOM.getXY(el)); + start = me.getAttr('points'); + + + if(isset(to)){ + end = translateValues.call(me, to, start); + for (i = 0,len = control.length; i < len; ++i) { + control[i] = translateValues.call(me, control[i], start); + } + } else if (isset(by)) { + end = [start[0] + by[0], start[1] + by[1]]; + + for (i = 0,len = control.length; i < len; ++i) { + control[i] = [ start[0] + control[i][0], start[1] + control[i][1] ]; + } + } + + ra = this.runAttrs[attr] = [start]; + if (control.length > 0) { + ra = ra.concat(control); + } + + ra[ra.length] = end; + }else{ + superclass.setRunAttr.call(this, attr); + } + } + }); + + var translateValues = function(val, start) { + var pageXY = EXTLIB.Dom.getXY(this.el); + return [val[0] - pageXY[0] + start[0], val[1] - pageXY[1] + start[1]]; + }; + })(); +})();// Easing functions +(function(){ + // shortcuts to aid compression + var abs = Math.abs, + pi = Math.PI, + asin = Math.asin, + pow = Math.pow, + sin = Math.sin, + EXTLIB = Ext.lib; + + Ext.apply(EXTLIB.Easing, { + + easeBoth: function (t, b, c, d) { + return ((t /= d / 2) < 1) ? c / 2 * t * t + b : -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) { + return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t + b : -c / 2 * ((t -= 2) * t * t * t - 2) + b; + }, + + elasticIn: function (t, b, c, d, a, p) { + if (t == 0 || (t /= d) == 1) { + return t == 0 ? b : b + c; + } + p = p || (d * .3); + + var s; + if (a >= abs(c)) { + s = p / (2 * pi) * asin(c / a); + } else { + a = c; + s = p / 4; + } + + return -(a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b; + + }, + + elasticOut: function (t, b, c, d, a, p) { + if (t == 0 || (t /= d) == 1) { + return t == 0 ? b : b + c; + } + p = p || (d * .3); + + var s; + if (a >= abs(c)) { + s = p / (2 * pi) * asin(c / a); + } else { + a = c; + s = p / 4; + } + + return a * pow(2, -10 * t) * sin((t * d - s) * (2 * pi) / p) + c + b; + }, + + elasticBoth: function (t, b, c, d, a, p) { + if (t == 0 || (t /= d / 2) == 2) { + return t == 0 ? b : b + c; + } + + p = p || (d * (.3 * 1.5)); + + var s; + if (a >= abs(c)) { + s = p / (2 * pi) * asin(c / a); + } else { + a = c; + s = p / 4; + } + + return t < 1 ? + -.5 * (a * pow(2, 10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p)) + b : + a * pow(2, -10 * (t -= 1)) * sin((t * d - s) * (2 * pi) / p) * .5 + c + b; + }, + + backIn: function (t, b, c, d, s) { + s = s || 1.70158; + return c * (t /= d) * t * ((s + 1) * t - s) + b; + }, + + + backOut: function (t, b, c, d, s) { + if (!s) { + s = 1.70158; + } + return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b; + }, + + + backBoth: function (t, b, c, d, s) { + s = s || 1.70158; + + return ((t /= d / 2 ) < 1) ? + c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : + c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b; + }, + + + bounceIn: function (t, b, c, d) { + return c - EXTLIB.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) { + return (t < d / 2) ? + EXTLIB.Easing.bounceIn(t * 2, 0, c, d) * .5 + b : + EXTLIB.Easing.bounceOut(t * 2 - d, 0, c, d) * .5 + c * .5 + b; + } + }); +})(); + +(function() { + var EXTLIB = Ext.lib; + // Color Animation + EXTLIB.Anim.color = function(el, args, duration, easing, cb, scope) { + return EXTLIB.Anim.run(el, args, duration, easing, cb, scope, EXTLIB.ColorAnim); + }; + + EXTLIB.ColorAnim = function(el, attributes, duration, method) { + EXTLIB.ColorAnim.superclass.constructor.call(this, el, attributes, duration, method); + }; + + Ext.extend(EXTLIB.ColorAnim, EXTLIB.AnimBase); + + var superclass = EXTLIB.ColorAnim.superclass, + colorRE = /color$/i, + transparentRE = /^transparent|rgba\(0, 0, 0, 0\)$/, + rgbRE = /^rgb\(([0-9]+)\s*,\s*([0-9]+)\s*,\s*([0-9]+)\)$/i, + hexRE= /^#?([0-9A-F]{2})([0-9A-F]{2})([0-9A-F]{2})$/i, + hex3RE = /^#?([0-9A-F]{1})([0-9A-F]{1})([0-9A-F]{1})$/i, + isset = function(v){ + return typeof v !== 'undefined'; + }; + + // private + function parseColor(s) { + var pi = parseInt, + base, + out = null, + c; + + if (s.length == 3) { + return s; + } + + Ext.each([hexRE, rgbRE, hex3RE], function(re, idx){ + base = (idx % 2 == 0) ? 16 : 10; + c = re.exec(s); + if(c && c.length == 4){ + out = [pi(c[1], base), pi(c[2], base), pi(c[3], base)]; + return false; + } + }); + return out; + } + + Ext.apply(EXTLIB.ColorAnim.prototype, { + getAttr : function(attr) { + var me = this, + el = me.el, + val; + if(colorRE.test(attr)){ + while(el && transparentRE.test(val = Ext.fly(el).getStyle(attr))){ + el = el.parentNode; + val = "fff"; + } + }else{ + val = superclass.getAttr.call(me, attr); + } + return val; + }, + + doMethod : function(attr, start, end) { + var me = this, + val, + floor = Math.floor, + i, + len, + v; + + if(colorRE.test(attr)){ + val = []; + end = end || []; + + for(i = 0, len = start.length; i < len; i++) { + v = start[i]; + val[i] = superclass.doMethod.call(me, attr, v, end[i]); + } + val = 'rgb(' + floor(val[0]) + ',' + floor(val[1]) + ',' + floor(val[2]) + ')'; + }else{ + val = superclass.doMethod.call(me, attr, start, end); + } + return val; + }, + + setRunAttr : function(attr) { + var me = this, + a = me.attributes[attr], + to = a.to, + by = a.by, + ra; + + superclass.setRunAttr.call(me, attr); + ra = me.runAttrs[attr]; + if(colorRE.test(attr)){ + var start = parseColor(ra.start), + end = parseColor(ra.end); + + if(!isset(to) && isset(by)){ + end = parseColor(by); + for(var i=0,len=start.length; i0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c
    '),g=h.child("div",true);var e=g.offsetWidth;h.setStyle("overflow",(Ext.isWebKit||Ext.isGecko)?"auto":"scroll");var d=g.offsetWidth;h.remove();b=e-d+2}return b},combine:function(){var f=arguments,e=f.length,h=[];for(var g=0;gg?1:-1};Ext.each(d,function(g){f=e(f,g)==1?f:g});return f},mean:function(d){return d.length>0?Ext.sum(d)/d.length:undefined},sum:function(d){var e=0;Ext.each(d,function(f){e+=f});return e},partition:function(d,e){var f=[[],[]];Ext.each(d,function(h,j,g){f[(e&&e(h,j,g))||(!e&&h)?0:1].push(h)});return f},invoke:function(d,e){var g=[],f=Array.prototype.slice.call(arguments,2);Ext.each(d,function(h,j){if(h&&Ext.isFunction(h[e])){g.push(h[e].apply(h,f))}else{g.push(undefined)}});return g},pluck:function(d,f){var e=[];Ext.each(d,function(g){e.push(g[f])});return e},zip:function(){var m=Ext.partition(arguments,function(i){return !Ext.isFunction(i)}),h=m[0],l=m[1][0],d=Ext.max(Ext.pluck(h,"length")),g=[];for(var k=0;k0){for(var p=0;p0);if(!C){C=true;for(K=0,H=p.length;K=0){u=s.substr(0,q).toLowerCase();if(s.charAt(q+1)==" "){++q}r[u]=s.substr(q+1)}})}catch(y){}return{tId:z.tId,status:w.status,statusText:w.statusText,getResponseHeader:function(s){return r[s.toLowerCase()]},getAllResponseHeaders:function(){return v},responseText:w.responseText,responseXML:w.responseXML,argument:x}}function n(q){q.conn=null;q=null}function f(v,w,r,q){if(!w){n(v);return}var t,s;try{if(v.conn.status!==undefined&&v.conn.status!=0){t=v.conn.status}else{t=13030}}catch(u){t=13030}if((t>=200&&t<300)||(Ext.isIE&&t==1223)){s=o(v,w.argument);if(w.success){if(!w.scope){w.success(s)}else{w.success.apply(w.scope,[s])}}}else{switch(t){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:s=e(v.tId,w.argument,(r?r:false),q);if(w.failure){if(!w.scope){w.failure(s)}else{w.failure.apply(w.scope,[s])}}break;default:s=o(v,w.argument);if(w.failure){if(!w.scope){w.failure(s)}else{w.failure.apply(w.scope,[s])}}}}n(v);s=null}function m(s,v){v=v||{};var q=s.conn,u=s.tId,r=k.poll,t=v.timeout||null;if(t){k.timeout[u]=setTimeout(function(){k.abort(s,v,true)},t)}r[u]=setInterval(function(){if(q&&q.readyState==4){clearInterval(r[u]);r[u]=null;if(t){clearTimeout(k.timeout[u]);k.timeout[u]=null}f(s,v)}},k.pollInterval)}function i(u,r,t,q){var s=l()||null;if(s){s.conn.open(u,r,true);if(k.useDefaultXhrHeader){j("X-Requested-With",k.defaultXhrHeader)}if(q&&k.useDefaultHeader&&(!k.headers||!k.headers[d])){j(d,k.defaultPostHeader)}if(k.defaultHeaders||k.headers){h(s)}m(s,t);s.conn.send(q||null)}return s}function l(){var r;try{if(r=p(k.transactionId)){k.transactionId++}}catch(q){}finally{return r}}function p(t){var q;try{q=new XMLHttpRequest()}catch(s){for(var r=0;r=d.left&&e.right<=d.right&&e.top>=d.top&&e.bottom<=d.bottom)},getArea:function(){var d=this;return((d.bottom-d.top)*(d.right-d.left))},intersect:function(i){var h=this,f=Math.max(h.top,i.top),g=Math.min(h.right,i.right),d=Math.min(h.bottom,i.bottom),e=Math.max(h.left,i.left);if(d>=f&&g>=e){return new Ext.lib.Region(f,g,d,e)}},union:function(i){var h=this,f=Math.min(h.top,i.top),g=Math.max(h.right,i.right),d=Math.max(h.bottom,i.bottom),e=Math.min(h.left,i.left);return new Ext.lib.Region(f,g,d,e)},constrainTo:function(e){var d=this;d.top=d.top.constrain(e.top,e.bottom);d.bottom=d.bottom.constrain(e.top,e.bottom);d.left=d.left.constrain(e.left,e.right);d.right=d.right.constrain(e.left,e.right);return d},adjust:function(f,e,d,h){var g=this;g.top+=f;g.left+=e;g.right+=h;g.bottom+=d;return g}};Ext.lib.Region.getRegion=function(g){var i=Ext.lib.Dom.getXY(g),f=i[1],h=i[0]+g.offsetWidth,d=i[1]+g.offsetHeight,e=i[0];return new Ext.lib.Region(f,h,d,e)};Ext.lib.Point=function(d,f){if(Ext.isArray(d)){f=d[1];d=d[0]}var e=this;e.x=e.right=e.left=e[0]=d;e.y=e.top=e.bottom=e[1]=f};Ext.lib.Point.prototype=new Ext.lib.Region();(function(){var g=Ext.lib,i=/width|height|opacity|padding/i,f=/^((width|height)|(top|left))$/,d=/width|height|top$|bottom$|left$|right$/i,h=/\d+(em|%|en|ex|pt|in|cm|mm|pc)$/i,j=function(k){return typeof k!=="undefined"},e=function(){return new Date()};g.Anim={motion:function(n,l,o,p,k,m){return this.run(n,l,o,p,k,m,Ext.lib.Motion)},run:function(o,l,q,r,k,n,m){m=m||Ext.lib.AnimBase;if(typeof r=="string"){r=Ext.lib.Easing[r]}var p=new m(o,l,q,r);p.animateX(function(){if(Ext.isFunction(k)){k.call(n)}});return p}};g.AnimBase=function(l,k,m,n){if(l){this.init(l,k,m,n)}};g.AnimBase.prototype={doMethod:function(k,n,l){var m=this;return m.method(m.curFrame,n,l-n,m.totalFrames)},setAttr:function(k,m,l){if(i.test(k)&&m<0){m=0}Ext.fly(this.el,"_anim").setStyle(k,m+l)},getAttr:function(k){var m=Ext.fly(this.el),n=m.getStyle(k),l=f.exec(k)||[];if(n!=="auto"&&!h.test(n)){return parseFloat(n)}return(!!(l[2])||(m.getStyle("position")=="absolute"&&!!(l[3])))?m.dom["offset"+l[0].charAt(0).toUpperCase()+l[0].substr(1)]:0},getDefaultUnit:function(k){return d.test(k)?"px":""},animateX:function(n,k){var l=this,m=function(){l.onComplete.removeListener(m);if(Ext.isFunction(n)){n.call(k||l,l)}};l.onComplete.addListener(m,l);l.animate()},setRunAttr:function(p){var r=this,s=this.attributes[p],t=s.to,q=s.by,u=s.from,v=s.unit,l=(this.runAttrs[p]={}),m;if(!j(t)&&!j(q)){return false}var k=j(u)?u:r.getAttr(p);if(j(t)){m=t}else{if(j(q)){if(Ext.isArray(k)){m=[];for(var n=0,o=k.length;n0&&isFinite(w)){if(r.curFrame+w>=v){w=v-(u+1)}r.curFrame+=w}}};g.Bezier=new function(){this.getPosition=function(p,o){var r=p.length,m=[],q=1-o,l,k;for(l=0;l0&&!Ext.isArray(t[0])){t=[t]}else{}Ext.fly(q,"_anim").position();B.setXY(q,j(y)?y:B.getXY(q));p=x.getAttr("points");if(j(z)){r=k.call(x,z,p);for(s=0,u=t.length;s0){o=o.concat(t)}o[o.length]=r}else{n.setRunAttr.call(this,v)}}});var k=function(o,q){var p=g.Dom.getXY(this.el);return[o[0]-p[0]+q[0],o[1]-p[1]+q[1]]}})()})();(function(){var d=Math.abs,i=Math.PI,h=Math.asin,g=Math.pow,e=Math.sin,f=Ext.lib;Ext.apply(f.Easing,{easeBoth:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k+j:-m/2*((--k)*(k-2)-1)+j},easeInStrong:function(k,j,m,l){return m*(k/=l)*k*k*k+j},easeOutStrong:function(k,j,m,l){return -m*((k=k/l-1)*k*k*k-1)+j},easeBothStrong:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k*k*k+j:-m/2*((k-=2)*k*k*k-2)+j},elasticIn:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return -(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j},elasticOut:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return k*g(2,-10*l)*e((l*o-m)*(2*i)/n)+q+j},elasticBoth:function(l,j,q,o,k,n){if(l==0||(l/=o/2)==2){return l==0?j:j+q}n=n||(o*(0.3*1.5));var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return l<1?-0.5*(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j:k*g(2,-10*(l-=1))*e((l*o-m)*(2*i)/n)*0.5+q+j},backIn:function(k,j,n,m,l){l=l||1.70158;return n*(k/=m)*k*((l+1)*k-l)+j},backOut:function(k,j,n,m,l){if(!l){l=1.70158}return n*((k=k/m-1)*k*((l+1)*k+l)+1)+j},backBoth:function(k,j,n,m,l){l=l||1.70158;return((k/=m/2)<1)?n/2*(k*k*(((l*=(1.525))+1)*k-l))+j:n/2*((k-=2)*k*(((l*=(1.525))+1)*k+l)+2)+j},bounceIn:function(k,j,m,l){return m-f.Easing.bounceOut(l-k,0,m,l)+j},bounceOut:function(k,j,m,l){if((k/=l)<(1/2.75)){return m*(7.5625*k*k)+j}else{if(k<(2/2.75)){return m*(7.5625*(k-=(1.5/2.75))*k+0.75)+j}else{if(k<(2.5/2.75)){return m*(7.5625*(k-=(2.25/2.75))*k+0.9375)+j}}}return m*(7.5625*(k-=(2.625/2.75))*k+0.984375)+j},bounceBoth:function(k,j,m,l){return(k0){return setTimeout(d,c)}d();return 0}});Ext.applyIf(String,{format:function(b){var a=Ext.toArray(arguments,1);return b.replace(/\{(\d+)\}/g,function(c,d){return a[d]})}});Ext.applyIf(Array.prototype,{indexOf:function(b,c){var a=this.length;c=c||0;c+=(c<0)?a:0;for(;c0){for(var p=0;p0);if(!A){A=true;for(I=0;I=0){B=s.substr(0,A).toLowerCase();if(s.charAt(A+1)==" "){++A}C[B]=s.substr(A+1)}})}catch(z){}return{tId:u.tId,status:v?204:w.status,statusText:v?"No Content":w.statusText,getResponseHeader:function(s){return C[s.toLowerCase()]},getAllResponseHeaders:function(){return x},responseText:w.responseText,responseXML:w.responseXML,argument:y}}function o(s){if(s.tId){k.conn[s.tId]=null}s.conn=null;s=null}function f(x,y,t,s){if(!y){o(x);return}var v,u;try{if(x.conn.status!==undefined&&x.conn.status!=0){v=x.conn.status}else{v=13030}}catch(w){v=13030}if((v>=200&&v<300)||(Ext.isIE&&v==1223)){u=p(x,y.argument);if(y.success){if(!y.scope){y.success(u)}else{y.success.apply(y.scope,[u])}}}else{switch(v){case 12002:case 12029:case 12030:case 12031:case 12152:case 13030:u=e(x.tId,y.argument,(t?t:false),s);if(y.failure){if(!y.scope){y.failure(u)}else{y.failure.apply(y.scope,[u])}}break;default:u=p(x,y.argument);if(y.failure){if(!y.scope){y.failure(u)}else{y.failure.apply(y.scope,[u])}}}}o(x);u=null}function m(u,x,s,w,t,v){if(s&&s.readyState==4){clearInterval(t[w]);t[w]=null;if(v){clearTimeout(k.timeout[w]);k.timeout[w]=null}f(u,x)}}function r(s,t){k.abort(s,t,true)}function n(u,x){x=x||{};var s=u.conn,w=u.tId,t=k.poll,v=x.timeout||null;if(v){k.conn[w]=s;k.timeout[w]=setTimeout(r.createCallback(u,x),v)}t[w]=setInterval(m.createCallback(u,x,s,w,t,v),k.pollInterval)}function i(w,t,v,s){var u=l()||null;if(u){u.conn.open(w,t,true);if(k.useDefaultXhrHeader){j("X-Requested-With",k.defaultXhrHeader)}if(s&&k.useDefaultHeader&&(!k.headers||!k.headers[d])){j(d,k.defaultPostHeader)}if(k.defaultHeaders||k.headers){h(u)}n(u,v);u.conn.send(s||null)}return u}function l(){var t;try{if(t=q(k.transactionId)){k.transactionId++}}catch(s){}finally{return t}}function q(v){var s;try{s=new XMLHttpRequest()}catch(u){for(var t=Ext.isIE6?1:0;t0&&isFinite(w)){if(r.curFrame+w>=v){w=v-(u+1)}r.curFrame+=w}}};g.Bezier=new function(){this.getPosition=function(p,o){var r=p.length,m=[],q=1-o,l,k;for(l=0;l0&&!Ext.isArray(s[0])){s=[s]}else{}Ext.fly(p,"_anim").position();A.setXY(p,j(x)?x:A.getXY(p));o=w.getAttr("points");if(j(y)){q=k.call(w,y,o);for(r=0,t=s.length;r0){n=n.concat(s)}n[n.length]=q}else{m.setRunAttr.call(this,u)}}});var k=function(n,p){var o=g.Dom.getXY(this.el);return[n[0]-o[0]+p[0],n[1]-o[1]+p[1]]}})()})();(function(){var d=Math.abs,i=Math.PI,h=Math.asin,g=Math.pow,e=Math.sin,f=Ext.lib;Ext.apply(f.Easing,{easeBoth:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k+j:-m/2*((--k)*(k-2)-1)+j},easeInStrong:function(k,j,m,l){return m*(k/=l)*k*k*k+j},easeOutStrong:function(k,j,m,l){return -m*((k=k/l-1)*k*k*k-1)+j},easeBothStrong:function(k,j,m,l){return((k/=l/2)<1)?m/2*k*k*k*k+j:-m/2*((k-=2)*k*k*k-2)+j},elasticIn:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return -(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j},elasticOut:function(l,j,q,o,k,n){if(l==0||(l/=o)==1){return l==0?j:j+q}n=n||(o*0.3);var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return k*g(2,-10*l)*e((l*o-m)*(2*i)/n)+q+j},elasticBoth:function(l,j,q,o,k,n){if(l==0||(l/=o/2)==2){return l==0?j:j+q}n=n||(o*(0.3*1.5));var m;if(k>=d(q)){m=n/(2*i)*h(q/k)}else{k=q;m=n/4}return l<1?-0.5*(k*g(2,10*(l-=1))*e((l*o-m)*(2*i)/n))+j:k*g(2,-10*(l-=1))*e((l*o-m)*(2*i)/n)*0.5+q+j},backIn:function(k,j,n,m,l){l=l||1.70158;return n*(k/=m)*k*((l+1)*k-l)+j},backOut:function(k,j,n,m,l){if(!l){l=1.70158}return n*((k=k/m-1)*k*((l+1)*k+l)+1)+j},backBoth:function(k,j,n,m,l){l=l||1.70158;return((k/=m/2)<1)?n/2*(k*k*(((l*=(1.525))+1)*k-l))+j:n/2*((k-=2)*k*(((l*=(1.525))+1)*k+l)+2)+j},bounceIn:function(k,j,m,l){return m-f.Easing.bounceOut(l-k,0,m,l)+j},bounceOut:function(k,j,m,l){if((k/=l)<(1/2.75)){return m*(7.5625*k*k)+j}else{if(k<(2/2.75)){return m*(7.5625*(k-=(1.5/2.75))*k+0.75)+j}else{if(k<(2.5/2.75)){return m*(7.5625*(k-=(2.25/2.75))*k+0.9375)+j}}}return m*(7.5625*(k-=(2.625/2.75))*k+0.984375)+j},bounceBoth:function(k,j,m,l){return(k'); } - -// this.statusEl = td.createChild({ -// cls: 'x-status-text ' + (this.iconCls || this.defaultIconCls || ''), -// html: this.text || this.defaultText || '' -// }); -// this.statusEl.unselectable(); - -// this.spacerEl = td.insertSibling({ -// tag: 'td', -// style: 'width:100%', -// cn: [{cls:'ytb-spacer'}] -// }, right ? 'before' : 'after'); + this.doLayout(); }, /** diff --git a/deluge/ui/web/themes/css/xtheme-access.css b/deluge/ui/web/themes/css/xtheme-access.css index 04923eeee..09f92dd6a 100644 --- a/deluge/ui/web/themes/css/xtheme-access.css +++ b/deluge/ui/web/themes/css/xtheme-access.css @@ -1,83 +1,83 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ -body { - background-color:#16181a; - color:#fcfcfc; -} - -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#223; - background-color:#3f4757; - background-image:url(../images/access/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #232d38; - border-color:#556; - color:#fff; - font:normal 14px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#232d38; - background-image:url(../images/access/grid/loading.gif); -} - -.x-item-disabled { - color: #ddd; -} - -.x-item-disabled * { - color: #ddd !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 14px; - background-image: url(../images/access/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; +body { + background-color:#16181a; + color:#fcfcfc; +} + +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#223; + background-color:#3f4757; + background-image:url(../images/access/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #232d38; + border-color:#556; + color:#fff; + font:normal 14px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#232d38; + background-image:url(../images/access/grid/loading.gif); +} + +.x-item-disabled { + color: #ddd; +} + +.x-item-disabled * { + color: #ddd !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 14px; + background-image: url(../images/access/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; }.x-tab-panel-header, .x-tab-panel-footer { background-color:#e18325; border-color:#8db2e3; @@ -203,6 +203,10 @@ ul.x-tab-strip-bottom{ border-width:2px; } +.ext-webkit .x-form-text, .ext-webkit textarea.x-form-field{ + border-width:2px; +} + .x-form-text, .ext-ie .x-form-file { height:26px; } @@ -242,7 +246,7 @@ ul.x-tab-strip-bottom{ } .x-small-editor .x-form-field-wrap .x-form-trigger { - height:20px; + height:24px; } .x-form-field-wrap .x-form-trigger-over { @@ -293,16 +297,19 @@ ul.x-tab-strip-bottom{ border-color:#ff9c33; } -.x-form-invalid, textarea.x-form-invalid{ +.x-form-invalid, textarea.x-form-invalid, +.ext-webkit .x-form-invalid, .ext-webkit textarea.x-form-invalid{ background-color:#15171a; background-image:url(../images/access/grid/invalid_line.gif); border-color:#c30; } +/* .ext-safari .x-form-invalid{ background-color:#fee; border-color:#ff7870; } +*/ .x-form-inner-invalid, textarea.x-form-inner-invalid{ background-color:#fff; @@ -328,7 +335,7 @@ ul.x-tab-strip-bottom{ } .x-small-editor .x-form-text { - height: 22px; + height: 26px; } .x-small-editor .x-form-field { @@ -352,754 +359,754 @@ ul.x-tab-strip-bottom{ .x-fieldset legend { font:bold 14px tahoma, arial, helvetica, sans-serif; - color:fff; + color:#fff; +} +.x-btn { + font:normal 14px tahoma, verdana, helvetica; +} + +.x-btn button { + font:normal 14px arial,tahoma,verdana,helvetica; + color:#fffffa; + padding-left:6px !important; + padding-right:6px !important; +} + +.x-btn-over .x-btn button{ + color:#fff; +} + +.x-btn-noicon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-left .x-btn-text, +.x-btn-icon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-right .x-btn-text { + height:18px; +} + +.x-btn-icon .x-btn-small .x-btn-text { + width:18px; +} + +.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { + padding-left:21px !important; +} + +.x-btn-text-icon .x-btn-icon-small-right .x-btn-text { + padding-right:21px !important; +} + +.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text { + padding-left:29px !important; +} + +.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text { + padding-right:29px !important; +} + +.x-btn-text-icon .x-btn-icon-large-left .x-btn-text { + padding-left:37px !important; +} + +.x-btn-text-icon .x-btn-icon-large-right .x-btn-text { + padding-right:37px !important; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/access/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#fff; +} + +.x-btn-disabled *{ + color:#eee !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/access/button/arrow.gif); + padding-right:13px; +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/access/button/s-arrow.gif); + padding-right:20px; +} + +.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/access/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/access/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #d2d2d2; +} + +.x-btn-group-tc { + background-image: url(../images/access/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/access/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/access/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/access/button/group-lr.gif); +} + +.x-btn-group-mr { + background-image: url(../images/access/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/access/button/group-tb.gif); +} +.x-toolbar{ + border-color:#18181a; + background-color:#393d4e; + background-image:url(../images/access/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 14px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/access/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/access/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/access/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/access/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/access/grid/grid-blue-split.gif); +} + +.x-toolbar .x-btn { + padding-left:3px; + padding-right:3px; +} + +.x-toolbar .x-btn-mc em.x-btn-arrow { + padding-right:10px; +} + +.x-toolbar .x-btn-text-icon .x-btn-icon-small-left .x-btn-text { + padding-left:18px !important; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + padding-right:14px; +} + +.x-tbar-page-first{ + background-image: url(../images/access/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/access/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/access/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/access/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/access/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/access/grid/loading.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/access/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/access/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/access/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/access/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/access/toolbar/more.gif) !important; +} + +.x-statusbar .x-status-busy { + background-image: url(../images/access/grid/loading.gif); +} + +.x-statusbar .x-status-text-panel { + border-color: #99bbe8 #fff #fff #99bbe8; +} +.x-resizable-handle { + background-color:#fff; + color: #000; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/access/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/access/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/access/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/access/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/access/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/access/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/access/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#1f2933; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#223; +} + +.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + border-left-color:#556; + border-right-color:#223; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border:0 none; + border-bottom:1px solid #111; + border-right:1px solid #1a1a1c; +} + +.x-grid3-row-alt{ + background-color:#1b232b; +} + +.x-grid3-row-over { + background-color:#7e5530; +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#3b3f50; + background-image:url(../images/access/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#889; + border-right-color:#445; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#4e628a; + background-image:url(../images/access/grid/grid3-hrow-over.gif); +} + +.x-grid3-cell-inner, .x-grid3-hd-inner { + color:#fff; +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/access/grid/sort_asc.gif); + width:15px; + height:9px; + margin-left:5px; +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/access/grid/sort_desc.gif); + width:15px; + height:9px; + margin-left:5px; +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#fff; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#fff; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/access/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +.x-grid3-row-selected { + background-color: #e5872c !important; + background-image: none; + border-style: solid; +} + +.x-grid3-row-selected .x-grid3-cell { + color: #fff; +} + +.x-grid3-cell-selected { + background-color: #ffa340 !important; + color:#fff; +} + +.x-grid3-cell-selected span{ + color:#fff !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#fff; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#fff; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#fff !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/access/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/access/grid/grid3-special-col-bg.gif) !important; + color:#fff !important; +} +.x-props-grid .x-grid3-td-value { + color:#fff !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#263240 !important; + border-right-color:#223; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/access/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c2c9d0; + background-image:url(../images/access/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/access/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#fff; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/access/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/access/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#4e628a; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/access/grid/group-collapse.gif); + background-position:3px 6px; + color:#ffd; + font:bold 14px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/access/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 14px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 14px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +} +.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/access/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/access/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.ext-ie .x-tree-node-el input { + width:14px; + height:14px; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/access/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/access/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/access/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/access/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/access/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/access/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/access/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/access/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#fff; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#fff; +} + +.x-tree-node .x-tree-selected a, .x-dd-drag-ghost a{ + color:#fff; +} + +.x-tree-node .x-tree-selected a span, .x-dd-drag-ghost a span{ + color:#fff; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #7e5530; +} + +.x-tree-node .x-tree-selected { + background-color: #e5872c; +} + +.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-btn { - font:normal 14px tahoma, verdana, helvetica; -} - -.x-btn button { - font:normal 14px arial,tahoma,verdana,helvetica; - color:#fffffa; - padding-left:6px !important; - padding-right:6px !important; -} - -.x-btn-over .x-btn button{ - color:#fff; -} - -.x-btn-noicon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-left .x-btn-text, -.x-btn-icon .x-btn-small .x-btn-text, .x-btn-text-icon .x-btn-icon-small-right .x-btn-text { - height:18px; -} - -.x-btn-icon .x-btn-small .x-btn-text { - width:18px; -} - -.x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - padding-left:21px !important; -} - -.x-btn-text-icon .x-btn-icon-small-right .x-btn-text { - padding-right:21px !important; -} - -.x-btn-text-icon .x-btn-icon-medium-left .x-btn-text { - padding-left:29px !important; -} - -.x-btn-text-icon .x-btn-icon-medium-right .x-btn-text { - padding-right:29px !important; -} - -.x-btn-text-icon .x-btn-icon-large-left .x-btn-text { - padding-left:37px !important; -} - -.x-btn-text-icon .x-btn-icon-large-right .x-btn-text { - padding-right:37px !important; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/access/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#fff; -} - -.x-btn-disabled *{ - color:#eee !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/access/button/arrow.gif); - padding-right:13px; -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/access/button/s-arrow.gif); - padding-right:20px; -} - -.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/access/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/access/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #d2d2d2; -} - -.x-btn-group-tc { - background-image: url(../images/access/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/access/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/access/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/access/button/group-lr.gif); -} - -.x-btn-group-mr { - background-image: url(../images/access/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/access/button/group-tb.gif); -} -.x-toolbar{ - border-color:#18181a; - background-color:#393d4e; - background-image:url(../images/access/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 14px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/access/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/access/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/access/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/access/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/access/grid/grid-blue-split.gif); -} - -.x-toolbar .x-btn { - padding-left:3px; - padding-right:3px; -} - -.x-toolbar .x-btn-mc em.x-btn-arrow { - padding-right:10px; -} - -.x-toolbar .x-btn-text-icon .x-btn-icon-small-left .x-btn-text { - padding-left:18px !important; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - padding-right:14px; -} - -.x-tbar-page-first{ - background-image: url(../images/access/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/access/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/access/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/access/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/access/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/access/grid/loading.gif) !important; -} - -.x-item-disabled .x-tbar-page-first{ - background-image: url(../images/access/grid/page-first-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-last{ - background-image: url(../images/access/grid/page-last-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-next{ - background-image: url(../images/access/grid/page-next-disabled.gif) !important; -} - -.x-item-disabled .x-tbar-page-prev{ - background-image: url(../images/access/grid/page-prev-disabled.gif) !important; -} - -.x-paging-info { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/access/toolbar/more.gif) !important; -} - -.x-statusbar .x-status-busy { - background-image: url(../images/access/grid/loading.gif); -} - -.x-statusbar .x-status-text-panel { - border-color: #99bbe8 #fff #fff #99bbe8; -} -.x-resizable-handle { - background-color:#fff; - color: #000; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/access/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/access/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/access/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/access/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/access/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/access/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/access/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#1f2933; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#223; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#556; - border-right-color:#223; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border:0 none; - border-bottom:1px solid #111; - border-right:1px solid #1a1a1c; -} - -.x-grid3-row-alt{ - background-color:#1b232b; -} - -.x-grid3-row-over { - background-color:#7e5530; -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#3b3f50; - background-image:url(../images/access/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#889; - border-right-color:#445; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#4e628a; - background-image:url(../images/access/grid/grid3-hrow-over.gif); -} - -.x-grid3-cell-inner, .x-grid3-hd-inner { - color:#fff; -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/access/grid/sort_asc.gif); - width:15px; - height:9px; - margin-left:5px; -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/access/grid/sort_desc.gif); - width:15px; - height:9px; - margin-left:5px; -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#fff; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:fff; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/access/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color: #e5872c !important; - background-image: none; - border-style: solid; -} - -.x-grid3-row-selected .x-grid3-cell { - color: #fff; -} - -.x-grid3-cell-selected { - background-color: #ffa340 !important; - color:#fff; -} - -.x-grid3-cell-selected span{ - color:#fff !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#fff; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#fff; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:fff !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/access/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/access/grid/grid3-special-col-bg.gif) !important; - color:#fff !important; -} -.x-props-grid .x-grid3-td-value { - color:#fff !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#263240 !important; - border-right-color:#223; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/access/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c2c9d0; - background-image:url(../images/access/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/access/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#fff; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/access/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/access/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#4e628a; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/access/grid/group-collapse.gif); - background-position:3px 6px; - color:#ffd; - font:bold 14px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/access/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 14px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row{ - border-top-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 14px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -} -.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/access/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/access/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.ext-ie .x-tree-node-el input { - width:14px; - height:14px; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/access/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/access/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/access/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/access/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/access/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/access/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/access/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/access/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#fff; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#fff; -} - -.x-tree-node .x-tree-selected a, .x-dd-drag-ghost a{ - color:#fff; -} - -.x-tree-node .x-tree-selected a span, .x-dd-drag-ghost a span{ - color:#fff; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #7e5530; -} - -.x-tree-node .x-tree-selected { - background-color: #e5872c; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); -} .x-date-picker { border-color: #737b8c; background-color:#21252e; @@ -1222,7 +1229,7 @@ td.x-date-mp-month a,td.x-date-mp-year a { } td.x-date-mp-month a:hover,td.x-date-mp-year a:hover { - color:fff; + color:#fff; background-color: #7e5530; } @@ -1239,117 +1246,117 @@ td.x-date-mp-sel a { td.x-date-mp-sep { border-right-color:#c5d2df; } -.x-tip .x-tip-close{ - background-image: url(../images/access/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/access/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 14px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 14px tahoma,arial,helvetica,sans-serif; - color:#ffd; -} - -.x-tip .x-tip-body { - font: normal 14px tahoma,arial,helvetica,sans-serif; - color:#000; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/access/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/access/qtip/tip-anchor-sprite.gif); -} -.x-menu { - border-color:#222; - background-color:#414551; - background-image:url(../images/access/menu/menu.gif); -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 14px tahoma,arial, sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/access/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#223; - border-bottom-color:#666; -} - -a.x-menu-item { - color:#fffff6; -} - -.x-menu-item-active { - background-color: #f09134; - background-image: none; - border-color:#b36427; -} - -.x-menu-item-active a.x-menu-item { - border-color:#b36427; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/access/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} +.x-tip .x-tip-close{ + background-image: url(../images/access/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/access/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 14px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 14px tahoma,arial,helvetica,sans-serif; + color:#ffd; +} + +.x-tip .x-tip-body { + font: normal 14px tahoma,arial,helvetica,sans-serif; + color:#000; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/access/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/access/qtip/tip-anchor-sprite.gif); +} +.x-menu { + border-color:#222; + background-color:#414551; + background-image:url(../images/access/menu/menu.gif); +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 14px tahoma,arial, sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/access/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#223; + border-bottom-color:#666; +} + +a.x-menu-item { + color:#fffff6; +} + +.x-menu-item-active { + background-color: #f09134; + background-image: none; + border-color:#b36427; +} + +.x-menu-item-active a.x-menu-item { + border-color:#b36427; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/access/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} .x-box-tl { background-image: url(../images/default/box/corners.gif); } @@ -1430,7 +1437,7 @@ a.x-menu-item { .x-combo-list-hd { font:bold 14px tahoma, arial, helvetica, sans-serif; - color:fff; + color:#fff; background-image: url(../images/default/layout/panel-title-light-bg.gif); border-bottom-color:#98c0f4; } @@ -1457,11 +1464,12 @@ a.x-menu-item { } .x-panel { border-color: #18181a; + font-size: 14px; } .x-panel-header { color:#fff; - font-weight:bold; + font-weight:bold; font-size: 14px; font-family: tahoma,arial,verdana,sans-serif; border-color:#18181a; @@ -1493,16 +1501,16 @@ a.x-menu-item { } .x-panel-tl .x-panel-header { - color:fff; - font:bold 14px tahoma,arial,verdana,sans-serif; + color:#fff; + font:bold 14px tahoma,arial,verdana,sans-serif; } .x-panel-tc { - background-image: url(../images/access/panel/top-bottom.gif); + background-image: url(../images/access/panel/top-bottom.gif); } .x-panel-tl, .x-panel-tr, .x-panel-bl, .x-panel-br{ - background-image: url(../images/access/panel/corners-sprite.gif); + background-image: url(../images/access/panel/corners-sprite.gif); border-bottom-color:#222224; } @@ -1548,7 +1556,7 @@ a.x-menu-item { } .x-window-tl .x-window-header { - color:fff; + color:#fff; font:bold 14px tahoma,arial,verdana,sans-serif; } @@ -1623,34 +1631,34 @@ a.x-menu-item { body.x-body-masked .x-window-plain .x-window-mc { background-color: #464f61; } -.x-html-editor-wrap { - border-color:#737B8C; - background-color:#fff; -} -.x-html-editor-wrap iframe { - background-color: #fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/access/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#343d4e; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#343d4e; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#343d4e; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#343d4e; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#343d4e; -} +.x-html-editor-wrap { + border-color:#737B8C; + background-color:#fff; +} +.x-html-editor-wrap iframe { + background-color: #fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/access/editor/tb-sprite.gif); +}.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#343d4e; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#343d4e; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#343d4e; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#343d4e; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#343d4e; +} .x-border-layout-ct { background-color:#3f4757; } @@ -1701,106 +1709,112 @@ body.x-body-masked .x-window-plain .x-window-mc { .x-layout-cmini-south .x-layout-mini { background-image:url(../images/default/layout/mini-top.gif); } -.x-progress-wrap { - border-color:#18181a; -} - -.x-progress-inner { - background-color:#232d38; - background-image:none; -} - -.x-progress-bar { - background-color:#f39a00; - background-image:url(../images/access/progress/progress-bg.gif); - border-top-color:#a66900; - border-bottom-color:#a66900; - border-right-color:#ffb941; -} - -.x-progress-text { - font-size:14px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#aaa; - line-height: 11px; -} -.x-list-header{ - background-color:#393d4e; - background-image:url(../images/access/toolbar/bg.gif); - background-position:0 top; -} - -.x-list-header-inner div em { - border-left-color:#667; - font:normal 14px arial, tahoma, helvetica, sans-serif; - line-height: 14px; -} - -.x-list-body dt em { - font:normal 14px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/access/grid/sort-hd.gif); - border-color: #3e4e6c; -} -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/access/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/access/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/access/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/access/slider/slider-v-thumb.png); -} -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:15px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 15px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/access/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/access/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/access/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/access/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/access/window/icon-error.gif); -} +.x-progress-wrap { + border-color:#18181a; +} + +.x-progress-inner { + background-color:#232d38; + background-image:none; +} + +.x-progress-bar { + background-color:#f39a00; + background-image:url(../images/access/progress/progress-bg.gif); + border-top-color:#a66900; + border-bottom-color:#a66900; + border-right-color:#ffb941; + height: 20px !important; /* structural override for Accessibility Theme */ +} + +.x-progress-text { + font-size:14px; + font-weight:bold; + color:#fff; + padding: 0 5px !important; /* structural override for Accessibility Theme */ +} + +.x-progress-text-back { + color:#aaa; + line-height: 19px; +} +.x-list-header{ + background-color:#393d4e; + background-image:url(../images/access/toolbar/bg.gif); + background-position:0 top; +} + +.x-list-header-inner div em { + border-left-color:#667; + font:normal 14px arial, tahoma, helvetica, sans-serif; + line-height: 14px; +} + +.x-list-body-inner { + background-color:#1B232B; +} + +.x-list-body dt em { + font:normal 14px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#7E5530; +} + +.x-list-selected { + background-color:#E5872C; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/access/grid/sort-hd.gif); + border-color: #3e4e6c; +} +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/access/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/access/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/access/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/access/slider/slider-v-thumb.png); +} +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:15px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 15px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/access/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/access/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/access/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/access/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/access/window/icon-error.gif); +} diff --git a/deluge/ui/web/themes/css/xtheme-blue.css b/deluge/ui/web/themes/css/xtheme-blue.css index 81facc257..a730272f5 100644 --- a/deluge/ui/web/themes/css/xtheme-blue.css +++ b/deluge/ui/web/themes/css/xtheme-blue.css @@ -1,83 +1,85 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#6593cf; - background-color:#c3daf9; - background-image:url(../images/default/box/tb-blue.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#a3bad9; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#8bb8f3; - background-color: #deecfd; -} - -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #deecfd; -} - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; -} +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#6593cf; + background-color:#c3daf9; + background-image:url(../images/default/box/tb-blue.gif); +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#a3bad9; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#8bb8f3; + background-color: #deecfd; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #deecfd; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; +} .x-tab-panel-header, .x-tab-panel-footer { background-color: #deecfd; border-color:#8db2e3; @@ -198,11 +200,11 @@ ul.x-tab-strip-bottom{ .x-tab-panel-bbar .x-toolbar, .x-tab-panel-tbar .x-toolbar { border-color:#99bbe8; -}.x-form-field{ +}.x-form-field { font:normal 12px tahoma, arial, helvetica, sans-serif; } -.x-form-text, textarea.x-form-field{ +.x-form-text, textarea.x-form-field { background-color:#fff; background-image:url(../images/default/form/text-bg.gif); border-color:#b5b8c8; @@ -222,51 +224,57 @@ ul.x-tab-strip-bottom{ background-color:#fff; } -.x-form-field-wrap .x-form-trigger{ +.x-form-field-wrap .x-form-trigger { background-image:url(../images/default/form/trigger.gif); border-bottom-color:#b5b8c8; } -.x-form-field-wrap .x-form-date-trigger{ +.x-form-field-wrap .x-form-date-trigger { background-image: url(../images/default/form/date-trigger.gif); } -.x-form-field-wrap .x-form-clear-trigger{ +.x-form-field-wrap .x-form-clear-trigger { background-image: url(../images/default/form/clear-trigger.gif); } -.x-form-field-wrap .x-form-search-trigger{ +.x-form-field-wrap .x-form-search-trigger { background-image: url(../images/default/form/search-trigger.gif); } -.x-trigger-wrap-focus .x-form-trigger{ +.x-trigger-wrap-focus .x-form-trigger { border-bottom-color:#7eadd9; } -.x-item-disabled .x-form-trigger-over{ +.x-item-disabled .x-form-trigger-over { border-bottom-color:#b5b8c8; } -.x-item-disabled .x-form-trigger-click{ +.x-item-disabled .x-form-trigger-click { border-bottom-color:#b5b8c8; } -.x-form-focus, textarea.x-form-focus{ +.x-form-focus, textarea.x-form-focus { border-color:#7eadd9; } -.x-form-invalid, textarea.x-form-invalid{ +.x-form-invalid, textarea.x-form-invalid { background-color:#fff; background-image:url(../images/default/grid/invalid_line.gif); border-color:#c30; } -.ext-webkit .x-form-invalid{ - background-color:#fee; - border-color:#ff7870; +.x-form-invalid.x-form-composite { + border: none; + background-image: none; } -.x-form-inner-invalid, textarea.x-form-inner-invalid{ +.x-form-invalid.x-form-composite .x-form-invalid { + background-color:#fff; + background-image:url(../images/default/grid/invalid_line.gif); + border-color:#c30; +} + +.x-form-inner-invalid, textarea.x-form-inner-invalid { background-color:#fff; background-image:url(../images/default/grid/invalid_line.gif); } @@ -309,646 +317,677 @@ ul.x-tab-strip-bottom{ font:bold 11px tahoma, arial, helvetica, sans-serif; color:#15428b; } -.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/default/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #3e6aaa; -} - -.x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/default/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/default/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/default/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/default/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/default/button/group-tb.gif); -}.x-toolbar{ - border-color:#a9bfd3; - background-color:#d0def0; - background-image:url(../images/default/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/default/button/s-arrow-o.gif); -} - -.x-toolbar .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom -{ - background-image:url(../images/default/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-blue-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/default/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/default/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/default/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/default/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/default/grid/page-prev.gif) !important; -} - -.x-item-disabled .x-tbar-loading{ - background-image: url(../images/default/grid/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 { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/default/toolbar/more.gif) !important; -}.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/default/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/default/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/default/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/default/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/default/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/default/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/default/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#3b5a82; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#99bbe8; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#aaccf6; - border-right-color:#aaccf6; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/default/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#15428b; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#ebf3fd; - background-image:url(../images/default/grid/grid3-hrow-over.gif); - border-color:#aaccf6; -} - -.col-move-top{ - background-image:url(../images/default/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/default/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color: #dfe8f6 !important; - background-image: none; - border-color:#a3bae9; -} - -.x-grid3-cell-selected{ - background-color: #b8cfee !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#15428b !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#c3daf9; - background-image:url(../images/default/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/default/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#99bbe8; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-collapse.gif); - color:#3764a0; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/default/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#a3bae9; -}.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#c3daf9; - border-color:#3399bb; -}.x-tree-node-expanded .x-tree-node-icon{ - background-image:url(../images/default/tree/folder-open.gif); -} - -.x-tree-node-leaf .x-tree-node-icon{ - background-image:url(../images/default/tree/leaf.gif); -} - -.x-tree-node-collapsed .x-tree-node-icon{ - background-image:url(../images/default/tree/folder.gif); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.x-tree-lines .x-tree-elbow{ - background-image:url(../images/default/tree/elbow.gif); -} - -.x-tree-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus.gif); -} - -.x-tree-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus.gif); -} - -.x-tree-lines .x-tree-elbow-end{ - background-image:url(../images/default/tree/elbow-end.gif); -} - -.x-tree-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/default/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #d9e8fb; -} - -.x-tree-drop-ok-append .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-add.gif); -} - -.x-tree-drop-ok-above .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-over.gif); -} - -.x-tree-drop-ok-below .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-under.gif); -} - -.x-tree-drop-ok-between .x-dd-drop-icon{ - background-image: url(../images/default/tree/drop-between.gif); +.x-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/default/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #3e6aaa; +} + +.x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/default/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/default/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/default/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/default/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/default/button/group-tb.gif); +}.x-toolbar{ + border-color:#a9bfd3; + background-color:#d0def0; + background-image:url(../images/default/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/default/button/s-arrow-o.gif); +} + +.x-toolbar .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split-bottom, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split-bottom +{ + background-image:url(../images/default/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-blue-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/default/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/default/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/default/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/default/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev.gif) !important; +} + +.x-item-disabled .x-tbar-loading{ + background-image: url(../images/default/grid/refresh-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-first{ + background-image: url(../images/default/grid/page-first-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-last{ + background-image: url(../images/default/grid/page-last-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-next{ + background-image: url(../images/default/grid/page-next-disabled.gif) !important; +} + +.x-item-disabled .x-tbar-page-prev{ + background-image: url(../images/default/grid/page-prev-disabled.gif) !important; +} + +.x-paging-info { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/default/toolbar/more.gif) !important; +}.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/default/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/default/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/default/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/default/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/default/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/default/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/default/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#3b5a82; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#99bbe8; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#aaccf6; + border-right-color:#aaccf6; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/default/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#15428b; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#ebf3fd; + background-image:url(../images/default/grid/grid3-hrow-over.gif); + border-color:#aaccf6; +} + +.col-move-top{ + background-image:url(../images/default/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/default/grid/col-move-bottom.gif); +} + +td.grid-hd-group-cell { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x bottom; +} + +.x-grid3-row-selected { + background-color: #dfe8f6 !important; + background-image: none; + border-color:#a3bae9; +} + +.x-grid3-cell-selected{ + background-color: #b8cfee !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#15428b !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#c3daf9; + background-image:url(../images/default/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/default/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#99bbe8; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-collapse.gif); + color:#3764a0; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/default/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#a3bae9; +}.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/default/grid/grid3-hrow.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#c3daf9; + border-color:#3399bb; +}.x-tree-node-expanded .x-tree-node-icon{ + background-image:url(../images/default/tree/folder-open.gif); +} + +.x-tree-node-leaf .x-tree-node-icon{ + background-image:url(../images/default/tree/leaf.gif); +} + +.x-tree-node-collapsed .x-tree-node-icon{ + background-image:url(../images/default/tree/folder.gif); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.x-tree-lines .x-tree-elbow{ + background-image:url(../images/default/tree/elbow.gif); +} + +.x-tree-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus.gif); +} + +.x-tree-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus.gif); +} + +.x-tree-lines .x-tree-elbow-end{ + background-image:url(../images/default/tree/elbow-end.gif); +} + +.x-tree-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/default/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #d9e8fb; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); }.x-date-picker { border-color: #1b376c; background-color:#fff; @@ -1085,124 +1124,124 @@ td.x-date-mp-sel a { td.x-date-mp-sep { border-right-color:#c5d2df; -}.x-tip .x-tip-close{ - background-image: url(../images/default/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/default/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/default/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#718bb7; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/default/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/default/menu/item-over.gif); - background-color: #dbecf4; - border-color:#aaccf6; -} - -.x-menu-item-active a.x-menu-item { - border-color:#aaccf6; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/default/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#f0f0f0 !important; - background-image: none; -} - -.x-date-menu, .x-color-menu{ - background-color: #fff !important; -} - -.x-menu .x-date-picker{ - border-color:#a3bad9; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#a3bae9 !important; - background-color:#def8f6; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); -} +}.x-tip .x-tip-close{ + background-image: url(../images/default/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/default/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/default/qtip/tip-anchor-sprite.gif); +}.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#718bb7; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/default/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/default/menu/item-over.gif); + background-color: #dbecf4; + border-color:#aaccf6; +} + +.x-menu-item-active a.x-menu-item { + border-color:#aaccf6; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/default/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#f0f0f0 !important; + background-image: none; +} + +.x-date-menu, .x-color-menu{ + background-color: #fff !important; +} + +.x-menu .x-date-picker{ + border-color:#a3bad9; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#a3bae9 !important; + background-color:#def8f6; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); +} .x-box-tl { background-image: url(../images/default/box/corners.gif); } @@ -1466,30 +1505,30 @@ a.x-menu-item { body.x-body-masked .x-window-plain .x-window-mc { background-color: #ccd9e8; -}.x-html-editor-wrap { - border-color:#a9bfd3; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -}.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#99bbe8; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#99bbe8; +}.x-html-editor-wrap { + border-color:#a9bfd3; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +}.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#99bbe8; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#99bbe8; }.x-border-layout-ct { background-color:#dfe8f6; } @@ -1536,100 +1575,100 @@ body.x-body-masked .x-window-plain .x-window-mc { .x-layout-cmini-south .x-layout-mini { background-image:url(../images/default/layout/mini-top.gif); -}.x-progress-wrap { - border-color:#6593cf; -} - -.x-progress-inner { - background-color:#e0e8f3; - background-image:url(../images/default/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#9cbfee; - background-image:url(../images/default/progress/progress-bg.gif); - border-top-color:#d1e4fd; - border-bottom-color:#7fa9e4; - border-right-color:#7fa9e4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#396095; -}.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/default/grid/grid3-hrow.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#dfe8f6; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #99bbe8; -}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/default/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/default/slider/slider-v-thumb.png); -}.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/default/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/default/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/default/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/default/window/icon-error.gif); +}.x-progress-wrap { + border-color:#6593cf; +} + +.x-progress-inner { + background-color:#e0e8f3; + background-image:url(../images/default/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#9cbfee; + background-image:url(../images/default/progress/progress-bg.gif); + border-top-color:#d1e4fd; + border-bottom-color:#7fa9e4; + border-right-color:#7fa9e4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#396095; +}.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/default/grid/grid3-hrow.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#dfe8f6; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/default/grid/sort-hd.gif); + border-color: #99bbe8; +}.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/default/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/default/slider/slider-v-thumb.png); +}.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/default/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/default/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/default/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/default/window/icon-error.gif); } \ No newline at end of file diff --git a/deluge/ui/web/themes/css/xtheme-gray.css b/deluge/ui/web/themes/css/xtheme-gray.css index d01a8d617..0ef68e260 100644 --- a/deluge/ui/web/themes/css/xtheme-gray.css +++ b/deluge/ui/web/themes/css/xtheme-gray.css @@ -1,82 +1,85 @@ /*! - * Ext JS Library 3.1.1 - * Copyright(c) 2006-2010 Ext JS, LLC - * licensing@extjs.com - * http://www.extjs.com/license + * Ext JS Library 3.4.0 + * Copyright(c) 2006-2011 Sencha Inc. + * licensing@sencha.com + * http://www.sencha.com/license */ -.ext-el-mask { - background-color: #ccc; -} - -.ext-el-mask-msg { - border-color:#999; - background-color:#ddd; - background-image:url(../images/default/box/tb.gif); -} -.ext-el-mask-msg div { - background-color: #eee; - border-color:#d0d0d0; - color:#222; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-mask-loading div { - background-color:#fbfbfb; - background-image:url(../images/default/grid/loading.gif); -} - -.x-item-disabled { - color: gray; -} - -.x-item-disabled * { - color: gray !important; -} - -.x-splitbar-proxy { - background-color: #aaa; -} - -.x-color-palette a { - border-color:#fff; -} - -.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { - border-color:#CFCFCF; - background-color: #eaeaea; -} - -.x-color-palette em:hover, .x-color-palette span:hover{ - background-color: #eaeaea; -} - -.x-color-palette em { - border-color:#aca899; -} - -.x-ie-shadow { - background-color:#777; -} - -.x-shadow .xsmc { - background-image: url(../images/default/shadow-c.png); -} - -.x-shadow .xsml, .x-shadow .xsmr { - background-image: url(../images/default/shadow-lr.png); -} - -.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ - background-image: url(../images/default/shadow.png); -} - -.loading-indicator { - font-size: 11px; - background-image: url(../images/default/grid/loading.gif); -} - -.x-spotlight { - background-color: #ccc; +.ext-el-mask { + background-color: #ccc; +} + +.ext-el-mask-msg { + border-color:#999; + background-color:#ddd; + background-image:url(../images/gray/panel/white-top-bottom.gif); + background-position: 0 -1px; +} +.ext-el-mask-msg div { + background-color: #eee; + border-color:#d0d0d0; + color:#222; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-mask-loading div { + background-color:#fbfbfb; + background-image:url(../images/default/grid/loading.gif); +} + +.x-item-disabled { + color: gray; +} + +.x-item-disabled * { + color: gray !important; +} + +.x-splitbar-proxy { + background-color: #aaa; +} + +.x-color-palette a { + border-color:#fff; +} + +.x-color-palette a:hover, .x-color-palette a.x-color-palette-sel { + border-color:#CFCFCF; + background-color: #eaeaea; +} + +/* +.x-color-palette em:hover, .x-color-palette span:hover{ + background-color: #eaeaea; +} +*/ + +.x-color-palette em { + border-color:#aca899; +} + +.x-ie-shadow { + background-color:#777; +} + +.x-shadow .xsmc { + background-image: url(../images/default/shadow-c.png); +} + +.x-shadow .xsml, .x-shadow .xsmr { + background-image: url(../images/default/shadow-lr.png); +} + +.x-shadow .xstl, .x-shadow .xstc, .x-shadow .xstr, .x-shadow .xsbl, .x-shadow .xsbc, .x-shadow .xsbr{ + background-image: url(../images/default/shadow.png); +} + +.loading-indicator { + font-size: 11px; + background-image: url(../images/default/grid/loading.gif); +} + +.x-spotlight { + background-color: #ccc; }.x-tab-panel-header, .x-tab-panel-footer { background-color: #eaeaea; border-color:#d0d0d0; @@ -308,659 +311,685 @@ ul.x-tab-strip-bottom{ .x-fieldset legend { font:bold 11px tahoma, arial, helvetica, sans-serif; color:#777777; -}.x-btn{ - font:normal 11px tahoma, verdana, helvetica; -} - -.x-btn button{ - font:normal 11px arial,tahoma,verdana,helvetica; - color:#333; -} - -.x-btn em { - font-style:normal; - font-weight:normal; -} - -.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ - background-image:url(../images/gray/button/btn.gif); -} - -.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ - color:#000; -} - -.x-btn-disabled *{ - color:gray !important; -} - -.x-btn-mc em.x-btn-arrow { - background-image:url(../images/default/button/arrow.gif); -} - -.x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { - background-image:url(../images/gray/button/s-arrow-o.gif); -} - -.x-btn-mc em.x-btn-arrow-bottom { - background-image:url(../images/default/button/s-arrow-b-noline.gif); -} - -.x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/default/button/s-arrow-b.gif); -} - -.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { - background-image:url(../images/gray/button/s-arrow-bo.gif); -} - -.x-btn-group-header { - color: #666; -} - -.x-btn-group-tc { - background-image: url(../images/gray/button/group-tb.gif); -} - -.x-btn-group-tl { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-tr { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-bc { - background-image: url(../images/gray/button/group-tb.gif); -} - -.x-btn-group-bl { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-br { - background-image: url(../images/gray/button/group-cs.gif); -} - -.x-btn-group-ml { - background-image: url(../images/gray/button/group-lr.gif); -} -.x-btn-group-mr { - background-image: url(../images/gray/button/group-lr.gif); -} - -.x-btn-group-notitle .x-btn-group-tc { - background-image: url(../images/gray/button/group-tb.gif); -} -.x-toolbar{ - border-color:#d0d0d0; - background-color:#f0f0f0; - background-image:url(../images/gray/toolbar/bg.gif); -} - -.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ - font:normal 11px arial,tahoma, helvetica, sans-serif; -} - -.x-toolbar .x-item-disabled { - color:gray; -} - -.x-toolbar .x-item-disabled * { - color:gray; -} - -.x-toolbar .x-btn-mc em.x-btn-split { - background-image:url(../images/default/button/s-arrow-noline.gif); -} - -.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, -.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split -{ - background-image:url(../images/gray/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/gray/button/s-arrow-bo.gif); -} - -.x-toolbar .xtb-sep { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-tbar-page-first{ - background-image: url(../images/gray/grid/page-first.gif) !important; -} - -.x-tbar-loading{ - background-image: url(../images/gray/grid/refresh.gif) !important; -} - -.x-tbar-page-last{ - background-image: url(../images/gray/grid/page-last.gif) !important; -} - -.x-tbar-page-next{ - background-image: url(../images/gray/grid/page-next.gif) !important; -} - -.x-tbar-page-prev{ - background-image: url(../images/gray/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 { - color:#444; -} - -.x-toolbar-more-icon { - background-image: url(../images/gray/toolbar/more.gif) !important; -} -.x-resizable-handle { - background-color:#fff; -} - -.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, -.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west -{ - background-image:url(../images/gray/sizer/e-handle.gif); -} - -.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north -{ - background-image:url(../images/gray/sizer/s-handle.gif); -} - -.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ - background-image:url(../images/gray/sizer/s-handle.gif); -} -.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ - background-image:url(../images/gray/sizer/se-handle.gif); -} -.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ - background-image:url(../images/gray/sizer/nw-handle.gif); -} -.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ - background-image:url(../images/gray/sizer/ne-handle.gif); -} -.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ - background-image:url(../images/gray/sizer/sw-handle.gif); -} -.x-resizable-proxy{ - border-color:#565656; -} -.x-resizable-overlay{ - background-color:#fff; -} -.x-grid3 { - background-color:#fff; -} - -.x-grid-panel .x-panel-mc .x-panel-body { - border-color:#d0d0d0; -} - -.x-grid3-hd-row td, .x-grid3-row td, .x-grid3-summary-row td{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-hd-row td { - border-left-color:#eee; - border-right-color:#d0d0d0; -} - -.x-grid-row-loading { - background-color: #fff; - background-image:url(../images/default/shared/loading-balls.gif); -} - -.x-grid3-row { - border-color:#ededed; - border-top-color:#fff; -} - -.x-grid3-row-alt{ - background-color:#fafafa; -} - -.x-grid3-row-over { - border-color:#ddd; - background-color:#efefef; - background-image:url(../images/default/grid/row-over.gif); -} - -.x-grid3-resize-proxy { - background-color:#777; -} - -.x-grid3-resize-marker { - background-color:#777; -} - -.x-grid3-header{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow2.gif); -} - -.x-grid3-header-pop { - border-left-color:#d0d0d0; -} - -.x-grid3-header-pop-inner { - border-left-color:#eee; - background-image:url(../images/default/grid/hd-pop.gif); -} - -td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { - border-left-color:#ACACAC; - border-right-color:#ACACAC; -} - -td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow-over2.gif); - -} - -.sort-asc .x-grid3-sort-icon { - background-image: url(../images/gray/grid/sort_asc.gif); -} - -.sort-desc .x-grid3-sort-icon { - background-image: url(../images/gray/grid/sort_desc.gif); -} - -.x-grid3-cell-text, .x-grid3-hd-text { - color:#000; -} - -.x-grid3-split { - background-image: url(../images/default/grid/grid-split.gif); -} - -.x-grid3-hd-text { - color:#333; -} - -.x-dd-drag-proxy .x-grid3-hd-inner{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow-over2.gif); - border-color:#ACACAC; -} - -.col-move-top{ - background-image:url(../images/gray/grid/col-move-top.gif); -} - -.col-move-bottom{ - background-image:url(../images/gray/grid/col-move-bottom.gif); -} - -.x-grid3-row-selected { - background-color:#CCCCCC !important; - background-image: none; - border-color:#ACACAC; -} - -.x-grid3-cell-selected{ - background-color: #CBCBCB !important; - color:#000; -} - -.x-grid3-cell-selected span{ - color:#000 !important; -} - -.x-grid3-cell-selected .x-grid3-cell-text{ - color:#000; -} - -.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ - background-color:#ebeadb !important; - background-image:url(../images/default/grid/grid-hrow.gif) !important; - color:#000; - border-top-color:#fff; - border-right-color:#6fa0df !important; -} - -.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ - color:#333 !important; -} - -.x-grid3-dirty-cell { - background-image:url(../images/default/grid/dirty.gif); -} - -.x-grid3-topbar, .x-grid3-bottombar{ - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-grid3-bottombar .x-toolbar{ - border-top-color:#a9bfd3; -} - -.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ - background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; - color:#000 !important; -} - -.x-props-grid .x-grid3-body .x-grid3-td-name{ - background-color:#fff !important; - border-right-color:#eee; -} - -.xg-hmenu-sort-asc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-asc.gif); -} - -.xg-hmenu-sort-desc .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-desc.gif); -} - -.xg-hmenu-lock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-lock.gif); -} - -.xg-hmenu-unlock .x-menu-item-icon{ - background-image: url(../images/default/grid/hmenu-unlock.gif); -} - -.x-grid3-hd-btn { - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hd-btn.gif); -} - -.x-grid3-body .x-grid3-td-expander { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-expander { - background-image:url(../images/gray/grid/row-expand-sprite.gif); -} - -.x-grid3-body .x-grid3-td-checker { - background-image: url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-row-checker, .x-grid3-hd-checker { - background-image:url(../images/default/grid/row-check-sprite.gif); -} - -.x-grid3-body .x-grid3-td-numberer { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { - color:#444; -} - -.x-grid3-body .x-grid3-td-row-icon { - background-image:url(../images/default/grid/grid3-special-col-bg.gif); -} - -.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, -.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { - background-image:url(../images/gray/grid/grid3-special-col-sel-bg.gif); -} - -.x-grid3-check-col { - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-grid3-check-col-on { - background-image:url(../images/default/menu/checked.gif); -} - -.x-grid-group, .x-grid-group-body, .x-grid-group-hd { - zoom:1; -} - -.x-grid-group-hd { - border-bottom-color:#d0d0d0; -} - -.x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/gray/grid/group-collapse.gif); - color:#5F5F5F; - font:bold 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { - background-image:url(../images/gray/grid/group-expand.gif); -} - -.x-group-by-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-cols-icon { - background-image:url(../images/default/grid/columns.gif); -} - -.x-show-groups-icon { - background-image:url(../images/default/grid/group-by.gif); -} - -.x-grid-empty { - color:gray; - font:normal 11px tahoma, arial, helvetica, sans-serif; -} - -.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { - border-right-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row{ - border-top-color:#ededed; -} - -.x-grid-with-col-lines .x-grid3-row-selected { - border-top-color:#B9B9B9; -} -.x-dd-drag-ghost{ - color:#000; - font: normal 11px arial, helvetica, sans-serif; - border-color: #ddd #bbb #bbb #ddd; - background-color:#fff; -} - -.x-dd-drop-nodrop .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-no.gif); -} - -.x-dd-drop-ok .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-yes.gif); -} - -.x-dd-drop-ok-add .x-dd-drop-icon{ - background-image: url(../images/default/dd/drop-add.gif); -} - -.x-view-selector { - background-color:#D6D6D6; - border-color:#888888; -}.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); -} - -.x-tree-node-loading .x-tree-node-icon{ - background-image:url(../images/default/tree/loading.gif) !important; -} - -.x-tree-node .x-tree-node-inline-icon { - background-image: none; -} - -.x-tree-node-loading a span{ - font-style: italic; - color:#444444; -} - -.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/gray/tree/elbow-end-plus.gif); -} - -.x-tree-lines .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/elbow-end-minus.gif); -} - -.x-tree-lines .x-tree-elbow-line{ - background-image:url(../images/default/tree/elbow-line.gif); -} - -.x-tree-no-lines .x-tree-elbow-plus{ - background-image:url(../images/default/tree/elbow-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-minus{ - background-image:url(../images/default/tree/elbow-minus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/elbow-end-plus-nl.gif); -} - -.x-tree-no-lines .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/elbow-end-minus-nl.gif); -} - -.x-tree-arrows .x-tree-elbow-plus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-minus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-plus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-arrows .x-tree-elbow-end-minus{ - background-image:url(../images/gray/tree/arrows.gif); -} - -.x-tree-node{ - color:#000; - font: normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-tree-node a, .x-dd-drag-ghost a{ - color:#000; -} - -.x-tree-node a span, .x-dd-drag-ghost a span{ - color:#000; -} - -.x-tree-node .x-tree-node-disabled a span{ - color:gray !important; -} - -.x-tree-node div.x-tree-drag-insert-below{ - border-bottom-color:#36c; -} - -.x-tree-node div.x-tree-drag-insert-above{ - border-top-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ - border-bottom-color:#36c; -} - -.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ - border-top-color:#36c; -} - -.x-tree-node .x-tree-drag-append a span{ - background-color:#ddd; - border-color:gray; -} - -.x-tree-node .x-tree-node-over { - background-color: #eee; -} - -.x-tree-node .x-tree-selected { - background-color: #ddd; -} - -.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-btn{ + font:normal 11px tahoma, verdana, helvetica; +} + +.x-btn button{ + font:normal 11px arial,tahoma,verdana,helvetica; + color:#333; +} + +.x-btn em { + font-style:normal; + font-weight:normal; +} + +.x-btn-tl, .x-btn-tr, .x-btn-tc, .x-btn-ml, .x-btn-mr, .x-btn-mc, .x-btn-bl, .x-btn-br, .x-btn-bc{ + background-image:url(../images/gray/button/btn.gif); +} + +.x-btn-click .x-btn-text, .x-btn-menu-active .x-btn-text, .x-btn-pressed .x-btn-text{ + color:#000; +} + +.x-btn-disabled *{ + color:gray !important; +} + +.x-btn-mc em.x-btn-arrow { + background-image:url(../images/default/button/arrow.gif); +} + +.x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split, .x-btn-click .x-btn-mc em.x-btn-split, .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-btn-pressed .x-btn-mc em.x-btn-split { + background-image:url(../images/gray/button/s-arrow-o.gif); +} + +.x-btn-mc em.x-btn-arrow-bottom { + background-image:url(../images/default/button/s-arrow-b-noline.gif); +} + +.x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/default/button/s-arrow-b.gif); +} + +.x-btn-over .x-btn-mc em.x-btn-split-bottom, .x-btn-click .x-btn-mc em.x-btn-split-bottom, .x-btn-menu-active .x-btn-mc em.x-btn-split-bottom, .x-btn-pressed .x-btn-mc em.x-btn-split-bottom { + background-image:url(../images/gray/button/s-arrow-bo.gif); +} + +.x-btn-group-header { + color: #666; +} + +.x-btn-group-tc { + background-image: url(../images/gray/button/group-tb.gif); +} + +.x-btn-group-tl { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-tr { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-bc { + background-image: url(../images/gray/button/group-tb.gif); +} + +.x-btn-group-bl { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-br { + background-image: url(../images/gray/button/group-cs.gif); +} + +.x-btn-group-ml { + background-image: url(../images/gray/button/group-lr.gif); +} +.x-btn-group-mr { + background-image: url(../images/gray/button/group-lr.gif); +} + +.x-btn-group-notitle .x-btn-group-tc { + background-image: url(../images/gray/button/group-tb.gif); +} +.x-toolbar{ + border-color:#d0d0d0; + background-color:#f0f0f0; + background-image:url(../images/gray/toolbar/bg.gif); +} + +.x-toolbar td,.x-toolbar span,.x-toolbar input,.x-toolbar div,.x-toolbar select,.x-toolbar label{ + font:normal 11px arial,tahoma, helvetica, sans-serif; +} + +.x-toolbar .x-item-disabled { + color:gray; +} + +.x-toolbar .x-item-disabled * { + color:gray; +} + +.x-toolbar .x-btn-mc em.x-btn-split { + background-image:url(../images/default/button/s-arrow-noline.gif); +} + +.x-toolbar .x-btn-over .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-click .x-btn-mc em.x-btn-split, +.x-toolbar .x-btn-menu-active .x-btn-mc em.x-btn-split, .x-toolbar .x-btn-pressed .x-btn-mc em.x-btn-split +{ + background-image:url(../images/gray/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/gray/button/s-arrow-bo.gif); +} + +.x-toolbar .xtb-sep { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-tbar-page-first{ + background-image: url(../images/gray/grid/page-first.gif) !important; +} + +.x-tbar-loading{ + background-image: url(../images/gray/grid/refresh.gif) !important; +} + +.x-tbar-page-last{ + background-image: url(../images/gray/grid/page-last.gif) !important; +} + +.x-tbar-page-next{ + background-image: url(../images/gray/grid/page-next.gif) !important; +} + +.x-tbar-page-prev{ + background-image: url(../images/gray/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 { + color:#444; +} + +.x-toolbar-more-icon { + background-image: url(../images/gray/toolbar/more.gif) !important; +} +.x-resizable-handle { + background-color:#fff; +} + +.x-resizable-over .x-resizable-handle-east, .x-resizable-pinned .x-resizable-handle-east, +.x-resizable-over .x-resizable-handle-west, .x-resizable-pinned .x-resizable-handle-west +{ + background-image:url(../images/gray/sizer/e-handle.gif); +} + +.x-resizable-over .x-resizable-handle-south, .x-resizable-pinned .x-resizable-handle-south, +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north +{ + background-image:url(../images/gray/sizer/s-handle.gif); +} + +.x-resizable-over .x-resizable-handle-north, .x-resizable-pinned .x-resizable-handle-north{ + background-image:url(../images/gray/sizer/s-handle.gif); +} +.x-resizable-over .x-resizable-handle-southeast, .x-resizable-pinned .x-resizable-handle-southeast{ + background-image:url(../images/gray/sizer/se-handle.gif); +} +.x-resizable-over .x-resizable-handle-northwest, .x-resizable-pinned .x-resizable-handle-northwest{ + background-image:url(../images/gray/sizer/nw-handle.gif); +} +.x-resizable-over .x-resizable-handle-northeast, .x-resizable-pinned .x-resizable-handle-northeast{ + background-image:url(../images/gray/sizer/ne-handle.gif); +} +.x-resizable-over .x-resizable-handle-southwest, .x-resizable-pinned .x-resizable-handle-southwest{ + background-image:url(../images/gray/sizer/sw-handle.gif); +} +.x-resizable-proxy{ + border-color:#565656; +} +.x-resizable-overlay{ + background-color:#fff; +} +.x-grid3 { + background-color:#fff; +} + +.x-grid-panel .x-panel-mc .x-panel-body { + border-color:#d0d0d0; +} + +.x-grid3-row td, .x-grid3-summary-row td{ + font:normal 11px/13px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + font:normal 11px/15px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-hd-row td { + border-left-color:#eee; + border-right-color:#d0d0d0; +} + +.x-grid-row-loading { + background-color: #fff; + background-image:url(../images/default/shared/loading-balls.gif); +} + +.x-grid3-row { + border-color:#ededed; + border-top-color:#fff; +} + +.x-grid3-row-alt{ + background-color:#fafafa; +} + +.x-grid3-row-over { + border-color:#ddd; + background-color:#efefef; + background-image:url(../images/default/grid/row-over.gif); +} + +.x-grid3-resize-proxy { + background-color:#777; +} + +.x-grid3-resize-marker { + background-color:#777; +} + +.x-grid3-header{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow2.gif); +} + +.x-grid3-header-pop { + border-left-color:#d0d0d0; +} + +.x-grid3-header-pop-inner { + border-left-color:#eee; + background-image:url(../images/default/grid/hd-pop.gif); +} + +td.x-grid3-hd-over, td.sort-desc, td.sort-asc, td.x-grid3-hd-menu-open { + border-left-color:#ACACAC; + border-right-color:#ACACAC; +} + +td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-asc .x-grid3-hd-inner, td.x-grid3-hd-menu-open .x-grid3-hd-inner { + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow-over2.gif); + +} + +.sort-asc .x-grid3-sort-icon { + background-image: url(../images/gray/grid/sort_asc.gif); +} + +.sort-desc .x-grid3-sort-icon { + background-image: url(../images/gray/grid/sort_desc.gif); +} + +.x-grid3-cell-text, .x-grid3-hd-text { + color:#000; +} + +.x-grid3-split { + background-image: url(../images/default/grid/grid-split.gif); +} + +.x-grid3-hd-text { + color:#333; +} + +.x-dd-drag-proxy .x-grid3-hd-inner{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow-over2.gif); + border-color:#ACACAC; +} + +.col-move-top{ + background-image:url(../images/gray/grid/col-move-top.gif); +} + +.col-move-bottom{ + background-image:url(../images/gray/grid/col-move-bottom.gif); +} + +.x-grid3-row-selected { + background-color:#CCCCCC !important; + background-image: none; + border-color:#ACACAC; +} + +.x-grid3-cell-selected{ + background-color: #CBCBCB !important; + color:#000; +} + +.x-grid3-cell-selected span{ + color:#000 !important; +} + +.x-grid3-cell-selected .x-grid3-cell-text{ + color:#000; +} + +.x-grid3-locked td.x-grid3-row-marker, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker{ + background-color:#ebeadb !important; + background-image:url(../images/default/grid/grid-hrow.gif) !important; + color:#000; + border-top-color:#fff; + border-right-color:#6fa0df !important; +} + +.x-grid3-locked td.x-grid3-row-marker div, .x-grid3-locked .x-grid3-row-selected td.x-grid3-row-marker div{ + color:#333 !important; +} + +.x-grid3-dirty-cell { + background-image:url(../images/default/grid/dirty.gif); +} + +.x-grid3-topbar, .x-grid3-bottombar{ + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-grid3-bottombar .x-toolbar{ + border-top-color:#a9bfd3; +} + +.x-props-grid .x-grid3-td-name .x-grid3-cell-inner{ + background-image:url(../images/default/grid/grid3-special-col-bg.gif) !important; + color:#000 !important; +} + +.x-props-grid .x-grid3-body .x-grid3-td-name{ + background-color:#fff !important; + border-right-color:#eee; +} + +.xg-hmenu-sort-asc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-asc.gif); +} + +.xg-hmenu-sort-desc .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-desc.gif); +} + +.xg-hmenu-lock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-lock.gif); +} + +.xg-hmenu-unlock .x-menu-item-icon{ + background-image: url(../images/default/grid/hmenu-unlock.gif); +} + +.x-grid3-hd-btn { + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hd-btn.gif); +} + +.x-grid3-body .x-grid3-td-expander { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-expander { + background-image:url(../images/gray/grid/row-expand-sprite.gif); +} + +.x-grid3-body .x-grid3-td-checker { + background-image: url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-row-checker, .x-grid3-hd-checker { + background-image:url(../images/default/grid/row-check-sprite.gif); +} + +.x-grid3-body .x-grid3-td-numberer { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-td-numberer .x-grid3-cell-inner { + color:#444; +} + +.x-grid3-body .x-grid3-td-row-icon { + background-image:url(../images/default/grid/grid3-special-col-bg.gif); +} + +.x-grid3-body .x-grid3-row-selected .x-grid3-td-numberer, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-checker, +.x-grid3-body .x-grid3-row-selected .x-grid3-td-expander { + background-image:url(../images/gray/grid/grid3-special-col-sel-bg.gif); +} + +.x-grid3-check-col { + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-grid3-check-col-on { + background-image:url(../images/default/menu/checked.gif); +} + +.x-grid-group, .x-grid-group-body, .x-grid-group-hd { + zoom:1; +} + +.x-grid-group-hd { + border-bottom-color:#d0d0d0; +} + +.x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/gray/grid/group-collapse.gif); + color:#5F5F5F; + font:bold 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-group-collapsed .x-grid-group-hd div.x-grid-group-title { + background-image:url(../images/gray/grid/group-expand.gif); +} + +.x-group-by-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-cols-icon { + background-image:url(../images/default/grid/columns.gif); +} + +.x-show-groups-icon { + background-image:url(../images/default/grid/group-by.gif); +} + +.x-grid-empty { + color:gray; + font:normal 11px tahoma, arial, helvetica, sans-serif; +} + +.x-grid-with-col-lines .x-grid3-row td.x-grid3-cell { + border-right-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row{ + border-top-color:#ededed; +} + +.x-grid-with-col-lines .x-grid3-row-selected { + border-top-color:#B9B9B9; +} +.x-pivotgrid .x-grid3-header-offset table td { + background: url(../images/gray/grid/grid3-hrow2.gif) repeat-x 50% 100%; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #D0D0D0; + border-right-color: #D0D0D0; +} + +.x-pivotgrid .x-grid3-row-headers { + background-color: #f9f9f9; +} + +.x-pivotgrid .x-grid3-row-headers table td { + background: #EEE url(../images/default/grid/grid3-rowheader.gif) repeat-x left top; + border-left: 1px solid; + border-right: 1px solid; + border-left-color: #EEE; + border-right-color: #D0D0D0; + border-bottom: 1px solid; + border-bottom-color: #D0D0D0; + height: 18px; +} +.x-dd-drag-ghost{ + color:#000; + font: normal 11px arial, helvetica, sans-serif; + border-color: #ddd #bbb #bbb #ddd; + background-color:#fff; +} + +.x-dd-drop-nodrop .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-no.gif); +} + +.x-dd-drop-ok .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-yes.gif); +} + +.x-dd-drop-ok-add .x-dd-drop-icon{ + background-image: url(../images/default/dd/drop-add.gif); +} + +.x-view-selector { + background-color:#D6D6D6; + border-color:#888888; +}.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); +} + +.x-tree-node-loading .x-tree-node-icon{ + background-image:url(../images/default/tree/loading.gif) !important; +} + +.x-tree-node .x-tree-node-inline-icon { + background-image: none; +} + +.x-tree-node-loading a span{ + font-style: italic; + color:#444444; +} + +.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/gray/tree/elbow-end-plus.gif); +} + +.x-tree-lines .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/elbow-end-minus.gif); +} + +.x-tree-lines .x-tree-elbow-line{ + background-image:url(../images/default/tree/elbow-line.gif); +} + +.x-tree-no-lines .x-tree-elbow-plus{ + background-image:url(../images/default/tree/elbow-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-minus{ + background-image:url(../images/default/tree/elbow-minus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/elbow-end-plus-nl.gif); +} + +.x-tree-no-lines .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/elbow-end-minus-nl.gif); +} + +.x-tree-arrows .x-tree-elbow-plus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-minus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-plus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-arrows .x-tree-elbow-end-minus{ + background-image:url(../images/gray/tree/arrows.gif); +} + +.x-tree-node{ + color:#000; + font: normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-tree-node a, .x-dd-drag-ghost a{ + color:#000; +} + +.x-tree-node a span, .x-dd-drag-ghost a span{ + color:#000; +} + +.x-tree-node .x-tree-node-disabled a span{ + color:gray !important; +} + +.x-tree-node div.x-tree-drag-insert-below{ + border-bottom-color:#36c; +} + +.x-tree-node div.x-tree-drag-insert-above{ + border-top-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-below a{ + border-bottom-color:#36c; +} + +.x-tree-dd-underline .x-tree-node div.x-tree-drag-insert-above a{ + border-top-color:#36c; +} + +.x-tree-node .x-tree-drag-append a span{ + background-color:#ddd; + border-color:gray; +} + +.x-tree-node .x-tree-node-over { + background-color: #eee; +} + +.x-tree-node .x-tree-selected { + background-color: #ddd; +} + +.x-tree-drop-ok-append .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-add.gif); +} + +.x-tree-drop-ok-above .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-over.gif); +} + +.x-tree-drop-ok-below .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-under.gif); +} + +.x-tree-drop-ok-between .x-dd-drop-icon{ + background-image: url(../images/default/tree/drop-between.gif); +} .x-date-picker { border-color:#585858; background-color:#fff; @@ -1010,8 +1039,8 @@ td.x-grid3-hd-over .x-grid3-hd-inner, td.sort-desc .x-grid3-hd-inner, td.sort-as } .x-date-inner .x-date-selected a{ + background-image: none; background-color:#D8D8D8; - background-image:url(../images/gray/glass-bg.gif); border-color:#DCDCDC; } @@ -1097,118 +1126,118 @@ td.x-date-mp-sel a { td.x-date-mp-sep { border-right-color:#D7D7D7; -}.x-tip .x-tip-close{ - background-image: url(../images/gray/qtip/close.gif); -} - -.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { - background-image: url(../images/gray/qtip/tip-sprite.gif); -} - -.x-tip .x-tip-mc { - font: normal 11px tahoma,arial,helvetica,sans-serif; -} -.x-tip .x-tip-ml { - background-color: #fff; -} - -.x-tip .x-tip-header-text { - font: bold 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-tip .x-tip-body { - font: normal 11px tahoma,arial,helvetica,sans-serif; - color:#444; -} - -.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, -.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr -{ - background-image: url(../images/default/form/error-tip-corners.gif); -} - -.x-form-invalid-tip .x-tip-body { - background-image:url(../images/default/form/exclamation.gif); -} - -.x-tip-anchor { - background-image:url(../images/gray/qtip/tip-anchor-sprite.gif); -}.x-menu { - background-color:#f0f0f0; - background-image:url(../images/default/menu/menu.gif); -} - -.x-menu-floating{ - border-color:#7D7D7D; -} - -.x-menu-nosep { - background-image:none; -} - -.x-menu-list-item{ - font:normal 11px arial,tahoma,sans-serif; -} - -.x-menu-item-arrow{ - background-image:url(../images/gray/menu/menu-parent.gif); -} - -.x-menu-sep { - background-color:#e0e0e0; - border-bottom-color:#fff; -} - -a.x-menu-item { - color:#222; -} - -.x-menu-item-active { - background-image: url(../images/gray/menu/item-over.gif); - background-color: #f1f1f1; - border-color:#ACACAC; -} - -.x-menu-item-active a.x-menu-item { - border-color:#ACACAC; -} - -.x-menu-check-item .x-menu-item-icon{ - background-image:url(../images/default/menu/unchecked.gif); -} - -.x-menu-item-checked .x-menu-item-icon{ - background-image:url(../images/default/menu/checked.gif); -} - -.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ - background-image:url(../images/gray/menu/group-checked.gif); -} - -.x-menu-group-item .x-menu-item-icon{ - background-image:none; -} - -.x-menu-plain { - background-color:#fff !important; -} - -.x-menu .x-date-picker{ - border-color:#AFAFAF; -} - -.x-cycle-menu .x-menu-item-checked { - border-color:#B9B9B9 !important; - background-color:#F1F1F1; -} - -.x-menu-scroller-top { - background-image:url(../images/default/layout/mini-top.gif); -} - -.x-menu-scroller-bottom { - background-image:url(../images/default/layout/mini-bottom.gif); +}.x-tip .x-tip-close{ + background-image: url(../images/gray/qtip/close.gif); +} + +.x-tip .x-tip-tc, .x-tip .x-tip-tl, .x-tip .x-tip-tr, .x-tip .x-tip-bc, .x-tip .x-tip-bl, .x-tip .x-tip-br, .x-tip .x-tip-ml, .x-tip .x-tip-mr { + background-image: url(../images/gray/qtip/tip-sprite.gif); +} + +.x-tip .x-tip-mc { + font: normal 11px tahoma,arial,helvetica,sans-serif; +} +.x-tip .x-tip-ml { + background-color: #fff; +} + +.x-tip .x-tip-header-text { + font: bold 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-tip .x-tip-body { + font: normal 11px tahoma,arial,helvetica,sans-serif; + color:#444; +} + +.x-form-invalid-tip .x-tip-tc, .x-form-invalid-tip .x-tip-tl, .x-form-invalid-tip .x-tip-tr, .x-form-invalid-tip .x-tip-bc, +.x-form-invalid-tip .x-tip-bl, .x-form-invalid-tip .x-tip-br, .x-form-invalid-tip .x-tip-ml, .x-form-invalid-tip .x-tip-mr +{ + background-image: url(../images/default/form/error-tip-corners.gif); +} + +.x-form-invalid-tip .x-tip-body { + background-image:url(../images/default/form/exclamation.gif); +} + +.x-tip-anchor { + background-image:url(../images/gray/qtip/tip-anchor-sprite.gif); +}.x-menu { + background-color:#f0f0f0; + background-image:url(../images/default/menu/menu.gif); +} + +.x-menu-floating{ + border-color:#7D7D7D; +} + +.x-menu-nosep { + background-image:none; +} + +.x-menu-list-item{ + font:normal 11px arial,tahoma,sans-serif; +} + +.x-menu-item-arrow{ + background-image:url(../images/gray/menu/menu-parent.gif); +} + +.x-menu-sep { + background-color:#e0e0e0; + border-bottom-color:#fff; +} + +a.x-menu-item { + color:#222; +} + +.x-menu-item-active { + background-image: url(../images/gray/menu/item-over.gif); + background-color: #f1f1f1; + border-color:#ACACAC; +} + +.x-menu-item-active a.x-menu-item { + border-color:#ACACAC; +} + +.x-menu-check-item .x-menu-item-icon{ + background-image:url(../images/default/menu/unchecked.gif); +} + +.x-menu-item-checked .x-menu-item-icon{ + background-image:url(../images/default/menu/checked.gif); +} + +.x-menu-item-checked .x-menu-group-item .x-menu-item-icon{ + background-image:url(../images/gray/menu/group-checked.gif); +} + +.x-menu-group-item .x-menu-item-icon{ + background-image:none; +} + +.x-menu-plain { + background-color:#fff !important; +} + +.x-menu .x-date-picker{ + border-color:#AFAFAF; +} + +.x-cycle-menu .x-menu-item-checked { + border-color:#B9B9B9 !important; + background-color:#F1F1F1; +} + +.x-menu-scroller-top { + background-image:url(../images/default/layout/mini-top.gif); +} + +.x-menu-scroller-bottom { + background-image:url(../images/default/layout/mini-bottom.gif); }.x-box-tl { background-image: url(../images/default/box/corners.gif); } @@ -1474,36 +1503,36 @@ a.x-menu-item { body.x-body-masked .x-window-plain .x-window-mc { background-color: #E4E4E4; } -.x-html-editor-wrap { - border-color:#BCBCBC; - background-color:#fff; -} -.x-html-editor-tb .x-btn-text { - background-image:url(../images/default/editor/tb-sprite.gif); -} -.x-panel-noborder .x-panel-header-noborder { - border-bottom-color:#d0d0d0; -} - -.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { - border-bottom-color:#d0d0d0; -} - -.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-tab-panel-bbar-noborder .x-toolbar { - border-top-color:#d0d0d0; -} - -.x-tab-panel-tbar-noborder .x-toolbar { - border-bottom-color:#d0d0d0; -} - -.x-border-layout-ct { - background-color:#f0f0f0; -} +.x-html-editor-wrap { + border-color:#BCBCBC; + background-color:#fff; +} +.x-html-editor-tb .x-btn-text { + background-image:url(../images/default/editor/tb-sprite.gif); +} +.x-panel-noborder .x-panel-header-noborder { + border-bottom-color:#d0d0d0; +} + +.x-panel-noborder .x-panel-tbar-noborder .x-toolbar { + border-bottom-color:#d0d0d0; +} + +.x-panel-noborder .x-panel-bbar-noborder .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-tab-panel-bbar-noborder .x-toolbar { + border-top-color:#d0d0d0; +} + +.x-tab-panel-tbar-noborder .x-toolbar { + border-bottom-color:#d0d0d0; +} + +.x-border-layout-ct { + background-color:#f0f0f0; +} .x-border-layout-ct { background-color:#f0f0f0; } @@ -1551,103 +1580,103 @@ body.x-body-masked .x-window-plain .x-window-mc { .x-layout-cmini-south .x-layout-mini { background-image:url(../images/default/layout/mini-top.gif); } -.x-progress-wrap { - border-color:#8E8E8E; -} - -.x-progress-inner { - background-color:#E7E7E7; - background-image:url(../images/gray/qtip/bg.gif); -} - -.x-progress-bar { - background-color:#BCBCBC; - background-image:url(../images/gray/progress/progress-bg.gif); - border-top-color:#E2E2E2; - border-bottom-color:#A4A4A4; - border-right-color:#A4A4A4; -} - -.x-progress-text { - font-size:11px; - font-weight:bold; - color:#fff; -} - -.x-progress-text-back { - color:#5F5F5F; -} -.x-list-header{ - background-color:#f9f9f9; - background-image:url(../images/gray/grid/grid3-hrow2.gif); -} - -.x-list-header-inner div em { - border-left-color:#ddd; - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-body dt em { - font:normal 11px arial, tahoma, helvetica, sans-serif; -} - -.x-list-over { - background-color:#eee; -} - -.x-list-selected { - background-color:#f0f0f0; -} - -.x-list-resizer { - border-left-color:#555; - border-right-color:#555; -} - -.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { - background-image:url(../images/default/grid/sort-hd.gif); - border-color: #d0d0d0; -} -.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { - background-image:url(../images/default/slider/slider-bg.png); -} - -.x-slider-horz .x-slider-thumb { - background-image:url(../images/gray/slider/slider-thumb.png); -} - -.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { - background-image:url(../images/default/slider/slider-v-bg.png); -} - -.x-slider-vert .x-slider-thumb { - background-image:url(../images/gray/slider/slider-v-thumb.png); -} -.x-window-dlg .ext-mb-text, -.x-window-dlg .x-window-header-text { - font-size:12px; -} - -.x-window-dlg .ext-mb-textarea { - font:normal 12px tahoma,arial,helvetica,sans-serif; -} - -.x-window-dlg .x-msg-box-wait { - background-image:url(../images/default/grid/loading.gif); -} - -.x-window-dlg .ext-mb-info { - background-image:url(../images/gray/window/icon-info.gif); -} - -.x-window-dlg .ext-mb-warning { - background-image:url(../images/gray/window/icon-warning.gif); -} - -.x-window-dlg .ext-mb-question { - background-image:url(../images/gray/window/icon-question.gif); -} - -.x-window-dlg .ext-mb-error { - background-image:url(../images/gray/window/icon-error.gif); -} +.x-progress-wrap { + border-color:#8E8E8E; +} + +.x-progress-inner { + background-color:#E7E7E7; + background-image:url(../images/gray/qtip/bg.gif); +} + +.x-progress-bar { + background-color:#BCBCBC; + background-image:url(../images/gray/progress/progress-bg.gif); + border-top-color:#E2E2E2; + border-bottom-color:#A4A4A4; + border-right-color:#A4A4A4; +} + +.x-progress-text { + font-size:11px; + font-weight:bold; + color:#fff; +} + +.x-progress-text-back { + color:#5F5F5F; +} +.x-list-header{ + background-color:#f9f9f9; + background-image:url(../images/gray/grid/grid3-hrow2.gif); +} + +.x-list-header-inner div em { + border-left-color:#ddd; + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-body dt em { + font:normal 11px arial, tahoma, helvetica, sans-serif; +} + +.x-list-over { + background-color:#eee; +} + +.x-list-selected { + background-color:#f0f0f0; +} + +.x-list-resizer { + border-left-color:#555; + border-right-color:#555; +} + +.x-list-header-inner em.sort-asc, .x-list-header-inner em.sort-desc { + background-image:url(../images/gray/grid/sort-hd.gif); + border-color: #d0d0d0; +} +.x-slider-horz, .x-slider-horz .x-slider-end, .x-slider-horz .x-slider-inner { + background-image:url(../images/default/slider/slider-bg.png); +} + +.x-slider-horz .x-slider-thumb { + background-image:url(../images/gray/slider/slider-thumb.png); +} + +.x-slider-vert, .x-slider-vert .x-slider-end, .x-slider-vert .x-slider-inner { + background-image:url(../images/default/slider/slider-v-bg.png); +} + +.x-slider-vert .x-slider-thumb { + background-image:url(../images/gray/slider/slider-v-thumb.png); +} +.x-window-dlg .ext-mb-text, +.x-window-dlg .x-window-header-text { + font-size:12px; +} + +.x-window-dlg .ext-mb-textarea { + font:normal 12px tahoma,arial,helvetica,sans-serif; +} + +.x-window-dlg .x-msg-box-wait { + background-image:url(../images/default/grid/loading.gif); +} + +.x-window-dlg .ext-mb-info { + background-image:url(../images/gray/window/icon-info.gif); +} + +.x-window-dlg .ext-mb-warning { + background-image:url(../images/gray/window/icon-warning.gif); +} + +.x-window-dlg .ext-mb-question { + background-image:url(../images/gray/window/icon-question.gif); +} + +.x-window-dlg .ext-mb-error { + background-image:url(../images/gray/window/icon-error.gif); +} diff --git a/deluge/ui/web/themes/images/access/form/date-trigger - Copy.gif b/deluge/ui/web/themes/images/access/form/date-trigger - Copy.gif deleted file mode 100644 index 3175f74c37f7fed7b4b5d6a25caad9519764fcb7..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 1998 zcmeH``B%~j0>Hl@sUzgId1RSTDR`Tbqo#&*p zTdXuEkjdL@2Eq%Sd75K~rAg{Doiw==&>VK>uh?Jq^ACL9`@HuFJrUyN9h(K111cKu zj%u^~IAb~oJm|V;uU1KP^uE$+Wm*gJQO!1Y^icn~* zW}+E|KDyF;Q7U4;FZTU-KmKhFdM+E8m_ia?-n-eGvngQSy;uL9hWRYK+mm4RTe{VU z62GOUxPzFZ?CK_YCsoExm9c}QH{HB(;TwIq@ktqyV(*2r~VzOPzIo;9K zKUd_1v~~Z~LDRfyZ)|Fn*M@Dq?OW^4lk+YmBxiaZ4_hCqTdNG(=*>|+E8Lpy)l9Xi z{#)Q?fO?{3Lv(xN2~jiNyx#cltyzI;nEj6K^!aY!D$`X0+RADO(sC@y4m)!lg~A-Q zbv!n5Y3~(kiG+q$sZ?667WhB^qXH-m3<3Z&!09jlUrzw~T3|U{RZ8?N&orydH8Dejj16e$ku5l} z_F#@!lvN%!<%HMQ4Zx$}<~b20K1nTGhgG<0(SIM*%U3M_zTHsKgWt85vrYUcg0gnD z)obmRM*AWvz5vjQfz0V0lf19shg&3cJD9NYddf=+WX|@HkD)*Ke^Xd*wDv3!Nr&Hf zBVi~^fDx13_gj7_4h8Ty$RR8mf{bFtER=d?Knh_n`33q7)jiyNq#dV+Q|$b+TX?ehO8&%tuWyK7?hJuztVO1(G35J9t#05o>4kxN^ zMV`A>Kuvr&olt#wXxg?Mln`h3cwt!>_O-%C16PwV0rdOFCLhoZvXkvE+Bh30x1<+3 zyak%b(C0yv3^x;c>nXb%P=k9=ZEq4B;Whz5T2Dp(XsHUOr9euz%5hK^VE#E@)R$gw zI%G(FWKD_!M!vE*NrhOV_mn#$EpTH=-0r1T$F@z)TL>SD0tIlezk%16Ff$zT^pBqn zxE)iGOm0^&@sl&RYrZu_a2l8#Y!e!uUHxgqoT-bvjI9Rosx3Iz`d>3-`k*Pzki6w#)w8^0Du7m;N(BkI?X^<`cc49^4MeC-x27@#@pbOu)oCv1l`p3T2Xd*zaP!` zK+;a;tFvV7PUf5J#r`Yf{$(;D#0GcdDnH~9S2=lMxq)Vwi1QnGK#8mE+^rHzziy`A zidKIpa&<9&cS&UZ^?vVoR^UDoT$a3aMn}+_T^DCff;WnYf^~tm&htg7jyz9y1YP#! z_ptLk=-QdY*g(KDRpz}Ow|&4@D$-;6Aj9L4f2!wS@9tj3;37JeQ)k#mx3-78PgtsA};6;x_|3d;PXwB z)$10~!BaS9)ECZvkynUal}T}vjA5oC1UvDhWgueFrZQ{TeW|>(@MP1zU19>x^a(3s z(Z~k9G92P5FK4A5%rzB@gCi@-!>5W*sTq&IubRB=YYgsk85%v+<$jyvWRUwlcr5Z& ShMrCf=tvfi+Uml9WB&pF%^8dU diff --git a/deluge/ui/web/themes/images/access/form/search-trigger - Copy.gif b/deluge/ui/web/themes/images/access/form/search-trigger - Copy.gif deleted file mode 100644 index 98885046595350e6dfe22b3ba8ece76b44e64392..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 2106 zcmeH`c{kgM0ziKeB&fYbXc0@3TBAah&?JnaYIJHkYN|%zZsz`!p_0Gf=9#6-$!lbTZio)7YXg^YDRp60_UXXogH6)Mse`$?j&bg)6P3dm8p>q9 zGngmrqGQPNQddBKv>@H--^W}ZesHD9B*~s~!$PvCS`UreyvQ&m$8<-Y2&s?V5ER|!+E|{yfj#Dn5?jHEomO|=#~z@R8tuI z_KyE=)@04-_2J}&I1OawK3p-xP_iVxMM_0?Jin>+1%bUetie?H5chrxY0Xq{GI-DJUP7%Pn`&rQaTUvbu3Lv$@{B19|Ap`CLB94z()pb z^vvjHoR$!hGTRZDMamCK;r$f#pw{wio5QN*G;%gZFG9Q6djP&)1NZfJX|?f}vv@#F z0pIRKFH#39B!m)$J`t{gv6&WBgE(swgtV#$aroKeu#I>6zIvR&6`$x# zFhIgs!h%;4l_~=$MK6RU2beKyNU&eOTO^V!o2Jn~?wj)!3>D9#k)LlmaW3AznJ9rz zxoI^8Jg!fjls-(Dd3Wq(hIz@mlhQP2v}*&@d5~lcpLY;yH$1^ zQ*lDzW1%B2P{FWSLq?;utUrmyb+t+YxgIS*Oi1gB5<|MR4tL!`+de*P4{hJnp6jDr zw!sB7O)8MclA)ZB51JA8@6-`tk1si^3t|Y;z*>&6a)%;RiN!L#N~`Z8b7rK+wv|ik zFCw9sh+$M!E$F0r+@5+o5uo?MR4H^x;HP~Ip}5QP%H+8|`^> z@_m=V37r&t0Gx=E$HU#P`bR6^#s`y620*)^GivUOpOz@A5WKPh7Ee@WzdY5}{=2V( z&WA^l4$ZZc7ffh^UG)_kzz&{BRqJfnuw84I^hjL~|I0IKMGRT0*nBM~zPGxKSmJ%U z_9BrzYrwz<$le-Pz{|3Dp$U_JKk3d{YE|$GSdVA z?uM^WIYyNu0Z?^32%gpJmfSeAr2N~E)9H<0ATe~sljTg%_Wf3lr)REOn~jcn(iK`D zR$ntCJ;?w7GRPrMRi9#DfXhT?9z##f3Ivf+7I{G&0bvO!BAjrL8Ihm`0bVo-?PnUUE*=rN02*@I|GKlc8osbea>exXzNFo_ zazT}sAtu$8>yxt(zg=20wS124${_@QW8BhFjQe=q p6otb>VWU+JgDdKP-c>Wa039#F!)!g#HoDL+?&u2(s!D*}e*qh&J#GL1 diff --git a/deluge/ui/web/themes/images/access/form/search-trigger.gif b/deluge/ui/web/themes/images/access/form/search-trigger.gif index 2b24d267b94c90be6ae66762942d60243d7bf6bc..ab8b3b497d35c7989279ca2b6c501dfe0230de63 100644 GIT binary patch delta 1368 zcmV-e1*iJf5dI5)M@dFFIbnDJ7y#x@0P5=O+j}4U^Xlp9>)C!MC@wzTi##AFH1Loz z@ta2BgDE5`I{WhJ{`Kwt^y}Y@Jj-wy>xwPyl|uaT>D+%OmYSgb^y>Zf?D3H{@|#MT zo1^c+m+-`z?!lJee+b0001Z02lxO2mgRdf`f#GgHBEa zii?bmiaLl#l9QB`k}QaZnuUl4o}Zwho;#72rjwXXo2!C}j<1Z6r?W?xtgB9;`j=XqBkX<}ML=q}o$WS2+7yu*w6Iifd0dDv*-qRc%seh7^B^rnoTVmmZ2UPtXvFdJUlecgGwQ}{k)B)VL4xrML z8j*v5zkfNXW!ui}UAbL%DhzwKNrSQp&-MizcyL<)af!y|3PNc;rg)p;t;hGD-^Kz2 z^ILm4Gv+1$I4dT?*s<8R4HQZ?EdaIZkA&B~mg`n)fzB}P*=>^72!H72MoRZP-30Jk z0Re+A8Gf|5hU2pv;4aJfab&dqs9Ud|-Q93@!wVqsOmDe^diLp^IPtG{b-|~lwpt4A zZ6;h?@`Z<+LgG1=5D6socO8Je3HVV83uKrfW&qrv;SC%ns00Eel4zF$Je0`8i6rh9 z#EUQbCjg8xzIX(N8hUUVkzX1xCz-{13`Kc=9p!k8RZcN^x0V@*)gD5k)XOzz9e; z-89Za3^4;-GtdzA)mX0}RT4>TFacZ>cs;?`8*rV32Y+iJtu)h4KaHFaLc{=93^KrN z_uVR-#kJR9i%quKXdhj~2&S^#HquZJLBrHlW9|45T2sLF*KdVw_T^j$jx^zd8h$v= zaLXV!-FKHRMBWcf-Z$o#Yrgr?hdVuz5?3#7_2XG@-SyX&vkrLLuY3MEH+G9&x9NE6 zy?YbA`+0sg@Uh39811-M54rBUm+gG!&`00)^vH(~H(Tmvd#(NUfor49^ww9u0s)e5 z?|b^{7X!Zd$dfNW>-5(@4EybS-239Uzt*kAf5f;S{z|960{#vH2>hQ{v_!!Ql4yWo a%3ucj7s2Vh>4P8)66!Qa!WRWD5CA(MTB+gy delta 1771 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 diff --git a/deluge/ui/web/themes/images/access/panel/tool-sprites.gif b/deluge/ui/web/themes/images/access/panel/tool-sprites.gif index ae07899fa108ee9066aecaea80f1ba39242f0075..a3ffe58b47933397ab771146de9d6d7ae9a6faf3 100644 GIT binary patch delta 369 zcmV-%0gnEj4!sXmM@dFFIbj|Eh5@1m0RNy&00030|Np0_r#w77Gcz*)0000003rDV z0RR9704x9i0015Uh5-Nr|7g101~AIVf-_dlEmaWN@?}xLnGhzd;m1BeAdywxAOPS2 z(dGXH3LqQRJ(L%6hsQLvM2<}5j}*2I@}eD4RFhKya{(%|#{u91FaZo8zyMB0KtKQl zY!(0f^+Rxf{?3yh{e%U8{}IIr0!-5e448`nIM9Lfd*A^5N0ZkCc>yq!Q3dA#|C2ce z-+$JX=q!^iR^o&LM5;7eu}MkX>Yy2DH5ex`F1nDb1>=HBp$lKbg>&~=BYW%=sdd0+ zCZxgI*0PCY;ESU9G!S0#>Zm!1?I?IXL|In|q9)2iud*(xyyRFeZ48(O^7U&cLaBRe}$)D)r^pB_u-cLVa{l P`?8Kvcss8`5&!@@XDOWp delta 209 zcmdnXKaVfe-P6s&GEt5pgK-fXgN=>N^5x5ojg9~R|Ifg{@PC01grWG8g^_`QjX?(} z$N*By!2CaB*PSqfQztr%!_Ml8O5XgGDtK_FfZ3Xd$L&}ZCx+fr;CjG#@#%jSE(PhU zwo}B5+K-!Tb?NhY+Ap$=_tPTTK$XeCjKz#Xn~yU-U@~A~F>qk;b7Np&WXKWy|L3c7 zLH)mTljZ-mgf{#aJj%)BbD522MmK}Sg~rd-4;cQkPrlAl$tW;6ko7s^0Wtsp1pkl(K&!nt>&?6WU?`4cX`X0`N^0xAa4gSs{jqkg?|kp`xSw!HEE;pc zqjJe?GLz1zbV^l0tJthId)<1!U|}~*E}L89vwF?eq}%X#`7N*8tMt2mf6Vj$fIEJH zgoQ7IhKY(Jh>MPo8I6#WkCK#^hL)I{f0}=spLU+0qiv$3r)H+8t6!?DuUM|Ivr)3N zw@S9SyF+J3B@9^>R^Yr!h_xSnx`}z_C{{RCD97wRB!Gj1BDqP60p~Hs|BTAe|aiYJ97&Cur z+{m$`$B!Vb6G|{ZvZTqAC{wCj$+D%(moQ_>oJq5$&6_xL;*=nur_Y~2g9;r=w5ZXe zNRujE%CxD|r%({Vj%brcUw(Z-sBLDz9AzcX~ delta 91 zcmZo*Db;ZIbhEHbWM(j8*v!E2c7kGw1K-1DRTB&6M>T41S`=>8sy(h%e^#$FQA0@^ uq>6z>DWE~&<(eN^r;G2$arDJ&&RWv$!(uHPEa=aW%ihq)&TQ|(U=09&Rvsq+ diff --git a/deluge/ui/web/themes/images/access/tabs/tab-btm-right-bg.gif b/deluge/ui/web/themes/images/access/tabs/tab-btm-right-bg.gif index e5f827a36088c3697a48a05024d78fa4220e843b..2551f4c397b4450618b6043cee9e87793e418b6e 100644 GIT binary patch delta 91 zcmZo*Db;ZIbhEHbWM(j8*v!E2c7kGw1K-1DRTB&6M>T41S`=>8sy(h%e^#$FQA0@^ uq>6z>DWE~&<(eN^r;G2$arDJ&&RWv$!(uHPEa=aW%ihq)&TQ|(U=09&Rvsq+ delta 489 zcmV0Wtsp1pkl(K&!nt>&?6WU?`4cX`X0`N^0xAa4gSs{jqkg?|kp`xSw!HEE;pc zqjJe?GLz1zbV^l0tJthId)<1!U|}~*E}L89vwF?eq}%X#`7N*8tMt2mf6Vj$fIEJH zgoQ7IhKY(Jh>MPo8I6#WkCK#^hL)I{f0}=spLU+0qiv$3r)H+8t6!?DuUM|Ivr)3N zw@S9SyF+J3B@9^>R^Yr!h_xSnx`}z_C{{RCD97wRB!Gj1BDqP60p~Hs|BTAe|aiYJ97&Cur z+{m$`$B!Vb6G|{ZvZTqAC{wCj$+D%(moQ_>oJq5$&6_xL;*=nur_Y~2g9;r=w5ZXe zNRujE%CxD|r%({Vj%brcUw(Z-sBLDz9AzcX~ diff --git a/deluge/ui/web/themes/images/default/form/trigger-square.gif b/deluge/ui/web/themes/images/default/form/trigger-square.gif new file mode 100644 index 0000000000000000000000000000000000000000..3004ec589026c038e7d056e2b99e3a877d1ecd50 GIT binary patch literal 1810 zcmeH`=~I#k0Eb@@(r`m7uUt*s$}CGwv#`U(3p3rqV|JbGJ~p>wuw%A$t1UBIwalz( z+{&#$%ZT+L@5&Oi)(njo!2=aJUO-TkLqNb6-<{omV!!O~!}Il-d1iizNhCtlp<{qI zFbe>0K=r2)<>eaTOHke`M`}Tc$K&-w`Z;)h1NmlC>qos_ACXo(VMBP*8NSR=2g;eC zTse!>fe=?>)ai87)6-h5_EoP^AP~Uz`M$nBKA*3fwW+K~cv^AWkZNFHpqV2d92_)R z?LwiDBeg?jq*rY07MUBnWnJRA;o;%P^jikAjW3;mVK^eS*lI_(V=4h;GFfaNL{^bV zWP|59VCLdoYHQ)h*?r>{i-ixF%vSq=!rTU`t#k0} zUggI0TWvzs=P^~+(A0Wn8IQWMaOQ0fTZF_<#RVfdDJ| zU-P$Wo*?VVKr zv>QMX8JhcNpY6P}`bdd8lUmhVPVfpMuo|9opEw=-v~3MQ=RHRG1nv9Oc-)Z|m)zHr z)TI1eNurS+6-EBZuS;&Cc#vt;!iFD%gK}8SH6tyq?@1m&3uTYPa>Im(Gk9&3h6-_B zp3}k4Vn(P0zi~{h{VkGnsuu#lr^Ct719}PhhL} zwJTGMKb;z>Igsvlx}rs~`R#5PcR8;)iRvvM|Jk(+(lJoch!ov6ixFnDlj011>WQkv_op8RKJdoL^uEJJCSo!-%b_pjdzFFrJmJ5u%l|L{a0h$@c| zQG*K7nT$MuxPuq(trliLXcs$F;zO;`Hcjg#WrSFHN-C$kgd zQHVYJk}Y{TLeFA3E+FTQu8@r5a-tocYEMo=ei(-!z!|5@yEuY}*X6J=)3sNTi&Up} Wr&xDc=v65PKOA33bU>qlt$zauvnrPW literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/default/form/trigger-square.psd b/deluge/ui/web/themes/images/default/form/trigger-square.psd new file mode 100644 index 0000000000000000000000000000000000000000..e922ee65de361157b2c9bada8704be67a50510ea GIT binary patch literal 36542 zcmeHw3w%?@neRw8eqjUVkq1p#)gfuOu`NsTOAe3vNt}xl$2OEEo8-#Yu~CpESCYe{ zi<3UKy}v@zCf)SzCfnxGY}0Nqxd{-+<2Fs(6ao!k0s)5_111i*G1y=mTb7RY|IIl^ zK9X&M?oCsYO8(8vH{WY!zWL6~nNK>$`9+o0Ov9v442o-z>RAFK7@t*3^NY$WVq%z3J=Tu}>G!+XgZMUp*3DxUvtEpSJs?KapTf8V~ z!J2|KjZKY$$D&))Xm_{^)+|i3Se>;(0boMw({!B0vua^lArW*dDk^owPM4s|&NO7y zWtnny*}0jClx4wK{`YM+49qjRgi%LAFUJf6^8u0b1a)))!Qjl*w(P zwlHm_$J11x*RNi^I&-xt)9Gr^8_Z_2KFg>#8Z*F=;a=9y24n>`ED(x{=}M;@G|DcF$1oyiB9S?6rjudy`g4VhW`pk@dz0J5OiC0IN{ z3DP2CmLV%6%a~y_))=x2vW*2sQ$|*PK~~lR5?6DMwaj%?IIXt&wV^spHHO@RoV9jABrn7RT)8llnbT;XVt4+EJOP$R@b=9C` zc3IN`JsDYLbUveGuQ2?_O@_5DI2TRLE<2xcYn@)O3yp%qXtMD`5+6ciG^y+#?qm7U;*}RMWv}E2;#y)80%TOp{3;y@7IB zR!t9={l>@0s_EgfW1`C(HqRoX+*}wsT3}ybB*c7 zylf=k^0U)(Oj$?DgK4+$^4Bp7IPvDK~PAl$(IhF-Sbw=_HlMbId8`3mD|UWasB(@f`CB7_*5S z^PgvecTf&~o zro(U3;p^$S>3Qk->E?8p#$ZS{7}E`=bVGJJ{1{AzymUA{?u(4L6mTWrBFVw^0(Zxi z0f)cYXfT(SpkQzpTh$$}-E788Ty+^m57fachNJJALrp zPFe4Rw?lswV9d|{D(WSr(MBRNZq!^+b46rRnNDMPz}9n4{hm zHCIFyh=@7rT~TvIWPym7quv!YS40+wh&k$AQFBFPfryx+-W4@hL>7pMIqF?eb46r< zh?t|^6*X5x7Kn&B>RnNDMPz}9n4{hmHCIFyh=@7rT~TvIWPym7quv!YS40+wh&k$A zQFBFPfryx+-W4@hL>7pMIqF?eb46rRnNDMPz}9m@nyFNn=k- z3JyFXxf;(xGJ2XariY%UyhaClqg{8u;G$}H==FtoMorM`OKM7Vl}pR3YjpH{p}zFCG@bfU zM|zS?;Ey1J(XFp^IhzERXYEob%YZ9GiYOC`sN=jU?N?5xHPcddn z%9>nwf-keu(jb)ar{yv$D{gVRZ0nqOKFN*;eHQ46A7Zlj#PS{+JxiKdN6$YxU5ZTN z0=Eb18&u8R=d6`@7wBbLQsO05+B`yIq041iJEqh^Rdfl0N~b2#@$thVCFrz$Q68SV z;Q;BqWRLI&nnx(JTN;8r0zZr>GzhLmcp^&yc?b1M4;Sc_ZsU2w%bf|;b7D$k!68pL zkDrBkm|#$3am8$SBuN3Uq^YQ`v)JLvpPy+68&L2wy>tH!nIXuDp`C5-A7*uc) zuE^C$>2R3meD+tQNd^|2jVt7ma5vZ1Nc(J)1^fQJHb=elUS&6(XqT?6sH`lhB;H~? zK7N~}QBamI)y^5oK61Gm`X%?z@jH6r0%dO`lPfzW!8EE%jDlF?+lZxt$0Oj*W9+U% zkq^Juk@v`nw(+rDC~O~33~t(JF}RbfuyRjpY|aJ?xAY^yxb79 z>YDiUFT2Y$6PCfxxg&&+aJ(n*$;&X{Js{)fbP{x4-ozeY4n<#K9spC6V|&DD_A|X2 zk9X}$4eYb9M341_xVmkr*`B|keZ;0c4;qPvlZfdfAewXUW z2B%uCmsRVogab_Yb|W8^3MaV_^V-mQ%mrRg!1@5%rxo=zW`0xJ&}akhOr* zeoad9Jmdn)*sqXeI#nIbb~_3#x7_7+*qx3B)cG4c1&5`!7B5aDzC=fJW08Q@5eh1f z1Rx9R5wuX@SanmKT1!%+&2c+k)n)UnmAPpClNv2+La{VItjO-Dkh$Xdcua)VlJAV~ zGxw0NJ}1_@5F@Jg2u-)w-d6`PK9Jxr$)q$A!9`#4$SutVa;jBuIMLHFv~~sYa&=Ys zw#4deuKn5~prlW%2k$$({3b|fk|q+Y&FBmkrpwlLb<^b9l2$uitI8cUpH%OrlD^xU zJrOCqR0rA8VuwdIJXvLWgWXwcvDdipDp&dvaJhY{oACG~uC%x-oMamAgxnvpIi(Ew zcz@v6OPD{*cCQo!-g|uYA>7Vin(9{C;2P&~jr@JIygrxe+970gO^k1a-ea3kYjN{n zWKHRc8q}w-Wz5Y4<^qiC5$|JlSlyxXSyksTfX3UY!MjIQCSXg2dbLSdk;mC6)9LNG ztg2z9La!(NZoCUrP)4B%X=e(jfoUdEJg=0OsM?Bea5wQVCb_hl zwBs8t;80JoG<%#&1P5I)f)xl>gDp^IPLh}jLzMEy1|5pO_V{D)@>JRIs;fH`Q{iq9 zLNIX_yQjv|5Q3XlC)n*Z!WvJx`<9xDrQ~I#FhN0wFek2by4DriZ4HX0rb~mzSIrU{ zlJQod-qLLM08G3eU-(SGPJw!k4rQNO+rVF7s4{MOo6|wIPV_jNa9O$q z#W9GMWQQY-!zR}{J#eUT_^FuUm0|4s3it}?V#!FF#eE!>cAr!ZD|-*Envy?DI}h=* zDQ0A3L-JGjt_IiZb;p7KB5Inzk-%{_b_$%%={sZ*1trp}q3oIHKbHM3^TnKkR0)MWmV3#k&GYf`38 zO_`Q5W7@PCv!_j)Hk-0(vn7$#%TW;cElW+n0P15jX-u1{iAmK2I&dk+2mYX0j9yN` zhD>|1^ohaXVyDE#CnP3K#Z6KuQNy$`3ULP0#A;%+vDzu|aS2mml1(6{#>9SUreR9q z9hO;X-~6^QZuTQjzgTqr{5e%`)|#?i-)Sq3zv0p9z7zd*?wqThdFi`1mi(l~TKc$Cr|^|3!3JT>s2+ul0#!Qk@x`@jFwU%vdu_qvDj zmVCWo^$-5{bK7?w{_tWd(`wP%Sl*}jxG6cj3tuwKj71N=nKo;R@!OBgrXIXm)z)X4 zUwgv!okxqS=hV5g`)`P&4#eM>^ScA+#4oP4mM+Wn2q%MGn7jvH9_vEjeU==<+e~GP z*}wx^y8htJ+4=Av1ME~){&3ghs}7H(1lX=kj^`hAKeV>y8$*u&+^{)w#dQz-wnO~M zytl=j{?{u0aAr;Rz^h-pJ2UrgTjx(6_1j{$KUk?wUH{obDq1X$O?n`boL)YH4Iec|mlt$%7=bJzZp@5e0J z-kV#~vFT;sk3L-Zk$<{>`|>nh`(ShXN<-_<((nAo%x%v+-Z6duRXLsiw)ci#1z5wg z`+5dP*ZOB=2iP-PHeCD2J*8J~y{qCmjAUimdk@&&c-!6bo#%egwrJlYcfWG2{!fm7 z*#67Ij%R+lK4YKnsPS4~hts$Fzn&Mhub1AlQ2XsUTV8qSM?dsEQT(e-5AHs0x0mPc zePY=gFIxVz{_$T2*aoLqTEG9FM)ksvhko<&w%(>#^K*x$Y_`qo-qiD(O*Mb|{!4p0 zR+m5h$B*v$j}iB^tA6w3ukQBs&hdYB)oSlu3vcfWFnd{U%YBvCZ)ttvp&#m>&3*j+ zsp<3Mwl1Cfif`JFWz(6%`FGX* z`QpuAZGHV@mvzCb`)&=eceePhe(qd=y|(9jXL?%a)b4%wv40zgKRCrc^ZfL!Eq^&s z`O?mcil1zq+4*d5+lwEG-&)=JhI9Dd>O%pR_{O^On&(@d+;;UBjy@mQ-}~sj1@j+$ z^6B=0FZ3lI-h1Yz!p*B&zWe;?C;zfo{PpftAO7p3H$V2H{g17`X>n_St*=cR>6rh+ z6I%xE(O(z}uw_sF^ex*zAAIzNLhntck)AjHE5P>LId|lP`O{09_4}8vF9@(r5A^)g zqa%a!*R5ZCU+2jH3$#mX?3ef&vW(U~T2H34LS|)7R*Rbp9jjz30eg_#9HRTcSs%lp zW5ukR(QUMRW=I3bG?^6@?5hA0SiEK?e>Xp!=a^VcH9R`~w@myCK-V#-7p!_18ZY6NLF4655N?#K?V&Q;$P4Z)_Zz8`a~`Y7`xsOzoI%sNx^&P23K= zqe%~bXP(k+NXGkhz=`g8Agx5I@88Jmu z)CN%>`1|t#S_9-yEX8BS&ZX08EUpH@Q;lCU;KzM*cAi6w#dcRs$jLBCI!0J(?R0+N zD-d{;QzVJR+uWsVEOj0wl!6kLV&2AqgJEAc*iej=V;5{f3)l6p5k z97__Ff~yYy3_(6-lWCIbZFc$B$jVWbdo@Ze$Nhp(n(G=Z4qJIuSryn zLgM37{8GzW!KKS0J@#e?^^NZT#MVq{t&y>uW>a2N45(8;AFt< zMzlJ*@kTdZB_{3v;1)8Ig*1Cfv&uq$CJuZq+d>Idd?D3Qz?b)O%t{HY3RZIC5J%Bs z9W!wHm{nq_{wZ694-Offr0ONBNPdHyCZ?AAUM=;^ZSm*=jJ|l$@Hqf**;cu#rWyAJ z_@8C?5=plN&%fxf+cpYn3&CsHRjh_J!!{0B$I0`0lw_+V$jQTWu-;18uaOC1*5i@L zPt|&eT}AfyL?E(1%s?z==2CxiS;$}CwoNVlKDMoYl(qElMxs)I`++|s zTp<)ml>;*6|EMXv(k4@0R8x56Z%&!S+vZO0e|2lxPo;wI0RANET}V`p$ng8XpORrJ zM`gGjcp5kHQ|XuC!@!@BVJb;K@w_(){@^6|cP0G!Q<|=Jt`Lf(%7IBKZC5S@-ezWZ zv3v0MbymTOST17T)21@*HFK}QwoUmcOH$Q(LTaJ3b1Ye#zW3DL^eH^o`orqJ5LsUs zbv*Y}Rl6*C_A4U+Ut39=FEH}TY%qt{!Ys;Z;#4Rj^Mj;ZqU9nG%!+ z(X43D21Mims0yvA8wsU^*2efq4?_~6OAUwet0`(&%|&MMK@W|aN*bD?o8ZZ40nUdJ zjgAB%ugp&+AMFG*w8!GSV!!}fz+Gf$I4A*UnuHpQw#bzr7+@oVatT+G`G+Q@a90`$ z1mH@@2V_3D(l{J&`jLuATVPK_^oL#Xv)=+jTvAl965r}5a9M?W6=3{^ zj$)GhV+=bh-NNo>4fwO-Zng&3WC5EW8uvj>9VyC3tc>_;*$PBvzs9n0EvwI21grV8 zz*i6L#D6QaXMsQbEcQ2yEQx0Wee9fgR@-;(oF7ppabMsddsoW+a>OYdCw2w8*#}bY zmm^Vuvq}9vzpwu+&&9JT+unKSy+QBbp}jm85x)_4i~A_~cc-+35mQ=Doai3$jdY*n zxri{<7&mLl>^?2$l$wscrNbN zw~XWHJUIlBkq<{8GIX-DGhBqV1U^bShZanJB;Pslqm*rLzkOg36))1@0rBm5ExY&j zLCN3|U~~HR?%v%J#*xy}(b0t#Or&R|OYBG;FCunm!GgOWF!(#-wr$o08H+!DqCw#I%)82j(y?vGq1le z3i%)sa&04!RTKN=P~_-l?F-vp@Pb{5JE}0Bv#{jfGRP>N75gY*(b*v$7rQ9=<)EXw zE)IzoDf#6f9~vjGWRsIC#-7`Y%ek zh#01tpS99rQ&U-m#ipvVh8CM0$4(4YS5{%=sH&_UI&th+>(QephDV1_{F&$CQGM$; zj)6fRboej&p~E*gFc2=nTKQsA1s){6*zBN{gDOb0a?EQzdTfx|{eapXJa+VGYZymL z>xB!0BrhWQ2gM7i<3;#lQzcevq0`?1Q@^b}Fn9;*cMKlzzn$9J*4BOz(xXTh+uPdq zw}vvnIJ8;?6-*$&ml}xkrDlhJPu#(wJ1XxOI_N|ER@|>Wa*+#PJmN=;Hk9h`jH9tt zjhyn)tcCINMW&iBGCO?l#2y-|9y&CN*sp(o9CV_)M|{wzrua_8c6+P6-J^&OhjIlM zmmQ;M<@^yZN$!t5a2rU?rQ zk4-BaJVp(UVEr>5bN*XKkX4JvE^$B{q~w<)${}?*B0O%<*flUPghgOT%0-BZ-P+S< zPD{DJJEeUb14VyBnOHlm6%TFLh_zzlhKFda*fluh1HwP-2f{ZrIN09Z-Q)Fnd!$_K zPHi8@AqKP$Z`g=@7Bu+rv0myFU;I?f|I>q>kt3m-$9 z1Xqb&qi3|eBfVb4{C!=qr=jumD0GZr$rscVd41RgiNB0MY82zSc-jjY1w#^JSgZ~F Vn+0%uFaj>+OMzhhbM}qFe*^Pn6NCT& literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/default/form/trigger.gif b/deluge/ui/web/themes/images/default/form/trigger.gif index fa563147f29f6023c9abd12bb393ab91b0566123..f6cba375ae3a96c87639a5b3034d204953d1db14 100644 GIT binary patch delta 1481 zcmV;)1vdJa4VVspM@dFFIbmi17y$Q)0K3rX%G>6Ct=X~ARq@Xz4%@9*#M z_xicb=I-w9yx8b6QjF;N|I*UZ)6>(`)YR72*7o-H_4)mO*Vos!%jDVF*~{VmHB*h_ z_W#Y_^!fe&{QUgK-}}?y>eS=)&)(?r_WH@)_S)LoGf|B7`1-WT;>F$h`uzUg-QD~9 z`?=5OuhHYr;r8(L_`1#JuF>P{?Cjn1|JLR9!P4i>-sti5`n=HT#ntNg`1twz{PFhu z_4)qC*zNUy`TDiV;xto@yxHi>-u1W3B7|M)#di>?d{Lw`uX|!O;U|Md0s@%aBW zQ;yK&{PObh(dPfr<^0y^|JT{y^z`(zF#%-(efCmGBBuJe~mFfhfN|*ZF+Vf9P zf2U5dX1&Q2Y*VCF(^^eBmZg9TaO29I%VWWVyLj{J729^D0KI_oBK<(Pu;Ige`vwq@ zp|Rt~kn2X6Ou4e<#C-)=-dq_eh0mZvi^kkm0Eg3Xx18p1VT_ zCOuZb?cBd>-$uHk_~$moR~%2yJF969e+^u4anS&}bn37duwYT7gpLwt?sWhE&SpDb z8F6H+lu<^#-|geUi}zllJPV{(u25*9r3D2q`}Idbe&?mPUVCn#!9f>%Ai#hNgSfx| z0(^AA0UC8t@k0|TIB3NiR!pcu6F*QP77RBqaRUr|haiebqKN{Gf8m82 zayZz6A1zEMhZ|muabk)qwumH*DhV*e5E)45AQuxpn8A}>EItu4po+b#g8hDm@rh{s-iGT`jHo3#1d#EuX z0uHLN$D%usumBD?L}3IHHb9Die+@_&5e23S2q1(HQ)u7;0v?31ss|cO|KWoW1qgtt zrkr{Ts;Hz2ki)NOIPs{1PNeZ`4yB%&>Z`7@8tbgJ)*x*Sa4b>f5^zjggQX{QTg4YM zbZWy4W>nGb38fZLKm{GB>M5)pRG@CH=YAXRr{tR3ZK*Hx`$8eY5-W(me=nrFZo8{O z3a`BC3V_1H50kNk3QLdy@xzvGpz#JlC^3T+Gbja4eJ z`R7#&0Kx3E*KT{Quy-B$=!chT`|q{a3c~Qj7jOLQxtHp|^2|5ye?0EF$IiRr$~$j8 z^R*hF{r22;?rO9)YrfRLQsMe)LsP(hrt9c jkbw>KUkNiPfDn3b69FgmAObZAJ`VOzh5)QpKmY(c0}4-5 delta 1223 zcmV;&1UUPc4wwypM@dFFIbmi17yyR=05MRDGf|8(Qj9ZFj5Je?HB*f>Q;s!MjWtw` zK>t8~t=YA>$ga@iuF>PK(BrSs90Q;QGtq`pn|`&g1%j&*b{k;p*7s?bYS>*5&rn z{rvs@{Qm#{|NpbG0bBu- zzyXbaA^8LY000R9EC2ui0A>If000R802c@xNU-371PT%=T*y!X!iEqNK8)CKBE^Lk zFG|$Hv7^V27ZzL@NwTEL2nsN$T*&$is! zwX2i`Jo4(@%Qvpvm1)t9?vBThBTGj7H?ZKRNF{5IOj+(?#ys!h z7)`pg>CR^@Uv7%jwCmESvo6Mx1q)Bwws+pO!Mnh7KE6Zs3p{uu~;} zR+OZOp#r)RwhDp|*Zw=WapcOGv;U+Ue*4wX-+uuP$f1EM&9>eES&Wz) z4N)vG!;1Kwx5bE6tT=;N8UUf-07;;Kki>&PXb@skD=0Cd6(cIKf`l@*IKYeb$w;G( z=jFH~00s0IVoy-42f%qy^z_359)#(^5?Y?OgqR-Opg;o;SRjM|00=MzoB{}8!2=C2 zU|A3WYzaUBK|G}Mpz?ovI$)=lh&KakjcFEcYE-@>pqLK>dmZzo~>SsGWQGlhFE&#%@$Tnd> z6UZWqYp$jCs_Lq&5&&zg3N(AHvdn7x?5NQSf$Frt?$kq9UxuLWx*-(7?z+!HOMtk( zs;XL3I;^GUyXv~jZ@l2nJ1)6@pcN~^!3Za;aJ;$ZFfh5RVXN@O2{SyZ!}Z!*u$K#r z;PJ;Ghs?036l82~#DXdi^2#8O>_ExWYP|7IUy@++%{b?*CIme9?DNmmq8x*oITwxd z&OayJv!pZA@MQ^5M=kZ#YD!@B)mUd8G|FmD?X}cZXD#;COwatK323K(t@he#PT=<2 zaL2uM#A>c>x7uyTt@qnyZ*}}73xEeM_~3c(t@qrksX6%Kf){Q$+B8x#r>?r_k8>`VnySa1I_rj$&e)eP-s9d l`|!K_et5aJF95^x%s1~6yzz41+qnYHSKmDJkSh=n06XcEzWV?G diff --git a/deluge/ui/web/themes/images/default/form/trigger.psd b/deluge/ui/web/themes/images/default/form/trigger.psd index 1f1ed646012259c1255514730af9af064a1b9e9a..344c7682409411be63023e77ab2e2140403a4fcd 100644 GIT binary patch literal 37599 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 HPl*2qO$roZ literal 10829 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 diff --git a/deluge/ui/web/themes/images/default/grid/grid3-rowheader.gif b/deluge/ui/web/themes/images/default/grid/grid3-rowheader.gif new file mode 100644 index 0000000000000000000000000000000000000000..2799b45c6591f1db05c8c00bd1fd0c5c01f57614 GIT binary patch literal 43 scmZ?wbhEHbWMp7uXkcLY|NlP&1B2pE79h#MpaUX6G7L;iE{qJ;0LYaF_y7O^ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/default/grid/refresh-disabled.gif b/deluge/ui/web/themes/images/default/grid/refresh-disabled.gif new file mode 100644 index 0000000000000000000000000000000000000000..607800b85e4dee8c3922d56b8666dff796603d6e GIT binary patch literal 577 zcmZ?wbhEHb6krfwcvj4C^whZzA3s&pwcWgXfA68=hmN0FxncYD+xH?8vYI<5Oq@1n z`rJi%CDj|Z?>Tku;-OBz~m8F^(Xxn=WLtiN>a=Bx$F zE?m8F;nLL!Q)l&0o9h!C(=%n(wOe=Z-ha4p+phfwkEZ5Vc1)PQY|Z9dx9>(KWnH~~ z>(S$RNmD?mv9-+Rg2I4_CJIHMaG% zPnb4+&ceq}p0)H%FR85Wo;q*Ux=pFMWe1L)nlNk8yoJkV&R?=-^RCpKQa9hQwEXgn z!pip_KJM6ec>m#J*KXY2f8^w`6Q^e`TG`P(@#U-6IYpHfO+D3(9i5ZsY}~%Lv1{Uq zvlkaGS=HV7gkm^w5Q~jme)4VU$mmSscZUz74w#^?wB~^=g*%RMb(8> z&7BjcKYH@~{)0!8XDuwKZoPH){;G{T7>EOkKUo+V7>XHmK*~XJ!oWVSp}48JrL|2t z%F8=3u&p`0Ak5C8$Vs=)FN>E?AUn<7Baf4*MT)W6--OM=GeE4bSy-LLSvqt>F{7&i zgQ&TE6Th`WhFXr2Y&0`7J9}^ww@;xYgOHm>TsTuQk6BY}E(5EeV_RmksUj;&zVVJ? zqex9(HbbrEkeHTKIc+_OAiWO?j?WH@yUQHepwOi1&dIu?>P1B(15azY1T!OpH2`<~ B4eI~^ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/default/panel/tool-sprites.gif b/deluge/ui/web/themes/images/default/panel/tool-sprites.gif index 9a3c5b9ac58bb0057f1f776e170bd1aa9908dce4..2b6b8098610bd6fe8e0d140e91032bdf49a562c9 100644 GIT binary patch delta 4021 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 T8`LALHs4d-*JuNRz>a?bEc)X| delta 3021 zcmV;;3o`VrDySlVM@dFFIbj|EXaR=+0307FFEvCoI!!r2R5(LiKS*FgNnAlqWeYJ9b zpmKeza(}ULf4xzE!&863K>t8cfUs7Dv{#0-S%qOs7Vx!Iz&#f7-uf*-I#qP7ti^yB_1WwC+3f$@?)=>H|KIWc-}3(d|J~*B z?dI|A=J4<4@$c#M&^{{R2~K>t7?`2+(10RI3i000009sp+rx+zLt4xzlA_0m^ysZh$#NyVk=#=5 zteVF&=T4aZeDcJpbDm9j@O&oKi4bGiy_vxK)lLLly^< z@+yCkgJQNxFS2LHFI#2ojM+10dXxGGIZB5IbGvt{S;J@l-6~!@*x_YGmkqfwZQX9G z;>&jnS3TVM^6TF92BE)y2z{yd*MI)`Bba-K;kSxmFfFFwW#2UR*=Lpg6_PjNlYIy& zM#qhD%01VddOj`}odrY|S>!xG5%}L(?!jZ^liaE2kCFvaWkGrGT$!Xu5HJ}LHx>*R z=9V2z>1ACOyrpKETdE0Hmv>o{>a0e_R*3mXC-HklZ98lQ|7O0q~P}4LTBs;JC*1hqdJ-;WuIn+o!tl z8{|33h7Ezl@D;TCcu zlSmGH0?ZJT#ttS9m>xr5P8K1+oE{feZQPUk4j=*DlN%3O7b7t+3vhTm{XYYDY{8#= z@K;Z^$}S@YlZ+1;9$8{+TuFBK_{TlVY-jVGsvVBZw5h$r$UtC1D;Eco!w(}`yp26< z1K-lw#t=@=Z|$gl8^XjMQnmpB*q8K}+sOUubFa**sTU<)A73nf4XBH#)izzMBZhj*BVd)S8-r~@ys0Sgcc z1%Lnq5CCTXXNZWXh>Yln0MrE401JrF4KjcXuiyX#W{E?XsEM5DiFc6$%-{qM;0-g7 z3{@Zi#Ab@9sEVxUii1G{uuuaB@C_kg3MK#mF8B?$h>N<&i@w+x2XKrBAP&bk00xtq z5h;Id00)*Z25K+|aS#SyU^eNvj_vr4@faOk;16pc5%*vZr{D!lmv8yFkN(h)|7eC? zkPrLN5Bz`+`j81hP-+RekPZ2e5lIzd5D1s>2YtW?cVGuc@P`?>ksbMwAqf^>KnkM( z2!4PEbRY*TV0J0Fk}dg?F$q9g{}2!9unte^fDZCd2Pr^cIk}TP`IA9;7eLSsf? z0u_^y5+{G-4w6s=OHc{!Acgb*4oDyY6fgzgaC8z=35Mkc+LdqfKn4G?0<8xROE3h( za129W1R#Yy9smKd;0q8i0k@}W<6sVvFa(sKQc?B};ZP1c00Bx6Ya1~ML%;^uFjE?l z1Q37%)_`koK?FpQ4HMUEYY_nva1CmrIMYB4DCiw#c(Dx8|By3~6mpYuVI{{-f#(>L zFbRa`8B{<8lT;HRe*_2$1b~1$dW8ZGiUJF&nLGgm6QQ7=$rC6r5fECM6edP#4O##?K^Ye!N)dYiR7k0m zOgRY1&4OLYRQ&vc>-x5m*M~g z4~m`r;Q>n1RYBw-F2|Qg_-*@ndHpE_LO?KfYNvRrr##1}2y>^D_IZgp5gw5dK+u5j zz$h7ED-HjssN9gC@Q|Q~3J=Y*sAps(NKvVenjKksdyASK4dJPq+JN=-siaz{k1DC& zAgLx|sYUWle?-!%ZUzK%lBE)~THMkQw>qmTcp$jitEh?>3A(BX>J40qtBUlh$Et!; ziXnxnf(+rT3!y0W(X{~}*uAXwP P=IX671p=;n8V~?GL?PLe diff --git a/deluge/ui/web/themes/images/gray/form/trigger-square.gif b/deluge/ui/web/themes/images/gray/form/trigger-square.gif new file mode 100644 index 0000000000000000000000000000000000000000..7a0f585c0bc6e4bdb0550ae3984ed884cf9b6f2d GIT binary patch literal 1071 zcmV+~1kn3ONk%w1VP*gr0M!5h%*@Q-;NaKS*U8Drq@<+C$jH&r(fs`UPft(r@$pSf zP2S$#_4W1L-QBslx!>R4_V)Jh@bKH)+w=4D`1ttR+S=~!?#jx_@9*!@($dq@)7jbC z{r&ya)YR72*2l-kP*70C#l_s*+~VTm_xJbo^z`}p`A$ww&CSjG`}^$d?A6uPlDe*yiTu0000000000000000000000000 z00000A^8LV00000EC2ui0A>If000L6K!1b~Kp1Q3dgjExY2gJpDily!TD zhLDkSn3;~Bi<+AR5v8W5s1XhitgWuE52BF-u(hoO47s|yybQ8~1Q^1@#Kjm63(3mM z%nQGA1kKXQ1QXWR*x3`$aRe6Mrr#Ff;tmbxedi77>fD6t?CX5$4U-AhGdjzj@c+Fh6NZc6d*W2;{XEx1ubA$h!Mkqgar&h=rmEo#7__m7GQ+4fJ6!s3v5)q zx_}IUqe+)GeHwKth6pKg?nL>sMT!W*s9MFUb#B)=DpX+bsguLcofz_}a8RK_01AKk zBA^hUa0M|HN+?~-@M(z(a|$0${Fkxge*yo>NL=t6WXU=oB31z6@*H(6oGO@&zyu3= z4nl-@;iANe*$PgSaPdNS2m%ELWMJ?Y#$N^*1{5ejKsRsSz=abxPGE!g&A=B2@a`SC za^^an>x3?yx?{tu#lNrM;Dh}F1{nN4!N5QP`}QF>U4B2&*57o~5da{5`UQ6&fFFFd zQDv#ku+dZq5*Xfr2zE#R-Ubg)00IRMeCVA67o?b?21zlXfr=^$I3RimaM&S?7qAG` zi#QTMPXn=mVB3%NAjsfz{uwFC0wvsKh64aZ86^rUB(Q>%SjspfR7om{B>+@f`DK)a z{80l5H)LWYgIumjodA?na$_eF|2B0t|09p zxaO+st{JQvE1v@dE9|huZu+Z~p3X`DvCIxjodM8BEA6xf_!{f7%{FW7v3$8Gm;oie1iJtL delta 14 WcmdnNv4dm6Zs!00|8Lw^#S8#9tOvLN diff --git a/deluge/ui/web/themes/images/gray/grid/sort-hd.gif b/deluge/ui/web/themes/images/gray/grid/sort-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..4cf483d25c557e7a812f364083ba0c5c1145a491 GIT binary patch literal 2731 zcmbVMX;_n27LH1RDz%JSa2RT1bP!px0U@MdSt2F~N|h0Zv1$x~1hO?mNEzCqAd5!8 z4G>Xw5_S+|7f=uq_7(+Y4FpIaKoY{fm?pM#=0~5-^UVG6efQk^zUMvX-gE8=tTWOE zSF8aBlmY<#{r!`ZlS4y8V`F0z6B8pNBLf2i!^6X?tE&QmV03g;C=}M#){c*l4-O7S zM@Ju2?mF-04n*UaIMv_wD;6Dx_a`ucR|vi&svSsLQx5`?yzM}qR&G!?x)Xs&!UQu2 zXM<09;Di0~Hr}AGjsb01C>DiIAuw@37KKa=K(XvVIB(h&0!lSkFGE1U4-lrm9mqkw z0aR-`(HI1v6&Pxcha#Xr1Plzbu(Y`#zyS}4mVdJ%mcooGI1<(YQUi_4`@OF zoNA1oFN3zt}^fh75vZ^S#@@QE~EykqCuTzkW`m~Bco~fs}us2iACFi zR6AgAk~hi$imKmXL-)!EVB*2?F#G{0(UeEFiGzV3N#O?6de zMftO`(x)ZGMTG_VdAT`UPIgviMtWLm%9F>*kCGlHCd5CufA8*{xY(H6>{~aZqaq`2 zgojrzH~gEyU-#?leYS7!p1sXyvB3ZS9X zQi%r6E$Ky~kyYnL#WslffsWQo6ZJmjbV% zxA}o>v%&R(Viq|hu1j1N+(E4wkyVDADjJZk)c(*VT`&3c+K*x3HzFdVqHo?}-;Rlm zyK~q7+Jk!ui4T(=B@;DLQq$5iGPANd+??FJ{DQ)w;*zJOWzWhhDyyn%YMi+5Hp4V@B``*6m9~c}O9ubU=3CBA=5s9a!B{Q>gQki^Sv9P$b zyt2BszOngU3D~jI5L2A`B20U)$pv0*JFZg+nzg#q>~HMbSuo z=#E_nTq}!58>9A`UL5qiCTxj2bn=O7)zgW#L<|4n_Nr1*SE|#k18&u2Q$5_Xc^5mX zpGo?P@oi7sYRYE^Dgz|L9gmpTM;gL*eQ~O`QZD4(GriPVTcr?nXPitq^}Kpf^0w4} zr1N>rvQ*G`>xpBRrAWYZUcr<+9IpXMz{XX2$2*W_}Xe2Pgcr5C0JaH`AI9n{(W>zj9y9I4F z7P2jSiNf2+Nv<%)c1bLZwbwj49*5Q=jo-l-<&58TMNEy~b9X*Eao^({Y2v|opPY&K z3xQJ;36~>|P9}QClQIFs?3~FYa{1KcBYN{uQ8KfaBznx6%n>~aS(*~1gld|IQ^WQA z#A#7Rx#Dy-Vp^OL=WH^SdHR92!-?o@Vi;PezHHNs??n;Gvnox{z}HR0?oo1V@q zZZ?tRm-YHd3MwaaC55$1(~_bFP1Bj;CO!X|5}r}s%+q#+X`XUhx3lSN+3R!uv(Mi8 z-nctl3mryU^<|eZDf8C#~C9l1S?TT4u5a z4Sllgh4ztrFhIw8M%Ji%!c5+@&yy^Fwcj^i-fS2&BX0pln$7bLCy?j)#+>~5RJMyW#K2xk%EPvU9D#qdfZQ#FTVEhq%6KU z?_03gdm(7ns#Pc4eCe%s0%hqPkyEhLPp+6<8lbnBFAp;ND9b}EQNi+X$nxy+NT?Qg zMG&q}T^Wr!Qn)h4ww_xN25B8!9l!5MU7bkuEnHPjCI`)}ic%xNYvRnBZvGUPQ@A#r zppE}nQrrSwpDF93uFqDA3Tq4trE}}j1}(^jtVy4?A@`__*_dy)mezhYfre}@y!NDR zE|%DaZY~W5NjH}Tk&yQ*;|a9)t71;k`?Z;hOEJe~EfD3#LLW`Jxgsi3zTa4us!C8N z6`;kqzuiCveR^YF;4nRlM%@FwB13x#sh1zNPC@h-AGIm$Uq*2aZUFdY-}<@ z$)nxb>H9dCS0-Nao9Elp^(uI;z$?Muerd8ZV}A>#8J;9(6J0Y5`gqNVYWZzCJHt?f zX+ibNV_4y_50`i?$JXSrp*opBEiBK`U_LI&H4~)I=Q*S1@5HeWAND-Xck!CPo7kRd zWXf?6?Rx2LM*c@9Cwkx<_@nof)bL@p?)emcm6u>83do7pl>jn#{+HPD&{nqXX N)IwUwEdb!lUjRh?N@f56 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/gray/panel/tool-sprites.gif b/deluge/ui/web/themes/images/gray/panel/tool-sprites.gif index 11845e66c96040e4b4e67a50e9052ce02b58bf0a..36b6b6755e3635ff92992745d87c7f71e7120766 100644 GIT binary patch delta 4185 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 R@1-L({WtdyA-ZJX_dgnkfR6wG delta 2822 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 JfwN!B?SEqJr+@$e diff --git a/deluge/ui/web/themes/images/gray/sizer/ne-handle.gif b/deluge/ui/web/themes/images/gray/sizer/ne-handle.gif index 92ad82cf3642db5fa14321505b5e121c878e9758..6f7b0c2958b20d3b23c5abda3b43dc1559f9a720 100644 GIT binary patch delta 105 zcmXSFVB~T4bhEHbEp`)n#rm4b>GAgbDt`-4;4AuaRH7Du- delta 91 zcmZo*EaGwZbhEHbz6NIcJJQ(`t|F#Z{L3W`0@Y$|1Vy=c=qhs%a<>oK7IP>)2Dau-aUHs z=;6bMKY#wbfB*j1uV3H1dGr4L`K@8d@BeIx*LGBO; zGv-|=wF3&Wq&xaLGB9lH=l+w(3gpl6baAW?skrs_=0VOQ3IeSUJ-2k2By-=(xfHdH z;pA248%%pT_0l>gr0{D$`N6Gp?)e_g1D<-PtN&*`FVVGlzQkEuDmf)mj8pN=g8sg+ znCqd>D*u&jxqdCG({NteTiLB)fnIkPPPwG~uUX8L&GPv{N!~5jn2qaP=jH<~hXOqq rgMq<@M{}w5p6zQNZ~V>v!t@n$c%l2`wNp|mKq@?4{an^LB{Ts5)IM${ diff --git a/deluge/ui/web/themes/images/gray/window/left-corners.pspimage b/deluge/ui/web/themes/images/gray/window/left-corners.pspimage deleted file mode 100644 index f0bb2d45cd4425a185b15e07139c52d108aef614..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 4385 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 O!QkoY=d#Wzp$P!0)|Vgv delta 328 zcmZ3=bc1PvWIY=L1H*%!Lu-JPPKj$oiE~kEVo7Fxox;WN{RNQ)d^B`}tg2=JLD49dt(IsN-Q)U}i ze93EKp1^mY*Q3^CV}`TOWV!$PjvxO%a6Z3k-+Oh*S0US{1m#6#7cYLj%YELN&o(C~ zu-^M!`@L3sr^fR+S+~ClZ`C=icwb_1TVg=(wO<7<#Ad$lJu+qMy4U>yy{nvhK0fOC z{5q^Wrq1#B#%K|sTQI=?CV@kC`KQ=dF8`h{ar~pU+rPej3VQ;xy85}S Ib4q9e0RB;Z)Bpeg diff --git a/deluge/ui/web/themes/images/gray/window/top-bottom.png b/deluge/ui/web/themes/images/gray/window/top-bottom.png index 2887f063e81658e8462a74f4a9d3eb421b5531df..f479fcf3cc6ad008991bd7feffa52364014c917b 100644 GIT binary patch delta 193 zcmV;y06zb$7SaKb8Gi!+002B?iJbrd02y>eSaefwW^{L9a%BKPWN%_+AW3auXJt}l zVPtu6$z?nM001peOjJem^z`fN>$|(V>FMd{=;-b3?cd+u@$vEh|Nr9R;^yY&^78WG z;o;@wk00000NkvXXu0mjf$(vr6 literal 2860 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 KMNUMnLSTaXcuOPz diff --git a/deluge/ui/web/themes/images/yourtheme/README.txt b/deluge/ui/web/themes/images/yourtheme/README.txt new file mode 100644 index 000000000..acc508732 --- /dev/null +++ b/deluge/ui/web/themes/images/yourtheme/README.txt @@ -0,0 +1,2 @@ +2010-03-16 jwr: +The image directory, "yourtheme", is an exact copy of the "default" image directory. Remember to update your file paths in "css/yourtheme.css" if you make changes or add your own custom images for your custom theme. \ No newline at end of file diff --git a/deluge/ui/web/themes/images/yourtheme/box/corners-blue.gif b/deluge/ui/web/themes/images/yourtheme/box/corners-blue.gif new file mode 100644 index 0000000000000000000000000000000000000000..fa419b50abe5030db04492578d5dfd39c02fb6ab GIT binary patch literal 1010 zcmZ?wbhEHbXlGzpbnMH9^WV;$J9qKo#mkp3U%h(u+O=ypZrr$e^X8p9ckbT3 zd+*-8gExOZc<|ui!-tO^J$n53@slS{o<4p0?Af#D&!4}1`SR7PSFc~ce)Hzd+qZAu zy?gim{reZ6{(SiG;p4}TpFVy1{Q2{jFJHcX{rc_Ox9{J-|M>Ca=g*(NfB*jT=g;52 zfB*ga_y7NYhEYJJ5ODbKKqZq#iZO~mS(q6ZW-;i1JPgVc3>@bfOgUvd3KTeaMcKM` zTmT9+Dym5^6eP5&35jyCL~LwoUdG4CQ1IlzMJEOhS7<|o6TkONJB|cJt&_qGY8j_CFdSfKOOVXz5IAt4 zV}p{G0>c6amIz;I6#<3?kJdQw@UbxnC^#-)=MmtuQ0WM8YMvo$(vtdt@jw$#qNfCh wKq7O5AQyweiU(yaTnsEKITutM85$V*3^XlGzJaNxkCA+uU@@+{rdHrH*em)ef#d+yZ7(kfB5j>g)|NZ;-|Nno6kqR9CJB(DX)7#&QKUtU= zfEhstWHBgDFmRk=;OCU_C{XAUlw(`PkjU7?)Tn7;VYmK z&r@KbvglBQu=1upg@udrDMSY z2FDg@ogF$0Oia(gUJntM;F*w7{y{XRIF%d;*fMw Ru}w*2KC@pnhK+^68UTSX)nNbt literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/box/l-blue.gif b/deluge/ui/web/themes/images/yourtheme/box/l-blue.gif new file mode 100644 index 0000000000000000000000000000000000000000..5ed7f0043b6b0f956076e02583ca7d18a150e8f6 GIT binary patch literal 810 zcmZ?wbhEHbWMN=rXlGzpbnMHWJ9pl^dGqhzKZa2-8UiCM1QdU=0Db(QK?me-P@Z7m PU}s=uVK7ioV6X-NGaC=| literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/box/l.gif b/deluge/ui/web/themes/images/yourtheme/box/l.gif new file mode 100644 index 0000000000000000000000000000000000000000..0160f97fe75409f17ab6c3c91f7cbdc58afa8f8f GIT binary patch literal 810 zcmZ?wbhEHbWMN=rXlGzJc<|tzJ9pl^dGqhzKZa2-8UiCM1QdU=0Db(QK?me-P@Z7m PU}s=uVK7ioV6X-N<)RPU literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/box/r-blue.gif b/deluge/ui/web/themes/images/yourtheme/box/r-blue.gif new file mode 100644 index 0000000000000000000000000000000000000000..3ea5cae3b7b571ec41ac2b5d38c8a675a1f66efc GIT binary patch literal 810 zcmZ?wbhEHbWMN=rXlGzpbnMHWJ9pl^dGr7Oe}+*o8UiCM1QdU=0Db(QK?me-P@Z7m PU}s=w;80LdV6X-NJSY$C literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/box/r.gif b/deluge/ui/web/themes/images/yourtheme/box/r.gif new file mode 100644 index 0000000000000000000000000000000000000000..34237f6292a7da6ac5d1b95d13ce76a7194dd596 GIT binary patch literal 810 zcmZ?wbhEHbWMN=rXlGzJc<|tzJ9pl^dGr7Oe}+*o8UiCM1QdU=0Db(QK?me-P@Z7m PU}s=w;80LdV6X-N?ynEj literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/box/tb-blue.gif b/deluge/ui/web/themes/images/yourtheme/box/tb-blue.gif new file mode 100644 index 0000000000000000000000000000000000000000..562fecca87176274af7bf13c419daaf93f169249 GIT binary patch literal 851 zcmZ?wbhEHbWMt4{XlGzpbnMHL<6oAa{JQeg*VSjft~>i}!})KUE_~a1@%#46-*;X4 zvFF;4eb;~7zJ2@P&7Vha|2%Q`=a~n;&OiEf>B+Ba&wkx{`TPEx-%p-AdGqGY@@87@w|Nk?Lg3%Bd$|0cmlLhGf{|q`H xPk{0S1BVKOBoBu|W0NBntB_a%g98I2m#~UU!-oTo%xv5uDh>q)92y%KtN|VsNKya* literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/arrow.gif b/deluge/ui/web/themes/images/yourtheme/button/arrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..3ab4f71ac115188898fa2701b6b11561d0461e4d GIT binary patch literal 828 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 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/group-cs.gif b/deluge/ui/web/themes/images/yourtheme/button/group-cs.gif new file mode 100644 index 0000000000000000000000000000000000000000..3d1dca8f05ca550917346830a5a0ae4e16665181 GIT binary patch literal 2459 zcmeH`i9ZvH1HdQ!yk5P2p?H)dxpp{mJU@!;=?=U!!Pkq*zsjUC!6Bk-dSFVOt_!mB{_I3VoryMO9y{@Ma z=-n9DL$B{GJqcGoa`AW@KtUEXYxS9y%>dB{M#Mz_E@4eP*_kWX z^$4C>m(33o-~&JGx7SyMz30WrFL$>$RxxA>k0+M{zIVY>_Ns?Yre=MWTI_qhMP6lu~OPcC3oegZjRc3=(^V7L)w0*({)+2G{4{T;} z!o0jGzAzuE1S`!ys~+~X;Ic~gSFD>2s0i!s44Nr2{v9?`?2ia5C=Ng`%#;QugJvIl zX2534LY2Z0<&i8qVL7rJG?#U&KWwg2Z6tfHDp4JGvpPj7exmxGdU$C3eVxYnn$L!U z`PxTjbD?!bexlEHC5Xm_h{s6L!t<)w{UTi5CucPzxwui(_yinUcAMBO2QMa*XVGKC z=GlNC5?&-)q})%Ygw02%fDp? zVNB8KSM#G-X(81lbZQu7nT3hsnXV^A4@CVZF?NFV-}t){`7%2$Np8AIR-7-nvHOnQ^Yr z29ODG<^*{=utg%~TyB+{CHl7?LfQY-rAyiI?J<{dz1}#QCwUHfpd2o~hf|W=KB6QJ zu45SUAF!!>)JvC{YD)6?1&ZX1^D@s|{)cn`#dBJlpkU5!N_ZIg4~{NC(Uzy6x{{=1 zKe?rfYg@ITrV0~|@8ub{|BR&EQ|Ia^S=qK8j9Iy>vok3>3+xaUQ15r1*4vMH-k~NY zr<-xLf4OeU(HvTdwc$>QVsM?qQfg-Hww|)w(fE}flAPtt)lx0AZ85ZzM!P3YPuBpu zIz4GQX`B=4@`f%`F)25gdrYI#mTiHRMj`BlpN4SV3>xj>^#pw_p3!SNBqur_%-}Fb({3Vq!raSJOb>jsf$Mg_Ll=3M}zGh0*jv{cQuF zqmjT9Ni1sMYJk1%XufpWRdV7?$2CxI+916|kz;5kukQ^K6G~rle?6IYiE>rdD!AJo z!NKDDVl5bDbMZ#j3K=C~N*BvVzNyC%m1wm(h9_K{;$IbDeX@-l!VY^kdI9N8_1=jfHxh8T3_)wKnK|Kp zd#kHb=JVjpZkT2o*vDFxiHooYdyV1V)pyhI?)CaUwehdL_6Z^()SB zh=d#_`1@P3XpBUY8&RN-J+pLr$&4YwYPAf?9 zNv=0?zgF??W86>)p4GbSeVcF@FJrNNcTI26z+a}2%;xSja7^K`kr~TUVtBW8#)oO;GY8+ecXL81wkhso@Q7N{RGV36L4-Fn0@B=bZS$i$`@>*e=Y6L&Ng dUQu}td}@Irs8Us{==-D1xS|KJM_Czg`hV^ynJEAO literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/group-lr.gif b/deluge/ui/web/themes/images/yourtheme/button/group-lr.gif new file mode 100644 index 0000000000000000000000000000000000000000..7c549f96d6064d4b0cc022671fd823c13df36d8c GIT binary patch literal 861 zcmZ?wbhEHbe8J4f(9Xcn@V{aEiR+JFe`Od2qaiTzLO}5+3p2>qIv@g+Cm1-a7??R2 z95yUC*vuiU6?0<4!o%$X%3gCkHZD5aEn%E>=fuXv$NLqWyJS2!Ejc+^BY0KJ$xTbW LTbP(wSQxAUYf&Xs literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/group-tb.gif b/deluge/ui/web/themes/images/yourtheme/button/group-tb.gif new file mode 100644 index 0000000000000000000000000000000000000000..adeb0a4cf54bdfb626ab6f3c070f6e2919f374c0 GIT binary patch literal 846 zcmZ?wbhEHbWMt4`Y-eC-_}{So#PvfrK0JQ?m0=W&hQJ650mYvz%pfo8fCx~YVBpYZ yVCE5U*s$PWGl#HNOoc$h;dTLKuQ?tY7ai@EFwVMjV&mfD{R+-`G6D(;4Aua=h#nIF literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/s-arrow-b-noline.gif b/deluge/ui/web/themes/images/yourtheme/button/s-arrow-b-noline.gif new file mode 100644 index 0000000000000000000000000000000000000000..a4220ee9066357ea2270a842ed244bbaadb23de4 GIT binary patch literal 898 zcmZ?wbhEHbJi)-n(9Qq?M~)mhbnDyy|Np_fQDQU%Mo=fuXv$NLqWyJS2!Ejc+^BY0KJ z$xTa7Pd7+DHOF)FGT%0aqGx+fZdP}nYuC)RmLp-s#l;?zwPH_gS$TPRz~V9<4hCxg D_B%R6 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/s-arrow-b.gif b/deluge/ui/web/themes/images/yourtheme/button/s-arrow-b.gif new file mode 100644 index 0000000000000000000000000000000000000000..84b64703006ca6d86d335b89f8d40b9fa3883c48 GIT binary patch literal 937 zcmZ?wbhEHbJi)-n(9Qq?M~)mhbnDyy|Np_fQDQU%Mo)`~r~W##4N0gJundTm{G tbu}Af#?`K^tFNzT+TJAVU8dErDdY00*wfqA-ripD_|#nQ={XJz)&S^DQ3wD4 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/s-arrow-bo.gif b/deluge/ui/web/themes/images/yourtheme/button/s-arrow-bo.gif new file mode 100644 index 0000000000000000000000000000000000000000..548700bf45a4766e4633a2ad21cdd03a907e191c GIT binary patch literal 139 zcmZ?wbhEHbJi)-nu#f=+R-O3x{>OhHL-8jIBNqcRgAPa(B=5i!GpB#$>9_og=WMyv zz4@M01z+1Ek7>_3m%Tc*Z6(9;Pd?Yb^*;Y~?)yJ}o<}i97JcmS(V9N7;WKBi*YYc? qzIL6>+J0x<_w3ZJ<4-pI?D3myle6{rUd98@zwG+kS1-=MU=08a%|q${ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/s-arrow-noline.gif b/deluge/ui/web/themes/images/yourtheme/button/s-arrow-noline.gif new file mode 100644 index 0000000000000000000000000000000000000000..0953eab5c875fcb0f3b40babd89052b064bf9fec GIT binary patch literal 863 zcmZ?wbhEHb*_y R+_d!cbc5tmb0h^AtO41(Cb0kj literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/s-arrow-o.gif b/deluge/ui/web/themes/images/yourtheme/button/s-arrow-o.gif new file mode 100644 index 0000000000000000000000000000000000000000..89c70f36fa653684087485ab673043ecbf615cdd GIT binary patch literal 937 zcmZ?wbhEHbO`C@~rWBPawEf3h$$FfcLbfcy-~6AT<} z46G~?3JVq-Y-VLwiqV*$aJZREUaCi9W8%>kKJB0>J3c15x5sMVlHA(yGnuN7&N42);+}s>}e3|KPvE1;j`8SW1{tiuYV6X-NOpiu@ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/button/s-arrow.gif b/deluge/ui/web/themes/images/yourtheme/button/s-arrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..8940774785c25d4467b239aa608a9eee40e273d1 GIT binary patch literal 937 zcmZ?wbhEHbkKJB0>J3c15x5sMVlHA(yGnuN7&N42);+}s>}e3|KPvE1;j`8SW1{tiuYV6X-Nh3iI; literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/dd/drop-add.gif b/deluge/ui/web/themes/images/yourtheme/dd/drop-add.gif new file mode 100644 index 0000000000000000000000000000000000000000..b22cd1448efa13c47ad6d3b75bdea8b4031c31e9 GIT binary patch literal 1001 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 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/clear-trigger.gif b/deluge/ui/web/themes/images/yourtheme/form/clear-trigger.gif new file mode 100644 index 0000000000000000000000000000000000000000..da78d45b3214480842c62514af524f4aebb66124 GIT binary patch literal 1988 zcmdth=~t5n8U^q-VGC;mBm0hsV8ubLEt_Ll8<8_(J7+8+GN29vjM%!ALxG`*vV;KaE8sA!@Y z4L3~1jhLAW4>!Ua947Tqg?%((Kh;b$Ko$&=1w*rGb*ec?N^AxVXqe@UN>0 z891^{u56v7+E|jCmSrZke1FwUW#X##SBxOn2(GSyLZMKlQmNHyjYgx@YWd;~fq0Ft z+7v0*1j;R;!o*jZMDlHsa!;f+iM1w)YEP=(muf+oW=p08<(hqkW|zMX3O7KpZcnTO zrMf+lxo?0HvrSO0Hz^EedrHHu(zqvI1C{Hb+PJIP0JWQ-Y#UT;feI6-)9Lhjy}@8G z8jZTOUH$s*&hGy1-ahdEdx6`Q=5Zi!^uxptKLNl%;1tXUNoYe@!v1h1gG9hjRlyIY zT+i)opRVyJ$m^OWcFfcd!goE+KKq624@2~*{(Gx41$X#rT_Vu?_+4{kc3!~LZ@o|e@KE%NaSqqM2CdnRrfg1wYE_n>MZsu=aYxhs@ zZYg1(SHAI5{)vrY3S>+Sr2G5!}cb)=Lak{l#IcWFsP=h z54sOE<$IwK0i|U>!mQGuh`69u9r$a%T`NxXx|!$| z=ac7y%X=&#XG<+_jk=4wnhTGFb+y-lKaBeiK%tbtM}APdfB|~CqPsh#af)y^(trRQ zEp@1acO7D$So@a(lTLRcQP%+{D$xQ)D?;t7^o`EZs~jG0R~!KcEY9V= zMfruL`9PuG*Qsdx+dj=Ii`&E0II=PwOPulj+Tj@q29JB~T2{m(hfi&|!E zBM$OTv98=N_;e}11gu55UTB%9W)-L))9jWO$gpd{tFfCL@43sLIsT;NS-D3u+AQ2N zWr!%TS6ADl-D$@0q>qlSMI`y2eiHE9u3$58=)j+XZx;IBIT;=;f85a*t?a9*L%6-} zN85P+E0<{PUGyX_R!^ME+)_z>Mape4XM92w`b7;YV!insg9^+qDfzUevNmaJNM0}502MlVmsU>iV}`Lr`6`Bb{t@C#l~>;SXe`ck9;fs%svkL zUAe$-+haTd`enn-;A=LHa#CU?4rl5R1@d8MkEOU&)s-HE(zl)`8NRsxz3AFuDKdp$ U;ezY9-WkTkP-6N%4gg~Q2Qp;nKmY&$ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/clear-trigger.psd b/deluge/ui/web/themes/images/yourtheme/form/clear-trigger.psd new file mode 100644 index 0000000000000000000000000000000000000000..f637fa5d1e12460beabc8b49968ebc0ac883e754 GIT binary patch literal 11804 zcmds6349aP)}JgbA;Ocbf>0GuzzQfJ2%?B00)>YNvUCxIvIz*tj;%n8sK7&Q0D1CQ zltrLGX$urmTA(P<7APcb>E5(W(lkk%eQ6sqbH8&Z({?6l6~E8l?|bhhzmt2G|2b#w z%)MuF?;SDbgAWNF;rR%l=?1ij5D}P%Pn#Gda2|Dsn39*gv69|L?fuB$)^z-xcZ_{4X20k60XxFxV=MG&uck0loQ$W{epAL8` z@TpFnxc9s0xL3xsevqPF5EIuLxGK)@FY{NO49xe089u%ln6UW4E9?>u#0o8GIs42h8( z5j{U9=|;dbx%q`xBUW#1D}JhLx2L=J>D%wcpqGXYdu{lL*GIlP_PufACj?LYaQcjy zvqD0{<}X;dXz?dYmabX5ZvBRhpGSVV?W?c9*}h}v?mc^d*!RyL_y6nYvE#p-IC(1W z^!W=HlP_JCrd;{;x0|R9vZ4sjD>ATAkivwb>ocy7~qej}Ume z1HV4~f!ojH3xxt<8{8ire*=)9qtLI{VE<0
      o7Rp;JAVnkiWNRA}kX#4!D)64-8 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 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/date-trigger.psd b/deluge/ui/web/themes/images/yourtheme/form/date-trigger.psd new file mode 100644 index 0000000000000000000000000000000000000000..74883b21c54ba3552492162863caf022d51e43c1 GIT binary patch literal 12377 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 BA5{PV literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/exclamation.gif b/deluge/ui/web/themes/images/yourtheme/form/exclamation.gif new file mode 100644 index 0000000000000000000000000000000000000000..ea31a3060a36a625cb5cfdf4fdc5cb4fa5c3b239 GIT binary patch literal 996 zcmZ?wbhEHb6krfwXlGz>`0sGY+vu>b$x(l^!y&e3LT!$PJ06d9I~VJ7A=2?olFzvm zzpDxE7n6N1CI(zd3A#}bd9NVyZb9tbn*6)9`43}*9>oVgP7HaP6#6VR?0I_l!meOY(6|dTBUw78N>aBj$UH@iM{ilZ1FAYgw8_pbc0Z{x51oBkf&`s?Q9|Ns9pjDkTQ0*XIbm_d%z0TG})!N75lfssSTW5a@j z7VZsy6h0k$;Gk@@Yl-LKR#u*NrzJaX3aNBVGqZFP(Gfc8+b>uAY)8hyXKfvg1xYiW zY*bF=5>dbAA)s8qF(=rm< znzH#Wl@*DQugyk|h0s(J9u~z4MZR499ryhC^~?K*w-=e{wl~-nv>Egj1cL7gguBx% zT)Zq@NE=-Nt6g4JyGT~9fVo?Mjr%bh_W%^(#8yHO+#|w*$V3wYFrM_Cf1JV+84je7 z9ROpGU-)jyX(BU$6nbeLjSW4@*$~LtaEfn9=b%FPo5J`zLU_AExy0xc;4Ihg&$RuV zvJGs78Rz*%p2AAl3(x<8lzp}-|FX4l%|7EfIvgRBjB8tSQLP1VZWEF#ywdLj z>2hyD&Cz7(vFsX(us-NkLs+sfDkV2EMfeY2cqXqlT3nl0R8N;Z551!ZFX)PvHbvg; zPAF=Ql@G){8oW?FobYU%-aQi8(syOzQ{37bFFif|+O^~xchYiY*TsbylHyFUEVrOS zC@mHh+?B~>#g(;XRrU9uJgcg0tgWkKmA77d(0=`qGNYy=^WpQ%CrV+BN>bPLw6R6f z(sR2_!|q(n>iQ^DjS2e4MK5Qv`<8AFEsF-0Btwh&iZ>0-?TxLUQpLzh z&8rU$BjfVd`o|+*kbdR$!ncucOIodVe0*G|(@jlJ&&BTL3F4!sWQKrZSsrbm`jlswPRiNw~ox#)EssIi3K_U?mR$7V-IC9eE}g* z5#SHoR>a6~NhI<=Q;WTt%?}Qu9NUN;+@wtJJS0y=!z59V(h!KT_cmHu5NujLLCxE9 z_QU0%P-;FGb5tI6*gk|&C@tm`|9+v*B6nv=lO}$S+iOD$Mn~aW%lOvrmnW;VvcjwTy1x_M|Vx7g?UOR%A{vxR1=O9xx`_0#)mAz z#O%%n@__a?l=898*N7xDAiI1b<_~Z{nslUk?g_Dey!Eax#h5@k{{; z%`faJ5{8R)QaC;cQD8x5`VzNXi1Wqp3x`c^8P{6P{gaVWuFtYe7c(1?zIg}q~%W>VJ1sc%Av?5s&yuiMsG8Vvph~HOnJjUP7z}R9x z!{}s!KCBJ0F`$WM&Ver~;K&ocSHW(s6Mh)nO&1ErxjYUP9z|fJI2_q7U~QAux`?+R z3gs}A84lrf=7C(=X6VrsYzT(A2H$czA`b%`i`+&{!uU_X)(G<^EyNUO6=M{u;y53QM-q4Y5!fjNf2B$c3=RvJnhbNor$)h(^K&^hwf=q`1g%>cIxsnNp85qN`tNhU3jbmaN?09D@dd_WcK8kleih literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/search-trigger.gif b/deluge/ui/web/themes/images/yourtheme/form/search-trigger.gif new file mode 100644 index 0000000000000000000000000000000000000000..db8802beb370d7554d5319c0e0d5c4ecb8da2c5b GIT binary patch literal 2182 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 BV7LGP literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/text-bg.gif b/deluge/ui/web/themes/images/yourtheme/form/text-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..4179607cc1e9486dd6fcc8467c79b5b41dbf4f76 GIT binary patch literal 819 zcmZ?wbhEHbWMmLxXlG!!_xRa|&!0bk{rdI$_wPS{{`~#>&!4}4|NZ;_|3AYh7!85p p9s-I#S%6;r&!7YHC@4=ba0oCkvIrP7I50A^3uwfgFi>Ey1^^@>A+7)b literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/trigger-square.gif b/deluge/ui/web/themes/images/yourtheme/form/trigger-square.gif new file mode 100644 index 0000000000000000000000000000000000000000..3004ec589026c038e7d056e2b99e3a877d1ecd50 GIT binary patch literal 1810 zcmeH`=~I#k0Eb@@(r`m7uUt*s$}CGwv#`U(3p3rqV|JbGJ~p>wuw%A$t1UBIwalz( z+{&#$%ZT+L@5&Oi)(njo!2=aJUO-TkLqNb6-<{omV!!O~!}Il-d1iizNhCtlp<{qI zFbe>0K=r2)<>eaTOHke`M`}Tc$K&-w`Z;)h1NmlC>qos_ACXo(VMBP*8NSR=2g;eC zTse!>fe=?>)ai87)6-h5_EoP^AP~Uz`M$nBKA*3fwW+K~cv^AWkZNFHpqV2d92_)R z?LwiDBeg?jq*rY07MUBnWnJRA;o;%P^jikAjW3;mVK^eS*lI_(V=4h;GFfaNL{^bV zWP|59VCLdoYHQ)h*?r>{i-ixF%vSq=!rTU`t#k0} zUggI0TWvzs=P^~+(A0Wn8IQWMaOQ0fTZF_<#RVfdDJ| zU-P$Wo*?VVKr zv>QMX8JhcNpY6P}`bdd8lUmhVPVfpMuo|9opEw=-v~3MQ=RHRG1nv9Oc-)Z|m)zHr z)TI1eNurS+6-EBZuS;&Cc#vt;!iFD%gK}8SH6tyq?@1m&3uTYPa>Im(Gk9&3h6-_B zp3}k4Vn(P0zi~{h{VkGnsuu#lr^Ct719}PhhL} zwJTGMKb;z>Igsvlx}rs~`R#5PcR8;)iRvvM|Jk(+(lJoch!ov6ixFnDlj011>WQkv_op8RKJdoL^uEJJCSo!-%b_pjdzFFrJmJ5u%l|L{a0h$@c| zQG*K7nT$MuxPuq(trliLXcs$F;zO;`Hcjg#WrSFHN-C$kgd zQHVYJk}Y{TLeFA3E+FTQu8@r5a-tocYEMo=ei(-!z!|5@yEuY}*X6J=)3sNTi&Up} Wr&xDc=v65PKOA33bU>qlt$zauvnrPW literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/trigger-square.psd b/deluge/ui/web/themes/images/yourtheme/form/trigger-square.psd new file mode 100644 index 0000000000000000000000000000000000000000..e922ee65de361157b2c9bada8704be67a50510ea GIT binary patch literal 36542 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 Vn+0%uFaj>+OMzhhbM}qFe*^Pn6NCT& literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/trigger-tpl.gif b/deluge/ui/web/themes/images/yourtheme/form/trigger-tpl.gif new file mode 100644 index 0000000000000000000000000000000000000000..e3701a383107e090fe25d3fb8d63aaa9290435e9 GIT binary patch literal 1487 zcmeH`{ZrC+0DwPCBIojs3o|_0?P^-#Ox&%!R?e}@xx}{YYR;I~>N*jn-Qn&=-p-KA zeA(%=S((N$6_|l9fQC+Hxi9#N2luQwPBW3%=l!}^GELum-8=KbTwwF%Rj%DgphgD1_aTFbxxSbc_7 z*tiC}T&|Us6}Q{%@p#OB*cyNreCzg?@X|W$2*O^k*XQ%C`Tc=FAQ%j8?6A4LxwQ?$ zFnGh80{=sSgX_p0D-7aZyI(&6LSe8g^uSq3699<4vDu>uKv9OqBv(z-4-J(@5=c^c zCvT(%gPg*qb@7!*M7$td*%d>&myq6H6@|%BvEwc%rj<`}&sV>d68bLbzTg)ez92R{ zL%OWyA+pbMNDmz0eA2_8Du?G1p`W#a zi*2IW=5FT;Nm@-f=nK&Ju|GKH$G>G{YFkTqB2{y*&pLXG@cG}HCp8gjUV5YGKrX;c zKcN|~+$?$NF%5hJAHnq}74oAsZQo5Wi&P-SqG~)}Tn55ltvZdK`IT)rc<_XRg^Z+L zEoNSBGTq*jc(eqdQjVJMM2OG;fu#t{Wg$qSxg0~TkXJ<4QMskK7QwahebOaMWkPZx zRCQcO<&}om1lH;#2Gv?~f?O}Zn-ZB9UH!@7hU*~W__FO@Msfvo|59dNOf4yZWj)Bw z%xm6#wG3~s&!Wh#gS~vA{n3r&QHV_+#^*Lr;_-`|0`e>QZ$*LSBb*;mXnE6}$b132 z(DJsR0TJCw1C%R+wAP Mbv*YluxN1lKj3usvH$=8 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/trigger.gif b/deluge/ui/web/themes/images/yourtheme/form/trigger.gif new file mode 100644 index 0000000000000000000000000000000000000000..f6cba375ae3a96c87639a5b3034d204953d1db14 GIT binary patch literal 1816 zcmeH`_ft~`0DvC>l)V*M8qq2uh!jyON)b6kq!482iD+?8gcdhyFlbZ|=|RDBw1|nK zYy=g-LKp%@NJ7F0kj2X&VI?8&k(c$_{t^AH-#_r(eRtok-4Q`Qq@Dnl0SotmX1et2 znD}NDyN)jG6Qb30kilRKf(n0Ju2yFdDUimGJpp_36beNxUC5kJ*3g9v!Msd^{)2b{ zt)YWDy+JOQ)A*{nxjFfQrm0UnJ3HGlGWq@9yh#Kd7#LtOnJgA-XlMwAVF=L=4-dbm z3fXKnRiF=ye+a^8A5VqoQJqfL&C@akG8PEYxRXj))60QJM@IwV@*uUQp?9K-gJ^UH z4u_-FYMW@18U{!cz;a0asZU(Z0H>#?IrHd{2&N23`ni(|NYg@>b`8qZYBi$ODPSFh z7`jJhAVkyHJFzMLVGDbb%7s2qg)pKQKO~dc9tw(M&*S2TMv}O{ul| zX(hr_p*$X+#+A0Sq=O=OW@d&4Y7hhgA#_j(ixyB=hq5JVKA%tHNdpt|spDd)a$!U? z)5sF_^Hs10Wr_7%E*AvBz=Vf`lc;0?RY8zKjRwZ&(}g;vQppgb43Ta~iVm}RDwPWO zpZ~tVO2otn0PX`m|Em6d0x&}XXEXQ6TK?^DjDz>V9vskq*Um8{ZzSEb>&{ZYsD`$> zm)(zuOII)3T~F#=j=_{4?5+PUs&M0;zw%rhk5ixe#BCnweRnc8-_pj+BdVzUj`_L_ z?#D?-(@DGs1nWi=zJ{hbxhrf&%I9P;z^0j13zsoCgUyB!LQG$M=6Bn zEAz4?W0%OlXZ*aUKJ;U)pd(AW$gbc;9oStk74bN_sb181!*oCQpv$^Dw9=iqU&fOF zA~XHNGjV!qu8eunzbD^*Rqi>fhV#@l+mqU6##_(wB0iO=C7ZkUxySYgSDd!7KA4`t z06t~PYMpC;jw9vdJDi-&MA7~e!G~Qkj#U=LMSSMXfRx;YLuK16N&BjCr(TdvP5rdc zt{pce*VU*awki_c3{bJ8r)Ojoe=08|_7OJCv7kK{Qgd2!MVLiRi_8Mw-eFrw8P7v;1u9x z-}%LDSypYcB`tYg>w`BBcdlCOdCe)M zfedWoWIDv&Q{*sXo@UiMg$8V^0TPUXMplY3&fDl%31>0(Zc)nn!H}aK4fIu=z6)kv z-+Z?)QwhI?k0h;tqPxe!h}L*+mSyQBc8+_@CEm253L5eZ-+%~}u_Mh*3<*qT_XkyU<3LnMio0A;#iIPH2>?PU+mB(da-cCK;QqFvtUd_gzW zR3d9re%ms)ZMLbqzj@+o@P+O3jjpA7c>MCCZPR2MtU)a-vAv->;ui9GR8TT!P_r-l zp)l_j*PxyKbA^6(s&E5fn9Jqqg!@{l99z5`bkz(Dw>Ii+vxSa)plM$yeY@T53FcuX yYq-rg40qd+b;#6`NHN(^kZr9xY#!i+x4U-1Xsrs12{a3_fn)Cim5HGM5d1gxR!0f| literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/form/trigger.psd b/deluge/ui/web/themes/images/yourtheme/form/trigger.psd new file mode 100644 index 0000000000000000000000000000000000000000..344c7682409411be63023e77ab2e2140403a4fcd GIT binary patch literal 37599 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 HPl*2qO$roZ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/gradient-bg.gif b/deluge/ui/web/themes/images/yourtheme/gradient-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..8134e4994f2a36da074990b94a5f17aefd378600 GIT binary patch literal 1472 zcmeIx`%jZs7{KwDTLnZd*hMh7R3%&{VK|xh5d@TrMjeTpnq?_&b8`}Bh(kowLJ^R= zwLrP_Mz6F*N-1{`N?)K@6i}uD1>V*|OIv8)A|*;9JN<2c#7;i>=A7rpCpmEmrw$)U zc7mcXc@UIVGnG~gOy34*)9Li-becMyuD$~>)ERVj219+9F_Xbm-(}8ZvefrjGxzFd z?gQ+Z2W-&U2kcoQXO_sF&Em{uap$rD-W-Vsija6n4j*~Q*W?J0hYp%tpk9;bpv@I( z@`Tz)B2B(fn=b+vZGl)@(4Z|8YYQ8+MGfzZp1v;z8bNg>jk*$vu2iBclgyVj>B^es z9|O{PvUGvmyzs<9PmwK9WcqTTMPJ^kuV~R%wCXE?Ha*qBP}OFjwi~K|4nuYOVl`;T zVhzx_SPOK48f&|ZG@#o^cQDa=jErs*qsPQ}W@7f3n4r(hETGq1*K1~j_Lq?Dr%LqcFxvPW zut}by5*6B{LZvEO(+Ju$Vv_!sOuZvAc4ePkK}Mg^X|R8{wv3g3jV&Qm0~*o(w;!4zGtP^}q4TE3f=4jcq2s zNTj41IT7{z(FAgK^iIzZ@_2j+Ir8!+!Q#r@%9(ju7k_5|Ghf7eqx2?7%YoH4jP!wx7HA*Q43) zwFOW=pP6ly3pn=?dHpWVl+z~h4aA7q3Dbmfk>A9h*D=1j0=ZkaJtNDl4|Dy58=OQ4 zb=w|rEX#G|6q4dPk_gFV6VcYbmUmazi7x6i6Xb&As-j$U2PJ(S9-JDYvw05^=DZ2M z-q(%65iC7!Sf=Hfs~2MFb#cc_ASYbPO$Z9ewDx-)GFuhcxKI?v{g{Fd`2H?N2mNoG a(II?Zs7)DAnPM9b=8J95L)rdV=-9sjoxm#q literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/arrow-left-white.gif b/deluge/ui/web/themes/images/yourtheme/grid/arrow-left-white.gif new file mode 100644 index 0000000000000000000000000000000000000000..63088f56e1c33fd23437ab00ef3e10570c4a57fa GIT binary patch literal 825 zcmZ?wbhEHbWMSZBXlGz>`0uc0#Y_e;`2YVugfU8vhQJ630mYvz%pkAofCx~YVBipA cVC0bDXlQU?ViVMIiI|XhxRH&WjfKG)0LI-8@c;k- literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/arrow-right-white.gif b/deluge/ui/web/themes/images/yourtheme/grid/arrow-right-white.gif new file mode 100644 index 0000000000000000000000000000000000000000..e9e06789044eacb8a695cd1df46449bcb2b9aa07 GIT binary patch literal 825 zcmZ?wbhEHbWMSZBXlGz>`0uc0#Y_e;`2YVugfU8vhQJ630mYvz%pkAofCx~YVBipA cVB}zNNKj~OV&PY_IbpESp@o^1jfKG)0Ls}94FCWD literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/col-move-bottom.gif b/deluge/ui/web/themes/images/yourtheme/grid/col-move-bottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..cc1e473ecc1a48f6d33d935f226588c495da4e05 GIT binary patch literal 868 zcmZ?wbhEHb( zLO{cVgpLOZ6Fwx&_)sw8LBWC#1q=Q+toSft!~X>b{xgh%(GVD#A)xq^g_(hYn?VQU zd{CZX;BaIR=ZFzVT;Rwl#vu{Yu%W4$ky$xng~3BdrVc>?i4_ctPK=BUEM^-R4mL70 a^J-WG2rw*VW@C5a%Q0YR@NEQ2S_1&+BRBT| literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/col-move-top.gif b/deluge/ui/web/themes/images/yourtheme/grid/col-move-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..58ff32cc8fa2aa1be310b03bb2af77c1b77abe93 GIT binary patch literal 869 zcmZ?wbhEHbG68wVGIhem=U(^LUb4h;c?We$u2%uEc{03e(}^8f$< literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/columns.gif b/deluge/ui/web/themes/images/yourtheme/grid/columns.gif new file mode 100644 index 0000000000000000000000000000000000000000..2d3a82393e31768c22869778698613b2f5f2174a GIT binary patch literal 962 zcmZ?wbhEHb6krfwXlGyuEL<5_v@*CDh*pJ^t_~?(6IQl1ymDPc)rN@bjZrn5V(PZU z)NOSrd+hMvA+B+IeDltP)?JCMyOZ1ZrgZEJYkQj3eITRnaL%L?Ia5yNO*xf6?R5V1 zGX)b57R)?XH0ylvoQuVCFO|-_Qnuh~<)Ryvi*HsfxmC5~cGa>w)ywZpoH%jn)T#64 z&D*eH!>(Ps_U+r(Fz^e+YaA8aNxk9Lx+wXJ9gs4iBqReojG&n z?%lgL9)0`&|3AYh7!3i+LO}5+3nK#qAA=6a7*L*I;F!-K%OT^jVZp&>mh3YgjfYq| z1(lp?K5S5QW|J^Yxp3pe#^mFCnoeCZo|g`B%4>LkiP*V`#cPUi%)1K8vI{DjqJ>lyj2t2o f3la`CGVn;rtSCr4)W)vpHOFJ)qNAORj11NQ63h`c literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/done.gif b/deluge/ui/web/themes/images/yourtheme/grid/done.gif new file mode 100644 index 0000000000000000000000000000000000000000..a937cb22c84a2ac6ecfc12ae9681ab72ed83ca78 GIT binary patch literal 133 zcmZ?wbhEHb6krfwXl7towPL}p0*huu%~roJzC1V7qiQ)z(xVq;t8Q*e g@TwP&*%vbDj%DY0^FxMh_Sd^OqF)Bg*^}7&&A#5)LvkG7IyS zOnBJr%r7CL!Q$}XP&==XoWqO@51m;T- zPZpr7|1;=-+z!eU3>@+d`VlJv8V|8>3M$wXTxdAR#L6ikV-V2L(7?dJ#=^p24FK}3 BP__U7 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid-blue-hd.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid-blue-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..862094e6803f522712e4d193c7becd8e9b857dd3 GIT binary patch literal 829 zcmZ?wbhEHbWMmL!XlGzJa`*r7`~Ocp_<#1%{|it4Uw-=k+VlT6U;e-I>i_*W{~x~l z|K$Du=O6#S`uzXxm;WEW{r~*q|F@t2fByde=kI?YU>F6XAuyCfK=CIF(E0xvbU>Z} m<=_zzU~q6?um%8<;zWG_ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid-blue-split.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid-blue-split.gif new file mode 100644 index 0000000000000000000000000000000000000000..5286f58f6f798184c3eeacba1352cfd39b9ae03e GIT binary patch literal 817 zcmZ?wbhEHbWMbfDXlG!Ub?iS7FpPrH5Ezjmp!kyo=M_wPS^_`om@~ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid-loading.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid-loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..d112c54013e1e4c2f606e848352f08958134c46f GIT binary patch literal 701 zcmZ?wbhEHb6krfw_{6~Q|NsBg$>(oA`P8%SHjuGk&%@0ppYOTwO7TCppKD04vtxj( zk)8oFBLf42;y+oZ(#)I^h4Rdj3>8V47nBGRLn+Q9-(eXZMC@T`q-A zfguTok_rhvuF+B}YGk&S-hZ1Y!QP;7UE)!jv*adK6)hob2AOf}GE&w)<#=MknJHoV zY^}*Md|xE}K6*MO&RAU_^MUKk=Djk=g^pDJi6uprK3M%`#IdVL zUEAw4e{ zmg0{~p6|Ie&p`6H%mYO|r)_gjg|As;$iv1hQk=MZgX#CFjEx2xI6HUG&(-w8Y7Wpj zcm93g6udbnGzoX) literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid-vista-hd.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid-vista-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..d0972638e8305d32d4a2419b3dd317f3c8fd3fe2 GIT binary patch literal 829 zcmZ?wbhEHbWMmL!XlGzJe){5xGZ#;uy>#l_<(QpFT5;g3%Bd$|0cmlLhGf{|q`H nPk{0S1BVoYrq2Wc#zV~Pyb=r?3JDC2Ol*7#9t#p29T=29Ey>tSt{5 zHY{*#Vsg}oIT5h%K(m0QN{+|JM3-h^O`|Opf{7fxyq0BWID}eGbgMYd>zNVs*sDWV zoA1qwjZY3uXHRaM;~D(iZJx6IEfY?Wr2(@o4CQoZZdq`CwriwbsHEt#km;etaZ`6L zTz!3gENh*F_qI0?jS`nu#m){}(7wIk@jlUvh3oF_E@dsdaeDjvxJFSXZaJBV1#O2r zgyqE~6rDPbPjEKrQ!sFDJ262wU4TQ;rQ!Sn=9UHq#|Nzf3_+{e1Rfn?ZRD4$;FDGQ z#@r~Pu^>)X$(*&3x9Pl?tj&%CoF~dRyY`d67r$SB{>v~5Mnhoag@EEu7NDp9Gw6W44$2b@93l*? Z95Nmo7Bnz$2y4ZhC{SczU}R*l1^^j55kLR{ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid3-hrow.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid3-hrow.gif new file mode 100644 index 0000000000000000000000000000000000000000..8d459a304e0b224f8c28d6b7b585da7019d28cce GIT binary patch literal 836 zcmZ?wbhEHbWMYtDXlG!!aN)x1H}BrOegF2|hj;HkzW?y)!^h7bKYjW6^C!b77!85p z9s-I#S%6;r&!7YHC@4=ba40eea>#gWNI1yM!7mYUVnf4WCKe8!85Rx=4Ga>@3=9GS G4Auam1ttan literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid3-special-col-bg.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid3-special-col-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..0b4d6ca3bf28ba44b4ee215fddf936aab7cdd5a0 GIT binary patch literal 837 zcmZ?wbhEHblwe?DXlG!!aN)x1H}BrOegF2|hj;HkzW?y)!^h7bKYjW6^C!b77!85p z9s-I#S%6;r&!7YHC@4=ba40bda>#gmIKarv!7ZX-kkHV;z{nslr{jQv6El~jRSSoL H0)sUGu7M?* literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/grid3-special-col-sel-bg.gif b/deluge/ui/web/themes/images/yourtheme/grid/grid3-special-col-sel-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..1dfe9a69eae133929f3835ffcfd108959539b9e5 GIT binary patch literal 843 zcmZ?wbhEHblwe?DXlGzpb>`cJ$GN zbN|hshj0HpdiUqa`#(?L|9SS|&x?`0o(b_B3_s=d77u3+H|!r zfbs+bM-c-fhm6OD1qYj1`88rr6eKbU2cZFVdORzJ@!m~?8+%1KMTTg@3K$aq~=^PX>8{)(q7 acp2+dVHKAK1EYrP>l5}X$w&(@SOWm68Djnb literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/group-collapse.gif b/deluge/ui/web/themes/images/yourtheme/grid/group-collapse.gif new file mode 100644 index 0000000000000000000000000000000000000000..495bb051dcee00b837a948af56f7a59e77b69aa5 GIT binary patch literal 881 zcmZ?wbhEHb}Lc00Z?nwEzGB literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/group-expand-sprite.gif b/deluge/ui/web/themes/images/yourtheme/grid/group-expand-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..9c1653b48dbd2d4bb00886c379ba3a66813737c4 GIT binary patch literal 955 zcmZ?wbhEHbuiX3i z{QdXWpZ@~^!zdUHf#DSbia%Kx85kHDbU@w$?_tHlbAgvKT&29}T*1_wr_8B7v4Oad0D zH!!O=%UO7AS#fc($7HS8Q(IPEULLU6Yp&PURaaMg26lV0F?{M|skyG2(-{0TB%q{1$Bh!Jw8USBOURwYF literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/group-expand.gif b/deluge/ui/web/themes/images/yourtheme/grid/group-expand.gif new file mode 100644 index 0000000000000000000000000000000000000000..a33ac30bd2b3758ab2e003f70ce638ab77eaf101 GIT binary patch literal 884 zcmZ?wbhEHbbN~|U;Bpe)@m>5|?LIe~TnPxDF-7pDQklw(o P-YjR~vE{{q1_o;Y#^^iR literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/hd-pop.gif b/deluge/ui/web/themes/images/yourtheme/grid/hd-pop.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb8ba79679eabb7811c3d9d1c86c43bcf67552cc GIT binary patch literal 839 zcmZ?wbhEHb_??HKjfkTCXkweD9 mfT4kbgI~?WW5NQ*7JhN9o*xBDE*)ahRw)@D7aeL~um%9t9ucMh literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/hmenu-asc.gif b/deluge/ui/web/themes/images/yourtheme/grid/hmenu-asc.gif new file mode 100644 index 0000000000000000000000000000000000000000..8917e0eee0cdf7758e83c4cffa7a7239f72b8427 GIT binary patch literal 931 zcmeH`u}i~197Zo~Emb-ML>(No#i13!1{`|2)F4_jl^X=3LnUJzge<}>RZc~zP~kV; zB68w#pu>SnK&adpIt5*dn`7OIQ?33Dj(x+oeanNlwY^!!2PQI6AN?^vMGITlu?Sc$ zU>9uS*}igoaC}8PN`jCCnovooc75v7&|^Bl#h|GI2x(JLP!wWjlNOK|~-m_dM?T+-E!pI0dd^5l}(d@Glq_swQ5Q<6ypk{;!;VaqFyLusAH|W zI_^hNH}3WaBSr@P!$9skWgujrrQZ^Mn?RWcN@fn{AM5KVovc^P{B4D$=SroI5_&zI zNSF`DRwb35%9fAbth<-%@nxq_$~TO}IN9OvPh(dz1*g;6JvytHv(;6&xjkRcOr!mB r{VRFNa;Pe5osHT>5@ibIb~{3g+0C%lYO~3O6<&R=-|w9m23q?84YkzM literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/hmenu-desc.gif b/deluge/ui/web/themes/images/yourtheme/grid/hmenu-desc.gif new file mode 100644 index 0000000000000000000000000000000000000000..f26b7c2fc5836850958f7f2b1fafd3988a988d7a GIT binary patch literal 930 zcmeH`u}cC`9LIl>nH9kiSwcv;h)RPe4nCSX#PT4JtLbR)IJcwe#y6z#3aSf)9!+l$ z;%yxW@kSwnZWM)ZydeVHiWX}!?QdxG!)N_2ANcN;ig{#6Ai)s+7(q%#GE!y5mQ{jO zj5MrhrlNCIcT|&WCe|#b*{*J3-4-SmmeaOT%60^HIHrQgae`8gf*j^igs3uBp{hnT zopO)5V>`?=nQ1YLFxzIBGSTNY=9rB4oG{nnt~U^b3F->w3Rehk(B^L2>$m$u&+|JS zzvF-O{o!cJw7~xri2now00G#VJYn()2%o@AE8lw!UPJ@SiC{BRyCfUg+)-YByjskr zv+Ug{Ji~hAw(%`jAsUlHdvfpXd_GaEWO`qB`!@?~^gbD{hpr>BT&DZEGYhLy?xoZ; n!ca~nNw;=d4=v4s)H*Z{&Ndrqrwj#{39jU-m51Y}8o>51Tocwt literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/hmenu-lock.gif b/deluge/ui/web/themes/images/yourtheme/grid/hmenu-lock.gif new file mode 100644 index 0000000000000000000000000000000000000000..1596126108fd99fc56226b412c6749c55ad5402b GIT binary patch literal 955 zcmZ?wbhEHb6krfwXlG#X4~ou+bjZoeOV2FG$|=q-C@C(jDlf0eD{N@b6W`Inv#*zP ze=o<1{(yu1+=nJ`ADhB`dOG8|nG9#s|^2dGCVn`{Pc*@>k~$=Pg%ddVgCO)!~fR||KBnE z|HJVAKg0iLR{x*dJ-;0I|GC%y_pblnMF0Qq{Qtk(|NlOXjV)~*Jzd>>6DCZaK7IO( z88c?ioVjUP%kt&RSFKvLYv;-0XzkU1m_xG3of4~3u@#FvBAOHXT`19w_f1o=? z!B7qX#h)z93=CNeIv`Jg@&p6N42G*5G9DWiIGRQ-bEs^3`rv@RCy$K9p(kC=rd|^` zST-*?>B_{iQlwx7E2E<(Ghbe(62oy`Y27&t0f`^nn;9J1SUxr?H8M5pwCs2h(8SWt zC8Qv+=HXHgep#c0o(mriDDdjJR6ObU=;Xr2&gPqN_0-kZOwH=MQtsX=WoB-cUnB8y dW3n5EfMAf!nn#R>TRBB^*6i?z@O5CY1_0nG4B-F( literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/hmenu-lock.png b/deluge/ui/web/themes/images/yourtheme/grid/hmenu-lock.png new file mode 100644 index 0000000000000000000000000000000000000000..8b81e7ff284100752e155dff383c18bd00107eee GIT binary patch literal 648 zcmV;30(bq1P)WdKHUATcr^L}hv)GB7YRATlyKF)%tYH6SZ6F)%P+<{wS~000McNliru z(*hb477vONgHQkf010qNS#tmY3h)2`3h)6!tTdPa000DMK}|sb0I`n?{9y$E00H1h zL_t(|+NDy@YZE~f{$`WrhuKPySQAA=4|-5UL@Ysj^nd8hiS;2Kdj#HUllo z8f~>&*KFH9Nwz?Ckui3oR;%3`NI(gPUDtho|G}f2_3e8bT8ASerBbE5)1bTYdcFQ| zZM?C8k+I47`6u~>51*b--wCz*ER>uRr zeV-UkHLH%}72i$a+1i|RAKlWyIlu9^60fuoN4rrzunmYfG3Rj9y^HEzZv5(CEO81y zUYkzkSk-KQ`3%0SF=Q~vI7Aru=z0O7P{Z@#ja`PhX$8v2D-^Gzc;YIGcnR19E(0MI z;kZD@0aiO(XrN-PsAlqHZzKK#l1tJ_)zheV5(%VKYS5UK?$7C;0+>qp-G76P-YrWc z5ZrIlD9FnLDKc3)8S0<dA!cTgY+CR4-a*;u;!NrNF3LWTlP5a1_; iES|Z7@j-3=)A|j?vD&^)Yn&Va00007>1uYXA>3Qh}beSb(Ur!W`$ZoRvwlh8h#GSA{v3P9MZmob1&N}#H|)3 ziyhJ(U{)KHf*@)Iy5?}L)|RKuO{O%cx#h;IvM2X1`q0Jo18y$3o31q0)ZQR~04YGX zfXCOw7l;j1uOz`;`%xPF|1H(H=TQ-Al80O7c-*kEIp@ZM``Ch}Whn7a@ zEo{qiRYg+i%R z4h#&aR4TPvt$O^~PNy46p*I)|Mx)VWGFdDZtJOL&G4XSL3{j3aZnxWK zXJ;3eLR8p^IE^@iXhU=a0)b#Kw7t0&jYea!SUet2Boc@bilUOqB;u|J|M|xX6jAAP z03n=6?Mi(Dm?nrZ^SKu7#oi7Bm%1nSA1H5qaf|0_D`c0ZeXQSbMRJ}Wp^ujFWEojX z(Y1{1lBcW8em3h3o6B)FgQ$TZv?6jQ8yMxx;o>^&qx~ghy5ef_6fHB&ac3`cuq8MD zSbdMbr>J*|b@#!#g0h@qxe*x=qGVcHY literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/hmenu-unlock.png b/deluge/ui/web/themes/images/yourtheme/grid/hmenu-unlock.png new file mode 100644 index 0000000000000000000000000000000000000000..9dd5df34b70b94b708e862053ef4a634246acc8d GIT binary patch literal 697 zcmV;q0!ICbP)WdKHUATcr^L}hv)GB7YRATlyKF)%tYH6SZ6F)%P+<{wS~000McNliru z(*g|-5GqRX(wr!towOa3bz1}%hRS$Ze*UVXl27U>F*+kf-M;&k-s!`fDVCrZezlf>dy^3`BTW$z=L>EIW zO>?T0B!*En2q>u<@}12dniz6|2?Qm9qx{jpBiX~P{FQ(#@rTzxF``)#1i>x@j&6Pg z`g9}R!YZ+#Bpq}r3e{~P5}$S=h*)1OVUmx@SN9wqKg;4@^1P3fXJWAV73+q9*IOoT f&)vjR{Ezq!d`RXXnklE900000NkvXXu0mjfw|6I- literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/invalid_line.gif b/deluge/ui/web/themes/images/yourtheme/grid/invalid_line.gif new file mode 100644 index 0000000000000000000000000000000000000000..fb7e0f34d6231868ed2f80b6067be837e70cac44 GIT binary patch literal 815 zcmZ?wbhEHbWMN=tXlGzx_z#4mU^E0qXb33&WMKq(T?a&f@&p4150I4La9D7liGhiU G!5RR1hX@}4 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/loading.gif b/deluge/ui/web/themes/images/yourtheme/grid/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e846e1d6c58796558015ffee1fdec546bc207ee8 GIT binary patch literal 771 zcmZ?wbhEHb6krfw*v!MQYQ=(yeQk4RPu{+D?cCXuwr^cCp}%d_ius2R?!0jBXnAQ) zOH<|l|Nj|aK=D7fpKD04vtxj(k)8oFBT!uNCkrbB0}q1^NDatX1{VJbCr|b)oWWMT zS%hVC ~NwO_yO%;SvZ5MdNYf|QNy-I*%yJaj+uTdt+qbZ z4E`Fzb8m}I&!N8OKmWEcCmrLs^Hs&3i)mt@hQVdcqghkaBs*D}tG_lKew4?rTjzIZ z9tSone1TS+TR7tu^CunG)Y7Jg#sw#)sG9C!c0I%LEzP)9;hqRf&)s$D8d5Db{TBs% zgl0~5QQ91luq4Q9tJgt4QLbaxZvAaKeCM9!oy85dg4k>TdBSVqjHub_PG=PO&J-rx z7oYTuF+kH|tG-UK+EkUhDjYx?zW?T|lx>+aOQm zzL$v$zBLo4Cj=G&tw{H}dW?tlTkS)SY4<#NS92z*EY-MMB6Ftp`R=*=*Ev7cS+X%W zMCur^FdlokL}1Y+&aasU2J4#EOuNlnb9CmqgLCGTSY!1BD42pkHY^XidQ5=>YQx%` z*%Pm9D!CkBu&tMWm(%-ejACVWGS2RX5=QOJ$1*tr7F}F+*-OA+Ly&Isg|AEuUYicA z#%IG6kPXkHt{zk2M6zK@Vu^4Q(1zE$?yY6M!^&jQ+2^E?!p7{g*|X6}vuRC3p@jk0 W117c83?+LXEZI4G$p&LV25SKE>nb+@ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/mso-hd.gif b/deluge/ui/web/themes/images/yourtheme/grid/mso-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..669f3cf089a61580a9d1c7632a5b1309f8d0439a GIT binary patch literal 875 zcmZ?wbhEHbWMYtKXlGzpd-4Cei~rYO`oH1Q|BaXbZ@T<{^OgTwuKwS8_5ZeO|94#b zzw`S4UDyBbzVUz0&HsCE{@-`&|NdM558VEL!C+hQ;zA>HJFm1! z#)%1x%x&D_IuR=Z8kt%-g@N({4h;>A%p3w50S6iynb`#tJSI3aHnDO`7-U>H(Adn* Pui(%j;MmmCz+epk$!Kdz literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/nowait.gif b/deluge/ui/web/themes/images/yourtheme/grid/nowait.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c5862cd554d78f20683709d0b450b67f81bd24d GIT binary patch literal 884 zcmZ?wbhEHb6k-r!XlGz>`0sG^=;33>fanOrC>RZa5f%c9KUtVTUe*B-pgh6A5y-&E zA>*-O!NDdb7MYkC1`iK4@=0rzWCSQRbnt4Ywd@dF=+rMIANR*%(jvDmG5%#TnwOp& kU}SchrxH17*#QO%<_$5P0_ncfbgjEYUKG8!(7<2~0Pia+WB>pF literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/page-first-disabled.gif b/deluge/ui/web/themes/images/yourtheme/grid/page-first-disabled.gif new file mode 100644 index 0000000000000000000000000000000000000000..1e02c419f5e73fc1ba5770df0448d44adf856288 GIT binary patch literal 925 zcmZ?wbhEHb6krfwXlGzZPfyRu$tfx-s;H=_udjFb@6g=b+}hgO*4EbE-rn8a-P_yS z*VotI-#=;6q{)*fPnj}h=FFM1XV0EDZ{Ga*^A|2$xOnm6B}gPhY%v@z$+dw{PFR zd-v{x2M-uV!Dt8!L;Mq+#E6<8x|aFW_O4e+3))3Q*|Q=94?bWMk!6jGP<+(r$fM>Xwqe7gmNr&4?FkK$jz>EMMFb>zJ~*Z~ zvMU=|C?p6pu`gocw@ENKkig96%Ptk5a9{xwcPOV4M}k2k%Q{v@i4+D0okN>5F7xql HFjxZs_zi%( literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/page-first.gif b/deluge/ui/web/themes/images/yourtheme/grid/page-first.gif new file mode 100644 index 0000000000000000000000000000000000000000..d84f41a91fca3a0ccc1107a78ffbf7b62c527afb GIT binary patch literal 925 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!N5_)V9X)ov0=f%X7nX_llo;Ppa!i5VLFJ8Q4$&%&Em#6pV(z;0OW5pDfG_ z46F<~Am@Pc1OrC}12>0^$A$$5o7t@;-Y_UNJMxKf6&W}lT+k*Y$eyJjc<@21kdg?` z9)m}X2f37ODg+`IICZeGskVGL@ZdlLlaQT?!H)&bz6?zAIR*(A8e5nhSgkHN9C*OQ m>dC5ipkT8?(+Va*AAy7q4&fY(0%9#)p=)k#W@Tbxum%8@3U^Ha literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/page-last.gif b/deluge/ui/web/themes/images/yourtheme/grid/page-last.gif new file mode 100644 index 0000000000000000000000000000000000000000..3df5c2ba50b143fca7d168d5acbcc4404b903ee8 GIT binary patch literal 923 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!N5_$V9X)ov0=f%X7)sh7DeV(M==$yO&0_YC2+|IvM<}Q z@ZbVY8B+}&lf=VK2L;XIwg}8jWa;H%bG(qjsCck}M+|z`(?y z1M&eVPcU$JFtBpScx+g3u$hC^!6V}XBXb*zY)A!1phGj4Fjq*7gQ62lFOR54M?r!E kLmQ{U6cz@-#wJD`MJWvdVWq}d0_-7oPHt8|*uY>70KTb0MF0Q* literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/page-next.gif b/deluge/ui/web/themes/images/yourtheme/grid/page-next.gif new file mode 100644 index 0000000000000000000000000000000000000000..960163530132545abe690cb8e49c5fef0f923344 GIT binary patch literal 875 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!NB3cV9X)ov0=f%W)9;69vKr@Ionu*A5?G{Hgn3DYJ|un wK6d5q<#D`_!KiqUp-ntt3Jb$U#ts%8MWY1*!jGC}2?&SWIk{Q=U;~3S0KQg&YXATM literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/page-prev-disabled.gif b/deluge/ui/web/themes/images/yourtheme/grid/page-prev-disabled.gif new file mode 100644 index 0000000000000000000000000000000000000000..37154d62406ddc064dba311b95f554e49ad38003 GIT binary patch literal 879 zcmZ?wbhEHb6krfwXlGzZPfyRu$tfx-s;H=_udjFb@6g=b+}hgO*4EbD-QC;U+t=4O zY0{+0lPAxdIdk5;dGqJbU$}7L;>C-XELpN*#fp_HSMJ!cW9QDDr%#{0ef##^yLTBz z!Dt8!oe)s`$->OQz{;Qlaxy4SFmU)VaC69bY*=uxnSOV literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/page-prev.gif b/deluge/ui/web/themes/images/yourtheme/grid/page-prev.gif new file mode 100644 index 0000000000000000000000000000000000000000..eb70cf8f6a3b7f524bbeb3656d875a823b27fd7c GIT binary patch literal 879 zcmZ?wbhEHb6krfwXlGzh@tC0DJ54uuo^j+di-h&|8QW#kzUrr(*H68ylXk-(>4ag{ zZHv4+cEz{tOYf>=ebOm>XHxXSuI{Hx{sE`lD_*51{Hrf`RNeQhe(3PuA-LgMaLe7$ z)_W1{_x-!R`FH*eYuz6C>RX^ z>V<&fPZnkd21y1TkddG~!NB3eV9X)ov0=f%W)AK)kBA8^Y;DZmPc|?ZI=9Q{X*oQZ zkbJD2lgIqQijPiCj2*mD6%7sx9yN0CvxS^laG;@KrlbJNftid9=jS`{vav8&0{~Hw Bh1385 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/pick-button.gif b/deluge/ui/web/themes/images/yourtheme/grid/pick-button.gif new file mode 100644 index 0000000000000000000000000000000000000000..6957924a8bf01f24f6930aa0213d794a3f56924d GIT binary patch literal 1036 zcmZ?wbhEHbA}e@6f*BUeEG-{mbu9UVeYtn)@A#A9pQ#+`IB&@5(0= zRzH}y`r(9CPbRH>G-dUZ>1!TLU-xM0+NU$tJ)FJ%!HkVh=4^U8ck{CaTb?f6`F!=h zms^g%-go-h&Rf5C-u=Dz!SB6~|L%M6=kVF*ht9t`fBVhRyMGQn`g7pPpQDfe9DDTl z(5wGPUi>@u`u~ZCzfU~=ed^KQvyc9qee&n@+yCcY{k`z?&xIF%F1`GB>D9kWZ~k3* z`RB^(KUZJ||Ns8~&oBx`LjW}d6o0ZXGcYhR=zxSld4hrCB?B{ujK>Cr zPF^XagaZi+ome=9Dmm#SD}7El7CSA;=KXekY^RG>e-{ zuuVYm(pR@|5zQ!{2@Y3s!WlFkEt+xRKzr=&*z_|U*@qgNWbB##KVWn?)_GXn$>4`} z#Rk5^9iqw$CMLJ{owi8Xkg$-crJaR6?!tz^#b0>Dw8Q57c+l9;Af%gcqV6G6E2r=p gYaW5X0}L(q1$Yc3_9+}>;A5Sv9e-|5r2~UC0H_cnr~m)} literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/refresh.gif b/deluge/ui/web/themes/images/yourtheme/grid/refresh.gif new file mode 100644 index 0000000000000000000000000000000000000000..110f6844b63f04ee495cb6260aadccc5c91f3245 GIT binary patch literal 977 zcmZ?wbhEHb6krfwXlGy$h}b9*vsWVToJh$rg~Ib{73bBfFRNEyRjIzARe8a@{G?U= zS=*`;&XtFqYK{lh9g^y}Bh~OmX2K7phHF|4mvmY#YBk-m>AI%V{Zwn}AFb*CO}Zah zE&Ol0{J&TG39p`WUhP-C+HU)IUUQmo-)qvfh`zI76Yqx1zV0&XfzSMxLGvGbFMQ~+ z=(Y3m{~l}q`>*>SwD@7vl2_py{zq>5pE~<)_MEHvb8Z#%9?x5TCvVmLlErrtmc7Ye z^(1@q`{eEa%QikQ+y0|u-~Un|+W)`u;QzYA|67+{YhHeP%Er5`D<5=iecZe0VgIfd z6ZSoyyYE@Yq4%wa{&t-D-*@u=lr#UQo%uiG{Quc!{>?l8fByOZOAkC-cNm zdAaJ$n+2EuFS_`D;g$bOF8yC{^Z%AJuQpuyyy5=;?RWm~z4m$Iga5mp{NMZF|DH$x z_dNZ7J^Oa?<^NmHzCC{Z^XcdR&%XSB{pru! zuYbP%{{Q3WpTGb9|NHkJ2pC4ez=eR~PZnkdh6V;5kP|?8f`MZl10$!5$A$$5)il%s zei$5ka6nGTs361eNrP~El!A@oXXa)eCC+CvI2;iHZM67s#E^NJN1wTgOT&i;3Ec;TOAjTi zTyP{|exu5jn1!2~IsF{O7w}9FI^s0Dv3!z%j9{}Lqr9=eiw8w24r1-;JbMZ*Iy$pR TTfCj3pwPfLY5NRjCI)K&rUX|l literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/row-check-sprite.gif b/deluge/ui/web/themes/images/yourtheme/grid/row-check-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..610116465e7e34fe6ec137d674a5a65eb44f3313 GIT binary patch literal 1083 zcmZ?wbhEHbG-BXmXlGz>j-2EYIms=0ihImdkJxD*ann5GrhCOt_fD7*mN_@JU|~Yh zlH}5*DP>F3%9rQXt#bJ9;Pl_AtZj8)e}DJP-90mRO_;lP-R7O^x9r-qeb1Jidw1;K zKX>_o#p_P2-*JBTzJq)AAKI|<;`aSlckaKi>)_Qrhp!zxeDu(fW5aL2&AYd5-M(@A-tF6WZr{0c>(2e#ckkc1d++>}M|bZ(ymSA_y$28PKYDua;miAv zUOssE@WI2!4<9{x_~`M2N6#KTe)9Oq(zkK@q?aP-hU%!6+_U+q`A3uKn{Q2YOFNRSt)Ivb< zCkrzJgCK(r$l;(o!NBpKL779wW5a@j%^bpFa}I1+c({#=)o#uSgQOPDOrxwjGt!z| zdt@$e$lSc_@o^LJpjAf}JZwJMArZPP=b&Sgps8HqqLPD`kM_zs`Roai*qqK|#L3VT zF?sR}KXId?9~w-oM=!LvF0}h7u%L13YL4V{2NpVaOx6sKXt0%-%sxprU4%n}F=ee| zk7OB3V$o4<2?NtNdOnMp+}aIPI1Cb!oedm&q`N#WDjn;2s@TV#Wb?^^L6Du@WzE4m zBH2;`fg2hOC%gI1Qk$u|ta4(CLnAZyojrZEhG#jire0bj>DOw0Oe9%D!a<-Z<>RHq z%WD>VO!l0r8@nULP;YPhBrdTFH4+!k**uiX3i z{QdXWpZ@~^!zdUHf#DSbia%Kx85kHDbU@w$^aLtQ^>)SRb9SKCQ``Jr`=eVAz{OT z183VTy}$iASS#R nB^X?DXxtttx-R#(S?*zGzsXrO9p?HCdj*-f<$NLv92l$th`d^G literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/row-over.gif b/deluge/ui/web/themes/images/yourtheme/grid/row-over.gif new file mode 100644 index 0000000000000000000000000000000000000000..b288e38739ad9914b73eb32837303a11a37f354a GIT binary patch literal 823 zcmV-71IYYGNk%w1VF3Ug0EYko000010RaL60s{jB1Ox;H1qB8M1_uWR2nYxX2?+`c z3JVJh3=9kn4Gj(s4i66x5D*X%5fKs+5)%^>6ciK{6%`g178e&67#J8C85tTH8XFrM z92^`S9UUGX9v>ecARr(iAt53nA|oRsBqSsyB_$>%CMPE+C@3f?DJd!{Dl021EG#T7 zEiEoCE-x=HFfcGNF)=bSGBYzXG&D3dH8nOiHa9mnI5;>tIXOByIy*Z%JUl!-Jv}}? zK0iM{KtMo2K|w-7LPJACL_|bIMMXwNMn^|SNJvOYNl8jdN=r*iOiWBoO-)WtPESuy zP*6}&QBhJ-Qd3h?R8&+|RaI72R##V7SXfwDSy@_IT3cINTwGjTU0q&YUSD5dU|?Wj zVPRroVq;@tWMpJzWo2e&W@l$-XlQ6@X=!R|YHMq2Y;0_8ZEbFDZf|dIaBy&OadC2T za&vQYbaZreb#-=jc6WDoczAeud3kzzdV70&e0+R;eSLm@et&;|fPjF3fq{a8f`fyD zgoK2Jg@uNOhKGlTh=_=ZiHVAeii?YjjEszpjg5|uj*pLzkdTm(k&%*;l9Q8@l$4Z} zm6ev3mY0{8n3$NEnVFiJnwy)OoSdAUot>VZo}ZteprD|kp`oIpqNAguq@<*!rKP5( zrl+T;sHmu^si~@}s;jH3tgNi9t*x%EuCK4Ju&}VPv9YqUva_?Zw6wIfwY9dkwzs#p zxVX5vxw*Q!y1To(yu7@dCU$jHda z$;ryf%FD~k%*@Qq&CSlv&d<-!(9qD)(b3Y<($mw^)YR0~)z#M4*4Nk9*x1lt)=I7_<=;-L_>FMg~>g((4 z?Ck9A?d|UF?(gsK@bK{Q@$vHV^7Hfa^z`)g_4W4l_V@Sq`1ttw`T6?#`uqF){QUg= z{r&#_{{R2~A^8LV00930EC2ui0096U000OS0Po$iSC8I2dGX-ATgb4XLx%wY06VC` Bj$r@* literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/row-sel.gif b/deluge/ui/web/themes/images/yourtheme/grid/row-sel.gif new file mode 100644 index 0000000000000000000000000000000000000000..98209e6e7f1ea8cf1ae6c1d61c49e775a37a246c GIT binary patch literal 823 zcmZ?wbhEHbWMq(KXlG!!`QrEOm%s16{{7(1pGR;1JbC};*@r(bKmL9F`S1V#{~1QX wXb24J5K#Qd0`%X11|5(uL3x6KLxe$C!6IP+Ln9*-6GOy_4GW#y85tR@0bQ{sTL1t6 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/grid/sort-hd.gif b/deluge/ui/web/themes/images/yourtheme/grid/sort-hd.gif new file mode 100644 index 0000000000000000000000000000000000000000..45e545f74423d274d5ba7fd942349e9b6e377787 GIT binary patch literal 1473 zcmeH`Yfn-E06_1O8OuKCZ05?;9y0{yY?;~WgRMsR$~K$2`D~d1@}bQ#*KE^FOzmNr zk4h0m5xA%*2nq5&mj9jr&@R9m?MLJ@ z28+?&*i;q2X{glmbaXwjt9hit_dI1))x{ir6L_uMFRHs`tO}FBO&#lQRo8}|J5?7Y zU`>9C$Th8w3EHL`Ba086h!(PEnZzn=+PIK2*LI5;-9YgM=D}nEMKj(5E_P-Pm7jo~EXPhgm4T&wVplL(D->;y1`B0^KR=R4S}*a1vj)fV>NEY1mB8Uq&zYI6Q%t`{**z!J+Vr;E@5~g9*=aqW{3>u}nt)+%y z;;>ng6u?b5{(;L^(y<6nxNxiv6hU01L$+fA6FPrm&HQ1X9CMc{2sC$3gd=9b3;|~m zeo4%+^eknA7SU=RVi9X;xUJr+UX-mqm<4W0%pznE9#Hd|0*@ZIv{eO*Nb# z12yCIrOhLLJlbn33DTB}t(F_b2bV4~y*j=}%v9m90(t13QX1^b_==P$D+H{5*5Mu? z8gKY>BXXf^7@!+sCzFj+>XgJsqfc(1Ya(r=#J=3 zlZtj9{~(p*xA$9X2mMtN6e0bM#^36uHAhJ9Q&;+@HQ_ThCJ=yPPcaaStzMs1DHP_0 zvw_E92pgO+s83$0SnZp{u*pvQ$A3#Rftg(VD(=52XCTzUftd4T-22$PQrgIR*gHx4 z{43C_yk?5j?(i$Mual4dFf?{<9Wn}qfaB%>iNwkdu&q!m&h2IcZ$2Th!C8}<*_&Pr zyKl`OZw8N)3D^4?RK}UoD=o00gbKYHy=yv32mZ9Dl8aIS8x^Z$2?NwcBLzFmZOtoW zzN62&u*QDIz{Fy}^YAXY&Txmg7ATSAhAr8K5fZbFZ*SFa$_qE2L|VVFHOI{wKE8B_ zGXV2p-56OO`rc4Z7g3zbj)2_3YjK$((`OUqD%*mgvS`YELYsVW1or1)YW%;)D$oE>#r zQ3z|D(W$Eg`c?NY^+fD&+nctrc25@u47U__J8-QW7NqK!$T9C@*SpuaHyFRRpIGae rj_Lao#za}+eaj_<`F9!mRdtBiaY8;H`0o(Vu;KK>|7RZkKlk|m`6vG`Jo$g|>HkYl|6hLg|LXJq z*I)d<@$&!8m;Z0Q`hVy3e}+*o8Un*81QdU=FoV3K10q0qf`LPwfssSTW5a@j%?wOD iArS@)&h5PNMll*66^^tBbH?qtQJ{FJU!IwX!5RR^E;%az literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/expand.gif b/deluge/ui/web/themes/images/yourtheme/layout/expand.gif new file mode 100644 index 0000000000000000000000000000000000000000..7b6e1c1ef82bc36104018936848c3ebfa6e05e6b GIT binary patch literal 842 zcmZ?wbhEHb`0o(Vu;KK>|7RZkKlk|m`6vG`Jo$g|>HkYl|6hLg|LXJq z*I)d<@$&!8m;Z0Q`hVy3e}+*o8Un*81QdU=FoV3K10q0qf`LPwfssSTW5a@jO^j@6 iCK3sWhnx8sU0hxiEIiaD!s-`t;^Ttj{VdE(4AubXYdZG; literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/gradient-bg.gif b/deluge/ui/web/themes/images/yourtheme/layout/gradient-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..8134e4994f2a36da074990b94a5f17aefd378600 GIT binary patch literal 1472 zcmeIx`%jZs7{KwDTLnZd*hMh7R3%&{VK|xh5d@TrMjeTpnq?_&b8`}Bh(kowLJ^R= zwLrP_Mz6F*N-1{`N?)K@6i}uD1>V*|OIv8)A|*;9JN<2c#7;i>=A7rpCpmEmrw$)U zc7mcXc@UIVGnG~gOy34*)9Li-becMyuD$~>)ERVj219+9F_Xbm-(}8ZvefrjGxzFd z?gQ+Z2W-&U2kcoQXO_sF&Em{uap$rD-W-Vsija6n4j*~Q*W?J0hYp%tpk9;bpv@I( z@`Tz)B2B(fn=b+vZGl)@(4Z|8YYQ8+MGfzZp1v;z8bNg>jk*$vu2iBclgyVj>B^es z9|O{PvUGvmyzs<9PmwK9WcqTTMPJ^kuV~R%wCXE?Ha*qBP}OFjwi~K|4nuYOVl`;T zVhzx_SPOK48f&|ZG@#o^cQDa=jErs*qsPQ}W@7f3n4r(hETGq1*K1~j_Lq?Dr%LqcFxvPW zut}by5*6B{LZvEO(+Ju$Vv_!sOuZvAc4ePkK}Mg^X|R8{wv3g3jV&Qm0~*o(w;!4zGtP^}q4TE3f=4jcq2s zNTj41IT7{z(FAgK^iIzZ@_2j+Ir8!+!Q#r@%9(ju7k_5|Ghf7eqx2?7%YoH4jP!wx7HA*Q43) zwFOW=pP6ly3pn=?dHpWVl+z~h4aA7q3Dbmfk>A9h*D=1j0=ZkaJtNDl4|Dy58=OQ4 zb=w|rEX#G|6q4dPk_gFV6VcYbmUmazi7x6i6Xb&As-j$U2PJ(S9-JDYvw05^=DZ2M z-q(%65iC7!Sf=Hfs~2MFb#cc_ASYbPO$Z9ewDx-)GFuhcxKI?v{g{Fd`2H?N2mNoG a(II?Zs7)DAnPM9b=8J95L)rdV=-9sjoxm#q literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/mini-bottom.gif b/deluge/ui/web/themes/images/yourtheme/layout/mini-bottom.gif new file mode 100644 index 0000000000000000000000000000000000000000..c18f9e34ac1f4d06525592c5ec25783921e7ab1c GIT binary patch literal 856 zcmZ?wbhEHbRAyjhXlGz>c6N36?{M+r#W!!>FpPrH5Ex-0p!k!8nSp_kK?me-P@Z7m zFlAunknz~C;9xU5Gl#^14GRyqF(|p!cuZW_z#t(WR-;k)_;9y`aa9RNLW=VQMPsFy Kokpn+4AubBJRUOu literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/mini-left.gif b/deluge/ui/web/themes/images/yourtheme/layout/mini-left.gif new file mode 100644 index 0000000000000000000000000000000000000000..99f7993f260b374440c5c8baa41a600eca99d74d GIT binary patch literal 871 zcmZ?wbhEHbWMxohXlGz>c6N36?{M+r#W!!>FpPrH5Ex-0p!k!8nSp_kK?me-P@Z7m zaA9EP;893e(9p!fE+S&!pm?~AUD|4jgy5sYono4CYdSV2yD|teHi#$`Jzc6N36?{M+r#W!!>FpPrH5Ex-0p!k!8nSp_kK?me-P@Z7m zaAja+k&tj`IMB$%CgZbW!-Ix)HhHZSi@+q84iWvZBN>K^-5Dep8%#8W7*0-Pa>$EW bxpC?7J_E~BDJKIG4z;p#3-JgDFjxZsq+}v; literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/mini-top.gif b/deluge/ui/web/themes/images/yourtheme/layout/mini-top.gif new file mode 100644 index 0000000000000000000000000000000000000000..a4ca2bb20aad89264b9022fee88ee29154dfb192 GIT binary patch literal 856 zcmZ?wbhEHbRAyjhXlGz>c6N36?{M+r#W!!>FpPrH5Ex-0p!k!8nSp_kK?me-P@Z7m zFlAuo;89qx;9xU{u$s(?fCCNf0?JM-3L76eGxBgot>IYk*sW87)#{JM#>MWF#5uKM LPHswdV6X-Nu*4oA literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/ns-collapse.gif b/deluge/ui/web/themes/images/yourtheme/layout/ns-collapse.gif new file mode 100644 index 0000000000000000000000000000000000000000..df2a77e9cc50cdb15e8be856710f506d462a9677 GIT binary patch literal 842 zcmZ?wbhEHb`0o(Vu;KK>|7RZkKlk|m`6vG`Jo$g|>HkYl|6hLg|LXJq z*I)d<@$&!8m;Z0Q`hVy3e}+*o8Un*81QdU=FoV3K10q0qf`LPwfssSTW5WW+W=1|P io&z5e4!5x=GEI;OeCX1}EU(tHE{jAJP4AubO%sO%a literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/ns-expand.gif b/deluge/ui/web/themes/images/yourtheme/layout/ns-expand.gif new file mode 100644 index 0000000000000000000000000000000000000000..77ab9dad2948270706c9b982c5fcdce78940b4c4 GIT binary patch literal 843 zcmZ?wbhEHb`0o(Vu;KK>|7RZkKlk|m`6vG`Jo$g|>HkYl|6hLg|LXJq z*I)d<@$&!8m;Z0Q`hVy3e}+*o8Un*81QdU=FoV3K10q0qf`LPWfssSTW5a@jjf_kR jAsz;b4DD>fMm823AG&mK%ZJ76*!b{ZzXCfO3xhQP{>?dp literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/panel-close.gif b/deluge/ui/web/themes/images/yourtheme/layout/panel-close.gif new file mode 100644 index 0000000000000000000000000000000000000000..2bdd6239987b95025826fa39f37a036d73ae1c9a GIT binary patch literal 829 zcmZ?wbhEHbWM^P!XlG!MGRSrK@6dAaKf@>(4S|st0*XIbm>C!t8FWBi2jvL{4k-pk f4i1Na28TvQ9=?!{4GD)^*u|AnEG{HEFjxZs3+oT= literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/panel-title-bg.gif b/deluge/ui/web/themes/images/yourtheme/layout/panel-title-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..d1daef54c578cced19b7f0c3074dd7a23d071cb1 GIT binary patch literal 838 zcmZ?wbhEHbWMoKTXlGzB%sOhAecUMblu_OpknmbK5V>R(wmyk!^#qaiSiLO}5+3(z&}UbNe&Fw0C0UOPyhe` literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/panel-title-light-bg.gif b/deluge/ui/web/themes/images/yourtheme/layout/panel-title-light-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..8c2c83d82536f2e1e8c1fa15ccdf6683047b1d34 GIT binary patch literal 835 zcmZ?wbhEHbWMoKUXlGzJdGFVm`@haV{B`m1uPaY~Uw`)d){EbFU;TOT=Fj7|f1bYo z^Wx***Ps8s`}&t*6pV(zunPgjpDaK>{b$et`3#gN7&sIdqzxh#C@?lLvvCPXC@3&A WvZm{QhJfNv7G{tF#eZVXMX8A; zsVNHOnI#ztAsML(?w-B@3=BFTX;5xq;Lv4YLV0FMhC)b2s)D9)qBYY9s=7v2nHV6X-NX@DCv literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/tab-close-on.gif b/deluge/ui/web/themes/images/yourtheme/layout/tab-close-on.gif new file mode 100644 index 0000000000000000000000000000000000000000..eacea39b623348f656de9a8f0df4ac4b74ceccbd GIT binary patch literal 880 zcmZ?wbhEHb)z|%kKX-x z_TkUV&wm+4!Dt8!#}H8b$pZA&e+C_p=RkRafy0-9okPYWK%u#rLy#**AmKn$J2Q)p zz={Nh21Zf+FqsJojYs=sS(PMy7OF5cvh&sKnGv+0v0q<*pG<%Q!&xR)rDrk@3zqxO MXKm)=;9#%@0E9$42LJ#7 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/layout/tab-close.gif b/deluge/ui/web/themes/images/yourtheme/layout/tab-close.gif new file mode 100644 index 0000000000000000000000000000000000000000..45db61e6000bedd9a4eacdd171d99a9af159389b GIT binary patch literal 859 zcmZ?wbhEHb+a1fq{uZ2jn48o?zgxVBqGE@d#MZ z(99ty#S`H0kb#knn;}DEVv=)*u)3Vdj=;yqxu0#kX9cC0)w0klmAo1XIMn(o} E0NP7EbN~PV literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/menu/checked.gif b/deluge/ui/web/themes/images/yourtheme/menu/checked.gif new file mode 100644 index 0000000000000000000000000000000000000000..fad5893727ee8a13f428aa777380ae97152adec8 GIT binary patch literal 959 zcmZ?wbhEHb6krfwXlGz>j-2EYIms=0ihImdkJxD*ann5GrhCOt_fD7*mN_@JU|~Yh zlH}5*DP>F3%9rQXt#bJ9P}a7(ufM;0=I)-EyC%%tyKeK&xyuhMUUy>sj`JIKUfjO_ z>dyTab{)LB=kT>-Cr%wbdG^%lGbhhnIDP)=+4C1qp1*tM!nLy(uU)-*?dpv?S8v|E zb?f%+J9qBfy?6e~qdWJX+*RNl{ef##~$B&;sfByLSi(wRuh5*qap!k!8nE{v; zbU->ld4hps4uc|xjK_ur2b)<{HDXQ_Japi6Q1W6iYUvPA5Rzlscwpk<4sO9XmXjI+ zi&_OWe7|@wG&BoL67X4M6R7Omz-DfcwPk^l8<#v6OGU!M%_;%{ss?XfI5Zp-5OGar zYW(QXz|GEX#*rx~s>CVD%q0^Mz{1hH&cW`(j0A>8wr;ZvZ4rjePOb7*MGqXL4LK$% TI;tJY@rY17bXb6iiNP8GS6tA5 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/menu/group-checked.gif b/deluge/ui/web/themes/images/yourtheme/menu/group-checked.gif new file mode 100644 index 0000000000000000000000000000000000000000..d30b3e5a8f138bfbbfea3d1d6d5631a81268fe26 GIT binary patch literal 891 zcmZ?wbhEHb6krfwXlGzxGAUp-FJv++Vzw-1u&!ctt7CJoDF4C-YI>17M;4q>erj}J#1 znRLYtaeQ=iW)bC#?NNBB=*-HhDWD|4xae>zCoh|V$$>=XHZB1n7Kal~O{`q}VgeQu b3s{-ixj1G-bT~0I2=PqTialkbz+epkbq-F$ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/menu/item-over.gif b/deluge/ui/web/themes/images/yourtheme/menu/item-over.gif new file mode 100644 index 0000000000000000000000000000000000000000..01678393246989162922ff0051d855ea02b4c464 GIT binary patch literal 820 zcmZ?wbhEHbWMU9yXlGzpb>`d67r$SB{>v~5Mnhoag@EEu7NDp9Gw6W44$2b@9D)q2 W95Nmo7Bnz$2y4ZhC`fc*um%9+ToJhd literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/menu/menu-parent.gif b/deluge/ui/web/themes/images/yourtheme/menu/menu-parent.gif new file mode 100644 index 0000000000000000000000000000000000000000..1e375622ff951a3a3f1ccc668061e81b9c93b411 GIT binary patch literal 854 zcmZ?wbhEHbOQz{a2h@&qVP zFmM<%@JmQ|Y*@g^%E=?8;=tJG)Wo9VlknjJLnFJO0!M|%0mo(rQBEC(fQyeBCb4lX KFcA=7um%9T95sFb literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/menu/menu.gif b/deluge/ui/web/themes/images/yourtheme/menu/menu.gif new file mode 100644 index 0000000000000000000000000000000000000000..30a2c4b6c0458751f85126e8bbca6ef2ccc2ff00 GIT binary patch literal 834 zcmZ?wbhEHb{Kde?(9Xc{=<(wZA3ps5|DRzLjE2C-3jxKSEI?2HXV3w89h4^+IOG|a lIb=LGEI8Q6z#`0voy-@k72&h=Y%ZQ8zP%g((!cJJT4@8F*OhYlV-dg#cp zW5-XNI(_EM*|Vq5Up;&A+S!ZOuUxr$qNpFDl?^y$-QVDS9;ix)3mg1{>fcnt(^ zUcUi>w{PFRfB*i&hYz1Vefsj{%h#`8zkU10FbYOPfHonZ_>+YhWU>y30Obh=jxGj9 z4jGRP3l283GHb+~D0p~)!9>Yxj)(FAXDKG5ESZ1@4oAD0WI9R=9v*6Ak!N+{dHKMR zl}FY^$AdFLm4!>ptVN@75u5?#BR20ya;KC(goN;9V qqtnW!)kYaNB(j|}n>i$H<|I5^)XKF~L^CSn=7x7MEgZ~D4AuZjXTU80 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/panel/corners-sprite.gif b/deluge/ui/web/themes/images/yourtheme/panel/corners-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..aa0d0ed8fb4a7af14a00f77c9fb0f456144363d0 GIT binary patch literal 1418 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 F0{~gSY2E+; literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/panel/top-bottom.png b/deluge/ui/web/themes/images/yourtheme/panel/top-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..578ffb6092a47d9af33fd86615855ac328958537 GIT binary patch literal 218 zcmeAS@N?(olHy`uVBq!ia0vp^j6kHr!3Jb81>C#}q}WS5eO=kFvq*AsijL3o~JcpmZ-+$h~ z_Wy_3jh&1fGyeT$7yAGIfBVLN2O~0szQ_GbNqF=$At@m#iKWOT4w?3V`{ps}G&u8y_K7ar7g$G|QJ^XUz(U+@FzFvR&^~SSrx1N9d{QdWj z-+%u9|IaWAMnhnTgn;5t7G{uBbwC6tPcU%&XJBNJ@Yt}xfl*RO%SR(2fsIE%+3C!K zfJH7{j7BjxP82F1;}LV};`zC;>EvWJ`=E%EMNf}&8YCb3qp@(=*;(?+FYc`TtlTo+ zp}tPWVT;DaewImEzP~m$Twd;HFEzuf^wn|Zh|NiVI~J_IzD{1aLst9S;-<|R=j&n) zY}38n&-3V1@9&L`cXyZBTirNa{{A?712gkCNfC{QhXnY zwzDg8A8&6~zAsyC`Qh2A#m@8R-Tqnd^6EzM>veOgi(cJ6SpHx9zpZuUvuBsv!|mtQ z{`~sk_VIfC{dRwUzj*$9`+oWV#ozz3{+M6K{3(1v{q?!!3mQ0?c06e26_QxkD6Dkj zcI%WyT+_vK2mMcNg7q+sp IvM^W!0LCzFhyVZp literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/panel/white-left-right.gif b/deluge/ui/web/themes/images/yourtheme/panel/white-left-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..d82c33784d106a699921e8186376adfe08ed7159 GIT binary patch literal 815 zcmZ?wbhEHbC) zJaOyO$=jb!-~D{{-ski8KVNw8<p u#Ky(P`xTtKWIQ)5IXPLwHYwudrlqH+8zi5aADi9QnH9n_(1;hQKfi0UeNEKzV_IL!CjML&jsnf`iQ*+*TO}5*nMB cm>F0E91a{{WZ^W*x^rUV;^X}?%uEc{048uWPyhe` literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/qtip/bg.gif b/deluge/ui/web/themes/images/yourtheme/qtip/bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..43488afdbd4924057e45df94ed68690068fbabac GIT binary patch literal 1091 zcmZ?wbhEHbvJG_ z_wB{IZ!h0}dj&)vzP|>dkKf;X{QmaSk9R=y`N#XuKRjL%gg;OJ?2_%ZN9oX+&1IxF3}_H>l603F*t71i4@GZyiE4sw%lkTl{?!^ z6Bo7I-L2~P;_hzq*8BVGLsu~TDQ|svxII!MZqJR@$6^zdt>?XQDtdZif@HSanM&4& z=Nke$o_R~@-`i0Xygcmmtu?PVY}k3~nAhx8xhrg)|NZ;-|Nno6Q7{?;gDC_Qf3h$$FfcOc zfE)$N6ATu z!(r;m%j_$9KP-wo!oMF4bR^Z#pCLVEt6JIYJY>r`(GBHu8TKMAH hV%craN*NY1aV$`Fvrs8ibZTIkpzPfzqoBZG4FEi-n5_T+ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/qtip/tip-anchor-sprite.gif b/deluge/ui/web/themes/images/yourtheme/qtip/tip-anchor-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..9cf485060802498647ba462c826869140085778c GIT binary patch literal 951 zcmZ?wbhEHbRAb;`_|Cx4x9Z%wLw6p$`1JJa&v#${Ljc1l7!84u5dw-oSr{1@*cfy` z-Ua0e297BVyc{MB2@4t-nK?8-AM7;o6g|H=X=D(-<8}9T;jWog=1UD z4&$fCrm{73`D9*Nda=)=)Tw8u>7xs+o|a)(X9%W5PEyUaQmLAfdV6NU**cdOLJyDZ LX;5ZkVXy`O9&A$y literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/qtip/tip-sprite.gif b/deluge/ui/web/themes/images/yourtheme/qtip/tip-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..9810acac5b323d99a641627276e8dbb9a3607d2e GIT binary patch literal 4271 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 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shadow-lr.png b/deluge/ui/web/themes/images/yourtheme/shadow-lr.png new file mode 100644 index 0000000000000000000000000000000000000000..bb88b6f2be887650f28b16726e470c09459b9c86 GIT binary patch literal 135 zcmeAS@N?(olHy`uVBq!ia0vp^JV4CG!3HG1zpHNqQj#UE5hcO-X(i=}MX3yqDfvmM z3ZA)%>8U}fi7AzZCsS>JiZnf4978H@C8Z=JJZMPDQ+U>TNx_ce55uGN4u2%Q{wE|U g2=cJ=GBC0+@aVFNEX<$33#f^~)78&qol`;+0F-4Xf&c&j literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shadow.png b/deluge/ui/web/themes/images/yourtheme/shadow.png new file mode 100644 index 0000000000000000000000000000000000000000..75c0eba3e101e3f32cef8bde7bae7383d849e935 GIT binary patch literal 311 zcmeAS@N?(olHy`uVBq!ia0vp^Y(Q+l0V0jwbN>KRk|nMYCBgY=CFO}lsSJ)O`AMk? zp1FzXsX?iUDV2pMQ*D5XZhE>nhE&`-GTD~D$v~hjI>0gT@Uw(Rj}ARr(#+ZY|Nr|R ztz576{))TQsGN9FjsN;R=N;cX_7>}LNxZmoT3OARN%FUXp-|AVh0k3k3m;=qQcOOgc@EIAyfV(r;i((zEeg z`}y44S?ng!NoE&wcK=*_2F$s1%jHel(|yj_4>tF9g$FFYCZ&0@DQ;=K_|9xe0dH@S zX*Z%4Z8@@VyGFIRewDnzd#yOua)FIqa}4Vg?=kT(Xhpeh(=cjy2J|F@r>mdKI;Vst E09T24*8l(j literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/blue-loading.gif b/deluge/ui/web/themes/images/yourtheme/shared/blue-loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..3bbf639efae54ae59e83067121a5283ca34fc319 GIT binary patch literal 3236 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 JpNE6N8UT=&&-wrW literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/glass-bg.gif b/deluge/ui/web/themes/images/yourtheme/shared/glass-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..26fbbae3bc6d2510832a5ed709f0cb029c2c1170 GIT binary patch literal 873 zcmZ?wbhEHbWMpt*XlGzJe&g*4AiDYX)q+w@6G_xop)#NygPUI-MM=} z^!_{$-T!dm{)dbAKU@Mb9(=g)@WaK2A1*!oaQVT<%a1-@ehfsPt~~sB_0h*Gk3U^| z^yxZ~`{dJA5c+)e>E~-e^z6&^=U;C;`E>K?=UY!d-+uP_&hsxfUVOdx;_KT_KNv>A zXb8|f1QdU=0PXzGpaZfQlqVQC+!&%a1WaT)$|)>om2)9Mk%@&tK#^^Rgu{V`ZWgW# wlLCgu<17lIIuQpJG%~aEtN6@tSlD!$TihV!!H0*;9Rf;j6Erp|DKJJSK2bm`zya0vPFVPO+Hzo=EoiUW<# zt-R7&85aT+o!hu13_^AkENo)sW?~Im5RiDNg-b{!q(fjK6AOo^oXv^{2OL}3c(n`? z0um24adC-+cuZKp#Ka=XC$l2qfI}-2tCoO5K;nT0E+&=`4uJ(sK-Uz9X;c_IJk-Xo z?6;=E@bR%edFMWzN~5Qzrs*f2TT>bQ{@gtKWw+(i!R!IjKB)<%j$y1Z!Zof6-y9;DGq~5NJ}7gDVJu-S5NBXy HWUvMRItY+| literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/large-loading.gif b/deluge/ui/web/themes/images/yourtheme/shared/large-loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..b36b555b4ff04f841bb2101514d8f95bcf7358f4 GIT binary patch literal 3236 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 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/left-btn.gif b/deluge/ui/web/themes/images/yourtheme/shared/left-btn.gif new file mode 100644 index 0000000000000000000000000000000000000000..a0ddd9ee8203b9fc45eb5ee78ae6bcb7e57aed7b GIT binary patch literal 870 zcmZ?wbhEHbSKV^zd-BO3vC604f{{R1d4Yk$n}L-sZYVSj)zmI o(Q}fL|Dq=uMNdw3X~iE>$=vYlK$lteqcf2P3=A_Zn3))?0bn93t^fc4 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/loading-balls.gif b/deluge/ui/web/themes/images/yourtheme/shared/loading-balls.gif new file mode 100644 index 0000000000000000000000000000000000000000..9ce214beb5cd4db00666778d371223c605874519 GIT binary patch literal 2118 zcmbW22~ZPf7=}Y29Kir0FmlXvp;AJNF@T|n3=l~OQNReX(lJsJSV$lTCK1p9Cy_(M zQm|OSsz3m3sz4Eyf*^8<#%d)Dpydoi0>~kDK!ll=ZaA%FI-`5dzq{YQ`#%5s?JSAx z1lbx&?h&&9gFi*>!1pzUs7{@wn9`hLm1fx>(Jl7@kz#sNtqbnGu~ zQe16TTxnMP)H3+<{h@2EL)RY+mC2N450&LIW#wqY$lA~nbxPa!&C zu$mg`OY>TK<}eSK12l%IF?DpG!V-0@d@BkYlXMMpg0lep88I%nH28pK5h2~o?kkh6 z2b2xQChiFj0eW(#g;VTwwMJ5_?EDvp>#4GK+r2+JC89@-_OzrTH4{qP8k0!hnWK}9 zap_c+yqJ92gY!};(l)Zfx*I7zMHm#j&@PQG;7HGJgfynxUXLv`)H1{Pg;t0}hNdo2 zEzCw6`;fZ{f2sO<=B5-4@O@rsqC&BzvE4Uy6nRmKzwG>WQa)|oDe}n~loonAD-5{> z?UL_)*}^8e6BlB4$-lNLQ?wCd`#X$Xp*I-B46&`*HeU)u(UfY42oW;RS(7rB(NZ(l zVXa9y3Fg@)|wdEu-^Mr$bM<2lcshb1_0+qU%7*YY5d4R}04b5q{6gDK#lN_Yz+3 zA)Yn+Y!&vbrDwhDx#Nq+`TkLUbU3j!TN`d7b-gn)W>MmQ_}fG`$z)HJCVV5zccWav z)VK6731;9=Y1sl!Lg@h;g8AmhLs23E}Fg8bsA}jW84be zJj3a&!EX+(#)=!^aPHuvE0%9D^z0oWQl`8qV(5Oxp*_o)rkOg&mhP%-u(0XS@f3?_`nfh@f|7!XJ# zk%OqjKq3JM^2G-d4?(;7)p&sbDCoC_x zFgMyk0aQ)fOAm{tLDLuoh6x2UK0R(bi$jkD1vEB~9?s%M(#YylM@%FuVp#;fssZ~@ e5vO$#&5sswUKi2&Xpx=kB8ZO`!7YivcK-uGv{KRl literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/right-btn.gif b/deluge/ui/web/themes/images/yourtheme/shared/right-btn.gif new file mode 100644 index 0000000000000000000000000000000000000000..dee63e2113fcca680699455e8a56ee3eecc81c40 GIT binary patch literal 871 zcmZ?wbhEHbSKV^zd-BO3vC604f{{R1d4Yk$hk=zr!efJiBO@aVPsE804;fk*WxQe}6c#pgOBlzkIk8cxsZYUC>4${T q6OT!%mh)U@eo8sjryPH%CUe8H16^j>kIqCIFfh!NVPs)pum%9ETq}wI literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/shared/warning.gif b/deluge/ui/web/themes/images/yourtheme/shared/warning.gif new file mode 100644 index 0000000000000000000000000000000000000000..806d4bc09385a98ef1ac19d25e30a21310964e7e GIT binary patch literal 960 zcmZ?wbhEHb6krfwXlDR{f&hVn2muENhm@owhyM-@5dsqm1SVuCOej#8P@%A(LSO-q zY!KMcp>SY^z=a6{7Zxa7SYhyB1;c|43=ehyk-&!?1`l=wJUAfm;Do@30|Fm_AFI_r#;p+LTS5IEMaRKbDQDQU%2#0{;PZnkd237_gkWx^dVBna` zz|A4!v0=eMCPx*A6NM8NOc1gSve|KQ1H(iiYYu@O7ZQ#gR8*}I_~Dqq(8*@R^@`(W z@)HIIWfz?e!wVeVa#HbKFBUvx;Axbo`SPIg5jz8ey-mRe1I2~|N`gTPEE1a-8hE@l zIU)=NI+%skoc{dSsL0&PpvCnl!Qs*I)AH$&GFuihv|L@Lt98xe!$KzpaZ%Pw4hauj N9~|!BW@BNn1^{&szCZu~ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/e-handle-dark.gif b/deluge/ui/web/themes/images/yourtheme/sizer/e-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..b5486c1a95bcc0f39a88c15c10c04ef7c3c561dd GIT binary patch literal 1062 zcmZ?wbhEHb#gW zSa7hJLs%>3#D;~3+Xa-p=6GyebhKN-IP1=djf;=>D>!$_cy3y9a}Xwye0g*kiI*?5Qm)FE0;R>^0YG>#D1(BQ|H< zJ+*c9_4NsdyJWq$t+}~5+bHZ`26bb>Fw+9?{8q{mh;)M z;o;#9VePmxJJK5%IOMqVHRPj^sIT3W`5a^n+Y$P=Sr`RJG*P^>+2hm zPtWt+z3uJo9mTKjo!!0t{rv;Y-12^Vc6@w%VzPGpxjj2SKfkcpd%oY^U0+|{*qnX; T+}_>a-#<9q&HP*pKCAv-hK1$|Ns9CqhK@yMn(uI{$v4q z^gn|R$h)9C!NBpKfm=XAL80MbGZUwri^YZqhZs0z^?H5?BpvP&kx!db5t!`W$7S2b zqB-%Q$7EIBJeSUo%H9(-b?1e=ob=3RreXN4Gm*mSr)OK$9{O`qIOF^RkA5xFQ(IO9 zFA8Y)Qk9(g>dN%6%}IB6ZPp537_~c2R9fuK^(DT0C)w`)@-kv`_TxiyyRYTm+?Dlm z+u82#x%YQh|7ByF6IPITsO+X(*qn%W@yBY|oz3n@jiJwDpWpD!D2@#*RM zbouaqd#t{`KC@K){5zTIFYoRwZ~uS)Uu;d~r?Y35yRVo1RrUSt+WvO_e>SyWKknT> zJ%9fHy1zfqK96ts%NTLLo=K|Xej|%gL_(8*oyNju5wi@%W(mC&iq(=uJ08}`wQ)S^ zU@r4m)TA`+$HFenMHNXcqO(ps>K2aMv8dblS;yl(gIhO}`i(wCBu{X-7xARuS!$-r zBtxy6DwFLl{a7+3@KuG%R2RL@rISOsESFA=YWlf!dTg9#+RVgBGoQ{#TXpj3tc*=F z(`J{P%UnLE;@C>{IW_xUs!yq9`t^KTlbF|wh3RZvD`vN;S*=*yYqTq4ZlxC2%O&OS zey&(Dz3kM>?LPQFywyoHAYVDT0ajVyEf83S5 zYUk}~v)}G~z3g<}j<=J3>+SdwC9S{f)2`L|`~Ez7{eCaQVeNvw_itHmILNZPy5Jy> z_M8uUINa|T91(v1`~4w4?>U7>|FZqra8xea=i@Pz{v4wd67%mAp3VHu<2 zhTV5Ioz;IFV|>wdeI5}aFh%{jYv+pP@iy=AuwcHjMWHRrml`Q7q*+i$mvZu8$Qzn3`O RcKf}i-@V(HGcqz*0{{svxFG-l literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/ne-handle-dark.gif b/deluge/ui/web/themes/images/yourtheme/sizer/ne-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..04e5ecf7d3837aec9510f5467282c10f158a5563 GIT binary patch literal 839 zcmZ?wbhEHb+Yh5$94ZWq95Nmo l794Em;N}uwNKib;z{ui|Vj-Z!(9Iz$HK#)0@qq>gYXJ2^5-b1! literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/ne-handle.gif b/deluge/ui/web/themes/images/yourtheme/sizer/ne-handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..09405c7ac7b321b3eb9170b1584167448819a071 GIT binary patch literal 854 zcmZ?wbhEHbc63}qqP#3eHjE2L+1SS?XB|ZfS0S0RTeD^Ni literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/nw-handle-dark.gif b/deluge/ui/web/themes/images/yourtheme/sizer/nw-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..6e49d6967c08db2c02a3aeb9c1f3cacb9c8665f6 GIT binary patch literal 839 zcmZ?wbhEHb+Yh5$94ZWq95Nmo l794Em5abeINJw;KWMp#S2{2G%=w_Cco6{kn+|a;a4FKuB5a0j+ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/nw-handle.gif b/deluge/ui/web/themes/images/yourtheme/sizer/nw-handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..2fcea8a9285dc74626ba9374055b25ab77e53a08 GIT binary patch literal 853 zcmZ?wbhEHb#gW zSa7hJLs%>3#D;~3+Xa-p=6GyebhKN-IP1=djf;=>D>!$_cy3y9a}Xwye0g*kiI*?5UEB1_q}2ZmnDnS(jHwY|grS zYU}Fj>k|%l$$D>Fb8~aX+fl6@9wVn{Oa!M?d$LFZ(!z@^VzW> zaVFC%HL)EM4v!B{Q1+hZvvbqa(=&{-@15DX`T6+;&fRjpySBW%ydrpY+}T}QUtiyl ze0rYm?rm>x?*pKCAv-hK1$|Ns9CqhK@yMn(uI{$v4q z^gn|R$h)9C!NBpKfty3dW5a@j%^bp7F()=GJlrmz>@~+@*_y+_d!cbc5tmb38XMJ3HH=_|=`0o0p%T&eFss>$PRY#l;?zwPH_g zS$TPRz+$htURzgPT^+GG>+Y$otFNz5INT-cy=~3S%^8FMbi#@YAI?A-kP`~v50 zIp1AdUS3`iygKgeuC1@HZ%95pZ|#k>jf~q0nRm>cz3u(|1I^s>etUL&e0*ZEcKo?L zJ3n7!TI4<7Z||eAWv;!(H3F^$JPCf70^_gXw#@wm_C+l$Bj4s4oFCb)=Y zKAGsDw(`j&AG4QFCI`4_KAjR0micsQMB2)y(_+eAKAoP>rul3}%CyX9Gc%U0d^Rg* z+skLO3yx_%pHp%z^ZDG0XDgr2tNHfw`TPbptrrVg#Ijy2>`+_vVo{ITs~3wWxM{sy zG9@hQ<LuU0IXmi21oie;-_ty;6~)vMJTjxl$oIxtuR03tF% AKmY&$ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/se-handle-dark.gif b/deluge/ui/web/themes/images/yourtheme/sizer/se-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..c4c1087868afab5b5bfd329f52d9907eb1c0061a GIT binary patch literal 838 zcmZ?wbhEHb+YZ5$9Lfxg96SOJ k3mltSSY>Q9925^Vv52er?AV~l(9La}b>~E3vIB!P0N;ZWjQ{`u literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/se-handle.gif b/deluge/ui/web/themes/images/yourtheme/sizer/se-handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..972055e7b297a702ab9aa2d799d133b94ac92315 GIT binary patch literal 853 zcmZ?wbhEHb{~M&wt%~@%zrJ-wdN* zGz5lq2q^w!0s8MhgAT}-pgh6AVaveCA>$E{(A3N!$mMciL!xsdyOP%wjSCG&yTw_> nZk(97*nvsGxlP1k!4l8OOsp$nb_OLhOgBgro5QJ~z+epkjJq?f literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/sw-handle-dark.gif b/deluge/ui/web/themes/images/yourtheme/sizer/sw-handle-dark.gif new file mode 100644 index 0000000000000000000000000000000000000000..77224b0c06f1666685286c5322fb02b4cd2204bc GIT binary patch literal 839 zcmZ?wbhEHb+Yh5$94ZWq93m15 l2M#ndammSOI2<_C%q421Gvk7Sb33nm)}0d@l^YrutN|0L6o3E# literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/sizer/sw-handle.gif b/deluge/ui/web/themes/images/yourtheme/sizer/sw-handle.gif new file mode 100644 index 0000000000000000000000000000000000000000..3ca0ed96df2059fe283c1d65fa1032a777e1ff97 GIT binary patch literal 855 zcmZ?wbhEHb_F_q!3-qVNZQx|DV-A6h!W?b)Wnj^{5*w_%-mFl zkc?6VBXb4c#3BVF0|N^M17j-_11m#w1ziJE1B0DgB7cDlD)IDnWxv59C8liseo9Il zP>8d@BeIx*f$tCqGm2_>H2?)!(j9#r85lP9bN@+X1@ct_d_r9R|Np;d_l_fHFK%AH z^6>thcW+(4aQ66_;|EtQS$O!!!80cg?%BPQLC5($P(5QwkY6x^!?PP{K#rTIi(^Q| zt+Nw$@*Xe{IQ-;9=l;Lnc?BNrIk1yMnla18!|Rfx_=~o=7sXGUdm8y8?D5mi^pr2Z pI^U;TAL(EB=a!G%y}ycg#aS#EpKsu3JPkCF!PC{xWt~$(69A`aaP9yA literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/slider/slider-thumb.png b/deluge/ui/web/themes/images/yourtheme/slider/slider-thumb.png new file mode 100644 index 0000000000000000000000000000000000000000..cd654a4c1680183026145066b4aa1a7802605456 GIT binary patch literal 933 zcmWktYfO^|6#dFz0*jkYAxr02nPDo(Y#3G2We5n&sxU;xD0?`TAk?4`t&?nHc7tSd z3BhbUwh=-{CW2C=R96rO(&5-gscoUWiha@ACv=ooX>pu=`*F^>IX5>s$;rK%mHE!r zP$h3lZ zsu&tSJM$EgWSu@k&1X2N$vNfP1r2#P<>bx>9-HY>X?dzQ`iE=Wlw;RNCAE=}lB(Zo z<6gMZclprm#8~&$>T1JWM}M<~-Ml+E|D-6_*cxWgU-Z?i6ust)nk;MoNq#u7uv;l^ zc%Sp4FTSFge0_U;M2mWF(hez^x65SwD7r47cs}l{u%vZ=dWdj%&y6Bm@aZmsp732n z`nJSRY5d(iFV7q)Zw^u^L<>z!SwVOYYiDTWE^70(u!`A86P*2iZai9?pV48-{yUCV9Ec?o@;sUjk=1>cAm88uY+&dR!6>c{!;b@zv}ZnqTHCISIq3j zrmRZR!4J?JEO}MEgUxOYRO$OSzfMm1HjkLN%MA;yI5!rveWW!)Se@qKRd$^E(bb#N7V}{^w%jXPw*+ z6yhxKh%9Dc;5!7ujG`J|4M0JbbVpxD28NCO+UBR8*c(lVeoYIb6Mw<&;$UDTwkjI literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/slider/slider-v-thumb.png b/deluge/ui/web/themes/images/yourtheme/slider/slider-v-thumb.png new file mode 100644 index 0000000000000000000000000000000000000000..7b3d7258ada4c81c6fc060bd5eea69524f0ddd65 GIT binary patch literal 883 zcmWkrX-ty`0R50E#}rYbBu=wW5C%9+p|mz^KUyf-HiDg2qsADUdFzy5J(6V!F6ux{ zaM+2OO$`xO3Uq)R3W!vwP+G1+0l{9h^wh2t1P1Ecw;%7wOWvRN3Pjo4mW8hgCkSGh zfX~}W=_U$Ep}`bKs$wE3`9_+#SDKM~L?S(L_6#XL@#7IfeEd9_vW3i&r8Rg-rR1}uO-*=86B3}KEpj8RNJSwCe z<7ROQqPp;lkCMd%5%jZYyEu~r&Z91X zf9j@W8dR9k4|L3<$&YFmJnu7Kt{FYwd>r5Rl|w2Y#50Oj3~YoXAgst?bG&}PJ#5B*LU z{dhi%PAi5yumtc_57k?YzK3lZCO;fAuuj1>3uQ0r2GKeOg9r8x@cfIq0W`lshXs93 zIA`IVN8>P>-au=Idk*gx@Nx_tR`fbB@($(zCT8GUfYt`J8SN(MT~J+7{6rlSB;A?4 zi{Lm$j#55Vz~hQ9js9@RB1tFCELoIyqu@p3lls?9n^{Tg3m@givo8E|x9G0ECUCv$ zW>S2Nc)=b`i+*yoGx z#+_e9u4`NQ<+fT+t3SUpVSIPU;$N@*R&qb?%B_=I<2M+#S1hId9!oIRt6i-(mIr+o zmUzJ$m2>{w#i(h~Zhb8&|6|8ij!3;n-D6VqYdY^0h8ofXcZ&8bNx3$};+3(67|G0C z237+ptgBK!Xd(M@Vq?UoRC)CgD-;F^C*wA|I6wb-VmZG|v7&PSfrH%d3oaQ}7UiZq zmftCgdwjomxq$gFHJCdQ+PZ_EoJLm54s(eZpwB$-?_*CEA{yP4?kaf^!fVZ&ljHjyZH3qg@$%oTSO4z3`gia3-v=)~KYIE3!JEGi-~N64?(ft0f1iK&`{Lu@ zSD*gA`TY0Im%nen{QdCl-?v}?7)HTp2+%PE6o0ZXGcYhQ=z#15;&S4a5oxH0SN zs>{3yhr48VA6(hFIb*xfjjnHNf_V!bACgrtUw2uk;$t4KK*H+yJ${-Taz2a<42PQM zPKxkJ(vROCEp9#6VdthqhN;HZya#U@-alV!X+70p)|aQ38N94n84nr1IKF1C+YDL8 zubH>}>|d1e-fGQTF3`ljJvU-UF#ieLincdQJ1?_cSRCKycQ>=`^>ta}{qLqUet*xy z)BNWDJCWv}pR=~lGk;&w`1|`i_5=0rzcl^*E&k`x_V*!;|Nk?vt!M}q6Ulhc$Px7* zgo(%O#e-%}i_n8DB4HVctbU3M9=6GpbuB|t=_ytT&nMMP z`uTi9#V?DDDUEfNEBackRz9EIx$NhQITN>8zMMPtSf%EI+Fv_07qYUjFjxZs<-Km4 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/scroll-right.gif b/deluge/ui/web/themes/images/yourtheme/tabs/scroll-right.gif new file mode 100644 index 0000000000000000000000000000000000000000..4c5e7e3958dd31d9591fb86b76bcea760d402589 GIT binary patch literal 1300 zcmZ?wbhEHbRAJC&XlG#XDOwU%v(DkaLssvulIcf!H$6UdwB$-?_*CEA{yP4?kaf^!fVZ&ljHjyZH3qg@$%oTSO4z3`gia3-v=)~KYIE3!JEGi-~N64?(ft0f1iK&`{Lu@ zSD*gA`TY0Im%nen{QdCl-?v}?7)HTp2+%PE6o0ZXGB7YP=z#15bKis=idlbh4oJ2jiQWW7vW8%1R%X~mwJayU>VV6oTSu17E0R!3~kx?Aw2 z<@$QPLv^y%A^2nhXpR#NS^OQa!}QC!nD7;IO;8 zMx0HeKEtuD{z(do7CH|P>8bhKX)WCR_&kGEx1E$yOZVv&hST{9O`5VV%#Yn|$HjEy z<(27&ui0@eG=H;qZ?pX04-d`WZ8%~tlY3xKCG+ufGv&WNSh(rqhAS)OQxEL5Zr*!u zxBSPm6AoHE-0~gh?W8#ltoZnb3pn3T+xmtnRW2k2*D$RU8Q9-}2&7w}D*% z12@~1jK{qeQU;5eZN9yD+|MU+!Ku&XmWIj%k8c_&6J6zIs!Z}Wnz?wg|38VPQ_O=R zmrim{nwiQS9d&c*bki)!XH!#V?Npr=w<=O~cEqlqDszHP%~YA|bBpuojLarUwdpBR zFQ3nM{B-l#g8D}{RTia7NvSW+wu(|;lJ7N3eQ9yjE{%mYT3$=$IaFDxF7sq#VXy`O DM15!0 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/scroller-bg.gif b/deluge/ui/web/themes/images/yourtheme/tabs/scroller-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..099b90d8aca10ad0e0a87552e5eca975a72f985a GIT binary patch literal 1100 zcmZ?wbhEHbRAvxkXlGzB3f<)J-=TNYo33`GCmeE$39%ip(O{=Nqa{`~*` z?|&d*7zLvtFcd;S@h1x-0|O(24#=^fJi);6pMjM_#$&^RgUzhWECL4>ELn-DC~RnIVicC$7cz76!_!<$ z>JQ$${Hzu@UzjE8z|Ms$FE5w2*ptE~x+;X5$?(CI16#El)=4dqV*M?ebAwTWCGCLb z!rW*EhC5yYr?2V8>?~$a3FsDXisvX`{L|_%{qTbW%}d{jE|}`vc)XF(rY@$UsPV+) zrOQ%#E;pnzH`+^U=vaM8Kg*>5z~#U!(>vEVxDMCxM!#ZRY9ajM9&bW<)1iIUzyH}X ztY+Y{kkp7jH^=eevkOau1SA?YzdQ|GUUZ`%w(=VXldOd1+nvQV=ceVVf8Tof`}V7UcV7Lu_vY_|cfTII{rlwo-)A5GzWVg{)n_33 z|K{`GH(&m~{qpzyxBo!EFbYOPU=W9Z;!hT!>;5z7fZPbm6AT=|49qGs6ec`4(8R&7 zWpctG@o+1jveTR&8bSd<0UIDB9_$ireT@Wf$*vuBf>3d;uuMTd5FMl%bJhJ}p` byxeRN0S*aFO-%B91_mD*nV1VVf8Tof`}V7UcV7Lu_vY_|cfTII{rlwo-)A5GzWVg{)n_33 z|K{`GH(&m~{qpzyxBo!EFbYOPU=W9Z;!hT!>;5z7fZPbm6AT>x8PqvsJT@#i*vuiU z6?0<4!o%$X%3gCkHZD5aEoRSf;Kato$NLqWyJS2!B{ngr2Cs@axoPR?Y3lK(=6G&i zc6O>^{;NADH!nXw$F7-6)@zIMg+(5dwPLGER$g8nkZIQIwRKf!fAIROyQe}EudPcs z9QRji+nSq8QqHf6-EFLUdwW6Rq8{(<>tc3SeC{e)y?y=t)|&rZayE(v4-Z%JD#yu$ z8$LdsCF?v-Cd}yR=_uXgdorQM&(C|=Hp|(Dn7q7fhzYodz&w>VTjrBahiCSe0-cybJ4R4j(HVwd#&8~uB^?Te?#&2xA%OzoBzw} z2R5}c2wYkne}3QI-`_txK0V)m|GvM!e|&y@|NQ>_|NlL=Rd~?AB9`%>kwb08gC-uc z7Y~{R+%z7xh=gT4Y!xeeexOaJ?8U=&g*J^x9V*i@9(8IgTk)t%XWNTM-3I$CVwp{@ zWjyY+c(&qkpUt-ykNX|iG@ndx5zBls(L=3Mg^f|?!IQ}WZkkW0goI^2of?t0^69jg zvX@V%C$wokn~{{I(7=?jY~{0AIon=7n_X~B^ZA^TYnjjIRyp5UhSa>TCY|tnU?ix<%(si zUaeZQ?bWN*8;-eiy=G^vNqD_>$Fo(h*X{ZC>h<~qY}#)&91+WYv+;!5>NlHCNgZHd qxZtM!cFUEp?6+HQq^*9t?M~V2x7#1IX}{a?WSX}gvj__dgEat$YLPww literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-left-bg.gif b/deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-left-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..dde796870137f9f9e091100ec800072498b64f80 GIT binary patch literal 1402 zcmZ?wbhEHb)L}GYXlG#P-SqhEz0a4Q{k!+(?}K;0UVi%X`tzT6U;lpi_V@FTzh8g; z`|4|fnTJWlvlbe=$Pt%A$HOF)Fva?eR z^IzRLxmo@E9J^*NS+5Y~3yVA^Yx!1{th~HDAl0nbYwN13eZlLq?w$%wytXdkaM)k1 zZEJ2WN;$tOw%SQ_jCSclKT^G@bGXMuX5aD#!Z;nSXxHI@h^gZ$rb^*Ecq2-#@o^_xJY?4tM{T_useY z=jRufSI4i9ThRFZ!{gKQ{rB(t`}@b|*Z0rw-w!MY*fbtAu<&VIVB}C+@t}#v?8Sp- z0XL0@Eh1qV4_hVDRy=HzDLb*yfulv^QHRR3j7Oas%T_$<(%JUnQMbV{jmJGE*D{iO znN$}%?z8#!;&HzNo92@VE@GKaCVHr?d@{+$?B$cmeq2iqObH3gd^$BEZROKxF=a2G zPETmld^RIxTIREv8S^wRFy(A}`D}K&3zjwN)<`^_abSv3P=;*2^VR!m?g2osqUGa~YHAgO|$}v}wIsv1D4-tCcI3t$MX; z&9+ysR&O{KuJwA&CMJOf<{i&gy53p&!*>FTG`_0A^YOCLDI%9Tv4Z}7o z?YCR5gk`_odLwQ1+6^oY+y}NlXw!bT^!xwa?EmKT z|J&;S;_(08@Bg5}?dtXa?f3tl!0hz=|JmyP;P3zB^8e-Y|EI_Co4xAq`2W}F{hGY$ zjk4q5?)u;D|MU9)A^8LV00000EC2ui00RIq000F%ARq)HIhN?DnrzyxZVbjHt3>W|e1@Q4~3<(Tm;RsAF1q~rm=nyy|06T&;ZRY?0 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-over-right-bg.gif b/deluge/ui/web/themes/images/yourtheme/tabs/tab-btm-over-right-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..45346ab145a9f4796dfbebe62d84c2a785e16b21 GIT binary patch literal 638 zcmV-^0)hQUNk%w1VJrbM0K@goS5=hKY(MPoOO23|ls}S{n3*z{nw_2~oS&kfp`)glrKhTo zsjIGrt*^3wv9q>zwYR!&xx2n-y}!a?!NbN{#mCB1$;-}9JI~T<(bLvq4b|7%TNc{f z;8YRc;pI&e(BTJr4xw7TUm@{kM ztU1F10-!^S9!C>oFt6t5zwd>cgW6PdRyEg3#3kK-k&AYen-@tJ?|=UP{`(&Y7)HTp2n_uYQ2fcl%)r3Npab#>C{HkO#4<3m zSU7BWz}U#Fsu82{@Bt$ykATIDjt0lW%z^?U8V?ebn>bh$O%xm^r7&}_$QvXWEO>f~ vokdbbz+rM46PqC~1H*!Z<&1OKC3FlnEYJv?!yK*^TN$w6U=tHF6N5DXg62z6 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-bg.gif b/deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..34f13334511d9d8efe3dee18e6f69f3d1277f8e6 GIT binary patch literal 835 zcmZ?wbhEHbWMq(HXlGzJee3<1+wafb{&4orhjVv6oWJ|w!rhM-?|r;<|I_6MpRPRk zboC(+eZKbS^YurcZ#@2d^U0T6PruxL`t{DUuXlmy`PX~TzukZFjbRjwhQJUE0mYvz zKv(}~&;hv}lqVQC6d3d)RyZU!wQvY1*c4o7ILO4xDIjB!uz;bFk%@_cgM+~u0EV(m Avj6}9 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-bg.png b/deluge/ui/web/themes/images/yourtheme/tabs/tab-strip-bg.png new file mode 100644 index 0000000000000000000000000000000000000000..fa8ab3f462f07ad14c7dbbf76117118a302e35a9 GIT binary patch literal 259 zcmeAS@N?(olHy`uVBq!ia0y~yU~>SnxjEQ?q`I@C5s=a;ag8W(E=o--$;{7F2+7P% zWe87AQ7|%Ba7j&8FfuSOQ!q5JGBmO>HB!(uFf}kZ+p+j0P#=4Vr>`sfH6CexDft?u z8*)G)&H|6fVg?4eLmeKJnpZ&P`;>Yb*KkvN$ zdGGD72k(9{jDpb+7>*&J_>%?bt^W) literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tabs/tabs-sprite.gif b/deluge/ui/web/themes/images/yourtheme/tabs/tabs-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..e969fb0b7338c81f8e22e3f69f82fe49fb9b3d2d GIT binary patch literal 2120 zcmeH`|3A}t0LMR@Sv#(pzRU-6RFY!pi@u#ZcG;OPS3Isuz7>Quj<9+o%+>iHqydKXVUq3t_j~CU~d;1O=3^k%I zK@b^`uT%}+t{?xq&)D9te$_uGl4xEH&A%Shb`ERb%I3SIy7w}@coY$jfq&$NZiV54 za=zztL9f!-HxBy8kpUIxp8ygSBAEcv31nyzNTM!e8%TbKsW$>0{H=_AsuJ(WpBfSg6Eg;XE65o%BUvD{bXEk zOXWSPEqo%A=v#Hal?Wf>hPPG~`V-;UmYcp0i`uPV+Gua_+QM z+jV}9XjM%UXVRS6?YV-3@6U&nCSD1PY#jK)GL$I7A7l=yuRmuXLlc& zu@F~vWI*)H{TFEUl1yM1Q1?`aK~Y?SJL;YpH0EedBw1L87_?THz$uRK(*dzsGDIRr zN|-oDu000xBPZXiMrBDev$%^N#95@_X;=$Cd;!|xEBsJq?XSTrf4yxQ8O3r=d><9( z$|fA7Z?+Cv6}4?0d(}aA(YxVj&me;IkXQF!hcK$_x&zIB`dxH%z}@AAET`IkY#?-W z$p}0A^jgNzrjTXz(8BD)vKw(l9~dVr_zGG6(PpcLQ%k!J%WoygcA%1$&nV<~7}(J7 zQY@FzM+-6?Q<$mNZpzVnSG{=+X~duCio)EOmnf#~Nu{EgbFmx6bj+qJOSnb!#x$OQ zx309J8HCcIwJqyPQw7b|^|;5i*7XaX39QN3hPrj%RhD2mP!*TgGF~F`a34c;?haG& zx`J%V`8^&zq=y45Z4xVov0;gS$z^#J7eHm)^lR+#H!Oo9khi&`&-UgmsGutKK zo3JG{IQG`S`*8EoS+V&=lHg5rPQu)WxZ?7;?)XQlxt^mhNSa=H@?lM%-@f~@{?s<0 z&`1vYIN) zra0~MyiReB6<(**9P7x_+-5Gmp-umDajq_{K$xRXs*K1n9B%+@W8xbj8=()LXV1q> zMX*6MN)n85BA`R-8Mu=o%`(^n`+Em-BweC&$n`L*==eqTTw-v8Jr{{O(q~Nu5lXI5 zOmaCba9#xEHSd)AVCWluTNGO4?WKyhhl1J$ll<_EGTqg0SK=TsxEO4=3?n(>GxLWT z+Fs!J71z|k&D@lenZG({BP+%iMQDqn^!^rkIa&w7FRn2+vc5;h@EPdNBxq}`#kPbC z!!{vHsb7oUY(CXAY`Y?h>hbZ|hI1IH9cro1&PAQB85HRX%{3qI^-El@T)1yD;q6N* z*pLx1l<(NiH$fRyS&5sN5QggKUQUKG{0r|y+e1x{I|Dc3>xW_#PS&{kV>SHjg&6$f z11U-@noGbjlFRoKHs`+Mp*9sBYCBRn9lAbP_HeiTu9##_UP~ji_3{WK0b80cM#ok+ zttB1zXuJ7p=bEan)?Gi(v2G2VjIEI9b|-hUZmaplWs}LP1I{(G?igl@OCfy#Q^4Yw aY~k|oDS;V9tOD~>PCR>kAPR$l-2Vk@&nw{o literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/toolbar/bg.gif b/deluge/ui/web/themes/images/yourtheme/toolbar/bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..0b085bf24e173f7a2568c347f3245bdaade1579b GIT binary patch literal 904 zcmZ?wbhEHbWMZ&jXlGzJdGqb5TR`;g^zCwCTzUXRA1^)paQWfKD-So0~;Fd71bH3SrYvH+d-pFs!YKv14w;7Da~Z1~~up_!du)~evahJ_E= zc%_Uy&NM7kYU38y$=KqsP`Q;;Sgxby!h)1$R&Ie6E(r^kHZrktoKP`HXkcJuWMa6% p$*}A^6FZ-Z#4LwKrYSs=j0zqwFtu<5D0@r@Sh(uyYDPu|YXAnXewY9N literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/toolbar/btn-arrow-light.gif b/deluge/ui/web/themes/images/yourtheme/toolbar/btn-arrow-light.gif new file mode 100644 index 0000000000000000000000000000000000000000..b0e24b55e7ee53b419bdd5d769bb036b19fe9592 GIT binary patch literal 916 zcmZ?wbhEHbQ@i%X_#s+qO5ao&#Bg}b_z?(JW>fAX3`Gd3KV zv*q~0?WdOQKC^1y`Sph`ZaH>k$H{AZ&)(dB?ha5d!zdUHfuS4%ia%Kx85kHDbU>Z} zernn7GpqKUUw`Q0mSb0ToV>R8?9Kh>?)?A%A85cR7!84;8v=?yS(q6Z7#Vax zUI66@296R2W)2yT4GRu7a|mm>STHs?w+nNawPX}9G%#|o>fAZ8aq;nf1?Mgq&rM5C zPSyxs6?1aa(*sN*0#Y579~gX_Ir7AO7EE5yG(%Y4FT%k%!-dUUH;Lzh!*aJqzAC;N dg;0f-Rg6jrr6;$pzP>);aF?w2wgd+TYXG#xTAcs@ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/toolbar/btn-over-bg.gif b/deluge/ui/web/themes/images/yourtheme/toolbar/btn-over-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..ee2dd9860c799be6dc194b387c36a953c55aac59 GIT binary patch literal 837 zcmZ?wbhEHbWMoKTXlGzJeCy}&J3mj~|8@T1uggzJpf;!hT!Z~imrfcyl?6AT{b$et`3#gN7&v4Zqzw`_ELgzA$|)pg(Xe14 SBQvX#kb;4O15gDcgEauAx-gUg literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/toolbar/more.gif b/deluge/ui/web/themes/images/yourtheme/toolbar/more.gif new file mode 100644 index 0000000000000000000000000000000000000000..02c2509fee0fb4555df61072d8e8daac8dc7430e GIT binary patch literal 845 zcmZ?wbhEHb_??HKjfkTUdnM1~7 r!-9j&9Ku>L9YCQ*K7KbIgN+Z4bP31@U9tF}++`ynz+epkzXub1 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/toolbar/tb-bg.gif b/deluge/ui/web/themes/images/yourtheme/toolbar/tb-bg.gif new file mode 100644 index 0000000000000000000000000000000000000000..4969e4efeb37821bba1319dce59cd339cec06f86 GIT binary patch literal 862 zcmZ?wbhEHbWML3xXlG!!aPPx~`#|*Z;=Kx_O l3y+3|gN`0r3Od0)xY0~Iq4Rm?bCJ?B`>oTK&gPd3dz*}CLR%aU_l zD=ze`x;$asm5J-FP1|y7=C<4Oc0KGp@OARxuQQK*oqzJ{(lcLIpZm7u8ukxPurZ-YfblWU`p4o5&%%PX!%{-|5oZ<}b{tn!>Yw4W=u^Uq zQpF50j}MM*?7gx+W?f1zJDKabS=0$Rg*yZqflo?c5Ixr^dQ@Bde4NjsFf-c#W=%hte#Xx8144{oy_EOnT}e!Oo~L)&NLV<%|FT literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/toolbar/tb-xl-btn-sprite.gif b/deluge/ui/web/themes/images/yourtheme/toolbar/tb-xl-btn-sprite.gif new file mode 100644 index 0000000000000000000000000000000000000000..1bc0420f0f0e30675a9eef74adbcb55e3efe9d00 GIT binary patch literal 1663 zcmd_p`BPE}00(e9$fKOV%p>iPJj&c%bKS|xcC^ftT+_6&bQ^Q1v0|HYZH>xJ<)Pwz zJ{2=BT=7g3OVbPx;Rzm~c$*61k!dRMUNt+7`}{lhJD>Uf{{7*5&d1C3_zfM5t5zZg z*DM_almg(yCS!GDY@;y)?seu{c7h(Q&j zgny%6K+jMmP;5z0Y-vv%s!SALDvB=?$Crz#U$z654p0@{`RiKu^2 z14&f_^ePFRB}v{QO|F)tR7+E8P=l$c+QGEiq4e6Jw7Q}6I#~v)9yOfNFq~OGocVGj zt6?PT&fvmXJUF)t2KjJ7H_Q;g#SmQ5 z1DA>53Nc*S3$yy*ntr%$0BMjQ>>fpnXzn#itbEfu-`cm(hU#B@JFwI)`Pd=(_)fa~ zZtzp*(8~Lvl_n|DJczUmA#Y?z+c45Gigb=49N8*o_%nB8jW@E^HM-6jM|cwme{6$4 zuIe6F2`1FtlZbFqBbs8TgLuNs?IjW4Js7St1q>d8g*)ROwcN6j>9 zSu?Y&nf(OIS6~Hd6`or~l%J7#)Ecs|_GNMX3+8_r>uji{Y{M4quYv` zK1ZlvHoGPY*j-7ev-=+W3ti~ob1cXsIm=-%B`70^8A;N(lJ71^2VXz?dPh4Tu$GN$JgLf z{3za}WGW%h4420UW0~llVVYVIXr;Kr+JF~!z5KiQkXD$d#isr)hd6Wp9fH_M_ied= zbBRO2H$dKNZxrE1@t!jP7=AW&Qn~^8e!TYHBDTNK?x(Rb1Ec7OaGiY&W#c)!Q|oa) zxR@|!V1K^37G&$K8%{T-20M=%Uw4vYF~9N0M5&-GxF;=F>DrU-MpPWMarYu94|<*m zCmr;5E>{wK?G#LcKY>tb9dwxj<f_U;r4roZGa6lchMQo#=t2JlW z1rrR`MBfun)4u2}<(LGzxnp$QfVUwDi0IAGB@ z(YR^83IK=@3&2sHp2BJ>i_4GC(}I&g&Z3hSEU z&NlR)MYGw$S*eL3K?x;6chQB>jr0!$UUa!Ir<-f7mDQk# zBwX&silB=a;YFDn76zFmv)QzrZEk1V*~{;o^E|)bI{pWJ`S9@Y+&;Y*FLa&mKg-o{ zGXtE#VCd`XtN%z$v&7^lt+S-nPx^l-H-oChVzFASZnt}UeB9&lc)ebq&o>x?i8W;+ z0x#DTPXs0f@Cq;`sILTdDyqJY!dp!Y{CJS@QVn6G|s1BUZM+WbuojB z68@5KNy4B6%MygL5X|E591VxVu~;mTNF6 zT4fpSr~#G*mQx_FYA^?^pdwK*kF0=+VKowA?Or}MJ76DP!CM%*AD^gZu#s95A z(UowVnQP&+Hh#jD&D=5%-X5|Hk63M^_B)Qd&U>!=55^uodhEK?;~v?6`RUM^EeD?u zRaBmERc*B$=XEu%J!RdtiuUaXoK+lWJI3$cRO{Tq^PTU^ZQD8=zLF2tqkLnX?vSIJ z*Yl=;`DA&!eg2!Rd7-JEKVqNJFP{p`eI1PmRwLiEcXNZi?S{R1W!QA>{Vrp4!M?Mx zj_=e@PDiKTTrV5^*>fdcRasKn(y`S4;=E(uxo1t%_l&bzclc_ccC0io_oQne9xONN Gx$b`#5UBhB literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/drop-add.gif b/deluge/ui/web/themes/images/yourtheme/tree/drop-add.gif new file mode 100644 index 0000000000000000000000000000000000000000..b22cd1448efa13c47ad6d3b75bdea8b4031c31e9 GIT binary patch literal 1001 zcmZ?wbhEHb6krfwXlG!sZ8LT1HFNH_aOtsj?X~gjxA*9E^z3&Ep6U}i%{O4CWB5GR zxH(~o^CD6fgr+PAPg@j`zBoE{b!f)w;OtcqS!<$mRz>A)jmQU~$dc{RCEH^Pc0?BK zj4s|4Q@Ag_Y)yK_x{UHY2^CvX>NjQ8>`JNKlUBPgy>f3}?ar*)o!Rv}a|;e8R~}5M zI+k5?IJ@p(X5I1prmcC+Tl3ns7k2C@@7Z0}wX?EwUq$b}>dE`-8_$%sovdm*S<`y9 zvg=S~|DoE>6ZKu^Yp3pS>N(xmcc!K9QuCyv4O0&^O+Vf`{Y>lRvmG-|x6L@yKI2T+ z?1R&1ADl7ea@VxWol~!LO}o-P{c88ji`{c?Oj>eo%Chs*mR*>(;O5i?H>WMVJ$u!a zxvQ_tS$1N<@{-~Tgx`xUa|S^%B{CoY`?W?%iUF5@2}Z*cg>Eg z>v!B;zx&SmUDr15xw>=vgZ29!ZQJ`~+mSmvj^5pQ^4^hC_l_QYap3f`!)G2GJNw}H zxtAxeygq;Z-KCo^FW&ihj$;hsoH8C8796zp$T+b>@c4oQ4ptl9{CxcUY?nYS7uzPr^nkf~ zF-KnfWK`sLl+9v^jSOlzC8As$;v$iu&bdH0ut_86$zxX@GwwqiGMCbLCdz4)g$X=7 zcxoaWQ~HIKhmx0vy2>O}Xevx#ky5l?_wGr-qtgtHrgJ}!+;FF#5#6#i2*%nh> zyAFx!#AZoGf3_x%!Zyuz9to2P8w(l~c~334oIij5|Ns9CqhK@yhFS=VTXXjp>_!!i-ZjhjBP9&d=d&P1P-@w z2*?REbZj`-z{teJvFE@96*ex`7^N1;;s=LXIk{il(fr(WZkkH%E}e=3)qp;}RJS=1 ZACr#t%8J+VSOzWgoT4>ViN zU%dGJ;lrOVU;h61@&EsShEXsY0)sdN6o0Y+UH6|s2joUjo?zgZ#9+@MbEA=|m5*7N zuP1?_;V=Wcmd2kAjEoFSyb3l63JeWQEzG)l4<-aOJF{^!n#_11;LyO$#4EyJxnXG= zBd1*n!vlvz??xWBngt9APKV|*$upc#SeW74&N(&d!GU0fOO1}n=k{oQNISc~334!T+I5ReJa7x*DTyS#YWmWQ8@*yChwS&o6 zrsT(mM-FYgx*h@@4;QobG08Hm@c7Wg%*HKZQ}Uv~iG_ooBg3QNK|^B;FB^}5K!V!o j#pc~334eSRT}sa)VS__s8w&@Y zgu;q|!z~;Fasmw<8xA%wGBG*Ccx+O2Y*vXZDtTe_=t!5iao(F9ACgZ@)bm{w(wUgh k*e9SZBf7&RvvH|ppWc*{Usi^4=^EOswG7BU)WBd303hyMjsO4v literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/drop-yes.gif b/deluge/ui/web/themes/images/yourtheme/tree/drop-yes.gif new file mode 100644 index 0000000000000000000000000000000000000000..8aacb307e89d690f46853e01f5c4726bd5d94e31 GIT binary patch literal 1016 zcmZ?wbhEHb6krfwXlGzhFH%vfSJo_7)vQuAsWC9EH&km;*6LR^?KiYxFJMjooS=wa?sdwqwu&r?{0KDI0upwuR+x56{~g zkq<(VSvvztwnvw2k15z6Ua%vwaA$PU&gkM@F@^i$%l9PIZcnS(l~TJWt#)5}{f^9- z1J*HzZPSi=W*zp-IqIEx!mH#^WYOu+{6mTPhZFOT08vuj(d7JNDFp|U3y&lh98WDi zo>p==rRYRP$%%~86B%VEGs{k8RUS;KJD6E_Jiqc}cGa2O`cnnX`*Pb46}28MZ8%lj zaHgpFTzUJ+%FZKY-6tw0oU5O>vwy;#zG=ssCm!gZcDil)nbs*M`lp@kn035;#_6_M zr`l(nX`gwvYwo%3nHRffUg(*1rFZuAiSsW_n15;F+#8b?UYok``qahOr>(v;d-dhn ztL{u+dw=%2>kHRkU$E}Z()D+iZN9m5#o~d_ub#R;qm;f57%vfxPJS?4f`H%+y8jS!N=PUJlT2r&He)i4xD~_ z;M%)OH{V=&_T};0@2@}p{P5-1r$2vx|NZy(|Ns9CqkyasQ2fcl%)rpgpaaqk$`cG6 zR~e)^Wjr=4aC9<_3F%-wzQDoVIAhB~=k&AfoLyW-Re?t*%+d(FBC_aGf`Fq$D3_+D zkjse)Dz(dOBqZEh6jdE-UYxkdEGT3zv4dmE!Dl=ZWi9e%{1g;@!G-s^!P$| z8==@$AR3<{5^GPA?~^>Pma%d|c$9FpHZ#?|? z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$lae%R5x_+pfh=9;jCRWxkA&~=x h2Yp#A(~SZe4mdO}wqloSIC&-M@bZAgN<174)&TX)MQs28 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/elbow-end-minus.gif b/deluge/ui/web/themes/images/yourtheme/tree/elbow-end-minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..9a8d727d70ff5161ec18c0cd0156ae8d50a23b75 GIT binary patch literal 905 zcmZ?wbhEHb6krfyXlGzB^h$R6?=)rU-Z?Z#?|? z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$``4~=2xoOmJxRJ?YUCe?7 p4c<*mc6tvw4?K5dl1^^H;N?iZ| literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/elbow-end-plus-nl.gif b/deluge/ui/web/themes/images/yourtheme/tree/elbow-end-plus-nl.gif new file mode 100644 index 0000000000000000000000000000000000000000..9f7f69880f48db8d86785639055fcc198764617b GIT binary patch literal 900 zcmZ?wbhEHb6krfyXlGzB^h$R6?=)rU-Z?uiX3i z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$uiX3i z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$y4*XmR1y>vzmpih{E$}o|KC(Juvl9;ogEauy5=OfK literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/elbow-end.gif b/deluge/ui/web/themes/images/yourtheme/tree/elbow-end.gif new file mode 100644 index 0000000000000000000000000000000000000000..f24ddee799ccebea4dfe60fd65a5703a6a59d44f GIT binary patch literal 844 zcmZ?wbhEHb6krfy_|CxK^xx^&v19*7!DtAK$PiHc$->A01UeuBlqVQCG#MBA01UeuBlqVQCv>6yVWIQ%3 sIM~R@rxjCSpm?~QTh?igM}U%RmzciOnH3WikN0ueH<|n}RA8_M07ViGB>(^b literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/elbow-minus-nl.gif b/deluge/ui/web/themes/images/yourtheme/tree/elbow-minus-nl.gif new file mode 100644 index 0000000000000000000000000000000000000000..928779e92361aaebfe9446b236d95cb64256e443 GIT binary patch literal 898 zcmZ?wbhEHb6krfyXlGzB^h$R6?=)rU-Z?Z#?|? z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$lae%R5x_+pfh=9;jCRWxkA&~=x h2Yp#A(~SZe4mdO}wqloSIC&-M@bZAgN<174)&TX)MQs28 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/elbow-minus.gif b/deluge/ui/web/themes/images/yourtheme/tree/elbow-minus.gif new file mode 100644 index 0000000000000000000000000000000000000000..97dcc7110f13c3cfb72a66a9891e8ab3ccef4a98 GIT binary patch literal 908 zcmZ?wbhEHb6krfyXlGzB^h$R6?=)rU-Z?Z#?|? z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$``4~=2xoOmJxRJ?YUCe?7 s4c<*mc6tvw4?K5duiX3i z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$uiX3i z{QdXWpZ@~^!zdUHf#DSbia%MH85kHDbU@w$y4*XmR1y>vzmpih{E$}o|KC;?;W0q*gYXG$^NPhqT literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/elbow.gif b/deluge/ui/web/themes/images/yourtheme/tree/elbow.gif new file mode 100644 index 0000000000000000000000000000000000000000..b8f42083895bb98276f01a5d0e33debddb3ccf1b GIT binary patch literal 850 zcmZ?wbhEHb6krfy_|CxK^xx^&v19*7!DtAK$PiHc$->A01UeuBlqVQC^cfgAWIQ%3 wIM~R@rxjCSpm?~QTh?igM}U%R7pF1PhKh>{$NPBfn?f{-mK<+pWMr@g0DWQ)HUIzs literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/folder-open.gif b/deluge/ui/web/themes/images/yourtheme/tree/folder-open.gif new file mode 100644 index 0000000000000000000000000000000000000000..56ba737bcc7734693d7ddb2f50c8f3235fceacee GIT binary patch literal 956 zcmZ?wbhEHb6krfwXlGzB^h$R6?=&-=aaIP?oGg}kIcy8^I2ILfEiU9P24$!>3v-_@?Pw@dZdEXiZDqz?6KotSEHa+=}k8OCR3nw(sqcz%)E z^&Jkk_UAm>?EL6pz~8F{|8JLmcvAKMN&S?id*>|OyM6oiIctwC-Fj{1-dlT*9ou>8 z$^Yvu|6jNKf8Y82L+Ae=lmGvp`Tzf%|NoaBIdbIa(W7V2p1pYS;<0P5Z#?|?{QdXW zpa1{*{pbJx{|uvGGz2IP0mYvz%nS^S3_2i_KzV|JV1OfBquQXEGvI4}0>6q3BdQLvD`XSzZ1sfd8&rn9pxa_cf0 z8;-R|sQDgyVbIvhINu@p(3Fo!OdU)nOn*uow`yILl(G@%_!WGtV|{}AnFkvZ9YR(b rI<1IZ9mc}SXv*Rj;4nR}iJ6T{KqBGLF$ZZACT_Vm-ya@qV6X-NkKMK> literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/folder.gif b/deluge/ui/web/themes/images/yourtheme/tree/folder.gif new file mode 100644 index 0000000000000000000000000000000000000000..20412f7c1ba83b82dc3421b211db2f2e93f08bf2 GIT binary patch literal 952 zcmZ?wbhEHb6krfwXlGzB^h$R6?=&-=aaIP?oGg}kIcy8^I2IRjFD>R>Udq3sOkj1T z@R}--bv0re>LfNdN^fnF-QFU)=hNov3pP6ZL zdwbCB?S=oZs*|No!)|Nor- z|92fYaNzXm(`U|{xqSKZwQJXoU3-1w;m7CizrX(c9|#ym!DtB3CIl3JvM@6+Ff!^t&H2GZdv-WZP}~tRj*oB|LorIYr@vw({}!uwfFDhO(&LbJ2U^lzeR`sUwH800T8|T z00#d*{P_PLi2nZvyK9sf4FQ^mfZ|UUW(Ec>1|5)1pgh6A(Z?XlA>*-O!NF!$M-7&b z2M@Kd^GWGABrIrf5YP;mqG0Ic!oef1<ENsed*j@4Yk?RR_1qN#Xfm)wA literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/loading.gif b/deluge/ui/web/themes/images/yourtheme/tree/loading.gif new file mode 100644 index 0000000000000000000000000000000000000000..e846e1d6c58796558015ffee1fdec546bc207ee8 GIT binary patch literal 771 zcmZ?wbhEHb6krfw*v!MQYQ=(yeQk4RPu{+D?cCXuwr^cCp}%d_ius2R?!0jBXnAQ) zOH<|l|Nj|aK=D7fpKD04vtxj(k)8oFBT!uNCkrbB0}q1^NDatX1{VJbCr|b)oWWMT zS%hVC ~NwO_yO%;SvZ5MdNYf|QNy-I*%yJaj+uTdt+qbZ z4E`Fzb8m}I&!N8OKmWEcCmrLs^Hs&3i)mt@hQVdcqghkaBs*D}tG_lKew4?rTjzIZ z9tSone1TS+TR7tu^CunG)Y7Jg#sw#)sG9C!c0I%LEzP)9;hqRf&)s$D8d5Db{TBs% zgl0~5QQ91luq4Q9tJgt4QLbaxZvAaKeCM9!oy85dg4k>TdBSVqjHub_PG=PO&J-rx z7oYTuF+kH|tG-UK+EkUhDjYx?zW?T|lx>+aOQm zzL$v$zBLo4Cj=G&tw{H}dW?tlTkS)SY4<#NS92z*EY-MMB6Ftp`R=*=*Ev7cS+X%W zMCur^FdlokL}1Y+&aasU2J4#EOuNlnb9CmqgLCGTSY!1BD42pkHY^XidQ5=>YQx%` z*%Pm9D!CkBu&tMWm(%-ejACVWGS2RX5=QOJ$1*tr7F}F+*-OA+Ly&Isg|AEuUYicA z#%IG6kPXkHt{zk2M6zK@Vu^4Q(1zE$?yY6M!^&jQ+2^E?!p7{g*|X6}vuRC3p@jk0 W117c83?+LXEZI4G$p&LV25SKE>nb+@ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/tree/s.gif b/deluge/ui/web/themes/images/yourtheme/tree/s.gif new file mode 100644 index 0000000000000000000000000000000000000000..1d11fa9ada9e93505b3d736acb204083f45d5fbf GIT binary patch literal 43 scmZ?wbhEHbWMp7uX!y@?;J^U}1_s5SEQ~;kK?g*DWEhy3To@Uw0n;G|I{*Lx literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/icon-error.gif b/deluge/ui/web/themes/images/yourtheme/window/icon-error.gif new file mode 100644 index 0000000000000000000000000000000000000000..397b655ab83e5362fdc7eb0d18cf361c6f86bd9d GIT binary patch literal 1669 zcmV;02738NNk%w1VITk?0QUd@0|NsJ0|X2J00{{R5ds1i7Z(~66B`>G9v&Vb001Kp z5h)oOFaQ8I0021w0Y3o&E-fxEFEBACCN(uSJUcx_0Rc|{08I)CQ~&^5003P90ZlnN zZ2HgaR#tRYR&iNbdS75? zU|?otXJ=+;Yin(FU|@V`YIb#ZeSCg?et>}h0EGYmiU0tO0055<5Rm`?kOl^o005Z) z0GmN+?~005%|1f>7~rUeD5005~41+4%8tpx?M0RglK2)Y6SybBAy92~17B(5YS zt0^g|FE6h$GP@!ovpPDDN=%4PP>)+%g=J@gYio~fZHaSpjd*yLX=#~kY?O0znsITT ze0->1U$sL+wn#|6N=l(?ZKHd8zjAWJ0s_Pf3(Ero%L)p|939OP64C(y(FzLN0RhLMcRH8%DjAoeXS{Ujv)EG+gtJ^wQ^{W?3v zNJh*-LCQ@{#8XqnUth>oR?f~+Utj)HQ~z6A@Lyo#VPouQYVB}x>v?Q{t%gd(L*0R{xyxG~vlatYag2Jb&>V$^kk(2*{ zf&Yw*|C5vdnwsaLq~@lni75b z|Ns8}{@~x^A^8LW00930EC2ui03ZM$000R70RIUbNDv$>R;N^%GKK1uH+KXhN+gI) zQmI(8v}vO?E0!usk6NLdNb;LSjN7_}3)gKMEm^BfQ9=}oWJFkzOv$3fZRN_A+GfF& z32BcxoBv$pj74i3x2G;S3XK)B)FeoEmXWL#snn`jv}gsDrLa^fQ>tQ`viiu;6mb&4 zIih50RjgR4R9RKTR}rL1lO$0B9ElMiAmt)9>blUBj4Y5687efWvLQo=T3ms|nUS42 zGT05w#%K~HN|L}(qt>OeA3m=K#Zlp_nV3Y10NJUdgV?}Dj3P~n6lR(~fAPA&<^wy< z3SY;ip*i$tjvF;7)cwO(hY@E;pU(dEJAMvK96x^EuyA(#I4D2W)wt>4TNE8YjvOf} zG)mrhfAgFX#~WKj)1E)1@X?1HY^b3I4=}g`${ckFf(Rmn_^}B+|J5T5Fy|aN${TUW z0S6mQFhRr!;UgPsq@e^7N-V$&6Kb%bq#Sa*Vdfi^>~mm0dsJzqm1!)YL=j6Upi2{A zuE7S7XQmMhKT=kc#-N0zk;D-~AfZ4mcqp-i8dkz#<`P*@Bc(t0{IW!$Ngy$V5I-1@ zizZxdisc(i!~o5u$IbJ_rv6JTkwg(c{D4CNyI4a65=m^j#u6#8*Ipi;`17AUTJ(BE z5kdIy0|yB7l8z8W9HFeL2U?Ou5|`ZbpQ}X_F@z60{NTU@$Nckz5JFhX#WM$9V(qqN zczc{Zzy$F_4?N^RzzK;Blf(}}6cGhE|5-BcwnvOnPkU1IumcV|U{F8}13B@74?zS0 z#dwzlam2`nic7|EPvkH$4mJotfiVMJGlaxG_)rEWKMWD>&Oe?)03;wIQ58SrAhy#rm+eCjRSRuH))@dW!7dZ& zW5o_u2R%03bq^haWeql1000EIv_ld+Sb#9`4TvW`^x8Ju-~j^zOmNFONd2>m2p`;_ zHs5>m&A|f!9AH8(f>-{JI5cc`2#jD0Go}*+k21NqFv0{8KoG$M PBfNl1GVhQS5C8x>^BLCH literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/icon-info.gif b/deluge/ui/web/themes/images/yourtheme/window/icon-info.gif new file mode 100644 index 0000000000000000000000000000000000000000..58281c3067b309779f5cf949a7196170c8ca97b9 GIT binary patch literal 1586 zcmV-22F>|LNk%w1VITk?0QUd@002Ay07w84PX`%A3LHrS9ajJYWB>?a019mY3w!_= zeheW`4kS_$BTNt{R2C>w87x&AE?6EhTN5*F88u@cHent&Zy_^VB{*RwJ!T<2Ybrfu zEanAeNJ0@02_k<8;bxSjRY)#049Cl8e5Y1_tY3bkWN(XQaEfVlk7;?7 zZF!SzdY5*8mt2auc!8LDgq&lBt7(C!V~et7k-lw{yKsuMageiql(2i8y-tSTQHA4U zhskM;!F86%bDF?tGlSHx~QzWsjj`Ou)c+z$A_QDf}_NMrOt$@%8RPR zi>%9lsM?CJ)Qqyzkfy4!pytE%CW@Nu*TlB$=|re)xF5pzRlaC#O0*M=&Huzs>kT8$>*ZV^`Xr3 zq{{ZD&GV%F^A_)Y{V6-P_#W#@Xx7+U3jK?!?;j!ruDO*W%II z<s1(&F;b=Ka&^{@UjA-Rbn(?f%pA|J?Ea z-}(RG-{a%sWQF}}=T6!l(LfBVqwLzTzdz--gr zA>~JRUspdjz=SD#uW#3T=*1z15PotP*O<}1TXI=rW8fk~GqY79KP}1YrcVGlvzs zDl$nW+ZJ<7GW-rh3M7OOB8UkZSwRrC?KL;(Q+JJH=Ywg3PC literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/icon-question.gif b/deluge/ui/web/themes/images/yourtheme/window/icon-question.gif new file mode 100644 index 0000000000000000000000000000000000000000..08abd82ae86c9457172c7a4fdbc527641cf28e48 GIT binary patch literal 1607 zcmV-N2Dtf0Nk%w1VITk?0QUd@02fyP7F_@vT>uhh032%o9CQF5e-A8e03mY#BzglW zcL_0l6g7B5MoUafO-xQwNKjc)QdCG)VMGais%VD1YKp&Yk+f=&xOI)E zaEiQim9}=7y?K_jd6&3+oV;3t&|-(kYnQ@tj>UPC!+4gSZh?S#&mcD?Rw3D8!n4hVIpuCNxypy7?lBc|sslAz{ zv!1E8nykH`pQ59qrl_Z?tE#T5tFf-Ly0EXZv$D0gx4OH!y?~j^f}_NSpv#4+%#5bO zjit(rsl|+~%!H%Tg{shuuF;CD-i))_m#xK;uF0IQ!Je+okgwa9u*sgY$DOs#l(p29 zwb+%o+nKY|oV(kBuJ?(u=#RDcm$&DYyyKX=;G(m`qqxkgwZo{l%AmW~pu5Wy1~n_!_~3H*|^2hyUEtQ&D)~F!=r_S`L&GoF&_N~(Sv&!PL&+@j??Yq$Bv(odm+WouL^Ss^uzv2JK z#>vRX%gf5m#L3db&e_e*)63J`)6&(_)!NwC+uGXR!PV)++V9BJ>B`#d#N777-1y4d z^3d1g(%a?H-|XGp;>6+p%jEve=>OE=@803%+~e!f;quVt`_t+E+2!%y==0m`{@(Hb z;NRop*MI`>g(&|>+<34{Oa!Wf0xe!3Pge_@yBbqQDAy z^yqLDY^(Y`Bgb#Yy&t*SHt<)MmubQE= zM_%4K|K!o54GAF7UTBq*Ob!?g0o7_ijR4L$#5Cl7WQu5*Y1Gi(Bmg6D)2&N<*T z_(l=0(9+Fy7{;fLf+vi?iGtvWSYtTY0MiN@9f&f^H7LmFMINyXBrZBDyqCps^d=g7F3EF65lHnZVrI>UYlglJe zU~oq>afkv8HsRE$YQu zh#-bkqRKD4cwz`3RWxA(1Qnd&3}YuvgUT2`;GhH*Q&3SwBCD*Dh!i~7&_D!W@DWW; z1F;hgDs>bA#0Ei30Z1pS2x5T)7=Y0SG)EyV5IfR9lMEkstO3X(t9(I08OcCnvDYWD z6Ol7qAd-p~6!7sjC){4MV~P`tbU^{7d>1~=99ZDpN7scTEv^xRGv0Vk((EBd#a;&l F06QAMRrde@ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/icon-warning.gif b/deluge/ui/web/themes/images/yourtheme/window/icon-warning.gif new file mode 100644 index 0000000000000000000000000000000000000000..27ff98b4f787f776e24227da0227bc781e3b11e8 GIT binary patch literal 1483 zcmXAoYc$k(9LB%H%(yfgGuR9b<4z3ocd29*O43CNd(`UWmQ=H)a>`a4DYpzOx}c(x zSlvdcWJ?+unZaR-H7>b~v1S^TyJ_?Ptx;{_9t|N0Ki69nENoJ2v3`>&g|W8&busa_So7*+dD)$ zvLc<>kt@t%F{f~h9qzG`vt^ZG;7|7JumJBhJ9Y+8Lf4suZE^fH#5_9C`L|tWUS6U8 z{=uOE0fBzowgqiH9`W<?y6`^?T9Sbi>kIro^$r3_Y4hFwk)R(#Q}G+VFY!jG?tX{A@K zA7Ak-yF;xiAyhqNys9yLRL-ovzEyCSA}UpDxeZO_LcSl+NfU}@28A3*bVbNWrHA>fZ4D_larvD z0o4={9|wFI(DV=ZJRp1#nxdfzI{Lyuvvho356v%?4p|^%j&Mta>}F3~{K0|F!GZpTzVLoC6_EgdgTr?dzB>V$ILvD;-4MrIlR(m27G@h~>JlYZ zVAt|_ro3YUVh;qD&xzwC(+MYO@wD@Y_NS8}VxR3300jn*@X<;}{z{$rL zTQ1Ygt3r~JNZK6NqxROCFAF5#=}AsXB5Gp!SiKu3HLoB=^T~;XI#AbK!S$~9M1UFk{5%nyiu}%*CZiIbNf<7_U*)eK2jmJEb7FxOYX=;RObGwm=_w(}-X91Z& zqYL6B`%{}cDrkMSM*JWx2`jXogS!VNpUr25HWVJ_hwMpzlk(}y+|3YZ)%_6gfm?u*PI1fu~NtNN%<%o?1bnQ|HcP z+A{@eE%wEmbNMT^8Mo3bU$&{4r}IL6UfVqFo%2t*Tz4deYD9aVZE~6`7TH{nSG#4; z<6vfan`>!V4h5%@)!a#Ahc&Ef--@I2iU;@wEYEC-zjIsI(0PM(`f?qQqf=C&8Tb?#p4A}3P=ZzHb8 zU%2?008r{GmdfTSw5X-f*JnevxfSlSM{Cc=no(Hy6^Zi{dugQHUH~t06Bw zQt4307HjGF&8-z0AF;fZZq8-%?^|4nr#0y83LDz+toN8`gZZg2p9Yd5@bP-%L)8(V zUmmP8OS8yf(llyk`BV+l3sY@pR^S)K>*+DB$}jc0e)m$1w?{Mi5Ahq5K8vj4mE(=f iL}jwpve+-)v>A%!R(IJo>4b>g=e!-tLq`xb9G_3G{0 zGdEv6d-+ygtj!51%UBZR7tG-B>_!@pqvPq~7*cWT?X^Hr1_hqO2g;KF>0Y)?neb;$ rtH-@3vsBJ|GJLS*We`|3`JPV9O%{pDFOA1RPGj(N^>bP0l+XkKCecH0 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/left-corners.psd b/deluge/ui/web/themes/images/yourtheme/window/left-corners.psd new file mode 100644 index 0000000000000000000000000000000000000000..3d7f0623e03727a632cf003e22e11593d547de53 GIT binary patch literal 15576 zcmeI1e^3-<7{}lDcK7c172LsrFbH>wVhuI%BO?1j;4ffmCc%<)CPO77wGtJH8DkKN zvKdW7$)+hFN{x{NQZx(GprDKf4pB~$KoLdMl;0e;Z11zs-VFT_IWTkFyze{vx#xZN zeRucy?sLz+w-*-qTpYqkDmZ|ca;b^9+hLK>&$6u8qwtm?BqLSqbA&!FhXCf2IpSP5 zggo9P{i$dM!a|eKidi4x zfe~`or3s2zo7{pj_T(#PN0y$^#Ma;O3tpYP!_MB_V}_^KoVotJaqW$vTu$aD?fhX+mk<5R{ivIbz5BziP4hj!ePN0LL5Kf*=i$Y2sSj0%M#)4G_3kj^dN zMIS6V_F2-)(QEg{@4IBo306n>?Ts$(j9H%a)WLvd8;Y}&k~bPQDERq{1XOVT@R3zT z{sq0-5&?afxSLN~0G&leed!0DtdLcXMC=dm>vSIZV8!-TMdr%mdGYBrLDeG_Isw(M zU$Xp$fF8be-QBm_u~b0%sPx_y^^K+dp4`sqHzT-G@?&Q%XEf&n${+=-9b$U~b&il=5o92>F@0C4S*uP!0LSq>g=xxqCDh z$PgA=B&(A$n&XiVc>?&%BT0UIkqLsO3+BE4M)Jn7t|!L!%p>`obp7|Hj7`|QB{5kW zXgMUY#-2Xnnb>mJr40G!OvcfX_k5-xn2(8<@BpKgDlnM}knfIJ7^amfFv$u)T!~qW zL$p!_CRYI#J#EgyS%rKL&g$XYCHx7N1s9=KCjzJ{TvW z7p!sUfj$bVffdGq83L1nYGA{0VBpP=)#;jnt{J980hatzKONUP^qQ?(0UB4<0%69y3#E2IL6&q!Uq=Rpjs4tz5?Mit0(?ST`<5Jh{POMDn=j@c;kE$^ r3VFIXhE&{2PDn^;Vsc|+GqPadUdIqEbJpV=P?o{d)z4*}Q$iB}hcqa_ literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/left-right.psd b/deluge/ui/web/themes/images/yourtheme/window/left-right.psd new file mode 100644 index 0000000000000000000000000000000000000000..59a3960a2353ebe4c9a22bde84cb79979f3150ad GIT binary patch literal 24046 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 literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/right-corners.psd b/deluge/ui/web/themes/images/yourtheme/window/right-corners.psd new file mode 100644 index 0000000000000000000000000000000000000000..86d5095386123b82d2cf11b8308dd1e40459fd9a GIT binary patch literal 15530 zcmeI12}~SS7{}k6nLRj~?k>Af5XvrxAQ6Ry3L4|4Xi*vsE)@@~F;uIT!~;q#R!!xo z)uypht+Z-PFI~})hN>+#^`KBdlxS&@1r)i;QLJ(;u!-ndFU z?hVIfH3V=ia=v&SEkb_JknvKq0%5@_bRgB*wE)!HJX6XfWTnAA;h5d z5041bN31j$^q8EckSmremCN-yjZUZkw@s+Vhe;4JEH)C7*f7I#V|~G8*jSxwl&GO-;uI*-972|-go~48IL@=@v+CB*p#(7cgwR|^PbyQShVBi zov*yQYwsIx?t80b|ADs;A36H|2bK>@KRW)&r=OiTS@HR)GgZ}RYijGhsc$@gq3OqF zYfEcqS9j0F-oE~UOT#0hW47^$N&6H=>`XX>e~O3Lj~R|*IR(UnnXTlCw8p{jjh16eys&)26}8rZI&jwcEb^b;}T6Rcji#e)*Im)rtEp z!~9ou5p?YDJh-kerY>3sXDoJ73%0vp(2n51!5s*G`*C?A&zl{=B~FHI)K- zxR_4;9~{^{#P@Xt4Gv`NiY_~CerM0v`hxG2=DlqdRS9=)DgAhx*MTg)-r{Jk|6XW8 zP|?}TVu?_pImfNazC93Fwf}4(ewL z>Va$KfdjIWf_mV#dEg+$9I859Gc3v*b78;Pm*UkpzM8BV9JsOCIgTCkf(_=07z1?$ zMq!MCdf=jYz{8WFpdPqw9`K}?Lsh412D)Zg6bCr+PyJF{>(G04Z3k#xx%Tr}s&~in zB}gD&EXPZn1K2i;9#C`WfUbykP(Mj%1JwesN@xOgo`QPdnt3n<*-1e?aN9hXBE=l4 zI)98*b~~;*=KKxYXYnhjISfKq#3fJz68b>(0xnAE21P+VaM3*A;mJ@?58O5ncv8%v ws`Cw`vh%p5!8wWfd0_(Pi5LfU1#B=zK|OHMJaEF3p`aePZ5}vDF^8)D2iAzm(f|Me literal 0 HcmV?d00001 diff --git a/deluge/ui/web/themes/images/yourtheme/window/top-bottom.png b/deluge/ui/web/themes/images/yourtheme/window/top-bottom.png new file mode 100644 index 0000000000000000000000000000000000000000..33779e76b8d7407100e44ea79974d9c8300a9573 GIT binary patch literal 180 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