root / drupal7 / sites / all / modules / views / js / views-contextual.js @ a45e4bc1
1 |
/**
|
---|---|
2 |
* @file
|
3 |
* Javascript related to contextual links.
|
4 |
*/
|
5 |
(function ($) { |
6 |
|
7 |
Drupal.behaviors.viewsContextualLinks = { |
8 |
attach: function (context) { |
9 |
// If there are views-related contextual links attached to the main page
|
10 |
// content, find the smallest region that encloses both the links and the
|
11 |
// view, and display it as a contextual links region.
|
12 |
$('.views-contextual-links-page', context).closest(':has(".view"):not("body")').addClass('contextual-links-region'); |
13 |
} |
14 |
}; |
15 |
|
16 |
})(jQuery); |