Ver Fonte

Merge branch 'organizations' of Adyn/medgis-ru-assets into master

Alexander Larkin há 8 anos atrás
pai
commit
e874a1a58e

+ 83 - 26
app/assets/scripts/main.js

@@ -1,11 +1,12 @@
 (function (document, window, $) {
-    if ($("*").is('#dayitime')) {
+    if ($('#dayitime').lenght) {
         function addZero(i) {
             if (i < 10) {
                 i = "0" + i;
             }
             return i;
-        };
+        }
+
         function getCurrentTime1() {
             var today_time, h, m;
             today_time = new Date(Date.now());
@@ -47,7 +48,7 @@
         setTimeout(clock, 1000);
     }
 
-    if ($("*").is('#filterservice')) {
+    if ($('#filterservice').length) {
         function checktoggle() {
             if ($("#switch_old").is(':checked')) {
                 $('#switch_old2').addClass("filterservice__labelbig--active");
@@ -77,7 +78,7 @@
             $(".shortnews__description").dotdotdot();
         }, 10);
 
-        if ($("*").is('#filterservice')) {
+        if ($('#filterservice').length) {
             checktoggle();
         }
 
@@ -119,8 +120,7 @@
         $('input, textarea').focus(function () {
             $(this).data('placeholder', $(this).attr('placeholder'))
             $(this).attr('placeholder', '');
-        });
-        $('input, textarea').blur(function () {
+        }).blur(function () {
             $(this).attr('placeholder', $(this).data('placeholder'));
         });
 
@@ -164,7 +164,7 @@
 
         /*$('.centerbar input, .centerbar select').styler();*/
 
-        if ($("*").is('#newsfilter')) {
+        if ($('#newsfilter').length) {
             $("#newsfiltericon").click(function () {
                 $(".newsfilter__open").toggleClass('newsfilter__open--show');
             });
@@ -180,25 +180,82 @@
         }
     });
 
-    new SpecFilter.SpecFilter($('.newsfilter__specializations .newsfilter__text'));
-    new RegionFilter.RegionFilter($('.newsfilter__regions .newsfilter__text'), {
-        itemsContainerClass: 'regionsfilter__container',
-        itemContainerClass: 'regionsfilter__region',
-        itemCheckboxClass: 'regionsfilter__checkbox',
-        itemLabelClass: 'regionsfilter__label'
-    });
+    // isolate scope for easier moving and extension
+    (function ($) {
+        new SpecFilter.SpecFilter($('.newsfilter__specializations .newsfilter__text'));
+        new RegionFilter.RegionFilter($('.newsfilter__regions .newsfilter__text'), {
+            itemsContainerClass: 'regionsfilter__container',
+            itemContainerClass: 'regionsfilter__region',
+            itemCheckboxClass: 'regionsfilter__checkbox',
+            itemLabelClass: 'regionsfilter__label'
+        });
+    })($);
+
+    // isolate scope for easier moving and extension
+    (function (w) {
+        w.showFotorama = function (jQuery, fotoramaObjectClass, fotoramaPrevClass, fotoramaNextClass) {
+            var $selector = jQuery(fotoramaObjectClass);
+            $selector.data('navwidth', ($selector.outerWidth() - 80) + 'px');
+            var $fotoramaDiv = $selector.fotorama();
+            var fotorama = $fotoramaDiv.data('fotorama');
+            jQuery(fotoramaPrevClass).click((function (e) {
+                fotorama.show('<');
+            }).bind(this));
+            jQuery(fotoramaNextClass).click((function (e) {
+                fotorama.show('>');
+            }).bind(this));
+        };
+    })(window);
+
+    // isolate scope for easier moving and extension
+    (function (assetsUrl, document, $) {
+        var n = document.getElementsByTagName('script')[0],
+            s = document.createElement('script'),
+            c = document.createElement('link');
+        c.setAttribute('rel', 'stylesheet');
+        c.href = assetsUrl.replace(/\/+$/, '') + '/css/slick.css';
+        c.setAttribute('type', 'text/css');
+        n.parentNode.insertBefore(c, n);
 
-    window.showFotorama = function(jQuery, fotoramaObjectClass, fotoramaPrevClass, fotoramaNextClass) {
-        var $selector = jQuery(fotoramaObjectClass);
-        $selector.data('navwidth', ($selector.outerWidth() - 80) + 'px');
-        var $fotoramaDiv = $selector.fotorama();
-        var fotorama = $fotoramaDiv.data('fotorama');
-        jQuery(fotoramaPrevClass).click((function (e) {
-            fotorama.show('<');
-        }).bind(this));
-        jQuery(fotoramaNextClass).click((function (e) {
-            fotorama.show('>');
-        }).bind(this));
-    };
+        s.async = true;
+        s.onload = function () {
+            $('.organization-media__slider').slick({
+                infinite: true,
+                dots: false,
+                slidesToShow: 3,
+                slidesToScroll: 1,
+                prevArrow: '<div class="slick-prev"></div>',
+                nextArrow: '<div class="slick-next"></div>'
+            });
+        };
+        s.src = assetsUrl.replace(/\/+$/, '') + '/js/slick.min.js';
+        n.parentNode.insertBefore(s, n);
+    })(window.assetsUrl || '/', document, $);
+
+    // isolate scope for easier moving and extension
+    (function ($) {
+        $('.organization-info__slidedown-handler').click(function (e) {
+            e.preventDefault();
+            var $content = $(this)
+                .parents('.organization-info__slidedown')
+                .find('.organization-info__slidedown-content');
+            $content.slideToggle();
+        });
+    })($);
+
+    // isolate scope for easier moving and extension
+    (function ($) {
+        $('.organization-info__description-read-more').click(function (e) {
+            var $button;
+            var $container;
+            e.preventDefault();
+            $button = $(this);
+            $container = $button.parent().find('.organization-info__description');
+            $container.animate({'max-height': $container.find('.organization-info__description-content').outerHeight() + 100}, 100, function () {
+                $container.removeClass('organization-info__description--short').css('maxHeight', 'none');
+                $button.remove();
+            });
+        });
+    })($);
 
 })(window.document, window, window.jQuery);

+ 63 - 1
app/assets/styles/content/centerbar/organization.scss

@@ -280,6 +280,20 @@ $organizationMediaSelector: 'organization-media';
             background: url(../img/blockslide_sprite.png) no-repeat;
         }
     }
+
+    &__administration-content {
+        padding-left: 10px;
+    }
+
+    &__sub-organizations {
+        &-header {
+            font-family: $fontcuprum;
+            font-size: 20px;
+            font-weight: bold;
+            color: #3b434d;
+            margin-bottom: 10px;
+        }
+    }
 }
 
 .#{$organizationMediaSelector} {
