diff --git a/client/src/views/preferences/fields/dashboard-tab-list.js b/client/src/views/preferences/fields/dashboard-tab-list.js index 50c90938d6..82ac0477c0 100644 --- a/client/src/views/preferences/fields/dashboard-tab-list.js +++ b/client/src/views/preferences/fields/dashboard-tab-list.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/preferences/fields/dashboard-tab-list', 'views/fields/array', function (Dep) { +define('views/preferences/fields/dashboard-tab-list', ['views/fields/array'], function (Dep) { return Dep.extend({ @@ -34,40 +34,71 @@ define('views/preferences/fields/dashboard-tab-list', 'views/fields/array', func Dep.prototype.setup.call(this); this.translatedOptions = {}; - var list = this.model.get(this.name) || []; - list.forEach(function (value) { + + let list = this.model.get(this.name) || []; + + list.forEach(value => { this.translatedOptions[value] = value; - }, this); + }); }, + getItemHtml: function (value) { value = value.toString(); - var valueSanitized = this.escapeValue(value); - var translatedValue = this.escapeValue(this.translatedOptions[value] || value); - var html = '' + - '
'; + let translatedValue = this.translatedOptions[value] || value; - return html; + return $('