Projet

Général

Profil

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

root / drupal7 / sites / all / modules / panelizer / js / panelizer-vertical-tabs.js @ 13755f8d

1
/**
2
 * @file
3
 * This javascript provides Vertical Tabs integration with Panelizer so
4
 * that the tab displays the correct value of the field within the tab.
5
 */
6
(function ($) {
7

    
8
Drupal.behaviors.panelizerFieldsetSummary = {
9
  attach: function (context) {
10
    $('fieldset.panelizer-entity-options', context).drupalSetSummary(function (context) {
11
      var val = $('select', context).val();
12
      if (val == 0) {
13
        return Drupal.t('Not panelized');
14
      }
15
      return Drupal.t('Use panel @name',
16
        { '@name' : $('option[value="' + $('select', context).val() + '"]', context).html() });
17
    });
18
  }
19
};
20

    
21
})(jQuery);