[ Index ]

PHP Cross Reference of Drupal 6 (yi-drupal)

title

Body

[close]

/sites/all/modules/admin/theme/ -> theme.js (source)

   1  // $Id: theme.js,v 1.1.2.1 2009/06/08 05:13:48 yhahn Exp $
   2  
   3  Drupal.behaviors.admin_theme = function(context) {
   4    // Toggle help
   5    $('a.help-toggle:not(.processed)').each(function() {
   6      $(this).addClass('processed').click(function() {
   7        $(this).toggleClass('help-expanded');
   8        $('#help').toggle();
   9        return false;
  10      });
  11    });
  12  
  13    // Toggle help
  14    $('a.subnav-toggle:not(.processed)').each(function() {
  15      $(this).addClass('processed').click(function() {
  16        $(this).toggleClass('subnav-expanded');
  17        $('#secondary-links').toggle();
  18        return false;
  19      });
  20    });
  21  
  22    // Fieldset
  23    $('div.fieldset:not(.admin-processed)').each(function () {
  24      var $fieldset = $(this);
  25      $fieldset.addClass('admin-processed');
  26      if ($fieldset.is('.collapsible')) {
  27        if ($('.error', $fieldset).length > 0) {
  28          $fieldset.removeClass('collapsed');
  29        }
  30        if ($fieldset.is('.collapsed')) {
  31          $fieldset.children('.fieldset-content').hide();
  32        }
  33        $fieldset.children('.fieldset-title').click(function () {
  34          var $title = $(this);
  35          if ($fieldset.is('.collapsed')) {
  36            $title.next('.fieldset-content').slideDown('fast');
  37            $fieldset.removeClass('collapsed');
  38          }
  39          else {
  40            $title.next('.fieldset-content').slideUp('fast');
  41            $fieldset.addClass('collapsed');
  42          }
  43          return false;
  44        });
  45      }
  46    });
  47  }


Generated: Mon Jul 9 18:01:44 2012 Cross-referenced by PHPXref 0.7