version 1.362, 2009/04/07 20:12:55
|
version 1.363, 2009/04/07 20:48:40
|
Line 3125 if($env{'form.pagepath'}) {
|
Line 3125 if($env{'form.pagepath'}) {
|
} |
} |
|
|
my %orderhash = ( |
my %orderhash = ( |
'aa' => 'New Document', |
'aa' => ['New Document',$fileuploadform.'<br />'.$newfolderform], |
'bb' => 'Published Documents', |
'bb' => ['Published Documents',$simpleeditdefaultform], |
'cc' => 'Special Documents', |
'cc' => ['Special Documents',$specialdocumentsform], |
'dd' => 'Tools', |
'dd' => ['Tools',$extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env)], |
'zz' => 'Hide all Options', |
'zz' => ['Hide all Options'], |
); |
|
my %namehash = ( |
|
'New Document' => $fileuploadform.'<br />'.$newfolderform, |
|
'Published Documents' => $simpleeditdefaultform, |
|
'Special Documents' => $specialdocumentsform, |
|
'Tools' => $extresourcesform.'<br />'.$imspform.'<br />'.$recoverform.'<br />'.&generate_admin_options($containertag,$uploadtag,\%help,\%env), |
|
); |
); |
my $tid='1'; |
my $tid='1'; |
my $varcd = 'Main Course Documents'; |
my $varcd = 'Main Course Documents'; |
$r->print(&generate_edit_table($tid,$varcd,\%namehash,\%orderhash)); |
$r->print(&generate_edit_table($tid,$varcd,\%orderhash)); |
$hadchanges=0; |
$hadchanges=0; |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
my $error = &editor($r,$coursenum,$coursedom,$folder,$allowed,'',$type); |
if ($error) { |
if ($error) { |
Line 3252 SNAMFORM
|
Line 3246 SNAMFORM
|
|
|
|
|
my %suporderhash = ( |
my %suporderhash = ( |
'ee' => 'New Document', |
'ee' => ['New Document',$supupdocform.'<br />'.$supnewfolderform], |
'ff' => 'Special Documents', |
'ff' => ['Special Documents',$supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform], |
'zz' => 'Hide all Options', |
'zz' => ['Hide all Options'], |
); |
|
|
|
my %supnamehash = ( |
|
'New Document' => $supupdocform.'<br />'.$supnewfolderform, |
|
'Special Documents' => $supnewextform.'<br />'.$supnewsylform.'<br />'.$supnewaboutmeform, |
|
); |
); |
|
|
my $tid='2'; |
my $tid='2'; |
my $varscd = 'Supplemental Course Documents'; |
my $varscd = 'Supplemental Course Documents'; |
|
|
$r->print(&generate_edit_table($tid,$varscd,\%supnamehash,\%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); |
if ($error) { |
if ($error) { |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
$r->print('<p><span class="LC_error">'.$error.'</span></p>'); |
Line 3324 ENDOPTIONFORM
|
Line 3313 ENDOPTIONFORM
|
|
|
|
|
sub generate_edit_table { |
sub generate_edit_table { |
my ($tid,$varcd,$namehash_ref,$orderhash_ref) = @_; |
my ($tid,$varcd,$orderhash_ref) = @_; |
my %namehash = %{$namehash_ref}; |
|
my %orderhash = %{$orderhash_ref}; |
my %orderhash = %{$orderhash_ref}; |
my $form; |
my $form; |
|
|
Line 3333 sub generate_edit_table {
|
Line 3321 sub generate_edit_table {
|
$form .= '<ul id="navigation'.$tid.'" 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 .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" class="active">'.&mt($orderhash{$name}).'</li></span>'; |
$form .= '<span class="LC_Right"><li onclick="javascript:hideAll(this, \'navigation'.$tid.'\' ,\'content'.$tid.'\');" class="active">'.&mt(${$orderhash{$name}}[0]).'</li></span>'; |
}else{ |
}else{ |
$form .= '<li onclick="javascript:showPage(this, \''.substr($orderhash{$name},0,3).$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt($orderhash{$name}).'</li>'; |
$form .= '<li onclick="javascript:showPage(this, \''.substr(${$orderhash{$name}}[0],0,3).$tid.'\', \'navigation'.$tid.'\',\'content'.$tid.'\');">'.&mt(${$orderhash{$name}}[0]).'</li>'; |
} |
} |
} |
} |
$form .= '</ul>'; |
$form .= '</ul>'; |
$form .= '<div id="content'.$tid.'" 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(%orderhash)){ |
$form .= '<div id="'.substr($field,0,3).$tid.'" class="LC_ContentBox" style="display: none;">'.$namehash{$field}.'</div>'; |
if($field ne 'zz'){ |
} |
$form .= '<div id="'.substr(${$orderhash{$field}}[0],0,3).$tid.'" class="LC_ContentBox" style="display: none;">'.${$orderhash{$field}}[1].'</div>'; |
|
} |
|
} |
$form .= '</div></div>'; |
$form .= '</div></div>'; |
|
|
return $form; |
return $form; |