/[drupal]/contributions/modules/swfupload/settings/settings.js
ViewVC logotype

Contents of /contributions/modules/swfupload/settings/settings.js

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


Revision 1.1 - (show annotations) (download) (as text)
Sat Nov 22 09:51:48 2008 UTC (12 months ago) by skilip
Branch: MAIN
CVS Tags: HEAD
Branch point for: DRUPAL-6--1
File MIME type: text/javascript
Committed the Drupal 6 version
1 $(function() {
2 window.swfupload_label_heights = {};
3 window.swfupload_wrapper_getting_smaller = {};
4 $('#swfupload-settings-form label').each(function() {
5 window.swfupload_label_heights[$(this).text()] = $(this).parent().find('.swf-nodetype-wrapper').height();
6 $(this).parent().find('.swf-nodetype-wrapper').height(0);
7 window.swfupload_wrapper_getting_smaller[$(this).text()] = false;
8 });
9
10 $('#swfupload-settings-form label, .swf-harmonica-arrow').css({'cursor':'pointer'}).click(function() {
11 var content = $(this).parent().find('.swf-nodetype-wrapper').stop();
12 var label = content.parent().find('label').text();
13 var height = window.swfupload_label_heights[label];
14 var arrow = $(this).parent().find('.swf-harmonica-arrow');
15 var current_height = $(this).parent().find('.swf-nodetype-wrapper').height();
16
17 if (content.css("display") == 'none' || window.swfupload_wrapper_getting_smaller[label]) {
18 window.swfupload_wrapper_getting_smaller[label] = false;
19 arrow.addClass('south');
20 content.css({'height':(current_height == height ? 0 : current_height) + 'px', 'display':'block'}).animate({'height':height + 'px'}, 1000);
21 } else {
22 arrow.removeClass('south');
23 window.swfupload_wrapper_getting_smaller[label] = true;
24 content.animate({'height':'0px'}, 1000, function() {
25 $(this).css({'display':'none', 'height':height + 'px'});
26 });
27 };
28 });
29 });

  ViewVC Help
Powered by ViewVC 1.1.2