Commit a46d596a by Etienne Freiss

correction bug url

parent c0675619
#faq { #faqBDM {
font-size: 1.8rem; font-size: 1.8rem;
} }
......
...@@ -36,10 +36,10 @@ $(document).ready(function() { ...@@ -36,10 +36,10 @@ $(document).ready(function() {
} }
toggleHeader(); toggleHeader();
}); });
$('#faq').on('click', (e) => { $('#faqBDM').on('click', (e) => {
e.preventDefault(); e.preventDefault();
if (current_location !== "faq") { if (current_location !== "faqBDM") {
goto('faqBDM'); goto('faq');
} }
toggleHeader(); toggleHeader();
}); });
......
...@@ -55,7 +55,7 @@ function load_partner_shifts(partner_id) { ...@@ -55,7 +55,7 @@ function load_partner_shifts(partner_id) {
/* - Navigation */ /* - Navigation */
/** /**
* @param {String} page home | mes-infos | mes-services | echange-de-services | faqBDM * @param {String} page home | mes-infos | mes-services | echange-de-services | faq
*/ */
function goto(page) { function goto(page) {
if (window.location.pathname === base_location) { if (window.location.pathname === base_location) {
...@@ -88,10 +88,10 @@ function update_dom() { ...@@ -88,10 +88,10 @@ function update_dom() {
current_location = "my_shifts"; current_location = "my_shifts";
$("#main_content").load("/members_space/my_shifts", update_content); $("#main_content").load("/members_space/my_shifts", update_content);
$("#nav_my_shifts").addClass("active"); $("#nav_my_shifts").addClass("active");
} else if (window.location.pathname === base_location + "faqBDM") { } else if (window.location.pathname === base_location + "faq") {
current_location = "faq"; current_location = "faqBDM";
$("#main_content").load("/members_space/faq", update_content); $("#main_content").load("/members_space/faqBDM", update_content);
$("#faq").addClass("active"); $("#faqBDM").addClass("active");
} else if (window.location.pathname === base_location + "echange-de-services") { } else if (window.location.pathname === base_location + "echange-de-services") {
current_location = "shifts_exchange"; current_location = "shifts_exchange";
$("#main_content").load("/members_space/shifts_exchange", update_content); $("#main_content").load("/members_space/shifts_exchange", update_content);
......
...@@ -9,7 +9,7 @@ urlpatterns = [ ...@@ -9,7 +9,7 @@ urlpatterns = [
url(r'^my_info$', views.my_info), url(r'^my_info$', views.my_info),
url(r'^my_shifts$', views.my_shifts), url(r'^my_shifts$', views.my_shifts),
url(r'^shifts_exchange$', views.shifts_exchange), url(r'^shifts_exchange$', views.shifts_exchange),
url(r'^faq$', views.faq), url(r'^faqBDM$', views.faqBDM),
url(r'^no_content$', views.no_content), url(r'^no_content$', views.no_content),
url(r'^get_shifts_history$', views.get_shifts_history), url(r'^get_shifts_history$', views.get_shifts_history),
url('/*$', views.index), # Urls unknown from the server will redirect to index url('/*$', views.index), # Urls unknown from the server will redirect to index
......
...@@ -193,7 +193,7 @@ def shifts_exchange(request): ...@@ -193,7 +193,7 @@ def shifts_exchange(request):
} }
return HttpResponse(template.render(context, request)) return HttpResponse(template.render(context, request))
def faq(request): def faqBDM(request):
template = loader.get_template('members_space/faq.html') template = loader.get_template('members_space/faq.html')
context = { context = {
'title': 'foire aux questions', 'title': 'foire aux questions',
......
<div id="faq" class=" mt-3"> <div id="faqBDM" class=" mt-3">
<div class="page_title txtcenter"> <div class="page_title txtcenter">
<h1> <h1>
......
...@@ -9,8 +9,8 @@ ...@@ -9,8 +9,8 @@
<a href="#" class="nav_item active" id="nav_home">Espace Membre</a> <a href="#" class="nav_item active" id="nav_home">Espace Membre</a>
<a href="#" class="nav_item" id="nav_my_info">Mes Infos</a> <a href="#" class="nav_item" id="nav_my_info">Mes Infos</a>
<a href="#" class="nav_item" id="nav_my_shifts">Mes Services</a> <a href="#" class="nav_item" id="nav_my_shifts">Mes Services</a>
<a href="#" class="nav_item" id="faq">FAQ</a>
<a href="#" class="nav_item" id="nav_shifts_exchange">Échange de services</a> <a href="#" class="nav_item" id="nav_shifts_exchange">Échange de services</a>
<a <a
href="javascript:void(0);" href="javascript:void(0);"
target="_blank" target="_blank"
...@@ -19,6 +19,8 @@ ...@@ -19,6 +19,8 @@
> >
Calendrier ABCD Calendrier ABCD
</a> </a>
<a href="#" class="nav_item" id="faqBDM">FAQ</a>
{# Disconnection button must have this id (logic in all_common.js) #} {# Disconnection button must have this id (logic in all_common.js) #}
<a href="javascript:void(0);" id="deconnect">Déconnexion</a> <a href="javascript:void(0);" id="deconnect">Déconnexion</a>
<a href="javascript:void(0);" class="icon" onclick="toggleHeader()"> <a href="javascript:void(0);" class="icon" onclick="toggleHeader()">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment