Diff for /loncom/interface/domainprefs.pm between versions 1.152 and 1.153

version 1.152, 2011/08/10 14:54:42 version 1.153, 2011/08/15 05:16:30
Line 399  sub handler { Line 399  sub handler {
                 &Apache::loncommon::sorted_inst_types($dom);                  &Apache::loncommon::sorted_inst_types($dom);
             $js = &lonbalance_targets_js($dom,$types,\%servers).              $js = &lonbalance_targets_js($dom,$types,\%servers).
                   &new_spares_js().                    &new_spares_js().
                   &common_domprefs_js();                    &common_domprefs_js().
                     &Apache::loncommon::javascript_array_indexof();
         }          }
         &Apache::lonconfigsettings::display_settings($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,$js);          &Apache::lonconfigsettings::display_settings($r,$dom,$phase,$context,\@prefs_order,\%prefs,\%domconfig,$confname,$js);
     } else {      } else {
Line 2762  sub print_loadbalancing { Line 2763  sub print_loadbalancing {
     if (ref($types) eq 'ARRAY') {      if (ref($types) eq 'ARRAY') {
         $rownum += scalar(@{$types});          $rownum += scalar(@{$types});
     }      }
     my $css_class = 'class="LC_odd_row"';      my $css_class = ' class="LC_odd_row"';
     my $targets_div_style = 'display: none';      my $targets_div_style = 'display: none';
     my $disabled_div_style = 'display: block';      my $disabled_div_style = 'display: block';
     my $homedom_div_style = 'display: none';      my $homedom_div_style = 'display: none';
Line 2835  sub print_loadbalancing { Line 2836  sub print_loadbalancing {
     $datatable .= '</div></td></tr>'.      $datatable .= '</div></td></tr>'.
                   &loadbalancing_rules($dom,$intdom,$currrules,$othertitle,                    &loadbalancing_rules($dom,$intdom,$currrules,$othertitle,
                                        $usertypes,$types,\%servers,$currbalancer,                                         $usertypes,$types,\%servers,$currbalancer,
                                        $targets_div_style,$homedom_div_style);                                         $targets_div_style,$homedom_div_style,$css_class);
     $$rowtotal += $rownum;      $$rowtotal += $rownum;
     return $datatable;      return $datatable;
 }  }
   
 sub loadbalancing_rules {  sub loadbalancing_rules {
     my ($dom,$intdom,$currrules,$othertitle,$usertypes,$types,$servers,      my ($dom,$intdom,$currrules,$othertitle,$usertypes,$types,$servers,
         $currbalancer,$targets_div_style,$homedom_div_style) = @_;          $currbalancer,$targets_div_style,$homedom_div_style,$css_class) = @_;
     my $output;      my $output;
     my ($alltypes,$othertypes,$titles) =       my ($alltypes,$othertypes,$titles) = 
         &loadbalancing_titles($dom,$intdom,$usertypes,$types);          &loadbalancing_titles($dom,$intdom,$usertypes,$types);
Line 2859  sub loadbalancing_rules { Line 2860  sub loadbalancing_rules {
             }              }
             $output .= &loadbalance_rule_row($type,$titles->{$type},$current,              $output .= &loadbalance_rule_row($type,$titles->{$type},$current,
                                              $servers,$currbalancer,$dom,                                               $servers,$currbalancer,$dom,
                                              $targets_div_style,$homedom_div_style);                                               $targets_div_style,$homedom_div_style,$css_class);
         }          }
     }      }
     return $output;      return $output;
Line 2897  sub loadbalancing_titles { Line 2898  sub loadbalancing_titles {
   
 sub loadbalance_rule_row {  sub loadbalance_rule_row {
     my ($type,$title,$current,$servers,$currbalancer,$dom,$targets_div_style,      my ($type,$title,$current,$servers,$currbalancer,$dom,$targets_div_style,
         $homedom_div_style) = @_;          $homedom_div_style,$css_class) = @_;
     my @rulenames = ('default','homeserver');      my @rulenames = ('default','homeserver');
     my %ruletitles = &offloadtype_text();      my %ruletitles = &offloadtype_text();
     if ($type eq '_LC_external') {      if ($type eq '_LC_external') {
Line 2910  sub loadbalance_rule_row { Line 2911  sub loadbalance_rule_row {
         $style = $homedom_div_style;          $style = $homedom_div_style;
     }      }
     my $output =       my $output = 
         '<tr><td valign="top"><div id="balanceruletitle_'.$type.'" style="'.$style.'">'.$title.'</div></td>'."\n".          '<tr'.$css_class.'><td valign="top"><div id="balanceruletitle_'.$type.'" style="'.$style.'">'.$title.'</div></td>'."\n".
         '<td><div id="balancerule_'.$type.'" style="'.$style.'">'."\n";          '<td><div id="balancerule_'.$type.'" style="'.$style.'">'."\n";
     for (my $i=0; $i<@rulenames; $i++) {      for (my $i=0; $i<@rulenames; $i++) {
         my $rule = $rulenames[$i];          my $rule = $rulenames[$i];

Removed from v.1.152  
changed lines
  Added in v.1.153


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