Projet

Général

Profil

Paste
Télécharger (1,29 ko) Statistiques
| Branche: | Révision:

root / drupal7 / sites / all / modules / colorbox / styles / plain / colorbox_style.js @ b433176d

1
/**
2
 * @file
3
 * Colorbox module style js.
4
 */
5

    
6
(function ($) {
7

    
8
Drupal.behaviors.initColorboxPlainStyle = {
9
  attach: function (context, settings) {
10
    $(context).bind('cbox_complete', function () {
11
      // Make all the controls invisible.
12
      $('#cboxCurrent, #cboxSlideshow, #cboxPrevious, #cboxNext', context).addClass('element-invisible');
13
      // Replace "Close" with "×" and show.
14
      $('#cboxClose', context).html('\327').addClass('cbox-close-plain');
15
      // Hide empty title.
16
      if ($('#cboxTitle:empty', context).length == true) {
17
        $('#cboxTitle', context).hide();
18
      }
19
      $('#cboxLoadedContent', context).bind('mouseover', function () {
20
        $('#cboxClose', context).animate({opacity: 1}, {queue: false, duration: "fast"});
21
        if ($('#cboxTitle:empty', context).length == false) {
22
          $('#cboxTitle', context).slideDown();
23
        }
24
      });
25
      $('#cboxOverlay', context).bind('mouseover', function () {
26
        $('#cboxClose', context).animate({opacity: 0}, {queue: false, duration: "fast"});
27
        if ($('#cboxTitle:empty', context).length == false) {
28
          $('#cboxTitle', context).slideUp();
29
        }
30
      });
31
    });
32
    $(context).bind('cbox_closed', function () {
33
      $('#cboxClose', context).removeClass('cbox-close-plain');
34
    });
35
  }
36
};
37

    
38
})(jQuery);