From 1bd4a7ee022a8e6a3c22835a0a49df991f3047e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Florian=20Kr=C3=B6nert?= Date: Mon, 20 Jul 2020 15:39:36 +0200 Subject: [PATCH] Retrieving all content snippets, translation handler provides empty option for selection as well --- src/js/Translator/ContentSnippetHandler.js | 2 +- src/js/Translator/TranslationHandler.js | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/src/js/Translator/ContentSnippetHandler.js b/src/js/Translator/ContentSnippetHandler.js index 3ed2ee8..5198be4 100644 --- a/src/js/Translator/ContentSnippetHandler.js +++ b/src/js/Translator/ContentSnippetHandler.js @@ -197,7 +197,7 @@ TranslationHandler.FillPortalLanguageCodes(portalLanguages); } - return WebApiClient.Retrieve({entityName: "adx_contentsnippet", queryParams: "?$select=adx_name,adx_value&$filter=_adx_contentsnippetlanguageid_value ne null&$expand=adx_websiteid($select=adx_websiteid,adx_name),adx_contentsnippetlanguageid($select=adx_websitelanguageid)&$orderby=adx_name"}); + return WebApiClient.Retrieve({entityName: "adx_contentsnippet", queryParams: "?$select=adx_name,adx_value&$filter=_adx_contentsnippetlanguageid_value ne null&$expand=adx_websiteid($select=adx_websiteid,adx_name),adx_contentsnippetlanguageid($select=adx_websitelanguageid)&$orderby=adx_name", returnAllPages: true }); }) .then(function(response) { snippets = response.value.map(function (s) { s.adx_value = w2utils.encodeTags(s.adx_value); return s; }); diff --git a/src/js/Translator/TranslationHandler.js b/src/js/Translator/TranslationHandler.js index a8036e5..aef9adb 100644 --- a/src/js/Translator/TranslationHandler.js +++ b/src/js/Translator/TranslationHandler.js @@ -440,14 +440,14 @@ fields: [ { field: 'targetLcid', type: 'list', required: true, options: { items: languageItems } }, { field: 'sourceLcid', type: 'list', required: true, options: { items: languageItems } }, - { field: 'translateMissing', type: 'list', required: false, options: { items: [{id: "", text: "None" }, { id: "missing", text: "All Missing" }, { id: "missingOrIdentical", text: "All Missing Or Identical"}] } } + { field: 'translateMissing', type: 'list', required: false, options: { items: [{id: " ", text: " " }, { id: "missing", text: "All Missing" }, { id: "missingOrIdentical", text: "All Missing Or Identical"}] } } ], actions: { "ok": function () { this.validate(); w2popup.close(); - XrmTranslator.ShowRecordSelector("TranslationHandler.ProposeTranslations", [this.record.sourceLcid.id, this.record.targetLcid.id, this.record.translateMissing ? this.record.translateMissing.id : ""]); + XrmTranslator.ShowRecordSelector("TranslationHandler.ProposeTranslations", [this.record.sourceLcid.id, this.record.targetLcid.id, this.record.translateMissing ? this.record.translateMissing.id.trim() : ""]); }, "cancel": function () { w2popup.close();