Changeset 838
Legend:
- Unmodified
- Added
- Removed
-
trunk/samples/kauri-forms-sample/src/main/kauri/templates/data/sample-detail.xml
r819 r838 9 9 10 10 <ktl:include src="module:/templates/css.xml"/> 11 12 <ktl:include src="service:/jqgrid/templates/macro/jqgrid.xml"/>13 11 14 12 <script type="text/javascript" src="${publicUri('service:/jquery/jquery.js')}"></script> … … 16 14 <script type="text/javascript" src="${publicUri('service:/forms/kauri-forms.js')}"></script> 17 15 16 <ktl:include src="service:/jqgrid/templates/snippet/jqgrid.xml"/> 18 17 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')}"/> 23 19 24 20 <script type="text/javascript"> 25 21 var fconf = <ktl:include src="module:/templates/data/sample-form-config.xml" mode="txt" /> 26 22 27 28 29 23 <![CDATA[ 30 var i tems = ${contacts};24 var imgpath= '${imgpath}'; 31 25 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 = [ 35 29 {name:'id',index:'id', width:55}, 36 30 {name:'mondaysok',index:'mondaysok'}, 37 {name:'email',index:'email', width:90},31 {name:'email',index:'email', width:90}, 38 32 {name:'friendscount',index:'friendscount'} 39 33 ]; 40 34 41 var colFilter = ['id','mondaysok', 'email','friendscount']; 42 43 var rows;44 35 var colFilter = ['id','mondaysok', 'email','friendscount']; 36 37 var rows; 38 45 39 jQuery(document).ready(function(){ 46 40 var detailForm = new jQuery.org.kauriproject.forms.Form("detail", fconf); … … 49 43 colNames: colHeaders, 50 44 colModel: colModel, 45 imgpath: imgpath, 51 46 viewrecords: true, 52 imgpath: pathtothemes+'/basic/images',53 47 caption: 'Sample grid', 54 48 onSelectRow: function(nr){ 55 detailForm.setWireValue(rows[nr]);49 detailForm.setWireValue(rows[nr]); 56 50 }, 57 51 pager: jQuery('#pager'), 58 52 rowNum:10, 59 rowList:[10,20,30], 60 sortname:"id", 53 rowList:[10,20,30], 54 sortname:"id", 61 55 datatype: function(postdata){ 62 56 $.ajax({ … … 67 61 if (stat == "success") { 68 62 var thegrid = jQuery("#grid")[0]; 69 thegrid.addJSONData( gridify(jsondata.responseText, colFilter));63 thegrid.addJSONData(convertToGrid(jsondata.responseText, colFilter)); 70 64 } 71 65 } … … 73 67 } 74 68 75 });69 }); 76 70 77 71
Note: See TracChangeset
for help on using the changeset viewer.