layout.js 503 B

123456789101112131415161718
  1. /**
  2. * @file layout.js
  3. *
  4. * Contains javascript to make layout modification a little nicer.
  5. */
  6. (function ($) {
  7. Drupal.Panels.Layout = {};
  8. Drupal.Panels.Layout.autoAttach = function() {
  9. $('div.form-item div.layout-icon').click(function() {
  10. $widget = $('input', $(this).parent());
  11. // Toggle if a checkbox, turn on if a radio.
  12. $widget.attr('checked', !$widget.attr('checked') || $widget.is('input[type=radio]'));
  13. });
  14. };
  15. $(Drupal.Panels.Layout.autoAttach);
  16. })(jQuery);