/[drupal]/contributions/modules/conditional_fields/conditional_fields.js
ViewVC logotype

Diff of /contributions/modules/conditional_fields/conditional_fields.js

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.1.2.14.2.8, Thu May 28 14:37:16 2009 UTC revision 1.1.2.14.2.9, Sat Aug 15 16:40:00 2009 UTC
# Line 51  Drupal.ConditionalFields.doAnimation = f Line 51  Drupal.ConditionalFields.doAnimation = f
51        case 0:        case 0:
52          showOrHide == 'show' ? toSwitch.show() : toSwitch.hide();          showOrHide == 'show' ? toSwitch.show() : toSwitch.hide();
53        case 1:        case 1:
54          showOrHide == 'show' ? toSwitch.slideDown(Drupal.settings.ConditionalFields.ui_settings.anim_speed) :          /* Don't double top and bottom margins while sliding. */
55                                 toSwitch.slideUp(Drupal.settings.ConditionalFields.ui_settings.anim_speed);          var firstChild = toSwitch.children(':first-child');
56            var marginTop = firstChild.css('margin-top');
57            var marginBottom = firstChild.css('margin-bottom');
58            firstChild.css('margin-top', '0').css('margin-bottom', '0');
59            if (showOrHide == 'show') {
60              toSwitch.slideDown(Drupal.settings.ConditionalFields.ui_settings.anim_speed, function() {
61                firstChild.css('margin-top', marginTop).css('margin-bottom', marginBottom);
62              });
63            }
64            else {
65              toSwitch.slideUp(Drupal.settings.ConditionalFields.ui_settings.anim_speed, function() {
66                firstChild.css('margin-top', marginTop).css('margin-bottom', marginBottom);
67              });
68            }
69        case 2:        case 2:
70          showOrHide == 'show' ? toSwitch.fadeIn(Drupal.settings.ConditionalFields.ui_settings.anim_speed) :          showOrHide == 'show' ? toSwitch.fadeIn(Drupal.settings.ConditionalFields.ui_settings.anim_speed) :
71                                 toSwitch.fadeOut(Drupal.settings.ConditionalFields.ui_settings.anim_speed);                                 toSwitch.fadeOut(Drupal.settings.ConditionalFields.ui_settings.anim_speed);

Legend:
Removed from v.1.1.2.14.2.8  
changed lines
  Added in v.1.1.2.14.2.9

  ViewVC Help
Powered by ViewVC 1.1.2