1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78
|
<script type="text/javascript">
var gridimgpath = 'themes/steel/images';
$(document).ready(function(){
$("#list10").jqGrid({
url:'master.php?q=2&ids='+ids,
datatype: "xml",
colNames:['reference', 'composant', 'libelle', 'version', 'quantite','debut','fin'],
colModel:[
{name:'reference',index:'reference', width:90},
{name:'composant',index:'composant', width:90},
{name:'libelle',index:'libelle', width:200},
{name:'version',index:'version', width:80, align:"right"},
{name:'quantite',index:'quantite', width:80, align:"right"},
{name:'debut',index:'debut', width:80,align:"right"},
{name:'fin',index:'fin', width:80, sortable:false}
],
rowNum:7,
rowList:[10,20,30],
imgpath: gridimgpath,
pager: $('#pager10'),
sortname: 'composant',
viewrecords: true,
sortorder: "asc",
multiselect: false,
<!-- subGridUrl: 'detail.php?q=2', -->
datatype: "xml",
<!-- subGridModel: [{ name : ['reference','version','operation','cfi','execution'], width : [55,200,80,80,80] } ], -->
caption: "Nomenclature",
}).navGrid('#pager11',{add:false,edit:false,del:false});
onSelectRow: (function(ids) {
if(ids == null) {
ids=' ';
if($("#list10_d").getGridParam('records') > 0 ) {
$("#list10_d").setGridParam({url:"detail.php?q=1&id="+ids,page:1}).setCaption("Gamme d'\operations: "+composant).trigger('reloadGrid');
}
} else {
$("#list10_d").setGridParam({url:"detail.php?q=1&id="+ids,page:1}).setCaption("Gamme d'\operations: "+ids).trigger('reloadGrid');
}
})
}).navGrid('#pager10',{add:false,edit:false,del:false});
$(document).ready(function(){
$("#list10_d").jqGrid({
height: 120,
url:'detail.php?q=1&id='+ids,
datatype: "xml",
colNames:['reference','version','operation','cfi','preparation','execution'],
colModel:[
{name:'reference',index:'reference', key:true, width:180},
{name:'version',index:'version', width:80},
{name:'operation',index:'operation', width:80, align:"right"},
{name:'cfi',index:'cfi', width:80, align:"right"},
{name:'preparation',index:'preparation', width:80, align:"right"},
{name:'execution',index:'execution', width:80,align:"right", sortable:false, search:false}
],
rowNum:6,
rowList:[5,10,20],
imgpath: gridimgpath,
pager: $('#pager10_d'),
sortname: 'operation',
viewrecords: true,
sortorder: "asc",
multiselect: false,
caption:"Gamme d'\operations"
}).navGrid('#pager10_d',{add:true,edit:false,del:false});
$("#ms1").click( function() {
var s;
s = $("#list10_d").getMultiRow();
alert(s);
})
});
</script> |
Partager