| 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 |
});
|