--- loncom/interface/lonhtmlcommon.pm 2013/07/11 18:25:51 1.350 +++ loncom/interface/lonhtmlcommon.pm 2013/12/31 01:17:34 1.355 @@ -1,7 +1,7 @@ # The LearningOnline Network with CAPA # a pile of common html routines # -# $Id: lonhtmlcommon.pm,v 1.350 2013/07/11 18:25:51 raeburn Exp $ +# $Id: lonhtmlcommon.pm,v 1.355 2013/12/31 01:17:34 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 { @@ -170,7 +176,7 @@ sub dragmath_js { function mathedit(textarea, doc) { targetEntry = textarea; targetDoc = doc; - newwin = window.open("/adm/dragmath/applet/$popup.html","","width=565,height=500,resizable"); + newwin = window.open("/adm/dragmath/$popup.html","","width=565,height=500,resizable"); } // ]]> @@ -1700,11 +1706,15 @@ returns: nothing my $links; if ((&show_return_link) && (!$CourseBreadcrumbs) && (ref($last) eq 'HASH')) { my $alttext = &mt('Go Back'); + my $hashref = { href => '/adm/flip?postdata=return:', + title => &mt('Back to most recent content resource'), + class => 'LC_menubuttons_link', + }; + if ($env{'request.noversionuri'} eq '/adm/searchcat') { + $hashref->{'target'} = '_top'; + } $links=&htmltag( 'a',''.$alttext.'', - { href => '/adm/flip?postdata=return:', - title => &mt('Back to most recent content resource'), - class => 'LC_menubuttons_link', - }); + $hashref); $links=&htmltag('li',$links); } $links.= join "", @@ -2234,7 +2244,7 @@ sub course_selection { $output .= '
'; $output .= ''; @@ -2932,7 +2942,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 +2978,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";
'.$$codetitles[0].'
'."\n". '
'.$$codetitles[$i].'
'."\n". ''."\n". '