datatable fixed decodeuri
This commit is contained in:
+17
-4
@@ -856,15 +856,29 @@ Request.JSONF = function(options){//oke
|
||||
$(vars.data).map(function(key, item){
|
||||
var keyval = item.split("=");
|
||||
if (keyval[0] == 'SID') keyval[1] = parseInt(Math.random() * 99999999);
|
||||
if (keyval[0] == 'Cari_Jual') keyval[1] = decodeURI(keyval[1]);
|
||||
if ((''+keyval[1]).indexOf('%20') != -1) keyval[1] = decodeURI(keyval[1]);
|
||||
return post_data[keyval[0]] = keyval[1];
|
||||
});
|
||||
opsi.serverSide = true;
|
||||
opsi.ajax = {
|
||||
url: vars.url,
|
||||
type: 'POST',
|
||||
dataType: 'json',
|
||||
cache: false,
|
||||
data: post_data,
|
||||
/*success: function(){
|
||||
var _lmenu = [];
|
||||
$.each([10,25,50], function(key, val){
|
||||
if (val > ini.content.length) return false;
|
||||
_lmenu.push(val);
|
||||
});
|
||||
if (10 > ini.content.length){
|
||||
opsi.lengthMenu.push([10],[10]);
|
||||
}else{
|
||||
_lmenu.push(-1), opsi.lengthMenu.push(_lmenu), _lmenu.pop();
|
||||
_lmenu.push(ini.content.length), opsi.lengthMenu.push(_lmenu);
|
||||
}
|
||||
},*/
|
||||
dataFilter: function(data){
|
||||
var json = jQuery.parseJSON(data), jsono = {};
|
||||
jsono.draw = json[0].draw;
|
||||
@@ -944,9 +958,8 @@ Request.JSONF = function(options){//oke
|
||||
if (ini.navi.button) $('#'+ini.id+'Tabel_wrapper div.toolbar').html(_navibar);
|
||||
}
|
||||
opsi.drawCallback = function(settings){
|
||||
/*var api = this.api();
|
||||
console.log( api.rows( {page:'current'} ).data() );
|
||||
console.log( settings );*/
|
||||
//var api = this.api();
|
||||
//console.log( api.rows( {page:'current'} ).data() );
|
||||
}
|
||||
|
||||
var otabel = $('#'+ini.id+'Tabel').DataTable(opsi);
|
||||
|
||||
Reference in New Issue
Block a user