luca 0.9.89 → 0.9.91

Sign up to get free protection for your applications and to get access to all the features.
Files changed (186) hide show
  1. data/CHANGELOG +11 -1
  2. data/Gemfile +5 -2
  3. data/Gemfile.lock +84 -56
  4. data/Rakefile +10 -2
  5. data/app/assets/javascripts/luca/components/application.coffee +82 -89
  6. data/app/assets/javascripts/luca/components/collection_view.coffee +9 -5
  7. data/app/assets/javascripts/luca/components/controller.coffee +72 -11
  8. data/app/assets/javascripts/luca/components/fields/base.coffee +61 -8
  9. data/app/assets/javascripts/luca/components/fields/button_field.coffee +53 -7
  10. data/app/assets/javascripts/luca/components/fields/checkbox_array.coffee +12 -7
  11. data/app/assets/javascripts/luca/components/fields/text_field.coffee +1 -1
  12. data/app/assets/javascripts/luca/components/form_view.coffee +2 -2
  13. data/app/assets/javascripts/luca/components/grid_layout_view.coffee +0 -1
  14. data/app/assets/javascripts/luca/components/page.coffee +1 -0
  15. data/app/assets/javascripts/luca/components/table_view.coffee +2 -2
  16. data/app/assets/javascripts/luca/concerns/dom_helpers.coffee +2 -2
  17. data/app/assets/javascripts/luca/containers/card_view.coffee +84 -54
  18. data/app/assets/javascripts/luca/containers/container.coffee +126 -46
  19. data/app/assets/javascripts/luca/containers/modal_view.coffee +9 -9
  20. data/app/assets/javascripts/luca/containers/page_controller.coffee +25 -0
  21. data/app/assets/javascripts/luca/containers/panel_toolbar.coffee +1 -1
  22. data/app/assets/javascripts/luca/containers/viewport.coffee +2 -5
  23. data/app/assets/javascripts/luca/core/collection.coffee +18 -4
  24. data/app/assets/javascripts/luca/core/model.coffee +1 -1
  25. data/app/assets/javascripts/luca/core/panel.coffee +1 -1
  26. data/app/assets/javascripts/luca/core/view.coffee +26 -7
  27. data/app/assets/javascripts/luca/development/code_sync_manager.coffee +51 -4
  28. data/app/assets/javascripts/luca/development/console.coffee +1 -1
  29. data/app/assets/javascripts/luca/framework.coffee +1 -1
  30. data/app/assets/javascripts/luca/index.coffee +1 -0
  31. data/app/assets/javascripts/luca/util/luca.coffee +2 -1
  32. data/app/assets/stylesheets/luca/components/viewport.scss +0 -4
  33. data/bin/luca +14 -0
  34. data/docs/framework.json +1 -1
  35. data/docs/luca-framework-documentation.js +1 -0
  36. data/lib/luca/cli/generate.rb +37 -0
  37. data/lib/luca/cli/server.rb +20 -0
  38. data/lib/luca/cli/sync.rb +40 -0
  39. data/lib/luca/cli/watch.rb +16 -0
  40. data/lib/luca/cli.rb +68 -0
  41. data/lib/luca/collection/endpoint.rb +1 -0
  42. data/lib/luca/component_definition.rb +23 -5
  43. data/lib/luca/luca_application.rb +18 -7
  44. data/lib/luca/rails/version.rb +1 -1
  45. data/lib/luca/server.rb +7 -0
  46. data/lib/luca/stylesheet.rb +2 -3
  47. data/lib/luca/version.rb +3 -0
  48. data/lib/luca/watcher.rb +72 -0
  49. data/lib/luca.rb +8 -1
  50. data/luca.gemspec +14 -7
  51. data/site/.bundle/config +2 -0
  52. data/site/.gitignore +5 -0
  53. data/site/.rvmrc +1 -0
  54. data/site/CHANGELOG.md +41 -0
  55. data/site/DOCS.md +41 -0
  56. data/site/Gemfile +8 -0
  57. data/site/Gemfile.lock +134 -0
  58. data/site/LICENSE.md +19 -0
  59. data/site/config.rb +84 -0
  60. data/site/helpers/site_helpers.rb +20 -0
  61. data/site/html5bp-docs/README.md +38 -0
  62. data/site/html5bp-docs/contribute.md +104 -0
  63. data/site/html5bp-docs/crossdomain.md +21 -0
  64. data/site/html5bp-docs/css.md +135 -0
  65. data/site/html5bp-docs/extend.md +507 -0
  66. data/site/html5bp-docs/faq.md +77 -0
  67. data/site/html5bp-docs/htaccess.md +323 -0
  68. data/site/html5bp-docs/html.md +170 -0
  69. data/site/html5bp-docs/js.md +31 -0
  70. data/site/html5bp-docs/misc.md +25 -0
  71. data/site/html5bp-docs/usage.md +109 -0
  72. data/site/readme.md +47 -0
  73. data/site/source/.htaccess +540 -0
  74. data/site/source/404.html +157 -0
  75. data/site/source/app/assets/javascripts/dependencies.js.coffee +6 -0
  76. data/site/source/app/assets/javascripts/docs/application.coffee +64 -0
  77. data/site/source/app/assets/javascripts/docs/collections/docs_documentation.coffee +17 -0
  78. data/site/source/app/assets/javascripts/docs/collections/github_repositories.coffee +7 -0
  79. data/site/source/app/assets/javascripts/docs/collections/index.coffee +1 -0
  80. data/site/source/app/assets/javascripts/docs/collections/luca_documentation.coffee +17 -0
  81. data/site/source/app/assets/javascripts/docs/collections/public_gists.coffee +4 -0
  82. data/site/source/app/assets/javascripts/docs/config.coffee +5 -0
  83. data/site/source/app/assets/javascripts/docs/index.coffee +12 -0
  84. data/site/source/app/assets/javascripts/docs/lib/router.coffee +3 -0
  85. data/site/source/app/assets/javascripts/docs/lib/util.coffee +0 -0
  86. data/site/source/app/assets/javascripts/docs/models/component.coffee +99 -0
  87. data/site/source/app/assets/javascripts/docs/models/github_repository.coffee +3 -0
  88. data/site/source/app/assets/javascripts/docs/models/index.coffee +1 -0
  89. data/site/source/app/assets/javascripts/docs/templates/component_documentation.jst.ejs +55 -0
  90. data/site/source/app/assets/javascripts/docs/templates/examples_browser/overview.jst.ejs +4 -0
  91. data/site/source/app/assets/javascripts/docs/templates/examples_browser/selector.jst.ejs +11 -0
  92. data/site/source/app/assets/javascripts/docs/templates/github_repository.jst.ejs +4 -0
  93. data/site/source/app/assets/javascripts/docs/templates/layouts/main.jst.ejs +4 -0
  94. data/site/source/app/assets/javascripts/docs/templates/left_navigation.jst.ejs +5 -0
  95. data/site/source/app/assets/javascripts/docs/templates/pages/getting_started.jst.ejs +78 -0
  96. data/site/source/app/assets/javascripts/docs/templates/pages/home.jst.ejs +57 -0
  97. data/site/source/app/assets/javascripts/docs/views/components/code_editor/index.coffee +0 -0
  98. data/site/source/app/assets/javascripts/docs/views/components/code_editor.coffee +45 -0
  99. data/site/source/app/assets/javascripts/docs/views/components/component_documentation.coffee +72 -0
  100. data/site/source/app/assets/javascripts/docs/views/index.coffee +3 -0
  101. data/site/source/app/assets/javascripts/docs/views/pages/browse_source/details.coffee +37 -0
  102. data/site/source/app/assets/javascripts/docs/views/pages/browse_source/list.coffee +31 -0
  103. data/site/source/app/assets/javascripts/docs/views/pages/browse_source.coffee +46 -0
  104. data/site/source/app/assets/javascripts/docs/views/pages/component_editor.coffee +10 -0
  105. data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/docs.coffee +12 -0
  106. data/site/source/app/assets/javascripts/docs/views/pages/examples_browser/source.coffee +13 -0
  107. data/site/source/app/assets/javascripts/docs/views/pages/examples_browser.coffee +102 -0
  108. data/site/source/app/assets/javascripts/docs/views/pages/home.coffee +10 -0
  109. data/site/source/app/assets/javascripts/docs/views/views/api_browser/index.coffee +43 -0
  110. data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee +14 -0
  111. data/site/source/app/assets/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee +39 -0
  112. data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/basic_example.coffee +38 -0
  113. data/site/source/app/assets/javascripts/docs/views/views/form_view_examples/complex_layout.coffee +110 -0
  114. data/site/source/app/assets/javascripts/docs/views/views/top_navigation.coffee +6 -0
  115. data/site/source/app/assets/javascripts/docs-docs.js +1 -0
  116. data/site/source/app/assets/javascripts/luca-docs.js +1 -0
  117. data/site/source/app/assets/javascripts/luca-framework-documentation.js +1 -0
  118. data/site/source/app/assets/javascripts/site.js.coffee +4 -0
  119. data/site/source/app/assets/javascripts/vendor/codemirror.js +4786 -0
  120. data/site/source/app/assets/javascripts/vendor/coffeescript.js +346 -0
  121. data/site/source/app/assets/javascripts/vendor/css.js +465 -0
  122. data/site/source/app/assets/javascripts/vendor/htmlmixed.js +84 -0
  123. data/site/source/app/assets/javascripts/vendor/javascript.js +422 -0
  124. data/site/source/app/assets/javascripts/vendor/js-beautify.js +1353 -0
  125. data/site/source/app/assets/javascripts/vendor/modernizr-2.6.1.min.js +4 -0
  126. data/site/source/app/assets/javascripts/vendor/vim.js +2511 -0
  127. data/site/source/app/assets/stylesheets/docs/api-browser.css.scss +5 -0
  128. data/site/source/app/assets/stylesheets/docs/application.css.scss +35 -0
  129. data/site/source/app/assets/stylesheets/docs/browse-source.css.scss +5 -0
  130. data/site/source/app/assets/stylesheets/docs/scrollable-table.css.scss +5 -0
  131. data/site/source/app/assets/stylesheets/site.css.scss +2 -0
  132. data/site/source/app/assets/stylesheets/vendor/codemirror.css +240 -0
  133. data/site/source/app/assets/stylesheets/vendor/prettify-tomorrow-night-bright.css +160 -0
  134. data/site/source/app/assets/stylesheets/vendor/twilight.css +26 -0
  135. data/site/source/crossdomain.xml +15 -0
  136. data/site/source/documentation.html.haml +1 -0
  137. data/site/source/favicon_base.png +0 -0
  138. data/site/source/humans.txt +15 -0
  139. data/site/source/images/background.png +0 -0
  140. data/site/source/images/middleman.png +0 -0
  141. data/site/source/index.html.haml +1 -0
  142. data/site/source/layouts/layout.haml +55 -0
  143. data/site/source/readme.md +63 -0
  144. data/site/source/robots.txt +3 -0
  145. data/spec/javascripts/components/collection_view_spec.coffee +1 -1
  146. data/spec/javascripts/containers/card_view_spec.coffee +58 -5
  147. data/spec/javascripts/core/collection_spec.coffee +1 -1
  148. data/spec/javascripts/core/view_spec.coffee +2 -2
  149. data/vendor/assets/javascripts/backbone-min.js +37 -33
  150. data/vendor/assets/javascripts/backbone-query.min.js +1 -1
  151. data/vendor/assets/javascripts/jquery.js +5 -4
  152. data/vendor/assets/javascripts/luca-dependencies.min.js +8 -6
  153. data/vendor/assets/javascripts/luca-development.min.js +1 -1
  154. data/vendor/assets/javascripts/luca.full.min.js +12 -10
  155. data/vendor/assets/javascripts/luca.min.js +5 -5
  156. data/vendor/assets/javascripts/underscore-min.js +1 -5
  157. data/vendor/assets/javascripts/underscore-string.min.js +1 -1
  158. data/vendor/assets/stylesheets/luca-components.css +0 -2
  159. data/vendor/assets/stylesheets/luca-development.css +1 -1
  160. metadata +215 -39
  161. data/app/assets/javascripts/luca/components/page_controller.coffee +0 -3
  162. data/app/assets/javascripts/luca/core/collection_view.coffee +0 -150
  163. data/site/assets/bootstrap.min.js +0 -7
  164. data/site/assets/dependencies.js +0 -94
  165. data/site/assets/glyphicons-halflings-white.png +0 -0
  166. data/site/assets/glyphicons-halflings.png +0 -0
  167. data/site/assets/luca-ui-bootstrap.css +0 -1331
  168. data/site/assets/luca-ui-bootstrap.js +0 -9
  169. data/site/assets/luca-ui-development-tools.css +0 -234
  170. data/site/assets/luca-ui-development-tools.js +0 -18561
  171. data/site/assets/luca-ui-development-tools.min.js +0 -15
  172. data/site/assets/luca-ui-full.min.js +0 -8
  173. data/site/assets/luca-ui.min.js +0 -4
  174. data/site/assets/sandbox.css +0 -62
  175. data/site/assets/sandbox.js +0 -469
  176. data/site/docs/application.html +0 -41
  177. data/site/docs/caching.html +0 -43
  178. data/site/docs/collection.html +0 -75
  179. data/site/docs/collection_manager.html +0 -71
  180. data/site/docs/containers.html +0 -118
  181. data/site/docs/events.html +0 -153
  182. data/site/docs/view.html +0 -128
  183. data/site/img/glyphicons-halflings-white.png +0 -0
  184. data/site/img/glyphicons-halflings.png +0 -0
  185. data/site/index.html +0 -20
  186. data/site/source-map.js +0 -1
@@ -0,0 +1 @@
1
+ window.Docs = window.Docs || {}; window.Docs.documentation = [{"source":"./site/source/javascripts/docs/views/components/api_browser/index.coffee","defined_in_file":"./site/source/javascripts/docs/views/components/api_browser/index.coffee","type":"component_definition","starts_on_line":4,"class_name":"Docs.components.ApiBrowser","header_documentation":"<p>The <code>Docs.components.ApiBrowser</code> is an example of using\na <code>Luca.Container</code> with a <code>@componentEvents</code> configuration\nto broker communication between two child components.</p>\n","type_alias":"api_browser","css_class_identifier":"docs-api-browser","defines_methods":{"afterInitialize":{"defined_on_line":29,"documentation":"","arguments":[]},"runExample":{"defined_on_line":33,"documentation":"","arguments":[]},"loadUrl":{"defined_on_line":37,"documentation":"","arguments":[]}},"defines_properties":{"componentEvents":{"defined_on_line":8,"documentation":"","default":null},"type":{"defined_on_line":12,"documentation":"","default":"\"container\""},"rowFluid":{"defined_on_line":13,"documentation":"","default":"true"},"className":{"defined_on_line":14,"documentation":"","default":"\"url-selector\""},"components":{"defined_on_line":15,"documentation":"","default":"["},"tagName":{"defined_on_line":26,"documentation":"","default":"\"pre\""},"role":{"defined_on_line":28,"documentation":"","default":"\"output\""}},"source_file_contents":"# The `Docs.components.ApiBrowser` is an example of using\n# a `Luca.Container` with a `@componentEvents` configuration\n# to broker communication between two child components.\nview = Docs.register \"Docs.components.ApiBrowser\"\nview.extends \"Luca.Container\"\n\nview.configuration\n componentEvents:\n \"* button:click\" : \"loadUrl\"\n\nview.contains\n type: \"container\"\n rowFluid: true\n className: \"url-selector\"\n components:[\n type: \"text_field\"\n name: \"endpoint_url\"\n label: \"Enter a URL\"\n span: 9\n ,\n type: \"button_field\"\n input_value: \"Browse\"\n span: 3\n ]\n,\n tagName: \"pre\"\n className: \"prettyprint pre-scrollable\"\n role: \"output\"\n afterInitialize: ()->\n @$el.html(\"Loading...\")\n\nview.privateMethods\n runExample: ()->\n @findComponentByName(\"endpoint_url\", true).setValue(\"https://api.github.com/users/datapimp/gists\")\n @loadUrl()\n\n loadUrl: ()->\n url = @findComponentByName(\"endpoint_url\", true).getValue()\n $.get url, (parsed, state, options)=>\n @getOutput().$html( options.responseText )\n window.prettyPrint()\n\nview.register()"},{"source":"./site/source/javascripts/docs/views/components/component_documentation.coffee","defined_in_file":"./site/source/javascripts/docs/views/components/component_documentation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ComponentDocumentation","header_documentation":"","type_alias":"component_documentation","css_class_identifier":"docs-component-documentation","defines_methods":{"loadComponent":{"defined_on_line":22,"documentation":"<p>Loads a component definition from the documentation objects that\nare generated by the Luca gem&#39;s Luca::LucaApplication#export tool.\nThese objects are the result of parsing component definition files\nand determining the public and private properties and methods, and\nthe documentation that is rendered from their comments.</p>\n","arguments":[{"argument":"@component","value":null}]},"reset":{"defined_on_line":42,"documentation":"","arguments":[]},"renderMethodGroup":{"defined_on_line":47,"documentation":"","arguments":[{"argument":"group","value":"\"public\""}]},"renderPropertyGroup":{"defined_on_line":62,"documentation":"","arguments":[{"argument":"group","value":"\"public\""}]}},"defines_properties":{"bodyTemplate":{"defined_on_line":5,"documentation":"","default":"\"component_documentation\""},"displaySource":{"defined_on_line":10,"documentation":"<p>If set to true, we will render the source code\nfor the component in addition to all of the information\nabout the methods and properties</p>\n","default":"false"},"displayHeader":{"defined_on_line":14,"documentation":"<p>If set to true, we will render the header documentation\nthat is contained in the component</p>\n","default":"false"}},"source_file_contents":"view = Docs.register \"Docs.views.ComponentDocumentation\"\nview.extends \"Luca.View\"\n\nview.privateConfiguration\n bodyTemplate: \"component_documentation\"\n\n # If set to true, we will render the source code\n # for the component in addition to all of the information\n # about the methods and properties\n displaySource: false\n\n # If set to true, we will render the header documentation\n # that is contained in the component\n displayHeader: false\n\nview.publicMethods\n # Loads a component definition from the documentation objects that\n # are generated by the Luca gem's Luca::LucaApplication#export tool.\n # These objects are the result of parsing component definition files\n # and determining the public and private properties and methods, and \n # the documentation that is rendered from their comments.\n loadComponent: (@component)->\n @reset()\n\n for section in [\"private\", \"public\"]\n @renderMethodGroup(section) \n @renderPropertyGroup(section) \n\n @$('.source').hide()\n\n if @displayHeader is true\n @$('.header-documentation').show()\n @$('.header-documentation').html( @component.get(\"header_documentation\") )\n\n if @displaySource is true\n @$('.source').show()\n @$('pre.source').html( @component.contentsWithoutHeader() ) \n\n @$('pre').addClass('prettyprint')\n\nview.privateMethods\n reset: ()->\n @$('.table tbody').empty()\n @$('.properties,.methods').hide()\n @$('.header-documentation').hide()\n\n renderMethodGroup: (group=\"public\")->\n source = @component?.documentation()?.details[\"#{ group }Methods\"]\n return if _.isEmpty(source)\n prototype = Luca.util.resolve(@component.get(\"class_name\"))?.prototype \n list = @$(\".methods.#{ group }\").show().find('.table tbody')\n\n for method, details of source when _.isFunction(prototype[method])\n details ||= {}\n arg_details = _( details.arguments ).reduce (memo,pair)->\n memo += \"#{ pair.argument }\"\n memo += \"= #{ pair.value || 'undefined' }\" if pair.value?\n memo += \"<br/>\"\n , \"\"\n list.append \"<tr><td>#{ method }</td><td>#{ arg_details }</td><td>#{ details.documentation || \"\" }</td></tr>\"\n\n renderPropertyGroup: (group=\"public\")->\n source = @component?.documentation()?.details[\"#{ group }Properties\"]\n return if _.isEmpty(source)\n prototype = Luca.util.resolve(@component.get(\"class_name\"))?.prototype\n list = @$(\".properties.#{ group }\").show().find('.table tbody')\n\n for method, details of source when not _.isFunction(prototype[method])\n details ||= {}\n list.append \"<tr><td>#{ method }</td><td>#{ details.default || \"\" }</td><td>#{ details.documentation || \"\" }</td></tr>\"\n\nview.register()\n"},{"source":"./site/source/javascripts/docs/views/pages/browse_source/details.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/browse_source/details.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ComponentDetails","header_documentation":"","type_alias":"component_details","css_class_identifier":"docs-component-details","defines_methods":{"loadComponent":{"defined_on_line":10,"documentation":"","arguments":[{"argument":"model","value":null}]},"afterRender":{"defined_on_line":21,"documentation":"","arguments":[]},"load":{"defined_on_line":25,"documentation":"","arguments":[{"argument":"model","value":null}]},"prettyPrint":{"defined_on_line":35,"documentation":"<p>Applies syntax highlighting to all pre elements</p>\n","arguments":[]}},"defines_properties":{"rowFluid":{"defined_on_line":5,"documentation":"","default":"true"},"role":{"defined_on_line":8,"documentation":"","default":"\"documentation\""},"span":{"defined_on_line":9,"documentation":"","default":"5"},"type":{"defined_on_line":15,"documentation":"","default":"\"component_documentation\""},"displaySource":{"defined_on_line":17,"documentation":"","default":"true"}},"source_file_contents":"view = Docs.register \"Docs.views.ComponentDetails\"\nview.extends \"Luca.Container\"\n\nview.configuration\n rowFluid: true\n\nview.contains\n role: \"documentation\"\n span: 5\n loadComponent: (model)->\n @$el.empty()\n @$el.append(\"<h2>#{ model.get('class_name') }</h2>\")\n @$el.append(\"<div class='header-documentation'>#{ model.get('header_documentation') }</div>\")\n,\n type: \"component_documentation\"\n role: \"details\"\n displaySource: true\n span: 7\n\nview.defines\n afterRender: ()->\n @getDetails().$el.hide()\n @getDocumentation().$el.hide()\n\n load: (model)->\n @getDetails().$el.show()\n @getDocumentation().$el.show()\n\n @getDetails().loadComponent(model)\n @getDocumentation().loadComponent(model)\n\n @prettyPrint()\n\n # Applies syntax highlighting to all pre elements\n prettyPrint: ()-> \n @$('pre').addClass('prettyprint')\n window.prettyPrint?()\n"},{"source":"./site/source/javascripts/docs/views/pages/browse_source/list.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/browse_source/list.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ComponentList","header_documentation":"","type_alias":"component_list","css_class_identifier":"docs-component-list","defines_methods":{},"defines_properties":{"paginatable":{"defined_on_line":4,"documentation":"","default":"false"},"maxHeight":{"defined_on_line":5,"documentation":"","default":"200"},"collection":{"defined_on_line":6,"documentation":"","default":"\"luca_documentation\""},"columns":{"defined_on_line":7,"documentation":"","default":"["}},"source_file_contents":"view = Docs.register \"Docs.views.ComponentList\"\nview.extends \"Luca.components.ScrollableTable\"\nview.defines\n paginatable: false\n maxHeight: 200\n collection: \"luca_documentation\"\n columns:[\n reader: \"class_name\"\n width: \"20%\"\n renderer: (name)->\n \"<a class='link'>#{ name }</a>\"\n ,\n reader: \"class_name\"\n header: \"Extends From\"\n width: \"20%\"\n renderer: (className)->\n if component = Luca.util.resolve(className)\n name = component.prototype.componentMetaData()?.meta[\"super class name\"]\n \"<a class='link'>#{ name }</a>\"\n ,\n reader: \"type_alias\"\n header: \"Shortcut\"\n width: \"10%\"\n ,\n reader: \"defined_in_file\"\n header: \"<i class='icon icon-github'/> Github\"\n renderer: (file)->\n shortened = file.split(\"javascripts/luca/\")[1]\n \"<a href='https://github.com/datapimp/luca/blob/master/app/assets/javascripts/luca/#{ shortened }'>#{ shortened }</a>\"\n ]\n\n"},{"source":"./site/source/javascripts/docs/views/pages/browse_source.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/browse_source.coffee","type":"component_definition","starts_on_line":3,"class_name":"Docs.views.BrowseSource","header_documentation":"","type_alias":"browse_source","css_class_identifier":"docs-browse-source","defines_methods":{"index":{"defined_on_line":18,"documentation":"","arguments":[]},"show":{"defined_on_line":21,"documentation":"","arguments":[{"argument":"componentName","value":null}]},"selectComponent":{"defined_on_line":29,"documentation":"","arguments":[{"argument":"e","value":null}]}},"defines_properties":{"autoBindEventHandlers":{"defined_on_line":7,"documentation":"","default":"true"},"events":{"defined_on_line":8,"documentation":"","default":null},"component":{"defined_on_line":12,"documentation":"","default":"\"component_list\""}},"source_file_contents":"#= require_tree ./browse_source \n#= require_self\nview = Docs.register \"Docs.views.BrowseSource\"\nview.extends \"Luca.Container\"\n\nview.configuration\n autoBindEventHandlers: true\n events:\n \"click .docs-component-list a.link\" : \"selectComponent\"\n\nview.contains\n component: \"component_list\"\n,\n component: \"component_details\"\n\nview.privateMethods\n\n index: ()->\n @selectComponent(@getComponentList().getCollection().at(0))\n\n show: (componentName)-> \n component = @getComponentList().getCollection().detect (model)->\n model.get(\"class_name\") is componentName\n\n return @index() unless component?\n\n @selectComponent(component)\n \n selectComponent: (e)->\n list = @getComponentList()\n details = @getComponentDetails() \n\n if Luca.isBackboneModel(e) \n model = e\n index = list.getCollection().indexOf(model)\n row = list.$(\"tr[data-index='#{ index }']\")\n else\n $target = @$(e.target)\n row = $target.parents('tr').eq(0)\n index = row.data('index')\n model = list.getCollection().at(index) \n\n list.$('tr').removeClass('info')\n row.addClass('info')\n details.load(model)\n\n"},{"source":"./site/source/javascripts/docs/views/pages/component_editor.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/component_editor.coffee","type":"component_definition","starts_on_line":3,"class_name":"Docs.views.ComponentEditor","header_documentation":"","type_alias":"component_editor","css_class_identifier":"docs-component-editor","defines_methods":{},"defines_properties":{},"source_file_contents":"#= require_tree ./component_editor\n#= require_self\nview = Docs.register \"Docs.views.ComponentEditor\"\nview.extends \"Luca.Container\"\n\n"},{"source":"./site/source/javascripts/docs/views/pages/examples_browser/docs.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/examples_browser/docs.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ExampleDocs","header_documentation":"","type_alias":"example_docs","css_class_identifier":"docs-example-docs","defines_methods":{"beforeRender":{"defined_on_line":6,"documentation":"","arguments":[]}},"defines_properties":{"collection":{"defined_on_line":4,"documentation":"","default":"\"docs_documentation\""},"displayHeader":{"defined_on_line":5,"documentation":"","default":"true"}},"source_file_contents":"view = Docs.register \"Docs.views.ExampleDocs\"\nview.extends \"Docs.views.ComponentDocumentation\"\nview.defines\n collection: \"docs_documentation\"\n displayHeader: true\n beforeRender: ()->\n component = @collection.detect (component)=>\n component.get(\"type_alias\") is @example\n\n if component?\n @loadComponent(component)\n\n"},{"source":"./site/source/javascripts/docs/views/pages/examples_browser/source.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/examples_browser/source.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ExampleSource","header_documentation":"","type_alias":"example_source","css_class_identifier":"docs-example-source","defines_methods":{"beforeRender":{"defined_on_line":7,"documentation":"","arguments":[]}},"defines_properties":{"tagName":{"defined_on_line":4,"documentation":"","default":"\"pre\""},"className":{"defined_on_line":5,"documentation":"","default":"\"prettyprint pre-scrollable\""},"collection":{"defined_on_line":6,"documentation":"","default":"\"docs_documentation\""}},"source_file_contents":"view = Docs.register \"Docs.views.ExampleSource\"\nview.extends \"Luca.View\"\nview.defines\n tagName: \"pre\"\n className: \"prettyprint pre-scrollable\"\n collection: \"docs_documentation\"\n beforeRender: ()->\n component = @collection.detect (component)=>\n component.get(\"type_alias\") is @example\n\n @$el.html( component.get(\"source_file_contents\") )\n window.prettyPrint()\n\n"},{"source":"./site/source/javascripts/docs/views/pages/examples_browser.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/examples_browser.coffee","type":"component_definition","starts_on_line":4,"class_name":"Docs.views.ExamplesBrowser","header_documentation":"","type_alias":"examples_browser","css_class_identifier":"docs-examples-browser","defines_methods":{"wrapExampleComponents":{"defined_on_line":42,"documentation":"","arguments":[]},"afterInitialize":{"defined_on_line":76,"documentation":"","arguments":[]},"show":{"defined_on_line":80,"documentation":"","arguments":[{"argument":"exampleName","value":"0"},{"argument":"view","value":"\"component\""}]},"index":{"defined_on_line":86,"documentation":"","arguments":[]}},"defines_properties":{"title":{"defined_on_line":8,"documentation":"","default":"\"API Browser\""},"type":{"defined_on_line":9,"documentation":"","default":"\"api_browser\""},"name":{"defined_on_line":10,"documentation":"","default":"\"api_browser\""},"activeCard":{"defined_on_line":29,"documentation":"","default":"0"},"tab_position":{"defined_on_line":30,"documentation":"","default":"\"left\""},"defaults":{"defined_on_line":31,"documentation":"","default":null},"afterSelect":{"defined_on_line":37,"documentation":"<p>Hack</p>\n","default":"_.debounce ()->"}},"source_file_contents":"#= require_tree ./examples_browser\n#= require_self\n\npage = Docs.register \"Docs.views.ExamplesBrowser\"\npage.extends \"Luca.containers.TabView\"\n\npage.contains\n title: \"API Browser\"\n type: \"api_browser\"\n name: \"api_browser\"\n,\n title: \"Basic FormView\"\n type: \"basic_form_view\"\n name: \"basic_form_view\"\n,\n title: \"Complex Layout FormView\"\n type: \"complex_layout_form\"\n name: \"complex_layout_form\"\n,\n title: \"Scrollable Table\"\n type: \"table_view_example\"\n name: \"table_view_example\"\n,\n title: \"Grid Layout CollectionView\"\n type: \"grid_layout_view_example\"\n name: \"grid_layout_view_example\"\n\npage.privateConfiguration\n activeCard: 0\n tab_position: \"left\"\n defaults:\n activation: ()->\n Docs().router.navigate(\"#examples/#{ @name }/source\", false)\n\npage.privateMethods\n # Hack\n afterSelect: _.debounce ()->\n if active = @activeComponent()\n active.findComponentByName?(\"component\")?.runExample?()\n , 10\n\n wrapExampleComponents: ()->\n wrapped = []\n\n wrapped = _(@components).map (component,index)->\n title: component.title\n name: component.name\n components:[\n type: \"card\"\n role: \"view_selector\"\n afterInitialize: ()->\n @$el.append(\"<h3>#{ component.title } Example</h3>\")\n components:[\n type: component.type\n name: \"component\"\n activation: ()->\n @runExample?()\n ,\n type: \"example_source\"\n example: component.name\n name: \"source\"\n ,\n type: \"example_docs\"\n example: component.name\n name: \"documentation\"\n ] \n ,\n bodyTemplate: \"examples_browser/selector\"\n bodyTemplateVars: ()->\n example_name: component.name\n ]\n\n @components = wrapped\n @components.unshift title: \"Overview\", bodyTemplate: \"examples_browser/overview\"\n\n afterInitialize: ()->\n @wrapExampleComponents()\n\npage.publicMethods\n show: (exampleName=0, view=\"component\")->\n @activate exampleName, false, ()->\n @getViewSelector().activate(view)\n @$(\"li\").removeClass(\"active\")\n @$(\"li.#{view}\").addClass(\"active\")\n\n index: ()->\n @show()\n\npage.register()"},{"source":"./site/source/javascripts/docs/views/pages/home.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/home.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.Home","header_documentation":"","type_alias":"home","css_class_identifier":"docs-home","defines_methods":{"index":{"defined_on_line":7,"documentation":"","arguments":[]}},"defines_properties":{"template":{"defined_on_line":4,"documentation":"","default":"\"pages/home\""}},"source_file_contents":"page = Docs.register \"Docs.views.Home\"\npage.extends \"Luca.components.Page\"\npage.configuration\n template: \"pages/home\"\n\npage.defines\n index: ()->\n @trigger \"index\"\n\npage.register()"},{"source":"./site/source/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.GridLayoutViewExample","header_documentation":"","type_alias":"grid_layout_view_example","css_class_identifier":"docs-grid-layout-view-example","defines_methods":{"runExample":{"defined_on_line":11,"documentation":"","arguments":[]}},"defines_properties":{"collection":{"defined_on_line":5,"documentation":"","default":"\"github_repositories\""},"itemPerRow":{"defined_on_line":6,"documentation":"","default":"4"},"paginatable":{"defined_on_line":7,"documentation":"","default":"12"},"itemTemplate":{"defined_on_line":8,"documentation":"","default":"\"github_repository\""}},"source_file_contents":"view = Docs.register \"Docs.views.GridLayoutViewExample\"\nview.extends \"Luca.components.GridLayoutView\"\n\nview.publicConfiguration\n collection: \"github_repositories\"\n itemPerRow: 4\n paginatable: 12\n itemTemplate: \"github_repository\"\n\nview.publicMethods\n runExample: ()->\n @getCollection().fetch()\n\nview.register()\n"},{"source":"./site/source/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.TableViewExample","header_documentation":"","type_alias":"table_view_example","css_class_identifier":"docs-table-view-example","defines_methods":{"runExample":{"defined_on_line":36,"documentation":"","arguments":[]}},"defines_properties":{"paginatable":{"defined_on_line":7,"documentation":"<p>Only render 100 models at a time. The <code>Luca.CollectionView</code> has\nautomatic pagination control rendering, if you specify a pagination\nview class and render area.</p>\n","default":"100"},"maxHeight":{"defined_on_line":10,"documentation":"<p>The scrollable table element has a max height.</p>\n","default":"300"},"collection":{"defined_on_line":15,"documentation":"<p>The string &quot;github_repositories&quot; is an alias for the collection manager\nwhich is created by the <code>Docs.Application</code>. It represents a singular\nglobal instance of the <code>Docs.collections.GithubRepositories</code> collection.</p>\n","default":"\"github_repositories\""},"columns":{"defined_on_line":23,"documentation":"<p>The <code>Luca.components.TableView</code> component accepts an array of column\nconfigurations. Each column can specify the following properties:\n- header\n- reader ( a method, or attribute on the collection&#39;s model )\n- renderer ( a custom function which renders the model / reader )\n- width ( a percentage width for the column )</p>\n","default":"["}},"source_file_contents":"view = Docs.register \"Docs.views.TableViewExample\"\nview.extends \"Luca.components.ScrollableTable\"\nview.publicConfiguration\n # Only render 100 models at a time. The `Luca.CollectionView` has\n # automatic pagination control rendering, if you specify a pagination\n # view class and render area. \n paginatable: 100\n \n # The scrollable table element has a max height. \n maxHeight: 300\n\n # The string \"github_repositories\" is an alias for the collection manager\n # which is created by the `Docs.Application`. It represents a singular\n # global instance of the `Docs.collections.GithubRepositories` collection. \n collection: \"github_repositories\"\n\n # The `Luca.components.TableView` component accepts an array of column\n # configurations. Each column can specify the following properties:\n # - header\n # - reader ( a method, or attribute on the collection's model )\n # - renderer ( a custom function which renders the model / reader )\n # - width ( a percentage width for the column )\n columns:[\n reader: \"name\"\n renderer: (name, model)->\n \"<a href=#{ model.get('html_url') }>#{ name }</a>\"\n , \n reader: \"description\"\n ,\n reader: \"language\"\n ,\n reader: \"watchers\"\n ]\n\nview.publicMethods\n runExample: ()->\n @getCollection().fetch()\n\nview.register()"},{"source":"./site/source/javascripts/docs/views/views/form_view_examples/basic_example.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/form_view_examples/basic_example.coffee","type":"component_definition","starts_on_line":6,"class_name":"Docs.views.BasicFormView","header_documentation":"<p>The <code>Docs.views.BasicFormView</code> is an example of the <code>Luca.components.FormView</code>.\nIn this basic example, the form contains a range of different fields. They are\nrendered one on top of another. You can get more advanced and nest containers within\nyour form, or use a <code>@bodyTemplate</code> and specify your own DOM structure, and assign\ncomponents to custom CSS selectors within it.</p>\n","type_alias":"basic_form_view","css_class_identifier":"docs-basic-form-view","defines_methods":{},"defines_properties":{"defaults":{"defined_on_line":12,"documentation":"<p>Any values you specify in the <code>@defaults</code> property will be\nset on each of the components in this container.</p>\n","default":null},"components":{"defined_on_line":19,"documentation":"<p>You can manually define a <code>@components</code> property, or in your component\ndefinition you can use the special <code>contains</code> directive, the only difference\nis your personal preference for readability. I did it this way</p>\n","default":"["}},"source_file_contents":"# The `Docs.views.BasicFormView` is an example of the `Luca.components.FormView`.\n# In this basic example, the form contains a range of different fields. They are\n# rendered one on top of another. You can get more advanced and nest containers within\n# your form, or use a `@bodyTemplate` and specify your own DOM structure, and assign\n# components to custom CSS selectors within it.\nform = Docs.register \"Docs.views.BasicFormView\"\nform.extends \"Luca.components.FormView\"\n\nform.privateConfiguration\n # Any values you specify in the `@defaults` property will be\n # set on each of the components in this container.\n defaults:\n type: \"text\"\n\nform.publicConfiguration\n # You can manually define a `@components` property, or in your component\n # definition you can use the special `contains` directive, the only difference\n # is your personal preference for readability. I did it this way \n components:[\n label: \"Text Field One\"\n ,\n type: \"select\"\n label: \"Select Field One\"\n collection:\n data:[\n ['Alpha','Alpha']\n ['Bravo','Bravo']\n ['Charlie','Charlie']\n ['Delta','Delta']\n ]\n ,\n type: \"checkbox_field\"\n label: \"Checkbox Field\"\n\n ]\n\nform.register() \n\n"},{"source":"./site/source/javascripts/docs/views/views/form_view_examples/complex_layout.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/form_view_examples/complex_layout.coffee","type":"component_definition","starts_on_line":9,"class_name":"Docs.views.ComplexLayoutForm","header_documentation":"<p>The <code>Docs.views.ComplexLayoutForm</code> is an example of a <code>Luca.components.FormView</code> which contains\na nested container, and which uses the bootstrap grid helper properties <code>@rowFluid</code> and <code>@span</code> \nto arrange the nested components inside of a grid layout.\nIn addition to laying out the form components visually, there is a nested <code>Luca.containers.CardView</code>\ncomponent which shows / hides various field sets depending on what options you select on the form.\nThis is an example of how Luca framework components can be assembled together arbitrarily to build\nwhatever type of user interface you can imagine.</p>\n","type_alias":"complex_layout_form","css_class_identifier":"docs-complex-layout-form","defines_methods":{"selectGroup":{"defined_on_line":30,"documentation":"<p>The selectGroup method is bound to the componentEvent listener. Whenever\nthe group_selector field changes its value, we want to change which field\ngroup is visible on the form.</p>\n","arguments":[]}},"defines_properties":{"rowFluid":{"defined_on_line":17,"documentation":"<p>By setting <code>@rowFluid</code> to true, this container\nwill support the twitter bootstrap grid layout. Applying\nthe <code>@span</code> property to the direct children of this component\nwill control their width</p>\n","default":"true"},"componentEvents":{"defined_on_line":23,"documentation":"<p>Here is an example of using the <code>@componentEvents</code> property to listen\nto the change event on the select field identified by the role &#39;group_selector&#39;.\nonce that field emits its change event, we change the active display card in the\nnested card selector.</p>\n","default":null},"type":{"defined_on_line":36,"documentation":"","default":"\"container\""},"span":{"defined_on_line":37,"documentation":"","default":"6"},"components":{"defined_on_line":38,"documentation":"","default":"["}},"source_file_contents":"# The `Docs.views.ComplexLayoutForm` is an example of a `Luca.components.FormView` which contains\n# a nested container, and which uses the bootstrap grid helper properties `@rowFluid` and `@span` \n# to arrange the nested components inside of a grid layout.\n#\n# In addition to laying out the form components visually, there is a nested `Luca.containers.CardView`\n# component which shows / hides various field sets depending on what options you select on the form.\n# This is an example of how Luca framework components can be assembled together arbitrarily to build\n# whatever type of user interface you can imagine.\nform = Docs.register \"Docs.views.ComplexLayoutForm\"\nform.extends \"Luca.components.FormView\"\n\nform.privateConfiguration\n # By setting `@rowFluid` to true, this container\n # will support the twitter bootstrap grid layout. Applying\n # the `@span` property to the direct children of this component\n # will control their width \n rowFluid: true\n\n # Here is an example of using the `@componentEvents` property to listen\n # to the change event on the select field identified by the role 'group_selector'.\n # once that field emits its change event, we change the active display card in the\n # nested card selector.\n componentEvents:\n \"group_selector on:change\" : \"selectGroup\"\n\nform.privateMethods\n # The selectGroup method is bound to the componentEvent listener. Whenever\n # the group_selector field changes its value, we want to change which field\n # group is visible on the form.\n selectGroup: ()->\n desiredGroup = @getGroupSelector().getValue()\n selector = @getGroupDisplaySelector()\n selector.activate(desiredGroup) \n\nform.contains\n type: \"container\"\n span: 6\n components:[\n type: \"text\"\n label: \"Field One\"\n ,\n type: \"text\"\n label: \"Field Two\"\n ,\n type: \"text\"\n label: \"Field Three\"\n ]\n,\n type: \"container\"\n span: 6\n components:[\n label: \"Select a Group\"\n type: \"select\"\n role: \"group_selector\"\n includeBlank: false\n valueType: \"string\"\n collection:\n data:[\n [\"alpha\",\"Alpha Group\"]\n [\"bravo\", \"Bravo Group\"]\n [\"charlie\",\"Charlie Group\"]\n ]\n ,\n type: \"card\"\n role: \"group_display_selector\"\n components:[\n name: \"alpha\"\n defaults:\n type: \"text\"\n components:[\n type: \"view\"\n tagName: \"h4\"\n bodyTemplate: ()-> \"Group One\"\n , \n label: \"Alpha\"\n ,\n label: \"Bravo\"\n ,\n label: \"Charlie\"\n ]\n ,\n name: \"bravo\"\n defaults:\n type: \"checkbox_field\"\n components:[\n type: \"view\"\n tagName: \"h4\"\n bodyTemplate: ()-> \"Group Two\"\n ,\n label: \"One\"\n ,\n label: \"Two\"\n ]\n ,\n name: \"charlie\"\n defaults:\n type: \"button_field\" \n components:[\n type: \"view\"\n tagName: \"h4\"\n bodyTemplate: ()-> \"Group Three\"\n ,\n input_value: \"Button One\"\n icon_class: \"chevron-up\"\n ,\n input_value: \"Button Two\"\n icon_class: \"pencil\"\n ] \n ]\n ]"},{"source":"./site/source/javascripts/docs/views/views/top_navigation.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/top_navigation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.TopNavigation","header_documentation":"","type_alias":"top_navigation","css_class_identifier":"docs-top-navigation","defines_methods":{},"defines_properties":{"brand":{"defined_on_line":4,"documentation":"","default":"\"Luca.js\""},"inverse":{"defined_on_line":5,"documentation":"","default":"true"},"orientation":{"defined_on_line":6,"documentation":"","default":"\"top\""}},"source_file_contents":"nav = Docs.register \"Docs.views.TopNavigation\"\nnav.extends \"Luca.components.NavBar\"\nnav.defines\n brand: \"Luca.js\"\n inverse: true\n orientation: \"top\"\n"},{"source":"./site/source/javascripts/docs/collections/docs_documentation.coffee","defined_in_file":"./site/source/javascripts/docs/collections/docs_documentation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.DocsDocumentation","header_documentation":"","type_alias":"docs_documentation","css_class_identifier":"","defines_methods":{"getSource":{"defined_on_line":7,"documentation":"","arguments":[]},"fetch":{"defined_on_line":10,"documentation":"","arguments":[]}},"defines_properties":{"model":{"defined_on_line":4,"documentation":"","default":"Docs.models.Component"},"appNamespace":{"defined_on_line":5,"documentation":"","default":"\"Docs\""}},"source_file_contents":"collection = Docs.register \"Docs.collections.DocsDocumentation\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n model: Docs.models.Component\n appNamespace: \"Docs\"\n\n getSource: ()->\n Luca.util.resolve(\"#{ @appNamespace }.documentation\")\n\n fetch: ()->\n models = _( @getSource() ).sortBy(\"class_name\")\n found = {}\n models = for model in models when not found[ model.class_name ]\n found[ model.class_name ] = true\n model\n\n @reset(models)"},{"source":"./site/source/javascripts/docs/collections/github_repositories.coffee","defined_in_file":"./site/source/javascripts/docs/collections/github_repositories.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.GithubRepositories","header_documentation":"","type_alias":"github_repositories","css_class_identifier":"","defines_methods":{"url":{"defined_on_line":5,"documentation":"","arguments":[]}},"defines_properties":{"model":{"defined_on_line":4,"documentation":"","default":"Docs.models.GithubRepository"}},"source_file_contents":"collection = Docs.register \"Docs.collections.GithubRepositories\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n model: Docs.models.GithubRepository\n url: ()->\n \"https://api.github.com/users/datapimp/repos\"\n \n"},{"source":"./site/source/javascripts/docs/collections/luca_documentation.coffee","defined_in_file":"./site/source/javascripts/docs/collections/luca_documentation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.LucaDocumentation","header_documentation":"","type_alias":"luca_documentation","css_class_identifier":"","defines_methods":{"getSource":{"defined_on_line":7,"documentation":"","arguments":[]},"fetch":{"defined_on_line":10,"documentation":"","arguments":[]}},"defines_properties":{"model":{"defined_on_line":4,"documentation":"","default":"Docs.models.Component"},"appNamespace":{"defined_on_line":5,"documentation":"","default":"\"Luca\""}},"source_file_contents":"collection = Docs.register \"Docs.collections.LucaDocumentation\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n model: Docs.models.Component\n appNamespace: \"Luca\"\n\n getSource: ()->\n Luca.util.resolve(\"#{ @appNamespace }.documentation\")\n\n fetch: ()->\n models = _( @getSource() ).sortBy(\"class_name\")\n found = {}\n models = for model in models when not found[ model.class_name ]\n found[ model.class_name ] = true\n model\n\n @reset(models)"},{"source":"./site/source/javascripts/docs/collections/public_gists.coffee","defined_in_file":"./site/source/javascripts/docs/collections/public_gists.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.PublicGists","header_documentation":"","type_alias":"public_gists","css_class_identifier":"","defines_methods":{},"defines_properties":{"fetch":{"defined_on_line":4,"documentation":"","default":"Backbone.Collection"}},"source_file_contents":"collection = Docs.register \"Docs.collections.PublicGists\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n fetch: Backbone.Collection::fetch"},{"source":"./site/source/javascripts/docs/models/component.coffee","defined_in_file":"./site/source/javascripts/docs/models/component.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.models.Component","header_documentation":"","type_alias":"component","css_class_identifier":"","defines_methods":{"contentsWithoutHeader":{"defined_on_line":15,"documentation":"","arguments":[]},"documentation":{"defined_on_line":25,"documentation":"","arguments":[]},"methodDocumentationFor":{"defined_on_line":38,"documentation":"","arguments":[{"argument":"groups...","value":null}]},"propertyDocumentationFor":{"defined_on_line":51,"documentation":"","arguments":[{"argument":"groups...","value":null}]},"url":{"defined_on_line":64,"documentation":"","arguments":[]},"metaData":{"defined_on_line":67,"documentation":"","arguments":[]},"classNameId":{"defined_on_line":70,"documentation":"","arguments":[]},"componentGroup":{"defined_on_line":73,"documentation":"","arguments":[]},"componentType":{"defined_on_line":77,"documentation":"","arguments":[]},"componentTypeAlias":{"defined_on_line":96,"documentation":"","arguments":[]}},"defines_properties":{"defaults":{"defined_on_line":5,"documentation":"","default":null},"idAttribute":{"defined_on_line":13,"documentation":"","default":"\"class_name\""}},"source_file_contents":"model = Docs.register \"Docs.models.Component\"\nmodel.extends \"Luca.Model\"\n\nmodel.configuration\n defaults:\n class_name: undefined\n superClass: undefined\n asset_id: undefined\n source_file_contents: \"\"\n defined_in_file: \"\"\n\nmodel.defines\n idAttribute: \"class_name\"\n \n contentsWithoutHeader: ()->\n startsAt = @get(\"starts_on_line\") || 0\n contents = @get(\"source_file_contents\").split(\"\\n\")\n count = contents.length \n\n if startsAt > 0\n startsAt = startsAt - 1\n\n contents.slice(startsAt, count).join(\"\\n\")\n\n documentation: ()->\n base = _( @toJSON() ).pick 'header_documentation', 'class_name', 'defined_in_file'\n\n _.extend base, @metaData(), \n componentGroup: @componentGroup() \n componentType: @componentType() \n componentTypeAlias: @componentTypeAlias()\n details:\n publicMethods: @methodDocumentationFor(\"publicMethods\")\n privateMethods: @methodDocumentationFor(\"privateMethods\")\n privateProperties: @propertyDocumentationFor(\"privateProperties\",\"privateConfiguration\")\n publicProperties: @propertyDocumentationFor(\"publicProperties\",\"publicConfiguration\")\n\n methodDocumentationFor: (groups...)->\n documentationSource = _.extend({}, @get(\"defines_methods\"))\n result = {}\n\n for group in groups\n if list = @metaData()?[ group ]?()\n _.extend result, _(list).reduce (memo, methodOrProperty)->\n memo[ methodOrProperty ] = documentationSource[ methodOrProperty ]\n memo\n , {} \n\n result \n\n propertyDocumentationFor: (groups...)->\n documentationSource = _.extend({}, @get(\"defines_properties\"))\n result = {}\n\n for group in groups\n if list = @metaData()?[ group ]?()\n _.extend result, _(list).reduce (memo, methodOrProperty)->\n memo[ methodOrProperty ] = documentationSource[ methodOrProperty ]\n memo\n , {} \n\n result\n\n url: ()->\n \"/project/components/#{ Luca.namespace }/#{ @classNameId() }\"\n\n metaData: ()->\n Luca.util.resolve( @get(\"class_name\") )?.prototype.componentMetaData()\n\n classNameId: ()->\n @get(\"class_name\").replace(/\\./g,'__')\n\n componentGroup: ()->\n parts = @get('class_name').split('.')\n parts.slice(0,2).join('.')\n\n componentType: ()->\n type = \"view\"\n parts = @get('class_name').split('.')\n\n switch group = parts[1]\n when \"collections\" then \"collection\"\n when \"models\" then \"model\"\n when (\"views\" || \"components\" || \"pages\") then \"view\"\n\n return if group?\n\n if componentPrototype = Luca.util.resolve( @get(\"class_name\") )\n return \"view\" if Luca.isViewPrototype( componentPrototype:: )\n return \"collection\" if Luca.isCollectionPrototype( componentPrototype:: )\n return \"model\" if Luca.isModelProtoype( componentPrototype:: )\n\n # meh, but what about Router?\n \"view\"\n\n componentTypeAlias: ()->\n parts = @get('class_name').split('.')\n name = parts.pop()\n _.str.underscored( name )\n"},{"source":"./site/source/javascripts/docs/models/github_repository.coffee","defined_in_file":"./site/source/javascripts/docs/models/github_repository.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.models.GithubRepository","header_documentation":"","type_alias":"github_repository","css_class_identifier":"","defines_methods":{},"defines_properties":{},"source_file_contents":"model = Docs.register \"Docs.models.GithubRepository\"\nmodel.extends \"Luca.Model\"\nmodel.register()"},{"source":"./site/source/javascripts/docs/application.coffee","defined_in_file":"./site/source/javascripts/docs/application.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.Application","header_documentation":"","type_alias":"application","css_class_identifier":"docs-application","defines_methods":{},"defines_properties":{"version":{"defined_on_line":4,"documentation":"","default":"1"},"el":{"defined_on_line":5,"documentation":"","default":"\"#viewport\""},"fluid":{"defined_on_line":6,"documentation":"","default":"true"},"fullscreen":{"defined_on_line":7,"documentation":"","default":"true"},"applyWrapper":{"defined_on_line":8,"documentation":"","default":"false"},"name":{"defined_on_line":9,"documentation":"","default":"\"DocsApp\""},"collectionManager":{"defined_on_line":12,"documentation":"","default":null},"router":{"defined_on_line":18,"documentation":"","default":"\"Docs.Router\""},"routes":{"defined_on_line":20,"documentation":"","default":null},"component":{"defined_on_line":30,"documentation":"","default":"\"home\""},"type":{"defined_on_line":37,"documentation":"","default":"\"page\""},"layout":{"defined_on_line":38,"documentation":"","default":"\"pages/getting_started\""},"index":{"defined_on_line":39,"documentation":"","default":"_.once ()->"}},"source_file_contents":"app = Docs.register \"Docs.Application\"\napp.extends \"Luca.Application\"\napp.configuration\n version: 1\n el: \"#viewport\"\n fluid: true\n fullscreen: true\n applyWrapper: false\n name: \"DocsApp\"\n\napp.configuration\n collectionManager: \n initialCollections:[\n \"luca_documentation\"\n \"docs_documentation\"\n ]\n\n router: \"Docs.Router\"\n \n routes:\n \"\": \"home#index\"\n \"docs\": \"browse_source#index\"\n \"docs/:component_name\": \"browse_source#show\"\n \"get-started\": \"getting_started#index\"\n \"examples\": \"examples_browser#index\"\n \"examples/:example_name/:section\": \"examples_browser#show\"\n \"examples/:example_name\": \"examples_browser#show\"\n\napp.contains\n component: \"home\"\n,\n component: \"browse_source\"\n,\n component: \"examples_browser\"\n,\n name: \"getting_started\"\n type: \"page\"\n layout: \"pages/getting_started\"\n index: _.once ()->\n @$('pre').addClass('prettyprint')\n window.prettyPrint() \n\napp.register()"},{"source":"./site/source/javascripts/docs/collections/docs_documentation.coffee","defined_in_file":"./site/source/javascripts/docs/collections/docs_documentation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.DocsDocumentation","header_documentation":"","type_alias":"docs_documentation","css_class_identifier":"","defines_methods":{"getSource":{"defined_on_line":7,"documentation":"","arguments":[]},"fetch":{"defined_on_line":10,"documentation":"","arguments":[]}},"defines_properties":{"model":{"defined_on_line":4,"documentation":"","default":"Docs.models.Component"},"appNamespace":{"defined_on_line":5,"documentation":"","default":"\"Docs\""}},"source_file_contents":"collection = Docs.register \"Docs.collections.DocsDocumentation\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n model: Docs.models.Component\n appNamespace: \"Docs\"\n\n getSource: ()->\n Luca.util.resolve(\"#{ @appNamespace }.documentation\")\n\n fetch: ()->\n models = _( @getSource() ).sortBy(\"class_name\")\n found = {}\n models = for model in models when not found[ model.class_name ]\n found[ model.class_name ] = true\n model\n\n @reset(models)"},{"source":"./site/source/javascripts/docs/collections/github_repositories.coffee","defined_in_file":"./site/source/javascripts/docs/collections/github_repositories.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.GithubRepositories","header_documentation":"","type_alias":"github_repositories","css_class_identifier":"","defines_methods":{"url":{"defined_on_line":5,"documentation":"","arguments":[]}},"defines_properties":{"model":{"defined_on_line":4,"documentation":"","default":"Docs.models.GithubRepository"}},"source_file_contents":"collection = Docs.register \"Docs.collections.GithubRepositories\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n model: Docs.models.GithubRepository\n url: ()->\n \"https://api.github.com/users/datapimp/repos\"\n \n"},{"source":"./site/source/javascripts/docs/collections/luca_documentation.coffee","defined_in_file":"./site/source/javascripts/docs/collections/luca_documentation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.LucaDocumentation","header_documentation":"","type_alias":"luca_documentation","css_class_identifier":"","defines_methods":{"getSource":{"defined_on_line":7,"documentation":"","arguments":[]},"fetch":{"defined_on_line":10,"documentation":"","arguments":[]}},"defines_properties":{"model":{"defined_on_line":4,"documentation":"","default":"Docs.models.Component"},"appNamespace":{"defined_on_line":5,"documentation":"","default":"\"Luca\""}},"source_file_contents":"collection = Docs.register \"Docs.collections.LucaDocumentation\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n model: Docs.models.Component\n appNamespace: \"Luca\"\n\n getSource: ()->\n Luca.util.resolve(\"#{ @appNamespace }.documentation\")\n\n fetch: ()->\n models = _( @getSource() ).sortBy(\"class_name\")\n found = {}\n models = for model in models when not found[ model.class_name ]\n found[ model.class_name ] = true\n model\n\n @reset(models)"},{"source":"./site/source/javascripts/docs/collections/public_gists.coffee","defined_in_file":"./site/source/javascripts/docs/collections/public_gists.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.collections.PublicGists","header_documentation":"","type_alias":"public_gists","css_class_identifier":"","defines_methods":{},"defines_properties":{"fetch":{"defined_on_line":4,"documentation":"","default":"Backbone.Collection"}},"source_file_contents":"collection = Docs.register \"Docs.collections.PublicGists\"\ncollection.extends \"Luca.Collection\"\ncollection.defines\n fetch: Backbone.Collection::fetch"},{"source":"./site/source/javascripts/docs/lib/router.coffee","defined_in_file":"./site/source/javascripts/docs/lib/router.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.Router","header_documentation":"","type_alias":"router","css_class_identifier":"docs-router","defines_methods":{},"defines_properties":{},"source_file_contents":"router = Docs.register \"Docs.Router\"\nrouter.extends \"Luca.Router\"\nrouter.defines()"},{"source":"./site/source/javascripts/docs/models/component.coffee","defined_in_file":"./site/source/javascripts/docs/models/component.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.models.Component","header_documentation":"","type_alias":"component","css_class_identifier":"","defines_methods":{"contentsWithoutHeader":{"defined_on_line":15,"documentation":"","arguments":[]},"documentation":{"defined_on_line":25,"documentation":"","arguments":[]},"methodDocumentationFor":{"defined_on_line":38,"documentation":"","arguments":[{"argument":"groups...","value":null}]},"propertyDocumentationFor":{"defined_on_line":51,"documentation":"","arguments":[{"argument":"groups...","value":null}]},"url":{"defined_on_line":64,"documentation":"","arguments":[]},"metaData":{"defined_on_line":67,"documentation":"","arguments":[]},"classNameId":{"defined_on_line":70,"documentation":"","arguments":[]},"componentGroup":{"defined_on_line":73,"documentation":"","arguments":[]},"componentType":{"defined_on_line":77,"documentation":"","arguments":[]},"componentTypeAlias":{"defined_on_line":96,"documentation":"","arguments":[]}},"defines_properties":{"defaults":{"defined_on_line":5,"documentation":"","default":null},"idAttribute":{"defined_on_line":13,"documentation":"","default":"\"class_name\""}},"source_file_contents":"model = Docs.register \"Docs.models.Component\"\nmodel.extends \"Luca.Model\"\n\nmodel.configuration\n defaults:\n class_name: undefined\n superClass: undefined\n asset_id: undefined\n source_file_contents: \"\"\n defined_in_file: \"\"\n\nmodel.defines\n idAttribute: \"class_name\"\n \n contentsWithoutHeader: ()->\n startsAt = @get(\"starts_on_line\") || 0\n contents = @get(\"source_file_contents\").split(\"\\n\")\n count = contents.length \n\n if startsAt > 0\n startsAt = startsAt - 1\n\n contents.slice(startsAt, count).join(\"\\n\")\n\n documentation: ()->\n base = _( @toJSON() ).pick 'header_documentation', 'class_name', 'defined_in_file'\n\n _.extend base, @metaData(), \n componentGroup: @componentGroup() \n componentType: @componentType() \n componentTypeAlias: @componentTypeAlias()\n details:\n publicMethods: @methodDocumentationFor(\"publicMethods\")\n privateMethods: @methodDocumentationFor(\"privateMethods\")\n privateProperties: @propertyDocumentationFor(\"privateProperties\",\"privateConfiguration\")\n publicProperties: @propertyDocumentationFor(\"publicProperties\",\"publicConfiguration\")\n\n methodDocumentationFor: (groups...)->\n documentationSource = _.extend({}, @get(\"defines_methods\"))\n result = {}\n\n for group in groups\n if list = @metaData()?[ group ]?()\n _.extend result, _(list).reduce (memo, methodOrProperty)->\n memo[ methodOrProperty ] = documentationSource[ methodOrProperty ]\n memo\n , {} \n\n result \n\n propertyDocumentationFor: (groups...)->\n documentationSource = _.extend({}, @get(\"defines_properties\"))\n result = {}\n\n for group in groups\n if list = @metaData()?[ group ]?()\n _.extend result, _(list).reduce (memo, methodOrProperty)->\n memo[ methodOrProperty ] = documentationSource[ methodOrProperty ]\n memo\n , {} \n\n result\n\n url: ()->\n \"/project/components/#{ Luca.namespace }/#{ @classNameId() }\"\n\n metaData: ()->\n Luca.util.resolve( @get(\"class_name\") )?.prototype.componentMetaData()\n\n classNameId: ()->\n @get(\"class_name\").replace(/\\./g,'__')\n\n componentGroup: ()->\n parts = @get('class_name').split('.')\n parts.slice(0,2).join('.')\n\n componentType: ()->\n type = \"view\"\n parts = @get('class_name').split('.')\n\n switch group = parts[1]\n when \"collections\" then \"collection\"\n when \"models\" then \"model\"\n when (\"views\" || \"components\" || \"pages\") then \"view\"\n\n return if group?\n\n if componentPrototype = Luca.util.resolve( @get(\"class_name\") )\n return \"view\" if Luca.isViewPrototype( componentPrototype:: )\n return \"collection\" if Luca.isCollectionPrototype( componentPrototype:: )\n return \"model\" if Luca.isModelProtoype( componentPrototype:: )\n\n # meh, but what about Router?\n \"view\"\n\n componentTypeAlias: ()->\n parts = @get('class_name').split('.')\n name = parts.pop()\n _.str.underscored( name )\n"},{"source":"./site/source/javascripts/docs/models/github_repository.coffee","defined_in_file":"./site/source/javascripts/docs/models/github_repository.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.models.GithubRepository","header_documentation":"","type_alias":"github_repository","css_class_identifier":"","defines_methods":{},"defines_properties":{},"source_file_contents":"model = Docs.register \"Docs.models.GithubRepository\"\nmodel.extends \"Luca.Model\"\nmodel.register()"},{"source":"./site/source/javascripts/docs/views/components/api_browser/index.coffee","defined_in_file":"./site/source/javascripts/docs/views/components/api_browser/index.coffee","type":"component_definition","starts_on_line":4,"class_name":"Docs.components.ApiBrowser","header_documentation":"<p>The <code>Docs.components.ApiBrowser</code> is an example of using\na <code>Luca.Container</code> with a <code>@componentEvents</code> configuration\nto broker communication between two child components.</p>\n","type_alias":"api_browser","css_class_identifier":"docs-api-browser","defines_methods":{"afterInitialize":{"defined_on_line":29,"documentation":"","arguments":[]},"runExample":{"defined_on_line":33,"documentation":"","arguments":[]},"loadUrl":{"defined_on_line":37,"documentation":"","arguments":[]}},"defines_properties":{"componentEvents":{"defined_on_line":8,"documentation":"","default":null},"type":{"defined_on_line":12,"documentation":"","default":"\"container\""},"rowFluid":{"defined_on_line":13,"documentation":"","default":"true"},"className":{"defined_on_line":14,"documentation":"","default":"\"url-selector\""},"components":{"defined_on_line":15,"documentation":"","default":"["},"tagName":{"defined_on_line":26,"documentation":"","default":"\"pre\""},"role":{"defined_on_line":28,"documentation":"","default":"\"output\""}},"source_file_contents":"# The `Docs.components.ApiBrowser` is an example of using\n# a `Luca.Container` with a `@componentEvents` configuration\n# to broker communication between two child components.\nview = Docs.register \"Docs.components.ApiBrowser\"\nview.extends \"Luca.Container\"\n\nview.configuration\n componentEvents:\n \"* button:click\" : \"loadUrl\"\n\nview.contains\n type: \"container\"\n rowFluid: true\n className: \"url-selector\"\n components:[\n type: \"text_field\"\n name: \"endpoint_url\"\n label: \"Enter a URL\"\n span: 9\n ,\n type: \"button_field\"\n input_value: \"Browse\"\n span: 3\n ]\n,\n tagName: \"pre\"\n className: \"prettyprint pre-scrollable\"\n role: \"output\"\n afterInitialize: ()->\n @$el.html(\"Loading...\")\n\nview.privateMethods\n runExample: ()->\n @findComponentByName(\"endpoint_url\", true).setValue(\"https://api.github.com/users/datapimp/gists\")\n @loadUrl()\n\n loadUrl: ()->\n url = @findComponentByName(\"endpoint_url\", true).getValue()\n $.get url, (parsed, state, options)=>\n @getOutput().$html( options.responseText )\n window.prettyPrint()\n\nview.register()"},{"source":"./site/source/javascripts/docs/views/components/component_documentation.coffee","defined_in_file":"./site/source/javascripts/docs/views/components/component_documentation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ComponentDocumentation","header_documentation":"","type_alias":"component_documentation","css_class_identifier":"docs-component-documentation","defines_methods":{"loadComponent":{"defined_on_line":22,"documentation":"<p>Loads a component definition from the documentation objects that\nare generated by the Luca gem&#39;s Luca::LucaApplication#export tool.\nThese objects are the result of parsing component definition files\nand determining the public and private properties and methods, and\nthe documentation that is rendered from their comments.</p>\n","arguments":[{"argument":"@component","value":null}]},"reset":{"defined_on_line":42,"documentation":"","arguments":[]},"renderMethodGroup":{"defined_on_line":47,"documentation":"","arguments":[{"argument":"group","value":"\"public\""}]},"renderPropertyGroup":{"defined_on_line":62,"documentation":"","arguments":[{"argument":"group","value":"\"public\""}]}},"defines_properties":{"bodyTemplate":{"defined_on_line":5,"documentation":"","default":"\"component_documentation\""},"displaySource":{"defined_on_line":10,"documentation":"<p>If set to true, we will render the source code\nfor the component in addition to all of the information\nabout the methods and properties</p>\n","default":"false"},"displayHeader":{"defined_on_line":14,"documentation":"<p>If set to true, we will render the header documentation\nthat is contained in the component</p>\n","default":"false"}},"source_file_contents":"view = Docs.register \"Docs.views.ComponentDocumentation\"\nview.extends \"Luca.View\"\n\nview.privateConfiguration\n bodyTemplate: \"component_documentation\"\n\n # If set to true, we will render the source code\n # for the component in addition to all of the information\n # about the methods and properties\n displaySource: false\n\n # If set to true, we will render the header documentation\n # that is contained in the component\n displayHeader: false\n\nview.publicMethods\n # Loads a component definition from the documentation objects that\n # are generated by the Luca gem's Luca::LucaApplication#export tool.\n # These objects are the result of parsing component definition files\n # and determining the public and private properties and methods, and \n # the documentation that is rendered from their comments.\n loadComponent: (@component)->\n @reset()\n\n for section in [\"private\", \"public\"]\n @renderMethodGroup(section) \n @renderPropertyGroup(section) \n\n @$('.source').hide()\n\n if @displayHeader is true\n @$('.header-documentation').show()\n @$('.header-documentation').html( @component.get(\"header_documentation\") )\n\n if @displaySource is true\n @$('.source').show()\n @$('pre.source').html( @component.contentsWithoutHeader() ) \n\n @$('pre').addClass('prettyprint')\n\nview.privateMethods\n reset: ()->\n @$('.table tbody').empty()\n @$('.properties,.methods').hide()\n @$('.header-documentation').hide()\n\n renderMethodGroup: (group=\"public\")->\n source = @component?.documentation()?.details[\"#{ group }Methods\"]\n return if _.isEmpty(source)\n prototype = Luca.util.resolve(@component.get(\"class_name\"))?.prototype \n list = @$(\".methods.#{ group }\").show().find('.table tbody')\n\n for method, details of source when _.isFunction(prototype[method])\n details ||= {}\n arg_details = _( details.arguments ).reduce (memo,pair)->\n memo += \"#{ pair.argument }\"\n memo += \"= #{ pair.value || 'undefined' }\" if pair.value?\n memo += \"<br/>\"\n , \"\"\n list.append \"<tr><td>#{ method }</td><td>#{ arg_details }</td><td>#{ details.documentation || \"\" }</td></tr>\"\n\n renderPropertyGroup: (group=\"public\")->\n source = @component?.documentation()?.details[\"#{ group }Properties\"]\n return if _.isEmpty(source)\n prototype = Luca.util.resolve(@component.get(\"class_name\"))?.prototype\n list = @$(\".properties.#{ group }\").show().find('.table tbody')\n\n for method, details of source when not _.isFunction(prototype[method])\n details ||= {}\n list.append \"<tr><td>#{ method }</td><td>#{ details.default || \"\" }</td><td>#{ details.documentation || \"\" }</td></tr>\"\n\nview.register()\n"},{"source":"./site/source/javascripts/docs/views/pages/browse_source/details.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/browse_source/details.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ComponentDetails","header_documentation":"","type_alias":"component_details","css_class_identifier":"docs-component-details","defines_methods":{"loadComponent":{"defined_on_line":10,"documentation":"","arguments":[{"argument":"model","value":null}]},"afterRender":{"defined_on_line":21,"documentation":"","arguments":[]},"load":{"defined_on_line":25,"documentation":"","arguments":[{"argument":"model","value":null}]},"prettyPrint":{"defined_on_line":35,"documentation":"<p>Applies syntax highlighting to all pre elements</p>\n","arguments":[]}},"defines_properties":{"rowFluid":{"defined_on_line":5,"documentation":"","default":"true"},"role":{"defined_on_line":8,"documentation":"","default":"\"documentation\""},"span":{"defined_on_line":9,"documentation":"","default":"5"},"type":{"defined_on_line":15,"documentation":"","default":"\"component_documentation\""},"displaySource":{"defined_on_line":17,"documentation":"","default":"true"}},"source_file_contents":"view = Docs.register \"Docs.views.ComponentDetails\"\nview.extends \"Luca.Container\"\n\nview.configuration\n rowFluid: true\n\nview.contains\n role: \"documentation\"\n span: 5\n loadComponent: (model)->\n @$el.empty()\n @$el.append(\"<h2>#{ model.get('class_name') }</h2>\")\n @$el.append(\"<div class='header-documentation'>#{ model.get('header_documentation') }</div>\")\n,\n type: \"component_documentation\"\n role: \"details\"\n displaySource: true\n span: 7\n\nview.defines\n afterRender: ()->\n @getDetails().$el.hide()\n @getDocumentation().$el.hide()\n\n load: (model)->\n @getDetails().$el.show()\n @getDocumentation().$el.show()\n\n @getDetails().loadComponent(model)\n @getDocumentation().loadComponent(model)\n\n @prettyPrint()\n\n # Applies syntax highlighting to all pre elements\n prettyPrint: ()-> \n @$('pre').addClass('prettyprint')\n window.prettyPrint?()\n"},{"source":"./site/source/javascripts/docs/views/pages/browse_source/list.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/browse_source/list.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ComponentList","header_documentation":"","type_alias":"component_list","css_class_identifier":"docs-component-list","defines_methods":{},"defines_properties":{"paginatable":{"defined_on_line":4,"documentation":"","default":"false"},"maxHeight":{"defined_on_line":5,"documentation":"","default":"200"},"collection":{"defined_on_line":6,"documentation":"","default":"\"luca_documentation\""},"columns":{"defined_on_line":7,"documentation":"","default":"["}},"source_file_contents":"view = Docs.register \"Docs.views.ComponentList\"\nview.extends \"Luca.components.ScrollableTable\"\nview.defines\n paginatable: false\n maxHeight: 200\n collection: \"luca_documentation\"\n columns:[\n reader: \"class_name\"\n width: \"20%\"\n renderer: (name)->\n \"<a class='link'>#{ name }</a>\"\n ,\n reader: \"class_name\"\n header: \"Extends From\"\n width: \"20%\"\n renderer: (className)->\n if component = Luca.util.resolve(className)\n name = component.prototype.componentMetaData()?.meta[\"super class name\"]\n \"<a class='link'>#{ name }</a>\"\n ,\n reader: \"type_alias\"\n header: \"Shortcut\"\n width: \"10%\"\n ,\n reader: \"defined_in_file\"\n header: \"<i class='icon icon-github'/> Github\"\n renderer: (file)->\n shortened = file.split(\"javascripts/luca/\")[1]\n \"<a href='https://github.com/datapimp/luca/blob/master/app/assets/javascripts/luca/#{ shortened }'>#{ shortened }</a>\"\n ]\n\n"},{"source":"./site/source/javascripts/docs/views/pages/browse_source.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/browse_source.coffee","type":"component_definition","starts_on_line":3,"class_name":"Docs.views.BrowseSource","header_documentation":"","type_alias":"browse_source","css_class_identifier":"docs-browse-source","defines_methods":{"index":{"defined_on_line":18,"documentation":"","arguments":[]},"show":{"defined_on_line":21,"documentation":"","arguments":[{"argument":"componentName","value":null}]},"selectComponent":{"defined_on_line":29,"documentation":"","arguments":[{"argument":"e","value":null}]}},"defines_properties":{"autoBindEventHandlers":{"defined_on_line":7,"documentation":"","default":"true"},"events":{"defined_on_line":8,"documentation":"","default":null},"component":{"defined_on_line":12,"documentation":"","default":"\"component_list\""}},"source_file_contents":"#= require_tree ./browse_source \n#= require_self\nview = Docs.register \"Docs.views.BrowseSource\"\nview.extends \"Luca.Container\"\n\nview.configuration\n autoBindEventHandlers: true\n events:\n \"click .docs-component-list a.link\" : \"selectComponent\"\n\nview.contains\n component: \"component_list\"\n,\n component: \"component_details\"\n\nview.privateMethods\n\n index: ()->\n @selectComponent(@getComponentList().getCollection().at(0))\n\n show: (componentName)-> \n component = @getComponentList().getCollection().detect (model)->\n model.get(\"class_name\") is componentName\n\n return @index() unless component?\n\n @selectComponent(component)\n \n selectComponent: (e)->\n list = @getComponentList()\n details = @getComponentDetails() \n\n if Luca.isBackboneModel(e) \n model = e\n index = list.getCollection().indexOf(model)\n row = list.$(\"tr[data-index='#{ index }']\")\n else\n $target = @$(e.target)\n row = $target.parents('tr').eq(0)\n index = row.data('index')\n model = list.getCollection().at(index) \n\n list.$('tr').removeClass('info')\n row.addClass('info')\n details.load(model)\n\n"},{"source":"./site/source/javascripts/docs/views/pages/component_editor.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/component_editor.coffee","type":"component_definition","starts_on_line":3,"class_name":"Docs.views.ComponentEditor","header_documentation":"","type_alias":"component_editor","css_class_identifier":"docs-component-editor","defines_methods":{},"defines_properties":{},"source_file_contents":"#= require_tree ./component_editor\n#= require_self\nview = Docs.register \"Docs.views.ComponentEditor\"\nview.extends \"Luca.Container\"\n\n"},{"source":"./site/source/javascripts/docs/views/pages/examples_browser/docs.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/examples_browser/docs.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ExampleDocs","header_documentation":"","type_alias":"example_docs","css_class_identifier":"docs-example-docs","defines_methods":{"beforeRender":{"defined_on_line":6,"documentation":"","arguments":[]}},"defines_properties":{"collection":{"defined_on_line":4,"documentation":"","default":"\"docs_documentation\""},"displayHeader":{"defined_on_line":5,"documentation":"","default":"true"}},"source_file_contents":"view = Docs.register \"Docs.views.ExampleDocs\"\nview.extends \"Docs.views.ComponentDocumentation\"\nview.defines\n collection: \"docs_documentation\"\n displayHeader: true\n beforeRender: ()->\n component = @collection.detect (component)=>\n component.get(\"type_alias\") is @example\n\n if component?\n @loadComponent(component)\n\n"},{"source":"./site/source/javascripts/docs/views/pages/examples_browser/source.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/examples_browser/source.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.ExampleSource","header_documentation":"","type_alias":"example_source","css_class_identifier":"docs-example-source","defines_methods":{"beforeRender":{"defined_on_line":7,"documentation":"","arguments":[]}},"defines_properties":{"tagName":{"defined_on_line":4,"documentation":"","default":"\"pre\""},"className":{"defined_on_line":5,"documentation":"","default":"\"prettyprint pre-scrollable\""},"collection":{"defined_on_line":6,"documentation":"","default":"\"docs_documentation\""}},"source_file_contents":"view = Docs.register \"Docs.views.ExampleSource\"\nview.extends \"Luca.View\"\nview.defines\n tagName: \"pre\"\n className: \"prettyprint pre-scrollable\"\n collection: \"docs_documentation\"\n beforeRender: ()->\n component = @collection.detect (component)=>\n component.get(\"type_alias\") is @example\n\n @$el.html( component.get(\"source_file_contents\") )\n window.prettyPrint()\n\n"},{"source":"./site/source/javascripts/docs/views/pages/examples_browser.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/examples_browser.coffee","type":"component_definition","starts_on_line":4,"class_name":"Docs.views.ExamplesBrowser","header_documentation":"","type_alias":"examples_browser","css_class_identifier":"docs-examples-browser","defines_methods":{"wrapExampleComponents":{"defined_on_line":42,"documentation":"","arguments":[]},"afterInitialize":{"defined_on_line":76,"documentation":"","arguments":[]},"show":{"defined_on_line":80,"documentation":"","arguments":[{"argument":"exampleName","value":"0"},{"argument":"view","value":"\"component\""}]},"index":{"defined_on_line":86,"documentation":"","arguments":[]}},"defines_properties":{"title":{"defined_on_line":8,"documentation":"","default":"\"API Browser\""},"type":{"defined_on_line":9,"documentation":"","default":"\"api_browser\""},"name":{"defined_on_line":10,"documentation":"","default":"\"api_browser\""},"activeCard":{"defined_on_line":29,"documentation":"","default":"0"},"tab_position":{"defined_on_line":30,"documentation":"","default":"\"left\""},"defaults":{"defined_on_line":31,"documentation":"","default":null},"afterSelect":{"defined_on_line":37,"documentation":"<p>Hack</p>\n","default":"_.debounce ()->"}},"source_file_contents":"#= require_tree ./examples_browser\n#= require_self\n\npage = Docs.register \"Docs.views.ExamplesBrowser\"\npage.extends \"Luca.containers.TabView\"\n\npage.contains\n title: \"API Browser\"\n type: \"api_browser\"\n name: \"api_browser\"\n,\n title: \"Basic FormView\"\n type: \"basic_form_view\"\n name: \"basic_form_view\"\n,\n title: \"Complex Layout FormView\"\n type: \"complex_layout_form\"\n name: \"complex_layout_form\"\n,\n title: \"Scrollable Table\"\n type: \"table_view_example\"\n name: \"table_view_example\"\n,\n title: \"Grid Layout CollectionView\"\n type: \"grid_layout_view_example\"\n name: \"grid_layout_view_example\"\n\npage.privateConfiguration\n activeCard: 0\n tab_position: \"left\"\n defaults:\n activation: ()->\n Docs().router.navigate(\"#examples/#{ @name }/source\", false)\n\npage.privateMethods\n # Hack\n afterSelect: _.debounce ()->\n if active = @activeComponent()\n active.findComponentByName?(\"component\")?.runExample?()\n , 10\n\n wrapExampleComponents: ()->\n wrapped = []\n\n wrapped = _(@components).map (component,index)->\n title: component.title\n name: component.name\n components:[\n type: \"card\"\n role: \"view_selector\"\n afterInitialize: ()->\n @$el.append(\"<h3>#{ component.title } Example</h3>\")\n components:[\n type: component.type\n name: \"component\"\n activation: ()->\n @runExample?()\n ,\n type: \"example_source\"\n example: component.name\n name: \"source\"\n ,\n type: \"example_docs\"\n example: component.name\n name: \"documentation\"\n ] \n ,\n bodyTemplate: \"examples_browser/selector\"\n bodyTemplateVars: ()->\n example_name: component.name\n ]\n\n @components = wrapped\n @components.unshift title: \"Overview\", bodyTemplate: \"examples_browser/overview\"\n\n afterInitialize: ()->\n @wrapExampleComponents()\n\npage.publicMethods\n show: (exampleName=0, view=\"component\")->\n @activate exampleName, false, ()->\n @getViewSelector().activate(view)\n @$(\"li\").removeClass(\"active\")\n @$(\"li.#{view}\").addClass(\"active\")\n\n index: ()->\n @show()\n\npage.register()"},{"source":"./site/source/javascripts/docs/views/pages/home.coffee","defined_in_file":"./site/source/javascripts/docs/views/pages/home.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.Home","header_documentation":"","type_alias":"home","css_class_identifier":"docs-home","defines_methods":{"index":{"defined_on_line":7,"documentation":"","arguments":[]}},"defines_properties":{"template":{"defined_on_line":4,"documentation":"","default":"\"pages/home\""}},"source_file_contents":"page = Docs.register \"Docs.views.Home\"\npage.extends \"Luca.components.Page\"\npage.configuration\n template: \"pages/home\"\n\npage.defines\n index: ()->\n @trigger \"index\"\n\npage.register()"},{"source":"./site/source/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/collection_view_examples/grid_layout_view_example.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.GridLayoutViewExample","header_documentation":"","type_alias":"grid_layout_view_example","css_class_identifier":"docs-grid-layout-view-example","defines_methods":{"runExample":{"defined_on_line":11,"documentation":"","arguments":[]}},"defines_properties":{"collection":{"defined_on_line":5,"documentation":"","default":"\"github_repositories\""},"itemPerRow":{"defined_on_line":6,"documentation":"","default":"4"},"paginatable":{"defined_on_line":7,"documentation":"","default":"12"},"itemTemplate":{"defined_on_line":8,"documentation":"","default":"\"github_repository\""}},"source_file_contents":"view = Docs.register \"Docs.views.GridLayoutViewExample\"\nview.extends \"Luca.components.GridLayoutView\"\n\nview.publicConfiguration\n collection: \"github_repositories\"\n itemPerRow: 4\n paginatable: 12\n itemTemplate: \"github_repository\"\n\nview.publicMethods\n runExample: ()->\n @getCollection().fetch()\n\nview.register()\n"},{"source":"./site/source/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/collection_view_examples/table_view_example.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.TableViewExample","header_documentation":"","type_alias":"table_view_example","css_class_identifier":"docs-table-view-example","defines_methods":{"runExample":{"defined_on_line":36,"documentation":"","arguments":[]}},"defines_properties":{"paginatable":{"defined_on_line":7,"documentation":"<p>Only render 100 models at a time. The <code>Luca.CollectionView</code> has\nautomatic pagination control rendering, if you specify a pagination\nview class and render area.</p>\n","default":"100"},"maxHeight":{"defined_on_line":10,"documentation":"<p>The scrollable table element has a max height.</p>\n","default":"300"},"collection":{"defined_on_line":15,"documentation":"<p>The string &quot;github_repositories&quot; is an alias for the collection manager\nwhich is created by the <code>Docs.Application</code>. It represents a singular\nglobal instance of the <code>Docs.collections.GithubRepositories</code> collection.</p>\n","default":"\"github_repositories\""},"columns":{"defined_on_line":23,"documentation":"<p>The <code>Luca.components.TableView</code> component accepts an array of column\nconfigurations. Each column can specify the following properties:\n- header\n- reader ( a method, or attribute on the collection&#39;s model )\n- renderer ( a custom function which renders the model / reader )\n- width ( a percentage width for the column )</p>\n","default":"["}},"source_file_contents":"view = Docs.register \"Docs.views.TableViewExample\"\nview.extends \"Luca.components.ScrollableTable\"\nview.publicConfiguration\n # Only render 100 models at a time. The `Luca.CollectionView` has\n # automatic pagination control rendering, if you specify a pagination\n # view class and render area. \n paginatable: 100\n \n # The scrollable table element has a max height. \n maxHeight: 300\n\n # The string \"github_repositories\" is an alias for the collection manager\n # which is created by the `Docs.Application`. It represents a singular\n # global instance of the `Docs.collections.GithubRepositories` collection. \n collection: \"github_repositories\"\n\n # The `Luca.components.TableView` component accepts an array of column\n # configurations. Each column can specify the following properties:\n # - header\n # - reader ( a method, or attribute on the collection's model )\n # - renderer ( a custom function which renders the model / reader )\n # - width ( a percentage width for the column )\n columns:[\n reader: \"name\"\n renderer: (name, model)->\n \"<a href=#{ model.get('html_url') }>#{ name }</a>\"\n , \n reader: \"description\"\n ,\n reader: \"language\"\n ,\n reader: \"watchers\"\n ]\n\nview.publicMethods\n runExample: ()->\n @getCollection().fetch()\n\nview.register()"},{"source":"./site/source/javascripts/docs/views/views/form_view_examples/basic_example.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/form_view_examples/basic_example.coffee","type":"component_definition","starts_on_line":6,"class_name":"Docs.views.BasicFormView","header_documentation":"<p>The <code>Docs.views.BasicFormView</code> is an example of the <code>Luca.components.FormView</code>.\nIn this basic example, the form contains a range of different fields. They are\nrendered one on top of another. You can get more advanced and nest containers within\nyour form, or use a <code>@bodyTemplate</code> and specify your own DOM structure, and assign\ncomponents to custom CSS selectors within it.</p>\n","type_alias":"basic_form_view","css_class_identifier":"docs-basic-form-view","defines_methods":{},"defines_properties":{"defaults":{"defined_on_line":12,"documentation":"<p>Any values you specify in the <code>@defaults</code> property will be\nset on each of the components in this container.</p>\n","default":null},"components":{"defined_on_line":19,"documentation":"<p>You can manually define a <code>@components</code> property, or in your component\ndefinition you can use the special <code>contains</code> directive, the only difference\nis your personal preference for readability. I did it this way</p>\n","default":"["}},"source_file_contents":"# The `Docs.views.BasicFormView` is an example of the `Luca.components.FormView`.\n# In this basic example, the form contains a range of different fields. They are\n# rendered one on top of another. You can get more advanced and nest containers within\n# your form, or use a `@bodyTemplate` and specify your own DOM structure, and assign\n# components to custom CSS selectors within it.\nform = Docs.register \"Docs.views.BasicFormView\"\nform.extends \"Luca.components.FormView\"\n\nform.privateConfiguration\n # Any values you specify in the `@defaults` property will be\n # set on each of the components in this container.\n defaults:\n type: \"text\"\n\nform.publicConfiguration\n # You can manually define a `@components` property, or in your component\n # definition you can use the special `contains` directive, the only difference\n # is your personal preference for readability. I did it this way \n components:[\n label: \"Text Field One\"\n ,\n type: \"select\"\n label: \"Select Field One\"\n collection:\n data:[\n ['Alpha','Alpha']\n ['Bravo','Bravo']\n ['Charlie','Charlie']\n ['Delta','Delta']\n ]\n ,\n type: \"checkbox_field\"\n label: \"Checkbox Field\"\n\n ]\n\nform.register() \n\n"},{"source":"./site/source/javascripts/docs/views/views/form_view_examples/complex_layout.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/form_view_examples/complex_layout.coffee","type":"component_definition","starts_on_line":9,"class_name":"Docs.views.ComplexLayoutForm","header_documentation":"<p>The <code>Docs.views.ComplexLayoutForm</code> is an example of a <code>Luca.components.FormView</code> which contains\na nested container, and which uses the bootstrap grid helper properties <code>@rowFluid</code> and <code>@span</code> \nto arrange the nested components inside of a grid layout.\nIn addition to laying out the form components visually, there is a nested <code>Luca.containers.CardView</code>\ncomponent which shows / hides various field sets depending on what options you select on the form.\nThis is an example of how Luca framework components can be assembled together arbitrarily to build\nwhatever type of user interface you can imagine.</p>\n","type_alias":"complex_layout_form","css_class_identifier":"docs-complex-layout-form","defines_methods":{"selectGroup":{"defined_on_line":30,"documentation":"<p>The selectGroup method is bound to the componentEvent listener. Whenever\nthe group_selector field changes its value, we want to change which field\ngroup is visible on the form.</p>\n","arguments":[]}},"defines_properties":{"rowFluid":{"defined_on_line":17,"documentation":"<p>By setting <code>@rowFluid</code> to true, this container\nwill support the twitter bootstrap grid layout. Applying\nthe <code>@span</code> property to the direct children of this component\nwill control their width</p>\n","default":"true"},"componentEvents":{"defined_on_line":23,"documentation":"<p>Here is an example of using the <code>@componentEvents</code> property to listen\nto the change event on the select field identified by the role &#39;group_selector&#39;.\nonce that field emits its change event, we change the active display card in the\nnested card selector.</p>\n","default":null},"type":{"defined_on_line":36,"documentation":"","default":"\"container\""},"span":{"defined_on_line":37,"documentation":"","default":"6"},"components":{"defined_on_line":38,"documentation":"","default":"["}},"source_file_contents":"# The `Docs.views.ComplexLayoutForm` is an example of a `Luca.components.FormView` which contains\n# a nested container, and which uses the bootstrap grid helper properties `@rowFluid` and `@span` \n# to arrange the nested components inside of a grid layout.\n#\n# In addition to laying out the form components visually, there is a nested `Luca.containers.CardView`\n# component which shows / hides various field sets depending on what options you select on the form.\n# This is an example of how Luca framework components can be assembled together arbitrarily to build\n# whatever type of user interface you can imagine.\nform = Docs.register \"Docs.views.ComplexLayoutForm\"\nform.extends \"Luca.components.FormView\"\n\nform.privateConfiguration\n # By setting `@rowFluid` to true, this container\n # will support the twitter bootstrap grid layout. Applying\n # the `@span` property to the direct children of this component\n # will control their width \n rowFluid: true\n\n # Here is an example of using the `@componentEvents` property to listen\n # to the change event on the select field identified by the role 'group_selector'.\n # once that field emits its change event, we change the active display card in the\n # nested card selector.\n componentEvents:\n \"group_selector on:change\" : \"selectGroup\"\n\nform.privateMethods\n # The selectGroup method is bound to the componentEvent listener. Whenever\n # the group_selector field changes its value, we want to change which field\n # group is visible on the form.\n selectGroup: ()->\n desiredGroup = @getGroupSelector().getValue()\n selector = @getGroupDisplaySelector()\n selector.activate(desiredGroup) \n\nform.contains\n type: \"container\"\n span: 6\n components:[\n type: \"text\"\n label: \"Field One\"\n ,\n type: \"text\"\n label: \"Field Two\"\n ,\n type: \"text\"\n label: \"Field Three\"\n ]\n,\n type: \"container\"\n span: 6\n components:[\n label: \"Select a Group\"\n type: \"select\"\n role: \"group_selector\"\n includeBlank: false\n valueType: \"string\"\n collection:\n data:[\n [\"alpha\",\"Alpha Group\"]\n [\"bravo\", \"Bravo Group\"]\n [\"charlie\",\"Charlie Group\"]\n ]\n ,\n type: \"card\"\n role: \"group_display_selector\"\n components:[\n name: \"alpha\"\n defaults:\n type: \"text\"\n components:[\n type: \"view\"\n tagName: \"h4\"\n bodyTemplate: ()-> \"Group One\"\n , \n label: \"Alpha\"\n ,\n label: \"Bravo\"\n ,\n label: \"Charlie\"\n ]\n ,\n name: \"bravo\"\n defaults:\n type: \"checkbox_field\"\n components:[\n type: \"view\"\n tagName: \"h4\"\n bodyTemplate: ()-> \"Group Two\"\n ,\n label: \"One\"\n ,\n label: \"Two\"\n ]\n ,\n name: \"charlie\"\n defaults:\n type: \"button_field\" \n components:[\n type: \"view\"\n tagName: \"h4\"\n bodyTemplate: ()-> \"Group Three\"\n ,\n input_value: \"Button One\"\n icon_class: \"chevron-up\"\n ,\n input_value: \"Button Two\"\n icon_class: \"pencil\"\n ] \n ]\n ]"},{"source":"./site/source/javascripts/docs/views/views/top_navigation.coffee","defined_in_file":"./site/source/javascripts/docs/views/views/top_navigation.coffee","type":"component_definition","starts_on_line":1,"class_name":"Docs.views.TopNavigation","header_documentation":"","type_alias":"top_navigation","css_class_identifier":"docs-top-navigation","defines_methods":{},"defines_properties":{"brand":{"defined_on_line":4,"documentation":"","default":"\"Luca.js\""},"inverse":{"defined_on_line":5,"documentation":"","default":"true"},"orientation":{"defined_on_line":6,"documentation":"","default":"\"top\""}},"source_file_contents":"nav = Docs.register \"Docs.views.TopNavigation\"\nnav.extends \"Luca.components.NavBar\"\nnav.defines\n brand: \"Luca.js\"\n inverse: true\n orientation: \"top\"\n"}];