--- loncom/interface/loncommon.pm 2011/12/19 18:00:23 1.1038 +++ loncom/interface/loncommon.pm 2011/12/19 18:18:28 1.1039 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.1038 2011/12/19 18:00:23 www Exp $ +# $Id: loncommon.pm,v 1.1039 2011/12/19 18:18:28 www Exp $ # # Copyright Michigan State University Board of Trustees # @@ -7078,6 +7078,25 @@ function LCtoggleDisplay(id,hidetext,sho ENDTOGGLE } +sub start_togglebox { + my ($id,$heading,$headerbg,$hidetext,$showtext)=@_; + unless ($heading) { $heading=''; } else { $heading.=' '; } + unless ($showtext) { $showtext=&mt('show'); } + unless ($hidetext) { $hidetext=&mt('hide'); } + unless ($headerbg) { $headerbg='#FFFFFF'; } + return &start_data_table(). + &start_data_table_header_row(). + ''.$heading. + '['.$showtext.']'. + &end_data_table_header_row(). + ''; +} + +sub end_togglebox { + return ''.&end_data_table(); +} + sub modal_adhoc_window { my ($funcname,$width,$height,$content,$linktext)=@_; my $innerwidth=$width-20;