You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

20 lines
309 KiB

2 years ago
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. /*
  2. This file is part of Ext JS 3.4
  3. Copyright (c) 2011-2013 Sencha Inc
  4. Contact: http://www.sencha.com/contact
  5. GNU General Public License Usage
  6. This file may be used under the terms of the GNU General Public License version 3.0 as
  7. published by the Free Software Foundation and appearing in the file LICENSE included in the
  8. packaging of this file.
  9. Please review the following information to ensure the GNU General Public License version 3.0
  10. requirements will be met: http://www.gnu.org/copyleft/gpl.html.
  11. If you are unsure which license is appropriate for your use, please contact the sales department
  12. at http://www.sencha.com/contact.
  13. Build date: 2013-04-03 15:07:25
  14. */
  15. Ext.data.JsonP.Ext_list_ListView({"alternateClassNames":[],"aliases":{"widget":["listview"]},"enum":null,"parentMixins":[],"tagname":"class","subclasses":[],"extends":"Ext.DataView","uses":[],"html":"<div><pre class=\"hierarchy\"><h4>Hierarchy</h4><div class='subclass first-child'><a href='#!/api/Ext.util.Observable' rel='Ext.util.Observable' class='docClass'>Ext.util.Observable</a><div class='subclass '><a href='#!/api/Ext.Component' rel='Ext.Component' class='docClass'>Ext.Component</a><div class='subclass '><a href='#!/api/Ext.BoxComponent' rel='Ext.BoxComponent' class='docClass'>Ext.BoxComponent</a><div class='subclass '><a href='#!/api/Ext.DataView' rel='Ext.DataView' class='docClass'>Ext.DataView</a><div class='subclass '><strong>Ext.list.ListView</strong></div></div></div></div></div><h4>Files</h4><div class='dependency'><a href='source/ListView.html#Ext-list-ListView' target='_blank'>ListView.js</a></div></pre><div class='doc-contents'><p><a href=\"#!/api/Ext.list.ListView\" rel=\"Ext.list.ListView\" class=\"docClass\">Ext.list.ListView</a> is a fast and light-weight implentation of a\n<a href=\"#!/api/Ext.grid.GridPanel\" rel=\"Ext.grid.GridPanel\" class=\"docClass\">Grid</a> like view with the following characteristics:</p>\n\n\n<div class=\"mdetail-params\"><ul>\n<li>resizable columns</li>\n<li>selectable</li>\n<li>column widths are initially proportioned by percentage based on the container\nwidth and number of columns</li>\n<li>uses templates to render the data in any required format</li>\n<li>no horizontal scrolling</li>\n<li>no editing</li>\n</ul></div>\n\n\n<p>Example usage:</p>\n\n\n<pre><code>// consume JSON of this form:\n{\n \"images\":[\n {\n \"name\":\"dance_fever.jpg\",\n \"size\":2067,\n \"lastmod\":1236974993000,\n \"url\":\"images\\/thumbs\\/dance_fever.jpg\"\n },\n {\n \"name\":\"zack_sink.jpg\",\n \"size\":2303,\n \"lastmod\":1236974993000,\n \"url\":\"images\\/thumbs\\/zack_sink.jpg\"\n }\n ]\n}\nvar store = new <a href=\"#!/api/Ext.data.JsonStore\" rel=\"Ext.data.JsonStore\" class=\"docClass\">Ext.data.JsonStore</a>({\n url: 'get-images.php',\n root: 'images',\n fields: [\n 'name', 'url',\n {name:'size', type: 'float'},\n {name:'lastmod', type:'date', dateFormat:'timestamp'}\n ]\n});\nstore.load();\n\nvar listView = new <a href=\"#!/api/Ext.list.ListView\" rel=\"Ext.list.ListView\" class=\"docClass\">Ext.list.ListView</a>({\n store: store,\n multiSelect: true,\n emptyText: 'No images to display',\n reserveScrollOffset: true,\n columns: [{\n header: 'File',\n width: .5,\n dataIndex: 'name'\n },{\n header: 'Last Modified',\n width: .35,\n dataIndex: 'lastmod',\n tpl: '{lastmod:date(\"m-d h:i a\")}'\n },{\n header: 'Size',\n dataIndex: 'size',\n tpl: '{size:fileSize}', // format using <a href=\"#!/api/Ext.util.Format-method-fileSize\" rel=\"Ext.util.Format-method-fileSize\" class=\"docClass\">Ext.util.Format.fileSize</a>()\n align: 'right'\n }]\n});\n\n// put it in a Panel so it looks pretty\nvar panel = new <a href=\"#!/api/Ext.Panel\" rel=\"Ext.Panel\" class=\"docClass\">Ext.Panel</a>({\n id:'images-view',\n width:425,\n height:250,\n collapsible:true,\n layout:'fit',\n title:'Simple ListView <i>(0 items selected)</i>',\n items: listView\n});\npanel.render(document.body);\n\n// little bit of feedback\nlistView.on('selectionchange', function(view, nodes){\n var l = nodes.length;\n var s = l != 1 ? 's' : '';\n panel.setTitle('Simple ListView <i>('+l+' item'+s+' selected)</i>');\n});\n</code></pre>\n\n</div><div class='members'><div class='members-section'><div class='definedBy'>Defined By</div><h3 class='members-title icon-cfg'>Config options</h3><div class='subsection'><div id='cfg-allowDomMove' class='member first-child inherited'><a href='#' class='side expandable'><span>&nbsp;</span></a><div class='title'><div class='meta'><a href='#!/api/Ext