summaryrefslogtreecommitdiff
path: root/misc/contextual_links.js
diff options
context:
space:
mode:
Diffstat (limited to 'misc/contextual_links.js')
-rw-r--r--misc/contextual_links.js42
1 files changed, 0 insertions, 42 deletions
diff --git a/misc/contextual_links.js b/misc/contextual_links.js
deleted file mode 100644
index 0dfc9ddfa..000000000
--- a/misc/contextual_links.js
+++ /dev/null
@@ -1,42 +0,0 @@
-// $Id$
-(function ($) {
-
-Drupal.contextualLinks = Drupal.contextualLinks || {};
-
-/**
- * Attach outline behavior for regions associated with contextual links.
- */
-Drupal.behaviors.contextualLinks = {
- attach: function (context) {
- $('div.contextual-links-wrapper', context).once('contextual-links', function () {
- var $wrapper = $(this);
- var $trigger = $('<a class="contextual-links-trigger" href="#" />').text(Drupal.t('Configure')).click(
- function () {
- $wrapper.find('ul.contextual-links').slideToggle(100);
- $wrapper.toggleClass('contextual-links-active');
- return false;
- }
- );
- $wrapper.prepend($trigger)
- .closest('.contextual-links-region').hover(Drupal.contextualLinks.hover, Drupal.contextualLinks.hoverOut);
- });
- }
-};
-
-/**
- * Enables outline for the region contextual links are associated with.
- */
-Drupal.contextualLinks.hover = function () {
- $(this).closest('.contextual-links-region').addClass('contextual-links-region-active');
-};
-
-/**
- * Disables outline for the region contextual links are associated with.
- */
-Drupal.contextualLinks.hoverOut = function () {
- $(this).closest('.contextual-links-region').removeClass('contextual-links-region-active')
- .find('.contextual-links-active').removeClass('contextual-links-active')
- .find('ul.contextual-links').hide();
-};
-
-})(jQuery);