l10n_update.js 618 B

12345678910111213141516171819202122
  1. (function ($) {
  2. Drupal.behaviors.l10nUpdateCollapse = {
  3. attach: function (context, settings) {
  4. $('.l10n-update .l10n-update-wrapper', context).once('l10nupdatecollapse', function () {
  5. var wrapper = $(this);
  6. // Turn the project title into a clickable link.
  7. // Add an event to toggle the content visibiltiy.
  8. var $legend = $('.project-title', this);
  9. var $link = $('<a href="#"></a>')
  10. .prepend($legend.contents())
  11. .appendTo($legend)
  12. .click(function () {
  13. Drupal.toggleFieldset(wrapper);
  14. return false;
  15. });
  16. });
  17. }
  18. };
  19. })(jQuery);