Skip to content

Commit e4b9734

Browse files
committed
Force text renderen in datatables
1 parent 4d3e3a3 commit e4b9734

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

views/location_listing.php

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
12
<?php $this->view('partials/head'); ?>
23

34
<div class="container">
@@ -50,7 +51,7 @@
5051

5152
$('.table th').map(function(){
5253

53-
columnDefs.push({name: $(this).data('colname'), targets: col});
54+
columnDefs.push({name: $(this).data('colname'), targets: col, render: $.fn.dataTable.render.text()});
5455

5556
if($(this).data('sort')){
5657
mySort.push([col, $(this).data('sort')])
@@ -92,9 +93,9 @@
9293
columnDefs: columnDefs,
9394
createdRow: function( nRow, aData, iDataIndex ) {
9495
// Update name in first column to link
95-
var name=$('td:eq(0)', nRow).html();
96+
var name=$('td:eq(0)', nRow).text();
9697
if(name == ''){name = "No Name"};
97-
var sn=$('td:eq(1)', nRow).html();
98+
var sn=$('td:eq(1)', nRow).text();
9899
var link = mr.getClientDetailLink(name, sn, '#tab_location-tab');
99100
$('td:eq(0)', nRow).html(link);
100101

0 commit comments

Comments
 (0)