
| Current Path : /var/www/html/store/web/modules/contrib/commerce/js/ |
Linux ift1.ift-informatik.de 5.4.0-216-generic #236-Ubuntu SMP Fri Apr 11 19:53:21 UTC 2025 x86_64 |
| Current File : /var/www/html/store/web/modules/contrib/commerce/js/conditions.js |
/**
* @file
* Condition UI behaviors.
*/
(function ($, window, Drupal) {
'use strict';
/**
* Provides the summary information for the condition vertical tabs.
*
* @type {Drupal~behavior}
*
* @prop {Drupal~behaviorAttach} attach
* Attaches the behavior for the condition summaries.
*/
Drupal.behaviors.conditionSummary = {
attach: function () {
$('.vertical-tabs__pane').each(function () {
$(this).drupalSetSummary(function (context) {
if ($(context).find('input.enable:checked').length) {
return Drupal.t('Restricted');
}
else {
return Drupal.t('Not restricted');
}
});
});
}
};
})(jQuery, window, Drupal);