Commit fd63e06eb0b91633ea1ca6696d54f299c1c370b6

Authored by Anais Amato
Committed by hitier
1 parent 73162524

update coloration of <a> in the navbar with id and not href

app/main/templates/agent.html
@@ -11,7 +11,7 @@ @@ -11,7 +11,7 @@
11 {% block content %} 11 {% block content %}
12 12
13 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 13 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
14 -<span id="nav_actived" style="display: none">agent,agents</span> 14 +<span id="nav_actived" style="display: none">agent,liste_agents</span>
15 15
16 <div class="card"> 16 <div class="card">
17 <div class="card-header"> 17 <div class="card-header">
app/main/templates/agent_form.html
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 {% block content %} 10 {% block content %}
11 11
12 <!-- Invisible span to define wich ul and a in the navbar are actived --> 12 <!-- Invisible span to define wich ul and a in the navbar are actived -->
13 - <span id="nav_actived" style="display: none">cds,agent/create</span> 13 + <span id="nav_actived" style="display: none">cds,edit_agent</span>
14 14
15 <form id="agent_form" class="pdc-form" action="{{ url_for('main.agent_edit') }}" method="post"> 15 <form id="agent_form" class="pdc-form" action="{{ url_for('main.agent_edit') }}" method="post">
16 {% if agent and agent['id'] not in ['', None] %} 16 {% if agent and agent['id'] not in ['', None] %}
app/main/templates/agents.html
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 {% block content %} 10 {% block content %}
11 11
12 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 12 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
13 -<span id="nav_actived" style="display: none">agent,agents</span> 13 +<span id="nav_actived" style="display: none">agent,liste_agents</span>
14 14
15 <table id="table_datatables" class="table table-hover"> 15 <table id="table_datatables" class="table table-hover">
16 <thead> 16 <thead>
app/main/templates/charge_form.html
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 {% block content %} 2 {% block content %}
3 3
4 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 4 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
5 - <span id="nav_actived" style="display: none">cds,charge/add</span> 5 + <span id="nav_actived" style="display: none">cds,add_charge</span>
6 6
7 <form id="charge_form" class="pdc-form" action="{{ url_for('main.charge_add') }}" method="post"> 7 <form id="charge_form" class="pdc-form" action="{{ url_for('main.charge_add') }}" method="post">
8 <div class="form-group"> 8 <div class="form-group">
app/main/templates/periods.html
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 {% block content %} 2 {% block content %}
3 3
4 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 4 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
5 -<span id="nav_actived" style="display: none">admin,periods</span> 5 +<span id="nav_actived" style="display: none">admin,liste_periodes</span>
6 6
7 <table class="table table-hover"> 7 <table class="table table-hover">
8 <thead> 8 <thead>
app/main/templates/project.html
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 9
10 {% block content %} 10 {% block content %}
11 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 11 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
12 -<span id="nav_actived" style="display: none">projet,projects</span> 12 +<span id="nav_actived" style="display: none">projet,liste_projets</span>
13 13
14 <div class="card"> 14 <div class="card">
15 <div class="card-header"> 15 <div class="card-header">
app/main/templates/projects.html
@@ -9,7 +9,7 @@ @@ -9,7 +9,7 @@
9 {% block content %} 9 {% block content %}
10 10
11 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 11 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
12 -<span id="nav_actived" style="display: none">projet,projects</span> 12 +<span id="nav_actived" style="display: none">projet,liste_projets</span>
13 13
14 <table id="table_datatables" class="table table-hover"> 14 <table id="table_datatables" class="table table-hover">
15 <thead> 15 <thead>
app/main/templates/services.html
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 {% block content %} 2 {% block content %}
3 3
4 <!-- Invisible span to definte wich ul and a in the navbar are actived --> 4 <!-- Invisible span to definte wich ul and a in the navbar are actived -->
5 -<span id="nav_actived" style="display: none">service,services</span> 5 +<span id="nav_actived" style="display: none">service,liste_services</span>
6 6
7 <table class="table table-hover"> 7 <table class="table table-hover">
8 <thead> 8 <thead>
app/static/js/navbar.js
@@ -9,5 +9,5 @@ const a_active = navbar_active_split[1]; @@ -9,5 +9,5 @@ const a_active = navbar_active_split[1];
9 $("#" + ul_active).addClass("show"); 9 $("#" + ul_active).addClass("show");
10 10
11 /* Active the li */ 11 /* Active the li */
12 -var sublink_activate = $("a[href='/" + a_active + "']"); 12 +var sublink_activate = $("#" + a_active);
13 sublink_activate.addClass("sublink_activate"); 13 sublink_activate.addClass("sublink_activate");
14 \ No newline at end of file 14 \ No newline at end of file
app/templates/base_page.html
@@ -47,12 +47,12 @@ @@ -47,12 +47,12 @@
47 Agent 47 Agent
48 </a> 48 </a>
49 <ul aria-expanded="false" class="collapse" class="nav" data-parent="#v_menu" id="agent"> 49 <ul aria-expanded="false" class="collapse" class="nav" data-parent="#v_menu" id="agent">
50 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.agents') }}">Liste des 50 + <li class="nav-item"><a id="liste_agents" class="sub_link nav-link " href="{{ url_for('main.agents') }}">Liste des
51 agents</a> 51 agents</a>
52 </li> 52 </li>
53 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> 53 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li>
54 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des responsabilités</a></li> 54 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des responsabilités</a></li>
55 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.capacities') }}">Liste des 55 + <li class="nav-item"><a id="capacities" class="sub_link nav-link " href="{{ url_for('main.capacities') }}">Liste des
56 fonctions</a> 56 fonctions</a>
57 </li> 57 </li>
58 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des compétences</a></li> 58 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des compétences</a></li>
@@ -66,7 +66,7 @@ @@ -66,7 +66,7 @@
66 Projet 66 Projet
67 </a> 67 </a>
68 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="projet"> 68 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="projet">
69 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.projects') }}">Liste des 69 + <li class="nav-item"><a id="liste_projets" class="sub_link nav-link " href="{{ url_for('main.projects') }}">Liste des
70 projets</a></li> 70 projets</a></li>
71 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> 71 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li>
72 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des domaines</a></li> 72 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des domaines</a></li>
@@ -80,7 +80,7 @@ @@ -80,7 +80,7 @@
80 Service 80 Service
81 </a> 81 </a>
82 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="service"> 82 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="service">
83 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.services') }}">Liste des 83 + <li class="nav-item"><a id="liste_services" class="sub_link nav-link " href="{{ url_for('main.services') }}">Liste des
84 services</a> 84 services</a>
85 </li> 85 </li>
86 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> 86 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li>
@@ -92,12 +92,12 @@ @@ -92,12 +92,12 @@
92 Chef de service 92 Chef de service
93 </a> 93 </a>
94 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="cds"> 94 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="cds">
95 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.agent_edit') }}">Ajouter un 95 + <li class="nav-item"><a id="edit_agent" class="sub_link nav-link " href="{{ url_for('main.agent_edit') }}">Ajouter un
96 Agent</a></li> 96 Agent</a></li>
97 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Renseigner le statut d'un agent pour 97 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Renseigner le statut d'un agent pour
98 un 98 un
99 semestre</a></li> 99 semestre</a></li>
100 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.charge_add') }}">Affecter un 100 + <li class="nav-item"><a id="add_charge" class="sub_link nav-link " href="{{ url_for('main.charge_add') }}">Affecter un
101 agent à un 101 agent à un
102 projet/service</a></li> 102 projet/service</a></li>
103 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Création agent virtuel</a></li> 103 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Création agent virtuel</a></li>
@@ -113,7 +113,7 @@ @@ -113,7 +113,7 @@
113 </a> 113 </a>
114 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="admin"> 114 <ul aria-expanded="false" class="collapse" data-parent="#v_menu" id="admin">
115 115
116 - <li class="nav-item"><a class="sub_link nav-link" href="{{ url_for('main.project_edit') }}">Nouveau projet</a></li> 116 + <li class="nav-item"><a id="project_edit" class="sub_link nav-link" href="{{ url_for('main.project_edit') }}">Nouveau projet</a></li>
117 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau service</a></li> 117 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau service</a></li>
118 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle compétence</a></li> 118 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle compétence</a></li>
119 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle fonction</a></li> 119 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle fonction</a></li>
@@ -123,7 +123,7 @@ @@ -123,7 +123,7 @@
123 projet</a></li> 123 projet</a></li>
124 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de 124 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de
125 service</a></li> 125 service</a></li>
126 - <li class="nav-item"><a class="sub_link nav-link " href="{{ url_for('main.periods') }}">Liste des 126 + <li class="nav-item"><a id="liste_periodes" class="sub_link nav-link " href="{{ url_for('main.periods') }}">Liste des
127 périodes</a></li> 127 périodes</a></li>
128 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau semestre</a></li> 128 <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau semestre</a></li>
129 129
app/templates/project_form.html
@@ -10,7 +10,7 @@ @@ -10,7 +10,7 @@
10 {% block content %} 10 {% block content %}
11 11
12 <!-- Invisible span to define wich ul and a in the navbar are actived --> 12 <!-- Invisible span to define wich ul and a in the navbar are actived -->
13 - <span id="nav_actived" style="display: none">admin,project/create</span> 13 + <span id="nav_actived" style="display: none">admin,project_edit</span>
14 14
15 <form id="project_form" class="pdc-form" action="{{ url_for('main.project_edit') }}" method="post"> 15 <form id="project_form" class="pdc-form" action="{{ url_for('main.project_edit') }}" method="post">
16 {% if project['id'] and project['id'] != '' %} 16 {% if project['id'] and project['id'] != '' %}