Skip to content

EspoCRM – Open Source CRM Application

Record content full width. Page content full width.

Yurii9408248352b8
diff --git a/application/Espo/Resources/i18n/en_US/Preferences.json b/application/Espo/Resources/i18n/en_US/Preferences.json
index 12eeb41c86..422b9f0c80 100644
--- a/application/Espo/Resources/i18n/en_US/Preferences.json
+++ b/application/Espo/Resources/i18n/en_US/Preferences.json
@@ -26,6 +26,7 @@
"defaultRemindersTask": "Default Reminders for Tasks",
"theme": "Theme",
"pageContentWidth": "Content Width",
+ "recordContentWidth": "Record Content Width",
"useCustomTabList": "Custom Tab List",
"addCustomTabs": "Add Custom Tabs",
"tabList": "Tab List",
@@ -52,7 +53,12 @@
},
"pageContentWidth": {
"": "Normal",
- "Wide": "Wide"
+ "Wide": "Wide",
+ "Full": "Full"
+ },
+ "recordContentWidth": {
+ "": "Normal",
+ "Full": "Full"
}
},
"labels": {
diff --git a/application/Espo/Resources/layouts/Preferences/detail.json b/application/Espo/Resources/layouts/Preferences/detail.json
index 41e7112f64..f6a244e8f4 100644
--- a/application/Espo/Resources/layouts/Preferences/detail.json
+++ b/application/Espo/Resources/layouts/Preferences/detail.json
@@ -105,6 +105,10 @@
[
{"name": "theme"},
{"name": "pageContentWidth"}
+ ],
+ [
+ false,
+ {"name": "recordContentWidth"}
]
]
},
diff --git a/application/Espo/Resources/metadata/entityDefs/Preferences.json b/application/Espo/Resources/metadata/entityDefs/Preferences.json
index 1e2fd34596..6cec1fae07 100644
--- a/application/Espo/Resources/metadata/entityDefs/Preferences.json
+++ b/application/Espo/Resources/metadata/entityDefs/Preferences.json
@@ -164,8 +164,18 @@
"type": "enum",
"options": [
"",
- "Wide"
- ]
+ "Wide",
+ "Full"
+ ],
+ "default": null
+ },
+ "recordContentWidth": {
+ "type": "enum",
+ "options": [
+ "",
+ "Full"
+ ],
+ "default": null
},
"useCustomTabList": {
"type": "bool",
diff --git a/client/src/app.js b/client/src/app.js
index 06bf128d85..a9539a4b40 100644
--- a/client/src/app.js
+++ b/client/src/app.js
@@ -1066,10 +1066,15 @@ class App {
*/
applyUserStyle() {
const pageContentWidth = this.preferences.get('pageContentWidth');
+ const recordContentWidth = this.preferences.get('recordContentWidth');
if (pageContentWidth) {
document.body.dataset.contentWidth = pageContentWidth;
}
+
+ if (recordContentWidth) {
+ document.body.dataset.recordContentWidth = recordContentWidth;
+ }
}
/**
diff --git a/client/src/views/preferences/record/edit.js b/client/src/views/preferences/record/edit.js
index 5eab1027a9..b9744acfc5 100644
--- a/client/src/views/preferences/record/edit.js
+++ b/client/src/views/preferences/record/edit.js
@@ -151,7 +151,8 @@ class PreferencesEditRecordView extends EditRecordView {
this.model.get('theme') !== initialAttributes.theme ||
(this.model.get('themeParams') || {}).navbar !== (initialAttributes.themeParams || {}).navbar ||
(this.model.get('themeParams') || {}).direction !== (initialAttributes.themeParams || {}).direction ||
- this.model.get('pageContentWidth') !== initialAttributes.pageContentWidth
+ this.model.get('pageContentWidth') !== initialAttributes.pageContentWidth ||
+ this.model.get('recordContentWidth') !== initialAttributes.recordContentWidth
) {
this.setConfirmLeaveOut(false);
diff --git a/frontend/less/espo/elements/site.less b/frontend/less/espo/elements/site.less
index 5910dfbc06..c78f9cfb85 100644
--- a/frontend/less/espo/elements/site.less
+++ b/frontend/less/espo/elements/site.less
@@ -22,3 +22,12 @@ body > footer > p a:visited {
body[data-content-width="Wide"] {
--container-max-width: var(--container-max-width-wide);
}
+
+body[data-content-width="Full"] {
+ --container-max-width: 100%;
+}
+
+body[data-record-content-width="Full"] {
+ --record-grid-max-width: 100%;
+}
+