Diff for /loncom/interface/lonconfigsettings.pm between versions 1.8.2.2 and 1.12

version 1.8.2.2, 2010/03/23 20:53:09 version 1.12, 2010/03/22 17:29:11
Line 267  sub display_settings { Line 267  sub display_settings {
                 $r->print($output{$items[$i]});                  $r->print($output{$items[$i]});
             }              }
             $r->print('</div>');              $r->print('</div>');
             $r->print(&print_footer($r,$phase,'process','Save',\@actions));              $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="" />'.
                       '<span class="LC_error">'.&mt('No settings chosen').                        '<span class="LC_error">'.&mt('No settings chosen').
Line 275  sub display_settings { Line 275  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 291  sub display_choices { Line 319  sub display_choices {
               &Apache::loncommon::check_uncheck_jscript()."\n".                &Apache::loncommon::check_uncheck_jscript()."\n".
               '// ]]>'."\n".                '// ]]>'."\n".
               '</script>'."\n");                '</script>'."\n");
     $r->print('<h3>'.&mt('Settings to display/modify').'</h3>'."\n".      $r->print('<h3>'.&mt('Settings to display/modify').'</h3>'.
               '<div><input type="button" value="'.&mt('check all').'" '.                '<input type="button" value="'.&mt('check all').'" '.
               'onclick="javascript:checkAll(document.pickactions.actions)"'.                'onclick="javascript:checkAll(document.pickactions.actions)"'.
               ' />'.('&nbsp;'x2).                ' />'.('&nbsp;'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)" />'.
               '</div><br />'."\n".                "\n".
               '<div class="LC_left_float">');                '<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') {
Line 313  sub display_choices { Line 341  sub display_choices {
     $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}) {
             $r->print(&Apache::loncommon::help_open_topic($prefs->{$item}->{'help'}).              $r->print('<h4>'.
                         &Apache::loncommon::help_open_topic($prefs->{$item}->{'help'}).
                       '<label><input type="checkbox" name="actions" value="'.$item.                        '<label><input type="checkbox" name="actions" value="'.$item.
                       '" />&nbsp;'.&mt($prefs->{$item}->{'text'}).'</label><br />');                        '" />&nbsp;'.&mt($prefs->{$item}->{'text'}).'</label></h4>');
             $count ++;              $count ++;
             if ((!$seconddiv) && ($count >= $firstthird)) {              if ((!$seconddiv) && ($count >= $firstthird)) {
                 $r->print('</div>'."\n".'<div class="LC_left_float">'."\n");                  $r->print('</div>'."\n".'<div class="LC_left_float">'."\n");
Line 324  sub display_choices { Line 353  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" />');
     }      }

Removed from v.1.8.2.2  
changed lines
  Added in v.1.12


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>