diff --git a/src/includes/entrepreneur/dashboard.pug b/src/includes/entrepreneur/dashboard.pug index e91bebd00b6ce36ef844d0efce9bdcbc8a8faddb..106a3a9963c677f1abb6f98ab305e1894a2420ab 100644 --- a/src/includes/entrepreneur/dashboard.pug +++ b/src/includes/entrepreneur/dashboard.pug @@ -7,9 +7,6 @@ header#header(role='banner') include ./components/header.pug section#home - div#coopstarter-loader - hidden Loading, please wait... - //TODO: //-Distinguish the search form from the listing //-Create two Sib-displays getting the resources by "types" diff --git a/src/includes/entrepreneur/resources/list.pug b/src/includes/entrepreneur/resources/list.pug index c52c6192a54be0ac2e95a1e02e83cc75c12dbd87..484ccf810af16637cf7779bad6babaf4121384af 100644 --- a/src/includes/entrepreneur/resources/list.pug +++ b/src/includes/entrepreneur/resources/list.pug @@ -14,9 +14,12 @@ container.block_list.flex.flex_espace div.w_75.block-g-entre div h2.title_form Search for a resource + div#resources-loader + hidden Loading resources, please wait... + sib-form#search-by-keyword( data-src=`${endpoints.resources}`, - loader-id="coopstarter-loader" + loader-id="resources-loader" fields='keyword(name_keyword, description, author)' label-keyword="Search by author, name..." widget-keyword="sib-form-placeholder-text" @@ -75,9 +78,7 @@ container.block_list.flex.flex_espace div div.button_base Make a request - div#resources-loader - hidden Loading resources, please wait... - + //Fake tabs to filter by type. div.tabs.flex_espace div(class='tablink filter_by_type active', onclick="openFakeTab(this)") diff --git a/src/scripts/coopstarter.js b/src/scripts/coopstarter.js index 65b07427af11502118a39782ef0de3a4273d97e9..b57310951f9261adb97fa0243f40008852655278 100644 --- a/src/scripts/coopstarter.js +++ b/src/scripts/coopstarter.js @@ -201,10 +201,13 @@ jQuery(document).ready(function($) { type_hidden_field.forEach(function(select_hidden) { options_hidden = select_hidden.getElementsByTagName("option"); for (let option_hidden of options_hidden) { + option_hidden.removeAttribute("selected"); if (option_hidden.value == '{"@id": "'+type_field_search+'"}') { //Actually selecting the option if it is the good one option_hidden.setAttribute("selected", "selected"); select_hidden.setAttribute("value", option_hidden.value); + form.querySelector("sib-form").component.inputChange(); + refreshPagination(); } } //Trigerring a reload of the associated form