Ignore:
Timestamp:
08/07/12 18:26:33 (12 years ago)
Author:
nanardon
Message:

Add filter to object list

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/LATMOS-Accounts-Web/root/html/request/default.tt

    r971 r1107  
    55[% IF select_object %] 
    66<form action="[% c.uri_for('/request', accreq.id) %]"> 
    7 <select name="obj" id="obj"> 
    8 <option value="">--</option> 
    9 [% FOREACH objname = c.model('accounts').db.list_objects(accreq.get_attributes('oType')) %] 
    10 <option value="[% objname | html %]">[% objname | html %]</option> 
    11 [% END %] 
    12 </select> 
     7<input name=q value="[% c.req.param('q') | html %]" id="q"><br> 
     8 
     9<span style="display:none" id="list_objects_ind">Searching...</span> 
     10[% c.prototype.observe_field('q', { 
     11    url => c.uri_for('/ajax', 'select_objects_list', ofilter.otype), 
     12    with   => "'q='+value", 
     13    update => 'list_objects', 
     14    frequency => 1, 
     15    before => "document.getElementById('list_objects_ind').style.display='block';", 
     16    loaded => "document.getElementById('list_objects_ind').style.display='none';", 
     17}) %] 
     18 
     19<div id="list_objects"> 
     20[% INCLUDE 'includes/select_objects_list.tt' %] 
     21</div> 
    1322 
    1423[% c.prototype.observe_field( 'obj', 
Note: See TracChangeset for help on using the changeset viewer.