X-Git-Url: http://git.ithinksw.org/extjs.git/blobdiff_plain/3789b528d8dd8aad4558e38e22d775bcab1cbd36..6746dc89c47ed01b165cc1152533605f97eb8e8d:/src/view/BoundList.js diff --git a/src/view/BoundList.js b/src/view/BoundList.js index e1a72275..b240fcf9 100644 --- a/src/view/BoundList.js +++ b/src/view/BoundList.js @@ -1,3 +1,17 @@ +/* + +This file is part of Ext JS 4 + +Copyright (c) 2011 Sencha Inc + +Contact: http://www.sencha.com/contact + +GNU General Public License Usage +This file may be used under the terms of the GNU General Public License version 3.0 as published by the Free Software Foundation and appearing in the file LICENSE included in the packaging of this file. Please review the following information to ensure the GNU General Public License version 3.0 requirements will be met: http://www.gnu.org/copyleft/gpl.html. + +If you are unsure which license is appropriate for your use, please contact the sales department at http://www.sencha.com/contact. + +*/ /** * @class Ext.view.BoundList * @extends Ext.view.View @@ -50,13 +64,17 @@ Ext.define('Ext.view.BoundList', { me.addCls(baseCls + '-floating'); } - // should be setting aria-posinset based on entire set of data - // not filtered set - me.tpl = Ext.create('Ext.XTemplate', - '' - ); + if (!me.tpl) { + // should be setting aria-posinset based on entire set of data + // not filtered set + me.tpl = Ext.create('Ext.XTemplate', + '' + ); + } else if (Ext.isString(me.tpl)) { + me.tpl = Ext.create('Ext.XTemplate', me.tpl); + } if (me.pageSize) { me.pagingToolbar = me.createPagingToolbar(); @@ -112,14 +130,14 @@ Ext.define('Ext.view.BoundList', { me.refreshed--; } }, - + initAria: function() { this.callParent(); - + var selModel = this.getSelectionModel(), mode = selModel.getSelectionMode(), actionEl = this.getActionEl(); - + // TODO: subscribe to mode changes or allow the selModel to manipulate this attribute. if (mode !== 'SINGLE') { actionEl.dom.setAttribute('aria-multiselectable', true); @@ -131,3 +149,4 @@ Ext.define('Ext.view.BoundList', { this.callParent(); } }); +