diff --git a/application/Espo/Resources/i18n/en_US/Global.json b/application/Espo/Resources/i18n/en_US/Global.json index c76273d029..b27d8c29e6 100644 --- a/application/Espo/Resources/i18n/en_US/Global.json +++ b/application/Espo/Resources/i18n/en_US/Global.json @@ -129,7 +129,6 @@ "Loading...": "Loading...", "Uploading...": "Uploading...", "Sending...": "Sending...", - "Merging...": "Merging...", "Merged": "Merged", "Removed": "Removed", "Posted": "Posted", @@ -143,15 +142,11 @@ "Record has been removed": "Record has been removed", "Wrong username/password": "Wrong username/password", "Post cannot be empty": "Post cannot be empty", - "Removing...": "Removing...", - "Unlinking...": "Unlinking...", - "Posting...": "Posting...", "Username can not be empty!": "Username can not be empty!", "Cache is not enabled": "Cache is not enabled", "Cache has been cleared": "Cache has been cleared", "Rebuild has been done": "Rebuild has been done", "Return to Application": "Return to Application", - "Saving...": "Saving...", "Modified": "Modified", "Created": "Created", "Create": "Create", diff --git a/application/Espo/Resources/i18n/en_US/Import.json b/application/Espo/Resources/i18n/en_US/Import.json index d16fe94e06..96c5fc0c90 100644 --- a/application/Espo/Resources/i18n/en_US/Import.json +++ b/application/Espo/Resources/i18n/en_US/Import.json @@ -59,6 +59,7 @@ "Export": "Export" }, "messages": { + "importRunning": "Import running...", "noErrors": "No errors.", "utf8": "Should be UTF-8 encoded", "duplicatesRemoved": "Duplicates removed", diff --git a/client/modules/crm/src/views/calendar/calendar.js b/client/modules/crm/src/views/calendar/calendar.js index 58d703194f..375e8b0499 100644 --- a/client/modules/crm/src/views/calendar/calendar.js +++ b/client/modules/crm/src/views/calendar/calendar.js @@ -755,7 +755,7 @@ define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], function (D this.handleAllDay(event, true); this.fillColor(event); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); this.getModelFactory().create(event.scope, (model) => { model.id = event.recordId; @@ -782,7 +782,7 @@ define('crm:views/calendar/calendar', ['view', 'lib!full-calendar'], function (D this.fillColor(event); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); this.getModelFactory().create(event.scope, (model) => { model.id = event.recordId; diff --git a/client/modules/crm/src/views/call/record/list.js b/client/modules/crm/src/views/call/record/list.js index e2d2e72cbb..dbc917de59 100644 --- a/client/modules/crm/src/views/call/record/list.js +++ b/client/modules/crm/src/views/call/record/list.js @@ -87,7 +87,7 @@ define('crm:views/call/record/list', ['views/record/list'], function (Dep) { this.collection.fetch(); }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); model.save(); }, diff --git a/client/modules/crm/src/views/meeting/record/list.js b/client/modules/crm/src/views/meeting/record/list.js index 652a9e497c..36ece1b831 100644 --- a/client/modules/crm/src/views/meeting/record/list.js +++ b/client/modules/crm/src/views/meeting/record/list.js @@ -62,7 +62,7 @@ define('crm:views/meeting/record/list', ['views/record/list'], function (Dep) { this.collection.fetch(); }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); model.save(); }, @@ -87,7 +87,7 @@ define('crm:views/meeting/record/list', ['views/record/list'], function (Dep) { this.collection.fetch(); }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); model.save(); }, diff --git a/client/modules/crm/src/views/task/record/list.js b/client/modules/crm/src/views/task/record/list.js index c89b8066f0..98edc8e061 100644 --- a/client/modules/crm/src/views/task/record/list.js +++ b/client/modules/crm/src/views/task/record/list.js @@ -52,7 +52,7 @@ define('crm:views/task/record/list', ['views/record/list'], function (Dep) { this.collection.fetch(); }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); model.save(); }, }); diff --git a/client/src/views/admin/extensions/index.js b/client/src/views/admin/extensions/index.js index 70467517ef..2f093f7c0e 100644 --- a/client/src/views/admin/extensions/index.js +++ b/client/src/views/admin/extensions/index.js @@ -185,7 +185,7 @@ define('views/admin/extensions/index', ['view'], function (Dep) { }, run: function (id, version, name) { - this.notify('Please wait...'); + Espo.Ui.notify(this.translate('pleaseWait', 'messages')); this.showError(false); this.showErrorNotification(false); diff --git a/client/src/views/admin/field-manager/edit.js b/client/src/views/admin/field-manager/edit.js index 65aabdc3b3..2bb38f1f36 100644 --- a/client/src/views/admin/field-manager/edit.js +++ b/client/src/views/admin/field-manager/edit.js @@ -693,7 +693,7 @@ define('views/admin/field-manager/edit', ['view', 'model'], function (Dep, Model this.broadcastUpdate(); }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); if (this.isNew) { this.model diff --git a/client/src/views/admin/field-manager/list.js b/client/src/views/admin/field-manager/list.js index 49e5c22a38..ba0a434b30 100644 --- a/client/src/views/admin/field-manager/list.js +++ b/client/src/views/admin/field-manager/list.js @@ -95,7 +95,7 @@ define('views/admin/field-manager/list', ['view'], function (Dep) { removeField: function (field) { this.confirm(this.translate('confirmation', 'messages'), () => { - Espo.Ui.notify(this.translate('Removing...')); + Espo.Ui.notify(' ... '); Espo.Ajax.request('Admin/fieldManager/' + this.scope + '/' + field, 'delete').then(() => { Espo.Ui.success(this.translate('Removed')); diff --git a/client/src/views/admin/integrations/edit.js b/client/src/views/admin/integrations/edit.js index 14fe7adc27..83b98157fa 100644 --- a/client/src/views/admin/integrations/edit.js +++ b/client/src/views/admin/integrations/edit.js @@ -188,7 +188,8 @@ define('views/admin/integrations/edit', ['view', 'model'], function (Dep, Model) this.notify('Saved', 'success'); }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); + this.model.save(); }, }); diff --git a/client/src/views/admin/layouts/base.js b/client/src/views/admin/layouts/base.js index 0a33465989..a0319e4af5 100644 --- a/client/src/views/admin/layouts/base.js +++ b/client/src/views/admin/layouts/base.js @@ -72,7 +72,7 @@ define('views/admin/layouts/base', ['view'], function (Dep) { actionSave: function () { this.disableButtons(); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); this.save(this.enableButtons.bind(this)); }, diff --git a/client/src/views/admin/upgrade/index.js b/client/src/views/admin/upgrade/index.js index 7daf141dd2..99ceb03529 100644 --- a/client/src/views/admin/upgrade/index.js +++ b/client/src/views/admin/upgrade/index.js @@ -145,7 +145,8 @@ define('views/admin/upgrade/index', ['view'], function (Dep) { run: function (id, version) { let msg = this.translate('Upgrading...', 'labels', 'Admin'); - this.notify('Please wait...'); + Espo.Ui.notify(this.translate('pleaseWait', 'messages')); + this.textNotification(msg); Espo.Ajax diff --git a/client/src/views/dashlet.js b/client/src/views/dashlet.js index c4379f0aa3..d4fbb4e7f4 100644 --- a/client/src/views/dashlet.js +++ b/client/src/views/dashlet.js @@ -187,17 +187,18 @@ define('views/dashlet', ['view'], function (Dep) { name: this.name, optionsData: this.getOptionsData(), fields: this.getView('body').optionsFields, - }, (view) => { + }, view => { view.render(); this.listenToOnce(view, 'save', (attributes) => { let id = this.id; - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); this.getPreferences().once('sync', () => { this.getPreferences().trigger('update'); - this.notify(false); + + Espo.Ui.notify(false); view.close(); this.trigger('change'); @@ -207,9 +208,7 @@ define('views/dashlet', ['view'], function (Dep) { o[id] = attributes; - this.getPreferences().save({ - dashletsOptions: o - }, {patch: true}); + this.getPreferences().save({dashletsOptions: o}, {patch: true}); }); }); }, diff --git a/client/src/views/external-account/oauth2.js b/client/src/views/external-account/oauth2.js index a82183d67b..f6a4ac724a 100644 --- a/client/src/views/external-account/oauth2.js +++ b/client/src/views/external-account/oauth2.js @@ -184,7 +184,8 @@ define('views/external-account/oauth2', ['view', 'model'], function (Dep, Model) } }); - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); + this.model.save(); }, diff --git a/client/src/views/fields/base.js b/client/src/views/fields/base.js index 50803d82ac..9984830555 100644 --- a/client/src/views/fields/base.js +++ b/client/src/views/fields/base.js @@ -1187,7 +1187,7 @@ define('views/fields/base', ['view', 'ui/select'], function (Dep, /** module:ui/ return; } - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); model .save(attrs, {patch: true}) diff --git a/client/src/views/modals/mass-update.js b/client/src/views/modals/mass-update.js index 5026222dde..48db40d8e7 100644 --- a/client/src/views/modals/mass-update.js +++ b/client/src/views/modals/mass-update.js @@ -270,7 +270,7 @@ define('views/modals/mass-update', ['views/modal', 'helpers/mass-action'], funct return; } - Espo.Ui.notify(this.translate('Saving...')); + Espo.Ui.notify(this.translate('saving', 'messages')); Espo.Ajax .postRequest('MassAction', { diff --git a/client/src/views/modals/related-list.js b/client/src/views/modals/related-list.js index d6e17d4be6..96f915ae4f 100644 --- a/client/src/views/modals/related-list.js +++ b/client/src/views/modals/related-list.js @@ -471,18 +471,16 @@ define('views/modals/related-list', ['views/modal', 'search-manager'], function }, actionUnlinkRelated: function (data) { - var id = data.id; + let id = data.id; this.confirm({ message: this.translate('unlinkRecordConfirmation', 'messages'), confirmText: this.translate('Unlink'), }, () => { - this.notify('Unlinking...'); + Espo.Ui.notify(' ... '); - Espo.Ajax.deleteRequest(this.collection.url, { - id: id, - }).then(() => { - this.notify('Unlinked', 'success'); + Espo.Ajax.deleteRequest(this.collection.url, {id: id}).then(() => { + Espo.Ui.success(this.translate('Unlinked')); this.collection.fetch(); @@ -496,9 +494,9 @@ define('views/modals/related-list', ['views/modal', 'search-manager'], function let actionName = this.defs.createAction || 'createRelated'; let methodName = 'action' + Espo.Utils.upperCaseFirst(actionName); - var p = this.getParentView(); + let p = this.getParentView(); - var view = null; + let view = null; while (p) { if (p[methodName]) { @@ -520,9 +518,9 @@ define('views/modals/related-list', ['views/modal', 'search-manager'], function let actionName = this.defs.selectAction || 'selectRelated'; let methodName = 'action' + Espo.Utils.upperCaseFirst(actionName); - var p = this.getParentView(); + let p = this.getParentView(); - var view = null; + let view = null; while (p) { if (p[methodName]) { diff --git a/client/src/views/record/base.js b/client/src/views/record/base.js index 1a149a848b..48ca228769 100644 --- a/client/src/views/record/base.js +++ b/client/src/views/record/base.js @@ -908,10 +908,10 @@ function (Dep, ViewRecordHelper, DynamicLogic, _) { */ afterSave: function () { if (this.isNew) { - this.notify('Created', 'success'); + Espo.Ui.success(this.translate('Created')); } else { - this.notify('Saved', 'success'); + Espo.Ui.success(this.translate('Saved')); } this.setIsNotChanged(); @@ -926,7 +926,7 @@ function (Dep, ViewRecordHelper, DynamicLogic, _) { * Processed before save. */ beforeSave: function () { - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); }, /** @@ -938,9 +938,7 @@ function (Dep, ViewRecordHelper, DynamicLogic, _) { * Processed after save a not modified record. */ afterNotModified: function () { - let msg = this.translate('notModified', 'messages'); - - Espo.Ui.warning(msg); + Espo.Ui.warning(this.translate('notModified', 'messages')); this.setIsNotChanged(); }, @@ -949,7 +947,7 @@ function (Dep, ViewRecordHelper, DynamicLogic, _) { * Processed after save not valid. */ afterNotValid: function () { - this.notify('Not valid', 'error'); + Espo.Ui.error(this.translate('Not valid')); }, /** diff --git a/client/src/views/record/detail.js b/client/src/views/record/detail.js index 285e1e60c2..349c9780e8 100644 --- a/client/src/views/record/detail.js +++ b/client/src/views/record/detail.js @@ -2441,7 +2441,7 @@ function (Dep, ViewRecordHelper, ActionItemSetup) { }, beforeSave: function () { - this.notify('Saving...'); + Espo.Ui.notify(this.translate('saving', 'messages')); this.blockUpdateWebSocket(); }, diff --git a/client/src/views/record/list.js b/client/src/views/record/list.js index 34b4a23b3c..949f8129b2 100644 --- a/client/src/views/record/list.js +++ b/client/src/views/record/list.js @@ -1381,7 +1381,7 @@ function (Dep, MassActionHelper, ExportHelper, RecordModal) { message: this.translate('removeSelectedRecordsConfirmation', 'messages', this.scope), confirmText: this.translate('Remove'), }, () => { - Espo.Ui.notify(this.translate('Removing...')); + Espo.Ui.notify(' ... '); let helper = new MassActionHelper(this); let params = this.getMassActionSelectionPostData(); @@ -3146,7 +3146,7 @@ function (Dep, MassActionHelper, ExportHelper, RecordModal) { this.collection.trigger('model-removing', id); this.collection.remove(model); - this.notify('Removing...'); + Espo.Ui.notify(' ... '); model .destroy({wait: true, fromList: true}) diff --git a/client/src/views/record/merge.js b/client/src/views/record/merge.js index 79e355e649..ddf4644ced 100644 --- a/client/src/views/record/merge.js +++ b/client/src/views/record/merge.js @@ -116,7 +116,7 @@ define('views/record/merge', ['view'], function (Dep) { }); }); - this.notify('Merging...'); + Espo.Ui.notify(' ... '); let sourceIdList = this.models @@ -140,12 +140,9 @@ define('views/record/merge', ['view'], function (Dep) { }, }) .then(() => { - this.notify('Merged', 'success'); + Espo.Ui.success(this.translate('Merged')); - this.getRouter().navigate( - '#' + this.scope + '/view/' + model.id, - {trigger: true} - ); + this.getRouter().navigate('#' + this.scope + '/view/' + model.id, {trigger: true}); if (this.collection) { this.collection.fetch(); diff --git a/client/src/views/stream/panel.js b/client/src/views/stream/panel.js index dc9ea537e4..6bad6c8245 100644 --- a/client/src/views/stream/panel.js +++ b/client/src/views/stream/panel.js @@ -578,6 +578,7 @@ define('views/stream/panel', ['views/record/panels/relationship', 'lib!Textcompl this.prepareNoteForPost(model); this.notify('Posting...'); + Espo.Ui.notify(this.translate('posting', 'messages')); model.save(null) .then(() => {