From ec797574eb8329c8e4184a85ae08f9a21403fe84 Mon Sep 17 00:00:00 2001 From: Vincent LAURENT Date: Wed, 18 May 2022 10:04:49 +0200 Subject: [PATCH] Block of actions of selected pages --- public/js/organization.js | 13 ++++++++++--- templates/organization.html.php | 11 +++++++---- 2 files changed, 17 insertions(+), 7 deletions(-) diff --git a/public/js/organization.js b/public/js/organization.js index 3950070..5fb96dd 100644 --- a/public/js/organization.js +++ b/public/js/organization.js @@ -269,19 +269,26 @@ var updatePageState = function(page) { var updateGlobalState = function() { document.querySelector('#container_btn_select').classList.add('opacity-50'); + document.querySelector('#container_btn_select').classList.remove('border-primary'); + document.querySelector('#container_btn_select .card-header').classList.remove('bg-primary', 'text-white'); + document.querySelector('#container_btn_select .card-header').classList.add('text-muted'); document.querySelectorAll('#container_btn_select button').forEach(function(button) { - button.classList.add('btn-outline-dark'); + button.classList.add('btn-outline-secondary'); button.classList.remove('btn-outline-primary'); button.setAttribute('disabled', 'disabled'); }); document.querySelector('#container-btn-save-select').classList.add('d-none'); document.querySelector('#container-btn-save').classList.remove('d-none'); - + document.querySelector('#container_btn_select .card-header span').innerText = "Aucune"; if(isSelectionMode()) { + document.querySelector('#container_btn_select .card-header span').innerText = document.querySelectorAll('.canvas-container .input-select:checked').length; document.querySelector('#container_btn_select').classList.remove('opacity-50'); + document.querySelector('#container_btn_select').classList.add('border-primary'); + document.querySelector('#container_btn_select .card-header').classList.remove('text-muted'); + document.querySelector('#container_btn_select .card-header').classList.add('bg-primary', 'text-white'); document.querySelectorAll('#container_btn_select button').forEach(function(button) { button.classList.add('btn-outline-primary'); - button.classList.remove('btn-outline-dark'); + button.classList.remove('btn-outline-secondary'); button.removeAttribute('disabled'); }); document.querySelector('#container-btn-save-select').classList.remove('d-none'); diff --git a/templates/organization.html.php b/templates/organization.html.php index a0c40a4..2b69c0d 100644 --- a/templates/organization.html.php +++ b/templates/organization.html.php @@ -65,10 +65,13 @@
-
- - - +
+
Aucune page(s) séléctionnée(s)
+
+ + + +