version 1.12, 2010/03/22 17:29:11
|
version 1.15.2.1, 2010/08/14 13:38:33
|
Line 251 sub display_settings {
|
Line 251 sub display_settings {
|
if (grep(/^\Q$item\E$/,@actions)) { |
if (grep(/^\Q$item\E$/,@actions)) { |
push(@items,$item); |
push(@items,$item); |
if ($context eq 'domain') { |
if ($context eq 'domain') { |
|
if ($item eq 'usersessions') { |
|
$r->print('<script type="text/javascript">'."\n". |
|
'// <![CDATA['."\n". |
|
&Apache::loncommon::check_uncheck_jscript()."\n". |
|
'// ]]>'."\n". |
|
'</script>'."\n"); |
|
} |
($output{$item},$rowtotal{$item}) = |
($output{$item},$rowtotal{$item}) = |
&Apache::domainprefs::print_config_box($r,$dom,$confname, |
&Apache::domainprefs::print_config_box($r,$dom,$confname, |
$phase,$item,$prefs->{$item},$values->{$item}); |
$phase,$item,$prefs->{$item},$values->{$item}); |
Line 275 sub display_settings {
|
Line 282 sub display_settings {
|
} |
} |
$r->print('</form>'); |
$r->print('</form>'); |
} |
} |
if ($context eq 'course') { |
|
$r->print(' |
|
<script type="text/javascript"> |
|
$(document).ready(function(){ |
|
$("#prefs").accordion({ |
|
autoHeight: false |
|
}); |
|
if ($(".LC_nested tr.advanced").get(0)) { |
|
$(".LC_nested tr.advanced").each(function() { |
|
$(this).hide(); |
|
p = $(this).parents("div.ui-accordion-content") |
|
if (p.find(".LC_advanced_toggle").length) { |
|
return; |
|
} |
|
p.prepend("<span class=\'LC_advanced_toggle\'><input type=\"checkbox\"/>Show advanced options</span>"); |
|
}); |
|
$(".LC_advanced_toggle input").change(function() { |
|
if($(this).is(":checked")) { |
|
$(this).parents("div.ui-accordion-content").find("tr.advanced").fadeIn("normal"); |
|
} else { |
|
$(this).parents("div.ui-accordion-content").find("tr.advanced").fadeOut("normal"); |
|
} |
|
}); |
|
} |
|
}); |
|
</script> |
|
'); |
|
} |
|
$r->print(&Apache::loncommon::end_page()); |
$r->print(&Apache::loncommon::end_page()); |
return; |
return; |
} |
} |
Line 320 sub display_choices {
|
Line 299 sub display_choices {
|
'// ]]>'."\n". |
'// ]]>'."\n". |
'</script>'."\n"); |
'</script>'."\n"); |
$r->print('<h3>'.&mt('Settings to display/modify').'</h3>'. |
$r->print('<h3>'.&mt('Settings to display/modify').'</h3>'. |
'<input type="button" value="'.&mt('check all').'" '. |
'<div><input type="button" value="'.&mt('check all').'" '. |
'onclick="javascript:checkAll(document.pickactions.actions)"'. |
'onclick="javascript:checkAll(document.pickactions.actions)"'. |
' />'.(' 'x2). |
' />'.(' 'x2). |
'<input type="button" value="'.&mt('uncheck all').'" '. |
'<input type="button" value="'.&mt('uncheck all').'" '. |
'onclick="javascript:uncheckAll(document.pickactions.actions)" />'. |
'onclick="javascript:uncheckAll(document.pickactions.actions)" />'. |
"\n". |
"\n". |
'<div class="LC_left_float">'); |
'</div><div class="LC_left_float">'); |
my ($numitems,$maxincol,$firstthird,$secondthird,$seconddiv,$thirddiv,$count); |
my ($numitems,$maxincol,$firstthird,$secondthird,$seconddiv,$thirddiv,$count); |
if (ref($prefs_order) eq 'ARRAY') { |
if (ref($prefs_order) eq 'ARRAY') { |
$numitems = @{$prefs_order}; |
$numitems = @{$prefs_order}; |
Line 336 sub display_choices {
|
Line 315 sub display_choices {
|
if ($numitems%$numcols) { |
if ($numitems%$numcols) { |
$maxincol ++; |
$maxincol ++; |
} |
} |
my $firstthird = $maxincol; |
$firstthird = $maxincol; |
my $secondthird = $firstthird + $maxincol; |
$secondthird = $firstthird + $maxincol; |
$count = 0; |
$count = 0; |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH')) { |
if ((ref($prefs_order) eq 'ARRAY') && (ref($prefs) eq 'HASH')) { |
foreach my $item (@{$prefs_order}) { |
foreach my $item (@{$prefs_order}) { |
Line 353 sub display_choices {
|
Line 332 sub display_choices {
|
if ((!$thirddiv) && ($count >= $secondthird)) { |
if ((!$thirddiv) && ($count >= $secondthird)) { |
$r->print('</div>'."\n".'<div class="LC_left_float">'."\n"); |
$r->print('</div>'."\n".'<div class="LC_left_float">'."\n"); |
$thirddiv = 1; |
$thirddiv = 1; |
} |
} |
} |
} |
$r->print('</div><br clear="all" />'); |
$r->print('</div><br clear="all" />'); |
} |
} |