version 1.538, 2013/03/31 22:36:01
|
version 1.539, 2013/04/01 19:39:13
|
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 5643 function propagateState(form,param) {
|
Line 5645 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 5966 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(','); |