Projet

Général

Profil

Paste
Télécharger (886 octets) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / makemeeting / makemeeting.js @ b75b6b8b

1
(function ($) {
2
  Drupal.behaviors.makemeetingHoverButtons = {
3
    attach: function (context) {
4
      var $trs = $('.makemeeting-table', context).find('tr.editable');
5
      $trs.removeClass('in').hover(function () {
6
        // This will hide all other tr
7
        $trs.filter(':not(.hovering)').removeClass('in');
8
        $(this).addClass('in hovering');
9
      }, function () {
10
        // Hide links after a while
11
        $(this).removeClass('hovering');
12
        setTimeout(function () {
13
          $trs.filter(':not(.hovering)').removeClass('in');
14
        }, 500);
15
      });
16
    }
17
  };
18

    
19
  Drupal.behaviors.makemeetingFormWidth = {
20
    attach: function (context) {
21
      if ($(context).is('.editing')) {
22
        $(context).next().find('td').each(function (index) {
23
          $('form td', context).eq(index).css('width', $(this).width() + 'px');
24
        });
25
      }
26
    }
27
  };
28
}(jQuery));