--- loncom/interface/lonconfigsettings.pm 2010/01/07 18:21:25 1.9 +++ loncom/interface/lonconfigsettings.pm 2010/01/08 00:52:06 1.10 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # Handler to set domain-wide configuration settings # -# $Id: lonconfigsettings.pm,v 1.9 2010/01/07 18:21:25 faziophi Exp $ +# $Id: lonconfigsettings.pm,v 1.10 2010/01/08 00:52:06 faziophi Exp $ # # Copyright Michigan State University Board of Trustees # @@ -341,11 +341,23 @@ sub display_settings { $("#prefs").accordion({ autoHeight: false }); - $("#prefs td.LC_left_item").css("text-align", "right"); - $("#prefs td.LC_left_item").css("width", "40%"); - $("#prefs td.LC_left_item").css("padding-right", "10px"); - $("#prefs td.LC_right_item").css("text-align", "left"); - $("#prefs td.LC_right_item").css("width", "60%"); + if ($(".LC_nested tr.advanced").get(0)) { + $(".LC_nested tr.advanced").each(function() { + $(this).hide(); + p = $(this).parents("div.ui-accordion-content") + if (p.find(".LC_advanced_toggle").length) { + return; + } + p.prepend("Show advanced options"); + }); + $(".LC_advanced_toggle input").change(function() { + if($(this).is(":checked")) { + $(this).parents("div.ui-accordion-content").find("tr.advanced").fadeIn("normal"); + } else { + $(this).parents("div.ui-accordion-content").find("tr.advanced").fadeOut("normal"); + } + }); + } }); ');