PageRenderTime 57ms CodeModel.GetById 29ms RepoModel.GetById 0ms app.codeStats 0ms

/backgrid-0.3.5/api/output/Backgrid.Grid.js

https://github.com/kuzbida/backgrid_test
JavaScript | 200 lines | 183 code | 17 blank | 0 comment | 0 complexity | f932ca211a2e4ea86e543693166af0ab MD5 | raw file
Possible License(s): MIT
  1. Ext.data.JsonP.Backgrid_Grid({
  2. "tagname": "class",
  3. "name": "Backgrid.Grid",
  4. "extends": "Backbone.View",
  5. "mixins": [
  6. ],
  7. "alternateClassNames": [
  8. ],
  9. "aliases": {
  10. },
  11. "singleton": false,
  12. "requires": [
  13. ],
  14. "uses": [
  15. ],
  16. "enum": null,
  17. "override": null,
  18. "inheritable": null,
  19. "inheritdoc": null,
  20. "meta": {
  21. },
  22. "private": null,
  23. "id": "class-Backgrid.Grid",
  24. "members": {
  25. "cfg": [
  26. ],
  27. "property": [
  28. {
  29. "name": "body",
  30. "tagname": "property",
  31. "owner": "Backgrid.Grid",
  32. "meta": {
  33. },
  34. "id": "property-body"
  35. },
  36. {
  37. "name": "className",
  38. "tagname": "property",
  39. "owner": "Backgrid.Grid",
  40. "meta": {
  41. },
  42. "id": "property-className"
  43. },
  44. {
  45. "name": "footer",
  46. "tagname": "property",
  47. "owner": "Backgrid.Grid",
  48. "meta": {
  49. },
  50. "id": "property-footer"
  51. },
  52. {
  53. "name": "header",
  54. "tagname": "property",
  55. "owner": "Backgrid.Grid",
  56. "meta": {
  57. },
  58. "id": "property-header"
  59. },
  60. {
  61. "name": "tagName",
  62. "tagname": "property",
  63. "owner": "Backgrid.Grid",
  64. "meta": {
  65. },
  66. "id": "property-tagName"
  67. }
  68. ],
  69. "method": [
  70. {
  71. "name": "initialize",
  72. "tagname": "method",
  73. "owner": "Backgrid.Grid",
  74. "meta": {
  75. },
  76. "id": "method-initialize"
  77. },
  78. {
  79. "name": "insertColumn",
  80. "tagname": "method",
  81. "owner": "Backgrid.Grid",
  82. "meta": {
  83. "chainable": true
  84. },
  85. "id": "method-insertColumn"
  86. },
  87. {
  88. "name": "insertRow",
  89. "tagname": "method",
  90. "owner": "Backgrid.Grid",
  91. "meta": {
  92. "chainable": true
  93. },
  94. "id": "method-insertRow"
  95. },
  96. {
  97. "name": "remove",
  98. "tagname": "method",
  99. "owner": "Backgrid.Grid",
  100. "meta": {
  101. "chainable": true
  102. },
  103. "id": "method-remove"
  104. },
  105. {
  106. "name": "removeColumn",
  107. "tagname": "method",
  108. "owner": "Backgrid.Grid",
  109. "meta": {
  110. "chainable": true
  111. },
  112. "id": "method-removeColumn"
  113. },
  114. {
  115. "name": "removeRow",
  116. "tagname": "method",
  117. "owner": "Backgrid.Grid",
  118. "meta": {
  119. "chainable": true
  120. },
  121. "id": "method-removeRow"
  122. },
  123. {
  124. "name": "render",
  125. "tagname": "method",
  126. "owner": "Backgrid.Grid",
  127. "meta": {
  128. "chainable": true
  129. },
  130. "id": "method-render"
  131. },
  132. {
  133. "name": "sort",
  134. "tagname": "method",
  135. "owner": "Backgrid.Grid",
  136. "meta": {
  137. "chainable": true
  138. },
  139. "id": "method-sort"
  140. }
  141. ],
  142. "event": [
  143. ],
  144. "css_var": [
  145. ],
  146. "css_mixin": [
  147. ]
  148. },
  149. "linenr": 9,
  150. "files": [
  151. {
  152. "filename": "grid.js",
  153. "href": null
  154. }
  155. ],
  156. "html_meta": {
  157. },
  158. "statics": {
  159. "cfg": [
  160. ],
  161. "property": [
  162. ],
  163. "method": [
  164. ],
  165. "event": [
  166. ],
  167. "css_var": [
  168. ],
  169. "css_mixin": [
  170. ]
  171. },
  172. "component": false,
  173. "superclasses": [
  174. "Backbone.View"
  175. ],
  176. "subclasses": [
  177. ],
  178. "mixedInto": [
  179. ],
  180. "parentMixins": [
  181. ],
  182. "html": "<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'>Backbone.View<div class='subclass '><strong>Backgrid.Grid</strong></div></div></pre><div class='doc-contents'><p>Grid represents a data grid that has a header, body and an optional footer.</p>\n\n<p>By default, a Grid treats each model in a collection as a row, and each\nattribute in a model as a column. To render a grid you must provide a list of\ncolumn metadata and a collection to the Grid constructor. Just like any\nBackbone.View class, the grid is rendered as a DOM node fragment when you\ncall render().</p>\n\n<pre><code>var grid = <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a>({\n columns: [{ name: \"id\", label: \"ID\", type: \"string\" },\n // ...\n ],\n collections: books\n});\n\n$(\"#table-container\").append(grid.render().el);\n</code></pre>\n\n<p>Optionally, if you want to customize the rendering of the grid's header and\nfooter, you may choose to extend <a href=\"#!/api/Backgrid.Header\" rel=\"Backgrid.Header\" class=\"docClass\">Backgrid.Header</a> and <a href=\"#!/api/Backgrid.Footer\" rel=\"Backgrid.Footer\" class=\"docClass\">Backgrid.Footer</a>, and\nthen supply that class or an instance of that class to the Grid constructor.\nSee the documentation for Header and Footer for further details.</p>\n\n<pre><code>var grid = <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a>({\n columns: [{ name: \"id\", label: \"ID\", type: \"string\" }],\n collections: books,\n header: Backgrid.Header.extend({\n //...\n }),\n footer: Backgrid.Paginator\n});\n</code></pre>\n\n<p>Finally, if you want to override how the rows are rendered in the table body,\nyou can supply a Body subclass as the <code>body</code> attribute that uses a different\nRow class. See:</p>\n\n<ul>\n<li><a href=\"#!/api/Backgrid.Column\" rel=\"Backgrid.Column\" class=\"docClass\">Backgrid.Column</a></li>\n<li><a href=\"#!/api/Backgrid.Header\" rel=\"Backgrid.Header\" class=\"docClass\">Backgrid.Header</a></li>\n<li><a href=\"#!/api/Backgrid.Body\" rel=\"Backgrid.Body\" class=\"docClass\">Backgrid.Body</a></li>\n<li><a href=\"#!/api/Backgrid.Row\" rel=\"Backgrid.Row\" class=\"docClass\">Backgrid.Row</a></li>\n<li><a href=\"#!/api/Backgrid.Footer\" rel=\"Backgrid.Footer\" class=\"docClass\">Backgrid.Footer</a></li>\n</ul>\n\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-property'>Properties</h3><div class='subsection'><div id='property-body' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-property-body' class='name not-expandable'>body</a><span> : Object</span></div><div class='description'><div class='short'>\n</div><div class='long'>\n</div></div></div><div id='property-className' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-property-className' class='name expandable'>className</a><span> : String</span></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>&quot;backgrid&quot;</code></p></div></div></div><div id='property-footer' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-property-footer' class='name not-expandable'>footer</a><span> : Object</span></div><div class='description'><div class='short'>\n</div><div class='long'>\n</div></div></div><div id='property-header' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-property-header' class='name not-expandable'>header</a><span> : Object</span></div><div class='description'><div class='short'>\n</div><div class='long'>\n</div></div></div><div id='property-tagName' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-property-tagName' class='name expandable'>tagName</a><span> : String</span></div><div class='description'><div class='short'> ...</div><div class='long'>\n<p>Defaults to: <code>&quot;table&quot;</code></p></div></div></div></div></div><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-method'>Methods</h3><div class='subsection'><div id='method-initialize' class='member first-child not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-initialize' class='name expandable'>initialize</a>( <span class='pre'>options</span> )</div><div class='description'><div class='short'>Initializes a Grid instance. ...</div><div class='long'><p>Initializes a Grid instance.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object<div class='sub-desc'>\n<ul><li><span class='pre'>columns</span> : Backbone.Collection.&lt;<a href=\"#!/api/Backgrid.Columns\" rel=\"Backgrid.Columns\" class=\"docClass\">Backgrid.Columns</a>&gt;|Array.&lt;<a href=\"#!/api/Backgrid.Column\" rel=\"Backgrid.Column\" class=\"docClass\">Backgrid.Column</a>&gt;|Array.&lt;Object&gt;<div class='sub-desc'><p>Column metadata.</p>\n</div></li><li><span class='pre'>collection</span> : Backbone.Collection<div class='sub-desc'><p>The collection of tabular model data to display.</p>\n</div></li><li><span class='pre'>header</span> : <a href=\"#!/api/Backgrid.Header\" rel=\"Backgrid.Header\" class=\"docClass\">Backgrid.Header</a> (optional)<div class='sub-desc'><p>An optional Header class to override the default.</p>\n<p>Defaults to: <code>Backgrid.Header</code></p></div></li><li><span class='pre'>body</span> : <a href=\"#!/api/Backgrid.Body\" rel=\"Backgrid.Body\" class=\"docClass\">Backgrid.Body</a> (optional)<div class='sub-desc'><p>An optional Body class to override the default.</p>\n<p>Defaults to: <code>Backgrid.Body</code></p></div></li><li><span class='pre'>row</span> : <a href=\"#!/api/Backgrid.Row\" rel=\"Backgrid.Row\" class=\"docClass\">Backgrid.Row</a> (optional)<div class='sub-desc'><p>An optional Row class to override the default.</p>\n<p>Defaults to: <code>Backgrid.Row</code></p></div></li><li><span class='pre'>footer</span> : <a href=\"#!/api/Backgrid.Footer\" rel=\"Backgrid.Footer\" class=\"docClass\">Backgrid.Footer</a> (optional)<div class='sub-desc'><p>An optional Footer class.</p>\n<p>Defaults to: <code>Backgrid.Footer</code></p></div></li></ul></div></li></ul></div></div></div><div id='method-insertColumn' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-insertColumn' class='name expandable'>insertColumn</a>( <span class='pre'>[options]</span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Delegates to Backgrid.Columns#add for adding a column. ...</div><div class='long'><p>Delegates to Backgrid.Columns#add for adding a column. Subviews can listen\nto the <code>add</code> event from their internal <code>columns</code> if rerendering needs to\nhappen.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Options for <code>Backgrid.Columns#add</code>.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-insertRow' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-insertRow' class='name expandable'>insertRow</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Delegates to Backgrid.Body.insertRow. ...</div><div class='long'><p>Delegates to <a href=\"#!/api/Backgrid.Body-method-insertRow\" rel=\"Backgrid.Body-method-insertRow\" class=\"docClass\">Backgrid.Body.insertRow</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-remove' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-remove' class='name expandable'>remove</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Clean up this grid and its subviews. ...</div><div class='long'><p>Clean up this grid and its subviews.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-removeColumn' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-removeColumn' class='name expandable'>removeColumn</a>( <span class='pre'>[options]</span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Delegates to Backgrid.Columns#remove for removing a column. ...</div><div class='long'><p>Delegates to Backgrid.Columns#remove for removing a column. Subviews can\nlisten to the <code>remove</code> event from the internal <code>columns</code> if rerendering\nneeds to happen.</p>\n<h3 class=\"pa\">Parameters</h3><ul><li><span class='pre'>options</span> : Object (optional)<div class='sub-desc'><p>Options for <code>Backgrid.Columns#remove</code>.</p>\n</div></li></ul><h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-removeRow' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-removeRow' class='name expandable'>removeRow</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Delegates to Backgrid.Body.removeRow. ...</div><div class='long'><p>Delegates to <a href=\"#!/api/Backgrid.Body-method-removeRow\" rel=\"Backgrid.Body-method-removeRow\" class=\"docClass\">Backgrid.Body.removeRow</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-render' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-render' class='name expandable'>render</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Renders the grid's header, then footer, then finally the body. ...</div><div class='long'><p>Renders the grid's header, then footer, then finally the body. Triggers a\nBackbone <code>backgrid:rendered</code> event along with a reference to the grid when\nthe it has successfully been rendered.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div><div id='method-sort' class='member not-inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><span class='defined-in' rel='Backgrid.Grid'>Backgrid.Grid</span><br/></div><a href='#!/api/Backgrid.Grid-method-sort' class='name expandable'>sort</a>( <span class='pre'></span> ) : <a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a><strong class='chainable signature' >chainable</strong></div><div class='description'><div class='short'>Delegates to Backgrid.Body.sort. ...</div><div class='long'><p>Delegates to <a href=\"#!/api/Backgrid.Body-method-sort\" rel=\"Backgrid.Body-method-sort\" class=\"docClass\">Backgrid.Body.sort</a>.</p>\n<h3 class='pa'>Returns</h3><ul><li><span class='pre'><a href=\"#!/api/Backgrid.Grid\" rel=\"Backgrid.Grid\" class=\"docClass\">Backgrid.Grid</a></span><div class='sub-desc'><p>this</p>\n</div></li></ul></div></div></div></div></div></div></div>"
  183. });