--- loncom/interface/londocs.pm 2013/11/13 01:40:07 1.568
+++ loncom/interface/londocs.pm 2013/11/17 14:40:31 1.570
@@ -1,7 +1,7 @@
# The LearningOnline Network
# Documents
#
-# $Id: londocs.pm,v 1.568 2013/11/13 01:40:07 raeburn Exp $
+# $Id: londocs.pm,v 1.570 2013/11/17 14:40:31 raeburn Exp $
#
# Copyright Michigan State University Board of Trustees
#
@@ -492,6 +492,9 @@ $contents{webreferences}.'
}
}
}
+ if ($home>1) {
+ $preamble .= '';
+ }
foreach my $user (@orderspaces) {
if ($home==1) {
$preamble .= '';
@@ -4635,9 +4638,11 @@ sub handler {
$script .= &dump_switchserver_js(@hosts);
}
} else {
+ my $tid = 1;
my @tabids;
if ($supplementalflag) {
@tabids = ('002','ee2','ff2');
+ $tid = 2;
} else {
@tabids = ('aa1','bb1','cc1','ff1');
unless ($env{'form.folderpath'} =~ /\:1$/) {
@@ -4649,7 +4654,7 @@ sub handler {
$script .= &editing_js($udom,$uname,$supplementalflag).
&history_tab_js().
&inject_data_js().
- &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr).
+ &Apache::lonhtmlcommon::resize_scrollbox_js('docs',$tabidstr,$tid).
&Apache::lonextresedit::extedit_javascript();
$addentries = {
onload => "javascript:resize_scrollbox('contentscroll','1','1');",
@@ -4944,7 +4949,7 @@ HIDDENFORM
my $newnavform=(<
-
+
$pathitem
@@ -4954,7 +4959,7 @@ HIDDENFORM
NNFORM
my $newsmppageform=(<
-
+
$pathitem
@@ -4995,7 +5000,7 @@ NEXUFORM
my $newbulform=(<
-
+
$pathitem
@@ -5005,7 +5010,7 @@ NBFORM
my $newaboutmeform=(<
-
+
$pathitem
@@ -5016,7 +5021,7 @@ NAMFORM
my $newaboutsomeoneform=(<
-
+
$pathitem
@@ -5025,7 +5030,7 @@ NASOFORM
my $newrosterform=(<
-
+
$pathitem
@@ -5046,7 +5051,7 @@ NROSTFORM
}
my $newwebpageform =(<
-
+
$pathitem
@@ -5070,7 +5075,7 @@ my $newfolderb;
@@ -5081,14 +5086,14 @@ NPFORM
NFFORM
my $newsylform=(<
-
+
$pathitem
@@ -5100,7 +5105,7 @@ NSYLFORM
my $newgroupfileform=(<
-
+
$pathitem
@@ -5217,7 +5222,7 @@ SUPDOCFORM
my $supnewfolderform=(<
-
+
$pathitem
@@ -5582,7 +5587,7 @@ sub generate_edit_table {
my $form;
my $activetab;
my $active;
- if (($env{'form.active'} ne '') && ($env{'form.active'} ne 'aa')) {
+ if (($env{'form.active'} ne '') && ($env{'form.active'} ne '00')) {
$activetab = $env{'form.active'};
}
my $backicon = $iconpath.'clickhere.gif';
@@ -5617,7 +5622,7 @@ sub generate_edit_table {
$form .= ''.&mt(${$orderhash{$name}}[0]).''."\n";
} else {
- $form .= ''.${$orderhash{$name}}[1].''."\n";
+ $form .= ''.${$orderhash{$name}}[1].''."\n";
}
}
@@ -6180,10 +6185,12 @@ for (i = 0; i < currentLis.length; i++)
function hideAll(current, nav, data) {
unselectInactive(nav);
-if(current.className == 'right'){
- current.className = 'right active'
- }else{
- current.className = 'active';
+if (current) {
+ if (current.className == 'right'){
+ current.className = 'right active'
+ } else {
+ current.className = 'active';
+ }
}
currentData = document.getElementById(data);
currentDivs = currentData.getElementsByTagName('DIV');
@@ -6214,10 +6221,24 @@ function openTabs(pageId) {
}
function showPage(current, pageId, nav, data) {
+ currstate = current.className;
hideAll(current, nav, data);
openTabs(pageId);
unselectInactive(nav);
- current.className = 'active';
+ if ((currstate == 'active') || (currstate == 'right active')) {
+ if (currstate == 'active') {
+ current.className = '';
+ } else {
+ current.className = 'right';
+ }
+ activeTab = '';
+ toggleUpload();
+ toggleMap();
+ resize_scrollbox('contentscroll','1','0');
+ return;
+ } else {
+ current.className = 'active';
+ }
currentData = document.getElementById(pageId);
currentData.style.display = 'block';
activeTab = pageId;