jsduck 0.6.1 → 2.0.pre

Sign up to get free protection for your applications and to get access to all the features.
Files changed (453) hide show
  1. data/.gitignore +4 -0
  2. data/README.md +35 -13
  3. data/Rakefile +129 -0
  4. data/bin/jsduck +112 -20
  5. data/jsduck.gemspec +10 -7
  6. data/lib/jsduck/aggregator.rb +46 -20
  7. data/lib/jsduck/aliases.rb +39 -0
  8. data/lib/jsduck/app.rb +123 -51
  9. data/lib/jsduck/categories.rb +132 -0
  10. data/lib/jsduck/class.rb +71 -18
  11. data/lib/jsduck/doc_formatter.rb +61 -26
  12. data/lib/jsduck/doc_parser.rb +53 -2
  13. data/lib/jsduck/exporter.rb +14 -15
  14. data/lib/jsduck/guides.rb +110 -0
  15. data/lib/jsduck/js_parser.rb +18 -4
  16. data/lib/jsduck/jsonp.rb +17 -0
  17. data/lib/jsduck/logger.rb +36 -0
  18. data/lib/jsduck/merger.rb +69 -51
  19. data/lib/jsduck/page.rb +1 -1
  20. data/lib/jsduck/relations.rb +14 -3
  21. data/lib/jsduck/{members.rb → search_data.rb} +3 -28
  22. data/lib/jsduck/source_file.rb +4 -4
  23. data/lib/jsduck/source_writer.rb +2 -2
  24. data/lib/jsduck/timer.rb +6 -2
  25. data/lib/jsduck/tree.rb +29 -16
  26. data/lib/jsduck/tree_icons.rb +1 -1
  27. data/template/README.md +14 -0
  28. data/template/app.js +25 -0
  29. data/template/app/Application.js +53 -0
  30. data/template/app/Favorites.js +88 -0
  31. data/template/app/History.js +45 -0
  32. data/template/app/LocalStore.js +45 -0
  33. data/template/app/Settings.js +39 -0
  34. data/template/app/Syntax.js +20 -0
  35. data/template/app/controller/Classes.js +301 -0
  36. data/template/app/controller/Search.js +156 -0
  37. data/template/app/model/Favorite.js +11 -0
  38. data/template/app/model/Setting.js +11 -0
  39. data/template/app/store/Favorites.js +7 -0
  40. data/template/app/store/Search.js +14 -0
  41. data/template/app/store/Settings.js +7 -0
  42. data/template/app/view/ClassGrid.js +109 -0
  43. data/template/app/view/HoverMenu.js +59 -0
  44. data/template/app/view/HoverMenuButton.js +147 -0
  45. data/template/app/view/Viewport.js +240 -0
  46. data/template/app/view/cls/Header.js +47 -0
  47. data/template/app/view/cls/Overview.js +415 -0
  48. data/template/app/view/cls/Toolbar.js +199 -0
  49. data/template/app/view/index/Container.js +63 -0
  50. data/template/app/view/search/Dropdown.js +53 -0
  51. data/template/app/view/tree/Tree.js +133 -0
  52. data/template/favicon.ico +0 -0
  53. data/template/index.html +32 -37
  54. data/template/{resources/prettify → prettify}/prettify.css +0 -0
  55. data/template/{resources/prettify → prettify}/prettify.js +0 -0
  56. data/template/resources/images/class-m.png +0 -0
  57. data/template/resources/images/class-sm.png +0 -0
  58. data/template/resources/images/component-m.png +0 -0
  59. data/template/resources/images/configs.png +0 -0
  60. data/template/resources/images/data-package.png +0 -0
  61. data/template/resources/images/doc-m.png +0 -0
  62. data/template/resources/images/drag-bar-center.png +0 -0
  63. data/template/resources/{elbow-end.gif → images/elbow-end.gif} +0 -0
  64. data/template/resources/images/events.png +0 -0
  65. data/template/resources/images/expandcollapse.png +0 -0
  66. data/template/resources/images/guide-icon.png +0 -0
  67. data/template/resources/images/guides.png +0 -0
  68. data/template/resources/images/headBG.png +0 -0
  69. data/template/resources/images/header.gif +0 -0
  70. data/template/resources/images/icon.png +0 -0
  71. data/template/resources/images/icons.png +0 -0
  72. data/template/resources/images/loading-title.png +0 -0
  73. data/template/resources/images/loading.gif +0 -0
  74. data/template/resources/{member-collapsed.gif → images/member-collapsed.gif} +0 -0
  75. data/template/resources/{member-expanded.gif → images/member-expanded.gif} +0 -0
  76. data/template/resources/{member-hover.gif → images/member-hover.gif} +0 -0
  77. data/template/resources/images/methods.png +0 -0
  78. data/template/resources/images/model.png +0 -0
  79. data/template/resources/images/properties.png +0 -0
  80. data/template/resources/images/root-lines.png +0 -0
  81. data/template/resources/images/search-box.png +0 -0
  82. data/template/resources/images/singleton-m.png +0 -0
  83. data/template/resources/images/version-tabs.png +0 -0
  84. data/template/resources/images/x.png +0 -0
  85. data/template/resources/images/x12.png +0 -0
  86. metadata +84 -387
  87. data/lib/jsduck/cfg_table.rb +0 -21
  88. data/lib/jsduck/event_table.rb +0 -33
  89. data/lib/jsduck/inheritance_tree.rb +0 -42
  90. data/lib/jsduck/long_params.rb +0 -30
  91. data/lib/jsduck/method_table.rb +0 -45
  92. data/lib/jsduck/property_table.rb +0 -21
  93. data/lib/jsduck/short_params.rb +0 -24
  94. data/lib/jsduck/table.rb +0 -121
  95. data/template/resources/TabCloseMenu.js +0 -150
  96. data/template/resources/block-bottom.gif +0 -0
  97. data/template/resources/block-top.gif +0 -0
  98. data/template/resources/class.gif +0 -0
  99. data/template/resources/cmp.gif +0 -0
  100. data/template/resources/collapse-all.gif +0 -0
  101. data/template/resources/config.gif +0 -0
  102. data/template/resources/css/ext-all.css +0 -6993
  103. data/template/resources/css/xtheme-gray.css +0 -1654
  104. data/template/resources/docs.css +0 -361
  105. data/template/resources/docs.gif +0 -0
  106. data/template/resources/docs.js +0 -769
  107. data/template/resources/event.gif +0 -0
  108. data/template/resources/expand-all.gif +0 -0
  109. data/template/resources/expand-bg-over.gif +0 -0
  110. data/template/resources/expand-bg.gif +0 -0
  111. data/template/resources/expand-members.gif +0 -0
  112. data/template/resources/ext-all.js +0 -11
  113. data/template/resources/ext-base.js +0 -7
  114. data/template/resources/extanim32.gif +0 -0
  115. data/template/resources/fav.gif +0 -0
  116. data/template/resources/favicon.ico +0 -0
  117. data/template/resources/hd-bg.png +0 -0
  118. data/template/resources/hide-inherited.gif +0 -0
  119. data/template/resources/images/default/box/corners-blue.gif +0 -0
  120. data/template/resources/images/default/box/corners.gif +0 -0
  121. data/template/resources/images/default/box/l-blue.gif +0 -0
  122. data/template/resources/images/default/box/l.gif +0 -0
  123. data/template/resources/images/default/box/r-blue.gif +0 -0
  124. data/template/resources/images/default/box/r.gif +0 -0
  125. data/template/resources/images/default/box/tb-blue.gif +0 -0
  126. data/template/resources/images/default/box/tb.gif +0 -0
  127. data/template/resources/images/default/button/arrow.gif +0 -0
  128. data/template/resources/images/default/button/btn.gif +0 -0
  129. data/template/resources/images/default/button/group-cs.gif +0 -0
  130. data/template/resources/images/default/button/group-lr.gif +0 -0
  131. data/template/resources/images/default/button/group-tb.gif +0 -0
  132. data/template/resources/images/default/button/s-arrow-b-noline.gif +0 -0
  133. data/template/resources/images/default/button/s-arrow-b.gif +0 -0
  134. data/template/resources/images/default/button/s-arrow-bo.gif +0 -0
  135. data/template/resources/images/default/button/s-arrow-noline.gif +0 -0
  136. data/template/resources/images/default/button/s-arrow-o.gif +0 -0
  137. data/template/resources/images/default/button/s-arrow.gif +0 -0
  138. data/template/resources/images/default/dd/drop-add.gif +0 -0
  139. data/template/resources/images/default/dd/drop-no.gif +0 -0
  140. data/template/resources/images/default/dd/drop-yes.gif +0 -0
  141. data/template/resources/images/default/editor/tb-sprite.gif +0 -0
  142. data/template/resources/images/default/form/checkbox.gif +0 -0
  143. data/template/resources/images/default/form/clear-trigger.gif +0 -0
  144. data/template/resources/images/default/form/clear-trigger.psd +0 -0
  145. data/template/resources/images/default/form/date-trigger.gif +0 -0
  146. data/template/resources/images/default/form/date-trigger.psd +0 -0
  147. data/template/resources/images/default/form/error-tip-corners.gif +0 -0
  148. data/template/resources/images/default/form/exclamation.gif +0 -0
  149. data/template/resources/images/default/form/radio.gif +0 -0
  150. data/template/resources/images/default/form/search-trigger.gif +0 -0
  151. data/template/resources/images/default/form/search-trigger.psd +0 -0
  152. data/template/resources/images/default/form/text-bg.gif +0 -0
  153. data/template/resources/images/default/form/trigger-square.gif +0 -0
  154. data/template/resources/images/default/form/trigger-square.psd +0 -0
  155. data/template/resources/images/default/form/trigger-tpl.gif +0 -0
  156. data/template/resources/images/default/form/trigger.gif +0 -0
  157. data/template/resources/images/default/form/trigger.psd +0 -0
  158. data/template/resources/images/default/gradient-bg.gif +0 -0
  159. data/template/resources/images/default/grid/arrow-left-white.gif +0 -0
  160. data/template/resources/images/default/grid/arrow-right-white.gif +0 -0
  161. data/template/resources/images/default/grid/col-move-bottom.gif +0 -0
  162. data/template/resources/images/default/grid/col-move-top.gif +0 -0
  163. data/template/resources/images/default/grid/columns.gif +0 -0
  164. data/template/resources/images/default/grid/dirty.gif +0 -0
  165. data/template/resources/images/default/grid/done.gif +0 -0
  166. data/template/resources/images/default/grid/drop-no.gif +0 -0
  167. data/template/resources/images/default/grid/drop-yes.gif +0 -0
  168. data/template/resources/images/default/grid/footer-bg.gif +0 -0
  169. data/template/resources/images/default/grid/grid-blue-hd.gif +0 -0
  170. data/template/resources/images/default/grid/grid-blue-split.gif +0 -0
  171. data/template/resources/images/default/grid/grid-hrow.gif +0 -0
  172. data/template/resources/images/default/grid/grid-loading.gif +0 -0
  173. data/template/resources/images/default/grid/grid-split.gif +0 -0
  174. data/template/resources/images/default/grid/grid-vista-hd.gif +0 -0
  175. data/template/resources/images/default/grid/grid3-hd-btn.gif +0 -0
  176. data/template/resources/images/default/grid/grid3-hrow-over.gif +0 -0
  177. data/template/resources/images/default/grid/grid3-hrow.gif +0 -0
  178. data/template/resources/images/default/grid/grid3-special-col-bg.gif +0 -0
  179. data/template/resources/images/default/grid/grid3-special-col-sel-bg.gif +0 -0
  180. data/template/resources/images/default/grid/group-by.gif +0 -0
  181. data/template/resources/images/default/grid/group-collapse.gif +0 -0
  182. data/template/resources/images/default/grid/group-expand-sprite.gif +0 -0
  183. data/template/resources/images/default/grid/group-expand.gif +0 -0
  184. data/template/resources/images/default/grid/hd-pop.gif +0 -0
  185. data/template/resources/images/default/grid/hmenu-asc.gif +0 -0
  186. data/template/resources/images/default/grid/hmenu-desc.gif +0 -0
  187. data/template/resources/images/default/grid/hmenu-lock.gif +0 -0
  188. data/template/resources/images/default/grid/hmenu-lock.png +0 -0
  189. data/template/resources/images/default/grid/hmenu-unlock.gif +0 -0
  190. data/template/resources/images/default/grid/hmenu-unlock.png +0 -0
  191. data/template/resources/images/default/grid/invalid_line.gif +0 -0
  192. data/template/resources/images/default/grid/loading.gif +0 -0
  193. data/template/resources/images/default/grid/mso-hd.gif +0 -0
  194. data/template/resources/images/default/grid/nowait.gif +0 -0
  195. data/template/resources/images/default/grid/page-first-disabled.gif +0 -0
  196. data/template/resources/images/default/grid/page-first.gif +0 -0
  197. data/template/resources/images/default/grid/page-last-disabled.gif +0 -0
  198. data/template/resources/images/default/grid/page-last.gif +0 -0
  199. data/template/resources/images/default/grid/page-next-disabled.gif +0 -0
  200. data/template/resources/images/default/grid/page-next.gif +0 -0
  201. data/template/resources/images/default/grid/page-prev-disabled.gif +0 -0
  202. data/template/resources/images/default/grid/page-prev.gif +0 -0
  203. data/template/resources/images/default/grid/pick-button.gif +0 -0
  204. data/template/resources/images/default/grid/refresh.gif +0 -0
  205. data/template/resources/images/default/grid/row-check-sprite.gif +0 -0
  206. data/template/resources/images/default/grid/row-expand-sprite.gif +0 -0
  207. data/template/resources/images/default/grid/row-over.gif +0 -0
  208. data/template/resources/images/default/grid/row-sel.gif +0 -0
  209. data/template/resources/images/default/grid/sort-hd.gif +0 -0
  210. data/template/resources/images/default/grid/sort_asc.gif +0 -0
  211. data/template/resources/images/default/grid/sort_desc.gif +0 -0
  212. data/template/resources/images/default/grid/wait.gif +0 -0
  213. data/template/resources/images/default/layout/collapse.gif +0 -0
  214. data/template/resources/images/default/layout/expand.gif +0 -0
  215. data/template/resources/images/default/layout/gradient-bg.gif +0 -0
  216. data/template/resources/images/default/layout/mini-bottom.gif +0 -0
  217. data/template/resources/images/default/layout/mini-left.gif +0 -0
  218. data/template/resources/images/default/layout/mini-right.gif +0 -0
  219. data/template/resources/images/default/layout/mini-top.gif +0 -0
  220. data/template/resources/images/default/layout/ns-collapse.gif +0 -0
  221. data/template/resources/images/default/layout/ns-expand.gif +0 -0
  222. data/template/resources/images/default/layout/panel-close.gif +0 -0
  223. data/template/resources/images/default/layout/panel-title-bg.gif +0 -0
  224. data/template/resources/images/default/layout/panel-title-light-bg.gif +0 -0
  225. data/template/resources/images/default/layout/stick.gif +0 -0
  226. data/template/resources/images/default/layout/stuck.gif +0 -0
  227. data/template/resources/images/default/layout/tab-close-on.gif +0 -0
  228. data/template/resources/images/default/layout/tab-close.gif +0 -0
  229. data/template/resources/images/default/menu/checked.gif +0 -0
  230. data/template/resources/images/default/menu/group-checked.gif +0 -0
  231. data/template/resources/images/default/menu/item-over.gif +0 -0
  232. data/template/resources/images/default/menu/menu-parent.gif +0 -0
  233. data/template/resources/images/default/menu/menu.gif +0 -0
  234. data/template/resources/images/default/menu/unchecked.gif +0 -0
  235. data/template/resources/images/default/panel/corners-sprite.gif +0 -0
  236. data/template/resources/images/default/panel/left-right.gif +0 -0
  237. data/template/resources/images/default/panel/light-hd.gif +0 -0
  238. data/template/resources/images/default/panel/tool-sprite-tpl.gif +0 -0
  239. data/template/resources/images/default/panel/tool-sprites.gif +0 -0
  240. data/template/resources/images/default/panel/tools-sprites-trans.gif +0 -0
  241. data/template/resources/images/default/panel/top-bottom.gif +0 -0
  242. data/template/resources/images/default/panel/top-bottom.png +0 -0
  243. data/template/resources/images/default/panel/white-corners-sprite.gif +0 -0
  244. data/template/resources/images/default/panel/white-left-right.gif +0 -0
  245. data/template/resources/images/default/panel/white-top-bottom.gif +0 -0
  246. data/template/resources/images/default/progress/progress-bg.gif +0 -0
  247. data/template/resources/images/default/qtip/bg.gif +0 -0
  248. data/template/resources/images/default/qtip/close.gif +0 -0
  249. data/template/resources/images/default/qtip/tip-anchor-sprite.gif +0 -0
  250. data/template/resources/images/default/qtip/tip-sprite.gif +0 -0
  251. data/template/resources/images/default/s.gif +0 -0
  252. data/template/resources/images/default/shadow-c.png +0 -0
  253. data/template/resources/images/default/shadow-lr.png +0 -0
  254. data/template/resources/images/default/shadow.png +0 -0
  255. data/template/resources/images/default/shared/blue-loading.gif +0 -0
  256. data/template/resources/images/default/shared/calendar.gif +0 -0
  257. data/template/resources/images/default/shared/glass-bg.gif +0 -0
  258. data/template/resources/images/default/shared/hd-sprite.gif +0 -0
  259. data/template/resources/images/default/shared/large-loading.gif +0 -0
  260. data/template/resources/images/default/shared/left-btn.gif +0 -0
  261. data/template/resources/images/default/shared/loading-balls.gif +0 -0
  262. data/template/resources/images/default/shared/right-btn.gif +0 -0
  263. data/template/resources/images/default/shared/warning.gif +0 -0
  264. data/template/resources/images/default/sizer/e-handle-dark.gif +0 -0
  265. data/template/resources/images/default/sizer/e-handle.gif +0 -0
  266. data/template/resources/images/default/sizer/ne-handle-dark.gif +0 -0
  267. data/template/resources/images/default/sizer/ne-handle.gif +0 -0
  268. data/template/resources/images/default/sizer/nw-handle-dark.gif +0 -0
  269. data/template/resources/images/default/sizer/nw-handle.gif +0 -0
  270. data/template/resources/images/default/sizer/s-handle-dark.gif +0 -0
  271. data/template/resources/images/default/sizer/s-handle.gif +0 -0
  272. data/template/resources/images/default/sizer/se-handle-dark.gif +0 -0
  273. data/template/resources/images/default/sizer/se-handle.gif +0 -0
  274. data/template/resources/images/default/sizer/square.gif +0 -0
  275. data/template/resources/images/default/sizer/sw-handle-dark.gif +0 -0
  276. data/template/resources/images/default/sizer/sw-handle.gif +0 -0
  277. data/template/resources/images/default/slider/slider-bg.png +0 -0
  278. data/template/resources/images/default/slider/slider-thumb.png +0 -0
  279. data/template/resources/images/default/slider/slider-v-bg.png +0 -0
  280. data/template/resources/images/default/slider/slider-v-thumb.png +0 -0
  281. data/template/resources/images/default/tabs/scroll-left.gif +0 -0
  282. data/template/resources/images/default/tabs/scroll-right.gif +0 -0
  283. data/template/resources/images/default/tabs/scroller-bg.gif +0 -0
  284. data/template/resources/images/default/tabs/tab-btm-inactive-left-bg.gif +0 -0
  285. data/template/resources/images/default/tabs/tab-btm-inactive-right-bg.gif +0 -0
  286. data/template/resources/images/default/tabs/tab-btm-left-bg.gif +0 -0
  287. data/template/resources/images/default/tabs/tab-btm-over-left-bg.gif +0 -0
  288. data/template/resources/images/default/tabs/tab-btm-over-right-bg.gif +0 -0
  289. data/template/resources/images/default/tabs/tab-btm-right-bg.gif +0 -0
  290. data/template/resources/images/default/tabs/tab-close.gif +0 -0
  291. data/template/resources/images/default/tabs/tab-strip-bg.gif +0 -0
  292. data/template/resources/images/default/tabs/tab-strip-bg.png +0 -0
  293. data/template/resources/images/default/tabs/tab-strip-btm-bg.gif +0 -0
  294. data/template/resources/images/default/tabs/tabs-sprite.gif +0 -0
  295. data/template/resources/images/default/toolbar/bg.gif +0 -0
  296. data/template/resources/images/default/toolbar/btn-arrow-light.gif +0 -0
  297. data/template/resources/images/default/toolbar/btn-arrow.gif +0 -0
  298. data/template/resources/images/default/toolbar/btn-over-bg.gif +0 -0
  299. data/template/resources/images/default/toolbar/gray-bg.gif +0 -0
  300. data/template/resources/images/default/toolbar/more.gif +0 -0
  301. data/template/resources/images/default/toolbar/tb-bg.gif +0 -0
  302. data/template/resources/images/default/toolbar/tb-btn-sprite.gif +0 -0
  303. data/template/resources/images/default/toolbar/tb-xl-btn-sprite.gif +0 -0
  304. data/template/resources/images/default/toolbar/tb-xl-sep.gif +0 -0
  305. data/template/resources/images/default/tree/arrows.gif +0 -0
  306. data/template/resources/images/default/tree/drop-add.gif +0 -0
  307. data/template/resources/images/default/tree/drop-between.gif +0 -0
  308. data/template/resources/images/default/tree/drop-no.gif +0 -0
  309. data/template/resources/images/default/tree/drop-over.gif +0 -0
  310. data/template/resources/images/default/tree/drop-under.gif +0 -0
  311. data/template/resources/images/default/tree/drop-yes.gif +0 -0
  312. data/template/resources/images/default/tree/elbow-end-minus-nl.gif +0 -0
  313. data/template/resources/images/default/tree/elbow-end-minus.gif +0 -0
  314. data/template/resources/images/default/tree/elbow-end-plus-nl.gif +0 -0
  315. data/template/resources/images/default/tree/elbow-end-plus.gif +0 -0
  316. data/template/resources/images/default/tree/elbow-end.gif +0 -0
  317. data/template/resources/images/default/tree/elbow-line.gif +0 -0
  318. data/template/resources/images/default/tree/elbow-minus-nl.gif +0 -0
  319. data/template/resources/images/default/tree/elbow-minus.gif +0 -0
  320. data/template/resources/images/default/tree/elbow-plus-nl.gif +0 -0
  321. data/template/resources/images/default/tree/elbow-plus.gif +0 -0
  322. data/template/resources/images/default/tree/elbow.gif +0 -0
  323. data/template/resources/images/default/tree/folder-open.gif +0 -0
  324. data/template/resources/images/default/tree/folder.gif +0 -0
  325. data/template/resources/images/default/tree/leaf.gif +0 -0
  326. data/template/resources/images/default/tree/loading.gif +0 -0
  327. data/template/resources/images/default/tree/s.gif +0 -0
  328. data/template/resources/images/default/window/icon-error.gif +0 -0
  329. data/template/resources/images/default/window/icon-info.gif +0 -0
  330. data/template/resources/images/default/window/icon-question.gif +0 -0
  331. data/template/resources/images/default/window/icon-warning.gif +0 -0
  332. data/template/resources/images/default/window/left-corners.png +0 -0
  333. data/template/resources/images/default/window/left-corners.psd +0 -0
  334. data/template/resources/images/default/window/left-right.png +0 -0
  335. data/template/resources/images/default/window/left-right.psd +0 -0
  336. data/template/resources/images/default/window/right-corners.png +0 -0
  337. data/template/resources/images/default/window/right-corners.psd +0 -0
  338. data/template/resources/images/default/window/top-bottom.png +0 -0
  339. data/template/resources/images/default/window/top-bottom.psd +0 -0
  340. data/template/resources/images/gray/button/btn-arrow.gif +0 -0
  341. data/template/resources/images/gray/button/btn-sprite.gif +0 -0
  342. data/template/resources/images/gray/button/btn.gif +0 -0
  343. data/template/resources/images/gray/button/group-cs.gif +0 -0
  344. data/template/resources/images/gray/button/group-lr.gif +0 -0
  345. data/template/resources/images/gray/button/group-tb.gif +0 -0
  346. data/template/resources/images/gray/button/s-arrow-bo.gif +0 -0
  347. data/template/resources/images/gray/button/s-arrow-o.gif +0 -0
  348. data/template/resources/images/gray/form/clear-trigger.gif +0 -0
  349. data/template/resources/images/gray/form/date-trigger.gif +0 -0
  350. data/template/resources/images/gray/form/search-trigger.gif +0 -0
  351. data/template/resources/images/gray/form/trigger-square.gif +0 -0
  352. data/template/resources/images/gray/form/trigger.gif +0 -0
  353. data/template/resources/images/gray/gradient-bg.gif +0 -0
  354. data/template/resources/images/gray/grid/col-move-bottom.gif +0 -0
  355. data/template/resources/images/gray/grid/col-move-top.gif +0 -0
  356. data/template/resources/images/gray/grid/grid3-hd-btn.gif +0 -0
  357. data/template/resources/images/gray/grid/grid3-hrow-over.gif +0 -0
  358. data/template/resources/images/gray/grid/grid3-hrow-over2.gif +0 -0
  359. data/template/resources/images/gray/grid/grid3-hrow.gif +0 -0
  360. data/template/resources/images/gray/grid/grid3-hrow2.gif +0 -0
  361. data/template/resources/images/gray/grid/grid3-special-col-bg.gif +0 -0
  362. data/template/resources/images/gray/grid/grid3-special-col-bg2.gif +0 -0
  363. data/template/resources/images/gray/grid/grid3-special-col-sel-bg.gif +0 -0
  364. data/template/resources/images/gray/grid/group-collapse.gif +0 -0
  365. data/template/resources/images/gray/grid/group-expand-sprite.gif +0 -0
  366. data/template/resources/images/gray/grid/group-expand.gif +0 -0
  367. data/template/resources/images/gray/grid/page-first.gif +0 -0
  368. data/template/resources/images/gray/grid/page-last.gif +0 -0
  369. data/template/resources/images/gray/grid/page-next.gif +0 -0
  370. data/template/resources/images/gray/grid/page-prev.gif +0 -0
  371. data/template/resources/images/gray/grid/refresh.gif +0 -0
  372. data/template/resources/images/gray/grid/row-expand-sprite.gif +0 -0
  373. data/template/resources/images/gray/grid/sort_asc.gif +0 -0
  374. data/template/resources/images/gray/grid/sort_desc.gif +0 -0
  375. data/template/resources/images/gray/menu/group-checked.gif +0 -0
  376. data/template/resources/images/gray/menu/item-over-disabled.gif +0 -0
  377. data/template/resources/images/gray/menu/item-over.gif +0 -0
  378. data/template/resources/images/gray/menu/menu-parent.gif +0 -0
  379. data/template/resources/images/gray/panel/corners-sprite.gif +0 -0
  380. data/template/resources/images/gray/panel/left-right.gif +0 -0
  381. data/template/resources/images/gray/panel/light-hd.gif +0 -0
  382. data/template/resources/images/gray/panel/tool-sprite-tpl.gif +0 -0
  383. data/template/resources/images/gray/panel/tool-sprites.gif +0 -0
  384. data/template/resources/images/gray/panel/tools-sprites-trans.gif +0 -0
  385. data/template/resources/images/gray/panel/top-bottom.gif +0 -0
  386. data/template/resources/images/gray/panel/top-bottom.png +0 -0
  387. data/template/resources/images/gray/panel/white-corners-sprite.gif +0 -0
  388. data/template/resources/images/gray/panel/white-left-right.gif +0 -0
  389. data/template/resources/images/gray/panel/white-top-bottom.gif +0 -0
  390. data/template/resources/images/gray/progress/progress-bg.gif +0 -0
  391. data/template/resources/images/gray/qtip/bg.gif +0 -0
  392. data/template/resources/images/gray/qtip/close.gif +0 -0
  393. data/template/resources/images/gray/qtip/tip-anchor-sprite.gif +0 -0
  394. data/template/resources/images/gray/qtip/tip-sprite.gif +0 -0
  395. data/template/resources/images/gray/s.gif +0 -0
  396. data/template/resources/images/gray/shared/hd-sprite.gif +0 -0
  397. data/template/resources/images/gray/shared/left-btn.gif +0 -0
  398. data/template/resources/images/gray/shared/right-btn.gif +0 -0
  399. data/template/resources/images/gray/sizer/e-handle.gif +0 -0
  400. data/template/resources/images/gray/sizer/ne-handle.gif +0 -0
  401. data/template/resources/images/gray/sizer/nw-handle.gif +0 -0
  402. data/template/resources/images/gray/sizer/s-handle.gif +0 -0
  403. data/template/resources/images/gray/sizer/se-handle.gif +0 -0
  404. data/template/resources/images/gray/sizer/square.gif +0 -0
  405. data/template/resources/images/gray/sizer/sw-handle.gif +0 -0
  406. data/template/resources/images/gray/slider/slider-thumb.png +0 -0
  407. data/template/resources/images/gray/slider/slider-v-thumb.png +0 -0
  408. data/template/resources/images/gray/tabs/scroll-left.gif +0 -0
  409. data/template/resources/images/gray/tabs/scroll-right.gif +0 -0
  410. data/template/resources/images/gray/tabs/scroller-bg.gif +0 -0
  411. data/template/resources/images/gray/tabs/tab-btm-inactive-left-bg.gif +0 -0
  412. data/template/resources/images/gray/tabs/tab-btm-inactive-right-bg.gif +0 -0
  413. data/template/resources/images/gray/tabs/tab-btm-left-bg.gif +0 -0
  414. data/template/resources/images/gray/tabs/tab-btm-over-left-bg.gif +0 -0
  415. data/template/resources/images/gray/tabs/tab-btm-over-right-bg.gif +0 -0
  416. data/template/resources/images/gray/tabs/tab-btm-right-bg.gif +0 -0
  417. data/template/resources/images/gray/tabs/tab-close.gif +0 -0
  418. data/template/resources/images/gray/tabs/tab-strip-bg.gif +0 -0
  419. data/template/resources/images/gray/tabs/tab-strip-bg.png +0 -0
  420. data/template/resources/images/gray/tabs/tab-strip-btm-bg.gif +0 -0
  421. data/template/resources/images/gray/tabs/tabs-sprite.gif +0 -0
  422. data/template/resources/images/gray/toolbar/bg.gif +0 -0
  423. data/template/resources/images/gray/toolbar/btn-arrow-light.gif +0 -0
  424. data/template/resources/images/gray/toolbar/btn-arrow.gif +0 -0
  425. data/template/resources/images/gray/toolbar/btn-over-bg.gif +0 -0
  426. data/template/resources/images/gray/toolbar/gray-bg.gif +0 -0
  427. data/template/resources/images/gray/toolbar/more.gif +0 -0
  428. data/template/resources/images/gray/toolbar/tb-bg.gif +0 -0
  429. data/template/resources/images/gray/toolbar/tb-btn-sprite.gif +0 -0
  430. data/template/resources/images/gray/tree/arrows.gif +0 -0
  431. data/template/resources/images/gray/tree/elbow-end-minus-nl.gif +0 -0
  432. data/template/resources/images/gray/tree/elbow-end-minus.gif +0 -0
  433. data/template/resources/images/gray/tree/elbow-end-plus-nl.gif +0 -0
  434. data/template/resources/images/gray/tree/elbow-end-plus.gif +0 -0
  435. data/template/resources/images/gray/window/icon-error.gif +0 -0
  436. data/template/resources/images/gray/window/icon-info.gif +0 -0
  437. data/template/resources/images/gray/window/icon-question.gif +0 -0
  438. data/template/resources/images/gray/window/icon-warning.gif +0 -0
  439. data/template/resources/images/gray/window/left-corners.png +0 -0
  440. data/template/resources/images/gray/window/left-corners.pspimage +0 -0
  441. data/template/resources/images/gray/window/left-right.png +0 -0
  442. data/template/resources/images/gray/window/right-corners.png +0 -0
  443. data/template/resources/images/gray/window/top-bottom.png +0 -0
  444. data/template/resources/inherited.gif +0 -0
  445. data/template/resources/method.gif +0 -0
  446. data/template/resources/pkg-closed.gif +0 -0
  447. data/template/resources/pkg-open.gif +0 -0
  448. data/template/resources/pkg.gif +0 -0
  449. data/template/resources/prop.gif +0 -0
  450. data/template/resources/s.gif +0 -0
  451. data/template/resources/static.gif +0 -0
  452. data/template/resources/style.css +0 -291
  453. data/template/welcome.html +0 -45
