jsduck 0.6.1 → 2.0.pre
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +4 -0
- data/README.md +35 -13
- data/Rakefile +129 -0
- data/bin/jsduck +112 -20
- data/jsduck.gemspec +10 -7
- data/lib/jsduck/aggregator.rb +46 -20
- data/lib/jsduck/aliases.rb +39 -0
- data/lib/jsduck/app.rb +123 -51
- data/lib/jsduck/categories.rb +132 -0
- data/lib/jsduck/class.rb +71 -18
- data/lib/jsduck/doc_formatter.rb +61 -26
- data/lib/jsduck/doc_parser.rb +53 -2
- data/lib/jsduck/exporter.rb +14 -15
- data/lib/jsduck/guides.rb +110 -0
- data/lib/jsduck/js_parser.rb +18 -4
- data/lib/jsduck/jsonp.rb +17 -0
- data/lib/jsduck/logger.rb +36 -0
- data/lib/jsduck/merger.rb +69 -51
- data/lib/jsduck/page.rb +1 -1
- data/lib/jsduck/relations.rb +14 -3
- data/lib/jsduck/{members.rb → search_data.rb} +3 -28
- data/lib/jsduck/source_file.rb +4 -4
- data/lib/jsduck/source_writer.rb +2 -2
- data/lib/jsduck/timer.rb +6 -2
- data/lib/jsduck/tree.rb +29 -16
- data/lib/jsduck/tree_icons.rb +1 -1
- data/template/README.md +14 -0
- data/template/app.js +25 -0
- data/template/app/Application.js +53 -0
- data/template/app/Favorites.js +88 -0
- data/template/app/History.js +45 -0
- data/template/app/LocalStore.js +45 -0
- data/template/app/Settings.js +39 -0
- data/template/app/Syntax.js +20 -0
- data/template/app/controller/Classes.js +301 -0
- data/template/app/controller/Search.js +156 -0
- data/template/app/model/Favorite.js +11 -0
- data/template/app/model/Setting.js +11 -0
- data/template/app/store/Favorites.js +7 -0
- data/template/app/store/Search.js +14 -0
- data/template/app/store/Settings.js +7 -0
- data/template/app/view/ClassGrid.js +109 -0
- data/template/app/view/HoverMenu.js +59 -0
- data/template/app/view/HoverMenuButton.js +147 -0
- data/template/app/view/Viewport.js +240 -0
- data/template/app/view/cls/Header.js +47 -0
- data/template/app/view/cls/Overview.js +415 -0
- data/template/app/view/cls/Toolbar.js +199 -0
- data/template/app/view/index/Container.js +63 -0
- data/template/app/view/search/Dropdown.js +53 -0
- data/template/app/view/tree/Tree.js +133 -0
- data/template/favicon.ico +0 -0
- data/template/index.html +32 -37
- data/template/{resources/prettify → prettify}/prettify.css +0 -0
- data/template/{resources/prettify → prettify}/prettify.js +0 -0
- data/template/resources/images/class-m.png +0 -0
- data/template/resources/images/class-sm.png +0 -0
- data/template/resources/images/component-m.png +0 -0
- data/template/resources/images/configs.png +0 -0
- data/template/resources/images/data-package.png +0 -0
- data/template/resources/images/doc-m.png +0 -0
- data/template/resources/images/drag-bar-center.png +0 -0
- data/template/resources/{elbow-end.gif → images/elbow-end.gif} +0 -0
- data/template/resources/images/events.png +0 -0
- data/template/resources/images/expandcollapse.png +0 -0
- data/template/resources/images/guide-icon.png +0 -0
- data/template/resources/images/guides.png +0 -0
- data/template/resources/images/headBG.png +0 -0
- data/template/resources/images/header.gif +0 -0
- data/template/resources/images/icon.png +0 -0
- data/template/resources/images/icons.png +0 -0
- data/template/resources/images/loading-title.png +0 -0
- data/template/resources/images/loading.gif +0 -0
- data/template/resources/{member-collapsed.gif → images/member-collapsed.gif} +0 -0
- data/template/resources/{member-expanded.gif → images/member-expanded.gif} +0 -0
- data/template/resources/{member-hover.gif → images/member-hover.gif} +0 -0
- data/template/resources/images/methods.png +0 -0
- data/template/resources/images/model.png +0 -0
- data/template/resources/images/properties.png +0 -0
- data/template/resources/images/root-lines.png +0 -0
- data/template/resources/images/search-box.png +0 -0
- data/template/resources/images/singleton-m.png +0 -0
- data/template/resources/images/version-tabs.png +0 -0
- data/template/resources/images/x.png +0 -0
- data/template/resources/images/x12.png +0 -0
- metadata +84 -387
- data/lib/jsduck/cfg_table.rb +0 -21
- data/lib/jsduck/event_table.rb +0 -33
- data/lib/jsduck/inheritance_tree.rb +0 -42
- data/lib/jsduck/long_params.rb +0 -30
- data/lib/jsduck/method_table.rb +0 -45
- data/lib/jsduck/property_table.rb +0 -21
- data/lib/jsduck/short_params.rb +0 -24
- data/lib/jsduck/table.rb +0 -121
- data/template/resources/TabCloseMenu.js +0 -150
- data/template/resources/block-bottom.gif +0 -0
- data/template/resources/block-top.gif +0 -0
- data/template/resources/class.gif +0 -0
- data/template/resources/cmp.gif +0 -0
- data/template/resources/collapse-all.gif +0 -0
- data/template/resources/config.gif +0 -0
- data/template/resources/css/ext-all.css +0 -6993
- data/template/resources/css/xtheme-gray.css +0 -1654
- data/template/resources/docs.css +0 -361
- data/template/resources/docs.gif +0 -0
- data/template/resources/docs.js +0 -769
- data/template/resources/event.gif +0 -0
- data/template/resources/expand-all.gif +0 -0
- data/template/resources/expand-bg-over.gif +0 -0
- data/template/resources/expand-bg.gif +0 -0
- data/template/resources/expand-members.gif +0 -0
- data/template/resources/ext-all.js +0 -11
- data/template/resources/ext-base.js +0 -7
- data/template/resources/extanim32.gif +0 -0
- data/template/resources/fav.gif +0 -0
- data/template/resources/favicon.ico +0 -0
- data/template/resources/hd-bg.png +0 -0
- data/template/resources/hide-inherited.gif +0 -0
- data/template/resources/images/default/box/corners-blue.gif +0 -0
- data/template/resources/images/default/box/corners.gif +0 -0
- data/template/resources/images/default/box/l-blue.gif +0 -0
- data/template/resources/images/default/box/l.gif +0 -0
- data/template/resources/images/default/box/r-blue.gif +0 -0
- data/template/resources/images/default/box/r.gif +0 -0
- data/template/resources/images/default/box/tb-blue.gif +0 -0
- data/template/resources/images/default/box/tb.gif +0 -0
- data/template/resources/images/default/button/arrow.gif +0 -0
- data/template/resources/images/default/button/btn.gif +0 -0
- data/template/resources/images/default/button/group-cs.gif +0 -0
- data/template/resources/images/default/button/group-lr.gif +0 -0
- data/template/resources/images/default/button/group-tb.gif +0 -0
- data/template/resources/images/default/button/s-arrow-b-noline.gif +0 -0
- data/template/resources/images/default/button/s-arrow-b.gif +0 -0
- data/template/resources/images/default/button/s-arrow-bo.gif +0 -0
- data/template/resources/images/default/button/s-arrow-noline.gif +0 -0
- data/template/resources/images/default/button/s-arrow-o.gif +0 -0
- data/template/resources/images/default/button/s-arrow.gif +0 -0
- data/template/resources/images/default/dd/drop-add.gif +0 -0
- data/template/resources/images/default/dd/drop-no.gif +0 -0
- data/template/resources/images/default/dd/drop-yes.gif +0 -0
- data/template/resources/images/default/editor/tb-sprite.gif +0 -0
- data/template/resources/images/default/form/checkbox.gif +0 -0
- data/template/resources/images/default/form/clear-trigger.gif +0 -0
- data/template/resources/images/default/form/clear-trigger.psd +0 -0
- data/template/resources/images/default/form/date-trigger.gif +0 -0
- data/template/resources/images/default/form/date-trigger.psd +0 -0
- data/template/resources/images/default/form/error-tip-corners.gif +0 -0
- data/template/resources/images/default/form/exclamation.gif +0 -0
- data/template/resources/images/default/form/radio.gif +0 -0
- data/template/resources/images/default/form/search-trigger.gif +0 -0
- data/template/resources/images/default/form/search-trigger.psd +0 -0
- data/template/resources/images/default/form/text-bg.gif +0 -0
- data/template/resources/images/default/form/trigger-square.gif +0 -0
- data/template/resources/images/default/form/trigger-square.psd +0 -0
- data/template/resources/images/default/form/trigger-tpl.gif +0 -0
- data/template/resources/images/default/form/trigger.gif +0 -0
- data/template/resources/images/default/form/trigger.psd +0 -0
- data/template/resources/images/default/gradient-bg.gif +0 -0
- data/template/resources/images/default/grid/arrow-left-white.gif +0 -0
- data/template/resources/images/default/grid/arrow-right-white.gif +0 -0
- data/template/resources/images/default/grid/col-move-bottom.gif +0 -0
- data/template/resources/images/default/grid/col-move-top.gif +0 -0
- data/template/resources/images/default/grid/columns.gif +0 -0
- data/template/resources/images/default/grid/dirty.gif +0 -0
- data/template/resources/images/default/grid/done.gif +0 -0
- data/template/resources/images/default/grid/drop-no.gif +0 -0
- data/template/resources/images/default/grid/drop-yes.gif +0 -0
- data/template/resources/images/default/grid/footer-bg.gif +0 -0
- data/template/resources/images/default/grid/grid-blue-hd.gif +0 -0
- data/template/resources/images/default/grid/grid-blue-split.gif +0 -0
- data/template/resources/images/default/grid/grid-hrow.gif +0 -0
- data/template/resources/images/default/grid/grid-loading.gif +0 -0
- data/template/resources/images/default/grid/grid-split.gif +0 -0
- data/template/resources/images/default/grid/grid-vista-hd.gif +0 -0
- data/template/resources/images/default/grid/grid3-hd-btn.gif +0 -0
- data/template/resources/images/default/grid/grid3-hrow-over.gif +0 -0
- data/template/resources/images/default/grid/grid3-hrow.gif +0 -0
- data/template/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
- data/template/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
- data/template/resources/images/default/grid/group-by.gif +0 -0
- data/template/resources/images/default/grid/group-collapse.gif +0 -0
- data/template/resources/images/default/grid/group-expand-sprite.gif +0 -0
- data/template/resources/images/default/grid/group-expand.gif +0 -0
- data/template/resources/images/default/grid/hd-pop.gif +0 -0
- data/template/resources/images/default/grid/hmenu-asc.gif +0 -0
- data/template/resources/images/default/grid/hmenu-desc.gif +0 -0
- data/template/resources/images/default/grid/hmenu-lock.gif +0 -0
- data/template/resources/images/default/grid/hmenu-lock.png +0 -0
- data/template/resources/images/default/grid/hmenu-unlock.gif +0 -0
- data/template/resources/images/default/grid/hmenu-unlock.png +0 -0
- data/template/resources/images/default/grid/invalid_line.gif +0 -0
- data/template/resources/images/default/grid/loading.gif +0 -0
- data/template/resources/images/default/grid/mso-hd.gif +0 -0
- data/template/resources/images/default/grid/nowait.gif +0 -0
- data/template/resources/images/default/grid/page-first-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-first.gif +0 -0
- data/template/resources/images/default/grid/page-last-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-last.gif +0 -0
- data/template/resources/images/default/grid/page-next-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-next.gif +0 -0
- data/template/resources/images/default/grid/page-prev-disabled.gif +0 -0
- data/template/resources/images/default/grid/page-prev.gif +0 -0
- data/template/resources/images/default/grid/pick-button.gif +0 -0
- data/template/resources/images/default/grid/refresh.gif +0 -0
- data/template/resources/images/default/grid/row-check-sprite.gif +0 -0
- data/template/resources/images/default/grid/row-expand-sprite.gif +0 -0
- data/template/resources/images/default/grid/row-over.gif +0 -0
- data/template/resources/images/default/grid/row-sel.gif +0 -0
- data/template/resources/images/default/grid/sort-hd.gif +0 -0
- data/template/resources/images/default/grid/sort_asc.gif +0 -0
- data/template/resources/images/default/grid/sort_desc.gif +0 -0
- data/template/resources/images/default/grid/wait.gif +0 -0
- data/template/resources/images/default/layout/collapse.gif +0 -0
- data/template/resources/images/default/layout/expand.gif +0 -0
- data/template/resources/images/default/layout/gradient-bg.gif +0 -0
- data/template/resources/images/default/layout/mini-bottom.gif +0 -0
- data/template/resources/images/default/layout/mini-left.gif +0 -0
- data/template/resources/images/default/layout/mini-right.gif +0 -0
- data/template/resources/images/default/layout/mini-top.gif +0 -0
- data/template/resources/images/default/layout/ns-collapse.gif +0 -0
- data/template/resources/images/default/layout/ns-expand.gif +0 -0
- data/template/resources/images/default/layout/panel-close.gif +0 -0
- data/template/resources/images/default/layout/panel-title-bg.gif +0 -0
- data/template/resources/images/default/layout/panel-title-light-bg.gif +0 -0
- data/template/resources/images/default/layout/stick.gif +0 -0
- data/template/resources/images/default/layout/stuck.gif +0 -0
- data/template/resources/images/default/layout/tab-close-on.gif +0 -0
- data/template/resources/images/default/layout/tab-close.gif +0 -0
- data/template/resources/images/default/menu/checked.gif +0 -0
- data/template/resources/images/default/menu/group-checked.gif +0 -0
- data/template/resources/images/default/menu/item-over.gif +0 -0
- data/template/resources/images/default/menu/menu-parent.gif +0 -0
- data/template/resources/images/default/menu/menu.gif +0 -0
- data/template/resources/images/default/menu/unchecked.gif +0 -0
- data/template/resources/images/default/panel/corners-sprite.gif +0 -0
- data/template/resources/images/default/panel/left-right.gif +0 -0
- data/template/resources/images/default/panel/light-hd.gif +0 -0
- data/template/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
- data/template/resources/images/default/panel/tool-sprites.gif +0 -0
- data/template/resources/images/default/panel/tools-sprites-trans.gif +0 -0
- data/template/resources/images/default/panel/top-bottom.gif +0 -0
- data/template/resources/images/default/panel/top-bottom.png +0 -0
- data/template/resources/images/default/panel/white-corners-sprite.gif +0 -0
- data/template/resources/images/default/panel/white-left-right.gif +0 -0
- data/template/resources/images/default/panel/white-top-bottom.gif +0 -0
- data/template/resources/images/default/progress/progress-bg.gif +0 -0
- data/template/resources/images/default/qtip/bg.gif +0 -0
- data/template/resources/images/default/qtip/close.gif +0 -0
- data/template/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
- data/template/resources/images/default/qtip/tip-sprite.gif +0 -0
- data/template/resources/images/default/s.gif +0 -0
- data/template/resources/images/default/shadow-c.png +0 -0
- data/template/resources/images/default/shadow-lr.png +0 -0
- data/template/resources/images/default/shadow.png +0 -0
- data/template/resources/images/default/shared/blue-loading.gif +0 -0
- data/template/resources/images/default/shared/calendar.gif +0 -0
- data/template/resources/images/default/shared/glass-bg.gif +0 -0
- data/template/resources/images/default/shared/hd-sprite.gif +0 -0
- data/template/resources/images/default/shared/large-loading.gif +0 -0
- data/template/resources/images/default/shared/left-btn.gif +0 -0
- data/template/resources/images/default/shared/loading-balls.gif +0 -0
- data/template/resources/images/default/shared/right-btn.gif +0 -0
- data/template/resources/images/default/shared/warning.gif +0 -0
- data/template/resources/images/default/sizer/e-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/e-handle.gif +0 -0
- data/template/resources/images/default/sizer/ne-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/ne-handle.gif +0 -0
- data/template/resources/images/default/sizer/nw-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/nw-handle.gif +0 -0
- data/template/resources/images/default/sizer/s-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/s-handle.gif +0 -0
- data/template/resources/images/default/sizer/se-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/se-handle.gif +0 -0
- data/template/resources/images/default/sizer/square.gif +0 -0
- data/template/resources/images/default/sizer/sw-handle-dark.gif +0 -0
- data/template/resources/images/default/sizer/sw-handle.gif +0 -0
- data/template/resources/images/default/slider/slider-bg.png +0 -0
- data/template/resources/images/default/slider/slider-thumb.png +0 -0
- data/template/resources/images/default/slider/slider-v-bg.png +0 -0
- data/template/resources/images/default/slider/slider-v-thumb.png +0 -0
- data/template/resources/images/default/tabs/scroll-left.gif +0 -0
- data/template/resources/images/default/tabs/scroll-right.gif +0 -0
- data/template/resources/images/default/tabs/scroller-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-close.gif +0 -0
- data/template/resources/images/default/tabs/tab-strip-bg.gif +0 -0
- data/template/resources/images/default/tabs/tab-strip-bg.png +0 -0
- data/template/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
- data/template/resources/images/default/tabs/tabs-sprite.gif +0 -0
- data/template/resources/images/default/toolbar/bg.gif +0 -0
- data/template/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
- data/template/resources/images/default/toolbar/btn-arrow.gif +0 -0
- data/template/resources/images/default/toolbar/btn-over-bg.gif +0 -0
- data/template/resources/images/default/toolbar/gray-bg.gif +0 -0
- data/template/resources/images/default/toolbar/more.gif +0 -0
- data/template/resources/images/default/toolbar/tb-bg.gif +0 -0
- data/template/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
- data/template/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
- data/template/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
- data/template/resources/images/default/tree/arrows.gif +0 -0
- data/template/resources/images/default/tree/drop-add.gif +0 -0
- data/template/resources/images/default/tree/drop-between.gif +0 -0
- data/template/resources/images/default/tree/drop-no.gif +0 -0
- data/template/resources/images/default/tree/drop-over.gif +0 -0
- data/template/resources/images/default/tree/drop-under.gif +0 -0
- data/template/resources/images/default/tree/drop-yes.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-minus.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-end-plus.gif +0 -0
- data/template/resources/images/default/tree/elbow-end.gif +0 -0
- data/template/resources/images/default/tree/elbow-line.gif +0 -0
- data/template/resources/images/default/tree/elbow-minus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-minus.gif +0 -0
- data/template/resources/images/default/tree/elbow-plus-nl.gif +0 -0
- data/template/resources/images/default/tree/elbow-plus.gif +0 -0
- data/template/resources/images/default/tree/elbow.gif +0 -0
- data/template/resources/images/default/tree/folder-open.gif +0 -0
- data/template/resources/images/default/tree/folder.gif +0 -0
- data/template/resources/images/default/tree/leaf.gif +0 -0
- data/template/resources/images/default/tree/loading.gif +0 -0
- data/template/resources/images/default/tree/s.gif +0 -0
- data/template/resources/images/default/window/icon-error.gif +0 -0
- data/template/resources/images/default/window/icon-info.gif +0 -0
- data/template/resources/images/default/window/icon-question.gif +0 -0
- data/template/resources/images/default/window/icon-warning.gif +0 -0
- data/template/resources/images/default/window/left-corners.png +0 -0
- data/template/resources/images/default/window/left-corners.psd +0 -0
- data/template/resources/images/default/window/left-right.png +0 -0
- data/template/resources/images/default/window/left-right.psd +0 -0
- data/template/resources/images/default/window/right-corners.png +0 -0
- data/template/resources/images/default/window/right-corners.psd +0 -0
- data/template/resources/images/default/window/top-bottom.png +0 -0
- data/template/resources/images/default/window/top-bottom.psd +0 -0
- data/template/resources/images/gray/button/btn-arrow.gif +0 -0
- data/template/resources/images/gray/button/btn-sprite.gif +0 -0
- data/template/resources/images/gray/button/btn.gif +0 -0
- data/template/resources/images/gray/button/group-cs.gif +0 -0
- data/template/resources/images/gray/button/group-lr.gif +0 -0
- data/template/resources/images/gray/button/group-tb.gif +0 -0
- data/template/resources/images/gray/button/s-arrow-bo.gif +0 -0
- data/template/resources/images/gray/button/s-arrow-o.gif +0 -0
- data/template/resources/images/gray/form/clear-trigger.gif +0 -0
- data/template/resources/images/gray/form/date-trigger.gif +0 -0
- data/template/resources/images/gray/form/search-trigger.gif +0 -0
- data/template/resources/images/gray/form/trigger-square.gif +0 -0
- data/template/resources/images/gray/form/trigger.gif +0 -0
- data/template/resources/images/gray/gradient-bg.gif +0 -0
- data/template/resources/images/gray/grid/col-move-bottom.gif +0 -0
- data/template/resources/images/gray/grid/col-move-top.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow.gif +0 -0
- data/template/resources/images/gray/grid/grid3-hrow2.gif +0 -0
- data/template/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
- data/template/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
- data/template/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
- data/template/resources/images/gray/grid/group-collapse.gif +0 -0
- data/template/resources/images/gray/grid/group-expand-sprite.gif +0 -0
- data/template/resources/images/gray/grid/group-expand.gif +0 -0
- data/template/resources/images/gray/grid/page-first.gif +0 -0
- data/template/resources/images/gray/grid/page-last.gif +0 -0
- data/template/resources/images/gray/grid/page-next.gif +0 -0
- data/template/resources/images/gray/grid/page-prev.gif +0 -0
- data/template/resources/images/gray/grid/refresh.gif +0 -0
- data/template/resources/images/gray/grid/row-expand-sprite.gif +0 -0
- data/template/resources/images/gray/grid/sort_asc.gif +0 -0
- data/template/resources/images/gray/grid/sort_desc.gif +0 -0
- data/template/resources/images/gray/menu/group-checked.gif +0 -0
- data/template/resources/images/gray/menu/item-over-disabled.gif +0 -0
- data/template/resources/images/gray/menu/item-over.gif +0 -0
- data/template/resources/images/gray/menu/menu-parent.gif +0 -0
- data/template/resources/images/gray/panel/corners-sprite.gif +0 -0
- data/template/resources/images/gray/panel/left-right.gif +0 -0
- data/template/resources/images/gray/panel/light-hd.gif +0 -0
- data/template/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
- data/template/resources/images/gray/panel/tool-sprites.gif +0 -0
- data/template/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
- data/template/resources/images/gray/panel/top-bottom.gif +0 -0
- data/template/resources/images/gray/panel/top-bottom.png +0 -0
- data/template/resources/images/gray/panel/white-corners-sprite.gif +0 -0
- data/template/resources/images/gray/panel/white-left-right.gif +0 -0
- data/template/resources/images/gray/panel/white-top-bottom.gif +0 -0
- data/template/resources/images/gray/progress/progress-bg.gif +0 -0
- data/template/resources/images/gray/qtip/bg.gif +0 -0
- data/template/resources/images/gray/qtip/close.gif +0 -0
- data/template/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
- data/template/resources/images/gray/qtip/tip-sprite.gif +0 -0
- data/template/resources/images/gray/s.gif +0 -0
- data/template/resources/images/gray/shared/hd-sprite.gif +0 -0
- data/template/resources/images/gray/shared/left-btn.gif +0 -0
- data/template/resources/images/gray/shared/right-btn.gif +0 -0
- data/template/resources/images/gray/sizer/e-handle.gif +0 -0
- data/template/resources/images/gray/sizer/ne-handle.gif +0 -0
- data/template/resources/images/gray/sizer/nw-handle.gif +0 -0
- data/template/resources/images/gray/sizer/s-handle.gif +0 -0
- data/template/resources/images/gray/sizer/se-handle.gif +0 -0
- data/template/resources/images/gray/sizer/square.gif +0 -0
- data/template/resources/images/gray/sizer/sw-handle.gif +0 -0
- data/template/resources/images/gray/slider/slider-thumb.png +0 -0
- data/template/resources/images/gray/slider/slider-v-thumb.png +0 -0
- data/template/resources/images/gray/tabs/scroll-left.gif +0 -0
- data/template/resources/images/gray/tabs/scroll-right.gif +0 -0
- data/template/resources/images/gray/tabs/scroller-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-close.gif +0 -0
- data/template/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tab-strip-bg.png +0 -0
- data/template/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
- data/template/resources/images/gray/tabs/tabs-sprite.gif +0 -0
- data/template/resources/images/gray/toolbar/bg.gif +0 -0
- data/template/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
- data/template/resources/images/gray/toolbar/btn-arrow.gif +0 -0
- data/template/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
- data/template/resources/images/gray/toolbar/gray-bg.gif +0 -0
- data/template/resources/images/gray/toolbar/more.gif +0 -0
- data/template/resources/images/gray/toolbar/tb-bg.gif +0 -0
- data/template/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
- data/template/resources/images/gray/tree/arrows.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-minus.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
- data/template/resources/images/gray/tree/elbow-end-plus.gif +0 -0
- data/template/resources/images/gray/window/icon-error.gif +0 -0
- data/template/resources/images/gray/window/icon-info.gif +0 -0
- data/template/resources/images/gray/window/icon-question.gif +0 -0
- data/template/resources/images/gray/window/icon-warning.gif +0 -0
- data/template/resources/images/gray/window/left-corners.png +0 -0
- data/template/resources/images/gray/window/left-corners.pspimage +0 -0
- data/template/resources/images/gray/window/left-right.png +0 -0
- data/template/resources/images/gray/window/right-corners.png +0 -0
- data/template/resources/images/gray/window/top-bottom.png +0 -0
- data/template/resources/inherited.gif +0 -0
- data/template/resources/method.gif +0 -0
- data/template/resources/pkg-closed.gif +0 -0
- data/template/resources/pkg-open.gif +0 -0
- data/template/resources/pkg.gif +0 -0
- data/template/resources/prop.gif +0 -0
- data/template/resources/s.gif +0 -0
- data/template/resources/static.gif +0 -0
- data/template/resources/style.css +0 -291
- data/template/welcome.html +0 -45
@@ -0,0 +1,156 @@
|
|
1
|
+
/**
|
2
|
+
* Controller for search.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.controller.Search', {
|
5
|
+
extend: 'Ext.app.Controller',
|
6
|
+
|
7
|
+
views: [
|
8
|
+
'search.Dropdown'
|
9
|
+
],
|
10
|
+
|
11
|
+
stores: ['Search'],
|
12
|
+
|
13
|
+
init: function() {
|
14
|
+
this.control({
|
15
|
+
'#search-dropdown': {
|
16
|
+
itemclick: function(dropdown, record) {
|
17
|
+
this.loadRecord(record);
|
18
|
+
}
|
19
|
+
},
|
20
|
+
'#search-field': {
|
21
|
+
keyup: function(el, ev) {
|
22
|
+
var dropdown = this.getDropdown();
|
23
|
+
|
24
|
+
el.setHideTrigger(el.getValue().length === 0);
|
25
|
+
|
26
|
+
if (ev.keyCode === Ext.EventObject.ESC || !el.value) {
|
27
|
+
dropdown.hide();
|
28
|
+
el.setValue("");
|
29
|
+
return;
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
dropdown.show();
|
33
|
+
}
|
34
|
+
|
35
|
+
var selModel = dropdown.getSelectionModel();
|
36
|
+
var record = selModel.getLastSelected();
|
37
|
+
var curIndex = dropdown.store.indexOf(record);
|
38
|
+
var lastIndex = dropdown.store.getCount() - 1;
|
39
|
+
|
40
|
+
if (ev.keyCode === Ext.EventObject.UP) {
|
41
|
+
if (curIndex === undefined) {
|
42
|
+
selModel.select(0);
|
43
|
+
} else {
|
44
|
+
selModel.select(curIndex === 0 ? lastIndex : (curIndex - 1));
|
45
|
+
}
|
46
|
+
}
|
47
|
+
else if (ev.keyCode === Ext.EventObject.DOWN) {
|
48
|
+
if (curIndex === undefined) {
|
49
|
+
selModel.select(0);
|
50
|
+
} else {
|
51
|
+
selModel.select(curIndex === lastIndex ? 0 : curIndex + 1);
|
52
|
+
}
|
53
|
+
}
|
54
|
+
else if (ev.keyCode === Ext.EventObject.ENTER) {
|
55
|
+
ev.preventDefault();
|
56
|
+
record && this.loadRecord(record);
|
57
|
+
}
|
58
|
+
else {
|
59
|
+
// Wait a bit before actually performing the search.
|
60
|
+
// When user is typing fast, the value of el.value
|
61
|
+
// might not right away be the final value. For example
|
62
|
+
// user might type "tre" but we will get three keyup events
|
63
|
+
// where el.value === "t".
|
64
|
+
clearTimeout(this.searchTimeout);
|
65
|
+
this.searchTimeout = Ext.Function.defer(function() {
|
66
|
+
this.search(el.value);
|
67
|
+
}, 50, this);
|
68
|
+
}
|
69
|
+
},
|
70
|
+
focus: function(el) {
|
71
|
+
if (el.value && this.getDropdown().store.getCount() > 0) {
|
72
|
+
this.getDropdown().show();
|
73
|
+
}
|
74
|
+
},
|
75
|
+
blur: function() {
|
76
|
+
// Don't hide the dropdown right away, otherwise
|
77
|
+
// we don't receive the itemclick event when focus
|
78
|
+
// was lost because we clicked on dropdown item.
|
79
|
+
// Not really a good solution, but I can't
|
80
|
+
// currently think of anything better. Behaves
|
81
|
+
// badly when you make a long mouse press on
|
82
|
+
// dropdown item.
|
83
|
+
var dropdown = this.getDropdown();
|
84
|
+
Ext.Function.defer(dropdown.hide, 500, dropdown);
|
85
|
+
}
|
86
|
+
}
|
87
|
+
});
|
88
|
+
},
|
89
|
+
|
90
|
+
getDropdown: function() {
|
91
|
+
return this.dropdown || (this.dropdown = Ext.getCmp('search-dropdown'));
|
92
|
+
},
|
93
|
+
|
94
|
+
// loads class/method corrseponding to the record
|
95
|
+
loadRecord: function(record) {
|
96
|
+
var name = record.get("cls");
|
97
|
+
if (record.get("type") !== 'cls') {
|
98
|
+
name += '-' + record.get("type") + '-' + record.get("member");
|
99
|
+
}
|
100
|
+
Docs.App.getController('Classes').loadClass("/api/"+name);
|
101
|
+
this.getDropdown().hide();
|
102
|
+
},
|
103
|
+
|
104
|
+
search: function(term) {
|
105
|
+
// perform search and load results to store
|
106
|
+
var limit = 10;
|
107
|
+
var results = this.filterMembers(term);
|
108
|
+
this.getDropdown().setTotal(results.length);
|
109
|
+
this.getDropdown().getStore().loadData(results.slice(0, limit));
|
110
|
+
// position dropdown below search box
|
111
|
+
this.getDropdown().alignTo('search-field', 'bl', [-23, 2]);
|
112
|
+
// hide dropdown when nothing found
|
113
|
+
if (results.length === 0) {
|
114
|
+
this.getDropdown().hide();
|
115
|
+
}
|
116
|
+
else {
|
117
|
+
// auto-select first result
|
118
|
+
this.getDropdown().getSelectionModel().select(0);
|
119
|
+
}
|
120
|
+
},
|
121
|
+
|
122
|
+
filterMembers: function(text) {
|
123
|
+
var results = [[], [], [], [], [], [], [], []];
|
124
|
+
var xFull=0, clsFull=1, mFull=2, xBeg=3, clsBeg=4, mBeg=5, clsMid=6, mMid=7;
|
125
|
+
var hasDot = /\./.test(text);
|
126
|
+
var safeText = Ext.escapeRe(text);
|
127
|
+
var reFull = new RegExp("^" + safeText + "$", "i");
|
128
|
+
var reBeg = new RegExp("^" + safeText, "i");
|
129
|
+
var reMid = new RegExp(safeText, "i");
|
130
|
+
|
131
|
+
Ext.Array.forEach(Docs.searchData.data, function(r) {
|
132
|
+
// when search text has "." in it, search from the full name (e.g. "Ext.Component.focus")
|
133
|
+
// Otherwise search from just the member name (e.g. "focus" or "Component")
|
134
|
+
var name = hasDot ? r.cls + (r.type === "cls" ? "" : "." + r.member) : r.member;
|
135
|
+
|
136
|
+
if (r.xtypes && Ext.Array.some(r.xtypes, function(x) {return reFull.test(x);})) {
|
137
|
+
results[xFull].push(r);
|
138
|
+
}
|
139
|
+
else if (reFull.test(name)) {
|
140
|
+
results[r.type === "cls" ? clsFull : mFull].push(r);
|
141
|
+
}
|
142
|
+
else if (r.xtypes && Ext.Array.some(r.xtypes, function(x) {return reBeg.test(x);})) {
|
143
|
+
results[xBeg].push(r);
|
144
|
+
}
|
145
|
+
else if (reBeg.test(name)) {
|
146
|
+
results[r.type === "cls" ? clsBeg : mBeg].push(r);
|
147
|
+
}
|
148
|
+
else if (reMid.test(name)) {
|
149
|
+
results[r.type === "cls" ? clsMid : mMid].push(r);
|
150
|
+
}
|
151
|
+
});
|
152
|
+
|
153
|
+
return Ext.Array.flatten(results);
|
154
|
+
}
|
155
|
+
|
156
|
+
});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* Favorite classes
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.model.Favorite', {
|
5
|
+
fields: ['id', 'url', 'title', 'cls'],
|
6
|
+
extend: 'Ext.data.Model',
|
7
|
+
proxy: {
|
8
|
+
type: ('localStorage' in window && window['localStorage'] !== null) ? 'localstorage' : 'memory',
|
9
|
+
id : 'docs-favorites'
|
10
|
+
}
|
11
|
+
});
|
@@ -0,0 +1,11 @@
|
|
1
|
+
/**
|
2
|
+
* Key-value pairs of Docs app settings.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.model.Setting', {
|
5
|
+
fields: ['id', 'key', 'value'],
|
6
|
+
extend: 'Ext.data.Model',
|
7
|
+
proxy: {
|
8
|
+
type: ('localStorage' in window && window['localStorage'] !== null) ? 'localstorage' : 'memory',
|
9
|
+
id : 'docs-settings'
|
10
|
+
}
|
11
|
+
});
|
@@ -0,0 +1,109 @@
|
|
1
|
+
/**
|
2
|
+
* Gridpanel for showing list of classes.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.view.ClassGrid', {
|
5
|
+
extend: 'Ext.grid.Panel',
|
6
|
+
alias: 'widget.classgrid',
|
7
|
+
hideHeaders: true,
|
8
|
+
border: false,
|
9
|
+
bodyBorder: false,
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @cfg {Object} icons
|
13
|
+
* Mapping of class names to icon class names.
|
14
|
+
*/
|
15
|
+
icons: {},
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @cfg {Boolean} enableClose
|
19
|
+
* Show or hide the close column
|
20
|
+
*/
|
21
|
+
enableClose: true,
|
22
|
+
|
23
|
+
initComponent: function() {
|
24
|
+
this.addEvents(
|
25
|
+
/**
|
26
|
+
* @event
|
27
|
+
* Fired when class in grid clicked.
|
28
|
+
* @param {String} url URL of the page that was selected. For example "/api/Ext.Ajax".
|
29
|
+
* @param {Ext.EventObject} e
|
30
|
+
*/
|
31
|
+
"urlclick",
|
32
|
+
/**
|
33
|
+
* @event
|
34
|
+
* Fired when close button in grid clicked.
|
35
|
+
* @param {String} url URL of the page that was closed. For example "/api/Ext.Ajax".
|
36
|
+
*/
|
37
|
+
"closeclick"
|
38
|
+
);
|
39
|
+
|
40
|
+
this.columns = [
|
41
|
+
{
|
42
|
+
width: 18,
|
43
|
+
dataIndex: 'url',
|
44
|
+
renderer: function(url, data) {
|
45
|
+
data.tdCls = this.icons[url];
|
46
|
+
},
|
47
|
+
scope: this
|
48
|
+
},
|
49
|
+
{
|
50
|
+
dataIndex: 'title',
|
51
|
+
flex: true
|
52
|
+
}
|
53
|
+
];
|
54
|
+
|
55
|
+
if (this.enableClose) {
|
56
|
+
this.columns = this.columns.concat([
|
57
|
+
{
|
58
|
+
xtype: 'actioncolumn',
|
59
|
+
width: 18,
|
60
|
+
icon: 'resources/images/x12.png',
|
61
|
+
tooltip: 'Delete',
|
62
|
+
handler: function(view, rowIndex) {
|
63
|
+
this.fireEvent("closeclick", this.getStore().getAt(rowIndex).get("url"));
|
64
|
+
},
|
65
|
+
scope: this
|
66
|
+
}
|
67
|
+
]);
|
68
|
+
}
|
69
|
+
|
70
|
+
this.callParent(arguments);
|
71
|
+
|
72
|
+
this.on("itemclick", function(view, record, item, index, event) {
|
73
|
+
// Don't fire urlclick when close button clicked
|
74
|
+
if (!event.getTarget("img")) {
|
75
|
+
this.fireEvent("urlclick", record.get("url"), event);
|
76
|
+
}
|
77
|
+
}, this);
|
78
|
+
|
79
|
+
// Initialize selection after rendering
|
80
|
+
this.on("afterrender", function() {
|
81
|
+
this.selectUrl(this.selectedUrl);
|
82
|
+
}, this);
|
83
|
+
},
|
84
|
+
|
85
|
+
/**
|
86
|
+
* Selects page if grid contains such.
|
87
|
+
* Fires no events while selecting.
|
88
|
+
* @param {String} url page URL.
|
89
|
+
*/
|
90
|
+
selectUrl: function(url) {
|
91
|
+
this.selectedUrl = url;
|
92
|
+
// when grid hasn't been rendered yet, trying to select will give us error.
|
93
|
+
if (this.rendered) {
|
94
|
+
var index = this.getStore().findExact('url', url);
|
95
|
+
this.selectIndex(index);
|
96
|
+
}
|
97
|
+
},
|
98
|
+
|
99
|
+
selectIndex: function(index) {
|
100
|
+
if (index > -1) {
|
101
|
+
this.view.focusRow(index);
|
102
|
+
this.getSelectionModel().select(index, false, true);
|
103
|
+
}
|
104
|
+
else {
|
105
|
+
this.getSelectionModel().deselectAll(true);
|
106
|
+
}
|
107
|
+
}
|
108
|
+
|
109
|
+
});
|
@@ -0,0 +1,59 @@
|
|
1
|
+
/**
|
2
|
+
* Menu shown by {@link Docs.view.HoverMenuButton}.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.view.HoverMenu', {
|
5
|
+
extend: 'Ext.view.View',
|
6
|
+
|
7
|
+
componentCls: 'hover-menu',
|
8
|
+
itemSelector: 'div.item',
|
9
|
+
deferEmptyText: false,
|
10
|
+
|
11
|
+
/**
|
12
|
+
* @cfg {Number} colHeight maximum number of items in one column.
|
13
|
+
* When more than that, items are placed into multiple columns.
|
14
|
+
* Defaults to 25 (current maximum length of history).
|
15
|
+
*/
|
16
|
+
columnHeight: 25,
|
17
|
+
/**
|
18
|
+
* @cfg {Boolean} showCloseButtons true to show "x" after each menu item.
|
19
|
+
* Defaults to false.
|
20
|
+
*/
|
21
|
+
showCloseButtons: false,
|
22
|
+
|
23
|
+
initComponent: function() {
|
24
|
+
this.renderTo = Ext.getBody();
|
25
|
+
|
26
|
+
this.tpl = new Ext.XTemplate(
|
27
|
+
'<table>',
|
28
|
+
'<tr>',
|
29
|
+
'<td>',
|
30
|
+
'<tpl for=".">',
|
31
|
+
'<div class="item">',
|
32
|
+
'{[this.renderLink(values)]}',
|
33
|
+
'<tpl if="this.showCloseButtons">',
|
34
|
+
'<a class="close" href="#" rel="{cls}">x</a>',
|
35
|
+
'</tpl>',
|
36
|
+
'</div>',
|
37
|
+
// Start new column when columnHeight reached
|
38
|
+
'<tpl if="xindex % this.columnHeight === 0 && xcount > xindex">',
|
39
|
+
'</td><td>',
|
40
|
+
'</tpl>',
|
41
|
+
'</tpl>',
|
42
|
+
'</td>',
|
43
|
+
'</tr>',
|
44
|
+
'</table>',
|
45
|
+
{
|
46
|
+
columnHeight: this.columnHeight,
|
47
|
+
showCloseButtons: this.showCloseButtons,
|
48
|
+
renderLink: function(values) {
|
49
|
+
var url = values.url || values.cls;
|
50
|
+
var label = values.label || values.cls;
|
51
|
+
var stat = values['static'] ? '<span class="static">static</span>' : "";
|
52
|
+
return Ext.String.format('<a href="#/api/{0}" rel="{0}" class="docClass">{1} {2}</a>', url, label, stat);
|
53
|
+
}
|
54
|
+
}
|
55
|
+
);
|
56
|
+
|
57
|
+
this.callParent();
|
58
|
+
}
|
59
|
+
});
|
@@ -0,0 +1,147 @@
|
|
1
|
+
/**
|
2
|
+
* Toolbar button with menu that appears when hovered over.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.view.HoverMenuButton', {
|
5
|
+
extend: 'Ext.toolbar.TextItem',
|
6
|
+
alias: 'widget.hovermenubutton',
|
7
|
+
componentCls: "hover-menu-button",
|
8
|
+
requires: [
|
9
|
+
'Docs.view.HoverMenu'
|
10
|
+
],
|
11
|
+
|
12
|
+
/**
|
13
|
+
* @cfg {Ext.data.Store} store
|
14
|
+
* Store with menu items (required).
|
15
|
+
*/
|
16
|
+
|
17
|
+
/**
|
18
|
+
* @cfg {Object} menuCfg
|
19
|
+
* Additional config options for {@link Docs.view.HoverMenu}
|
20
|
+
*/
|
21
|
+
menuCfg: {},
|
22
|
+
|
23
|
+
/**
|
24
|
+
* @cfg {Boolean} showCount
|
25
|
+
* True to show small number in button indicating the number of items in menu.
|
26
|
+
* Defaults to false.
|
27
|
+
*/
|
28
|
+
showCount: false,
|
29
|
+
|
30
|
+
statics: {
|
31
|
+
// Global list of all menus.
|
32
|
+
// So we can hide all other menus while showing a specific one.
|
33
|
+
menus: []
|
34
|
+
},
|
35
|
+
|
36
|
+
initComponent: function() {
|
37
|
+
this.addEvents(
|
38
|
+
/**
|
39
|
+
* @event click
|
40
|
+
* Fired when button clicked.
|
41
|
+
*/
|
42
|
+
"click",
|
43
|
+
/**
|
44
|
+
* @event closeclick
|
45
|
+
* Fired when close link in menu clicked.
|
46
|
+
* @param {String} name Name of the class and or member that was closed.
|
47
|
+
* For example "Ext.Ajax" or "Ext.Ajax-method-request".
|
48
|
+
*/
|
49
|
+
"closeclick"
|
50
|
+
);
|
51
|
+
|
52
|
+
// Append links count to button text, update it when store filtered
|
53
|
+
if (this.showCount) {
|
54
|
+
this.initialText = this.text;
|
55
|
+
this.text += ' <sup>' + this.store.getCount() + '</sup>';
|
56
|
+
this.store.on("datachanged", function() {
|
57
|
+
this.setText(this.initialText + ' <sup>' + this.store.getCount() + '</sup>');
|
58
|
+
}, this);
|
59
|
+
}
|
60
|
+
|
61
|
+
this.menu = Ext.create('Docs.view.HoverMenu', Ext.apply({
|
62
|
+
store: this.store
|
63
|
+
}, this.menuCfg));
|
64
|
+
|
65
|
+
this.callParent(arguments);
|
66
|
+
},
|
67
|
+
|
68
|
+
onRender: function() {
|
69
|
+
this.callParent(arguments);
|
70
|
+
|
71
|
+
this.renderMenu();
|
72
|
+
|
73
|
+
this.getEl().on({
|
74
|
+
click: function() {
|
75
|
+
this.fireEvent("click");
|
76
|
+
},
|
77
|
+
mouseover: function() {
|
78
|
+
// hide other menus
|
79
|
+
Ext.Array.forEach(Docs.view.HoverMenuButton.menus, function(menu) {
|
80
|
+
if (menu !== this.menu) {
|
81
|
+
menu.hide();
|
82
|
+
}
|
83
|
+
});
|
84
|
+
// stop pending menuhide process
|
85
|
+
clearTimeout(this.hideTimeout);
|
86
|
+
this.menu.show();
|
87
|
+
// position menu right below button and show it
|
88
|
+
var p = this.getEl().getXY();
|
89
|
+
this.menu.getEl().setStyle({
|
90
|
+
left: (p[0]-10)+"px",
|
91
|
+
top: (p[1]+23)+"px"
|
92
|
+
});
|
93
|
+
},
|
94
|
+
mouseout: this.deferHideMenu,
|
95
|
+
scope: this
|
96
|
+
});
|
97
|
+
|
98
|
+
this.menu.getEl().on({
|
99
|
+
mouseover: function() {
|
100
|
+
clearTimeout(this.hideTimeout);
|
101
|
+
},
|
102
|
+
mouseout: this.deferHideMenu,
|
103
|
+
scope: this
|
104
|
+
});
|
105
|
+
|
106
|
+
},
|
107
|
+
|
108
|
+
onDestroy: function() {
|
109
|
+
// clean up DOM
|
110
|
+
this.menu.destroy();
|
111
|
+
// remove from global menu list
|
112
|
+
Ext.Array.remove(Docs.view.HoverMenuButton.menus, this.menu);
|
113
|
+
|
114
|
+
this.callParent(arguments);
|
115
|
+
},
|
116
|
+
|
117
|
+
renderMenu: function() {
|
118
|
+
this.menu.getEl().setVisibilityMode(Ext.core.Element.DISPLAY);
|
119
|
+
this.menu.hide();
|
120
|
+
|
121
|
+
this.menu.getEl().addListener('click', function(e) {
|
122
|
+
if (e.getTarget(".close")) {
|
123
|
+
this.fireEvent("closeclick", e.getTarget().rel);
|
124
|
+
} else {
|
125
|
+
this.menu.hide();
|
126
|
+
}
|
127
|
+
e.preventDefault();
|
128
|
+
}, this);
|
129
|
+
|
130
|
+
Docs.view.HoverMenuButton.menus.push(this.menu);
|
131
|
+
},
|
132
|
+
|
133
|
+
deferHideMenu: function() {
|
134
|
+
this.hideTimeout = Ext.Function.defer(function() {
|
135
|
+
this.menu.hide();
|
136
|
+
}, 200, this);
|
137
|
+
},
|
138
|
+
|
139
|
+
/**
|
140
|
+
* Returns the store used by menu.
|
141
|
+
* @return {Ext.data.Store}
|
142
|
+
*/
|
143
|
+
getStore: function() {
|
144
|
+
return this.store;
|
145
|
+
}
|
146
|
+
|
147
|
+
});
|