diff --git a/tine20/Tinebase/js/Application.js b/tine20/Tinebase/js/Application.js index 3002092859..a9543a563a 100644 --- a/tine20/Tinebase/js/Application.js +++ b/tine20/Tinebase/js/Application.js @@ -28,7 +28,7 @@ Tine.Tinebase.Application = function(config) { this.hasMainScreen = Ext.isBoolean(this.hasMainScreen) ? this.hasMainScreen : (this.getMainScreen != Tine.Tinebase.Application.prototype.getMainScreen || - typeof Tine[this.appName].MainScreen === 'function'); + typeof Tine[this.appName].MainScreen === 'function' ); this.hasMainScreen = this.hasMainScreen && Tine.Tinebase.common.hasRight('mainscreen', this.appName); diff --git a/tine20/Tinebase/js/ApplicationStarter.js b/tine20/Tinebase/js/ApplicationStarter.js index 10f3c296d6..4261acb836 100644 --- a/tine20/Tinebase/js/ApplicationStarter.js +++ b/tine20/Tinebase/js/ApplicationStarter.js @@ -292,8 +292,8 @@ Ext.apply(Tine.Tinebase.ApplicationStarter,{ const appName = modelConfig.appName; const modelName = modelConfig.modelName; const owningAppName = _.get(fieldconfig, 'owningApp') || appName; - const app = Tine.Tinebase.appMgr.get(owningAppName); - if (! app) { + + if (! Tine.Tinebase.appMgr.getInitialisedRecord(owningAppName)) { Tine.log.error('Application ' + owningAppName + ' not found!'); return null; } @@ -309,17 +309,18 @@ Ext.apply(Tine.Tinebase.ApplicationStarter,{ var fieldTypeKey = (fieldconfig && fieldconfig.type) ? fieldconfig.type : (filterconfig && filterconfig.type) ? filterconfig.type : 'default', label = (filterconfig && filterconfig.hasOwnProperty('label')) ? filterconfig.label : (fieldconfig && fieldconfig.hasOwnProperty('label')) ? fieldconfig.label : null, - globalI18n = ((filterconfig && filterconfig.hasOwnProperty('useGlobalTranslation')) || (fieldconfig && fieldconfig.hasOwnProperty('useGlobalTranslation'))), - i18n = globalI18n ? window.i18n : app.i18n; - + globalI18n = ((filterconfig && filterconfig.hasOwnProperty('useGlobalTranslation')) || (fieldconfig && fieldconfig.hasOwnProperty('useGlobalTranslation'))); + if (! label || _.get(fieldconfig, 'disabled') || _.get(fieldconfig, 'uiconfig.disabled') || _.get(filterOptions, 'disabled')) { return null; } // prepare filter var filter = { - label: i18n._hidden(label), + label, + owningAppName, + globalI18n, field: fieldKey, - gender: i18n._hidden('GENDER_' + label), + gender: 'GENDER_' + label, specialType: fieldconfig ? fieldconfig.specialType : null }; diff --git a/tine20/Tinebase/js/widgets/grid/FilterModel.js b/tine20/Tinebase/js/widgets/grid/FilterModel.js index 7d0f4a6673..355a5ee67e 100644 --- a/tine20/Tinebase/js/widgets/grid/FilterModel.js +++ b/tine20/Tinebase/js/widgets/grid/FilterModel.js @@ -131,6 +131,10 @@ Ext.extend(Tine.widgets.grid.FilterModel, Ext.util.Observable, { // e.g. {name = 'someApp'} this.app = Tine.Tinebase.appMgr.get(this.app); + const i18n = this.globalI18n ? window.i18n : (this.owningAppName ? Tine.Tinebase.appMgr.get(this.owningAppName) : this.app).i18n || window.i18n; + this.label = i18n._hidden(this.label); + this.gender = i18n._hidden(this.gender); + if (this.app) { this.itemName = this.itemName || this.label; this.label = this.app.i18n._hidden(this.label);