version 1.538, 2013/03/31 22:36:01
|
version 1.540, 2013/04/01 22:09:56
|
Line 834 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 2170 sub update_parameter {
|
Line 2170 sub update_parameter {
|
} |
} |
} |
} |
} else { |
} else { |
map { $allchecked{$which}{$_} = 1; } split(/,/,$env{'form.all'.$which}); |
if ($env{'form.all'.$which}) { |
|
map { $allchecked{$which}{$_} = 1; } split(/,/,$env{'form.all'.$which}); |
|
} |
} |
} |
} |
} |
my $haschanges = 0; |
my $haschanges = 0; |
Line 3034 ENDCOPY
|
Line 3036 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 3051 ENDCUT
|
Line 3053 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="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 3068 ENDREM
|
Line 3070 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="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')) { |
Line 3100 ENDREN
|
Line 3102 ENDREN
|
$selectbox |
$selectbox |
$form_end |
$form_end |
</td> |
</td> |
<td class="LC_docs_entry_commands"><span class="LC_nobreak"> |
<td class="LC_docs_entry_commands LC_nobreak"> |
$removelink |
$removelink |
$cutlink |
$cutlink |
$copylink |
$copylink |
</span> |
|
</td> |
</td> |
END |
END |
} |
} |
Line 5643 function propagateState(form,param) {
|
Line 5644 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.showmultpick.length) { |
if (control) { |
for (var i=0; i<control.showmultpick.length; i++) { |
if (control.showmultpick.length) { |
if (control.showmultpick[i].checked) { |
for (var i=0; i<control.showmultpick.length; i++) { |
if (control.showmultpick[i].value == 0) { |
if (control.showmultpick[i].checked) { |
if (context == 'settings') { |
if (control.showmultpick[i].value == 1) { |
targetform.changeparms.value=param; |
if (context == 'settings') { |
targetform.submit(); |
dosettings = 0; |
} else { |
} else { |
targetform.cmd.value=param+'_'+index; |
doaction = 0; |
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 5955 function checkSubmits() {
|
Line 5965 function checkSubmits() {
|
if (dosettings == 1) { |
if (dosettings == 1) { |
form.allencrypturl.value = ''; |
form.allencrypturl.value = ''; |
form.allhiddenresource.value = ''; |
form.allhiddenresource.value = ''; |
form.changeparams.value = 'all'; |
form.changeparms.value = 'all'; |
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(','); |