From 7d3b47255ad66ced836190dec43b6c86a0661907 Mon Sep 17 00:00:00 2001 From: Vincent Vanwaelscappel Date: Wed, 28 Sep 2022 12:32:24 +0200 Subject: [PATCH] wip #5485 @1.5 --- inc/svg-sprite.php | 2 +- js/script.js | 28 +++++++++++++--- refacturations.php | 35 +++++++++++-------- style/inc/forms.sass | 11 +++++- style/inc/menu.sass | 2 +- style/inc/variables.sass | 4 +++ style/style.sass | 72 ++++++++++++++++++++++++++++++++++------ 7 files changed, 123 insertions(+), 31 deletions(-) diff --git a/inc/svg-sprite.php b/inc/svg-sprite.php index 295a1a1..ee0b5c6 100644 --- a/inc/svg-sprite.php +++ b/inc/svg-sprite.php @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/js/script.js b/js/script.js index 52dd3a3..53898f6 100644 --- a/js/script.js +++ b/js/script.js @@ -26,16 +26,16 @@ $(function () { // Menu : afficher le sous-menu au clic sur un élement $(document).on('click', '.open-submenu', function () { var li = $(this).closest('li'); - var show=!li.hasClass('active'); + var show = !li.hasClass('active'); $(this).closest('ul').find('li.active').removeClass('active'); - if(show){ + if (show) { li.addClass('active'); } return false; }); // Interrupteurs "Afficher tout / ma sélection - var updateSwitchSelection=function(){ + var updateSwitchSelection = function () { $('.switch label').each(function () { if ($(this).find('input').prop('checked')) { $(this).addClass('checked'); @@ -50,7 +50,27 @@ $(function () { updateSwitchSelection(); // Tables - + var updateTable = function () { + $('table').each(function () { + $(this).find('td input[type=checkbox]').each(function () { + var checked = $(this).prop('checked'); + var tr = $(this).closest('tr'); + if (checked) { + $(tr).addClass('selected'); + } else { + $(tr).removeClass('selected'); + } + }); + }); + } + $(document).on('change', 'input[type=checkbox]', function () { + if ($(this).closest('th').length === 1) { + var checked = $(this).prop('checked'); + $(this).closest('table').find('td input[type=checkbox]').prop('checked', checked); + } + updateTable(); + }); + updateTable(); // Menu : passer le menu en mode compact $(document).on('click', '.toggle-menu', function () { diff --git a/refacturations.php b/refacturations.php index 5bdd81f..72a257e 100644 --- a/refacturations.php +++ b/refacturations.php @@ -10,25 +10,28 @@ Rechercher -
+ Réinitialiser les filtres
-
- - -
-

6 Refacturations TFPB

- +
+
+ + +
+

6 Refacturations TFPB

+ +
- - - - - - + + + + + + @@ -85,7 +88,8 @@ - + + @@ -141,5 +145,8 @@
PropriétaireIdentificationNuméro et rueCode postalVilleAnnéePropriétaireIdentificationNuméro et rueCode postalVilleAnnée
78640 VELIZY-VILLACOUBLAY 2022
COPROPRIETAIRES DU CENTRE COMMERCIAL VELIZY II C. Co. Vélizy 2
+
\ No newline at end of file diff --git a/style/inc/forms.sass b/style/inc/forms.sass index d4f8ddc..933a757 100644 --- a/style/inc/forms.sass +++ b/style/inc/forms.sass @@ -49,4 +49,13 @@ form position: absolute top: 11px right: 15px - height: 25px \ No newline at end of file + height: 25px + + .reset + display: inline-block + vertical-align: top + color: $cancel-color + margin: 17px 0 0 20px + + svg + height: 12px \ No newline at end of file diff --git a/style/inc/menu.sass b/style/inc/menu.sass index 6749c45..157f603 100644 --- a/style/inc/menu.sass +++ b/style/inc/menu.sass @@ -1,4 +1,4 @@ -header +#menu $width: 150px $bgcolor: $menu-background $bghover: #292929 diff --git a/style/inc/variables.sass b/style/inc/variables.sass index 22c00e8..0afc0d8 100644 --- a/style/inc/variables.sass +++ b/style/inc/variables.sass @@ -4,6 +4,10 @@ $menu-background: #363636 $thead-background: #363636 $table-odd-background:#F0EDEB +$table-selected-background: #F9CABB +$table-odd-selected-background: #F9CABB + +$cancel-color: #D6231A $button-color: #c1ce3a $input-text-color: #454565 diff --git a/style/style.sass b/style/style.sass index b39fb79..241bb28 100644 --- a/style/style.sass +++ b/style/style.sass @@ -11,14 +11,17 @@ body .button border-radius: 6px display: inline-block - padding: 10px 15px + padding: 10px 50px 10px 20px color: #fff background-color: $button-color + height: 40px + position: relative svg - height: 20px - position: relative - top: -3px + height: 30px + position: absolute + top: 3px + right: 15px main @@ -28,36 +31,77 @@ main margin-top: 15px padding: 15px 0 + &.table border-radius: 6px background-color: #fff padding: $space - h3 - color: $headings-color - text-align: center - font-size: 24px - font-weight: 900 - line-height: 30px + + header, footer + position: relative + height: 40px + margin: 0 0 20px 0 + + .actions + position: absolute + top: 0 + right: 0 + + h3 + color: $headings-color + text-align: center + font-size: 24px + font-weight: 900 + line-height: 40px + + footer + margin: 20px 0 0 0 table width: 100% font-size: 16px + input[type=checkbox] + text-align: center + td, th padding: 10px vertical-align: middle text-align: left height: 70px + &:first-child + text-align: center thead th background-color: $thead-background color: #fff + font-weight: bold + padding-right: 30px + + svg + display: inline-block + height: 5px + margin-left: 6px + overflow: visible + vertical-align: top + margin-top: 3px + + &.eif-order + height: 12px + color: rgba(255,255,255,0.25) + + &.eif-order-asc + vertical-align: top + + &.eif-order-desc + margin-top: 8px &:first-child border-radius: 4px 0 0 0 + padding-right: 10px &:last-child border-radius: 0 4px 0 0 @@ -68,10 +112,18 @@ main border-width: 1px 0 border-color: $light-color + &.selected + td + background-color: $table-selected-background + &:nth-child(even) td background-color: $table-odd-background + &.selected + td + background-color: $table-odd-selected-background + h2 color: $headings-color -- 2.39.5