Ignore:
Timestamp:
09/15/12 08:52:16 (12 years ago)
Author:
nanardon
Message:

Merge branch 'dyngroup'

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/lib/LATMOS/Accounts/Web/Controller/Ajax.pm

    r1107 r1135  
    4646 
    4747sub displayattr : Local { 
    48     my ($self, $c, $otype) = @_; 
    49     my $attribute = $c->model('Accounts')->db->attribute($otype, 
    50         $c->req->param('attr')) or return; 
     48    my ($self, $c, $otype, $attr) = @_; 
     49    $attr ||= $c->req->param('attr'); 
     50    my $attribute = $c->model('Accounts')->db->attribute($otype, $attr) or return; 
    5151    $c->stash->{value} = $attribute->display($c->req->param('id')); 
    5252} 
     
    5656 
    5757    my $base = $c->model('Accounts')->db; 
    58     my $val = $c->req->param('val'); 
    59     $c->stash->{'complete'} = $c->prototype->auto_complete_result([ 
     58    my $val = $c->req->param('val') || ''; 
     59    $c->stash->{values} = [ 
     60        sort 
    6061        grep { /^\Q$val\E/ } $base->attributes_summary($otype, $attr) 
    61     ]); 
     62    ]; 
    6263 
    6364} 
Note: See TracChangeset for help on using the changeset viewer.