redirect.admin.js 851 B

12345678910111213141516171819202122232425262728
  1. (function ($) {
  2. Drupal.behaviors.redirectAdmin = {
  3. attach: function (context) {
  4. $('table.redirect-list-tableselect tbody input:checkbox').bind('change', function(context) {
  5. var checked = $('table.redirect-list-tableselect input:checkbox:checked').length;
  6. if (checked) {
  7. $('fieldset.redirect-list-operations').slideDown();
  8. }
  9. else {
  10. $('fieldset.redirect-list-operations').slideUp();
  11. }
  12. });
  13. $('table.redirect-list-tableselect th.select-all input:checkbox').bind('change', function(context) {
  14. var checked = $(this, context).attr('checked');
  15. if (checked) {
  16. $('fieldset.redirect-list-operations').slideDown();
  17. }
  18. else {
  19. $('fieldset.redirect-list-operations').slideUp();
  20. }
  21. });
  22. $('fieldset.redirect-list-operations').hide();
  23. }
  24. };
  25. })(jQuery);