--- loncom/interface/lonhtmlcommon.pm 2013/07/15 14:32:45 1.351
+++ loncom/interface/lonhtmlcommon.pm 2013/11/17 14:40:31 1.353
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.351 2013/07/15 14:32:45 bisitz Exp $
+# $Id: lonhtmlcommon.pm,v 1.353 2013/11/17 14:40:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -64,9 +64,15 @@ use HTML::Entities();
use LONCAPA qw(:DEFAULT :match);
sub java_not_enabled {
- return "\n".''.
- &mt('The required Java applet could not be started. Please make sure to have Java installed and active in your browser.').
- "\n";
+ if (($env{'browser.mobile'}) && ($env{'browser.mobile'} =~ /^ipad|ipod|iphone$/i)) {
+ return "\n".''.
+ &mt('The required Java applet could not be started, because Java is not supported by your mobile device.').
+ "\n";
+ } else {
+ return "\n".''.
+ &mt('The required Java applet could not be started. Please make sure to have Java installed and active in your browser.').
+ "\n";
+ }
}
sub coursepreflink {
@@ -2932,7 +2938,7 @@ ENDSCRIPT
##############################################
sub resize_scrollbox_js {
- my ($context,$tabidstr) = @_;
+ my ($context,$tabidstr,$tid) = @_;
my (%names,$paddingwfrac,$offsetwfrac,$offsetv,$minw,$minv);
if ($context eq 'docs') {
%names = (
@@ -2968,9 +2974,11 @@ window.onresize=callResize;
';
if ($context eq 'docs') {
- $output .= '
-var activeTab;
-';
+ if ($env{'form.active'}) {
+ $output .= "\nvar activeTab = '$env{'form.active'}$tid';\n";
+ } else {
+ $output .= "\nvar activeTab = '';\n";
+ }
}
$output .= <<"FIRST";