From 15b572a959de1775d1807403fae80b2f9dc9a7a4 Mon Sep 17 00:00:00 2001 From: HWFord Date: Fri, 5 Mar 2021 09:06:46 +0100 Subject: [PATCH 1/3] =?UTF-8?q?Page=20donn=C3=A9es,=20changement=20de=20mi?= =?UTF-8?q?se=20en=20page=20all=C3=A9gement=20des=20fonctionnalit=C3=A9s?= =?UTF-8?q?=20en=20haut,=20quisont=20pass=C3=A9es=20dans=20le=20menu=20spe?= =?UTF-8?q?edin=20quelques=20changements=20de=20css=20pour=20mieux=20?= =?UTF-8?q?=C3=A9quilibrer?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- frontend/static/css/admin.css | 67 ++++++++++++++++---------- frontend/static/css/colors.css | 4 +- frontend/static/css/composer.css | 8 ++-- frontend/static/html/import.html | 4 +- frontend/static/js/admin.js | 43 ++++++++++++++++- frontend/static/js/import.js | 2 +- frontend/templates/admin.html | 81 ++++++++++++++++++++------------ 7 files changed, 144 insertions(+), 65 deletions(-) diff --git a/frontend/static/css/admin.css b/frontend/static/css/admin.css index 8f4dd96..c7e8cfd 100644 --- a/frontend/static/css/admin.css +++ b/frontend/static/css/admin.css @@ -154,9 +154,9 @@ h5>.badge { .cards { - padding-left: 5px; + /*padding-left: 5px;*/ padding-bottom: 15px; - padding-top: 5px; + padding-top: 15px; } .row { @@ -167,12 +167,13 @@ h5>.badge { .sticky { z-index: 2; position: sticky; - top: 0; + top: 56px; /*background: white; box-shadow: 0 2px 2px 0 rgba(0, 0, 0, 0.14), 0 3px 1px -2px rgba(0, 0, 0, 0.12), 0 1px 5px 0 rgba(0, 0, 0, 0.2);*/ - padding: 10px; + padding: 15px 0; margin-right: 15px; margin-bottom: 15px; + background-color:rgba(233, 236, 239,0.7); } .sticky-sm { @@ -203,11 +204,13 @@ h5>.badge { /* Cart css */ -#cd-cart.speed-in { +#cd-cart.speed-in, +#cd-filter.speed-in { right: 0; } -#cd-cart { +#cd-cart, +#cd-filter { right: -100%; background: #fff; transition: right .6s; @@ -215,19 +218,22 @@ h5>.badge { @media only screen and (min-width: 1200px) { - #cd-cart { + #cd-cart, + #cd-filter { width: 30%; } } @media only screen and (min-width: 768px) { - #cd-cart { + #cd-cart, + #cd-filter { width: 350px; } } -#cd-cart { +#cd-cart, +#cd-filter { position: fixed; top: 56px; height: 100%; @@ -237,7 +243,8 @@ h5>.badge { z-index: 3; } -#cd-cart h2 { +#cd-cart h2, +#cd-filter h2 { font-size: 14px; font-size: .875rem; font-weight: 700; @@ -246,12 +253,14 @@ h5>.badge { } @media only screen and (min-width: 1200px) { - #cd-cart>* { + #cd-cart>*, + #cd-filter>* { padding: 0 2em; } } -#cd-cart>* { +#cd-cart>*, +#cd-filter>* { padding: 0 1em; } @@ -260,12 +269,14 @@ h5>.badge { } @media only screen and (min-width: 1200px) { - #cd-cart>* { + #cd-cart>*, + #cd-filter>* { padding: 0 2em; } } -#cd-cart>* { +#cd-cart>*, + #cd-filter>* { padding: 0 1em; } @@ -326,7 +337,8 @@ h5>.badge { /* * Toggle off cart icon */ -#togglePanier { +#togglePanier, +#toggleFilter { position: sticky; z-index: 5; width: 32px; @@ -341,7 +353,8 @@ h5>.badge { padding:4px 36px; } -#togglePanier:hover { +#togglePanier:hover, +#toggleFilter:hover { cursor: pointer; background-color: #FFA80E; transition: 0.3s; @@ -350,10 +363,11 @@ h5>.badge { /* * Toggle on cart icon */ -.green { +.green, +#toggle-filter { color: #FFF; padding: 6px 12px 6px 12px; - border: 2px solid #999faf; + border: 2px solid #006878; color: #999faf; display: inline-block; position: relative; @@ -361,21 +375,22 @@ h5>.badge { } .green .number { - padding: 2px 7px; - background: #999faf; + width:25px; + height:25px; position: absolute; border-radius: 50px; font-weight: 700; - font-size: 12px; + font-size: 15px; font-family: inherit; - color: #FFF; - top: -20px; - right: -20px; + color: black; + top: -15px; + right: -15px; margin:0; - border: 2px solid #FFF; + border: 0px; } -.green:hover { +.green:hover, +#toggle-filter:hover { cursor: pointer; background: #006878 !important; color: #FFF !important; diff --git a/frontend/static/css/colors.css b/frontend/static/css/colors.css index a65c5fd..c864807 100644 --- a/frontend/static/css/colors.css +++ b/frontend/static/css/colors.css @@ -54,7 +54,7 @@ /*Colors for color*/ .mreport-primary-color-1{ - color:#006878; + color:#006878!important; } .mreport-primary-color-2{ @@ -66,7 +66,7 @@ } .mreport-secondary-color-1{ - color:#FFA80E; + color:#FFA80E!important; } .mreport-secondary-color-2{ diff --git a/frontend/static/css/composer.css b/frontend/static/css/composer.css index e36568f..172156b 100644 --- a/frontend/static/css/composer.css +++ b/frontend/static/css/composer.css @@ -558,13 +558,13 @@ span.text-edit.badge.mreport-secondary-color-2-bg{ } span.designed-dataviz { - right: 30px; - position: absolute; + /*right: 30px;*/ + /*position: absolute;*/ font-family: "Font Awesome 5 Free"; - font-size: 25px; + font-size: 20px; font-weight: 700; /*color: #218838;*/ - margin-top: -10px; + /*margin-top: -10px;*/ } span.designed-dataviz:before { diff --git a/frontend/static/html/import.html b/frontend/static/html/import.html index be0fdfb..b7188a6 100644 --- a/frontend/static/html/import.html +++ b/frontend/static/html/import.html @@ -1,7 +1,7 @@ diff --git a/frontend/static/js/admin.js b/frontend/static/js/admin.js index e00aab0..1e7d509 100644 --- a/frontend/static/js/admin.js +++ b/frontend/static/js/admin.js @@ -28,8 +28,17 @@ admin = (function () { $("#" + $(this).attr("data-page")).addClass("active"); $(this).addClass("active"); if($(this).attr("data-page") == "reports" && $("#cd-cart").hasClass("speed-in") || - $(this).attr("data-page") =="composer" && $("#cd-cart").hasClass("speed-in")){ + $(this).attr("data-page") =="composer" && $("#cd-cart").hasClass("speed-in")|| + $(this).attr("data-page") =="home" && $("#cd-cart").hasClass("speed-in")){ $("#cd-cart").toggleClass("speed-in"); + $( "#catalog-content" ).css('margin-right','0'); + $( "#catalog-content" ).css('transition','margin-right .6s'); + }else if($(this).attr("data-page") == "reports" && $("#cd-filter").hasClass("speed-in") || + $(this).attr("data-page") =="composer" && $("#cd-filter").hasClass("speed-in") || + $(this).attr("data-page") =="home" && $("#cd-filter").hasClass("speed-in")){ + $("#cd-filter").toggleClass("speed-in"); + $( "#catalog-content" ).css('margin-right','0'); + $( "#catalog-content" ).css('transition','margin-right .6s'); }; }); }); @@ -427,10 +436,42 @@ admin = (function () { /* Toggle the cart to appear */ $(".green").click(function () { $("#cd-cart").toggleClass("speed-in"); + $( "#catalog-content" ).css('margin-right','360px'); + $( "#catalog-content" ).css('transition','margin-right .6s'); + if($("#cd-filter").hasClass("speed-in")){ + $("#cd-filter").toggleClass("speed-in"); + } + if($("#cd-cart").hasClass("speed-in") == false){ + $("#catalog-content" ).css('margin-right','0'); + $("#catalog-content" ).css('transition','margin-right .6s'); + } }); /* Toggle the cart to disappear */ $("#togglePanier").click(function () { $("#cd-cart").toggleClass("speed-in"); + $( "#catalog-content" ).css('margin-right','0'); + $( "#catalog-content" ).css('transition','margin-right .6s'); + }); + + + /* Toggle the filter to appear */ + $("#toggle-filter").click(function () { + $("#cd-filter").toggleClass("speed-in"); + $( "#catalog-content" ).css('margin-right','360px'); + $( "#catalog-content" ).css('transition','margin-right .6s'); + if($("#cd-cart").hasClass("speed-in")){ + $("#cd-cart").toggleClass("speed-in"); + } + if($("#cd-filter").hasClass("speed-in") == false){ + $("#catalog-content" ).css('margin-right','0'); + $("#catalog-content" ).css('transition','margin-right .6s'); + } + }); + /* Toggle the filter to disappear */ + $("#toggleFilter").click(function () { + $("#cd-filter").toggleClass("speed-in"); + $("#catalog-content" ).css('margin-right','0'); + $("#catalog-content" ).css('transition','margin-right .6s'); }); }; diff --git a/frontend/static/js/import.js b/frontend/static/js/import.js index a910244..4f17815 100644 --- a/frontend/static/js/import.js +++ b/frontend/static/js/import.js @@ -251,7 +251,7 @@ import_wizard = (function () { _html.querySelectorAll("template").forEach(function(template) { if (template.dataset.target) { //inject import modal and button in admin.html - document.querySelector(template.dataset.target).appendChild(template.content.firstElementChild); + document.querySelector(template.dataset.target).prepend(template.content.firstElementChild); } }); diff --git a/frontend/templates/admin.html b/frontend/templates/admin.html index 82cf866..c46f645 100644 --- a/frontend/templates/admin.html +++ b/frontend/templates/admin.html @@ -93,7 +93,8 @@

Mreport - Accueil

-

Données

+
+

Données

-
- -
-
- +
+ 0
-
- -
- -
-
- - -
-
-
- 0 -
-
- +
+
@@ -141,10 +124,17 @@
{{title}}
- Editer - Supprimer - - +
+ +
+ + +
+
+
@@ -155,11 +145,12 @@
{{title}}
+
-

Rapports

+

Rapports

@@ -429,11 +420,43 @@
Fermer +
+ +
+
+ +
+
+
+ + +
+

Selection

+ + +
+ Fermer +
+
+

Filtrer

+
+
+ +
+
+ + +
+ +
+
+
-
- 0 -
-
- -
+
@@ -420,43 +421,40 @@
Fermer -
- -
-
- -
-
-
- - -
-
-

Selection

-
    -
-
- - -
- Fermer -
-
-

Filtrer

-
-
- +
+
+
+

Filtrer

+
+
+ +
-
- -
+

Selection

+
+ +
+
+ +
+
+
+ + +
+
+ +
+
    +
+