root / drupal7 / sites / all / modules / panelizer / js / panelizer-vertical-tabs.js @ 2cf41c1d
1 |
/**
|
---|---|
2 |
* @file
|
3 |
* This javascript provides Vertical Tabs integration with Panelizer so that the
|
4 |
* tab displays the correct value of the field within the tab.
|
5 |
*/
|
6 |
|
7 |
(function ($) { |
8 |
'use strict';
|
9 |
|
10 |
Drupal.behaviors.panelizerFieldsetSummary = { |
11 |
attach: function (context) { |
12 |
$('fieldset.panelizer-entity-options', context).drupalSetSummary(function (context) { |
13 |
var val = $('select', context).val(); |
14 |
if (val === 0) { |
15 |
return Drupal.t('Not panelized'); |
16 |
} |
17 |
return Drupal.t('Use display @name', |
18 |
{ '@name' : $('option[value="' + $('select', context).val() + '"]', context).html() }); |
19 |
}); |
20 |
} |
21 |
}; |
22 |
|
23 |
})(jQuery); |