Code style improvements and fixes

pull/264/head
Aleksander Machniak 10 years ago
parent b79a6e1b33
commit 64ed175944

@ -277,21 +277,22 @@ function rcube_mail_ui()
orientation:'v', relative:true, start:266, min:180, size:12 }).init(); orientation:'v', relative:true, start:266, min:180, size:12 }).init();
} }
else if (rcmail.env.action == 'edit-prefs') { else if (rcmail.env.action == 'edit-prefs') {
$('<a href="#toggle"></a>') var legend = $('#preferences-details fieldset.advanced legend'),
toggle = $('<a href="#toggle"></a>')
.text(env.toggleoptions) .text(env.toggleoptions)
.attr('title', env.toggleoptions) .attr('title', env.toggleoptions)
.addClass('advanced-toggle') .addClass('advanced-toggle');
.appendTo('#preferences-details fieldset.advanced legend');
legend.click(function(e) {
$('#preferences-details fieldset.advanced legend').click(function(e){ toggle.html($(this).hasClass('collapsed') ? '&#9650;' : '&#9660;');
var collapsed = $(this).hasClass('collapsed'),
toggle = $('.advanced-toggle', this).html(collapsed ? '&#9650;' : '&#9660;'); $(this).toggleClass('collapsed')
$(this) .closest('fieldset').children('.propform').toggle()
.toggleClass('collapsed') }).append(toggle).addClass('collapsed')
.closest('fieldset').children('.propform').toggle()
}).addClass('collapsed') // this magically fixes incorrect position of toggle link created above in Firefox 3.6
// this magically fixes incorrect position of toggle link created above in Firefox 3.6 if (bw.mz)
.parents('form').css('display', 'inline'); legend.parents('form').css('display', 'inline');
} }
} }
/*** addressbook task ***/ /*** addressbook task ***/

Loading…
Cancel
Save