Skip to content
Snippets Groups Projects
Commit 561438a2 authored by Bekerle, Patrizio's avatar Bekerle, Patrizio :fire: Committed by Reiter, Christoph
Browse files

Change api-url to entry-point-url

parent 175c34b9
No related branches found
No related tags found
No related merge requests found
...@@ -37,11 +37,11 @@ class KnowledgeBaseWebPageElementViewDemo extends LitElement { ...@@ -37,11 +37,11 @@ class KnowledgeBaseWebPageElementViewDemo extends LitElement {
</div> </div>
<div class="content"> <div class="content">
<h2 class="subtitle">Deutsch</h2> <h2 class="subtitle">Deutsch</h2>
<vpu-knowledge-base-web-page-element-view api-url="${utils.getAPiUrl()}" lang="de" value="bedienstete/bibliothek/buch-ausleihen"></vpu-knowledge-base-web-page-element-view> <vpu-knowledge-base-web-page-element-view entry-point-url="${utils.getAPiUrl()}" lang="de" value="bedienstete/bibliothek/buch-ausleihen"></vpu-knowledge-base-web-page-element-view>
</div> </div>
<div class="content"> <div class="content">
<h2 class="subtitle">Englisch</h2> <h2 class="subtitle">Englisch</h2>
<vpu-knowledge-base-web-page-element-view api-url="${utils.getAPiUrl()}" lang="en" value="bedienstete/bibliothek/buch-ausleihen"></vpu-knowledge-base-web-page-element-view> <vpu-knowledge-base-web-page-element-view entry-point-url="${utils.getAPiUrl()}" lang="en" value="bedienstete/bibliothek/buch-ausleihen"></vpu-knowledge-base-web-page-element-view>
</div> </div>
</section> </section>
`; `;
......
...@@ -15,7 +15,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -15,7 +15,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
this.lang = 'de'; this.lang = 'de';
this.value = ''; this.value = '';
this.html = ''; this.html = '';
this.apiUrl = utils.getAPiUrl(); this.entryPointUrl = utils.getAPiUrl();
} }
/** /**
...@@ -26,7 +26,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -26,7 +26,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
lang: { type: String }, lang: { type: String },
value: { type: String }, value: { type: String },
html: { type: String, attribute: false }, html: { type: String, attribute: false },
apiUrl: { type: String, attribute: 'api-url' }, entryPointUrl: { type: String, attribute: 'entry-point-url' },
}; };
} }
...@@ -35,7 +35,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -35,7 +35,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
i18n.changeLanguage(this.lang); i18n.changeLanguage(this.lang);
const that = this; const that = this;
// JSONLD.initialize(this.apiUrl, function (jsonld) { // JSONLD.initialize(this.entryPointUrl, function (jsonld) {
// const apiUrl = jsonld.getApiUrlForEntityName("KnowledgeBaseWebPageElement") + '/' + // const apiUrl = jsonld.getApiUrlForEntityName("KnowledgeBaseWebPageElement") + '/' +
// encodeURIComponent(commonUtils.base64EncodeUnicode(encodeURIComponent(that.value))); // encodeURIComponent(commonUtils.base64EncodeUnicode(encodeURIComponent(that.value)));
// }); // });
...@@ -48,7 +48,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement { ...@@ -48,7 +48,7 @@ class VPUKnowledgeBaseWebPageElementView extends VPULitElement {
*/ */
loadWebPageElement() { loadWebPageElement() {
// sadly there there is no entity url without "collectionOperations" in entity KnowledgeBaseWebPageElement! // sadly there there is no entity url without "collectionOperations" in entity KnowledgeBaseWebPageElement!
const apiUrl = this.apiUrl + "/web_page_elements/knowledge_base_web_page_elements/" + const apiUrl = this.entryPointUrl + "/web_page_elements/knowledge_base_web_page_elements/" +
encodeURIComponent(commonUtils.base64EncodeUnicode(encodeURIComponent(this.value))) + encodeURIComponent(commonUtils.base64EncodeUnicode(encodeURIComponent(this.value))) +
"?lang=" + encodeURIComponent(this.lang); "?lang=" + encodeURIComponent(this.lang);
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment