prod-check-database.js 790 B

12345678910111213141516171819202122232425262728293031
  1. (function ($) {
  2. // Show / hide detailed db info.
  3. Drupal.behaviors.prod_check = {
  4. attach: function(context, settings) {
  5. $('#content').find('a.show-more').unbind('click').bind('click', function(e) {
  6. e.preventDefault();
  7. var $this = $(this),
  8. details = $this.attr('data-details'),
  9. hide = Drupal.t('Hide details'),
  10. show = Drupal.t('Show details'),
  11. active = 'expanded';
  12. if ($this.hasClass(active)) {
  13. $('#content').find('pre.' + details).hide();
  14. $this.text(show);
  15. $this.removeClass(active);
  16. }
  17. else {
  18. $('#content').find('pre.' + details).show();
  19. $this.text(hide);
  20. $this.addClass(active);
  21. }
  22. });
  23. }
  24. };
  25. })(jQuery);