Changeset 1422

Show
Ignore:
Timestamp:
17/12/09 16:32:40 (3 months ago)
Author:
bruno
Message:

Solving the mistery of the hidden inputs: Kauri was actually creating new inputs inside these inputs, and changing that made some ".parentNode" logic in time.js fail.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • tupper/trunk/tupper-site/src/main/kauri/pages/{user}/time..xml

    r1421 r1422  
    152152                                    </tr> 
    153153                                    <tr kauri-role="layout"> 
    154                                         <input type="hidden" class="task_id" kauri-idref="taskid" kauri-type="integer" 
    155                                                kauri-control="input-hidden"/> 
    156                                         <input type="hidden" class="performance_empl" kauri-idref="employee" 
    157                                             kauri-type="string" kauri-control="input-hidden"/> 
    158                                         <input type="hidden" class="week" kauri-idref="week" 
    159                                             kauri-type="string" kauri-control="input-hidden"/> 
     154                                        <td> 
     155                                            <!-- These are some row-level hidden fields which we put here 
     156                                                 in the first cell --> 
     157                                            <input type="text" class="task_id" kauri-idref="taskid" kauri-type="integer" 
     158                                                   kauri-control="input-hidden"/> 
     159                                            <input type="text" class="performance_empl" kauri-idref="employee" 
     160                                                kauri-type="string" kauri-control="input-hidden"/> 
     161                                            <input type="text" class="week" kauri-idref="week" 
     162                                                kauri-type="string" kauri-control="input-hidden"/> 
     163 
     164                                            <a href="#" class="new_performance_button">--</a> 
     165                                            <input type="text" kauri-idref="customer" kauri-type="string" 
     166                                                   kauri-control="input-hidden"/> 
     167                                        </td> 
    160168                                        <td> 
    161169                                            <a href="#" class="new_performance_button">--</a> 
    162                                             <input type="hidden" kauri-idref="customer" kauri-type="string" 
     170                                            <input type="text" kauri-idref="project" kauri-type="string" 
    163171                                                   kauri-control="input-hidden"/> 
    164172                                        </td> 
    165173                                        <td> 
    166174                                            <a href="#" class="new_performance_button">--</a> 
    167                                             <input type="hidden" kauri-idref="project" kauri-type="string" 
    168                                                    kauri-control="input-hidden"/> 
    169                                         </td> 
    170                                         <td> 
    171                                             <a href="#" class="new_performance_button">--</a> 
    172                                             <input type="hidden" kauri-idref="task" kauri-type="string" 
     175                                            <input type="text" kauri-idref="task" kauri-type="string" 
    173176                                                   kauri-control="input-hidden"/> 
    174177                                        </td> 
  • tupper/trunk/tupper-site/src/main/kauri/static/js/time.js

    r1419 r1422  
    303303    hiddenCustomer.valueChanged(function(){ 
    304304        var value = hiddenCustomer.getValue(); 
    305         $($($(hiddenCustomer.getElement()).get(0).parentNode.parentNode).children()[0]).html(value); 
     305        $(".new_performance_button", hiddenCustomer.getElement().get(0).parentNode).html(value); 
    306306    }); 
    307307    var hiddenProject = child.findControl("project"); 
    308308    hiddenProject.valueChanged(function(){ 
    309309        var value = hiddenProject.getValue(); 
    310         $($($(hiddenProject.getElement()).get(0).parentNode.parentNode).children()[0]).html(value); 
     310        $(".new_performance_button", hiddenProject.getElement().get(0).parentNode).html(value); 
    311311    }); 
    312312    var hiddenTask = child.findControl("task"); 
    313313    hiddenTask.valueChanged(function(){ 
    314314        var value = hiddenTask.getValue(); 
    315         $($($(hiddenTask.getElement()).get(0).parentNode.parentNode).children()[0]).html(value); 
     315        $(".new_performance_button", hiddenTask.getElement().get(0).parentNode).html(value); 
    316316    }); 
    317317}