Skip to content

Commit

Permalink
Retrieving all content snippets, translation handler provides empty o…
Browse files Browse the repository at this point in the history
…ption for selection as well
  • Loading branch information
Florian Krönert authored and Florian Krönert committed Jul 20, 2020
1 parent 5486b90 commit 1bd4a7e
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/js/Translator/ContentSnippetHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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; });
Expand Down
4 changes: 2 additions & 2 deletions src/js/Translator/TranslationHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 1bd4a7e

Please sign in to comment.