@@ -292,7 +306,7 @@ $organizationMediaSelector: 'organization-media';
     &__header {
         color: #3b434d;
         font-size: 17px;
-        font-weight: bold;
+        font-weight: 600;
         margin-bottom: 17px;
     }
 
@@ -305,6 +319,54 @@ $organizationMediaSelector: 'organization-media';
         &-item {
             margin-bottom: 3px;
             display: block;
+            text-decoration: none;
+            color: #000000;
+
+            &:hover {
+                text-decoration: underline;
+            }
+        }
+    }
+
+    &__slider {
+        margin: 0 30px 13px;
+        width: calc(100% - 60px);
+
+        &-slide {
+            text-align: center;
+
+            &-content {
+                max-width: 200px;
+                margin: 0 auto;
+            }
+        }
+
+        .slick-arrow {
+
+            width: 25px;
+            height: 45px;
+            position: absolute;
+            top: 50%;
+            margin-top: -23px;
+            cursor: pointer;
+            background-image: url(../img/slider/slidersprite.png);
+
+            &.slick-prev {
+                background-position: left top;
+                left: -27px;
+
+                &:hover {
+                    background-position: left bottom;
+                }
+            }
+            &.slick-next {
+                background-position: right top;
+                right: -27px;
+
+                &:hover {
+                    background-position: right bottom;
+                }
+            }
         }
     }
 }

+ 63 - 2
app/www/css/all.css

@@ -3055,6 +3055,18 @@ body {
     cursor: pointer;
     background: url(../img/blockslide_sprite.png) no-repeat; }
 
+.organization-info__administration-content {
+    padding-left: 10px;
+}
+
+.organization-info__sub-organizations-header {
+    font-family: "cuprum", Impact, "Charcoal CY", sans-serif;
+    font-size: 20px;
+    font-weight: bold;
+    color: #3b434d;
+    margin-bottom: 10px;
+}
+
 .organization-media__container {
   font-family: "cuprum", Impact, "Charcoal CY", sans-serif;
   border: 1px solid #ebebeb;
@@ -3063,7 +3075,7 @@ body {
 .organization-media__header {
   color: #3b434d;
   font-size: 17px;
-  font-weight: bold;
+    font-weight: 600;
   margin-bottom: 17px; }
 
 .organization-media__list {
@@ -3073,7 +3085,56 @@ body {
   display: block; }
   .organization-media__list-item {
     margin-bottom: 3px;
-    display: block; }
+      display: block;
+      text-decoration: none;
+      color: #000000;
+  }
+
+.organization-media__list-item:hover {
+    text-decoration: underline;
+}
+
+.organization-media__slider {
+    margin: 0 30px 13px;
+    width: calc(100% - 60px);
+}
+
+.organization-media__slider-slide {
+    text-align: center;
+}
+
+.organization-media__slider-slide-content {
+    max-width: 200px;
+    margin: 0 auto;
+}
+
+.organization-media__slider .slick-arrow {
+    width: 25px;
+    height: 45px;
+    position: absolute;
+    top: 50%;
+    margin-top: -23px;
+    cursor: pointer;
+    background-image: url(../img/slider/slidersprite.png);
+}
+
+.organization-media__slider .slick-arrow.slick-prev {
+    background-position: left top;
+    left: -27px;
+}
+
+.organization-media__slider .slick-arrow.slick-prev:hover {
+    background-position: left bottom;
+}
+
+.organization-media__slider .slick-arrow.slick-next {
+    background-position: right top;
+    right: -27px;
+}
+
+.organization-media__slider .slick-arrow.slick-next:hover {
+    background-position: right bottom;
+}
 
 .opinion__container {
   float: right;

Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
app/www/css/all.css.map


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
app/www/css/all.min.css


Diff do ficheiro suprimidas por serem muito extensas
+ 0 - 0
app/www/js/all.min.js


Alguns ficheiros não foram mostrados porque muitos ficheiros mudaram neste diff