--- loncom/interface/loncommon.pm 2009/04/25 21:35:13 1.797
+++ loncom/interface/loncommon.pm 2009/05/07 16:25:02 1.806
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common routines
#
-# $Id: loncommon.pm,v 1.797 2009/04/25 21:35:13 www Exp $
+# $Id: loncommon.pm,v 1.806 2009/05/07 16:25:02 bisitz Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -517,6 +517,10 @@ sub coursebrowser_javascript {
else {
if (formname == 'portform') {
url += '&setroles='+extra_element;
+ } else {
+ if (formname == 'rules') {
+ url += '&fixeddom='+extra_element;
+ }
}
}
}
@@ -931,9 +935,6 @@ sub help_open_topic {
my ($topic, $text, $stayOnPage, $width, $height) = @_;
$text = "" if (not defined $text);
$stayOnPage = 0 if (not defined $stayOnPage);
- if ($env{'browser.interface'} eq 'textual') {
- $stayOnPage=1;
- }
$width = 350 if (not defined $width);
$height = 400 if (not defined $height);
my $filename = $topic;
@@ -1039,8 +1040,7 @@ sub help_open_menu {
$stayOnPage = 0 if (not defined $stayOnPage);
# only use pop-up help (stayOnPage == 0)
# if environment.remote is on (using remote control UI)
- if ($env{'browser.interface'} eq 'textual' ||
- $env{'environment.remote'} eq 'off' ) {
+ if ($env{'environment.remote'} eq 'off' ) {
$stayOnPage=1;
}
my $output;
@@ -1064,8 +1064,7 @@ sub top_nav_help {
my ($text) = @_;
$text = &mt($text);
my $stay_on_page =
- ($env{'browser.interface'} eq 'textual' ||
- $env{'environment.remote'} eq 'off' );
+ ($env{'environment.remote'} eq 'off' );
my $link = ($stay_on_page) ? "javascript:helpMenu('display')"
: "javascript:helpMenu('open')";
my $banner_link = &update_help_link(undef,undef,undef,undef,$stay_on_page);
@@ -1082,8 +1081,7 @@ sub help_menu_js {
my ($text) = @_;
my $stayOnPage =
- ($env{'browser.interface'} eq 'textual' ||
- $env{'environment.remote'} eq 'off' );
+ ($env{'environment.remote'} eq 'off' );
my $width = 620;
my $height = 600;
@@ -1142,8 +1140,7 @@ sub help_open_bug {
unless ($Apache::lonnet::perlvar{'BugzillaHost'}) { return ''; }
$text = "" if (not defined $text);
$stayOnPage = 0 if (not defined $stayOnPage);
- if ($env{'browser.interface'} eq 'textual' ||
- $env{'environment.remote'} eq 'off' ) {
+ if ($env{'environment.remote'} eq 'off' ) {
$stayOnPage=1;
}
$width = 600 if (not defined $width);
@@ -1187,8 +1184,7 @@ sub help_open_faq {
unless ($Apache::lonnet::perlvar{'FAQHost'}) { return ''; }
$text = "" if (not defined $text);
$stayOnPage = 0 if (not defined $stayOnPage);
- if ($env{'browser.interface'} eq 'textual' ||
- $env{'environment.remote'} eq 'off' ) {
+ if ($env{'environment.remote'} eq 'off' ) {
$stayOnPage=1;
}
$width = 350 if (not defined $width);
@@ -1859,7 +1855,7 @@ sub home_server_form_item {
if ($numlib > 1) {
$result .= ' '."\n";
if ($default) {
- $result .= ''.&mt('default').
+ $result .= ' '.&mt('default').
' '."\n";
}
foreach my $hostid (sort(keys(%servers))) {
@@ -2818,6 +2814,26 @@ sub screenname {
}
+# ------------------------------------------------------------- Confirm Wrapper
+=pod
+
+=item confirmwrapper
+
+Wrap messages about completion of operation in box
+
+=cut
+
+sub confirmwrapper {
+ my ($message)=@_;
+ if ($message) {
+ return "\n".'
'."\n"
+ .$message."\n"
+ .'
'."\n";
+ } else {
+ return $message;
+ }
+}
+
# ------------------------------------------------------------- Message Wrapper
sub messagewrapper {
@@ -2828,6 +2844,7 @@ sub messagewrapper {
'&subject='.&escape($subject).'&text='.&escape($text).'" '.
'title="'.&mt('Send message').'">'.$link.'';
}
+
# --------------------------------------------------------------- Notes Wrapper
sub noteswrapper {
@@ -2835,6 +2852,7 @@ sub noteswrapper {
return
"$link ";
}
+
# ------------------------------------------------------------- Aboutme Wrapper
sub aboutmewrapper {
@@ -2848,12 +2866,13 @@ sub aboutmewrapper {
# ------------------------------------------------------------ Syllabus Wrapper
-
sub syllabuswrapper {
my ($linktext,$coursedir,$domain)=@_;
return qq{$linktext };
}
+# -----------------------------------------------------------------------------
+
sub track_student_link {
my ($linktext,$sname,$sdom,$target,$start) = @_;
my $link ="/adm/trackstudent?";
@@ -4232,7 +4251,7 @@ sub bodytag {
my $font = &designparm($function.'.font',$domain);
my $pgbg = $bgcolor || &designparm($function.'.pgbg',$domain);
- my %design = ( 'style' => 'margin-top: 0px',
+ my %design = ( 'style' => 'margin-top: 0',
'bgcolor' => $pgbg,
'text' => $font,
'alink' => &designparm($function.'.alink',$domain),
@@ -4268,15 +4287,7 @@ sub bodytag {
if ($bodyonly) {
return $bodytag;
- } elsif ($env{'browser.interface'} eq 'textual') {
-# Accessibility
-
- $bodytag.=&Apache::lonmenu::menubuttons($forcereg,$forcereg);
- if (!$notitle) {
- $bodytag.='LON-CAPA: '.$title.' ';
- }
- return $bodytag;
- }
+ }
my $name = &plainname($env{'user.name'},$env{'user.domain'});
if ($env{'user.name'} eq 'public' && $env{'user.domain'} eq 'public') {
@@ -4508,6 +4519,7 @@ sub standard_css {
my $img = &designparm($function.'.img', $domain);
my $tabbg = &designparm($function.'.tabbg', $domain);
my $font = &designparm($function.'.font', $domain);
+ my $fontmenu = &designparm($function.'.fontmenu', $domain);
#second colour for later usage
my $sidebg = &designparm($function.'.sidebg',$domain);
my $pgbg_or_bgcolor =
@@ -4542,8 +4554,8 @@ sub standard_css {
my $lg_border_color = '#C8C8C8';
my $border = ($env{'browser.type'} eq 'explorer' ||
- $env{'browser.type'} eq 'safari' ) ? '0px 2px 0px 2px'
- : '0px 3px 0px 4px';
+ $env{'browser.type'} eq 'safari' ) ? '0 2px 0 2px'
+ : '0 3px 0 4px';
return <* {
float: left;
- margin: 10px 20px 10px 0px;
+ margin: 10px 20px 10px 0;
overflow:hidden;
}
@@ -6097,9 +6124,9 @@ div.LC_columnSection > .ContentBoxSpecia
.clear {
clear: both;
- line-height: 0px;
- font-size: 0px;
- height: 0px;
+ line-height: 0;
+ font-size: 0;
+ height: 0;
}
.LC_loginpage_container {
@@ -6122,7 +6149,7 @@ div.LC_columnSection > .ContentBoxSpecia
}
.LC_loginpage_loginContainer h2 {
- margin-top:0;
+ margin-top: 0;
display:block;
background:$bgcol;
color:$textcol;
@@ -6221,7 +6248,7 @@ ul#LC_toolbar li a:hover {
}
ul#LC_toolbar {
- padding:0;
+ padding: 0;
margin: 2px;
list-style:none;
position:relative;
@@ -6230,7 +6257,7 @@ ul#LC_toolbar {
ul#LC_toolbar li {
border:1px solid white;
- padding:0;
+ padding: 0;
margin: 0;
float: left;
display:inline;
@@ -6240,12 +6267,12 @@ ul#LC_toolbar li {
a.LC_toolbarItem {
display:block;
- padding:0;
- margin:0;
+ padding: 0;
+ margin: 0;
height: 32px;
width: 32px;
color:white;
- border:0 none;
+ border: none;
background-repeat:no-repeat;
background-color:transparent;
}
@@ -6254,7 +6281,7 @@ ul.LC_functionslist li {
float: left;
white-space: nowrap;
height: 35px; /* at least as high as heighest list item */
- margin: 0px 15px 15px 10px;
+ margin: 0 15px 15px 10px;
}
@@ -7485,12 +7512,17 @@ sub user_picker {
if ($cancreate) {
$new_user_create = ' &"').'" onclick="javascript:setSearch(\'1\','.$caller.');" />
';
} else {
- my $helplink = ' href="javascript:helpMenu('."'display'".')"';
+ my $helplink = 'javascript:helpMenu('."'display'".')';
my %usertypetext = (
official => 'institutional',
unofficial => 'non-institutional',
);
- $new_user_create = ''.&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.").' '.&mt('Contact the helpdesk for assistance.',$helplink).' ';
+ $new_user_create = ''
+ .&mt("You are not authorized to create new $usertypetext{$usertype} users in this domain.")
+ .' '
+ .&mt('Please contact the [_1]helpdesk[_2] for assistance.'
+ ,'',' ')
+ .'
';
}
}
}