Commit fd63e06eb0b91633ea1ca6696d54f299c1c370b6
Committed by
hitier
1 parent
73162524
Exists in
master
and in
4 other branches
update coloration of <a> in the navbar with id and not href
Showing
11 changed files
with
18 additions
and
18 deletions
Show diff stats
app/main/templates/agent.html
... | ... | @@ -11,7 +11,7 @@ |
11 | 11 | {% block content %} |
12 | 12 | |
13 | 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 | 16 | <div class="card"> |
17 | 17 | <div class="card-header"> | ... | ... |
app/main/templates/agent_form.html
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | {% block content %} |
11 | 11 | |
12 | 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 | 15 | <form id="agent_form" class="pdc-form" action="{{ url_for('main.agent_edit') }}" method="post"> |
16 | 16 | {% if agent and agent['id'] not in ['', None] %} | ... | ... |
app/main/templates/agents.html
... | ... | @@ -10,7 +10,7 @@ |
10 | 10 | {% block content %} |
11 | 11 | |
12 | 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 | 15 | <table id="table_datatables" class="table table-hover"> |
16 | 16 | <thead> | ... | ... |
app/main/templates/charge_form.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | {% block content %} |
3 | 3 | |
4 | 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 | 7 | <form id="charge_form" class="pdc-form" action="{{ url_for('main.charge_add') }}" method="post"> |
8 | 8 | <div class="form-group"> | ... | ... |
app/main/templates/periods.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | {% block content %} |
3 | 3 | |
4 | 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 | 7 | <table class="table table-hover"> |
8 | 8 | <thead> | ... | ... |
app/main/templates/project.html
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | |
10 | 10 | {% block content %} |
11 | 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 | 14 | <div class="card"> |
15 | 15 | <div class="card-header"> | ... | ... |
app/main/templates/projects.html
... | ... | @@ -9,7 +9,7 @@ |
9 | 9 | {% block content %} |
10 | 10 | |
11 | 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 | 14 | <table id="table_datatables" class="table table-hover"> |
15 | 15 | <thead> | ... | ... |
app/main/templates/services.html
... | ... | @@ -2,7 +2,7 @@ |
2 | 2 | {% block content %} |
3 | 3 | |
4 | 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 | 7 | <table class="table table-hover"> |
8 | 8 | <thead> | ... | ... |
app/static/js/navbar.js
... | ... | @@ -9,5 +9,5 @@ const a_active = navbar_active_split[1]; |
9 | 9 | $("#" + ul_active).addClass("show"); |
10 | 10 | |
11 | 11 | /* Active the li */ |
12 | -var sublink_activate = $("a[href='/" + a_active + "']"); | |
12 | +var sublink_activate = $("#" + a_active); | |
13 | 13 | sublink_activate.addClass("sublink_activate"); |
14 | 14 | \ No newline at end of file | ... | ... |
app/templates/base_page.html
... | ... | @@ -47,12 +47,12 @@ |
47 | 47 | Agent |
48 | 48 | </a> |
49 | 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 | 51 | agents</a> |
52 | 52 | </li> |
53 | 53 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> |
54 | 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 | 56 | fonctions</a> |
57 | 57 | </li> |
58 | 58 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Liste des compétences</a></li> |
... | ... | @@ -66,7 +66,7 @@ |
66 | 66 | Projet |
67 | 67 | </a> |
68 | 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 | 70 | projets</a></li> |
71 | 71 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> |
72 | 72 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Listes des domaines</a></li> |
... | ... | @@ -80,7 +80,7 @@ |
80 | 80 | Service |
81 | 81 | </a> |
82 | 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 | 84 | services</a> |
85 | 85 | </li> |
86 | 86 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Statistiques</a></li> |
... | ... | @@ -92,12 +92,12 @@ |
92 | 92 | Chef de service |
93 | 93 | </a> |
94 | 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 | 96 | Agent</a></li> |
97 | 97 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Renseigner le statut d'un agent pour |
98 | 98 | un |
99 | 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 | 101 | agent à un |
102 | 102 | projet/service</a></li> |
103 | 103 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Création agent virtuel</a></li> |
... | ... | @@ -113,7 +113,7 @@ |
113 | 113 | </a> |
114 | 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 | 117 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouveau service</a></li> |
118 | 118 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle compétence</a></li> |
119 | 119 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Nouvelle fonction</a></li> |
... | ... | @@ -123,7 +123,7 @@ |
123 | 123 | projet</a></li> |
124 | 124 | <li class="nav-item"><a class="sub_link nav-link disabled" href="#">Affecter un responsable de |
125 | 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 | 127 | périodes</a></li> |
128 | 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 | 10 | {% block content %} |
11 | 11 | |
12 | 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 | 15 | <form id="project_form" class="pdc-form" action="{{ url_for('main.project_edit') }}" method="post"> |
16 | 16 | {% if project['id'] and project['id'] != '' %} | ... | ... |