From 71dd03c914517a6697e23d29ebbb0a6df34339bf Mon Sep 17 00:00:00 2001 From: Yuri Kuznetsov Date: Tue, 16 Aug 2022 18:07:18 +0300 Subject: [PATCH] text usage --- client/res/templates/dashlet.tpl | 2 +- client/res/templates/header.tpl | 12 +++++---- client/res/templates/record/detail.tpl | 6 +++-- client/res/templates/record/edit.tpl | 3 ++- client/res/templates/record/panel-actions.tpl | 4 +-- .../views/admin/entity-manager/record/edit.js | 2 +- client/src/views/admin/job/list.js | 15 ++++++----- .../modals/deploy-to-team.js | 2 +- .../modals/deploy-to-users.js | 2 +- .../views/dashlets/abstract/record-list.js | 2 +- client/src/views/dashlets/emails.js | 21 ++++++++------- client/src/views/dashlets/records.js | 6 ++--- client/src/views/dashlets/stream.js | 5 ++-- client/src/views/detail.js | 3 ++- client/src/views/email/detail.js | 2 +- client/src/views/import/list.js | 6 ++--- client/src/views/list.js | 9 +++---- client/src/views/main.js | 1 + client/src/views/preferences/record/edit.js | 4 +-- client/src/views/record/detail.js | 2 ++ client/src/views/record/panels-container.js | 2 ++ client/src/views/scheduled-job/list.js | 9 ++++--- .../settings/modals/tab-list-field-add.js | 5 ++-- client/src/views/stream/panel.js | 26 ++++++++++++++----- client/src/views/user/detail.js | 3 ++- client/src/views/user/modals/security.js | 2 +- 26 files changed, 91 insertions(+), 65 deletions(-) diff --git a/client/res/templates/dashlet.tpl b/client/res/templates/dashlet.tpl index 7ef1f0fd44..55fc51ed5b 100644 --- a/client/res/templates/dashlet.tpl +++ b/client/res/templates/dashlet.tpl @@ -32,7 +32,7 @@ {{else}}   {{/if}} - {{#if html}}{{{html}}}{{else}}{{translate label}}{{/if}} + {{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label}}{{/if}}{{/if}} {{/each}} diff --git a/client/res/templates/header.tpl b/client/res/templates/header.tpl index 54f3bb4d31..c3f791c461 100644 --- a/client/res/templates/header.tpl +++ b/client/res/templates/header.tpl @@ -11,11 +11,11 @@ class="btn btn-{{#if style}}{{style}}{{else}}default{{/if}} btn-xs-wide action{{#if hidden}} hidden{{/if}}{{#if className}} {{className}}{{/if}}" data-name="{{name}}" data-action="{{action}}" - {{#each data}} data-{{@key}}="{{./this}}"{{/each}}{{#if title}} - title="{{title}}"{{/if}} + {{#each data}} data-{{@key}}="{{./this}}"{{/each}} + {{#if title}}title="{{title}}"{{/if}} > {{#if iconHtml}}{{{iconHtml}}}{{/if}} - {{#if html}}{{{html}}}{{else}}{{translate label scope=../scope}}{{/if}} + {{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if}}{{/if}} {{/each}} @@ -34,7 +34,9 @@ data-name="{{name}}" data-action="{{action}}" {{#each data}} data-{{@key}}="{{./this}}"{{/each}} - >{{#if html}}{{{html}}}{{else}}{{translate label scope=../scope}}{{/if}} + {{#if title}}title="{{title}}"{{/if}} + >{{#if iconHtml}}{{{iconHtml}}}{{/if}} + {{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if}}{{/if}} {{/each}} @@ -62,7 +64,7 @@ {{#each data}} data-{{@key}}="{{./this}}"{{/each}} > {{#if iconHtml}}{{{iconHtml}}} {{/if}} - {{#if html}}{{{html}}}{{else}}{{translate label scope=../scope}}{{/if}} + {{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if}}{{/if}} {{else}} {{#unless @first}} {{#unless @last}} diff --git a/client/res/templates/record/detail.tpl b/client/res/templates/record/detail.tpl index f1bdec279a..9e6ff6b016 100644 --- a/client/res/templates/record/detail.tpl +++ b/client/res/templates/record/detail.tpl @@ -10,6 +10,7 @@ hidden=hidden html=html title=title + text=text className='btn-xs-wide' disabled=disabled }} @@ -32,7 +33,7 @@ data-action="{{name}}" {{#if title}}title="{{title}}"{{/if}} {{#each data}} data-{{@key}}="{{./this}}"{{/each}} - >{{#if html}}{{{html}}}{{else}}{{translate label scope=../entityType}}{{/if}} + >{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../entityType}}{{/if}}{{/if}} {{else}} {{#unless @first}} {{#unless @last}} @@ -77,6 +78,7 @@ hidden=hidden html=html title=title + text=text className='btn-xs-wide' disabled=disabled }} @@ -99,7 +101,7 @@ class="action" data-action="{{name}}" {{#if title}}title="{{title}}"{{/if}} - >{{#if html}}{{{html}}}{{else}}{{translate label scope=../entityType}}{{/if}} + >{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../entityType}}{{/if}}{{/if}} {{else}} {{#unless @first}} diff --git a/client/res/templates/record/edit.tpl b/client/res/templates/record/edit.tpl index 3c654de2be..64edabef27 100644 --- a/client/res/templates/record/edit.tpl +++ b/client/res/templates/record/edit.tpl @@ -11,6 +11,7 @@ html=html hidden=hidden title=title + text=text className='btn-xs-wide' disabled=disabled }} @@ -34,7 +35,7 @@ class="action" data-action="{{name}}" {{#if title}}title="{{title}}"{{/if}} - >{{#if html}}{{{html}}}{{else}}{{translate label scope=../entityType}}{{/if}} + >{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../entityType}}{{/if}}{{/if}} {{else}} {{#unless @first}} diff --git a/client/res/templates/record/panel-actions.tpl b/client/res/templates/record/panel-actions.tpl index b82ebf8e13..a9fcef581a 100644 --- a/client/res/templates/record/panel-actions.tpl +++ b/client/res/templates/record/panel-actions.tpl @@ -5,7 +5,7 @@ data-action="{{action}}" data-panel="{{../defs.name}}" {{#each data}} data-{{hyphen @key}}="{{./this}}"{{/each}} title="{{#if title}}{{translate title scope=../scope}}{{/if}}" ->{{#if html}}{{{html}}}{{else}}{{translate label scope=../scope}}{{/if}} +>{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if}}{{/if}} {{/each}} {{#if actionList}} @@ -26,7 +26,7 @@ data-action="{{action}}" {{/if}} {{#each data}} data-{{hyphen @key}}="{{./this}}"{{/each}} - >{{#if html}}{{{html}}}{{else}}{{translate label scope=../scope}}{{/if}} + >{{#if html}}{{{html}}}{{else}}{{#if text}}{{text}}{{else}}{{translate label scope=../scope}}{{/if}}{{/if}} {{else}} {{#unless @first}} {{#unless @last}} diff --git a/client/src/views/admin/entity-manager/record/edit.js b/client/src/views/admin/entity-manager/record/edit.js index cd8c616fb7..f19e46ae2a 100644 --- a/client/src/views/admin/entity-manager/record/edit.js +++ b/client/src/views/admin/entity-manager/record/edit.js @@ -79,7 +79,7 @@ define('views/admin/entity-manager/record/edit', 'views/record/edit', function ( if (!this.isCreate && !this.options.isCustom) { this.buttonList.push({ name: 'resetToDefault', - html: this.translate('Reset to Default', 'labels', 'Admin'), + text: this.translate('Reset to Default', 'labels', 'Admin'), }); } diff --git a/client/src/views/admin/job/list.js b/client/src/views/admin/job/list.js index 74378647b3..4ff0034ef1 100644 --- a/client/src/views/admin/job/list.js +++ b/client/src/views/admin/job/list.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/admin/job/list', 'views/list', function (Dep) { +define('views/admin/job/list', ['views/list'], function (Dep) { return Dep.extend({ @@ -38,20 +38,23 @@ define('views/admin/job/list', 'views/list', function (Dep) { if (!this.getHelper().getAppParam('isRestrictedMode') || this.getUser().isSuperAdmin()) { this.addMenuItem('buttons', { link: '#Admin/jobsSettings', - html: this.translate('Settings', 'labels', 'Admin') + text: this.translate('Settings', 'labels', 'Admin'), }); } }, getHeader: function () { - return '' + this.translate('Administration') + '' + - ' ' + - this.getLanguage().translate('Jobs', 'labels', 'Admin'); + return this.buildHeaderHtml([ + $('') + .attr('href', '#Admin') + .text(this.translate('Administration')), + $('') + .text(this.getLanguage().translate('Jobs', 'labels', 'Admin')), + ]); }, updatePageTitle: function () { this.setPageTitle(this.getLanguage().translate('Jobs', 'labels', 'Admin')); }, - }); }); diff --git a/client/src/views/dashboard-template/modals/deploy-to-team.js b/client/src/views/dashboard-template/modals/deploy-to-team.js index 325a9a518a..bd2eadd2ba 100644 --- a/client/src/views/dashboard-template/modals/deploy-to-team.js +++ b/client/src/views/dashboard-template/modals/deploy-to-team.js @@ -38,7 +38,7 @@ define('views/dashboard-template/modals/deploy-to-team', ['views/modal', 'model' this.buttonList = [ { name: 'deploy', - html: this.translate('Deploy for Team', 'labels', 'DashboardTemplate'), + text: this.translate('Deploy for Team', 'labels', 'DashboardTemplate'), style: 'danger', }, { diff --git a/client/src/views/dashboard-template/modals/deploy-to-users.js b/client/src/views/dashboard-template/modals/deploy-to-users.js index 6c1545d637..3107120267 100644 --- a/client/src/views/dashboard-template/modals/deploy-to-users.js +++ b/client/src/views/dashboard-template/modals/deploy-to-users.js @@ -38,7 +38,7 @@ define('views/dashboard-template/modals/deploy-to-users', ['views/modal', 'model this.buttonList = [ { name: 'deploy', - html: this.translate('Deploy for Users', 'labels', 'DashboardTemplate'), + text: this.translate('Deploy for Users', 'labels', 'DashboardTemplate'), style: 'danger', }, { diff --git a/client/src/views/dashlets/abstract/record-list.js b/client/src/views/dashlets/abstract/record-list.js index 8b7ed9c3cf..1c64c38555 100644 --- a/client/src/views/dashlets/abstract/record-list.js +++ b/client/src/views/dashlets/abstract/record-list.js @@ -148,7 +148,7 @@ define( if (this.scope && this.getAcl().checkScope(this.scope, 'create')) { this.actionList.unshift({ name: 'create', - html: this.translate('Create ' + this.scope, 'labels', this.scope), + text: this.translate('Create ' + this.scope, 'labels', this.scope), iconHtml: '', url: '#'+this.scope+'/create', }); diff --git a/client/src/views/dashlets/emails.js b/client/src/views/dashlets/emails.js index fee75e05d0..9ccd705398 100644 --- a/client/src/views/dashlets/emails.js +++ b/client/src/views/dashlets/emails.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -Espo.define('views/dashlets/emails', 'views/dashlets/abstract/record-list', function (Dep) { +define('views/dashlets/emails', ['views/dashlets/abstract/record-list'], function (Dep) { return Dep.extend({ @@ -42,7 +42,7 @@ Espo.define('views/dashlets/emails', 'views/dashlets/abstract/record-list', func if (this.getAcl().checkScope(this.scope, 'create')) { this.actionList.unshift({ name: 'compose', - html: this.translate('Compose Email', 'labels', this.scope), + text: this.translate('Compose Email', 'labels', this.scope), iconHtml: '' }); } @@ -52,19 +52,20 @@ Espo.define('views/dashlets/emails', 'views/dashlets/abstract/record-list', func var attributes = this.getCreateAttributes() || {}; this.notify('Loading...'); - var viewName = this.getMetadata().get('clientDefs.' + this.scope + '.modalViews.compose') || 'views/modals/compose-email'; + var viewName = this.getMetadata().get('clientDefs.' + this.scope + '.modalViews.compose') || + 'views/modals/compose-email'; + this.createView('modal', viewName, { scope: this.scope, attributes: attributes, - }, function (view) { + }, (view) => { view.render(); view.notify(false); - this.listenToOnce(view, 'after:save', function () { - this.actionRefresh(); - }, this); - }, this); - } + this.listenToOnce(view, 'after:save', () => { + this.actionRefresh(); + }); + }); + }, }); }); - diff --git a/client/src/views/dashlets/records.js b/client/src/views/dashlets/records.js index 81afc5ba0f..90848137c6 100644 --- a/client/src/views/dashlets/records.js +++ b/client/src/views/dashlets/records.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/dashlets/records', 'views/dashlets/abstract/record-list', function (Dep) { +define('views/dashlets/records', ['views/dashlets/abstract/record-list'], function (Dep) { return Dep.extend({ @@ -70,13 +70,11 @@ define('views/dashlets/records', 'views/dashlets/abstract/record-list', function if (scope && this.getAcl().checkScope(scope, 'create')) { this.actionList.unshift({ name: 'create', - html: this.translate('Create ' + scope, 'labels', scope), + text: this.translate('Create ' + scope, 'labels', scope), iconHtml: '', url: '#' + scope + '/create', }); } }, - }); }); - diff --git a/client/src/views/dashlets/stream.js b/client/src/views/dashlets/stream.js index 6d29555ddc..a128a5f68c 100644 --- a/client/src/views/dashlets/stream.js +++ b/client/src/views/dashlets/stream.js @@ -67,7 +67,7 @@ define('views/dashlets/stream', 'views/dashlets/abstract/base', function (Dep) { setupActionList: function () { this.actionList.unshift({ name: 'viewList', - html: this.translate('View'), + text: this.translate('View'), iconHtml: '', url: '#Stream', }); @@ -75,7 +75,7 @@ define('views/dashlets/stream', 'views/dashlets/abstract/base', function (Dep) { if (!this.getUser().isPortal()) { this.actionList.unshift({ name: 'create', - html: this.translate('Create Post', 'labels'), + text: this.translate('Create Post', 'labels'), iconHtml: '', }); } @@ -96,6 +96,5 @@ define('views/dashlets/stream', 'views/dashlets/abstract/base', function (Dep) { actionViewList: function () { this.getRouter().navigate('#Stream', {trigger: true}); }, - }); }); diff --git a/client/src/views/detail.js b/client/src/views/detail.js index e9b70a051d..0f03a529c0 100644 --- a/client/src/views/detail.js +++ b/client/src/views/detail.js @@ -103,7 +103,8 @@ define('views/detail', ['views/main'], function (Dep) { name: 'follow', label: 'Follow', style: 'default', - html: ' ' + this.translate('Follow'), + iconHtml: '', + text: this.translate('Follow'), action: 'follow', }, true); }, diff --git a/client/src/views/email/detail.js b/client/src/views/email/detail.js index 0a291d22de..efed786165 100644 --- a/client/src/views/email/detail.js +++ b/client/src/views/email/detail.js @@ -95,7 +95,7 @@ define('views/email/detail', ['views/detail', 'email-helper'], function (Dep, Em this.model.getLinkMultipleIdList('attachments').length ) { this.addMenuItem('dropdown', { - html: this.translate('Create Document', 'labels', 'Document'), + text: this.translate('Create Document', 'labels', 'Document'), action: 'createDocument', acl: 'create', aclScope: 'Document', diff --git a/client/src/views/import/list.js b/client/src/views/import/list.js index ef475cd28a..10028eaa2d 100644 --- a/client/src/views/import/list.js +++ b/client/src/views/import/list.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/import/list', 'views/list', function (Dep) { +define('views/import/list', ['views/list'], function (Dep) { return Dep.extend({ @@ -36,11 +36,11 @@ define('views/import/list', 'views/list', function (Dep) { Dep.prototype.setup.call(this); this.menu.buttons.unshift({ - html: ' ' + this.translate('New Import', 'labels', 'Import'), + iconHtml: '', + text: this.translate('New Import', 'labels', 'Import'), link: '#Import', acl: 'edit', }); }, - }); }); diff --git a/client/src/views/list.js b/client/src/views/list.js index eb40de0763..275cc3a083 100644 --- a/client/src/views/list.js +++ b/client/src/views/list.js @@ -309,8 +309,8 @@ function (Dep, /** typeof module:search-manager.Class */SearchManager) { if (this.quickCreate) { this.menu.buttons.unshift({ action: 'quickCreate', - html: ' ' + - this.translate('Create ' + this.scope, 'labels', this.scope), + iconHtml: '', + text: this.translate('Create ' + this.scope, 'labels', this.scope), style: 'default', acl: 'create', aclScope: this.entityType || this.scope, @@ -323,14 +323,13 @@ function (Dep, /** typeof module:search-manager.Class */SearchManager) { this.menu.buttons.unshift({ link: '#' + this.scope + '/create', action: 'create', - html: ' ' + - this.translate('Create ' + this.scope, 'labels', this.scope), + iconHtml: '', + text: this.translate('Create ' + this.scope, 'labels', this.scope), style: 'default', acl: 'create', aclScope: this.entityType || this.scope, title: 'Ctrl+Space', }); - }, /** diff --git a/client/src/views/main.js b/client/src/views/main.js index bed6a1b2e9..303b49d0da 100644 --- a/client/src/views/main.js +++ b/client/src/views/main.js @@ -68,6 +68,7 @@ define('views/main', ['view'], function (Dep) { * @property {string} [title] A title. * @property {string} [iconHtml] An icon HTML. * @property {string} [html] An HTML. + * @property {string} [text] A text. * @property {string} [className] An additional class name. Only for buttons. */ diff --git a/client/src/views/preferences/record/edit.js b/client/src/views/preferences/record/edit.js index 0ec39f2dbf..29c005c30b 100644 --- a/client/src/views/preferences/record/edit.js +++ b/client/src/views/preferences/record/edit.js @@ -94,7 +94,7 @@ define('views/preferences/record/edit', ['views/record/edit'], function (Dep) { this.addDropdownItem({ name: 'reset', - html: this.getLanguage().translate('Reset to Default', 'labels', 'Admin'), + text: this.getLanguage().translate('Reset to Default', 'labels', 'Admin'), style: 'danger' }); @@ -103,7 +103,7 @@ define('views/preferences/record/edit', ['views/record/edit'], function (Dep) { if (!~forbiddenEditFieldList.indexOf('dashboardLayout') && !this.model.isPortal()) { this.addDropdownItem({ name: 'resetDashboard', - html: this.getLanguage().translate('Reset Dashboard to Default', 'labels', 'Preferences') + text: this.getLanguage().translate('Reset Dashboard to Default', 'labels', 'Preferences') }); } diff --git a/client/src/views/record/detail.js b/client/src/views/record/detail.js index 0e7c849b2c..9a68327f23 100644 --- a/client/src/views/record/detail.js +++ b/client/src/views/record/detail.js @@ -119,6 +119,7 @@ function (Dep, ViewRecordHelper, ActionItemSetup) { * @property {string} name A name. * @property {string} [label] A label. * @property {string} [html] An HTML. + * @property {string} [text] A text. * @property {'default'|'danger'|'success'|'warning'} [style] A style. * @property {boolean} [hidden] Hidden. * @property {string} [title] A title (not translatable). @@ -133,6 +134,7 @@ function (Dep, ViewRecordHelper, ActionItemSetup) { * @property {string} name A name. * @property {string} [label] A label. * @property {string} [html] An HTML. + * @property {string} [text] A text. * @property {boolean} [hidden] Hidden. * @property {Object.} [data] Data attributes. * @property {string} [title] A title (not translatable). diff --git a/client/src/views/record/panels-container.js b/client/src/views/record/panels-container.js index 0a6992cec7..f2d2468d01 100644 --- a/client/src/views/record/panels-container.js +++ b/client/src/views/record/panels-container.js @@ -72,6 +72,7 @@ define('views/record/panels-container', ['view'], function (Dep) { * @property {boolean} [hidden] Hidden. * @property {string} [label] A label. Translatable. * @property {string} [html] A HTML. + * @property {string} [text] A text. * @property {string} [title] A title (on hover). Translatable. * @property {Object.} [data] Data attributes. */ @@ -86,6 +87,7 @@ define('views/record/panels-container', ['view'], function (Dep) { * @property {boolean} [hidden] Hidden. * @property {string} [label] A label. Translatable. * @property {string} [html] A HTML. + * @property {string} [text] A text. * @property {Object.} [data] Data attributes. */ diff --git a/client/src/views/scheduled-job/list.js b/client/src/views/scheduled-job/list.js index da609dd9e8..242eb98046 100644 --- a/client/src/views/scheduled-job/list.js +++ b/client/src/views/scheduled-job/list.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/scheduled-job/list', 'views/list', function (Dep) { +define('views/scheduled-job/list', ['views/list'], function (Dep) { return Dep.extend({ @@ -37,7 +37,7 @@ define('views/scheduled-job/list', 'views/list', function (Dep) { this.menu.buttons.push({ link: '#Admin/jobs', - html: this.translate('Jobs', 'labels', 'Admin'), + text: this.translate('Jobs', 'labels', 'Admin'), }); this.createView('search', 'views/base', { @@ -59,10 +59,11 @@ define('views/scheduled-job/list', 'views/list', function (Dep) { getHeader: function () { return this.buildHeaderHtml([ - '' + this.translate('Administration', 'labels', 'Admin') + '', + $('') + .attr('href', '#Admin') + .text(this.translate('Administration', 'labels', 'Admin')), this.getLanguage().translate(this.scope, 'scopeNamesPlural') ]); }, - }); }); diff --git a/client/src/views/settings/modals/tab-list-field-add.js b/client/src/views/settings/modals/tab-list-field-add.js index 7a347a57b1..2e021c3a04 100644 --- a/client/src/views/settings/modals/tab-list-field-add.js +++ b/client/src/views/settings/modals/tab-list-field-add.js @@ -26,7 +26,7 @@ * these Appropriate Legal Notices must retain the display of the "EspoCRM" word. ************************************************************************/ -define('views/settings/modals/tab-list-field-add', 'views/modals/array-field-add', function (Dep) { +define('views/settings/modals/tab-list-field-add', ['views/modals/array-field-add'], function (Dep) { return Dep.extend({ @@ -36,7 +36,7 @@ define('views/settings/modals/tab-list-field-add', 'views/modals/array-field-add if (!this.options.noGroups) { this.buttonList.push({ name: 'addGroup', - html: this.translate('Group Tab', 'labels', 'Settings'), + text: this.translate('Group Tab', 'labels', 'Settings'), }); } }, @@ -49,6 +49,5 @@ define('views/settings/modals/tab-list-field-add', 'views/modals/array-field-add color: null, }); }, - }); }); diff --git a/client/src/views/stream/panel.js b/client/src/views/stream/panel.js index 531ea3dbfa..166e160484 100644 --- a/client/src/views/stream/panel.js +++ b/client/src/views/stream/panel.js @@ -646,7 +646,14 @@ define('views/stream/panel', ['views/record/panels/relationship', 'lib!Textcompl this.actionList.push({ action: 'viewPostList', - html: this.translate('View List') + ' · ' + this.translate('posts', 'filters', 'Note'), + html: + $('') + .append( + $('').text(this.translate('View List')), + ' · ', + $('').text(this.translate('posts', 'filters', 'Note')), + ) + .get(0).innerHTML, }); this.actionList.push(false); @@ -662,12 +669,19 @@ define('views/stream/panel', ['views/record/panels/relationship', 'lib!Textcompl this.actionList.push({ action: 'selectFilter', - html: '
' + this.translate(item, 'filters', 'Note') + - '
', + html: + $('') + .append( + $('') + .addClass('check-icon fas fa-check pull-right') + .addClass(!selected ? ' hidden' : ''), + $('
') + .text(this.translate(item, 'filters', 'Note')), + ) + .get(0).innerHTML, data: { - name: item - } + name: item, + }, }); }); }, diff --git a/client/src/views/user/detail.js b/client/src/views/user/detail.js index 78433b4919..666924a978 100644 --- a/client/src/views/user/detail.js +++ b/client/src/views/user/detail.js @@ -93,7 +93,8 @@ define('views/user/detail', 'views/detail', function (Dep) { this.menu.buttons.push({ name: 'calendar', - html: ' ' + this.translate('Calendar', 'scopeNames'), + iconHtml: '', + text: this.translate('Calendar', 'scopeNames'), style: 'default', link: '#Calendar/show/userId=' + this.model.id + '&userName=' + encodeURIComponent(this.model.get('name')), diff --git a/client/src/views/user/modals/security.js b/client/src/views/user/modals/security.js index 1da65bb82b..34e944a059 100644 --- a/client/src/views/user/modals/security.js +++ b/client/src/views/user/modals/security.js @@ -51,7 +51,7 @@ define('views/user/modals/security', ['views/modal', 'model'], function (Dep, Mo this.dropdownItemList = [ { name: 'reset', - html: this.translate('Reset 2FA'), + text: this.translate('Reset 2FA'), hidden: true, }, ];