Przeglądaj źródła

fixes on info site

alexlcdee 8 lat temu
rodzic
commit
a7a0ae9357

+ 56 - 33
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,33 +180,40 @@
         }
     });
 
-    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'
+        });
+    })($);
 
-    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));
-    };
-
-    (function (assetsUrl) {
+    // 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 + '/css/slick.css';
+        c.href = assetsUrl.replace(/\/+$/, '') + '/css/slick.css';
         c.setAttribute('type', 'text/css');
         n.parentNode.insertBefore(c, n);
 
@@ -221,11 +228,12 @@
                 nextArrow: '<div class="slick-next"></div>'
             });
         };
-        s.src = assetsUrl + '/js/slick.min.js';
+        s.src = assetsUrl.replace(/\/+$/, '') + '/js/slick.min.js';
         n.parentNode.insertBefore(s, n);
-    })(window.assetsUrl);
+    })(window.assetsUrl || '/', document, $);
 
-    (function () {
+    // isolate scope for easier moving and extension
+    (function ($) {
         $('.organization-info__slidedown-handler').click(function (e) {
             e.preventDefault();
             var $content = $(this)
@@ -233,6 +241,21 @@
                 .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);

+ 6 - 0
app/assets/styles/content/centerbar/organization.scss

@@ -319,6 +319,12 @@ $organizationMediaSelector: 'organization-media';
         &-item {
             margin-bottom: 3px;
             display: block;
+            text-decoration: none;
+            color: #000000;
+
+            &:hover {
+                text-decoration: underline;
+            }
         }
     }
 

+ 8 - 1
app/www/css/all.css

@@ -3085,7 +3085,14 @@ 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;

Plik diff jest za duży
+ 0 - 0
app/www/css/all.css.map


Plik diff jest za duży
+ 0 - 0
app/www/css/all.min.css


Plik diff jest za duży
+ 0 - 0
app/www/js/all.min.js


Niektóre pliki nie zostały wyświetlone z powodu dużej ilości zmienionych plików