i18n_block.js 777 B

123456789101112131415161718192021222324252627282930
  1. (function ($) {
  2. /**
  3. * Provide the summary information for the block settings vertical tab.
  4. */
  5. Drupal.behaviors.i18nSettingsSummary = {
  6. attach: function (context) {
  7. $('fieldset#edit-languages', context).drupalSetSummary(function (context) {
  8. var summary = '';
  9. if ($('.form-item-i18n-mode input[type=checkbox]:checked', context).val()) {
  10. summary += Drupal.t('Translatable');
  11. }
  12. else {
  13. summary += Drupal.t('Not translatable');
  14. }
  15. summary += ', ';
  16. if ($('.form-item-languages input[type=checkbox]:checked', context).val()) {
  17. summary += Drupal.t('Restricted to certain languages');
  18. }
  19. else {
  20. summary += Drupal.t('Not restricted');
  21. }
  22. return summary;
  23. });
  24. }
  25. };
  26. })(jQuery);