diff --git a/application/dashboard.class.inc.php b/application/dashboard.class.inc.php index 5bd83fe1a..a512ad299 100644 --- a/application/dashboard.class.inc.php +++ b/application/dashboard.class.inc.php @@ -1033,7 +1033,7 @@ EOF $bStandardSelected = appUserPreferences::GetPref('display_original_dashboard_'.$sId, false); $sSelectorHtml = '
'; $sFile = addslashes($this->GetDefinitionFile()); diff --git a/css/backoffice/layout/_top-bar.scss b/css/backoffice/layout/_top-bar.scss index af411a64c..8ff3e6bca 100644 --- a/css/backoffice/layout/_top-bar.scss +++ b/css/backoffice/layout/_top-bar.scss @@ -101,14 +101,14 @@ $ibo-top-bar--quick-actions--margin-right: $ibo-top-bar--elements-spacing !defau .switch { position: relative; display: inline-block; - width: 30px; - height: 24px; + width: 36px; + height: 20px; vertical-align: baseline; } /* Hide default HTML checkbox */ .switch input { - display: none; + display: none; } /* The slider */ @@ -119,35 +119,38 @@ $ibo-top-bar--quick-actions--margin-right: $ibo-top-bar--elements-spacing !defau left: 0; right: 0; bottom: 0; + background-color: $ibo-color-secondary-600; + transition: .4s; } .slider:before { position: absolute; - right: 5px; - bottom: 2px; - color: $ibo-color-secondary-800; - content: "\f007"; - font-family: "Font Awesome 5 Free", serif; - font-size: $ibo-font-size-100; - font-weight: 900; + content: ""; + height: 15px; + width: 15px; + left: 3px; + bottom: 3px; + background-color: $ibo-color-secondary-300; + transition: .4s; } -.slider:after { - position: absolute; - left: 5px; - bottom: 1px; - color: $ibo-color-primary-600; - content: "\f1ad"; - font-family: "Font Awesome 5 Free", serif; - font-size: $ibo-font-size-150; - font-weight: 900; +input:checked + .slider { + background-color: $ibo-color-primary-600; +} + +input:focus + .slider { + box-shadow: 0 0 1px $ibo-color-primary-600; } input:checked + .slider:before { - content: "\f1ad"; + transform: translateX(14.5px); } -input:checked + .slider:after { - content: "\f007"; +/* Rounded sliders */ +.slider.round { + border-radius: 20px; } +.slider.round:before { + border-radius: 7px; +} diff --git a/css/backoffice/layout/dashboard/_dashboard.scss b/css/backoffice/layout/dashboard/_dashboard.scss index 85c5ea718..359ee4dd3 100644 --- a/css/backoffice/layout/dashboard/_dashboard.scss +++ b/css/backoffice/layout/dashboard/_dashboard.scss @@ -56,3 +56,59 @@ $ibo-dashboard--grid--elements-spacing-y: $ibo-dashlet--elements-spacing-y !defa min-height: 40px; } } + + +// Round Toggle +/* The switch - the box around the slider */ +.ibo-dashboard--switch { + position: relative; + display: inline-block; + width: 30px; + height: 24px; + vertical-align: baseline; +} + +/* Hide default HTML checkbox */ +.ibo-dashboard--switch input { + display: none; +} + +/* The slider */ +.ibo-dashboard--slider { + position: absolute; + cursor: pointer; + top: 0; + left: 0; + right: 0; + bottom: 0; +} + +.ibo-dashboard--slider:before { + position: absolute; + right: 5px; + bottom: 2px; + color: $ibo-color-secondary-800; + content: "\f007"; + font-family: "Font Awesome 5 Free", serif; + font-size: $ibo-font-size-100; + font-weight: 900; +} + +.ibo-dashboard--slider:after { + position: absolute; + left: 5px; + bottom: 1px; + color: $ibo-color-primary-600; + content: "\f1ad"; + font-family: "Font Awesome 5 Free", serif; + font-size: $ibo-font-size-150; + font-weight: 900; +} + +input:checked + .ibo-dashboard--slider:before { + content: "\f1ad"; +} + +input:checked + .ibo-dashboard--slider:after { + content: "\f007"; +}