version 1.373, 2009/06/17 17:36:25
|
version 1.374, 2009/07/01 13:16:42
|
Line 2933 HIDDENFORM
|
Line 2933 HIDDENFORM
|
} |
} |
} |
} |
$r->print('<li '.$active.' onclick="javascript:showPage(this,\'supplCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>'); |
$r->print('<li '.$active.' onclick="javascript:showPage(this,\'supplCourseDocuments\',\'mainnav\',\'maincoursedoc\');">'.&mt('Supplemental Course Documents').'</li>'); |
$r->print('</ul><div class="LC_Box" style="margin:0 0;padding:0 0;"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">'); |
$r->print('</ul><div class="LC_Box"><div id="maincoursedoc" style="margin:0 0;padding:0 0;">'); |
# --------------------------------------------------------- Standard documents |
# --------------------------------------------------------- Standard documents |
my $savefolderpath; |
my $savefolderpath; |
my $active = 'style="display: none;"'; |
my $active = 'style="display: none;"'; |
Line 3303 my %suporderhash = (
|
Line 3303 my %suporderhash = (
|
); |
); |
|
|
my $tid='2'; |
my $tid='2'; |
my $varscd = 'supplCourseDocuments'; |
my $varscd = 'Supplemental Course Documents'; |
|
|
$r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); |
$r->print(&generate_edit_table($tid,$varscd,\%suporderhash)); |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
Line 3377 sub generate_edit_table {
|
Line 3377 sub generate_edit_table {
|
foreach my $name (sort(keys(%orderhash))){ |
foreach my $name (sort(keys(%orderhash))){ |
if($name eq 'zz'){ |
if($name eq 'zz'){ |
if($activetab ne ''){ |
if($activetab ne ''){ |
$active = ''; |
$active = 'class="right"'; |
}else{ |
}else{ |
$active = 'class="active"'; |
$active = 'class="right active"'; |
} |
} |
$form .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" '.$active.'>'.&mt(${$orderhash{$name}}[0]).'</li></span>'; |
$form .= '<li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" '.$active.'>'.&mt(${$orderhash{$name}}[0]).'</li>'; |
}else{ |
}else{ |
if($activetab eq '' || $activetab ne $name){ |
if($activetab eq '' || $activetab ne $name){ |
$active = ''; |
$active = ''; |
}elsif($activetab eq $name){ |
}elsif($activetab eq $name){ |
$active = 'class="active"'; |
$active = 'class="active"'; |
} |
} |
$form .= '<li '.$active.' onclick="javascript:showPage(this, \''.substr(${$orderhash{$name}}[0],0,3).$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt(${$orderhash{$name}}[0]).'</li>'; |
$form .= '<li '.$active.' onclick="javascript:showPage(this, \''.$name.$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt(${$orderhash{$name}}[0]).'</li>'; |
} |
} |
} |
} |
$form .= '</ul>'; |
$form .= '</ul>'; |
Line 3400 sub generate_edit_table {
|
Line 3400 sub generate_edit_table {
|
}elsif($activetab eq $field){ |
}elsif($activetab eq $field){ |
$active = 'style="display:block;"'; |
$active = 'style="display:block;"'; |
} |
} |
$form .= '<div id="'.substr(${$orderhash{$field}}[0],0,3).$tid.'"' |
$form .= '<div id="'.$field.$tid.'"' |
.' class="LC_ContentBox" '.$active.'>'.${$orderhash{$field}}[1] |
.' class="LC_ContentBox" '.$active.'>'.${$orderhash{$field}}[1] |
.'</div>'; |
.'</div>'; |
} |
} |
Line 3615 function unselectInactive(nav) {
|
Line 3615 function unselectInactive(nav) {
|
currentNav = document.getElementById(nav); |
currentNav = document.getElementById(nav); |
currentLis = currentNav.getElementsByTagName('LI'); |
currentLis = currentNav.getElementsByTagName('LI'); |
for (i = 0; i < currentLis.length; i++) { |
for (i = 0; i < currentLis.length; i++) { |
currentLis[i].className = 'i'; |
if(currentLis[i].className == 'right active' || currentLis[i].className == 'right'){ |
|
currentLis[i].className = 'right'; |
|
}else{ |
|
currentLis[i].className = 'i'; |
|
} |
} |
} |
} |
} |
|
|
function hideAll(current, nav, data) { |
function hideAll(current, nav, data) { |
unselectInactive(nav); |
unselectInactive(nav); |
current.className = 'active'; |
if(current.className == 'right'){ |
|
current.className = 'right active' |
|
}else{ |
|
current.className = 'active'; |
|
} |
currentData = document.getElementById(data); |
currentData = document.getElementById(data); |
currentDivs = currentData.getElementsByTagName('DIV'); |
currentDivs = currentData.getElementsByTagName('DIV'); |
for (i = 0; i < currentDivs.length; i++) { |
for (i = 0; i < currentDivs.length; i++) { |
Line 3631 for (i = 0; i < currentDivs.length; i++)
|
Line 3639 for (i = 0; i < currentDivs.length; i++)
|
} |
} |
} |
} |
|
|
|
function openTabs(pageId) { |
|
tabnav = document.getElementById(pageId).getElementsByTagName('UL'); |
|
if(tabnav.length > 0 ){ |
|
currentNav = document.getElementById(tabnav[0].id); |
|
currentLis = currentNav.getElementsByTagName('LI'); |
|
for(i = 0; i< currentLis.length; i++){ |
|
if(currentLis[i].className == 'active') { |
|
currentLis[i].onclick; |
|
} |
|
} |
|
} |
|
} |
|
|
function showPage(current, pageId, nav, data) { |
function showPage(current, pageId, nav, data) { |
|
/*openTabs(pageId);*/ |
hideAll(current, nav, data); |
hideAll(current, nav, data); |
unselectInactive(nav); |
unselectInactive(nav); |
current.className = 'active'; |
current.className = 'active'; |