version 1.8, 2009/11/23 21:45:18
|
version 1.10, 2010/01/08 00:52:06
|
Line 301 sub display_settings {
|
Line 301 sub display_settings {
|
} else { |
} else { |
$colend = @items; |
$colend = @items; |
} |
} |
$r->print('<p><table class="LC_double_column"><tr><td class="LC_left_col">'); for (my $i=0; $i<$colend; $i++) { |
if ($context ne 'course') { |
|
$r->print('<p><table class="LC_double_column"><tr><td class="LC_left_col">'); |
|
} |
|
else { |
|
$r->print('<div id="prefs" style="max-width:900px;margin: 10px auto 10px auto;">'); |
|
} |
|
for (my $i=0; $i<$colend; $i++) { |
$r->print($output{$items[$i]}); |
$r->print($output{$items[$i]}); |
} |
} |
$r->print('</td><td></td><td class="LC_right_col">'); |
if ($context ne 'course') { |
|
$r->print('</td><td></td><td class="LC_right_col">'); |
|
} |
if ($colend < @items) { |
if ($colend < @items) { |
for (my $i=$colend; $i<@items; $i++) { |
for (my $i=$colend; $i<@items; $i++) { |
$r->print($output{$items[$i]}); |
$r->print($output{$items[$i]}); |
} |
} |
} |
} |
$r->print('</td></tr></table></p>'); |
if ($context ne 'course') { |
$r->print(&print_footer($r,$phase,'process','Save',\@actions)); |
$r->print('</td></tr></table></p>'); |
|
} |
|
else { |
|
$r->print('</div>'); |
|
} |
|
$r->print(&print_footer($r,$phase,'process','Save Changes',\@actions)); |
} else { |
} else { |
$r->print('<input type="hidden" name="phase" value="" />'. |
$r->print('<input type="hidden" name="phase" value="" />'. |
'<input type="hidden" name="numcols" value="'. |
'<input type="hidden" name="numcols" value="'. |
Line 321 sub display_settings {
|
Line 334 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; |
} |
} |