Sha256: a2fb20a9f011886b72678c4ef8df934aa5ab3d2747e8c2e18f7686565ac125ef

Contents?: true

Size: 686 Bytes

Versions: 18

Compression:

Stored size: 686 Bytes

Contents

var Renalware = typeof Renalware === 'undefined' ? {} : Renalware;

Renalware.MasonryHelper = (function() {
  var setupMasonry = function() {
    $('.mgrid > .row').masonry({ itemSelector: '.columns' });
  }

  var refreshMasonry = function() {
    $('.mgrid > .row').masonry('layout');
  }

  var triggerMasonryRefresh = function() {
    setTimeout(refreshMasonry, 100);
  }

  var createHandlerToTriggerMasonryRefresh = function() {
    $("[data-trigger-masonry-refresh]").on("click", triggerMasonryRefresh);
  }

  return {
    init: function () {
      setupMasonry();
      createHandlerToTriggerMasonryRefresh();
    }
  };
}());

$(document).ready(Renalware.MasonryHelper.init);

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
renalware-core-2.1.1 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.1.0 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.167 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.166 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.165 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.164 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.163 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.162 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.161 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.160 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.159 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.158 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.157 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.156 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.155 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.153 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.152 app/assets/javascripts/renalware/components/masonry.run.js
renalware-core-2.0.151 app/assets/javascripts/renalware/components/masonry.run.js