version 1.333, 2009/02/02 11:23:56
|
version 1.334, 2009/02/03 14:16:39
|
Line 3106 my %orderhash = (
|
Line 3106 my %orderhash = (
|
'bb' => 'Published Documents', |
'bb' => 'Published Documents', |
'cc' => 'Special Documents', |
'cc' => 'Special Documents', |
'dd' => 'More Options', |
'dd' => 'More Options', |
'zz' => 'Hide all Option', |
'zz' => 'Hide all Options', |
); |
); |
my %namehash = ( |
my %namehash = ( |
'New Document' => $fileuploadform, |
'New Document' => $fileuploadform, |
'Published Documents' => $simpleeditdefaultform, |
'Published Documents' => $simpleeditdefaultform, |
'Special Documents' => $specialdocumentsform, |
'Special Documents' => $specialdocumentsform, |
'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform, |
'More Options' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform, |
'drei' => 'dr', |
|
); |
); |
my $tid = '1'; |
my $tid='1'; |
my $varcd = 'Course Documents'; |
my $content='content'; |
$r->print(&generate_edit_table($varcd,\%namehash,\%orderhash)); |
my $navigation='navigation'; |
|
my $varcd = 'Main Course Documents'; |
|
$r->print(&generate_edit_table($tid,$content,$navigation,$varcd,\%namehash,\%orderhash)); |
} |
} |
if ($env{'form.pagepath'}) { |
if ($env{'form.pagepath'}) { |
} |
} |
Line 3227 my %supnamehash = (
|
Line 3228 my %supnamehash = (
|
'New Document' => $supupdocform, |
'New Document' => $supupdocform, |
'Special Documents' => $supnewfolderform.'<br />'.$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform, |
'Special Documents' => $supnewfolderform.'<br />'.$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform, |
); |
); |
my $tid='2'; |
|
my $varscd = 'Supplemented Course Documents'; |
|
|
|
$r->print(<<FORM); |
my $tid='2'; |
<ul class="LC_TabContent"> |
my $content='content'; |
<li>New Document</li> |
my $navigation='navigation'; |
<li>Special Documents</li> |
my $varscd = 'Supplemental Course Documents'; |
</ul> |
|
FORM |
|
|
|
#$r->print(&generate_edit_table($varscd,\%supnamehash,\%suporderhash)); |
$r->print(&generate_edit_table($tid,$content,$navigation,$varscd,\%supnamehash,\%suporderhash)); |
|
|
} |
} |
} |
} |
Line 3313 ENDOPTIONFORM
|
Line 3310 ENDOPTIONFORM
|
|
|
|
|
sub generate_edit_table { |
sub generate_edit_table { |
my ($varcd,$namehash_ref,$orderhash_ref) = @_; |
my ($tid,$content,$navigation,$varcd,$namehash_ref,$orderhash_ref) = @_; |
my %namehash = %{$namehash_ref}; #name verlinkt mit id |
my %namehash = %{$namehash_ref}; #name verlinkt mit id |
my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name |
my %orderhash = %{$orderhash_ref}; #name mit kürzel verlinkt mit name |
my $form; |
my $form; |
|
|
{ |
|
|
|
$form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt('Upload '.$varcd).'</h4>'; |
$form = '<div class="LC_ContentBoxSpecial"><h4 class="LC_hcell">'.&mt($varcd).'</h4>'; |
$form .= '<ul id="navigation" class="LC_TabContent">'; |
$form .= '<ul id="'.$navigation.$tid.'" class="LC_TabContent">'; |
foreach my $name (sort(keys(%orderhash))){ |
foreach my $name (sort(keys(%orderhash))){ |
if($name eq 'zz'){ |
if($name eq 'zz'){ |
$form .= '<li onclick="javascript:hideAll(this);" class="active">'.&mt($orderhash{$name}).'</li>'; |
$form .= '<li onclick="javascript:hideAll(this, \''.$navigation.$tid.'\' ,\''.$content.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li>'; |
}else{ |
}else{ |
$form .= '<li onclick="javascript:showPage(this, \''.$orderhash{$name}.'\');">'.&mt($orderhash{$name}).'</li>'; |
$form .= '<li onclick="javascript:showPage(this, \''.$tid.$orderhash{$name}.'\', \''.$navigation.$tid.'\',\''.$content.$tid.'\');">'.&mt($orderhash{$name}).'</li>'; |
} |
} |
} |
} |
$form .= '<div id="content" style="padding: 0 0; margin: 0 0;">'; |
$form .= '<div id="'.$content.$tid.'" style="padding: 0 0; margin: 0 0;">'; |
foreach my $field (keys(%namehash)){ |
foreach my $field (keys(%namehash)){ |
$form .= '<div id="'.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
$form .= '<div id="'.$tid.$field.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
} |
} |
$form .= '</div></div>'; |
$form .= '</div></div>'; |
} |
|
return $form; |
return $form; |
} |
} |
|
|
Line 3539 function markcopy(folderpath,index,oldti
|
Line 3536 function markcopy(folderpath,index,oldti
|
this.document.forms.renameform.submit(); |
this.document.forms.renameform.submit(); |
} |
} |
|
|
function unselectInactive() { |
function unselectInactive(nav) { |
currentTable = document.getElementById('tableId'); |
currentNav = document.getElementById(nav); |
currentNav = document.getElementById('navigation'); |
|
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'; |
currentLis[i].className = 'i'; |
} |
} |
} |
} |
|
|
function hideAll(current) { |
function hideAll(current, nav, data) { |
unselectInactive(); |
unselectInactive(nav); |
current.className = 'active'; |
current.className = 'active'; |
currentData = document.getElementById('content'); |
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++) { |
currentDivs[i].style.display = 'none'; |
currentDivs[i].style.display = 'none'; |
} |
} |
} |
} |
|
|
function showPage(current, pageId) { |
function showPage(current, pageId, nav, data) { |
hideAll(current); |
hideAll(current, nav, data); |
unselectInactive(); |
unselectInactive(nav); |
current.className = 'active'; |
current.className = 'active'; |
currentData = document.getElementById(pageId); |
currentData = document.getElementById(pageId); |
currentData.style.display = 'block'; |
currentData.style.display = 'block'; |