materio-base-legacy/js/views-contextual.js
bachy b20b38f514 first import
Signed-off-by: bachy <git@g-u-i.net>
2013-01-09 10:53:26 +01:00

17 lines
490 B
JavaScript

/**
* @file
* Javascript related to contextual links.
*/
(function ($) {
Drupal.behaviors.viewsContextualLinks = {
attach: function (context) {
// If there are views-related contextual links attached to the main page
// content, find the smallest region that encloses both the links and the
// view, and display it as a contextual links region.
$('.views-contextual-links-page', context).closest(':has(.view)').addClass('contextual-links-region');
}
};
})(jQuery);