drupal/core/modules/views/js/views-contextual.js

19 lines
499 B
JavaScript
Raw Normal View History

2009-05-17 11:16:51 +00:00
/**
* @file
* Javascript related to contextual links.
*/
(function ($) {
"use strict";
2009-05-17 11:16:51 +00:00
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-region');
2009-05-17 11:16:51 +00:00
}
};
})(jQuery);