From 4b529711381fab4a0e64ae583fe3306cafb6884f Mon Sep 17 00:00:00 2001 From: Etienne Pallier Date: Fri, 6 Mar 2020 19:45:13 +0100 Subject: [PATCH] 6 gros bugfix de la version 2.14 (responsive) --- .gitignore | 2 ++ README.md | 11 +++++++---- src/Controller/MaterielsController.php | 17 ++++++++++++++--- src/Template/Emprunts/view.ctp | 6 ++++-- src/Template/Layout/default.ctp | 6 ++++-- src/Template/Layout/default_avec_bootstrap.ctp | 187 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------------------------------ src/Template/Materiels/add.ctp | 14 ++++++++------ src/Template/Materiels/edit.ctp | 273 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------------------------------------------------- src/Template/Users/index_recap.ctp | 16 ++++++++++++---- webroot/css/jquery-ui/jquery-ui.1.12.1.min.css | 7 +++++++ webroot/css/jquery-ui/jquery-ui.min.css | 7 +++++++ webroot/css/responsive.css | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ webroot/js/DatepickerConfig.js | 44 ++++++++++++++++++++++++-------------------- webroot/js/jquery-1.5.2.js | 16 ---------------- webroot/js/jquery-1.8.12.js | 406 ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- webroot/js/jquery-ui/jquery-ui.1.12.1.min.js | 13 +++++++++++++ webroot/js/jquery-ui/jquery-ui.min.js | 13 +++++++++++++ webroot/js/jquery.min.js | 4 ---- webroot/js/jquery/jquery-1.5.2.js | 16 ++++++++++++++++ webroot/js/jquery/jquery-1.7.2.min.js | 4 ++++ webroot/js/jquery/jquery-1.8.12.js | 406 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ webroot/js/jquery/jquery.js | 2 -- webroot/js/jquery/jquery.min.js | 2 ++ webroot/js/popper.js | 1 - webroot/js/popper.js | 6 ++++++ 25 files changed, 916 insertions(+), 627 deletions(-) create mode 100644 webroot/css/jquery-ui/jquery-ui.1.12.1.min.css create mode 100644 webroot/css/jquery-ui/jquery-ui.min.css delete mode 100755 webroot/js/jquery-1.5.2.js delete mode 100755 webroot/js/jquery-1.8.12.js create mode 100644 webroot/js/jquery-ui/jquery-ui.1.12.1.min.js create mode 100644 webroot/js/jquery-ui/jquery-ui.min.js delete mode 100755 webroot/js/jquery.min.js create mode 100755 webroot/js/jquery/jquery-1.5.2.js create mode 100755 webroot/js/jquery/jquery-1.7.2.min.js create mode 100755 webroot/js/jquery/jquery-1.8.12.js delete mode 100644 webroot/js/jquery/jquery.js create mode 100644 webroot/js/jquery/jquery.min.js delete mode 120000 webroot/js/popper.js create mode 100644 webroot/js/popper.js diff --git a/.gitignore b/.gitignore index 5ce1e20..919dd46 100644 --- a/.gitignore +++ b/.gitignore @@ -11,3 +11,5 @@ composer.json.* composer.lock.* *.ORIG #old/ +webroot.* +webroot/test diff --git a/README.md b/README.md index 82a469f..8ee3fde 100644 --- a/README.md +++ b/README.md @@ -53,11 +53,11 @@ Logiciel testé et validé sur les configurations suivantes : VERSION ACTUELLE -Date: 28/02/2020 -Version: 2.14.0 -Author: Jeanne Prugniel (stagiaire CRAL) +Date: 06/03/2020 +Version: 2.14.6 +Author: EP Commentaire: - Application maintenant "responsive" avec l'utilisation de boostrap (ok sur pc, tablette, et mobile) + 6 gros bugfixes de la version 2.14 (responsive) sur 1 semaine de boulot !! IMPORTANT : - Pour connaitre la version actuelle, taper "./VERSION" @@ -92,6 +92,9 @@ La liste ci-dessous n'est plus à jour, elle est désormais en ligne ici : https ----------------------------------------------------------------------------------------------------------- +28/02/2020 Version 2.14.0 (Jeanne Prugniel, stagiaire CRAL) + Application maintenant "responsive" avec l'utilisation de boostrap (ok sur pc, tablette, et mobile) + 18/02/2020 Version 2.13.15 (EP) Cleanup et bugfix accent perdu sur menu gauche (mac only !!!) diff --git a/src/Controller/MaterielsController.php b/src/Controller/MaterielsController.php index 584a12b..0255011 100755 --- a/src/Controller/MaterielsController.php +++ b/src/Controller/MaterielsController.php @@ -1552,18 +1552,29 @@ class MaterielsController extends AppController ); // Ne pas oublier les espaces après chaque virgule/fin de ligne (sinon le message d'erreur est pas joli) $msgError1 = "Pour valider un matériel, les champs suivants ne doivent pas être vides : + Date de reception, Nom utilisateur, Fournisseur, - Numéro de commande, Organisme, - Date de reception, - et Prix."; + Prix, + et Numéro de commande"; $msgError2 = "Le statut du matériel " . $materiel->designation . " (" . $materiel->numero_laboratoire . ") n'a pas pu être modifié"; foreach ($mandatoryFields as $field) { if ($field === null || $field == '') { if ($onlyOneMateriel) { + /* (EP 2020 03) + * Ce genre de ligne ($this->Flash->...) affichant un message flash en haut de page, + * ne fonctionnait plus à cause de bootstrap (css). + * Ca fonctionne uniquement parce qu'on a surchargé la règle "fade" + * de bootstrap dans inventirap.css + * (il se peut qu'on n'aie plus besoin de faire ça dans une prochaine version + * de bootstrap, ou bootsrap-ui, ou cakephp..., à surveiller donc) + */ $this->Flash->error($msgError1); + // (EP 2020 03) Si on ne veut pas de bouton de suppression du message : + //$this->Flash->set($msgError1, ['params' => ['class' => 'alert alert-dismissible in alert-danger']]); + //$this->Flash->set($msgError1, ['params' => ['class' => 'alert alert-dismissible fade in alert-danger']]); return $this->redirect([ 'action' => 'edit', $id diff --git a/src/Template/Emprunts/view.ctp b/src/Template/Emprunts/view.ctp index e0308ba..f1e7b9f 100755 --- a/src/Template/Emprunts/view.ctp +++ b/src/Template/Emprunts/view.ctp @@ -16,14 +16,16 @@ 'Administration Plus', 'Super Administrateur' ]))) { - echo $this->Html->link(__(' Editer cet emprunt'), [ + //echo $this->Html->link(__(' Editer cet emprunt'), [ + echo $this->Html->link(__(''), [ 'action' => 'edit', $emprunt->id ], [ 'escape' => false, 'onclick' => 'return true;' ]); - echo $this->Form->postLink(__(' Supprimer cet emprunt'), [ + //echo $this->Form->postLink(__(' Supprimer cet emprunt'), [ + echo $this->Form->postLink(__(''), [ 'action' => 'delete', $emprunt->id ], [ diff --git a/src/Template/Layout/default.ctp b/src/Template/Layout/default.ctp index 5e7414a..64b890b 100755 --- a/src/Template/Layout/default.ctp +++ b/src/Template/Layout/default.ctp @@ -36,7 +36,8 @@ $html5Shim = HTML; -$this->prepend('css', $this->Html->css(['bootstrap/bootstrap'])); +//$this->prepend('css', $this->Html->css(['bootstrap/bootstrap'])); +$this->prepend('css', $this->Html->css(['bootstrap/bootstrap.min', 'jquery-ui/jquery-ui.min'])); $this->append('css', $html5Shim); @@ -57,7 +58,8 @@ $this->append('css', $this->Html->css(['smoothness', 'inventirap', 'font-awesome //Prepend `script` block with jQuery and Bootstrap scripts //echo $this->Html->script('jquery/jquery'); //echo $this->Html->script('bootstrap/bootstrap'); -$this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap'])); +//$this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap'])); +$this->prepend('script', $this->Html->script(['jquery/jquery.min', 'bootstrap/bootstrap.min', 'jquery-ui/jquery-ui.min'])); //echo $this->Html->script('script'); //echo $this->Html->script('DatepickerConfig'); //echo $this->Html->script('onTabHover'); diff --git a/src/Template/Layout/default_avec_bootstrap.ctp b/src/Template/Layout/default_avec_bootstrap.ctp index 367e008..64b890b 100755 --- a/src/Template/Layout/default_avec_bootstrap.ctp +++ b/src/Template/Layout/default_avec_bootstrap.ctp @@ -36,14 +36,15 @@ $html5Shim = HTML; -$this->prepend('css', $this->Html->css(['bootstrap/bootstrap'])); +//$this->prepend('css', $this->Html->css(['bootstrap/bootstrap'])); +$this->prepend('css', $this->Html->css(['bootstrap/bootstrap.min', 'jquery-ui/jquery-ui.min'])); $this->append('css', $html5Shim); // //echo $this->Html->css('smoothness'); -$this->append('css', $this->Html->css(['smoothness', 'inventirap', 'font-awesome'])); +$this->append('css', $this->Html->css(['smoothness', 'inventirap', 'font-awesome', 'responsive'])); //<= $this->Html->css('inventirap') > //<= $this->Html->css('font-awesome') > @@ -57,7 +58,8 @@ $this->append('css', $this->Html->css(['smoothness', 'inventirap', 'font-awesome //Prepend `script` block with jQuery and Bootstrap scripts //echo $this->Html->script('jquery/jquery'); //echo $this->Html->script('bootstrap/bootstrap'); -$this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap'])); +//$this->prepend('script', $this->Html->script(['jquery/jquery', 'bootstrap/bootstrap'])); +$this->prepend('script', $this->Html->script(['jquery/jquery.min', 'bootstrap/bootstrap.min', 'jquery-ui/jquery-ui.min'])); //echo $this->Html->script('script'); //echo $this->Html->script('DatepickerConfig'); //echo $this->Html->script('onTabHover'); @@ -100,31 +102,41 @@ $this->append('script', $this->Html->script(['script', 'DatepickerConfig', 'onTa
-