--- loncom/interface/loncommon.pm 2007/07/03 23:02:53 1.545 +++ loncom/interface/loncommon.pm 2007/07/11 20:32:15 1.548 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common routines # -# $Id: loncommon.pm,v 1.545 2007/07/03 23:02:53 albertel Exp $ +# $Id: loncommon.pm,v 1.548 2007/07/11 20:32:15 albertel Exp $ # # Copyright Michigan State University Board of Trustees # @@ -2457,7 +2457,6 @@ sub preferred_languages { split(/\s*(\,|\;|\:)\s*/,$env{'environment.languages'})); } my $browser=(split(/\;/,$ENV{'HTTP_ACCEPT_LANGUAGE'}))[0]; - &Apache::lonnet::logthis($browser); if ($browser) { @languages=(@languages,split(/\s*(\,|\;|\:)\s*/,$browser)); } @@ -4438,7 +4437,7 @@ span.LC_nobreak { table.LC_docs_documents { background: #BBBBBB; - border-size: 0px; + border-width: 0px; border-collapse: collapse; } @@ -4481,6 +4480,11 @@ table.LC_docs_documents td.LC_docs_docum color: #990000; } +.LC_docs_reinit_warn, +.LC_docs_ext_edit { + font-size: x-small; +} + .LC_docs_editor td.LC_docs_entry_title, .LC_docs_editor td.LC_docs_entry_icon { background: #FFFFBB; @@ -4935,6 +4939,51 @@ sub simple_error_page { } } +=pod + +=item * &inhibit_menu_check($arg) + +Checks for a inhibitmenu state and generates output to preserve it + +Inputs: $arg - can be any of + - undef - in which case the return value is a string + to add into arguments list of a uri + - 'input' - in which case the return value is a HTML +
field of type hidden to + preserve the value + - a url - in which case the return value is the url with + the neccesary cgi args added to preserve the + inhibitmenu state + - a ref to a url - no return value, but the string is + updated to include the neccessary cgi + args to preserve the inhibitmenu state + +=cut + +sub inhibit_menu_check { + my ($arg) = @_; + &get_unprocessed_cgi($ENV{'QUERY_STRING'}, ['inhibitmenu']); + if ($arg eq 'input') { + if ($env{'form.inhibitmenu'}) { + return ''; + } else { + return + } + } + if ($env{'form.inhibitmenu'}) { + if (ref($arg)) { + $$arg .= '?inhibitmenu='.$env{'form.inhibitmenu'}; + } elsif ($arg eq '') { + $arg .= 'inhibitmenu='.$env{'form.inhibitmenu'}; + } else { + $arg .= '?inhibitmenu='.$env{'form.inhibitmenu'}; + } + } + if (!ref($arg)) { + return $arg; + } +} + ############################################### =pod