Guest User

Untitled

a guest
Feb 18th, 2018
133
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. (function($){
  2.   Drupal.behaviors.woodify = function (context) {
  3.     $('.view-hbf2011-kleinanzeige-main:not(.woodify-gallery-processed)', context).each(function(){
  4.         var gal_el = $(this);
  5.  
  6.         gal_el.addClass('woodify-gallery-processed');
  7.  
  8.         var display_mode_el = gal_el.find('.woodify-view-display-mode');
  9.         display_mode_el.show();
  10.  
  11.         // find buttons...
  12.         var gal_button = gal_el.find('.woodify-gallery-mode').children('a');
  13.         var list_button = gal_el.find('.woodify-list-mode').children('a');
  14.  
  15.         // bind buttons...
  16.         gal_button.bind('click', function(){
  17.           gal_el.removeClass('woodify-list');
  18.           gal_el.addClass('woodify-gallery');
  19.           $('.row-group').equalHeights();
  20.           return false;
  21.         });
  22.  
  23.         list_button.bind('click', function(){
  24.           gal_el.removeClass('woodify-gallery');
  25.           gal_el.addClass('woodify-list');
  26.           $('.row-group .views-row').css('min-height',0);
  27.           return false;
  28.         });
  29.     });
  30.   };
  31.  
  32.  
  33.   /**
  34.    * init iconfont
  35.    */
  36.   function initIconFont(object,newText) {
  37.     if ($('html').hasClass('fontface')) { //check if browser supports @fontface
  38.       for (var i = 0; i < object.length; i++) {
  39.         object[i].text(newText[i]); // exchange text
  40.       }
  41.     }
  42.   }
  43.  
  44.   $(function() {
  45.     $('.row-group').equalHeights();
  46.     SI.Files.stylizeAll();
  47.    
  48.     // array containing a list of elements for exchange to icons
  49.     var iconFontObject = new Array($('#block-menu-menu-mainmenu li.home a'));
  50.     // array containing a list of the icon trigger letter
  51.     var iconFontObjectNewText = new Array('H');
  52.     initIconFont(iconFontObject,iconFontObjectNewText); // init iconfont
  53.   });
  54. })(jQuery);
Add Comment
Please, Sign In to add comment