0009768: Use ModelConfig for Timetracker models
[tine20] / tine20 / Timetracker / js / TimeaccountResponsibleFilterModel.js
1 /**
2  * Tine 2.0
3  *
4  * @package     Timetracker
5  * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
6  * @author      Alexander Stintzing <a.stintzing@metaways.de>
7  * @copyright   Copyright (c) 2014 Metaways Infosystems GmbH (http://www.metaways.de)
8  */
9
10 Ext.ns('Tine.Timetracker');
11
12 /**
13  * @namespace   Tine.Timetracker
14  * @class       Tine.Timetracker.TimeaccountResponsibleFilterModel
15  * @extends     Tine.widgets.grid.ForeignRecordFilter
16  *
17  * @author      Alexander Stintzing <a.stintzing@metaways.de>
18  */
19 Tine.Timetracker.TimeaccountResponsibleFilterModel = Ext.extend(Tine.widgets.grid.ForeignRecordFilter, {
20
21     // private
22     field: 'responsible',
23     valueType: 'relation',
24
25     /**
26      * @private
27      */
28     initComponent: function() {
29         this.app = Tine.Tinebase.appMgr.get('Timetracker');
30         this.label = this.app.i18n._('Responsible');
31         this.foreignRecordClass = 'Addressbook.Contact',
32             this.pickerConfig = {emptyText: this.app.i18n._('without responsible'), allowBlank: true};
33
34         Tine.Timetracker.TimeaccountResponsibleFilterModel.superclass.initComponent.call(this);
35     }
36 });
37
38 Tine.widgets.grid.FilterToolbar.FILTERS['timetracker.timeaccountresponsible'] = Tine.Timetracker.TimeaccountResponsibleFilterModel;