Browse Source

specialization filter toggling

alexlcdee 8 years ago
parent
commit
4b8adf6843

+ 23 - 0
app/assets/scripts/main.js

@@ -277,4 +277,27 @@
         }
     })($);
 
+    // isolate scope for easier moving and extension
+    (function ($) {
+        if ($('.specialization-selection__more').length) {
+            $('.specialization-selection__more').click(function (e) {
+                e.preventDefault();
+                var $list = $(this).parent().find('.specialization-selection__list');
+                $(this).parent().find('.specialization-selection__list').animate({'max-height': $list[0].scrollHeight + 20}, 200);
+                $(this).remove();
+            });
+        }
+    })($);
+
+    // isolate scope for easier moving and extension
+    (function ($) {
+        if ($('.specialization-selection__checkbox--group-header').length) {
+            $('.specialization-selection__checkbox--group-header').change(function () {
+                $(this).parents('.specialization-selection__group')
+                    .find('.specialization-selection__list .specialization-selection__checkbox')
+                    .prop('checked', $(this).prop('checked'));
+            });
+        }
+    })($);
+
 })(window.document, window, window.jQuery);

+ 22 - 0
app/assets/styles/content/centerbar/specialization-selection.scss

@@ -72,6 +72,10 @@ $specializationSelectionClass: 'specialization-selection';
         appearance: checkbox;
         display: block;
         width: 13px !important;
+
+        &--group-header {
+            margin-top: 2px;
+        }
     }
 
     &__checkbox-label {
@@ -94,4 +98,22 @@ $specializationSelectionClass: 'specialization-selection';
             background-color: #006dae;
         }
     }
+
+    &__more {
+        color: #0A246A;
+        font-size: 13px;
+        font-family: $fontopensans;
+        padding-left: 18px;
+        cursor: pointer;
+
+        &:after {
+            content: '>';
+            margin-left: 3px;
+        }
+
+        &:hover {
+            color: lighten(#0A246A, 10%);
+            text-decoration: underline;
+        }
+    }
 }

+ 22 - 0
app/www/css/all.css

@@ -3233,6 +3233,10 @@ body {
   width: 13px !important;
 }
 
+.specialization-selection__checkbox--group-header {
+  margin-top: 2px;
+}
+
 .specialization-selection__checkbox-label {
   display: block;
   width: calc(100% - 13px - 5px);
@@ -3254,6 +3258,24 @@ body {
   background-color: #006dae;
 }
 
+.specialization-selection__more {
+  color: #0A246A;
+  font-size: 13px;
+  font-family: "opensans", Arial, "Helvetica CY", "Nimbus Sans L", sans-serif;
+  padding-left: 18px;
+  cursor: pointer;
+}
+
+.specialization-selection__more:after {
+  content: '>';
+  margin-left: 3px;
+}
+
+.specialization-selection__more:hover {
+  color: #0e3499;
+  text-decoration: underline;
+}
+
 .specialization-filter__title {
   margin-bottom: 20px;
   margin-top: 30px;

File diff suppressed because it is too large
+ 0 - 0
app/www/css/all.css.map


File diff suppressed because it is too large
+ 0 - 0
app/www/css/all.min.css


File diff suppressed because it is too large
+ 0 - 0
app/www/js/all.min.js


Some files were not shown because too many files changed in this diff