--- loncom/interface/loncommon.pm 2010/05/18 03:48:44 1.948.2.6 +++ loncom/interface/loncommon.pm 2010/08/14 04:32:03 1.948.2.7 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.948.2.6 2010/05/18 03:48:44 raeburn Exp $ +# $Id: loncommon.pm,v 1.948.2.7 2010/08/14 04:32:03 raeburn Exp $ # # Copyright Michigan State University Board of Trustees # @@ -900,7 +900,7 @@ sub select_language { $langchoices{$code} = &plainlanguagedescription($id); } } - return &select_form($selected,$name,%langchoices); + return &select_form($selected,$name,\%langchoices); } =pod @@ -1072,7 +1072,7 @@ END =pod -=item * &help_open_topic($topic,$text,$stayOnPage,$width,$height) +=item * &help_open_topic($topic,$text,$stayOnPage,$width,$height,$imgid) Returns a string corresponding to an HTML link to the given help $topic, where $topic corresponds to the name of a .tex file in @@ -1095,7 +1095,7 @@ be useful for certain help topics with b =cut sub help_open_topic { - my ($topic, $text, $stayOnPage, $width, $height) = @_; + my ($topic, $text, $stayOnPage, $width, $height, $imgid) = @_; $text = "" if (not defined $text); $stayOnPage = 0 if (not defined $stayOnPage); $width = 350 if (not defined $width); @@ -1124,12 +1124,15 @@ sub help_open_topic { # (Always) Add the graphic my $title = &mt('Online Help'); my $helpicon=&lonhttpdurl("/adm/help/help.png"); + if ($imgid ne '') { + $imgid = ' id="'.$imgid.'"'; + } $template.=' ' .''.&mt('Help: [_1]',$topic).''; - if ($text ne "") { + if ($text ne "") { $template.=''; } return $template; @@ -1800,7 +1803,7 @@ sub domain_select { return &multiple_select_form($name,$value,4,\%domains); } else { $domains{'select_form_order'} = [sort {lc($a) cmp lc($b) } (keys(%domains))]; - return &select_form($name,$value,%domains); + return &select_form($name,$value,\%domains); } } @@ -1862,29 +1865,36 @@ sub multiple_select_form { =pod -=item * &select_form($defdom,$name,%hash) +=item * &select_form($defdom,$name,$hashref,$onchange) Returns a string containing a \n"; + my ($def,$name,$hashref,$onchange) = @_; + return unless (ref($hashref) eq 'HASH'); + if ($onchange) { + $onchange = ' onchange="'.$onchange.'"'; + } + my $selectform = ""; return $selectform; @@ -1902,9 +1912,9 @@ sub display_filter { &mt('Filter [_1]', &select_form($env{'form.displayfilter'}, 'displayfilter', - ('currentfolder' => 'Current folder/page', + {'currentfolder' => 'Current folder/page', 'containing' => 'Containing phrase', - 'none' => 'None'))). + 'none' => 'None'})). ''; } @@ -3247,7 +3257,7 @@ sub filecategoryselect { my ($name,$value)=@_; return &select_form($value,$name, '' => &mt('Any category'), - map { $_,$_ } sort(keys(%category_extensions))); + {'' => &mt('Any category'), map { $_,$_ } sort(keys(%category_extensions))}); } =pod @@ -6146,6 +6156,30 @@ ol.LC_primary_menu a { text-decoration: none; } +ol.LC_docs_parameters { + margin-left: 0; + padding: 0; + list-style: none; +} + +ol.LC_docs_parameters li { + margin: 0; + padding-right: 20px; + display: inline; +} + +ol.LC_docs_parameters li:before { + content: "\\002022 \\0020"; +} + +li.LC_docs_parameters_title { + font-weight: bold; +} + +ol.LC_docs_parameters li.LC_docs_parameters_title:before { + content: ""; +} + ul#LC_secondary_menu { clear: both; color: $fontmenu; @@ -6319,6 +6353,14 @@ ul.LC_CourseBreadcrumbs li a { font-size:90%; } +ol#LC_MenuBreadcrumbs h1 { + display: inline; + font-size: 90%; + line-height: 2.5em; + margin: 0; + padding: 0; +} + ol#LC_PathBreadcrumbs li a { text-decoration:none; font-size:100%; @@ -6661,10 +6703,6 @@ Inputs: none sub xml_begin { my $output=''; - if ($env{'internal.start_page'}==1) { - &Apache::lonhtmlcommon::init_htmlareafields(); - } - if ($env{'browser.mathml'}) { $output='' #.''."\n" @@ -8196,6 +8234,10 @@ sub get_institutional_codes { return; } +sub get_standard_codeitems { + return ('Year','Semester','Department','Number','Section'); +} + =pod =head1 Slot Helpers