colorbox_admin_settings.js 1.0 KB

12345678910111213141516171819202122232425262728293031323334353637
  1. /**
  2. * @file
  3. * Colorbox module admin settings js.
  4. */
  5. (function ($) {
  6. Drupal.behaviors.initColorboxAdminSettings = {
  7. attach: function (context, settings) {
  8. $('div.colorbox-custom-settings-activate input.form-radio', context).click(function () {
  9. if (this.value == 1) {
  10. $('div.colorbox-custom-settings', context).show();
  11. }
  12. else {
  13. $('div.colorbox-custom-settings', context).hide();
  14. }
  15. });
  16. $('div.colorbox-slideshow-settings-activate input.form-radio', context).click(function () {
  17. if (this.value == 1) {
  18. $('div.colorbox-slideshow-settings', context).show();
  19. }
  20. else {
  21. $('div.colorbox-slideshow-settings', context).hide();
  22. }
  23. });
  24. $('div.colorbox-title-trim-settings-activate input.form-radio', context).click(function () {
  25. if (this.value == 1) {
  26. $('div.colorbox-title-trim-settings', context).show();
  27. }
  28. else {
  29. $('div.colorbox-title-trim-settings', context).hide();
  30. }
  31. });
  32. }
  33. };
  34. })(jQuery);