I believe I had it correct, but for some reason with this, whenever I select an cell it always call the PREVIOUS cell selected instead of the current one I selected.
|
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 |
$('#PlayerInformation').jqGrid({ url:DateFile+'Data.php?G=PullAlliance&Svr='+$('#SvrName').val()+'&A='+$('#AllianceList').val()+'&St='+$('#Te').val()+'|'+$('#Qu').val(), datatype:'json',altRows:true,hoverrows:true,height:495,loadonce:true,ignoreCase:true, recordtext:'{1} of {2}',pager:'#PlayerInfoPager',viewrecords:true,rowNum:100,rowList:[25,50,100,150,200],emptyrecords:'Crap!', colModel:[ {label:'',name:'I',width:0,align:'left',sortable:false,hidden:true}, {label:' ',name:'FA',width:18,align:'center',sortable:false,title:false,formatter:function(cellvalue,options,rowObject){ return '<div class="ui-icon ui-icon-newwin"></div>'}}, {label:'Player',name:'P',width:74,align:'left',sortable:true,sorttype:'text',title:false}, {label:'X,Y',name:'X',width:44,align:'left',sortable:true,sorttype:'text',title:false,formatter:function(cellvalue,options,rowObject){ return (cellvalue % 800)+','+parseInt(cellvalue / 800); }}, {label:'Castle',name:'C',width:74,align:'left',sortable:true,sorttype:'text',title:false}, {label:'Flag',name:'F',width:30,align:'left',sortable:true,sorttype:'text',title:false}, {label:'Prestige',name:'Pr',width:75,align:'left',sortable:true,sorttype:'int',title:false,formatter:'integer',formatoptions:{thousandsSeparator:','}}, {label:'S',name:'S',width:18,align:'center',sortable:true,sorttype:'text',title:false,formatter:'select',editoptions:{value:'1:P;2:T;3:B;4:D;5:H',defaultValue:'P'}}, {label:'Loc',name:'L',width:25,align:'center',sortable:true,sorttype:'text',title:false} ], loadComplete: function(){ $('#AllPlaTitle').empty().html('Alliance Status for '+$('#AllianceList').val()+ ' [ '+$(this).jqGrid('getGridParam','records')+' Castles ]'); }, onCellSelect:function(iRow,iCol,iCel){ var BliDot = ''; switch(iCol){ case 1: BliDot = $(this).jqGrid('getCell',$(this).jqGrid('getGridParam','selrow'),'P'); $('[name="Dot^"]').removeClass('Pulser'); $('[name="Dot^'+BliDot+'"]').addClass('Pulser').effect('pulsate',{times:10},2000,SDefault); function SDefault(){ setTimeout(function(){ $('[name="Dot^'+BliDot+'"]').removeClass('Pulser'); }) }; break; case 2: BliDot = $(this).jqGrid('getCell',$(this).jqGrid('getGridParam','selrow'),'I'); $('[id="Dot^"]').removeClass('Pulser'); $('[id="Dot^'+BliDot+'"]').addClass('Pulser').effect('pulsate',{times:10},2000,SDefault).mouseover(); function SDefault(){ setTimeout(function(){ $('[id="Dot^'+BliDot+'"]').removeClass('Pulser').mouseout(); }) }; break; } } }) .navGrid('#PlayerInfoPager',{resize:false,add:false,search:false,del:false,refresh:true,edit:false}); |
Copyright 2014 TriRand LtdAll Rights ReservedRSS
Back to Top