--- loncom/interface/lonhtmlcommon.pm 2013/07/22 11:46:23 1.352
+++ loncom/interface/lonhtmlcommon.pm 2013/12/28 23:16:11 1.354
@@ -1,7 +1,7 @@
# The LearningOnline Network with CAPA
# a pile of common html routines
#
-# $Id: lonhtmlcommon.pm,v 1.352 2013/07/22 11:46:23 raeburn Exp $
+# $Id: lonhtmlcommon.pm,v 1.354 2013/12/28 23:16:11 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -176,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");
}
// ]]>
@@ -2938,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 = (
@@ -2974,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";