The logic that attaches Masonry to the View assumes that every View is wrapped with a div containing the class "view-content". This is an assumption only valid if the classy theme is used! We need to find a more generic selector to use, that themes do not control.

Relevant code from http://cgit.drupalcode.org/file_browser/tree/js/file_browser.view.js#n14

  Drupal.behaviors.FileBrowserView = {
    attach: function (context) {
      var $view = $('.view-content');
...
        $view.masonry({
          columnWidth: '.grid-sizer',
          gutter: '.gutter-sizer',
          itemSelector: '.grid-item',
          percentPosition: true,
          isFitWidth:true
        });
...

Comments

samuel.mortenson created an issue. See original summary.

  • samuel.mortenson committed c824ea7 on 8.x-1.x
    Issue #2820598: Module assumes that the Classy theme is being used/...
samuel.mortenson’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.