- Patch #601150 by bganicky: improved contextual links Javascript.
parent
c327b4d407
commit
1c6df63309
|
@ -14,7 +14,7 @@ Drupal.behaviors.contextualLinks = {
|
|||
var $links = $wrapper.find('ul.contextual-links');
|
||||
var $trigger = $('<a class="contextual-links-trigger" href="#" />').text(Drupal.t('Configure')).click(
|
||||
function () {
|
||||
$wrapper.find('ul.contextual-links').stop(true, true).slideToggle(100);
|
||||
$links.stop(true, true).slideToggle(100);
|
||||
$wrapper.toggleClass('contextual-links-active');
|
||||
return false;
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ Drupal.behaviors.contextualLinks = {
|
|||
// Hide the contextual links when user rolls out of the .contextual-links-region.
|
||||
$region.bind('mouseleave', Drupal.contextualLinks.mouseleave);
|
||||
// Prepend the trigger.
|
||||
$links.end().prepend($trigger);
|
||||
$wrapper.prepend($trigger);
|
||||
});
|
||||
}
|
||||
};
|
||||
|
@ -36,7 +36,7 @@ Drupal.behaviors.contextualLinks = {
|
|||
* Disables outline for the region contextual links are associated with.
|
||||
*/
|
||||
Drupal.contextualLinks.mouseleave = function () {
|
||||
$(this).closest('.contextual-links-region')
|
||||
$(this)
|
||||
.find('.contextual-links-active').removeClass('contextual-links-active')
|
||||
.find('ul.contextual-links').hide();
|
||||
};
|
||||
|
|
Loading…
Reference in New Issue