summaryrefslogtreecommitdiff
path: root/misc/contextual_links.js
diff options
context:
space:
mode:
authorDries Buytaert <dries@buytaert.net>2009-12-06 01:00:27 +0000
committerDries Buytaert <dries@buytaert.net>2009-12-06 01:00:27 +0000
commit66f740c58475b84b907326a0e50e4d91c2fc03ee (patch)
tree9e43dac217331cf78042de4edfefe7b56308086a /misc/contextual_links.js
parent882fa0ab33cec0aaa9ebe942cbfe759fcf8f4a4e (diff)
downloadbrdo-66f740c58475b84b907326a0e50e4d91c2fc03ee.tar.gz
brdo-66f740c58475b84b907326a0e50e4d91c2fc03ee.tar.bz2
- Patch #626286 by sun, David_Rothstein, Rob Loach: make contextual links a module.
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);