Skip to content
Snippets Groups Projects
Commit 01334731 authored by Benoit Alessandroni's avatar Benoit Alessandroni
Browse files

Merge branch 'bugfix/add-interfacelanguage-on-everyspace' into 'master'

Bugfix/add interfacelanguage on everyspace

See merge request !154
parents 93fda8ae 3fa16be8
No related branches found
Tags v0.5.26
1 merge request!154Bugfix/add interfacelanguage on everyspace
Pipeline #5748 failed
......@@ -25,7 +25,11 @@ head
{
"entrepreneurProfile": "http://happy-dev.fr/owl/#entrepreneur_profile",
"mentorProfile": "http://happy-dev.fr/owl/#mentor_profile",
"account": "http://happy-dev.fr/owl/#account",
"picture":"foaf:depiction"
"account":"hd:account",
"avatar":"foaf:depiction",
"picture":"foaf:depiction",
"messageSet":"http://happy-dev.fr/owl/#message_set",
"author":"http://happy-dev.fr/owl/#author_user",
"title":"http://happy-dev.fr/owl/#title"
}
......@@ -190,6 +190,7 @@ console.log("we change the value")
//Trigerring a reload of the associated form
let parent_form = select_hidden.closest("sib-form");
parent_form.component.inputChange();
parent_form.dispatchEvent(new CustomEvent('formChange'));
refreshPagination();
}
......@@ -202,6 +203,7 @@ function inputHiddenManagement(field, field_search) {
field.setAttribute("value", field_search.value);
let parent_form = field.closest("sib-form");
parent_form.component.inputChange();
parent_form.dispatchEvent(new CustomEvent('formChange'));
refreshPagination();
}
......@@ -236,6 +238,7 @@ function selectHiddenManagementForType(tab, form) {
let parent_form = select_hidden.closest("sib-form");
if (parent_form) {
parent_form.component.inputChange();
parent_form.dispatchEvent(new CustomEvent('formChange'));
refreshPagination();
}
});
......@@ -270,6 +273,7 @@ function InitManagementForType() {
//Trigerring a reload of the associated form
let parent_form = select_hidden.closest("sib-form");
parent_form.component.inputChange();
parent_form.dispatchEvent(new CustomEvent('formChange'));
refreshPagination();
});
});
......@@ -405,13 +409,13 @@ async function manageSelectLanguage() {
//We retrieve element of the url
var pathAfterThePrefix = window.location.pathname.split('/')[2];
var base_url = location.host
var baseUrl = location.protocol + '//' + location.host
//If the selected language is french
let languagesList = await item.component.resource['ldp:contains'];
languagesList.forEach(async (resource) => {
if (item.component.value.languages['@id'] == resource['@id']) {
var redirect = "http://"+base_url+'/' + (await resource.code).toLowerCase() + '/'+pathAfterThePrefix
var redirect = baseUrl + '/' + (await resource.code).toLowerCase() + '/'+pathAfterThePrefix
document.location.href = redirect
}
});
......@@ -516,6 +520,7 @@ function addProperFilterToSearchComponents(targetId) {
let parent_form = hidden_field.closest("sib-form");
parent_form.component.inputChange();
parent_form.dispatchEvent(new CustomEvent('formChange'));
refreshPagination();
});
});
......@@ -525,7 +530,7 @@ function addProperFilterToSearchComponents(targetId) {
let instance_only = baseElement.querySelectorAll(
".instance_database_only"
)[0];
if (instance_only){
if (instance_only) {
let checkbox_instance_only = instance_only.querySelector("input");
if (checkbox_instance_only) {
checkbox_instance_only.onclick = function() {
......
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