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,240 @@
|
|
1
|
+
/**
|
2
|
+
* The main viewport, split in to a west and center region.
|
3
|
+
* The North region should also be shown by default in the packaged
|
4
|
+
* (non-live) version of the docs. TODO: close button on north region.
|
5
|
+
*/
|
6
|
+
Ext.define('Docs.view.Viewport', {
|
7
|
+
extend: 'Ext.container.Viewport',
|
8
|
+
requires: [
|
9
|
+
'Docs.view.cls.Header',
|
10
|
+
'Docs.view.cls.Overview',
|
11
|
+
'Docs.view.index.Container',
|
12
|
+
'Docs.view.tree.Tree',
|
13
|
+
'Docs.view.ClassGrid',
|
14
|
+
'Docs.Favorites',
|
15
|
+
'Docs.Settings',
|
16
|
+
'Docs.History'
|
17
|
+
],
|
18
|
+
|
19
|
+
id: 'viewport',
|
20
|
+
layout: 'border',
|
21
|
+
defaults: { xtype: 'container' },
|
22
|
+
|
23
|
+
initComponent: function() {
|
24
|
+
this.items = [
|
25
|
+
|
26
|
+
{
|
27
|
+
region:'west',
|
28
|
+
width: 240,
|
29
|
+
id: 'west-region-container',
|
30
|
+
padding: '5 0 0 0',
|
31
|
+
layout: 'vbox',
|
32
|
+
defaults: {
|
33
|
+
xtype: 'container',
|
34
|
+
width: "100%"
|
35
|
+
},
|
36
|
+
items: [
|
37
|
+
{
|
38
|
+
xtype: 'button',
|
39
|
+
cls: 'logo',
|
40
|
+
height: 60,
|
41
|
+
margin: '0 0 10 10',
|
42
|
+
width: 220,
|
43
|
+
border: 0,
|
44
|
+
ui: 'hmm',
|
45
|
+
listeners: {
|
46
|
+
click: function() {
|
47
|
+
Docs.App.getController('Classes').loadIndex();
|
48
|
+
},
|
49
|
+
scope: this
|
50
|
+
}
|
51
|
+
},
|
52
|
+
{
|
53
|
+
cls: 'search',
|
54
|
+
id: 'search-container',
|
55
|
+
margin: '0 0 0 5',
|
56
|
+
height: 40,
|
57
|
+
items: [
|
58
|
+
{
|
59
|
+
xtype: 'triggerfield',
|
60
|
+
triggerCls: 'reset',
|
61
|
+
emptyText: 'Search',
|
62
|
+
id: 'search-field',
|
63
|
+
enableKeyEvents: true,
|
64
|
+
hideTrigger: true,
|
65
|
+
onTriggerClick: function() {
|
66
|
+
this.reset();
|
67
|
+
this.focus();
|
68
|
+
this.setHideTrigger(true);
|
69
|
+
Ext.getCmp('search-dropdown').hide();
|
70
|
+
}
|
71
|
+
},
|
72
|
+
{
|
73
|
+
xtype: 'searchdropdown'
|
74
|
+
}
|
75
|
+
]
|
76
|
+
},
|
77
|
+
{
|
78
|
+
id: 'nested-west-region-container',
|
79
|
+
flex: 1,
|
80
|
+
layout: 'border',
|
81
|
+
border: false,
|
82
|
+
items: [
|
83
|
+
{
|
84
|
+
id: 'classes-tab-panel',
|
85
|
+
xtype: 'tabpanel',
|
86
|
+
region: 'north',
|
87
|
+
height: Docs.Settings.get('favorites-height') || 150,
|
88
|
+
padding: '2 4 0 0',
|
89
|
+
bodyPadding: '3 15 0 12',
|
90
|
+
split: true,
|
91
|
+
listeners: {
|
92
|
+
afterRender: function() {
|
93
|
+
// Add 7px padding at left side of tab-bar
|
94
|
+
this.tabBar.insert(0, {width: 7, xtype: 'container'});
|
95
|
+
},
|
96
|
+
resize: function(cmp, w, h) {
|
97
|
+
Docs.Settings.set('favorites-height', h);
|
98
|
+
}
|
99
|
+
},
|
100
|
+
items: [
|
101
|
+
{
|
102
|
+
xtype: 'classgrid',
|
103
|
+
id: 'favorites-grid',
|
104
|
+
title: 'Favorites',
|
105
|
+
iconCls: 'icon-fav',
|
106
|
+
viewConfig: {
|
107
|
+
plugins: [{
|
108
|
+
pluginId: 'favGridDD',
|
109
|
+
ptype: 'gridviewdragdrop',
|
110
|
+
animate: true,
|
111
|
+
dragText: 'Drag and drop to reorganize'
|
112
|
+
}],
|
113
|
+
listeners: {
|
114
|
+
drop: function() {
|
115
|
+
// Hack to fix a bug in localStorage which prevents the order of
|
116
|
+
// items being saved when they're changed
|
117
|
+
var store = Ext.getStore('Favorites');
|
118
|
+
store.getProxy().setIds(Ext.Array.map(store.data.items, function(i) { return i.data.id; }));
|
119
|
+
}
|
120
|
+
}
|
121
|
+
},
|
122
|
+
store: Ext.getStore('Favorites'),
|
123
|
+
icons: Docs.icons,
|
124
|
+
listeners: {
|
125
|
+
closeclick: function(cls) {
|
126
|
+
Docs.Favorites.remove(cls);
|
127
|
+
},
|
128
|
+
// Prevent row highlighting when doing drag-drop
|
129
|
+
afterrender: function() {
|
130
|
+
var ddPlugin = this.getView().getPlugin('favGridDD');
|
131
|
+
|
132
|
+
ddPlugin.dragZone.onInitDrag = function() {
|
133
|
+
Ext.getCmp('favorites-grid').addCls('drag');
|
134
|
+
Ext.view.DragZone.prototype.onInitDrag.apply(this, arguments);
|
135
|
+
};
|
136
|
+
ddPlugin.dragZone.afterValidDrop = ddPlugin.dragZone.afterInvalidDrop = function() {
|
137
|
+
Ext.getCmp('favorites-grid').removeCls('drag');
|
138
|
+
};
|
139
|
+
}
|
140
|
+
}
|
141
|
+
}
|
142
|
+
]
|
143
|
+
},
|
144
|
+
{
|
145
|
+
region: 'center',
|
146
|
+
xtype: 'classtree',
|
147
|
+
padding: '5 10 0 10',
|
148
|
+
margin: '0 5 2 0',
|
149
|
+
root: Docs.classData
|
150
|
+
// dockedItems: [{
|
151
|
+
// xtype: 'toolbar',
|
152
|
+
// baseCls: null,
|
153
|
+
// dock: 'top',
|
154
|
+
// padding: '0 0 5 0',
|
155
|
+
// items: [
|
156
|
+
// {
|
157
|
+
// xtype: 'button',
|
158
|
+
// text: 'Sort by Package',
|
159
|
+
// menu: [
|
160
|
+
// { text: 'by Category' },
|
161
|
+
// { text: 'by Hierarchy' },
|
162
|
+
// { text: 'by Popularity' }
|
163
|
+
// ]
|
164
|
+
// },
|
165
|
+
// { xtype: 'tbfill'},
|
166
|
+
// {
|
167
|
+
// xtype: 'button',
|
168
|
+
// iconCls: 'expandAllMembers',
|
169
|
+
// tooltip: "Expand all"
|
170
|
+
// }
|
171
|
+
// ]
|
172
|
+
// }]
|
173
|
+
}
|
174
|
+
]
|
175
|
+
}
|
176
|
+
]
|
177
|
+
},
|
178
|
+
{
|
179
|
+
region: 'center',
|
180
|
+
id: 'center-container',
|
181
|
+
layout: 'fit',
|
182
|
+
minWidth: 800,
|
183
|
+
padding: '20 20 5 0',
|
184
|
+
items: {
|
185
|
+
id: 'card-panel',
|
186
|
+
cls: 'card-panel',
|
187
|
+
xtype: 'container',
|
188
|
+
layout: 'card',
|
189
|
+
padding: '20',
|
190
|
+
items: [
|
191
|
+
{
|
192
|
+
autoScroll: true,
|
193
|
+
xtype: 'indexcontainer'
|
194
|
+
},
|
195
|
+
{
|
196
|
+
xtype: 'container',
|
197
|
+
layout: {
|
198
|
+
type: 'vbox',
|
199
|
+
align: 'stretch'
|
200
|
+
},
|
201
|
+
items: [
|
202
|
+
{xtype: 'classheader'},
|
203
|
+
{xtype: 'classoverview', flex: 1}
|
204
|
+
]
|
205
|
+
},
|
206
|
+
{
|
207
|
+
autoScroll: true,
|
208
|
+
xtype: 'container',
|
209
|
+
id: 'guide'
|
210
|
+
},
|
211
|
+
{
|
212
|
+
xtype: 'container',
|
213
|
+
id: 'failure'
|
214
|
+
}
|
215
|
+
]
|
216
|
+
}
|
217
|
+
},
|
218
|
+
{
|
219
|
+
region: 'south',
|
220
|
+
id: 'footer',
|
221
|
+
contentEl: 'footer-content',
|
222
|
+
height: 15
|
223
|
+
}
|
224
|
+
];
|
225
|
+
|
226
|
+
this.callParent(arguments);
|
227
|
+
},
|
228
|
+
|
229
|
+
/**
|
230
|
+
* Sets the contents of `<title>` tag.
|
231
|
+
* @param {String} text
|
232
|
+
*/
|
233
|
+
setPageTitle: function(text) {
|
234
|
+
text = Ext.util.Format.stripTags(text);
|
235
|
+
if (!this.origTitle) {
|
236
|
+
this.origTitle = document.title;
|
237
|
+
}
|
238
|
+
document.title = text ? (text + " - " + this.origTitle) : this.origTitle;
|
239
|
+
}
|
240
|
+
});
|
@@ -0,0 +1,47 @@
|
|
1
|
+
/**
|
2
|
+
* Renders class name and icon in page header.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.view.cls.Header', {
|
5
|
+
extend: 'Ext.container.Container',
|
6
|
+
padding: '5 0 17 0',
|
7
|
+
// Initially the component will be empty and so the initial height
|
8
|
+
// will not be correct if not set explicitly
|
9
|
+
height: 47,
|
10
|
+
alias: 'widget.classheader',
|
11
|
+
|
12
|
+
initComponent: function() {
|
13
|
+
this.tpl = Ext.create('Ext.XTemplate',
|
14
|
+
'<h1 class="{[this.getClass(values)]}">',
|
15
|
+
'<tpl if="private">',
|
16
|
+
'<span class="private">Private</span>',
|
17
|
+
'</tpl>',
|
18
|
+
'<a href="source/{href}" target="_blank">{name}</a>',
|
19
|
+
'<tpl if="xtypes.length > 0">',
|
20
|
+
'<span>xtype: {[values.xtypes.join(", ")]}</span>',
|
21
|
+
'</tpl>',
|
22
|
+
'</h1>',
|
23
|
+
{
|
24
|
+
getClass: function(cls) {
|
25
|
+
if (cls.component) {
|
26
|
+
return "component";
|
27
|
+
}
|
28
|
+
else if (cls.singleton) {
|
29
|
+
return "singleton";
|
30
|
+
}
|
31
|
+
else {
|
32
|
+
return "class";
|
33
|
+
}
|
34
|
+
}
|
35
|
+
}
|
36
|
+
);
|
37
|
+
this.callParent();
|
38
|
+
},
|
39
|
+
|
40
|
+
/**
|
41
|
+
* Loads class name and icon to header.
|
42
|
+
* @param {Object} cls class config.
|
43
|
+
*/
|
44
|
+
load: function(cls) {
|
45
|
+
this.update(this.tpl.apply(cls));
|
46
|
+
}
|
47
|
+
});
|
@@ -0,0 +1,415 @@
|
|
1
|
+
/**
|
2
|
+
* Renders the whole class-documentation page.
|
3
|
+
*/
|
4
|
+
Ext.define('Docs.view.cls.Overview', {
|
5
|
+
extend: 'Ext.panel.Panel',
|
6
|
+
alias: 'widget.classoverview',
|
7
|
+
requires: [
|
8
|
+
'Docs.view.cls.Toolbar',
|
9
|
+
'Docs.Syntax',
|
10
|
+
'Docs.Settings'
|
11
|
+
],
|
12
|
+
|
13
|
+
cls: 'class-overview iScroll',
|
14
|
+
autoScroll: true,
|
15
|
+
bodyPadding: '20',
|
16
|
+
|
17
|
+
/**
|
18
|
+
* Scrolls the specified element into view
|
19
|
+
*
|
20
|
+
* @param {String} query DomQuery selector string.
|
21
|
+
*/
|
22
|
+
scrollToEl: function(query) {
|
23
|
+
var el = Ext.get(Ext.query(query)[0]);
|
24
|
+
if (el) {
|
25
|
+
var isMember = el.hasCls("member");
|
26
|
+
var scrollOffset = el.getY() - (isMember ? 145 : 135);
|
27
|
+
var docContent = this.getEl().down('.x-panel-body');
|
28
|
+
var currentScroll = docContent.getScroll()['top'];
|
29
|
+
docContent.scrollTo('top', currentScroll + scrollOffset, true);
|
30
|
+
|
31
|
+
if (isMember && el.down(".expandable")) {
|
32
|
+
el.addCls('open');
|
33
|
+
}
|
34
|
+
el.highlight();
|
35
|
+
}
|
36
|
+
},
|
37
|
+
|
38
|
+
/**
|
39
|
+
* Renders class documentation in this panel.
|
40
|
+
*
|
41
|
+
* @param {Object} docClass
|
42
|
+
*/
|
43
|
+
load: function(docClass) {
|
44
|
+
this.docClass = docClass;
|
45
|
+
|
46
|
+
if (this.toolbar) {
|
47
|
+
this.removeDocked(this.toolbar, true);
|
48
|
+
}
|
49
|
+
this.toolbar = Ext.create('Docs.view.cls.Toolbar', {
|
50
|
+
docClass: this.docClass,
|
51
|
+
listeners: {
|
52
|
+
hideInherited: function(hideInherited) {
|
53
|
+
this.filterMembers(this.toolbar.getFilterValue(), hideInherited);
|
54
|
+
},
|
55
|
+
filter: function(search) {
|
56
|
+
this.filterMembers(search, Docs.Settings.get("hideInherited"));
|
57
|
+
},
|
58
|
+
scope: this
|
59
|
+
}
|
60
|
+
});
|
61
|
+
this.addDocked(this.toolbar);
|
62
|
+
|
63
|
+
this.update(this.renderClass(docClass));
|
64
|
+
Docs.Syntax.highlight(this.getEl());
|
65
|
+
|
66
|
+
if (Docs.Settings.get("hideInherited")) {
|
67
|
+
this.filterMembers("", true);
|
68
|
+
}
|
69
|
+
},
|
70
|
+
|
71
|
+
/**
|
72
|
+
* Filters members by search string and inheritance.
|
73
|
+
* @param {String} search
|
74
|
+
* @param {Boolean} hideInherited
|
75
|
+
* @private
|
76
|
+
*/
|
77
|
+
filterMembers: function(search, hideInherited) {
|
78
|
+
Docs.Settings.set("hideInherited", hideInherited);
|
79
|
+
var isSearch = search.length > 0;
|
80
|
+
|
81
|
+
// Hide the class documentation when filtering
|
82
|
+
Ext.Array.forEach(Ext.query('.doc-contents, .hierarchy'), function(el) {
|
83
|
+
Ext.get(el).setStyle({display: isSearch ? 'none' : 'block'});
|
84
|
+
});
|
85
|
+
|
86
|
+
// Hide members who's name doesn't match with the search string
|
87
|
+
// and hide inherited members if hideInherited=true
|
88
|
+
var re = new RegExp(Ext.String.escapeRegex(search), "i");
|
89
|
+
this.eachMember(function(m) {
|
90
|
+
var el = Ext.get(m.tagname + "-" + m.name);
|
91
|
+
var byInheritance = !hideInherited || (m.owner === this.docClass.name);
|
92
|
+
var byFilter = !isSearch || re.test(m.name);
|
93
|
+
if (byInheritance && byFilter) {
|
94
|
+
el.setStyle({display: 'block'});
|
95
|
+
}
|
96
|
+
else {
|
97
|
+
el.setStyle({display: 'none'});
|
98
|
+
}
|
99
|
+
}, this);
|
100
|
+
|
101
|
+
// Remove all first-child classes
|
102
|
+
Ext.Array.forEach(Ext.query('.member.first-child'), function(m) {
|
103
|
+
Ext.get(m).removeCls('first-child');
|
104
|
+
});
|
105
|
+
|
106
|
+
Ext.Array.forEach(['cfg', 'property', 'method', 'event'], function(type) {
|
107
|
+
var sectionId = '#m-' + type;
|
108
|
+
|
109
|
+
// Hide the section completely if all items in it are hidden
|
110
|
+
var visibleEls = this.getVisibleElements(sectionId + " .member");
|
111
|
+
var section = Ext.query(sectionId)[0];
|
112
|
+
section && Ext.get(section).setStyle({display: visibleEls.length > 0 ? 'block' : 'none'});
|
113
|
+
|
114
|
+
// Hide subsections completely if all items in them are hidden
|
115
|
+
Ext.Array.forEach(Ext.query(sectionId+" .subsection"), function(subsection) {
|
116
|
+
var visibleEls = this.getVisibleElements(".member", subsection);
|
117
|
+
if (visibleEls.length > 0) {
|
118
|
+
// add first-child class to first member in subsection
|
119
|
+
visibleEls[0].addCls('first-child');
|
120
|
+
// make sure subsection is visible
|
121
|
+
Ext.get(subsection).setStyle({display: 'block'});
|
122
|
+
}
|
123
|
+
else {
|
124
|
+
// Hide subsection completely if empty
|
125
|
+
Ext.get(subsection).setStyle({display: 'none'});
|
126
|
+
}
|
127
|
+
}, this);
|
128
|
+
}, this);
|
129
|
+
|
130
|
+
this.toolbar.hideInherited(hideInherited);
|
131
|
+
},
|
132
|
+
|
133
|
+
getVisibleElements: function(selector, root) {
|
134
|
+
var els = Ext.Array.map(Ext.query(selector, root), function(node) {
|
135
|
+
return Ext.get(node);
|
136
|
+
});
|
137
|
+
return Ext.Array.filter(els, function(el) {
|
138
|
+
return el.isVisible();
|
139
|
+
});
|
140
|
+
},
|
141
|
+
|
142
|
+
// Loops through each member of class
|
143
|
+
eachMember: function(callback, scope) {
|
144
|
+
Ext.Array.forEach(['members', 'statics'], function(group) {
|
145
|
+
Ext.Object.each(this.docClass[group], function(type, members) {
|
146
|
+
Ext.Array.forEach(members, callback, scope);
|
147
|
+
}, this);
|
148
|
+
}, this);
|
149
|
+
},
|
150
|
+
|
151
|
+
renderClass: function(cls) {
|
152
|
+
this.classTpl = this.classTpl || new Ext.XTemplate(
|
153
|
+
'<div>',
|
154
|
+
'{hierarchy}',
|
155
|
+
'<div class="doc-contents">',
|
156
|
+
'{doc}',
|
157
|
+
'</div>',
|
158
|
+
'<div class="members">',
|
159
|
+
'{members}',
|
160
|
+
'</div>',
|
161
|
+
'</div>'
|
162
|
+
);
|
163
|
+
|
164
|
+
return this.classTpl.apply({
|
165
|
+
doc: cls.doc,
|
166
|
+
hierarchy: this.renderHierarchy(cls),
|
167
|
+
members: this.renderMembers(cls)
|
168
|
+
});
|
169
|
+
},
|
170
|
+
|
171
|
+
renderHierarchy: function(cls) {
|
172
|
+
if (cls.superclasses.length === 0 && cls.allMixins.length === 0 && cls.alternateClassNames.length === 0) {
|
173
|
+
return "";
|
174
|
+
}
|
175
|
+
|
176
|
+
this.hierarchyTpl = this.hierarchyTpl || new Ext.XTemplate(
|
177
|
+
'<pre class="hierarchy">',
|
178
|
+
'<tpl if="alternateClassNames.length > 0">',
|
179
|
+
'<h4>Alternate names</h4>',
|
180
|
+
'<tpl for="alternateClassNames">',
|
181
|
+
'<div class="alternate-class-name">{.}</div>',
|
182
|
+
'</tpl>',
|
183
|
+
'</tpl>',
|
184
|
+
'<tpl if="tree">',
|
185
|
+
'<h4>Hierarchy</h4>',
|
186
|
+
'{tree}',
|
187
|
+
'</tpl>',
|
188
|
+
'<tpl if="mixins.length > 0">',
|
189
|
+
'<h4>Mixins</h4>',
|
190
|
+
'<tpl for="mixins">',
|
191
|
+
'<div class="mixin">{.}</div>',
|
192
|
+
'</tpl>',
|
193
|
+
'</tpl>',
|
194
|
+
'</pre>'
|
195
|
+
);
|
196
|
+
|
197
|
+
return this.hierarchyTpl.apply({
|
198
|
+
tree: cls.superclasses.length ? this.renderClassTree(cls.superclasses.concat(cls.name), true) : "",
|
199
|
+
mixins: Ext.Array.map(cls.allMixins, this.renderLink, this),
|
200
|
+
alternateClassNames: cls.alternateClassNames
|
201
|
+
});
|
202
|
+
},
|
203
|
+
|
204
|
+
renderClassTree: function(superclasses, firstChild) {
|
205
|
+
if (superclasses.length === 0) {
|
206
|
+
return "";
|
207
|
+
}
|
208
|
+
|
209
|
+
this.classTreeTpl = this.classTreeTpl || new Ext.XTemplate(
|
210
|
+
'<div class="subclass {firstChild}">',
|
211
|
+
'{link}',
|
212
|
+
'{subtree}',
|
213
|
+
'</div>'
|
214
|
+
);
|
215
|
+
|
216
|
+
var name = superclasses[0];
|
217
|
+
return this.classTreeTpl.apply({
|
218
|
+
firstChild: firstChild ? 'first-child' : '',
|
219
|
+
link: superclasses.length > 1 ? this.renderLink(name) : '<strong>'+name+'</strong>',
|
220
|
+
subtree: this.renderClassTree(superclasses.slice(1))
|
221
|
+
});
|
222
|
+
},
|
223
|
+
|
224
|
+
renderLink: function(className) {
|
225
|
+
return Ext.String.format('<a href="#/api/{0}" rel="{0}" class="docClass">{0}</a>', className);
|
226
|
+
},
|
227
|
+
|
228
|
+
renderMembers: function(cls) {
|
229
|
+
var sections = [
|
230
|
+
{type: "cfg", title: "Config options"},
|
231
|
+
{type: "property", title: "Properties"},
|
232
|
+
{type: "method", title: "Methods"},
|
233
|
+
{type: "event", title: "Events"}
|
234
|
+
];
|
235
|
+
|
236
|
+
// Skip rendering empty sections
|
237
|
+
return Ext.Array.map(sections, function(sec) {
|
238
|
+
var members = cls.members[sec.type];
|
239
|
+
var statics = cls.statics[sec.type];
|
240
|
+
return (members.length > 0 || statics.length > 0) ? this.renderSection(members, statics, sec) : "";
|
241
|
+
}, this).join("");
|
242
|
+
},
|
243
|
+
|
244
|
+
renderSection: function(members, statics, section) {
|
245
|
+
this.sectionTpl = this.sectionTpl || new Ext.XTemplate(
|
246
|
+
'<div id="m-{type}">',
|
247
|
+
'<tpl if="!statics.length">',
|
248
|
+
'<div class="definedBy">Defined By</div>',
|
249
|
+
'</tpl>',
|
250
|
+
'<h3 class="members-title">{title}</h3>',
|
251
|
+
'<tpl if="members.length">',
|
252
|
+
'<div class="subsection">',
|
253
|
+
'<tpl if="statics.length">',
|
254
|
+
'<div class="definedBy">Defined By</div>',
|
255
|
+
'<h4 class="members-subtitle">Instance {title}</h3>',
|
256
|
+
'</tpl>',
|
257
|
+
'{members}',
|
258
|
+
'</div>',
|
259
|
+
'</tpl>',
|
260
|
+
'<tpl if="statics.length">',
|
261
|
+
'<div class="subsection">',
|
262
|
+
'<div class="definedBy">Defined By</div>',
|
263
|
+
'<h4 class="members-subtitle">Static {title}</h3>',
|
264
|
+
'{statics}',
|
265
|
+
'</div>',
|
266
|
+
'</tpl>',
|
267
|
+
'</div>'
|
268
|
+
);
|
269
|
+
|
270
|
+
return this.sectionTpl.apply({
|
271
|
+
type: section.type,
|
272
|
+
title: section.title,
|
273
|
+
members: Ext.Array.map(members, this.renderMemberDiv, this).join(""),
|
274
|
+
statics: Ext.Array.map(statics, this.renderMemberDiv, this).join("")
|
275
|
+
});
|
276
|
+
},
|
277
|
+
|
278
|
+
renderMemberDiv: function(member, index) {
|
279
|
+
this.memberTpl = this.memberTpl || new Ext.XTemplate(
|
280
|
+
'<div id="{tagname}-{name}" class="member {firstChild} {inherited}">',
|
281
|
+
// leftmost column: expand button
|
282
|
+
'<a href="#" class="side {expandable}">',
|
283
|
+
'<span> </span>',
|
284
|
+
'</a>',
|
285
|
+
// member name and type + link to owner class and source
|
286
|
+
'<div class="title">',
|
287
|
+
'<div class="meta">',
|
288
|
+
'<a href="#/api/{owner}" rel="{owner}" class="definedIn docClass">{owner}</a><br/>',
|
289
|
+
'<a href="source/{href}" target="_blank" class="viewSource">view source</a>',
|
290
|
+
'</div>',
|
291
|
+
'{signature}',
|
292
|
+
'</div>',
|
293
|
+
// short and long descriptions
|
294
|
+
'<div class="description">',
|
295
|
+
'<div class="short">{[this.shortDoc(values)]}</div>',
|
296
|
+
'<div class="long">{longDoc}</div>',
|
297
|
+
'</div>',
|
298
|
+
'</div>',
|
299
|
+
{
|
300
|
+
// Returns contents for short documentation
|
301
|
+
shortDoc: function(cfg) {
|
302
|
+
return cfg.shortDoc ? cfg.shortDoc : cfg.doc;
|
303
|
+
}
|
304
|
+
}
|
305
|
+
);
|
306
|
+
|
307
|
+
return this.memberTpl.apply(Ext.apply({
|
308
|
+
// use classname "first-child" when it's first member in its category
|
309
|
+
firstChild: (index === 0) ? "first-child" : "",
|
310
|
+
// use classname "expandable" when member has shortened description
|
311
|
+
expandable: member.shortDoc ? "expandable" : "not-expandable",
|
312
|
+
// use classname "inherited" when member is not defined in this class
|
313
|
+
inherited: member.owner === this.docClass.name ? "not-inherited" : "inherited",
|
314
|
+
// method params signature or property type signature
|
315
|
+
signature: this.renderSignature(member),
|
316
|
+
// full documentation together with optional parameters and return value
|
317
|
+
longDoc: this.renderLongDoc(member)
|
318
|
+
}, member));
|
319
|
+
},
|
320
|
+
|
321
|
+
renderSignature: function(member) {
|
322
|
+
this.signatureTpl = this.signatureTpl || new Ext.XTemplate(
|
323
|
+
'{before}<a href="#/api/{member}-{tagname}-{name}" class="name {expandable}">{name}</a>{params}{after}'
|
324
|
+
);
|
325
|
+
|
326
|
+
var cfg = Ext.apply({}, member);
|
327
|
+
cfg.expandable = member.shortDoc ? "expandable" : "not-expandable";
|
328
|
+
|
329
|
+
if (member.tagname === "method" && member.name === "constructor") {
|
330
|
+
cfg.before = "<strong class='constructor-signature'>new</strong>";
|
331
|
+
cfg.name = this.docClass.name;
|
332
|
+
}
|
333
|
+
|
334
|
+
if (member.tagname === "cfg" || member.tagname === "property") {
|
335
|
+
cfg.params = "<span> : " + member.type + "</span>";
|
336
|
+
}
|
337
|
+
else {
|
338
|
+
var ps = Ext.Array.map(member.params, this.renderShortParam, this).join(", ");
|
339
|
+
cfg.params = '( <span class="pre">' + ps + "</span> )";
|
340
|
+
if (member.tagname === "method") {
|
341
|
+
cfg.params += " : " + member["return"].type;
|
342
|
+
}
|
343
|
+
}
|
344
|
+
|
345
|
+
if (member['protected']) {
|
346
|
+
cfg.after = "<strong class='protected-signature'>protected</strong>";
|
347
|
+
}
|
348
|
+
if (member['static']) {
|
349
|
+
cfg.after = "<strong class='static-signature'>static</strong>";
|
350
|
+
}
|
351
|
+
if (member.deprecated) {
|
352
|
+
cfg.after = "<strong class='deprecated-signature'>deprecated</strong>";
|
353
|
+
}
|
354
|
+
|
355
|
+
return this.signatureTpl.apply(cfg);
|
356
|
+
},
|
357
|
+
|
358
|
+
renderShortParam: function(param) {
|
359
|
+
var p = param.type + " " + param.name;
|
360
|
+
return param.optional ? "["+p+"]" : p;
|
361
|
+
},
|
362
|
+
|
363
|
+
renderLongDoc: function(member) {
|
364
|
+
var doc = member.doc;
|
365
|
+
|
366
|
+
if (member.deprecated) {
|
367
|
+
var v = member.deprecated.version ? "since " + member.deprecated.version : "";
|
368
|
+
doc += '<div class="deprecated">';
|
369
|
+
doc += Ext.String.format('<p>This {0} has been <strong>deprecated</strong> {1}</p>', member.tagname, v);
|
370
|
+
doc += member.deprecated.text;
|
371
|
+
doc += '</div>';
|
372
|
+
}
|
373
|
+
|
374
|
+
if (member.params && member.params.length > 0) {
|
375
|
+
doc += '<h3 class="pa">Parameters</h3>';
|
376
|
+
var ps = Ext.Array.map(member.params, this.renderLongParam, this).join("");
|
377
|
+
doc += "<ul>" + ps + "</ul>";
|
378
|
+
}
|
379
|
+
|
380
|
+
if (member["return"]) {
|
381
|
+
doc += this.renderReturn(member["return"]);
|
382
|
+
}
|
383
|
+
|
384
|
+
return doc;
|
385
|
+
},
|
386
|
+
|
387
|
+
renderLongParam: function(param) {
|
388
|
+
this.paramTpl = this.paramTpl || new Ext.XTemplate(
|
389
|
+
'<li>',
|
390
|
+
'<span class="pre">{name}</span> : {type}',
|
391
|
+
'<div class="sub-desc">',
|
392
|
+
'{doc}',
|
393
|
+
'</div>',
|
394
|
+
'</li>'
|
395
|
+
);
|
396
|
+
|
397
|
+
return this.paramTpl.apply(param);
|
398
|
+
},
|
399
|
+
|
400
|
+
renderReturn: function(returnDoc) {
|
401
|
+
this.returnTpl = this.returnTpl || new Ext.XTemplate(
|
402
|
+
'<h3 class="pa">Returns</h3>',
|
403
|
+
'<ul>',
|
404
|
+
'<li>',
|
405
|
+
'<span class="pre">{type}</span>',
|
406
|
+
'<div class="sub-desc">',
|
407
|
+
'{doc}',
|
408
|
+
'</div>',
|
409
|
+
'</li>',
|
410
|
+
'</ul>'
|
411
|
+
);
|
412
|
+
|
413
|
+
return this.returnTpl.apply(returnDoc);
|
414
|
+
}
|
415
|
+
});
|