version 1.484.2.35, 2013/05/27 00:07:52
|
version 1.538, 2013/03/31 22:36:01
|
Line 340 sub group_import {
|
Line 340 sub group_import {
|
} |
} |
my $initialtext = &mt('Replace with your own content.'); |
my $initialtext = &mt('Replace with your own content.'); |
my $newhtml = <<END; |
my $newhtml = <<END; |
<html> |
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
|
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en"> |
<head> |
<head> |
|
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> |
<title>$name</title> |
<title>$name</title> |
</head> |
</head> |
<body bgcolor="#ffffff"> |
<body bgcolor="#ffffff"> |
Line 350 $initialtext
|
Line 352 $initialtext
|
</html> |
</html> |
END |
END |
$env{'form.output'}=$newhtml; |
$env{'form.output'}=$newhtml; |
my $result = |
my $result = |
&Apache::lonnet::finishuserfileupload($coursenum,$coursedom, |
&Apache::lonnet::finishuserfileupload($coursenum,$coursedom, |
'output', |
'output', |
"$filepath/$residx/$fname.html"); |
"$filepath/$residx/$fname.html"); |
Line 375 END
|
Line 377 END
|
removefrommap => \%removefrommap, |
removefrommap => \%removefrommap, |
removeparam => \%removeparam, |
removeparam => \%removeparam, |
); |
); |
my ($result,$msgsarray,$lockerror) = |
my ($result,$msgsarray,$lockerror) = |
&apply_fixups($folder,1,$coursedom,$coursenum,\%import_errors,\%updated); |
&apply_fixups($folder,1,$coursedom,$coursenum,\%import_errors,\%updated); |
if (keys(%import_errors) > 0) { |
if (keys(%import_errors) > 0) { |
$fixuperrors = |
$fixuperrors = |
Line 488 sub docs_change_log {
|
Line 490 sub docs_change_log {
|
} |
} |
my $folderpath=$env{'form.folderpath'}; |
my $folderpath=$env{'form.folderpath'}; |
if ($folderpath eq '') { |
if ($folderpath eq '') { |
$folderpath = 'default&'.&escape(&mt('Main Content').':::::'); |
$folderpath = 'default&'.&escape(&mt('Main '.$crstype.' Content').':::::'); |
} |
} |
$pathitem = '<input type="hidden" name="folderpath" value="'. |
$pathitem = '<input type="hidden" name="folderpath" value="'. |
&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
&HTML::Entities::encode($folderpath,'<>&"').'" />'; |
Line 832 sub print_paste_buffer {
|
Line 834 sub print_paste_buffer {
|
$othercourse = 1; |
$othercourse = 1; |
if ($env{"user.priv.cm./$srcdom/$srcnum"} =~ /\Q:mdc&F\E/) { |
if ($env{"user.priv.cm./$srcdom/$srcnum"} =~ /\Q:mdc&F\E/) { |
if ($canpaste) { |
if ($canpaste) { |
$othercrs = '<br />'.&mt('(from another course)'); |
$othercrs = '<br />'.&mt('(from another course).'); |
} |
} |
} else { |
} else { |
$canpaste = 0; |
$canpaste = 0; |
Line 900 sub print_paste_buffer {
|
Line 902 sub print_paste_buffer {
|
my ($pasteform,$form_start,$buttons,$form_end); |
my ($pasteform,$form_start,$buttons,$form_end); |
if ($pasteitems) { |
if ($pasteitems) { |
$pasteitems .= '<div style="padding:0;clear:both;margin:0;border:0"></div>'; |
$pasteitems .= '<div style="padding:0;clear:both;margin:0;border:0"></div>'; |
$form_start = '<form name="pasteform" action="/adm/coursedocs" method="post" onsubmit="return validateClipboard();">'; |
$form_start = '<form name="pasteform" action="/adm/coursedocs" method="post">'; |
if (@pasteable) { |
if (@pasteable) { |
$buttons = '<input type="submit" name="pastemarked" value="'.&mt('Paste selected').'" />'.(' 'x2); |
$buttons = '<input type="submit" name="pastemarked" value="'.&mt('Paste selected').'" />'.(' 'x2); |
} |
} |
Line 1007 sub paste_popup_js {
|
Line 1009 sub paste_popup_js {
|
my %lt = &Apache::lonlocal::texthash( |
my %lt = &Apache::lonlocal::texthash( |
show => 'Show Options', |
show => 'Show Options', |
hide => 'Hide Options', |
hide => 'Hide Options', |
none => 'No items selected from clipboard.', |
|
); |
); |
return <<"END"; |
return <<"END"; |
|
|
Line 1037 function showOptions(caller,suffix) {
|
Line 1038 function showOptions(caller,suffix) {
|
return; |
return; |
} |
} |
|
|
function validateClipboard() { |
|
var numchk = 0; |
|
if (document.pasteform.pasting.length > 1) { |
|
for (var i=0; i<document.pasteform.pasting.length; i++) { |
|
if (document.pasteform.pasting[i].checked) { |
|
numchk ++; |
|
} |
|
} |
|
} else { |
|
if (document.pasteform.pasting.type == 'checkbox') { |
|
if (document.pasteform.pasting.checked) { |
|
numchk ++; |
|
} |
|
} |
|
} |
|
if (numchk > 0) { |
|
return true; |
|
} else { |
|
alert("$lt{'none'}"); |
|
return false; |
|
} |
|
} |
|
|
|
END |
END |
|
|
} |
} |
|
|
|
|
sub do_paste_from_buffer { |
sub do_paste_from_buffer { |
my ($coursenum,$coursedom,$folder,$container,$errors) = @_; |
my ($coursenum,$coursedom,$folder,$container,$errors) = @_; |
|
|
Line 1307 sub do_paste_from_buffer {
|
Line 1286 sub do_paste_from_buffer {
|
next; |
next; |
} |
} |
if ($lockerr{$prefix}) { |
if ($lockerr{$prefix}) { |
$lockerrs{$suffix} = $lockerr{$prefix}; |
$lockerrs{$suffix} = $lockerr{$prefix}; |
} |
} |
} |
} |
} |
} |
Line 1346 sub do_paste_from_buffer {
|
Line 1325 sub do_paste_from_buffer {
|
if ($newdocsdir eq '') { |
if ($newdocsdir eq '') { |
$newdocsdir = 'default'; |
$newdocsdir = 'default'; |
} |
} |
if (($prefixchg{$suffix}) || |
if (($prefixchg{$suffix}) || |
($srcdom{$suffix} ne $coursedom) || |
($srcdom{$suffix} ne $coursedom) || |
($srcnum{$suffix} ne $coursenum) || |
($srcnum{$suffix} ne $coursenum) || |
($env{'form.docs.markedcopy_options_'.$suffix} ne 'move')) { |
($env{'form.docs.markedcopy_options_'.$suffix} ne 'move')) { |
Line 1553 sub dbcopy {
|
Line 1532 sub dbcopy {
|
if (ref($dbref) eq 'HASH') { |
if (ref($dbref) eq 'HASH') { |
if ($url =~ m{/(smppg|bulletinboard)$}) { |
if ($url =~ m{/(smppg|bulletinboard)$}) { |
my $prefix = $1; |
my $prefix = $1; |
if (($dbref->{'cdom'} =~ /^$match_domain$/) && |
if (($dbref->{'cdom'} =~ /^$match_domain$/) && |
($dbref->{'cnum'} =~ /^$match_courseid$/)) { |
($dbref->{'cnum'} =~ /^$match_courseid$/)) { |
my $db_name; |
my $db_name; |
my $marker = (split(m{/},$url))[4]; |
my $marker = (split(m{/},$url))[4]; |
Line 1588 sub dbcopy {
|
Line 1567 sub dbcopy {
|
my $photo = $contents{'uploaded.photourl'}; |
my $photo = $contents{'uploaded.photourl'}; |
my ($subdir,$fname) = |
my ($subdir,$fname) = |
($photo =~ m{^/uploaded/$match_domain/$match_courseid/+(bulletin|simplepage)/(?:|\d+/)([^/]+)$}); |
($photo =~ m{^/uploaded/$match_domain/$match_courseid/+(bulletin|simplepage)/(?:|\d+/)([^/]+)$}); |
my $newphoto; |
my $newphoto; |
if ($fname ne '') { |
if ($fname ne '') { |
my $content = &Apache::lonnet::getfile($photo); |
my $content = &Apache::lonnet::getfile($photo); |
unless ($content eq '-1') { |
unless ($content eq '-1') { |
$env{'form.'.$suffix.'.photourl'} = $content; |
$env{'form.'.$suffix.'.photourl'} = $content; |
$newphoto = |
$newphoto = |
&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,$suffix.'.photourl',"$subdir/$suffix/$fname"); |
&Apache::lonnet::finishuserfileupload($coursenum,$coursedom,$suffix.'.photourl',"$subdir/$suffix/$fname"); |
delete($env{'form.'.$suffix.'.photourl'}); |
delete($env{'form.'.$suffix.'.photourl'}); |
} |
} |
Line 1610 sub dbcopy {
|
Line 1589 sub dbcopy {
|
} |
} |
} |
} |
if (($freedlock ne 'ok') && (ref($lockerrorsref) eq 'HASH')) { |
if (($freedlock ne 'ok') && (ref($lockerrorsref) eq 'HASH')) { |
$lockerrorsref->{$prefix} = |
$lockerrorsref->{$prefix} = |
'<div class="LC_error">'. |
'<div class="LC_error">'. |
&mt('There was a problem removing a lockfile.'); |
&mt('There was a problem removing a lockfile.'); |
if ($prefix eq 'smppg') { |
if ($prefix eq 'smppg') { |
$lockerrorsref->{$prefix} .= |
$lockerrorsref->{$prefix} .= |
&mt('This will prevent creation of additional simple pages in this course.'); |
&mt('This will prevent creation of additional simple pages in this course.'); |
} else { |
} else { |
$lockerrorsref->{$prefix} .= &mt('This will prevent creation of additional bulletin boards in this course.'); |
$lockerrorsref->{$prefix} .= &mt('This will prevent creation of additional bulletin boards in this course.'); |
Line 1736 sub url_paste_fixups {
|
Line 1715 sub url_paste_fixups {
|
} |
} |
next if ($token->[2]->{'type'} eq 'external'); |
next if ($token->[2]->{'type'} eq 'external'); |
if ($token->[2]->{'type'} eq 'zombie') { |
if ($token->[2]->{'type'} eq 'zombie') { |
next if ($skip); |
next if ($skip); |
$zombies->{$oldurl}{$id} = $ressrc; |
$zombies->{$oldurl}{$id} = $ressrc; |
$changed = 1; |
$changed = 1; |
} elsif ($ressrc =~ m{^/uploaded/($match_domain)/($match_courseid)/(.+)$}) { |
} elsif ($ressrc =~ m{^/uploaded/($match_domain)/($match_courseid)/(.+)$}) { |
Line 2182 sub update_parameter {
|
Line 2161 sub update_parameter {
|
'randomorder' => {}, |
'randomorder' => {}, |
); |
); |
foreach my $which (keys(%allchecked)) { |
foreach my $which (keys(%allchecked)) { |
$env{'form.all'.$which} =~ s/,$//; |
$env{'form.all'.$which} =~ s/,$//; |
if ($which eq 'randompick') { |
if ($which eq 'randompick') { |
foreach my $item (split(/,/,$env{'form.all'.$which})) { |
foreach my $item (split(/,/,$env{'form.all'.$which})) { |
my ($res,$value) = split(/:/,$item); |
my ($res,$value) = split(/:/,$item); |
Line 2191 sub update_parameter {
|
Line 2170 sub update_parameter {
|
} |
} |
} |
} |
} else { |
} else { |
if ($env{'form.all'.$which}) { |
map { $allchecked{$which}{$_} = 1; } split(/,/,$env{'form.all'.$which}); |
map { $allchecked{$which}{$_} = 1; } split(/,/,$env{'form.all'.$which}); |
|
} |
|
} |
} |
} |
} |
my $haschanges = 0; |
my $haschanges = 0; |
Line 2209 sub update_parameter {
|
Line 2186 sub update_parameter {
|
foreach my $which (keys(%allchecked)) { |
foreach my $which (keys(%allchecked)) { |
if (($which eq 'randompick' || $which eq 'randomorder')) { |
if (($which eq 'randompick' || $which eq 'randomorder')) { |
next if (!$is_map); |
next if (!$is_map); |
} |
} |
my $oldvalue = 0; |
my $oldvalue = 0; |
my $newvalue = 0; |
my $newvalue = 0; |
if ($allchecked{$which}{$res}) { |
if ($allchecked{$which}{$res}) { |
Line 2267 sub update_parameter {
|
Line 2244 sub update_parameter {
|
|
|
sub handle_edit_cmd { |
sub handle_edit_cmd { |
my ($coursenum,$coursedom) =@_; |
my ($coursenum,$coursedom) =@_; |
if ($env{'form.cmd'} eq '') { |
return if ($env{'form.cmd'} eq ''); |
return 0; |
|
} |
|
my ($cmd,$idx)=split('_',$env{'form.cmd'}); |
my ($cmd,$idx)=split('_',$env{'form.cmd'}); |
|
|
my $ratstr = $LONCAPA::map::resources[$LONCAPA::map::order[$idx]]; |
my $ratstr = $LONCAPA::map::resources[$LONCAPA::map::order[$idx]]; |
Line 2330 sub editor {
|
Line 2305 sub editor {
|
my $jumpto; |
my $jumpto; |
|
|
unless ($supplementalflag) { |
unless ($supplementalflag) { |
$jumpto = "uploaded/$coursedom/$coursenum/$folder.$container"; |
$jumpto = "'uploaded/$coursedom/$coursenum/$folder.$container'"; |
} |
} |
|
|
unless ($allowed) { |
unless ($allowed) { |
Line 2374 sub editor {
|
Line 2349 sub editor {
|
my ($paste_res,$save_error,$pastemsgarray,$lockerror) = |
my ($paste_res,$save_error,$pastemsgarray,$lockerror) = |
&do_paste_from_buffer($coursenum,$coursedom,$folder,$container, |
&do_paste_from_buffer($coursenum,$coursedom,$folder,$container, |
\%paste_errors); |
\%paste_errors); |
if (ref($pastemsgarray) eq 'ARRAY') { |
if (ref($pastemsgarray) eq 'ARRAY') { |
if (@{$pastemsgarray} > 0) { |
if (@{$pastemsgarray} > 0) { |
$r->print('<p class="LC_info">'. |
|
join('<br />',@{$pastemsgarray}). |
$r->print('<p class="LC_info">'. |
|
join('<br />',@{$pastemsgarray}). |
|
'</p>'); |
|
} |
|
} |
|
if ($lockerror) { |
|
$r->print('<p class="LC_error">'. |
|
$lockerror. |
'</p>'); |
'</p>'); |
} |
} |
} |
if ($save_error ne '') { |
if ($lockerror) { |
return $save_error; |
$r->print('<p class="LC_error">'. |
|
$lockerror. |
|
'</p>'); |
|
} |
|
if ($save_error ne '') { |
|
return $save_error; |
|
} |
|
if ($paste_res) { |
|
my %errortext = &Apache::lonlocal::texthash ( |
|
fail => 'Storage of folder contents failed', |
|
failread => 'Reading folder contents failed', |
|
failstore => 'Storage of folder contents failed', |
|
); |
|
if ($errortext{$paste_res}) { |
|
$r->print('<p class="LC_error">'.$errortext{$paste_res}.'</p>'); |
|
} |
} |
|
if ($paste_res ne 'ok') { |
|
$r->print('<p class="LC_error">'.$paste_res.'</p>'); |
} |
} |
if (keys(%paste_errors) > 0) { |
if (keys(%paste_errors) > 0) { |
$r->print('<p class="LC_warning">'."\n". |
$r->print('<p class="LC_warning">'."\n". |
Line 2597 sub editor {
|
Line 2566 sub editor {
|
|
|
my ($to_show,$output,@allidx,@allmapidx,%filters,%lists,%curr_groups); |
my ($to_show,$output,@allidx,@allmapidx,%filters,%lists,%curr_groups); |
%filters = ( |
%filters = ( |
canremove => [], |
canremove => [], |
cancut => [], |
cancut => [], |
cancopy => [], |
cancopy => [], |
hiddenresource => [], |
|
encrypturl => [], |
|
randomorder => [], |
|
randompick => [], |
|
); |
); |
%curr_groups = &Apache::longroup::coursegroups(); |
%curr_groups = &Apache::longroup::coursegroups(); |
&Apache::loncommon::start_data_table_count(); #setup a row counter |
&Apache::loncommon::start_data_table_count(); #setup a row counter |
Line 2628 sub editor {
|
Line 2593 sub editor {
|
|
|
my $need_save; |
my $need_save; |
if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) { |
if (($allowed) || ($supplementalflag && $folder eq 'supplemental')) { |
my $toolslink; |
my $toolslink = '<table><tr><td>' |
if ($allowed || &Apache::lonnet::allowed('mdc',$env{'request.course.id'})) { |
|
$toolslink = '<table><tr><td>' |
|
.&Apache::loncommon::help_open_menu('Navigation Screen', |
.&Apache::loncommon::help_open_menu('Navigation Screen', |
'Navigation_Screen',undef,'RAT') |
'Navigation_Screen',undef,'RAT') |
.'</td><td class="LC_middle">'.&mt('Tools:').'</td>' |
.'</td><td class="LC_middle">'.&mt('Tools:').'</td>' |
Line 2640 sub editor {
|
Line 2603 sub editor {
|
.'class="LC_toolbarItem" ' |
.'class="LC_toolbarItem" ' |
.'title="'.&mt('Supplemental Content Editor').'">' |
.'title="'.&mt('Supplemental Content Editor').'">' |
.'</a></li></ul></td></tr></table><br />'; |
.'</a></li></ul></td></tr></table><br />'; |
} |
|
if ($shown) { |
if ($shown) { |
if ($allowed) { |
if ($allowed) { |
$to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll') |
$to_show = &Apache::loncommon::start_scrollbox('900px','880px','400px','contentscroll') |
Line 2656 sub editor {
|
Line 2618 sub editor {
|
if ($folder !~ /^supplemental/) { |
if ($folder !~ /^supplemental/) { |
$lists{'canhide'} = join(',',@allidx); |
$lists{'canhide'} = join(',',@allidx); |
$lists{'canrandomlyorder'} = join(',',@allmapidx); |
$lists{'canrandomlyorder'} = join(',',@allmapidx); |
my @possfilters = ('canremove','cancut','cancopy','hiddenresource','encrypturl', |
foreach my $item ('canremove','cancut','cancopy') { |
'randomorder','randompick'); |
|
foreach my $item (@possfilters) { |
|
if (ref($filters{$item}) eq 'ARRAY') { |
if (ref($filters{$item}) eq 'ARRAY') { |
if (@{$filters{$item}} > 0) { |
$lists{$item} = join(',',@{$filters{$item}}); |
$lists{$item} = join(',',@{$filters{$item}}); |
|
} |
|
} |
} |
} |
} |
if (@allidx > 0) { |
if (@allidx > 0) { |
my $path; |
my $path; |
if ($env{'form.folderpath'}) { |
if ($env{'form.folderpath'}) { |
$path = |
$path = |
&HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
&HTML::Entities::encode($env{'form.folderpath'},'<>&"'); |
} |
} |
if (@allidx > 1) { |
if (@allidx > 1) { |
$to_show .= |
$to_show .= |
&Apache::loncommon::continue_data_table_row(). |
&Apache::loncommon::continue_data_table_row(). |
'<td colspan="2"> </td>'. |
'<td colspan="2"> </td>'. |
'<td>'. |
'<td>'. |
Line 2704 sub editor {
|
Line 2662 sub editor {
|
} |
} |
$to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll') |
$to_show .= &Apache::loncommon::start_scrollbox('400px','380px','200px','contentscroll') |
.'<div class="LC_info" id="contentlist">' |
.'<div class="LC_info" id="contentlist">' |
.&mt('Currently empty') |
.&mt('Currently no documents.') |
.'</div>' |
.'</div>' |
.&Apache::loncommon::end_scrollbox(); |
.&Apache::loncommon::end_scrollbox(); |
} |
} |
Line 2717 sub editor {
|
Line 2675 sub editor {
|
.'</div>'; |
.'</div>'; |
} else { |
} else { |
$to_show = '<div class="LC_info" id="contentlist">' |
$to_show = '<div class="LC_info" id="contentlist">' |
.&mt('Currently empty') |
.&mt('Currently no documents.') |
.'</div>' |
.'</div>' |
} |
} |
} |
} |
Line 2784 sub multiple_check_form {
|
Line 2742 sub multiple_check_form {
|
'<input type="hidden" name="allidx" value="'.$listsref->{'canhide'}.'" />'; |
'<input type="hidden" name="allidx" value="'.$listsref->{'canhide'}.'" />'; |
if ($caller eq 'settings') { |
if ($caller eq 'settings') { |
$output .= |
$output .= |
'<input type="hidden" name="allmapidx" value="'.$listsref->{'canrandomlyorder'}.'" />'."\n". |
'<input type="hidden" name="allmapidx" value="'.$listsref->{'canrandomlyorder'}.'" />'; |
'<input type="hidden" name="currhiddenresource" value="'.$listsref->{'hiddenresource'}.'" />'."\n". |
|
'<input type="hidden" name="currencrypturl" value="'.$listsref->{'encrypturl'}.'" />'."\n". |
|
'<input type="hidden" name="currrandomorder" value="'.$listsref->{'randomorder'}.'" />'."\n". |
|
'<input type="hidden" name="currrandompick" value="'.$listsref->{'randompick'}.'" />'."\n"; |
|
} elsif ($caller eq 'actions') { |
} elsif ($caller eq 'actions') { |
$output .= |
$output .= |
'<input type="hidden" name="allremoveidx" id="allremoveidx" value="'.$listsref->{'canremove'}.'" />'. |
'<input type="hidden" name="allremoveidx" id="allremoveidx" value="'.$listsref->{'canremove'}.'" />'. |
Line 3071 END
|
Line 3025 END
|
} |
} |
|
|
if ($denied{'copy'}) { |
if ($denied{'copy'}) { |
$copylink=(<<ENDCOPY) |
$copylink=(<<ENDCOPY); |
<span style="visibility: hidden;">$lt{'cp'}</span> |
<span style="visibility: hidden;">$lt{'cp'}</span> |
ENDCOPY |
ENDCOPY |
} else { |
} else { |
Line 3080 ENDCOPY
|
Line 3034 ENDCOPY
|
$copylink=(<<ENDCOPY); |
$copylink=(<<ENDCOPY); |
<form name="$formname" method="post" action="/adm/coursedocs"> |
<form name="$formname" method="post" action="/adm/coursedocs"> |
$form_common |
$form_common |
<input type="checkbox" name="copy" id="copy_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','copy');" class="LC_hidden" /><a href="$js" class="LC_docs_copy">$lt{'cp'}</a> |
<input type="checkbox" name="copy" id="copy_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','copy');" class="LC_hidden"><a href="$js" class="LC_docs_copy">$lt{'cp'}</a> |
$form_end |
$form_end |
ENDCOPY |
ENDCOPY |
if (($ishash) && (ref($filtersref->{'cancopy'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'cancopy'}) eq 'ARRAY')) { |
Line 3097 ENDCUT
|
Line 3051 ENDCUT
|
$cutlink=(<<ENDCUT); |
$cutlink=(<<ENDCUT); |
<form name="$formname" method="post" action="/adm/coursedocs"> |
<form name="$formname" method="post" action="/adm/coursedocs"> |
$form_common |
$form_common |
<input type="hidden" name="skip_$orderidx" id="skip_cut_$orderidx" value="$skip_confirm" /> |
<input type="checkbox" name="cut" id="cut_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','cut');" class="LC_hidden"><a href="$js" class="LC_docs_cut">$lt{'ct'}</a> |
<input type="checkbox" name="cut" id="cut_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','cut');" class="LC_hidden" /><a href="$js" class="LC_docs_cut">$lt{'ct'}</a> |
|
$form_end |
$form_end |
ENDCUT |
ENDCUT |
if (($ishash) && (ref($filtersref->{'cancut'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'cancut'}) eq 'ARRAY')) { |
Line 3115 ENDREM
|
Line 3068 ENDREM
|
$removelink=(<<ENDREM); |
$removelink=(<<ENDREM); |
<form name="$formname" method="post" action="/adm/coursedocs"> |
<form name="$formname" method="post" action="/adm/coursedocs"> |
$form_common |
$form_common |
<input type="hidden" name="skip_$orderidx" id="skip_remove_$orderidx" value="$skip_confirm" /> |
<input type="checkbox" name="remove" id="remove_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','remove');" class="LC_hidden"><a href="$js" class="LC_docs_remove">$lt{'rm'}</a> |
<input type="checkbox" name="remove" id="remove_$orderidx" value="$orderidx" onclick="javascript:singleCheck(this,'$orderidx','remove');" class="LC_hidden" /><a href="$js" class="LC_docs_remove">$lt{'rm'}</a> |
|
$form_end |
$form_end |
ENDREM |
ENDREM |
if (($ishash) && (ref($filtersref->{'canremove'}) eq 'ARRAY')) { |
if (($ishash) && (ref($filtersref->{'canremove'}) eq 'ARRAY')) { |
push(@{$filtersref->{'canremove'}},$orderidx); |
push(@{$filtersref->{'canremove'}},$orderidx); |
} |
} |
} |
} |
$renamelink=(<<ENDREN); |
unless ($isexternal) { |
|
$renamelink=(<<ENDREN); |
<a href='javascript:changename("$esc_path","$index","$renametitle");' class="LC_docs_rename">$lt{'rn'}</a> |
<a href='javascript:changename("$esc_path","$index","$renametitle");' class="LC_docs_rename">$lt{'rn'}</a> |
ENDREN |
ENDREN |
|
} |
$line.=(<<END); |
$line.=(<<END); |
<td> |
<td> |
<div class="LC_docs_entry_move"> |
<div class="LC_docs_entry_move"> |
Line 3146 ENDREN
|
Line 3100 ENDREN
|
$selectbox |
$selectbox |
$form_end |
$form_end |
</td> |
</td> |
<td class="LC_docs_entry_commands LC_nobreak"> |
<td class="LC_docs_entry_commands"><span class="LC_nobreak"> |
$removelink |
$removelink |
$cutlink |
$cutlink |
$copylink |
$copylink |
|
</span> |
</td> |
</td> |
END |
END |
} |
} |
Line 3236 END
|
Line 3191 END
|
my $rpckchk; |
my $rpckchk; |
if ($rpicknum) { |
if ($rpicknum) { |
$rpckchk = ' checked="checked"'; |
$rpckchk = ' checked="checked"'; |
if (($ishash) && (ref($filtersref->{'randompick'}) eq 'ARRAY')) { |
|
push(@{$filtersref->{'randompick'}},$orderidx.':'.$rpicknum); |
|
} |
|
} |
} |
my $formname = 'edit_randompick_'.$orderidx; |
my $formname = 'edit_randompick_'.$orderidx; |
$rand_pick_text = |
$rand_pick_text = |
Line 3251 $form_common."\n".
|
Line 3203 $form_common."\n".
|
} |
} |
$rand_pick_text .= '</span></span>'. |
$rand_pick_text .= '</span></span>'. |
$form_end; |
$form_end; |
my $ro_set; |
my $ro_set= |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i) { |
((&LONCAPA::map::getparameter($orderidx,'parameter_randomorder'))[0]=~/^yes$/i?' checked="checked"':''); |
$ro_set = 'checked="checked"'; |
|
if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) { |
|
push(@{$filtersref->{'randomorder'}},$orderidx); |
|
} |
|
} |
|
my $formname = 'edit_rorder_'.$orderidx; |
my $formname = 'edit_rorder_'.$orderidx; |
$rand_order_text = |
$rand_order_text = |
'<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n". |
'<form action="/adm/coursedocs" method="post" name="'.$formname.'">'."\n". |
$form_param."\n". |
$form_param."\n". |
$form_common."\n". |
$form_common."\n". |
'<span class="LC_nobreak"><label><input type="checkbox" name="randomorder_'.$orderidx.'" id="randomorder_'.$orderidx.'" onclick="checkForSubmit(this.form,'."'randomorder','settings'".');" '.$ro_set.' /> '.&mt('Random Order').' </label></span>'. |
'<span class="LC_nobreak"><label><input type="checkbox" name="randomorder_'.$orderidx.'" id="randomorder_'.$orderidx.'" onclick="checkForSubmit(this.form,'."'randomorder','settings'".');" '.$ro_set.' /> '.&mt('Random Order').' </label></span>'. |
$form_end; |
$form_end; |
} |
} |
} elsif ($supplementalflag && !$allowed) { |
} elsif ($supplementalflag && !$allowed) { |
$url .= ($url =~ /\?/) ? '&':'?'; |
$url .= ($url =~ /\?/) ? '&':'?'; |
Line 3334 $form_end;
|
Line 3281 $form_end;
|
my %lt=&Apache::lonlocal::texthash( |
my %lt=&Apache::lonlocal::texthash( |
'hd' => 'Hidden', |
'hd' => 'Hidden', |
'ec' => 'URL hidden'); |
'ec' => 'URL hidden'); |
my ($enctext,$hidtext); |
my $enctext= |
if ((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i) { |
((&LONCAPA::map::getparameter($orderidx,'parameter_encrypturl'))[0]=~/^yes$/i?' checked="checked"':''); |
$enctext = ' checked="checked"'; |
my $hidtext= |
if (($ishash) && (ref($filtersref->{'encrypturl'}) eq 'ARRAY')) { |
((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i?' checked="checked"':''); |
push(@{$filtersref->{'encrypturl'}},$orderidx); |
|
} |
|
} |
|
if ((&LONCAPA::map::getparameter($orderidx,'parameter_hiddenresource'))[0]=~/^yes$/i) { |
|
$hidtext = ' checked="checked"'; |
|
if (($ishash) && (ref($filtersref->{'randomorder'}) eq 'ARRAY')) { |
|
push(@{$filtersref->{'hiddenresource'}},$orderidx); |
|
} |
|
} |
|
my $formhidden = 'edit_hiddenresource_'.$orderidx; |
my $formhidden = 'edit_hiddenresource_'.$orderidx; |
my $formurlhidden = 'edit_encrypturl_'.$orderidx; |
my $formurlhidden = 'edit_encrypturl_'.$orderidx; |
$line.=(<<ENDPARMS); |
$line.=(<<ENDPARMS); |
Line 3468 sub new_timebased_suffix {
|
Line 3406 sub new_timebased_suffix {
|
} |
} |
} |
} |
if ($freedlock ne 'ok') { |
if ($freedlock ne 'ok') { |
$locknotfreed = |
$locknotfreed = |
'<div class="LC_error">'. |
'<div class="LC_error">'. |
&mt('There was a problem removing a lockfile.').' '; |
&mt('There was a problem removing a lockfile.').' '; |
if ($type eq 'paste') { |
if ($type eq 'paste') { |
Line 3649 sub list_symbs {
|
Line 3587 sub list_symbs {
|
sub verifycontent { |
sub verifycontent { |
my ($r) = @_; |
my ($r) = @_; |
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
$r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Content')); |
$r->print(&Apache::loncommon::start_page('Verify '.$crstype.' Documents')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Content')); |
$r->print(&Apache::lonhtmlcommon::breadcrumbs('Verify '.$crstype.' Documents')); |
$r->print(&startContentScreen('tools')); |
$r->print(&startContentScreen('tools')); |
$r->print('<h4 class="LC_info">'.&mt($crstype.' content verification').'</h4>'); |
$r->print('<h4 class="LC_info">'.&mt($crstype.' content verification').'</h4>'); |
$hashtied=0; |
$hashtied=0; |
Line 3752 sub checkversions {
|
Line 3690 sub checkversions {
|
&changewarning($r,''); |
&changewarning($r,''); |
if ($env{'form.timerange'} eq 'all') { |
if ($env{'form.timerange'} eq 'all') { |
# show all documents |
# show all documents |
$header=&mt('All content in '.$crstype); |
$header=&mt('All Documents in '.$crstype); |
$allsel=' selected="selected"'; |
$allsel=' selected="selected"'; |
foreach my $key (keys(%hash)) { |
foreach my $key (keys(%hash)) { |
if ($key=~/^ids\_(\/res\/.+)$/) { |
if ($key=~/^ids\_(\/res\/.+)$/) { |
Line 4027 sub startContentScreen {
|
Line 3965 sub startContentScreen {
|
if (($mode eq 'navmaps') || ($mode eq 'supplemental')) { |
if (($mode eq 'navmaps') || ($mode eq 'supplemental')) { |
$output .= '<li'.(($mode eq 'navmaps')?' class="active"':'').'><a href="/adm/navmaps"><b> '.&mt('Content Overview').' </b></a></li>'."\n"; |
$output .= '<li'.(($mode eq 'navmaps')?' class="active"':'').'><a href="/adm/navmaps"><b> '.&mt('Content Overview').' </b></a></li>'."\n"; |
$output .= '<li'.(($mode eq 'coursesearch')?' class="active"':'').'><a href="/adm/searchcourse"><b> '.&mt('Content Search').' </b></a></li>'."\n"; |
$output .= '<li'.(($mode eq 'coursesearch')?' class="active"':'').'><a href="/adm/searchcourse"><b> '.&mt('Content Search').' </b></a></li>'."\n"; |
|
$output .= '<li'.(($mode eq 'courseindex')?' class="active"':'').'><a href="/adm/indexcourse"><b> '.&mt('Content Index').' </b></a></li>'."\n"; |
$output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/supplemental"><b>'.&mt('Supplemental Content').'</b></a></li>'; |
$output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/supplemental"><b>'.&mt('Supplemental Content').'</b></a></li>'; |
} else { |
} else { |
$output .= '<li '.(($mode eq 'docs')?' class="active"':'').' id="tabbededitor"><a href="/adm/coursedocs?forcestandard=1"><b> '.&mt('Main Content Editor').' </b></a></li>'."\n"; |
$output .= '<li '.(($mode eq 'docs')?' class="active"':'').' id="tabbededitor"><a href="/adm/coursedocs?forcestandard=1"><b> '.&mt('Content Editor').' </b></a></li>'."\n"; |
$output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Content Editor').'</b></a></li>'."\n"; |
$output .= '<li '.(($mode eq 'suppdocs')?' class="active"':'').'><a href="/adm/coursedocs?forcesupplement=1"><b>'.&mt('Supplemental Content Editor').'</b></a></li>'."\n"; |
$output .= '<li '.(($mode eq 'tools')?' class="active"':'').'><a href="/adm/coursedocs?tools=1"><b> '.&mt('Content Utilities').' </b></a></li>'."\n"; |
$output .= '<li '.(($mode eq 'tools')?' class="active"':'').'><a href="/adm/coursedocs?tools=1"><b> '.&mt('Content Utilities').' </b></a></li>'."\n"; |
'><a href="/adm/coursedocs?tools=1"><b> '.&mt('Content Utilities').' </b></a></li>'; |
'><a href="/adm/coursedocs?tools=1"><b> '.&mt('Content Utilities').' </b></a></li>'; |
Line 4050 sub endContentScreen {
|
Line 3989 sub endContentScreen {
|
} |
} |
|
|
sub supplemental_base { |
sub supplemental_base { |
return 'supplemental&'.&escape(&mt('Supplemental Content')); |
return 'supplemental&'.&escape(&mt('Supplemental '.&Apache::loncommon::course_type().' Content')); |
} |
} |
|
|
sub handler { |
sub handler { |
Line 4183 sub handler {
|
Line 4122 sub handler {
|
} |
} |
} elsif ($env{'form.command'} eq 'editdocs') { |
} elsif ($env{'form.command'} eq 'editdocs') { |
$env{'form.folderpath'} = 'default&'. |
$env{'form.folderpath'} = 'default&'. |
&escape(&mt('Main Content').':::::'); |
&escape(&mt('Main '.$crstype.' Content').':::::'); |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}}); |
&Apache::lonnet::appenv({'docs.exit.'.$env{'request.course.id'} => $env{'form.command'}}); |
} elsif ($env{'form.command'} eq 'editsupp') { |
} elsif ($env{'form.command'} eq 'editsupp') { |
$env{'form.folderpath'} = 'supplemental&'. |
$env{'form.folderpath'} = 'supplemental&'. |
Line 4228 sub handler {
|
Line 4167 sub handler {
|
if ($supplementalflag) { |
if ($supplementalflag) { |
$env{'form.folderpath'}=&supplemental_base(); |
$env{'form.folderpath'}=&supplemental_base(); |
} else { |
} else { |
$env{'form.folderpath'}='default&'.&escape(&mt('Main Content'). |
$env{'form.folderpath'}='default'.&escape(&mt('Main '.$crstype.' Content'). |
':::::'); |
':::::'); |
} |
} |
} |
} |
Line 4254 sub handler {
|
Line 4193 sub handler {
|
if ($env{'form.folder'} eq '' || |
if ($env{'form.folder'} eq '' || |
$env{'form.folder'} eq 'supplemental') { |
$env{'form.folder'} eq 'supplemental') { |
$folderpath='default&'. |
$folderpath='default&'. |
&escape(&mt('Main Content').':::::'); |
&escape(&mt('Main '.$crstype.' Content').':::::'); |
} |
} |
} |
} |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
$containertag = '<input type="hidden" name="folderpath" value="" />'; |
Line 4422 sub handler {
|
Line 4361 sub handler {
|
'navc' => 'Table of Contents', |
'navc' => 'Table of Contents', |
'sipa' => 'Simple Course Page', |
'sipa' => 'Simple Course Page', |
'sipr' => 'Simple Problem', |
'sipr' => 'Simple Problem', |
'webp' => 'Blank Web Page (editable)', |
'webp' => 'Blank Web Page (editable)', |
'drbx' => 'Drop Box', |
'drbx' => 'Drop Box', |
'scuf' => 'External Scores (handgrade, upload, clicker)', |
'scuf' => 'External Scores (handgrade, upload, clicker)', |
'bull' => 'Discussion Board', |
'bull' => 'Discussion Board', |
Line 4579 HIDDENFORM
|
Line 4518 HIDDENFORM
|
if ($folder eq '' || $supplementalflag) { |
if ($folder eq '' || $supplementalflag) { |
$folder='default'; |
$folder='default'; |
$savefolderpath = $env{'form.folderpath'}; |
$savefolderpath = $env{'form.folderpath'}; |
$env{'form.folderpath'}='default&'.&escape(&mt('Main Content')); |
$env{'form.folderpath'}='default&'.&escape(&mt('Content')); |
$pathitem = '<input type="hidden" name="folderpath" value="'. |
$pathitem = '<input type="hidden" name="folderpath" value="'. |
&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />'; |
&HTML::Entities::encode($env{'form.folderpath'},'<>&"').'" />'; |
} |
} |
Line 5232 sub generate_edit_table {
|
Line 5171 sub generate_edit_table {
|
$form = '<div class="LC_Box" style="margin:0;">'. |
$form = '<div class="LC_Box" style="margin:0;">'. |
'<ul id="navigation'.$tid.'" class="LC_TabContent">'."\n". |
'<ul id="navigation'.$tid.'" class="LC_TabContent">'."\n". |
'<li class="goback">'. |
'<li class="goback">'. |
'<a href="javascript:toContents('."'$jumpto'".');">'. |
'<a href="javascript:toContents('.$jumpto.');">'. |
'<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'. |
'<img src="'.$backicon.'" class="LC_icon" style="border: none; vertical-align: top;"'. |
' alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n". |
' alt="'.$backtext.'" />'.$backtext.'</a></li>'."\n". |
'<li>'. |
'<li>'. |
Line 5327 sub editing_js {
|
Line 5266 sub editing_js {
|
p_msb => 'Title for the Problem', |
p_msb => 'Title for the Problem', |
p_mdb => 'Title for the Drop Box', |
p_mdb => 'Title for the Drop Box', |
p_mbb => 'Title for the Discussion Board', |
p_mbb => 'Title for the Discussion Board', |
p_mwp => 'Title for Web Page', |
p_mwp => 'Title for Web Page', |
p_mab => "Enter user:domain for User's Personal Information Page", |
p_mab => "Enter user:domain for User's Personal Information Page", |
p_mab2 => 'Personal Information Page of ', |
p_mab2 => 'Personal Information Page of ', |
p_mab_alrt1 => 'Not a valid user:domain', |
p_mab_alrt1 => 'Not a valid user:domain', |
Line 5336 sub editing_js {
|
Line 5275 sub editing_js {
|
p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!', |
p_rmr1 => 'WARNING: Removing a resource makes associated grades and scores inaccessible!', |
p_rmr2a => 'Remove[_99]', |
p_rmr2a => 'Remove[_99]', |
p_rmr2b => '?[_99]', |
p_rmr2b => '?[_99]', |
p_rmr3a => 'Remove those [_2]', |
|
p_rmr3b => 'items?[_2]', |
|
p_ctr1a => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!', |
p_ctr1a => 'WARNING: Cutting a resource makes associated grades and scores inaccessible!', |
p_ctr1b => 'Grades remain inaccessible if resource is pasted into another folder.', |
p_ctr1b => 'Grades remain inaccessible if resource is pasted into another folder.', |
p_ctr2a => 'Cut[_98]', |
p_ctr2a => 'Cut[_98]', |
p_ctr2b => '?[_98]', |
p_ctr2b => '?[_98]', |
p_ctr3a => 'Cut those[_2]', |
|
p_ctr3b => 'items?[_2]', |
|
rpck => 'Enter number to pick (e.g., 3)', |
rpck => 'Enter number to pick (e.g., 3)', |
imsfile => 'You must choose an IMS package for import', |
imsfile => 'You must choose an IMS package for import', |
imscms => 'You must select which Course Management System was the source of the IMS package', |
imscms => 'You must select which Course Management System was the source of the IMS package', |
Line 5351 sub editing_js {
|
Line 5286 sub editing_js {
|
titbl => 'Title is blank', |
titbl => 'Title is blank', |
more => '(More ...)', |
more => '(More ...)', |
less => '(Less ...)', |
less => '(Less ...)', |
noor => 'No actions selected or changes to settings specified.', |
|
noch => 'No changes to settings specified.', |
|
noac => 'No actions selected.', |
|
); |
); |
|
|
my $crstype = &Apache::loncommon::course_type(); |
my $crstype = &Apache::loncommon::course_type(); |
Line 5363 sub editing_js {
|
Line 5295 sub editing_js {
|
$main_container_page = 1; |
$main_container_page = 1; |
} |
} |
my $toplevelmain = |
my $toplevelmain = |
&escape(&mt('Main Content').':::::'); |
&escape(&mt('Main '.$crstype.' Content').':::::'); |
my $toplevelsupp = &supplemental_base(); |
my $toplevelsupp = &supplemental_base(); |
|
|
my $backtourl; |
my $backtourl; |
Line 5377 sub editing_js {
|
Line 5309 sub editing_js {
|
if (&Apache::lonnet::is_on_map($res)) { |
if (&Apache::lonnet::is_on_map($res)) { |
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='. |
$backtourl = &HTML::Entities::encode(&Apache::lonnet::clutter($res),'<>&"').'?symb='. |
&HTML::Entities::encode($caller,'<>&"'); |
&HTML::Entities::encode($caller,'<>&"'); |
} else { |
|
$backtourl = '/adm/navmaps'; |
|
} |
} |
} |
} |
} elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') { |
} elsif ($env{'docs.exit.'.$env{'request.course.id'}} eq '/adm/menu') { |
Line 5441 function makewebpage(type) {
|
Line 5371 function makewebpage(type) {
|
formname = this.document.forms.newwebpage; |
formname = this.document.forms.newwebpage; |
} |
} |
if (title) { |
if (title) { |
var webpage = formname.importdetail.value; |
var webpage = formname.importdetail.value; |
formname.importdetail.value = escape(title)+'='+webpage; |
formname.importdetail.value = escape(title)+'='+webpage; |
formname.submit(); |
formname.submit(); |
} |
} |
Line 5713 function propagateState(form,param) {
|
Line 5643 function propagateState(form,param) {
|
} |
} |
|
|
function checkForSubmit(targetform,param,context,idx,folderpath,index,oldtitle,skip_confirm,container,folder) { |
function checkForSubmit(targetform,param,context,idx,folderpath,index,oldtitle,skip_confirm,container,folder) { |
var dosettings; |
|
var doaction; |
|
var control = document.togglemultsettings; |
var control = document.togglemultsettings; |
if (context == 'actions') { |
if (context == 'actions') { |
control = document.togglemultactions; |
control = document.togglemultactions; |
doaction = 1; |
|
} else { |
|
dosettings = 1; |
|
} |
} |
if (control) { |
if (control.showmultpick.length) { |
if (control.showmultpick.length) { |
for (var i=0; i<control.showmultpick.length; i++) { |
for (var i=0; i<control.showmultpick.length; i++) { |
if (control.showmultpick[i].checked) { |
if (control.showmultpick[i].checked) { |
if (control.showmultpick[i].value == 0) { |
if (control.showmultpick[i].value == 1) { |
if (context == 'settings') { |
if (context == 'settings') { |
targetform.changeparms.value=param; |
dosettings = 0; |
targetform.submit(); |
} else { |
} else { |
doaction = 0; |
targetform.cmd.value=param+'_'+index; |
|
targetform.folderpath.value=folderpath; |
|
targetform.markcopy.value=idx+':'+param; |
|
targetform.copyfolder.value=folder+'.'+container; |
|
if (param == 'remove') { |
|
if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) { |
|
targetform.markcopy.value=''; |
|
targetform.copyfolder.value=''; |
|
targetform.submit(); |
|
} |
|
} |
|
if (param == 'cut') { |
|
if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) { |
|
targetform.submit(); |
|
} |
|
} |
|
if (param == 'copy') { |
|
targetform.submit(); |
|
} |
|
targetform.markcopy.value=''; |
|
targetform.copyfolder.value=''; |
|
targetform.cmd.value=''; |
|
targetform.folderpath.value=''; |
|
} |
|
} else { |
|
if (context == 'actions') { |
|
if (document.getElementById(param+'_'+idx)) { |
|
item = document.getElementById(param+'_'+idx); |
|
if (item.type == 'checkbox') { |
|
if (item.checked) { |
|
item.checked = false; |
|
} else { |
|
item.checked = true; |
|
} |
|
} |
} |
} |
} |
} |
} |
} |
|
} else { |
|
if (document.getElementById(param+'_'+idx)) { |
|
checkbox = document.getElementById(param+'_'+idx); |
|
singleCheck(checkbox,idx,param); |
|
} |
} |
} |
} |
} |
} |
} else { |
if (context == 'settings') { |
if (context == 'settings') { |
if (dosettings == 1) { |
|
targetform.changeparms.value=param; |
targetform.changeparms.value=param; |
targetform.submit(); |
targetform.submit(); |
} |
} |
} |
} |
if (context == 'actions') { |
|
if (doaction == 1) { |
|
targetform.cmd.value=param+'_'+index; |
|
targetform.folderpath.value=folderpath; |
|
targetform.markcopy.value=idx+':'+param; |
|
targetform.copyfolder.value=folder+'.'+container; |
|
if (param == 'remove') { |
|
if (skip_confirm || confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr2a"} "'+oldtitle+'" $lt{"p_rmr2b"}')) { |
|
targetform.markcopy.value=''; |
|
targetform.copyfolder.value=''; |
|
targetform.submit(); |
|
} |
|
} |
|
if (param == 'cut') { |
|
if (skip_confirm || confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr2a"} "'+oldtitle+'" $lt{"p_ctr2b"}')) { |
|
targetform.submit(); |
|
return; |
|
} |
|
} |
|
if (param == 'copy') { |
|
targetform.submit(); |
|
return; |
|
} |
|
targetform.markcopy.value=''; |
|
targetform.copyfolder.value=''; |
|
targetform.cmd.value=''; |
|
targetform.folderpath.value=''; |
|
return; |
|
} else { |
|
if (document.getElementById(param+'_'+idx)) { |
|
item = document.getElementById(param+'_'+idx); |
|
if (item.type == 'checkbox') { |
|
if (item.checked) { |
|
item.checked = false; |
|
} else { |
|
item.checked = true; |
|
singleCheck(item,idx,param); |
|
} |
|
} |
|
} |
|
} |
|
} |
|
return; |
return; |
} |
} |
|
|
Line 5989 function checkSubmits() {
|
Line 5910 function checkSubmits() {
|
var numchanges = 0; |
var numchanges = 0; |
var form = document.saveactions; |
var form = document.saveactions; |
var doactions = multiActions(); |
var doactions = multiActions(); |
var cutwarnings = 0; |
|
var remwarnings = 0; |
|
if (doactions == 1) { |
if (doactions == 1) { |
var remidxlist = document.cumulativeactions.allremoveidx.value; |
var remidxlist = document.cumulativeactions.allremoveidx.value; |
if ((remidxlist != '') && (remidxlist != null)) { |
if ((remidxlist != '') && (remidxlist != null)) { |
Line 6000 function checkSubmits() {
|
Line 5919 function checkSubmits() {
|
if (document.getElementById('remove_'+remidxs[i]).checked) { |
if (document.getElementById('remove_'+remidxs[i]).checked) { |
form.multiremove.value += remidxs[i]+','; |
form.multiremove.value += remidxs[i]+','; |
numchanges ++; |
numchanges ++; |
if (document.getElementById('skip_remove_'+remidxs[i])) { |
|
if (document.getElementById('skip_remove_'+remidxs[i]).value == 0) { |
|
remwarnings ++; |
|
} |
|
} |
|
} |
} |
} |
} |
} |
} |
Line 6017 function checkSubmits() {
|
Line 5931 function checkSubmits() {
|
if (document.getElementById('cut_'+cutidxs[i]).checked == true) { |
if (document.getElementById('cut_'+cutidxs[i]).checked == true) { |
form.multicut.value += cutidxs[i]+','; |
form.multicut.value += cutidxs[i]+','; |
numchanges ++; |
numchanges ++; |
if (document.getElementById('skip_cut_'+cutidxs[i])) { |
|
if (document.getElementById('skip_cut_'+cutidxs[i]).value == 0) { |
|
cutwarnings ++; |
|
} |
|
} |
|
} |
} |
} |
} |
} |
} |
Line 6043 function checkSubmits() {
|
Line 5952 function checkSubmits() {
|
} |
} |
} |
} |
var dosettings = multiSettings(); |
var dosettings = multiSettings(); |
var haschanges = 0; |
|
if (dosettings == 1) { |
if (dosettings == 1) { |
form.allencrypturl.value = ''; |
form.allencrypturl.value = ''; |
form.allhiddenresource.value = ''; |
form.allhiddenresource.value = ''; |
form.changeparms.value = 'all'; |
form.changeparams.value = 'all'; |
var patt=new RegExp(",\$"); |
|
var allidxlist = document.cumulativesettings.allidx.value; |
var allidxlist = document.cumulativesettings.allidx.value; |
if ((allidxlist != '') && (allidxlist != null)) { |
if ((allidxlist != '') && (allidxlist != null)) { |
var allidxs = allidxlist.split(','); |
var allidxs = allidxlist.split(','); |
Line 6065 function checkSubmits() {
|
Line 5972 function checkSubmits() {
|
} |
} |
} |
} |
} |
} |
form.allhiddenresource.value = form.allhiddenresource.value.replace(patt,""); |
|
form.allencrypturl.value = form.allencrypturl.value.replace(patt,""); |
|
} |
} |
} |
} |
form.allrandompick.value = ''; |
form.allrandompick.value = ''; |
Line 6085 function checkSubmits() {
|
Line 5990 function checkSubmits() {
|
form.allrandomorder.value += allmapidxs[i]+','; |
form.allrandomorder.value += allmapidxs[i]+','; |
} |
} |
} |
} |
form.allrandompick.value = form.allrandompick.value.replace(patt,""); |
|
form.allrandomorder.value = form.allrandomorder.value.replace(patt,""); |
|
} |
|
if (document.cumulativesettings.currhiddenresource.value != form.allhiddenresource.value) { |
|
haschanges = 1; |
|
} |
|
if (document.cumulativesettings.currencrypturl.value != form.allencrypturl.value) { |
|
haschanges = 1; |
|
} |
|
if (document.cumulativesettings.currrandomorder.value != form.allrandomorder.value) { |
|
haschanges = 1; |
|
} |
|
if (document.cumulativesettings.currrandompick.value != form.allrandompick.value) { |
|
haschanges = 1; |
|
} |
|
} |
|
if (doactions == 1) { |
|
if (numchanges > 0) { |
|
if ((cutwarnings > 0) || (remwarnings > 0)) { |
|
if (remwarnings > 0) { |
|
if (!confirm('$lt{"p_rmr1"}\\n\\n$lt{"p_rmr3a"} '+remwarnings+' $lt{"p_rmr3b"}')) { |
|
return false; |
|
} |
|
} |
|
if (cutwarnings > 0) { |
|
if (!confirm('$lt{"p_ctr1a"}\\n$lt{"p_ctr1b"}\\n\\n$lt{"p_ctr3a"} '+cutwarnings+' $lt{"p_ctr3b"}')) { |
|
return false; |
|
} |
|
} |
|
} |
|
form.submit(); |
|
return true; |
|
} |
|
} |
|
if (dosettings == 1) { |
|
if (haschanges == 1) { |
|
form.submit(); |
|
return true; |
|
} |
|
} |
|
if ((dosettings == 1) && (doactions == 1)) { |
|
alert("$lt{'noor'}"); |
|
} else { |
|
if (dosettings == 1) { |
|
alert("$lt{'noch'}"); |
|
} else { |
|
alert("$lt{'noac'}"); |
|
} |
} |
} |
} |
|
if ((numchanges > 0) || (dosettings == 1)) { |
|
form.submit(); |
|
return true; |
|
} |
return false; |
return false; |
} |
} |
|
|