vendredi 30 janvier 2015

if in bootstrap table plugin

i used bootstrap table plugin ( http://ift.tt/1JMaSrl )


i have 'Status' field in database


i wand Status is '0' has info (color row is blue), '1' has success(color row is green), '-1' has error(color row is red)


code



<table id="bargain-tbl"></table>

<script>
$(function () {

$('#bargain-tbl').bootstrapTable({

url: "<?php echo $this->createUrl('admanage/JsonBargainDada',array('codeA'=>$_GET['codeA'],'codeB'=>$_GET['codeB'])) ?>",
cache: false,
striped: true,
pagination: true,
pageSize: 10,
pageList: [10, 25, 50, 100],
showToggle: true,
search: true,
showColumns: true,
showRefresh: true,
minimumCountColumns: 1,
clickToSelect: true,
selectItemName: 'barginSelect',
undefinedText:'تعیین نشده',
showPaginationSwitch:true,
toolbarAlign:'left',
checkbox:true,
columns: [ {
field: 'key_uuid',
title: 'انتخلب',
align: 'center',
checkbox: true,

},{
field: 'email',
title: 'ایمیل',
align: 'center',
valign: 'bottom',
sortable: true,

},{
field: 'tel',
title: 'شماهره همراه',
align: 'center',
valign: 'middle',
sortable: true,
}, {
field: 'price',
title: 'قیمت پیشنهادی',
align: 'center',
valign: 'top',
sortable: true,
}, {
field: 'created_datetime',
title: 'تاریخ در خواست',
align: 'center',
valign: 'middle',
clickToSelect: false,
}]
});
});

</script>

Aucun commentaire:

Enregistrer un commentaire