@@ -1,361 +0,0 @@
1
- body {
2
- font: normal 12px helvetica,arial,verdana,tahoma,sans-serif;
3
- }
4
- html, body {
5
- margin:0;
6
- padding:0;
7
- border:0 none;
8
- overflow:hidden;
9
- height:100%;
10
- width:100%;
11
- }
12
- #class .loading-indicator{
13
- font-size:12px;
14
- height:18px;
15
- }
16
-
17
-
18
- #docs .top-toolbar{
19
- border:0 none;
20
- border-top:1px solid #d0d0d0;
21
- background:transparent;
22
- }
23
- #docs .top-toolbar button {
24
-
25
- }
26
- .x-panel-noborder {
27
- border: 0 none;
28
- }
29
- #header {
30
- height: 44px;
31
- }
32
- #header h1 {
33
- float: left;
34
- margin-left: 20px;
35
- font-size: 20px;
36
- line-height: 44px;
37
- color: #444;
38
- font-weight: normal;
39
- }
40
- #header strong {
41
- font-weight: bold;
42
- padding-right: 20px;
43
- }
44
- #header p {
45
- float: right;
46
- margin: 15px 15px 0 0;
47
- color: #ccc;
48
- }
49
-
50
- .docs-header .x-panel-body {
51
- background:transparent;
52
- }
53
-
54
- #header .api-title {
55
- font:normal 16px helvetica, arial, tahoma, sans-serif;
56
- color:black;
57
- margin:5px;
58
- }
59
-
60
- .loading-indicator {
61
- font-size:11px;
62
- background-image:url(images/default/grid/loading.gif);
63
- background-repeat: no-repeat;
64
- background-position:top left;
65
- padding-left:20px;
66
- height:18px;
67
- text-align:left;
68
- }
69
-
70
- #doc-body .loading-indicator {
71
- font:bold 13px Helvetica, Arial, Tahoma, Verdana, sans-serif;
72
- position:absolute;
73
- top:35%;
74
- left:43%;
75
- color:#444;
76
- background-image:url(images/default/shared/large-loading.gif);
77
- background-repeat: no-repeat;
78
- background-position:left 5px;
79
- padding:10px 10px 10px 38px;
80
- text-align:left;
81
- }
82
- a#welcome-link{
83
- background:#fff url(docs.gif) no-repeat 0px 0px;
84
- padding-left:18px;
85
- }
86
- #loading-mask{
87
- position:absolute;
88
- left:0;
89
- top:0;
90
- width:100%;
91
- height:100%;
92
- z-index:20000;
93
- background-color:white;
94
- }
95
- #loading{
96
- position:absolute;
97
- left:45%;
98
- top:40%;
99
- padding:2px;
100
- z-index:20001;
101
- height:auto;
102
- }
103
- #loading img {
104
- margin-bottom:5px;
105
- }
106
- #loading .loading-indicator{
107
- background:white;
108
- color:#555;
109
- font:bold 13px helvetica,arial,tahoma,sans-serif;
110
- padding:10px;
111
- margin:0;
112
- text-align:center;
113
- height:auto;
114
- }
115
- #api-tree a span {
116
- font-family:helvetica,arial,verdana,tahoma,sans-serif;
117
- font-size:11px;
118
- }
119
- #api-tree .cls a:hover span {
120
- text-decoration:underline;
121
- }
122
- #api-tree .x-panel-body {
123
- background-color:white;
124
- position:relative;
125
- padding:3px;
126
- }
127
- #api-tree .cls{
128
- border:1px solid #fff;
129
- }
130
-
131
- #api-tree .x-tree-selected {
132
- border:1px dotted #a3bae9;
133
- background:#DFE8F6;
134
- }
135
- #api-tree .x-tree-node .x-tree-selected a span{
136
- background:transparent;
137
- color:#1E4176;
138
- font-weight:bold;
139
- }
140
-
141
- a {
142
- color: #1E4176;
143
- }
144
- a:link {
145
- color: #1E4176;
146
- text-decoration: none;
147
- }
148
-
149
- a:visited {
150
- color: #555;
151
- text-decoration: none;
152
- }
153
-
154
- a:hover {
155
- text-decoration: underline;
156
- color: #15428b;
157
- }
158
-
159
- #welcome {
160
- position:relative;
161
- top:0;
162
- left: 0;
163
- zoom:1;
164
- }
165
- .col{
166
- margin:0 250px 0 10px;
167
- zoom:1;
168
- padding: 10px 0;
169
- }
170
-
171
- .col-last {
172
- width: 220px;
173
- position:absolute;
174
- right:10px;
175
- top:10px;
176
- }
177
-
178
- .block{
179
- margin-bottom:10px;
180
- }
181
- .block-title{
182
- color: #1E4176;
183
- font:normal 18px helvetica,arial,tahoma,verdana,sans-serif;
184
- letter-spacing:-1px;
185
- padding: 4px;
186
- padding-left: 8px;
187
- }
188
- .block-body{
189
- padding:8px;
190
- padding-top:2px;
191
- }
192
- .block-body b{
193
- color:#333333;
194
- font-size:11px;
195
- }
196
- .block-body em {
197
- display:block;
198
- margin-top:5px;
199
- font-size:11px;
200
- color:gray;
201
- text-align:right;
202
- }
203
- .list{
204
- list-style: square;
205
- padding-left:20px;
206
- margin-top:5px;
207
- }
208
-
209
- .res-block {
210
- padding-top:5px;
211
- background:transparent url(block-top.gif) no-repeat;
212
- width:210px;
213
- margin-bottom:15px;
214
- }
215
- .res-block-inner {
216
- padding:6px 11px;
217
- background:transparent url(block-bottom.gif) no-repeat left bottom;
218
- }
219
-
220
- .res-block h3 {
221
- /* font: bold 12px tahoma,arial,sans-serif; */
222
- color:#555;
223
- margin-bottom:8px;
224
- }
225
-
226
- .res-block ul {
227
- list-style-type: disc;
228
- margin-left:15px;
229
- /* font: normal 12px tahoma,arial,sans-serif; */
230
- color:#555;
231
- }
232
-
233
- .res-block ul li {
234
- margin:0 0 5px 3px;
235
- }
236
-
237
- .hide-inherited .inherited {
238
- display:none;
239
- }
240
-
241
- #doc-body .x-tab-panel-body {
242
- background:#fff url(images/default/form/text-bg.gif) repeat-x 0 0;
243
- }
244
- #doc-body .x-panel-body, #doc-body .body-wrap {
245
- background:transparent !important;
246
- }
247
- .icon-cls {
248
- background-image: url(class.gif) !important;
249
- }
250
- .icon-event {
251
- background-image: url(event.gif) !important;
252
- }
253
- .icon-cfg,
254
- .icon-config {
255
- background-image: url(config.gif) !important;
256
- }
257
- .icon-prop,
258
- .icon-property {
259
- background-image: url(prop.gif) !important;
260
- }
261
- .icon-method {
262
- background-image: url(method.gif) !important;
263
- }
264
- .icon-cmp {
265
- background-image: url(cmp.gif) !important;
266
- }
267
- .icon-pkg {
268
- background-image: url(pkg.gif) !important;
269
- }
270
- .icon-fav {
271
- background-image: url(fav.gif) !important;
272
- }
273
- .icon-static {
274
- background-image: url(static.gif) !important;
275
- }
276
- .icon-docs {
277
- background-image: url(docs.gif) !important;
278
- }
279
- .icon-expand-all {
280
- background-image: url(expand-all.gif) !important;
281
- }
282
- .icon-collapse-all {
283
- background-image: url(collapse-all.gif) !important;
284
- }
285
- .icon-expand-members {
286
- background-image: url(expand-members.gif) !important;
287
- }
288
- .icon-hide-inherited {
289
- background-image: url(hide-inherited.gif) !important;
290
- }
291
-
292
- #legend li {
293
- line-height:16px;
294
- }
295
- .item-icon {
296
- vertical-align:top;
297
- width:16px;
298
- height:16px;
299
- margin-right:6px;
300
- }
301
- .ext-ie .item-icon {
302
- vertical-align:middle;
303
- }
304
- h3.home-title {
305
- margin:5px 0;
306
- font:bold 13px helvetica,arial,tahoma,sans-serif;
307
- color:#444;
308
- }
309
-
310
- .search-item {
311
- margin:5px 5px 9px;
312
- padding:0 5px 10px 0;
313
- }
314
-
315
- .search-item .member {
316
- font:bold 12px helvetica,arial,tahoma,sans-serif;
317
- color:#444;
318
- margin:5px;
319
- overflow:hidden;
320
- white-space:nowrap;
321
- zoom:1;
322
- }
323
-
324
- .search-item .cls {
325
- font:normal 12px helvetica,arial,tahoma,sans-serif;
326
- color:#444;
327
- margin:5px;
328
- overflow:hidden;
329
- text-align:left;
330
- white-space:nowrap;
331
- zoom:1;
332
- }
333
- .search-item p {
334
- font:normal 11px helvetica,arial,tahoma,sans-serif;
335
- clear:both;
336
- margin: 0 5px 5px 28px;
337
- color:#444;
338
- zoom:1;
339
- }
340
- #search .loading-indicator {
341
- position:static !important;
342
- }
343
- #search h3 {
344
- font:normal 12px helvetica,arial,tahoma,sans-serif;
345
- color:#444;
346
- margin:10px;
347
- }
348
- .inner-link .item-icon, .bookmark .item-icon{
349
- margin-right:3px;
350
- }
351
- .inner-link, .bookmark {
352
- margin-left:10px;
353
- }
354
-
355
- .x-viewport body {
356
- background: #ededed url(hd-bg.png) repeat-x !important;
357
- }
358
-
359
- .x-border-layout-ct {
360
- background:none;
361
- }
Binary file
@@ -1,769 +0,0 @@
1
- Ext.BLANK_IMAGE_URL = 'resources/s.gif';
2
-
3
- Docs = {};
4
-
5
- ApiPanel = function() {
6
- ApiPanel.superclass.constructor.call(this, {
7
- id:'api-tree',
8
- region:'west',
9
- split:true,
10
- header: false,
11
- width: 280,
12
- minSize: 175,
13
- maxSize: 500,
14
- collapsible: true,
15
- margins:'0 0 5 5',
16
- cmargins:'0 0 0 0',
17
- rootVisible:false,
18
- lines:false,
19
- autoScroll:true,
20
- animCollapse:false,
21
- animate: false,
22
- collapseMode:'mini',
23
- loader: new Ext.tree.TreeLoader({
24
- preloadChildren: true,
25
- clearOnLoad: false
26
- }),
27
- root: new Ext.tree.AsyncTreeNode({
28
- text:'Ext JS',
29
- id:'root',
30
- expanded:true,
31
- children:[Docs.classData]
32
- }),
33
- collapseFirst:false
34
- });
35
- // no longer needed!
36
- //new Ext.tree.TreeSorter(this, {folderSort:true,leafAttr:'isClass'});
37
-
38
- this.getSelectionModel().on('beforeselect', function(sm, node){
39
- return node.isLeaf();
40
- });
41
- };
42
-
43
- Ext.extend(ApiPanel, Ext.tree.TreePanel, {
44
- initComponent: function(){
45
- this.hiddenPkgs = [];
46
- Ext.apply(this, {
47
- tbar:[ ' ',
48
- new Ext.form.TextField({
49
- width: 200,
50
- emptyText:'Find a Class',
51
- enableKeyEvents: true,
52
- listeners:{
53
- render: function(f){
54
- this.filter = new Ext.tree.TreeFilter(this, {
55
- clearBlank: true,
56
- autoClear: true
57
- });
58
- },
59
- keydown: {
60
- fn: this.filterTree,
61
- buffer: 350,
62
- scope: this
63
- },
64
- scope: this
65
- }
66
- }), ' ', ' ',
67
- {
68
- iconCls: 'icon-expand-all',
69
- tooltip: 'Expand All',
70
- handler: function(){ this.root.expand(true); },
71
- scope: this
72
- }, '-', {
73
- iconCls: 'icon-collapse-all',
74
- tooltip: 'Collapse All',
75
- handler: function(){ this.root.collapse(true); },
76
- scope: this
77
- }]
78
- });
79
- ApiPanel.superclass.initComponent.call(this);
80
- },
81
- filterTree: function(t, e){
82
- var text = t.getValue();
83
- Ext.each(this.hiddenPkgs, function(n){
84
- n.ui.show();
85
- });
86
- if(!text){
87
- this.filter.clear();
88
- return;
89
- }
90
- this.expandAll();
91
-
92
- var re = new RegExp('^' + Ext.escapeRe(text), 'i');
93
- this.filter.filterBy(function(n){
94
- return !n.attributes.isClass || re.test(n.text);
95
- });
96
-
97
- // hide empty packages that weren't filtered
98
- this.hiddenPkgs = [];
99
- var me = this;
100
- this.root.cascade(function(n){
101
- if(!n.attributes.isClass && n.ui.ctNode.offsetHeight < 3){
102
- n.ui.hide();
103
- me.hiddenPkgs.push(n);
104
- }
105
- });
106
- },
107
- selectClass : function(cls){
108
- if(cls){
109
- var parts = cls.split('.');
110
- var last = parts.length-1;
111
- var res = [];
112
- var pkg = [];
113
- for(var i = 0; i < last; i++){ // things get nasty - static classes can have .
114
- var p = parts[i];
115
- var fc = p.charAt(0);
116
- var staticCls = fc.toUpperCase() == fc;
117
- if(p == 'Ext' || !staticCls){
118
- pkg.push(p);
119
- res[i] = 'pkg-'+pkg.join('.');
120
- }else if(staticCls){
121
- --last;
122
- res.splice(i, 1);
123
- }
124
- }
125
- res[last] = cls;
126
-
127
- this.selectPath('/root/apidocs/'+res.join('/'));
128
- }
129
- }
130
- });
131
-
132
-
133
- DocPanel = Ext.extend(Ext.Panel, {
134
- closable: true,
135
- autoScroll:true,
136
-
137
- initComponent : function(){
138
- var ps = this.cclass.split('.');
139
- this.title = ps[ps.length-1];
140
- Ext.apply(this,{
141
- tbar: ['->',{
142
- text: 'Config Options',
143
- handler: this.scrollToMember.createDelegate(this, ['configs']),
144
- iconCls: 'icon-config'
145
- },'-',{
146
- text: 'Properties',
147
- handler: this.scrollToMember.createDelegate(this, ['props']),
148
- iconCls: 'icon-prop'
149
- }, '-',{
150
- text: 'Methods',
151
- handler: this.scrollToMember.createDelegate(this, ['methods']),
152
- iconCls: 'icon-method'
153
- }, '-',{
154
- text: 'Events',
155
- handler: this.scrollToMember.createDelegate(this, ['events']),
156
- iconCls: 'icon-event'
157
- }, '-',{
158
- text: 'Direct Link',
159
- handler: this.directLink,
160
- scope: this,
161
- iconCls: 'icon-fav'
162
- }, '-',{
163
- tooltip:'Hide Inherited Members',
164
- iconCls: 'icon-hide-inherited',
165
- enableToggle: true,
166
- scope: this,
167
- toggleHandler : function(b, pressed){
168
- this.body[pressed ? 'addClass' : 'removeClass']('hide-inherited');
169
- }
170
- }, '-', {
171
- tooltip:'Expand All Members',
172
- iconCls: 'icon-expand-members',
173
- enableToggle: true,
174
- scope: this,
175
- toggleHandler : function(b, pressed){
176
- this.body[pressed ? 'addClass' : 'removeClass']('full-details');
177
- }
178
- }]
179
- });
180
- DocPanel.superclass.initComponent.call(this);
181
- },
182
-
183
- directLink : function(){
184
- var link = String.format(
185
- "<a href=\"{0}\" target=\"_blank\">{0}</a>",
186
- document.location.href+'?class='+this.cclass
187
- );
188
- Ext.Msg.alert('Direct Link to ' + this.cclass,link);
189
- },
190
-
191
- scrollToMember : function(member){
192
- var el = Ext.fly(this.cclass + '-' + member);
193
- if(el){
194
- var top = (el.getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop;
195
- this.body.scrollTo('top', top-25, {duration:0.75, callback: this.hlMember.createDelegate(this, [member])});
196
- }
197
- },
198
-
199
- scrollToSection : function(id){
200
- var el = Ext.getDom(id);
201
- if(el){
202
- var top = (Ext.fly(el).getOffsetsTo(this.body)[1]) + this.body.dom.scrollTop;
203
- this.body.scrollTo('top', top-25, {duration:0.5, callback: function(){
204
- Ext.fly(el).next('h2').pause(0.2).highlight('#8DB2E3', {attr:'color'});
205
- }});
206
- }
207
- },
208
-
209
- hlMember : function(member){
210
- var el = Ext.fly(this.cclass + '-' + member);
211
- if(el){
212
- var tr = el.up('tr');
213
- tr && tr.highlight('#cadaf9');
214
- }
215
- },
216
-
217
- // Marks all code examples with "prettyprint" class.
218
- // Then runs the prettify library on the whole document.
219
- prettyPrint : function(){
220
- Ext.select("pre > code", this.el).addClass("prettyprint lang-js");
221
- prettyPrint();
222
- }
223
- });
224
-
225
-
226
- MainPanel = function(){
227
-
228
- this.searchStore = new Ext.data.Store({
229
- sortInfo: {
230
- field: 'member',
231
- direction: 'ASC'
232
- },
233
- reader: new Ext.data.JsonReader({
234
- root: 'data',
235
- fields: ['cls', 'member', 'type', 'doc']
236
- })
237
- });
238
- this.searchStore.loadData(Docs.membersData);
239
- var records = this.searchStore.getRange();
240
- this.searchStore.removeAll();
241
-
242
-
243
- MainPanel.superclass.constructor.call(this, {
244
- id:'doc-body',
245
- region:'center',
246
- margins:'0 5 5 0',
247
- resizeTabs: true,
248
- minTabWidth: 135,
249
- tabWidth: 135,
250
- plugins: new Ext.ux.TabCloseMenu(),
251
- enableTabScroll: true,
252
- activeTab: 0,
253
-
254
- items: {
255
- id:'welcome-panel',
256
- title: 'API Home',
257
- autoLoad: {url: 'welcome.html', callback: this.initSearch, scope: this, delay: 100},
258
- iconCls:'icon-docs',
259
- autoScroll: true,
260
- tbar: [
261
- 'Search: ', ' ',
262
- new Ext.app.SearchField({
263
- width: 340,
264
- records: records,
265
- store: this.searchStore,
266
- paramName: 'q'
267
- })
268
- ]
269
- }
270
- });
271
- };
272
-
273
- Ext.extend(MainPanel, Ext.TabPanel, {
274
-
275
- initEvents : function(){
276
- MainPanel.superclass.initEvents.call(this);
277
- this.body.on('click', this.onClick, this);
278
- },
279
-
280
- onClick: function(e, target){
281
- if((target = e.getTarget('a:not(.exi)', 3))){
282
- e.stopEvent();
283
- if(/\bdocClass\b/.test(target.className)){
284
- var m = target.rel.split("#");
285
- this.loadClass(target.href, m[0], m[1]);
286
- }else if(target.className == 'inner-link'){
287
- this.getActiveTab().scrollToSection(target.href.split('#')[1]);
288
- }else{
289
- window.open(target.href);
290
- }
291
- }else if((target = e.getTarget('.micon', 2))){
292
- e.stopEvent();
293
- var tr = Ext.fly(target.parentNode);
294
- if(tr.hasClass('expandable')){
295
- tr.toggleClass('expanded');
296
- }
297
- }
298
- },
299
-
300
- loadClass : function(href, cls, member){
301
- var id = 'docs-' + cls;
302
- var tab = this.getComponent(id);
303
- if(tab){
304
- this.setActiveTab(tab);
305
- if(member){
306
- tab.scrollToMember(member);
307
- }
308
- }else{
309
- var autoLoad = {
310
- url: href,
311
- callback: function(){
312
- var tab = Ext.getCmp(id);
313
- tab.prettyPrint();
314
- member && tab.scrollToMember(member);
315
- }
316
- };
317
- var p = this.add(new DocPanel({
318
- id: id,
319
- cclass : cls,
320
- autoLoad: autoLoad,
321
- iconCls: Docs.icons[cls]
322
- }));
323
- this.setActiveTab(p);
324
- }
325
- },
326
-
327
- initSearch : function(){
328
- // Custom rendering Template for the View
329
- var resultTpl = new Ext.XTemplate(
330
- '<tpl for=".">',
331
- '<div class="search-item">',
332
- '<a class="member docClass" rel="{[this.rel(values)]}" href="output/{cls}.html">',
333
- '<img src="resources/images/default/s.gif" class="item-icon icon-{type}"/>{member}',
334
- '</a> ',
335
- '<a class="cls docClass" rel="{cls}" href="output/{cls}.html">{cls}</a>',
336
- '<p>{doc}</p>',
337
- '</div></tpl>',
338
- {
339
- // Different links to classes and members
340
- rel: function(values) {
341
- return (values.type === "cls") ? values.cls : values.cls+"#"+values.member;
342
- }
343
- }
344
- );
345
-
346
- var p = new Ext.DataView({
347
- applyTo: Ext.get('search') ? 'search' : Ext.getCmp('welcome-panel').body,
348
- tpl: resultTpl,
349
- deferEmptyText: false,
350
- loadingText:'Searching...',
351
- store: this.searchStore,
352
- itemSelector: 'div.search-item',
353
- emptyText: '<h3>Use the search field above to search the Ext API for classes, properties, config options, methods and events.</h3>'
354
- });
355
- }
356
- });
357
-
358
-
359
- Ext.onReady(function(){
360
-
361
- Ext.QuickTips.init();
362
-
363
- var api = new ApiPanel();
364
- var mainPanel = new MainPanel();
365
-
366
- api.on('click', function(node, e){
367
- if(node.isLeaf()){
368
- e.stopEvent();
369
- mainPanel.loadClass(node.attributes.href, node.id);
370
- }
371
- });
372
-
373
- mainPanel.on('tabchange', function(tp, tab){
374
- api.selectClass(tab.cclass);
375
- });
376
-
377
- var viewport = new Ext.Viewport({
378
- layout:'border',
379
- items:[ {
380
- cls: 'docs-header',
381
- height: 44,
382
- region:'north',
383
- xtype:'box',
384
- el:'header',
385
- border:false,
386
- margins: '0 0 5 0'
387
- }, api, mainPanel ]
388
- });
389
-
390
- api.expandPath('/root/apidocs');
391
-
392
- // allow for link in
393
- var page = window.location.href.split('?')[1];
394
- if(page){
395
- var ps = Ext.urlDecode(page);
396
- var cls = ps['class'];
397
- mainPanel.loadClass('output/' + cls + '.html', cls, ps.member);
398
- }
399
-
400
- viewport.doLayout();
401
-
402
- setTimeout(function(){
403
- Ext.get('loading').remove();
404
- Ext.get('loading-mask').fadeOut({remove:true});
405
- }, 250);
406
-
407
- });
408
-
409
-
410
- Ext.app.SearchField = Ext.extend(Ext.form.TwinTriggerField, {
411
- initComponent : function(){
412
- if(!this.store.baseParams){
413
- this.store.baseParams = {};
414
- }
415
- Ext.app.SearchField.superclass.initComponent.call(this);
416
- this.on('specialkey', function(f, e){
417
- if(e.getKey() == e.ENTER){
418
- this.onTrigger2Click();
419
- }
420
- }, this);
421
- },
422
-
423
- validationEvent:false,
424
- validateOnBlur:false,
425
- trigger1Class:'x-form-clear-trigger',
426
- trigger2Class:'x-form-search-trigger',
427
- hideTrigger1:true,
428
- width:180,
429
- hasSearch : false,
430
- paramName : 'query',
431
-
432
- onTrigger1Click : function(){
433
- if(this.hasSearch){
434
- this.store.removeAll();
435
- this.el.dom.value = '';
436
- this.triggers[0].hide();
437
- this.hasSearch = false;
438
- this.focus();
439
- }
440
- },
441
-
442
- onTrigger2Click : function(){
443
- var v = this.getRawValue();
444
- if(v.length < 1){
445
- this.onTrigger1Click();
446
- return;
447
- }
448
- if(v.length < 2){
449
- Ext.Msg.alert('Invalid Search', 'You must enter a minimum of 2 characters to search the API');
450
- return;
451
- }
452
-
453
- this.store.removeAll();
454
- this.store.add(this.search(v));
455
-
456
- this.hasSearch = true;
457
- this.triggers[0].show();
458
- this.focus();
459
- },
460
-
461
- search: function(text) {
462
- var results = [[], [], []];
463
- var safeText = Ext.escapeRe(text);
464
- var re0 = new RegExp("^" + safeText + "$", "i");
465
- var re1 = new RegExp("^" + safeText, "i");
466
- var re2 = new RegExp(safeText, "i");
467
- this.records.forEach(function(r) {
468
- var member = r.get("member");
469
- if (re0.test(member)) {
470
- results[0].push(r);
471
- }
472
- else if (re1.test(member)) {
473
- results[1].push(r);
474
- }
475
- else if (re2.test(member)) {
476
- results[2].push(r);
477
- }
478
- });
479
- // flatten results array
480
- var arr = [];
481
- results = arr.concat.apply(arr, results);
482
- // only pick first n results
483
- return results.slice(0, 50);
484
- }
485
- });
486
-
487
-
488
- /**
489
- * Makes a ComboBox more closely mimic an HTML SELECT. Supports clicking and dragging
490
- * through the list, with item selection occurring when the mouse button is released.
491
- * When used will automatically set {@link #editable} to false and call {@link Ext.Element#unselectable}
492
- * on inner elements. Re-enabling editable after calling this will NOT work.
493
- *
494
- * @author Corey Gilmore
495
- * http://extjs.com/forum/showthread.php?t=6392
496
- *
497
- * @history 2007-07-08 jvs
498
- * Slight mods for Ext 2.0
499
- */
500
- Ext.ux.SelectBox = function(config){
501
- this.searchResetDelay = 1000;
502
- config = config || {};
503
- config = Ext.apply(config || {}, {
504
- editable: false,
505
- forceSelection: true,
506
- rowHeight: false,
507
- lastSearchTerm: false,
508
- triggerAction: 'all',
509
- mode: 'local'
510
- });
511
-
512
- Ext.ux.SelectBox.superclass.constructor.apply(this, arguments);
513
-
514
- this.lastSelectedIndex = this.selectedIndex || 0;
515
- };
516
-
517
- Ext.extend(Ext.ux.SelectBox, Ext.form.ComboBox, {
518
- lazyInit: false,
519
- initEvents : function(){
520
- Ext.ux.SelectBox.superclass.initEvents.apply(this, arguments);
521
- // you need to use keypress to capture upper/lower case and shift+key, but it doesn't work in IE
522
- this.el.on('keydown', this.keySearch, this, true);
523
- this.cshTask = new Ext.util.DelayedTask(this.clearSearchHistory, this);
524
- },
525
-
526
- keySearch : function(e, target, options) {
527
- var raw = e.getKey();
528
- var key = String.fromCharCode(raw);
529
- var startIndex = 0;
530
-
531
- if( !this.store.getCount() ) {
532
- return;
533
- }
534
-
535
- switch(raw) {
536
- case Ext.EventObject.HOME:
537
- e.stopEvent();
538
- this.selectFirst();
539
- return;
540
-
541
- case Ext.EventObject.END:
542
- e.stopEvent();
543
- this.selectLast();
544
- return;
545
-
546
- case Ext.EventObject.PAGEDOWN:
547
- this.selectNextPage();
548
- e.stopEvent();
549
- return;
550
-
551
- case Ext.EventObject.PAGEUP:
552
- this.selectPrevPage();
553
- e.stopEvent();
554
- return;
555
- default:
556
- break;
557
- }
558
-
559
- // skip special keys other than the shift key
560
- if( (e.hasModifier() && !e.shiftKey) || e.isNavKeyPress() || e.isSpecialKey() ) {
561
- return;
562
- }
563
- if( this.lastSearchTerm == key ) {
564
- startIndex = this.lastSelectedIndex;
565
- }
566
- this.search(this.displayField, key, startIndex);
567
- this.cshTask.delay(this.searchResetDelay);
568
- },
569
-
570
- onRender : function(ct, position) {
571
- this.store.on('load', this.calcRowsPerPage, this);
572
- Ext.ux.SelectBox.superclass.onRender.apply(this, arguments);
573
- if( this.mode == 'local' ) {
574
- this.calcRowsPerPage();
575
- }
576
- },
577
-
578
- onSelect : function(record, index, skipCollapse){
579
- if(this.fireEvent('beforeselect', this, record, index) !== false){
580
- this.setValue(record.data[this.valueField || this.displayField]);
581
- if( !skipCollapse ) {
582
- this.collapse();
583
- }
584
- this.lastSelectedIndex = index + 1;
585
- this.fireEvent('select', this, record, index);
586
- }
587
- },
588
-
589
- render : function(ct) {
590
- Ext.ux.SelectBox.superclass.render.apply(this, arguments);
591
- if( Ext.isSafari ) {
592
- this.el.swallowEvent('mousedown', true);
593
- }
594
- this.el.unselectable();
595
- this.innerList.unselectable();
596
- this.trigger.unselectable();
597
- this.innerList.on('mouseup', function(e, target, options) {
598
- if( target.id && target.id == this.innerList.id ) {
599
- return;
600
- }
601
- this.onViewClick();
602
- }, this);
603
-
604
- this.innerList.on('mouseover', function(e, target, options) {
605
- if( target.id && target.id == this.innerList.id ) {
606
- return;
607
- }
608
- this.lastSelectedIndex = this.view.getSelectedIndexes()[0] + 1;
609
- this.cshTask.delay(this.searchResetDelay);
610
- }, this);
611
-
612
- this.trigger.un('click', this.onTriggerClick, this);
613
- this.trigger.on('mousedown', function(e, target, options) {
614
- e.preventDefault();
615
- this.onTriggerClick();
616
- }, this);
617
-
618
- this.on('collapse', function(e, target, options) {
619
- Ext.getDoc().un('mouseup', this.collapseIf, this);
620
- }, this, true);
621
-
622
- this.on('expand', function(e, target, options) {
623
- Ext.getDoc().on('mouseup', this.collapseIf, this);
624
- }, this, true);
625
- },
626
-
627
- clearSearchHistory : function() {
628
- this.lastSelectedIndex = 0;
629
- this.lastSearchTerm = false;
630
- },
631
-
632
- selectFirst : function() {
633
- this.focusAndSelect(this.store.data.first());
634
- },
635
-
636
- selectLast : function() {
637
- this.focusAndSelect(this.store.data.last());
638
- },
639
-
640
- selectPrevPage : function() {
641
- if( !this.rowHeight ) {
642
- return;
643
- }
644
- var index = Math.max(this.selectedIndex-this.rowsPerPage, 0);
645
- this.focusAndSelect(this.store.getAt(index));
646
- },
647
-
648
- selectNextPage : function() {
649
- if( !this.rowHeight ) {
650
- return;
651
- }
652
- var index = Math.min(this.selectedIndex+this.rowsPerPage, this.store.getCount() - 1);
653
- this.focusAndSelect(this.store.getAt(index));
654
- },
655
-
656
- search : function(field, value, startIndex) {
657
- field = field || this.displayField;
658
- this.lastSearchTerm = value;
659
- var index = this.store.find.apply(this.store, arguments);
660
- if( index !== -1 ) {
661
- this.focusAndSelect(index);
662
- }
663
- },
664
-
665
- focusAndSelect : function(record) {
666
- var index = typeof record === 'number' ? record : this.store.indexOf(record);
667
- this.select(index, this.isExpanded());
668
- this.onSelect(this.store.getAt(record), index, this.isExpanded());
669
- },
670
-
671
- calcRowsPerPage : function() {
672
- if( this.store.getCount() ) {
673
- this.rowHeight = Ext.fly(this.view.getNode(0)).getHeight();
674
- this.rowsPerPage = this.maxHeight / this.rowHeight;
675
- } else {
676
- this.rowHeight = false;
677
- }
678
- }
679
-
680
- });
681
-
682
- Ext.Ajax.on('requestcomplete', function(ajax, xhr, o){
683
- if(typeof urchinTracker == 'function' && o && o.url){
684
- urchinTracker(o.url);
685
- }
686
- });
687
-
688
- // Override Ext.lib.Dom.getXY
689
- //
690
- // For some reason el.getBoundingClientRect does not work correctly in Chrome 12.
691
- // As a hack-solution, don't use it in Chrome at all.
692
- (function() {
693
- var doc = document,
694
- isCSS1 = doc.compatMode == "CSS1Compat",
695
- MAX = Math.max,
696
- ROUND = Math.round,
697
- PARSEINT = parseInt;
698
- var fly = Ext.fly;
699
-
700
- Ext.lib.Dom.getXY = function(el) {
701
- var p,
702
- pe,
703
- b,
704
- bt,
705
- bl,
706
- dbd,
707
- x = 0,
708
- y = 0,
709
- scroll,
710
- hasAbsolute,
711
- bd = (doc.body || doc.documentElement),
712
- ret = [0,0];
713
-
714
- el = Ext.getDom(el);
715
-
716
- if(el != bd){
717
- // Don't use getBoundingClientRect in Chrome
718
- if (el.getBoundingClientRect && !Ext.isChrome) {
719
- b = el.getBoundingClientRect();
720
- scroll = fly(document).getScroll();
721
- ret = [ROUND(b.left + scroll.left), ROUND(b.top + scroll.top)];
722
- } else {
723
- p = el;
724
- hasAbsolute = fly(el).isStyle("position", "absolute");
725
-
726
- while (p) {
727
- pe = fly(p);
728
- x += p.offsetLeft;
729
- y += p.offsetTop;
730
-
731
- hasAbsolute = hasAbsolute || pe.isStyle("position", "absolute");
732
-
733
- if (Ext.isGecko) {
734
- y += bt = PARSEINT(pe.getStyle("borderTopWidth"), 10) || 0;
735
- x += bl = PARSEINT(pe.getStyle("borderLeftWidth"), 10) || 0;
736
-
737
- if (p != el && !pe.isStyle('overflow','visible')) {
738
- x += bl;
739
- y += bt;
740
- }
741
- }
742
- p = p.offsetParent;
743
- }
744
-
745
- if (Ext.isSafari && hasAbsolute) {
746
- x -= bd.offsetLeft;
747
- y -= bd.offsetTop;
748
- }
749
-
750
- if (Ext.isGecko && !hasAbsolute) {
751
- dbd = fly(bd);
752
- x += PARSEINT(dbd.getStyle("borderLeftWidth"), 10) || 0;
753
- y += PARSEINT(dbd.getStyle("borderTopWidth"), 10) || 0;
754
- }
755
-
756
- p = el.parentNode;
757
- while (p && p != bd) {
758
- if (!Ext.isOpera || (p.tagName != 'TR' && !fly(p).isStyle("display", "inline"))) {
759
- x -= p.scrollLeft;
760
- y -= p.scrollTop;
761
- }
762
- p = p.parentNode;
763
- }
764
- ret = [x,y];
765
- }
766
- }
767
- return ret;
768
- };
769
- })();