raimund@1015: /* Copyright (C) 2013 by Bundesamt fuer Strahlenschutz
raimund@1015:  * Software engineering by Intevation GmbH
raimund@1015:  *
raimund@1015:  * This file is Free Software under the GNU GPL (v>=3)
raimund@1015:  * and comes with ABSOLUTELY NO WARRANTY! Check out
raimund@1015:  * the documentation coming with IMIS-Labordaten-Application for details.
raimund@1015:  */
raimund@1015: 
raimund@1015: Ext.define('Lada.view.widget.base.FavColumn', {
raimund@1015:     extend: 'Ext.grid.column.CheckColumn',
raimund@1015:     alias: 'widget.favcolumn',
raimund@1015: /*
raimund@1015:     constructor: function() {
raimund@1015:         this.addEvents(
raimund@1015:             'checkchange'
raimund@1015:         );
raimund@1015:         this.callParent(arguments);
raimund@1015:     },
raimund@1015: */
raimund@1015:     renderer: function(value, metaData, record) {
raimund@1015:         var cssPrefix = Ext.baseCSSPrefix;
raimund@1015:         var cls = [cssPrefix + 'grid-checkheader'];
raimund@1015:         if (value) {
raimund@1015:             cls.push(cssPrefix + 'grid-favcolumn-checked');
raimund@1015:         }
raimund@1015:         else {
raimund@1015:             cls.push(cssPrefix + 'grid-favcolumn-unchecked');
raimund@1015:         }
raimund@1015:         return '<div class="' + cls.join(' ') + '">&#160;</div>';
raimund@1015:     }
raimund@1015: });