Commit 1609c321 authored by Robert Lyon's avatar Robert Lyon Committed by Gerrit Code Review

Merge "Bug 1504351: fixing the toggle of the basic vs advanced fieldsets"

parents e22a8cb7 0fd9852f
......@@ -152,8 +152,21 @@
function init() {
$('#viewlayout_basic_container legend a, #viewlayout_adv_container legend a').click(function(event) {
$('.basiclayoutfieldset').toggleClass('collapsed');
$('.advancedlayoutfieldset').toggleClass('collapsed');
var containerclicked = $( $(this).context ).attr('aria-controls');
var basiccollapse = advancedcollapse = customcollapse = 'hide';
if (containerclicked == '#viewlayout_layoutselect_container') {
basiccollapse = 'toggle';
}
else if (containerclicked == '#viewlayout_advancedlayoutselect_container') {
advancedcollapse = 'toggle';
}
else if (containerclicked == '#viewlayout_createcustomlayout_container') {
customcollapse = 'toggle';
}
$('#viewlayout_layoutselect_container').collapse(basiccollapse);
$('#viewlayout_advancedlayoutselect_container').collapse(advancedcollapse);
$('#viewlayout_createcustomlayout_container').collapse(customcollapse);
var layoutselected = $('#viewlayout_layoutselect').val();
var layoutfallback = $('#viewlayout_layoutfallback').val();
if ($('.layoutselect :radio[value=' + layoutselected +']').length ) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment