'."\n".
+
'.&mt('Currently using [_1] of the [_2] available.',$usage.' MB
('.$percent.'%)',$quota.' MB')."\n".
+'
'."\n".
'
';
@@ -3349,18 +3379,12 @@ PARAMSONE
if (itemid != null) {
itemh = itemid.offsetHeight;
}
- var primaryheight = 0;
- if (document.getElementById('LC_nav_bar') != null) {
- primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
- }
- var secondaryheight = 0;
+ var primaryheight = document.getElementById('LC_nav_bar').offsetHeight;
+ var secondaryheight;
if (document.getElementById('LC_secondary_menu') != null) {
secondaryheight = document.getElementById('LC_secondary_menu').offsetHeight;
}
- var crumbsheight = 0;
- if (document.getElementById('LC_breadcrumbs') != null) {
- crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
- }
+ var crumbsheight = document.getElementById('LC_breadcrumbs').offsetHeight;
var dccidheight = 0;
if (document.getElementById('dccid') != null) {
dccidheight = document.getElementById('dccid').offsetHeight;
@@ -3440,17 +3464,7 @@ function go(url) {
if (url!='' && url!= null) {
currentURL = null;
currentSymb= null;
- var lcHostname = setLCHost();
- if (lcHostname!='' && lcHostname!= null) {
- var RegExp = /^https?\:/;
- if (RegExp.test(url)) {
- window.location.href=url;
- } else {
- window.location.href=lcHostname+url;
- }
- } else {
- window.location.href=url;
- }
+ window.location.href=url;
}
}
@@ -3469,8 +3483,8 @@ ENDUTILITY
sub jump_to_editres {
my ($cfile,$home,$switchserver,$forceedit,$forcereg,$symb,$folderpath,
- $title,$hostname,$idx,$suppurl,$todocs,$suppanchor) = @_;
- my ($jscall,$anchor,$usehttp,$usehttps,$is_ext);
+ $title,$idx,$suppurl,$todocs) = @_;
+ my $jscall;
if ($switchserver) {
if ($home) {
$cfile = '/adm/switchserver?otherserver='.$home.'&role='.
@@ -3490,44 +3504,7 @@ sub jump_to_editres {
}
} else {
unless ($cfile =~ m{^/priv/}) {
- if ($cfile =~ m{^(/adm/wrapper/ext/([^#]+))(?:|#([^#]+))$}) {
- $cfile = $1;
- my $extlink = $2;
- $anchor = $3;
- $is_ext = 1;
- if (($extlink !~ /^https:/) && ($ENV{'SERVER_PORT'} == 443)) {
- unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
- $usehttp = 1;
- }
- } elsif ($env{'request.use_absolute'}) {
- if ($env{'request.use_absolute'} =~ m{^https://}) {
- $usehttps = 1;
- }
- }
- } elsif ($cfile =~ m{^/?public/($match_domain)/($match_courseid)/syllabus}) {
- if ($ENV{'SERVER_PORT'} == 443) {
- my ($cdom,$cnum) = ($1,$2);
- if (($env{'request.course.id'}) &&
- ($env{'course.'.$env{'request.course.id'}.'.num'} eq $cnum) &&
- ($env{'course.'.$env{'request.course.id'}.'.domain'} eq $cdom)) {
- if ($env{'course.'.$env{'request.course.id'}.'.externalsyllabus'} =~ m{^http://}) {
- unless ((&Apache::lonnet::uses_sts()) || (&Apache::lonnet::waf_allssl($hostname))) {
- $usehttp = 1;
- }
- }
- }
- } elsif ($env{'request.use_absolute'}) {
- if ($env{'request.use_absolute'} =~ m{^https://}) {
- $usehttps = 1;
- }
- }
- }
if ($symb) {
- if ($anchor ne '') {
- if ($symb =~ m{^([^#]+)\Q#$anchor\E$}) {
- $symb = $1.&escape(&escape('#')).$anchor;
- }
- }
$cfile .= (($cfile=~/\?/)?'&':'?')."symb=$symb";
} elsif ($folderpath) {
$cfile .= (($cfile=~/\?/)?'&':'?').
@@ -3546,31 +3523,14 @@ sub jump_to_editres {
}
if ($forceedit) {
$cfile .= (($cfile=~/\?/)?'&':'?').'forceedit=1';
- if ($usehttps) {
- $cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;
- }
- } elsif ($usehttp) {
- if ($hostname ne '') {
- $cfile = 'http://'.$hostname.(($cfile =~ /^\//)? '':'/').$cfile;
- }
- $cfile .= (($cfile=~/\?/)?'&':'?').'usehttp=1';
- } elsif ($usehttps) {
- $cfile = $env{'request.use_absolute'}.(($cfile =~ /^\//)? '':'/').$cfile;
}
if ($forcereg) {
$cfile .= (($cfile=~/\?/)?'&':'?').'register=1';
}
if ($todocs) {
- $cfile .= (($cfile=~/\?/)?'&':'?').'todocs=1';
- }
- if ($suppanchor ne '') {
- $cfile .= (($cfile=~/\?/)?'&':'?').'anchor='.
- &HTML::Entities::encode($suppanchor,'"<>&');
+ $cfile .= (($cfile=~/\?/)?'&':'?').'todocs=1';
}
}
- if ($anchor ne '') {
- $cfile .= '#'.$anchor;
- }
$jscall = "go('".&Apache::loncommon::escape_single($cfile)."')";
}
return $jscall;
@@ -3582,18 +3542,15 @@ sub jump_to_editres {
# javascript_valid_email
#
# Generates javascript to validate an e-mail address.
-# Returns a javascript function which accepts a form field as argument, and
+# Returns a javascript function which accetps a form field as argumnent, and
# returns false if field.value does not satisfy two regular expression matches
# for a valid e-mail address. Backwards compatible with old browsers without
# support for javascript RegExp (just checks for @ in field.value in this case).
sub javascript_valid_email {
my $scripttag .= <<'END';
-function validmail(field,suffix) {
+function validmail(field) {
var str = field.value;
- if (suffix != '' && suffix != undefined) {
- str += suffix;
- }
if (window.RegExp) {
var reg1str = "(@.*@)|(\\.\\.)|(@\\.)|(\\.@)|(^\\.)";
var reg2str = "^.+\\@(\\[?)[a-zA-Z0-9\\-\\.]+\\.([a-zA-Z]{2,3}|[0-9]{1,3})(\\]?)$"; //"
@@ -3703,7 +3660,9 @@ sub scripttag {
Constructs a XHTML list from \@array.
-input:
+=over
+
+=item input:
=over
@@ -3717,7 +3676,9 @@ Attributes for
and - passed in a
See htmltag() for more details.
=back
-
+
+=back
+
returns: XHTML list as String.
=cut
@@ -3836,13 +3797,19 @@ should be included in this list.
If the optional headline text is not provided, a default text will be used.
+=over
+
+=item Related routines:
-Related routines:
=over 4
-add_item_funclist
-end_funclist
+
+=item add_item_funclist
+
+=item end_funclist
+
=back
+=back
Inputs: (optional) headline text
@@ -3869,10 +3836,18 @@ sub start_funclist {
Adds an item to the list of available functions
-Related routines:
+=over
+
+=item Related routines:
+
=over 4
-start_funclist
-end_funclist
+
+=item start_funclist
+
+=item end_funclist
+
+=back
+
=back
Inputs: content item with text and link to function
@@ -3895,10 +3870,13 @@ sub add_item_funclist {
End list of available functions
-Related routines:
-=over 4
-start_funclist
-add_item_funclist
+=over
+
+=item Related routines:
+
+ start_funclist
+ add_item_funclist
+
=back
Inputs: ./.
@@ -3931,7 +3909,7 @@ A string that's used as visually highlig
it's value evaluates to false.
=back
-
+
returns: XHTML list as string.
=back
@@ -3944,7 +3922,7 @@ sub funclist_from_array {
$args->{legend} ||= mt('Functions');
return list_from_array( [$args->{legend}, @$items],
{ listattr => {class => 'LC_funclist'} });
-}
+}
=pod
@@ -3966,8 +3944,8 @@ e.g. a file operation in Authoring Space
A reference to the array containing text. Details: sub funclist_from_array
=back
-
-Returns: XHTML div as string.
+
+Returns: XHTML div as string.
=back