--- loncom/interface/lonconfigsettings.pm 2010/01/07 18:21:25 1.9 +++ loncom/interface/lonconfigsettings.pm 2010/01/27 13:08:01 1.11 @@ -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.11 2010/01/27 13:08:01 wenzelju Exp $ # # Copyright Michigan State University Board of Trustees # @@ -212,13 +212,14 @@ sub make_changes { } if ($context eq 'course') { if ($numchanged) { - $r->print(&Apache::courseprefs::store_changes($dom,$confname,$prefs_order,\@actions, - $prefs,$values,\%changes,$crstype)); + my $message = &Apache::courseprefs::store_changes($dom,$confname,$prefs_order,\@actions, + $prefs,$values,\%changes,$crstype); + $r->print(&Apache::loncommon::confirmwrapper($message)); } else { if ($crstype eq 'Community') { - $r->print(&mt("No changes made to community configuration.")); + $r->print(&Apache::loncommon::confirmwrapper(&mt("No changes made to community configuration."))); } else { - $r->print(&mt("No changes made to course configuration.")); + $r->print(&Apache::loncommon::confirmwrapper(&mt("No changes made to course configuration."))); } } if (keys(%disallowed) > 0) { @@ -341,11 +342,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"); + } + }); + } }); ');