version 1.8, 2013/11/13 01:40:07
|
version 1.10, 2013/12/30 18:15:28
|
Line 466 sub create_picker {
|
Line 466 sub create_picker {
|
$display .= '</form>'; |
$display .= '</form>'; |
my $scripttag = |
my $scripttag = |
&respicker_javascript($startcount,$numcount,$context,$formname,\%children, |
&respicker_javascript($startcount,$numcount,$context,$formname,\%children, |
\%hierarchy,\@checked_maps); |
\%hierarchy,\@checked_maps,$numhome); |
if ($context eq 'dumpdocs') { |
if ($context eq 'dumpdocs') { |
return $scripttag.$display; |
return $scripttag.$display; |
} |
} |
Line 498 sub create_picker {
|
Line 498 sub create_picker {
|
|
|
sub respicker_javascript { |
sub respicker_javascript { |
my ($startcount,$numitems,$context,$formname,$children,$hierarchy, |
my ($startcount,$numitems,$context,$formname,$children,$hierarchy, |
$checked_maps) = @_; |
$checked_maps,$numhome) = @_; |
return unless ((ref($children) eq 'HASH') && (ref($hierarchy) eq 'HASH') |
return unless ((ref($children) eq 'HASH') && (ref($hierarchy) eq 'HASH') |
&& (ref($checked_maps) eq 'ARRAY')); |
&& (ref($checked_maps) eq 'ARRAY')); |
my ($elem,$nested,$nameforelem); |
my ($elem,$nested,$nameforelem); |
Line 591 EXTRA
|
Line 591 EXTRA
|
} elsif ($context eq 'dumpdocs') { |
} elsif ($context eq 'dumpdocs') { |
my $blankmsg = &mt('An item selected has no filename set in the "Save as ..." column.'); |
my $blankmsg = &mt('An item selected has no filename set in the "Save as ..." column.'); |
my $dupmsg = &mt('Items selected for copying need unique filenames in the "Save as ..." column.'); |
my $dupmsg = &mt('Items selected for copying need unique filenames in the "Save as ..." column.'); |
|
my $homemsg = &mt('An authoring space needs to be selected.'); |
$scripttag .= <<"EXTRA"; |
$scripttag .= <<"EXTRA"; |
|
|
function checkUnique(form,field) { |
function checkUnique(form,field) { |
var duplicate = 0; |
var duplicate = 0; |
var blank = 0; |
var blank = 0; |
|
var numhome = '$numhome'; |
if (field.length > 0) { |
if (field.length > 0) { |
for (i=0; i<field.length; i++) { |
for (i=0; i<field.length; i++) { |
if (field[i].checked) { |
if (field[i].checked) { |
Line 635 function checkUnique(form,field) {
|
Line 637 function checkUnique(form,field) {
|
alert('$dupmsg'); |
alert('$dupmsg'); |
return false; |
return false; |
} |
} |
|
if (numhome > 1) { |
|
if (!form.authorspace.options[form.authorspace.selectedIndex].value) { |
|
alert('$homemsg'); |
|
return false; |
|
} |
|
} |
return true; |
return true; |
} |
} |
|
|
Line 730 sub get_navmap_object {
|
Line 738 sub get_navmap_object {
|
undef,{'only_body' => 1,}). |
undef,{'only_body' => 1,}). |
'<h2>'.&mt('Resource Display Failed').'</h2>'; |
'<h2>'.&mt('Resource Display Failed').'</h2>'; |
} elsif ($context eq 'dumpdocs') { |
} elsif ($context eq 'dumpdocs') { |
$outcome = '<h2>'.&mt('Copying to Authoring Space unavilable'); |
$outcome = '<h2>'.&mt('Copying to Authoring Space unavailable'); |
} |
} |
$outcome .= '<div class="LC_error">'; |
$outcome .= '<div class="LC_error">'; |
if ($crstype eq 'Community') { |
if ($crstype eq 'Community') { |