Changeset 838


Ignore:
Timestamp:
2008-11-26 14:07:36 (4 years ago)
Author:
freya
Message:
 
Location:
trunk
Files:
2 added
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/samples/kauri-forms-sample/src/main/kauri/templates/data/sample-detail.xml

    r819 r838  
    99     
    1010    <ktl:include src="module:/templates/css.xml"/> 
    11      
    12     <ktl:include src="service:/jqgrid/templates/macro/jqgrid.xml"/> 
    1311     
    1412    <script type="text/javascript" src="${publicUri('service:/jquery/jquery.js')}"></script> 
     
    1614    <script type="text/javascript" src="${publicUri('service:/forms/kauri-forms.js')}"></script> 
    1715     
     16    <ktl:include src="service:/jqgrid/templates/snippet/jqgrid.xml"/> 
    1817     
    19     <ktl:callMacro name="jqgrid-header"/> 
    20      
    21     <t:variable name="contacts" src="service:/data/contact/"/> 
    22       
     18    <t:variable name="imgpath" value="${publicUri('service:/jqgrid/themes/basic/images')}"/> 
    2319     
    2420    <script type="text/javascript"> 
    2521      var fconf = <ktl:include src="module:/templates/data/sample-form-config.xml" mode="txt" /> 
    2622       
    27         
    28        
    2923      <![CDATA[ 
    30         var items = ${contacts};     
     24        var imgpath= '${imgpath}';   
    3125         
    32         var colHeaders = ['ID','vindt maandagen OK', 'e-mail','aantal vriendjes']; 
    33            
    34         var colModel =  [  
     26        var colHeaders = ['ID','vindt maandagen OK', 'e-mail','aantal vriendjes']; 
     27           
     28        var colModel =  [  
    3529                {name:'id',index:'id', width:55},  
    3630                {name:'mondaysok',index:'mondaysok'}, 
    37                 {name:'email',index:'email', width:90},  
     31                {name:'email',index:'email', width:90},  
    3832                {name:'friendscount',index:'friendscount'} 
    3933                ]; 
    4034 
    41         var colFilter  = ['id','mondaysok', 'email','friendscount'];     
    42          
    43         var rows;     
    44            
     35        var colFilter  = ['id','mondaysok', 'email','friendscount'];     
     36         
     37        var rows;     
     38           
    4539        jQuery(document).ready(function(){ 
    4640            var detailForm = new jQuery.org.kauriproject.forms.Form("detail", fconf); 
     
    4943                colNames: colHeaders, 
    5044                colModel: colModel, 
     45                imgpath: imgpath, 
    5146                viewrecords: true, 
    52                 imgpath: pathtothemes+'/basic/images', 
    5347                caption: 'Sample grid', 
    5448                onSelectRow: function(nr){ 
    55                     detailForm.setWireValue(rows[nr]); 
     49                    detailForm.setWireValue(rows[nr]); 
    5650                }, 
    5751                pager: jQuery('#pager'),  
    5852                rowNum:10,  
    59                 rowList:[10,20,30],      
    60                 sortname:"id",           
     53                rowList:[10,20,30],      
     54                sortname:"id",           
    6155                datatype: function(postdata){ 
    6256                    $.ajax({ 
     
    6761                            if (stat == "success") { 
    6862                                var thegrid = jQuery("#grid")[0]; 
    69                                 thegrid.addJSONData(gridify(jsondata.responseText, colFilter)); 
     63                                thegrid.addJSONData(convertToGrid(jsondata.responseText, colFilter)); 
    7064                            } 
    7165                        } 
     
    7367                } 
    7468             
    75             });  
     69            });  
    7670             
    7771             
Note: See TracChangeset for help on using the changeset viewer.