/** * Abstract class for Ext.DataView creation in MODx * * This is primarily used for the media browser * but in untestable cases also in a modx-package-browser-thumbs-view * in the package browser (when a node in the tree has the attribute "templated") * * @class MODx.DataView * @extends Ext.DataView * @constructor * @param {Object} config An object of options. * @xtype modx-dataview */ MODx.DataView = function(config) { config = config || {}; this._loadStore(config); Ext.applyIf(config.listeners || {},{ 'loadexception': {fn:this.onLoadException, scope: this} ,'beforeselect': {fn:function(view){ return view.store.getRange().length > 0;}} ,'contextmenu': {fn:this._showContextMenu, scope: this} }); Ext.applyIf(config,{ store: this.store ,singleSelect: true ,overClass: 'x-view-over' ,emptyText: '