Changeset 236 for server


Ignore:
Timestamp:
12/30/10 14:22:56 (13 years ago)
Author:
nanardon
Message:
  • replace the form-observer based on timer by onChange functions
Location:
server/trunk/web/root/templates/html
Files:
5 edited

Legend:

Unmodified
Added
Removed
  • server/trunk/web/root/templates/html/ajax/forms/distribselect.tt

    r77 r236  
    11<!-- $Id$ --> 
    22 
     3<script> 
     4function upd_distrib_sel() { 
     5    var serial = Form.serialize('[% form %]'); 
     6    new Ajax.Updater( 
     7        'distrib_sel', 
     8        '[% c.uri_for('/ajax/forms/distribselect', { ajax=> 1}) %]', { parameters: serial ,asynchronous: 1 } );     
     9} 
     10</script> 
     11 
     12<span id="distrib_sel"> 
    313[% FOREACH dist = c.forward('/distrib/list', []) %] 
    414[% IF loop.first %] 
    5 <select name="distribution"> 
     15<select name="distribution" onChange="upd_distrib_sel()"> 
    616<option value="">--</option> 
    717[% END %] 
     
    2131]) %] 
    2232[% IF loop.first %] 
    23 <select name="release"> 
     33<select name="release" onChange="upd_distrib_sel()"> 
    2434<option value="">--</option> 
    2535[% END %] 
     
    4151]) %] 
    4252[% IF loop.first %] 
    43 <select name="arch"> 
     53<select name="arch" onChange="upd_distrib_sel()"> 
    4454<option value="">--</option> 
    4555[% END %] 
     
    5464 
    5565[% END %] 
     66</span> 
  • server/trunk/web/root/templates/html/chat/index.html

    r225 r236  
    44    <form id="botform" action="[% c.uri_for('/chat') %]"> 
    55            <div id="distribselect"> 
    6             [% INCLUDE 'ajax/forms/distribselect.tt' %] 
     6            [% INCLUDE 'ajax/forms/distribselect.tt' form = 'botform' %] 
    77            </div> 
    8             [% c.prototype.observe_form('botform', 
    9             { 
    10             url => c.uri_for('/ajax/forms/distribselect', { 
    11             'ajax' => 1 }), 
    12             frequency => 2, 
    13             update => 'distribselect', 
    14             } 
    15             ) %] 
    168        <input name="cmd" value="[% c.req.param('cmd') | html %]"> 
    179        <input type="submit"> 
  • server/trunk/web/root/templates/html/explorer/index.html

    r230 r236  
    22<form action="[% c.uri_for('/', c.req.path) %]" id="explorer_d" method="POST"> 
    33    <span id="distribselect"> 
    4     [% INCLUDE 'ajax/forms/distribselect.tt' %] 
     4    [% INCLUDE 'ajax/forms/distribselect.tt' form = 'explorer_d' %] 
    55    </span> 
    66    <input type="submit" value="Update view..."> 
    77</form> 
    8 [% c.prototype.observe_form('explorer_d', 
    9     { 
    10     url => c.uri_for('/ajax/forms/distribselect', { 'ajax' => 1 }), 
    11     frequency => 2, 
    12     update => 'distribselect', 
    13     } 
    14 ) %] 
    158 
    169<div id="explorer_form"> 
  • server/trunk/web/root/templates/html/rpms/analyse.html

    r230 r236  
    77<form id="analysis_form" action="[% c.uri_for('/', c.req.path) %]" method="POST"> 
    88    <span id="distribselect"> 
    9     [% INCLUDE 'ajax/forms/distribselect.tt' %] 
     9    [% INCLUDE 'ajax/forms/distribselect.tt' form = 'analysis_form' %] 
    1010    </span> 
    11     [% c.prototype.observe_form('analysis_form', 
    12     { 
    13         url => c.uri_for('/ajax/forms/distribselect', { 'ajax' => 1 }), 
    14         frequency => 2, 
    15         update => 'distribselect', 
    16     } 
    17     ) %]  
    1811    <input type="submit" name="analyse"> 
    1912</form> 
  • server/trunk/web/root/templates/html/search/adv_search.tt

    r204 r236  
    1111    <td> 
    1212    <span id="distribselect"> 
    13     [% INCLUDE 'ajax/forms/distribselect.tt' %] 
     13    [% INCLUDE 'ajax/forms/distribselect.tt' form = 'sophie_adv_search' %] 
    1414    </span> 
    15     [% c.prototype.observe_form('sophie_adv_search', 
    16             { 
    17             url => c.uri_for('/ajax/forms/distribselect', { 
    18                 'ajax' => 1 }), 
    19             frequency => 2, 
    20             update => 'distribselect', 
    21             } 
    22             ) %] 
    2315    </td> 
    2416</tr> 
Note: See TracChangeset for help on using the changeset viewer.