theme in preferences
This commit is contained in:
@@ -198,7 +198,7 @@ class Record extends Base
|
||||
|
||||
public function actionExport($params, $data, $request)
|
||||
{
|
||||
if ($this->getConfig()->get('disableExport') && !$this->getUser()->isAdmin()) {
|
||||
if ($this->getConfig()->get('exportDisabled') && !$this->getUser()->isAdmin()) {
|
||||
throw new Forbidden();
|
||||
}
|
||||
|
||||
|
||||
@@ -91,7 +91,7 @@ return array (
|
||||
"tabList" => array("Account", "Contact", "Lead", "Opportunity", "Calendar", "Meeting", "Call", "Task", "Case", "Email", "Document", "Campaign"),
|
||||
"quickCreateList" => array("Account", "Contact", "Lead", "Opportunity", "Meeting", "Call", "Task", "Case"),
|
||||
'calendarDefaultEntity' => 'Meeting',
|
||||
'disableExport' => false,
|
||||
'exportDisabled' => false,
|
||||
'assignmentEmailNotifications' => false,
|
||||
'assignmentEmailNotificationsEntityList' => array('Lead', 'Opportunity', 'Task', 'Case'),
|
||||
'assignmentNotificationsEntityList' => array('Meeting', 'Call', 'Task', 'Email'),
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
"ldapUserLoginFilter": "Login Filter benutzen",
|
||||
"ldapAccountDomainNameShort": "Domain Name Konto kurz",
|
||||
"ldapOptReferrals": "Opt Referrals",
|
||||
"disableExport": "Export deaktivieren (nur Admin ist berechtigt)",
|
||||
"exportDisabled": "Export deaktivieren (nur Admin ist berechtigt)",
|
||||
"assignmentNotificationsEntityList": "Entitäten über die bei Zuweisung benachrichtigt werden soll",
|
||||
"assignmentEmailNotifications": "E-Mail Nachrichten bei Zuweisungen senden",
|
||||
"assignmentEmailNotificationsEntityList": "Entitäten über die mit E-Mail bei Zuweisung benachrichtigt werden soll",
|
||||
"b2cMode": "B2C Modus",
|
||||
"disableAvatars": "Avatare deaktivieren",
|
||||
"avatarsDisabled": "Avatare deaktivieren",
|
||||
"followCreatedEntities": "Erstellten Einträgen beobachten"
|
||||
},
|
||||
"options": {
|
||||
|
||||
@@ -160,7 +160,8 @@
|
||||
"Tree View": "Tree View",
|
||||
"Unlink All": "Unlink All",
|
||||
"Total": "Total",
|
||||
"Print to PDF": "Print to PDF"
|
||||
"Print to PDF": "Print to PDF",
|
||||
"Default": "Default"
|
||||
},
|
||||
"messages": {
|
||||
"pleaseWait": "Please wait...",
|
||||
|
||||
@@ -22,7 +22,8 @@
|
||||
"autoFollowEntityTypeList": "Auto-Follow",
|
||||
"signature": "Email Signature",
|
||||
"dashboardTabList": "Tab List",
|
||||
"defaultReminders": "Default Reminders"
|
||||
"defaultReminders": "Default Reminders",
|
||||
"theme": "Theme"
|
||||
},
|
||||
"links": {
|
||||
},
|
||||
|
||||
@@ -45,15 +45,16 @@
|
||||
"ldapUserLoginFilter": "User Login Filter",
|
||||
"ldapAccountDomainNameShort": "Account Domain Name Short",
|
||||
"ldapOptReferrals": "Opt Referrals",
|
||||
"disableExport": "Disable Export (only admin is allowed)",
|
||||
"exportDisabled": "Disable Export (only admin is allowed)",
|
||||
"assignmentNotificationsEntityList": "Entities to Notify about upon Assignment",
|
||||
"assignmentEmailNotifications": "Send Email Notifications upon Assignment",
|
||||
"assignmentEmailNotificationsEntityList": "Entities to Notify about with Email upon Assignment",
|
||||
"b2cMode": "B2C Mode",
|
||||
"disableAvatars": "Disable Avatars",
|
||||
"avatarsDisabled": "Disable Avatars",
|
||||
"followCreatedEntities": "Follow Created Entities",
|
||||
"displayListViewRecordCount": "Display Total Count (on List View)",
|
||||
"theme": "Theme"
|
||||
"theme": "Theme",
|
||||
"userThemesDisabled": "Disable User Themes"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
|
||||
@@ -10,12 +10,12 @@
|
||||
"defaultCurrency": "Moneda por Defecto",
|
||||
"baseCurrency": "Moneda Base",
|
||||
"currencyRates": "Valores Tarifa",
|
||||
|
||||
|
||||
"currencyList": "Lista de Moneda",
|
||||
"language": "Idioma",
|
||||
|
||||
|
||||
"companyLogo": "Logo Compañia",
|
||||
|
||||
|
||||
"smtpServer": "Servidor",
|
||||
"smtpPort": "Puerto",
|
||||
"smtpAuth": "Autenticación",
|
||||
@@ -26,14 +26,14 @@
|
||||
"outboundEmailFromName": "De Nombre",
|
||||
"outboundEmailFromAddress": "De la dirección",
|
||||
"outboundEmailIsShared": "Es Compartido",
|
||||
|
||||
|
||||
"recordsPerPage": "Registros por Página",
|
||||
"recordsPerPageSmall": "Registros Por Página (Pequeño)",
|
||||
"recordsPerPageSmall": "Registros Por Página (Pequeño)",
|
||||
"tabList": "Lista Pestaña",
|
||||
"quickCreateList": "Crear Lista Rápida",
|
||||
|
||||
|
||||
"exportDelimiter": "Exportar Delimitador",
|
||||
|
||||
|
||||
"authenticationMethod": "Método de Autentificación",
|
||||
"ldapHost": "Host",
|
||||
"ldapPort": "Puerto",
|
||||
@@ -50,7 +50,7 @@
|
||||
"ldapUserLoginFilter": "Usar Filtro en el Login",
|
||||
"ldapAccountDomainNameShort": "Nombre Dominio Corto para la Cuenta",
|
||||
"ldapOptReferrals": "Referencias Opt",
|
||||
"disableExport": "Desactivar Exportar (Solo admin está permitido)",
|
||||
"exportDisabled": "Desactivar Exportar (Solo admin está permitido)",
|
||||
"assignmentEmailNotifications": "Enviar Correos Electrónicos de notificación sobre Asignación",
|
||||
"assignmentEmailNotificationsEntityList": "Entidades a Notificar"
|
||||
},
|
||||
|
||||
@@ -52,12 +52,12 @@
|
||||
"ldapUserLoginFilter": "Filtre des Connexions utilisateur",
|
||||
"ldapAccountDomainNameShort": "Compte du nom de domaine réduit",
|
||||
"ldapOptReferrals": "Abonnés parrainés",
|
||||
"disableExport": "Désactiver l'Export (seul l'administrateur pourra le faire)",
|
||||
"exportDisabled": "Désactiver l'Export (seul l'administrateur pourra le faire)",
|
||||
"assignmentNotificationsEntityList": "Entités à prévenir lors d'affectations",
|
||||
"assignmentEmailNotifications": "Envoyer des notifications emal lors d'affectations",
|
||||
"assignmentEmailNotificationsEntityList": "Entités à notifier par email lors d'affectations",
|
||||
"b2cMode": "Mode B2C",
|
||||
"disableAvatars": "Désactiver les Avatars"
|
||||
"avatarsDisabled": "Désactiver les Avatars"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
|
||||
@@ -50,11 +50,11 @@
|
||||
"ldapUserLoginFilter": "Gebruikers Login Filter",
|
||||
"ldapAccountDomainNameShort": "Korte Gebruikers Domein Naam",
|
||||
"ldapOptReferrals": "Opt Referentie",
|
||||
"disableExport": "Exporteren Uitschakelen (Uitsluitend toegestaan voor Admin)",
|
||||
"exportDisabled": "Exporteren Uitschakelen (Uitsluitend toegestaan voor Admin)",
|
||||
"assignmentEmailNotifications": "Verzend Email na Toewijzing",
|
||||
"assignmentEmailNotificationsEntityList": "Entities om over te informeren",
|
||||
"b2cMode": "B2C Mode",
|
||||
"disableAvatars": "Avatar uitschakelen"
|
||||
"avatarsDisabled": "Avatar uitschakelen"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"ldapUserLoginFilter": "Filtr użytkoników ",
|
||||
"ldapAccountDomainNameShort": "Krótka nazwa konta domeny",
|
||||
"ldapOptReferrals": "Opt Referrals",
|
||||
"disableExport": "Disable Export (only admin is allowed)",
|
||||
"exportDisabled": "Disable Export (only admin is allowed)",
|
||||
"assignmentEmailNotifications": "Wyślij powiadominie do użytkonika o przypisaniu",
|
||||
"assignmentEmailNotificationsEntityList": "Entities to Notify About"
|
||||
},
|
||||
|
||||
@@ -52,11 +52,11 @@
|
||||
"ldapUserLoginFilter": "Filtro para Login de Usuário",
|
||||
"ldapAccountDomainNameShort": "Nome curto do Domínio da Conta",
|
||||
"ldapOptReferrals": "Referências Opt",
|
||||
"disableExport": "Desabilitar exportação (permitido apenas para administradores)",
|
||||
"exportDisabled": "Desabilitar exportação (permitido apenas para administradores)",
|
||||
"assignmentEmailNotifications": "Enviar notificações sobre as designações por e-mail",
|
||||
"assignmentEmailNotificationsEntityList": "Entidades para notificar",
|
||||
"b2cMode": "Modo B2C",
|
||||
"disableAvatars": "Desabilitar Avatares"
|
||||
"avatarsDisabled": "Desabilitar Avatares"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"ldapUserLoginFilter": "User Login Filter",
|
||||
"ldapAccountDomainNameShort": "Account Domain Name Short",
|
||||
"ldapOptReferrals": "Opt Referrals",
|
||||
"disableExport": "Disable Export (only admin is allowed)"
|
||||
"exportDisabled": "Disable Export (only admin is allowed)"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
|
||||
@@ -50,7 +50,7 @@
|
||||
"ldapUserLoginFilter": "Фильтер пользовательской авторизации",
|
||||
"ldapAccountDomainNameShort": "Краткая учетная запись домена",
|
||||
"ldapOptReferrals": "Opt Referrals",
|
||||
"disableExport": "Отмена экпортирования (доступно только администратору)",
|
||||
"exportDisabled": "Отмена экпортирования (доступно только администратору)",
|
||||
"assignmentEmailNotifications": "Оповещать по email при назначении",
|
||||
"assignmentEmailNotificationsEntityList": "Список вещей для оповещения",
|
||||
|
||||
|
||||
@@ -45,12 +45,12 @@
|
||||
"ldapUserLoginFilter": "Фільтр логіну користувача",
|
||||
"ldapAccountDomainNameShort": "Account Domain Name Short",
|
||||
"ldapOptReferrals": "Оптові реферали",
|
||||
"disableExport": "Вимкнути експортування (доступно лише адміністру)",
|
||||
"exportDisabled": "Вимкнути експортування (доступно лише адміністру)",
|
||||
"assignmentNotificationsEntityList": "Entities to Notify about upon Assignment",
|
||||
"assignmentEmailNotifications": "Посилати сповіщення на емейл при назначенні",
|
||||
"assignmentEmailNotificationsEntityList": "Entities to Notify about with Email upon Assignment",
|
||||
"b2cMode": "Режим В2С",
|
||||
"disableAvatars": "Вимкнути аватари",
|
||||
"avatarsDisabled": "Вимкнути аватари",
|
||||
"followCreatedEntities": "Follow Created Entities"
|
||||
},
|
||||
"options": {
|
||||
|
||||
@@ -47,7 +47,7 @@
|
||||
"ldapUserLoginFilter": "Bộ lọc đăng nhập",
|
||||
"ldapAccountDomainNameShort": "Tên miền tài khoản",
|
||||
"ldapOptReferrals": "Được giới thiệu",
|
||||
"disableExport": "Disable Export (only admin is allowed)"
|
||||
"exportDisabled": "Disable Export (only admin is allowed)"
|
||||
},
|
||||
"options": {
|
||||
"weekStart": {
|
||||
|
||||
@@ -43,6 +43,10 @@
|
||||
{
|
||||
"name": "defaultReminders"
|
||||
}
|
||||
],
|
||||
[
|
||||
{"name":"theme"},
|
||||
false
|
||||
]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
"label": "System",
|
||||
"rows": [
|
||||
[{"name": "useCache"},{"name": "companyLogo"}],
|
||||
[{"name": "disableExport"},{"name": "globalSearchEntityList"}],
|
||||
[{"name": "exportDisabled"},{"name": "globalSearchEntityList"}],
|
||||
[{"name": "followCreatedEntities"}, false]
|
||||
]
|
||||
},
|
||||
|
||||
@@ -2,9 +2,9 @@
|
||||
{
|
||||
"label": "Configuration",
|
||||
"rows": [
|
||||
[{"name": "theme"}, {"name": "disableAvatars"}],
|
||||
[{"name": "theme"}, {"name": "userThemesDisabled"}],
|
||||
[{"name": "recordsPerPage"},{"name": "displayListViewRecordCount"}],
|
||||
[{"name": "recordsPerPageSmall"},false],
|
||||
[{"name": "recordsPerPageSmall"},{"name": "avatarsDisabled"}],
|
||||
[{"name": "tabList"},{"name": "quickCreateList"}]
|
||||
]
|
||||
}
|
||||
|
||||
@@ -102,6 +102,11 @@
|
||||
"defaultReminders": {
|
||||
"type": "jsonArray",
|
||||
"view": "Crm:Meeting.Fields.Reminders"
|
||||
},
|
||||
"theme": {
|
||||
"type": "enum",
|
||||
"view": "Preferences.Fields.Theme",
|
||||
"translation": "Global.themes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -202,7 +202,7 @@
|
||||
"type": "bool",
|
||||
"default": true
|
||||
},
|
||||
"disableExport": {
|
||||
"exportDisabled": {
|
||||
"type": "bool",
|
||||
"default": false
|
||||
},
|
||||
@@ -224,7 +224,7 @@
|
||||
"type": "bool",
|
||||
"default": false
|
||||
},
|
||||
"disableAvatars": {
|
||||
"avatarsDisabled": {
|
||||
"type": "bool",
|
||||
"default": false
|
||||
},
|
||||
@@ -239,11 +239,13 @@
|
||||
"displayListViewRecordCount": {
|
||||
"type": "bool"
|
||||
},
|
||||
"userThemesDisabled": {
|
||||
"type": "bool"
|
||||
},
|
||||
"theme": {
|
||||
"type": "enum",
|
||||
"view": "Settings.Fields.Theme",
|
||||
"translation": "Global.themes",
|
||||
"isSorted": true
|
||||
"translation": "Global.themes"
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -22,8 +22,8 @@
|
||||
|
||||
Espo.define(
|
||||
'app',
|
||||
['ui', 'utils', 'acl', 'cache', 'storage', 'models/settings', 'language', 'metadata', 'field-manager', 'models/user', 'models/preferences', 'model-factory' ,'collection-factory', 'pre-loader', 'view-helper', 'controllers/base', 'router', 'date-time', 'layout-manager'],
|
||||
function (Ui, Utils, Acl, Cache, Storage, Settings, Language, Metadata, FieldManager, User, Preferences, ModelFactory, CollectionFactory, PreLoader, ViewHelper, BaseController, Router, DateTime, LayoutManager) {
|
||||
['ui', 'utils', 'acl', 'cache', 'storage', 'models/settings', 'language', 'metadata', 'field-manager', 'models/user', 'models/preferences', 'model-factory' ,'collection-factory', 'pre-loader', 'view-helper', 'controllers/base', 'router', 'date-time', 'layout-manager', 'theme-manager'],
|
||||
function (Ui, Utils, Acl, Cache, Storage, Settings, Language, Metadata, FieldManager, User, Preferences, ModelFactory, CollectionFactory, PreLoader, ViewHelper, BaseController, Router, DateTime, LayoutManager, ThemeManager) {
|
||||
|
||||
var App = function (options, callback) {
|
||||
var options = options || {};
|
||||
@@ -61,6 +61,8 @@ Espo.define(
|
||||
this.preferences.settings = this.settings;
|
||||
this.acl = new Acl(this.user);
|
||||
|
||||
this.themeManager = new ThemeManager(this.settings, this.preferences, this.metadata);
|
||||
|
||||
this._modelFactory = new ModelFactory(this.loader, this.metadata, this.user);
|
||||
this._collectionFactory = new CollectionFactory(this.loader, this._modelFactory);
|
||||
|
||||
@@ -68,7 +70,7 @@ Espo.define(
|
||||
this._initView();
|
||||
this._initBaseController();
|
||||
|
||||
this._preLoader = new PreLoader(this.cache, this._viewFactory);
|
||||
this._preLoader = new PreLoader(this.cache, this._viewFactory, this.themeManager);
|
||||
|
||||
this._preLoad(function () {
|
||||
callback.call(this, this);
|
||||
@@ -135,6 +137,9 @@ Espo.define(
|
||||
this.user.defs = this.metadata.get('entityDefs.User');
|
||||
this.preferences.defs = this.metadata.get('entityDefs.Preferences');
|
||||
|
||||
if (this.themeManager.isUserTheme()) {
|
||||
$('#main-stylesheet').attr('href', this.themeManager.getStylesheet());
|
||||
}
|
||||
|
||||
this.loader.addLibsConfig(this.metadata.get('app.jsLibs') || {});
|
||||
|
||||
@@ -267,6 +272,7 @@ Espo.define(
|
||||
helper.fieldManager = this.fieldManager;
|
||||
helper.cache = this.cache;
|
||||
helper.storage = this.storage;
|
||||
helper.themeManager = this.themeManager;
|
||||
|
||||
this._viewLoader = function (viewName, callback) {
|
||||
Espo.require(Espo.Utils.composeViewClassName(viewName), callback);
|
||||
|
||||
@@ -0,0 +1,70 @@
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
Espo.define('theme-manager', [], function () {
|
||||
|
||||
var ThemeManager = function (config, preferences, metadata) {
|
||||
this.config = config;
|
||||
this.preferences = preferences;
|
||||
this.metadata = metadata;
|
||||
|
||||
/*this.preferences.on('change:theme', function () {
|
||||
if (this.getStylesheet() && this.isUserTheme()) {
|
||||
$('#main-stylesheet').attr('href', this.getStylesheet());
|
||||
}
|
||||
}, this);*/
|
||||
};
|
||||
|
||||
_.extend(ThemeManager.prototype, {
|
||||
|
||||
getName: function () {
|
||||
if (!this.config.get('userThemesDisabled')) {
|
||||
var name = this.preferences.get('theme');
|
||||
if (name && name !== '') {
|
||||
return name;
|
||||
}
|
||||
}
|
||||
return this.config.get('name');
|
||||
},
|
||||
|
||||
getStylesheet: function () {
|
||||
return this.metadata.get('themes.' + this.getName() + '.stylesheet') || 'client/css/espo.css';
|
||||
},
|
||||
|
||||
getParam: function (name) {
|
||||
return this.metadata.get('themes.' + this.getName() + '.' + name) || null;
|
||||
},
|
||||
|
||||
isUserTheme: function () {
|
||||
if (!this.config.get('userThemesDisabled')) {
|
||||
var name = this.preferences.get('theme');
|
||||
if (name && name !== '') {
|
||||
if (name !== this.config.get('theme')) {
|
||||
return true;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
return ThemeManager;
|
||||
|
||||
});
|
||||
@@ -147,6 +147,12 @@ Espo.define('view', [], function () {
|
||||
}
|
||||
},
|
||||
|
||||
getThemeManager: function () {
|
||||
if (this._helper) {
|
||||
return this._helper.themeManager;
|
||||
}
|
||||
},
|
||||
|
||||
updatePageTitle: function () {
|
||||
var title = this.getConfig().get('applicationTitle') || 'EspoCRM';
|
||||
this.setPageTitle(title);
|
||||
|
||||
@@ -36,7 +36,7 @@ Espo.define('Views.Fields.UserWithAvatar', 'Views.Fields.Link', function (Dep) {
|
||||
},
|
||||
|
||||
getAvatarHtml: function () {
|
||||
if (this.getConfig().get('disableAvatars')) {
|
||||
if (this.getConfig().get('avatarsDisabled')) {
|
||||
return '';
|
||||
}
|
||||
var t;
|
||||
|
||||
@@ -70,7 +70,7 @@ Espo.define('Views.Notifications.Notification', 'View', function (Dep) {
|
||||
},
|
||||
|
||||
getAvatarHtml: function () {
|
||||
if (this.getConfig().get('disableAvatars')) {
|
||||
if (this.getConfig().get('avatarsDisabled')) {
|
||||
return '';
|
||||
}
|
||||
var t;
|
||||
|
||||
@@ -0,0 +1,40 @@
|
||||
/************************************************************************
|
||||
* This file is part of EspoCRM.
|
||||
*
|
||||
* EspoCRM - Open Source CRM application.
|
||||
* Copyright (C) 2014-2015 Yuri Kuznetsov, Taras Machyshyn, Oleksiy Avramenko
|
||||
* Website: http://www.espocrm.com
|
||||
*
|
||||
* EspoCRM is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, either version 3 of the License, or
|
||||
* (at your option) any later version.
|
||||
*
|
||||
* EspoCRM is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with EspoCRM. If not, see http://www.gnu.org/licenses/.
|
||||
************************************************************************/
|
||||
Espo.define('views/preferences/fields/theme', 'views/fields/enum', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
setup: function () {
|
||||
this.params.options = Object.keys(this.getMetadata().get('themes')).sort(function (v1, v2) {
|
||||
return this.translate(v1, 'theme').localeCompare(this.translate(v2, 'theme'));
|
||||
}.bind(this));
|
||||
|
||||
this.params.options.unshift('');
|
||||
|
||||
Dep.prototype.setup.call(this);
|
||||
|
||||
this.translatedOptions = this.translatedOptions || {};
|
||||
this.translatedOptions[''] = this.translate('Default');
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
});
|
||||
@@ -96,6 +96,10 @@ Espo.define('Views.Preferences.Record.Edit', 'Views.Record.Edit', function (Dep)
|
||||
this.hideField('receiveAssignmentEmailNotifications');
|
||||
}
|
||||
|
||||
if (this.getConfig().get('userThemesDisabled')) {
|
||||
this.hideField('theme');
|
||||
}
|
||||
|
||||
var smtpSecurityField = this.getFieldView('smtpSecurity');
|
||||
this.listenTo(smtpSecurityField, 'change', function () {
|
||||
var smtpSecurity = smtpSecurityField.fetch()['smtpSecurity'];
|
||||
|
||||
@@ -141,11 +141,8 @@ Espo.define('Views.Record.Detail', 'Views.Record.Base', function (Dep) {
|
||||
afterRender: function () {
|
||||
var $container = this.$el.find('.detail-button-container');
|
||||
|
||||
var theme = this.getConfig().get('theme');
|
||||
var themeDefs = this.getMetadata().get('themes.' + theme) || {};
|
||||
|
||||
var stickTop = themeDefs.stickTop || 62;
|
||||
var blockHeight = themeDefs.blockHeight || 21;
|
||||
var stickTop = this.getThemeManager().getParam('stickTop') || 62;
|
||||
var blockHeight = this.getThemeManager().getParam('blockHeight') || 21;
|
||||
|
||||
var $block = $('<div>').css('height', blockHeight + 'px').html(' ').hide().insertAfter($container);
|
||||
var $record = this.getView('record').$el;
|
||||
|
||||
@@ -446,7 +446,7 @@ Espo.define('Views.Record.List', 'View', function (Dep) {
|
||||
},
|
||||
|
||||
massActionExport: function () {
|
||||
if (!this.getConfig().get('disableExport') || this.getUser().get('isAdmin')) {
|
||||
if (!this.getConfig().get('exportDisabled') || this.getUser().get('isAdmin')) {
|
||||
this.export();
|
||||
}
|
||||
},
|
||||
@@ -476,7 +476,7 @@ Espo.define('Views.Record.List', 'View', function (Dep) {
|
||||
}, this);
|
||||
this.checkAllResultMassActionList = checkAllResultMassActionList;
|
||||
|
||||
if (this.getConfig().get('disableExport') && !this.getUser().get('isAdmin')) {
|
||||
if (this.getConfig().get('exportDisabled') && !this.getUser().get('isAdmin')) {
|
||||
this.removeMassAction('export');
|
||||
}
|
||||
|
||||
|
||||
@@ -116,10 +116,10 @@ Espo.define('Views.Site.Navbar', 'View', function (Dep) {
|
||||
|
||||
var self = this;
|
||||
|
||||
var theme = this.getConfig().get('theme');
|
||||
var themeDefs = this.getMetadata().get('themes.' + theme) || {};
|
||||
var navbarIsVertical = this.getThemeManager().getParam('navbarIsVertical');
|
||||
var navbarStaticItemsHeight = this.getThemeManager().getParam('navbarStaticItemsHeight') || 0;
|
||||
|
||||
if (!themeDefs.navbarIsVertical) {
|
||||
if (!navbarIsVertical) {
|
||||
var $tabs = this.$el.find('ul.tabs');
|
||||
var $more = $tabs.find('li.dropdown > ul');
|
||||
|
||||
@@ -196,7 +196,6 @@ Espo.define('Views.Site.Navbar', 'View', function (Dep) {
|
||||
} else {
|
||||
var $tabs = this.$el.find('ul.tabs');
|
||||
|
||||
var navbarStaticItemsHeight = themeDefs.navbarStaticItemsHeight || 0;
|
||||
var updateHeight = function () {
|
||||
var windowHeight = window.innerHeight;
|
||||
|
||||
|
||||
@@ -117,7 +117,7 @@ Espo.define('Views.Stream.Note', 'View', function (Dep) {
|
||||
},
|
||||
|
||||
getAvatarHtml: function () {
|
||||
if (this.getConfig().get('disableAvatars')) {
|
||||
if (this.getConfig().get('avatarsDisabled')) {
|
||||
return '';
|
||||
}
|
||||
var t;
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
Espo.define('Views.User.Fields.Name', 'Views.Fields.PersonName', function (Dep) {
|
||||
|
||||
return Dep.extend({
|
||||
|
||||
|
||||
listTemplate: 'user.fields.name.list-link',
|
||||
|
||||
listLinkTemplate: 'user.fields.name.list-link',
|
||||
@@ -33,7 +33,7 @@ Espo.define('Views.User.Fields.Name', 'Views.Fields.PersonName', function (Dep)
|
||||
},
|
||||
|
||||
getAvatarHtml: function () {
|
||||
if (this.getConfig().get('disableAvatars')) {
|
||||
if (this.getConfig().get('avatarsDisabled')) {
|
||||
return '';
|
||||
}
|
||||
var t;
|
||||
@@ -47,5 +47,5 @@ Espo.define('Views.User.Fields.Name', 'Views.Fields.PersonName', function (Dep)
|
||||
},
|
||||
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
<head>
|
||||
<title>EspoCRM</title>
|
||||
<script type="text/javascript" src="client/espo.min.js?r=@@timestamp"></script>
|
||||
<link href="{{stylesheet}}?r=@@timestamp" rel="stylesheet">
|
||||
<link href="{{stylesheet}}?r=@@timestamp" rel="stylesheet" id='main-stylesheet'>
|
||||
<meta content="text/html;charset=utf-8" http-equiv="Content-Type">
|
||||
<meta content="utf-8" http-equiv="encoding">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
|
||||
|
||||
+1
-1
@@ -26,7 +26,7 @@
|
||||
<script type="text/javascript" src="client/src/exceptions.js"></script>
|
||||
|
||||
|
||||
<link href="{{stylesheet}}" rel="stylesheet">
|
||||
<link href="{{stylesheet}}" rel="stylesheet" id='main-stylesheet'>
|
||||
|
||||
<link rel="icon" href="client/img/favicon.ico" type="image/x-icon">
|
||||
<link rel="shortcut icon" href="client/img/favicon.ico" type="image/x-icon">
|
||||
|
||||
Reference in New Issue
Block a user