table footer missing of last column
This commit is contained in:
+30
-34
@@ -27,7 +27,7 @@ var FoniaJS = {
|
|||||||
deflocal: "",
|
deflocal: "",
|
||||||
_debug: (jQuery.inArray(location.hostname, ["localhost","127.0.0.1"]) !== -1) ? true : false,
|
_debug: (jQuery.inArray(location.hostname, ["localhost","127.0.0.1"]) !== -1) ? true : false,
|
||||||
|
|
||||||
setConfig: function(key, skey) {//oke
|
setConfig: function(key, skey) {
|
||||||
var _hasil, _adata = null;
|
var _hasil, _adata = null;
|
||||||
if (typeof(key) === 'string' && key !== '') {
|
if (typeof(key) === 'string' && key !== '') {
|
||||||
_hasil = $.base64.decode(key);
|
_hasil = $.base64.decode(key);
|
||||||
@@ -50,15 +50,15 @@ var FoniaJS = {
|
|||||||
this.User.Level = parseInt(_adata[3]);
|
this.User.Level = parseInt(_adata[3]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
user_level: function(l) {//oke
|
user_level: function(l) {
|
||||||
if (this.User.Level <= (l ?? 9)) return true;
|
if (this.User.Level <= (l ?? 9)) return true;
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
user_level_not: function(l) {//oke
|
user_level_not: function(l) {
|
||||||
if (this.User.Level !== (l ?? 9)) return true;
|
if (this.User.Level !== (l ?? 9)) return true;
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
callMenu: function(p, q) {//oke
|
callMenu: function(p, q) {
|
||||||
var apar = ["p=" + p];
|
var apar = ["p=" + p];
|
||||||
if (q != null) apar.push("q=" + q);
|
if (q != null) apar.push("q=" + q);
|
||||||
new Request.JSON({
|
new Request.JSON({
|
||||||
@@ -102,7 +102,7 @@ var FoniaJS = {
|
|||||||
}).send();
|
}).send();
|
||||||
},
|
},
|
||||||
|
|
||||||
loadMenu: function() {//oke
|
loadMenu: function() {
|
||||||
$(".mlink").click(function(e){
|
$(".mlink").click(function(e){
|
||||||
var sbar = $(this).closest('#sidebarMain');
|
var sbar = $(this).closest('#sidebarMain');
|
||||||
var linkid = $(this).attr('id').replace("Link", "");
|
var linkid = $(this).attr('id').replace("Link", "");
|
||||||
@@ -136,14 +136,14 @@ var FoniaJS = {
|
|||||||
}.bind(this));
|
}.bind(this));
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
showInfo: function(message, wtime) {//oke
|
showInfo: function(message, wtime) {
|
||||||
var _tmpto = $('<div class="toast align-items-center text-white bg-info border-0" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="'+(wtime?wtime:3000)+'"><div class="d-flex"><div class="toast-body me-2">'+message+'</div><button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button></div></div>').appendTo('#div-toast');
|
var _tmpto = $('<div class="toast align-items-center text-white bg-info border-0" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="'+(wtime?wtime:3000)+'"><div class="d-flex"><div class="toast-body me-2">'+message+'</div><button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button></div></div>').appendTo('#div-toast');
|
||||||
_tmpto.on('hidden.bs.toast', function(e){
|
_tmpto.on('hidden.bs.toast', function(e){
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
});
|
});
|
||||||
(new bootstrap.Toast(_tmpto)).show();
|
(new bootstrap.Toast(_tmpto)).show();
|
||||||
},
|
},
|
||||||
showError: function(message, wtime) {//oke
|
showError: function(message, wtime) {
|
||||||
var _tmpto = $('<div class="toast align-items-center text-white bg-danger border-0" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="'+(wtime?wtime:3000)+'"><div class="d-flex"><div class="toast-body me-2">'+message+'</div><button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button></div></div>').appendTo('#div-toast');
|
var _tmpto = $('<div class="toast align-items-center text-white bg-danger border-0" role="alert" aria-live="assertive" aria-atomic="true" data-bs-delay="'+(wtime?wtime:3000)+'"><div class="d-flex"><div class="toast-body me-2">'+message+'</div><button type="button" class="btn-close me-2 m-auto" data-bs-dismiss="toast" aria-label="Close"></button></div></div>').appendTo('#div-toast');
|
||||||
_tmpto.on('hidden.bs.toast', function(e){
|
_tmpto.on('hidden.bs.toast', function(e){
|
||||||
$(this).remove();
|
$(this).remove();
|
||||||
@@ -243,7 +243,7 @@ var FoniaJS = {
|
|||||||
}
|
}
|
||||||
}.bind(this));
|
}.bind(this));
|
||||||
},
|
},
|
||||||
genWinToolBut: function(menu) {//oke
|
genWinToolBut: function(menu) {
|
||||||
if (!menu) return '';
|
if (!menu) return '';
|
||||||
var smenu = '';
|
var smenu = '';
|
||||||
if (typeof menu === 'object'){
|
if (typeof menu === 'object'){
|
||||||
@@ -266,7 +266,7 @@ var FoniaJS = {
|
|||||||
}
|
}
|
||||||
return smenu;
|
return smenu;
|
||||||
},
|
},
|
||||||
genToolButton: function(menu) {//oke
|
genToolButton: function(menu) {
|
||||||
if (!menu) return '';
|
if (!menu) return '';
|
||||||
var smenu = '';
|
var smenu = '';
|
||||||
if (typeof menu === 'object'){
|
if (typeof menu === 'object'){
|
||||||
@@ -289,7 +289,7 @@ var FoniaJS = {
|
|||||||
}
|
}
|
||||||
return smenu;
|
return smenu;
|
||||||
},
|
},
|
||||||
FormDecorated: function() {//oke
|
FormDecorated: function() {
|
||||||
$('input').each(function() {
|
$('input').each(function() {
|
||||||
// 16:shift 17:ctrl 18:alt 35:end 36:home 37:left 38:up 39:right 40:down 9:tab 13:enter 27:esc
|
// 16:shift 17:ctrl 18:alt 35:end 36:home 37:left 38:up 39:right 40:down 9:tab 13:enter 27:esc
|
||||||
// 8:backspace 46:delete 45:delete 48-57/96-105:num 110/190:dot 109/189/173:minus 107/187/61:plus
|
// 8:backspace 46:delete 45:delete 48-57/96-105:num 110/190:dot 109/189/173:minus 107/187/61:plus
|
||||||
@@ -332,7 +332,7 @@ var FoniaJS = {
|
|||||||
FoniaJS.showError(tmp_str);
|
FoniaJS.showError(tmp_str);
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
$('.option-tags').each(function() {//oke
|
$('.option-tags').each(function() {
|
||||||
if (!jQuery.isFunction(jQuery.fn.select2)) return;
|
if (!jQuery.isFunction(jQuery.fn.select2)) return;
|
||||||
var _opts = {tags: false, dropdownAutoWidth: true, width: 'auto', theme: 'bootstrap-5'};
|
var _opts = {tags: false, dropdownAutoWidth: true, width: 'auto', theme: 'bootstrap-5'};
|
||||||
var _dmodal = $(this).closest('div.modal');
|
var _dmodal = $(this).closest('div.modal');
|
||||||
@@ -458,14 +458,14 @@ var FoniaJS = {
|
|||||||
}
|
}
|
||||||
return x1 + x2;
|
return x1 + x2;
|
||||||
},
|
},
|
||||||
formatBytes: function(bytes, deci) {//oke
|
formatBytes: function(bytes, deci) {
|
||||||
if (bytes === 0) return '0 Bytes';
|
if (bytes === 0) return '0 Bytes';
|
||||||
const dm = deci ?? 0;
|
const dm = deci ?? 0;
|
||||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||||
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||||
return parseFloat((bytes / Math.pow(1024, i)).toFixed(dm)) + ' ' + sizes[i];
|
return parseFloat((bytes / Math.pow(1024, i)).toFixed(dm)) + ' ' + sizes[i];
|
||||||
},
|
},
|
||||||
showConfirm: function(str_judul, str_isi, func_callback, conf_tipe) {//oke
|
showConfirm: function(str_judul, str_isi, func_callback, conf_tipe) {
|
||||||
var _cfunc = (typeof func_callback == "function") ? func_callback : function() {};
|
var _cfunc = (typeof func_callback == "function") ? func_callback : function() {};
|
||||||
var _ctipe = (conf_tipe == null) ? 'modal-warning' : 'modal-'+conf_tipe;
|
var _ctipe = (conf_tipe == null) ? 'modal-warning' : 'modal-'+conf_tipe;
|
||||||
var _btipe = (conf_tipe == null) ? 'btn-warning' : 'btn-'+conf_tipe;
|
var _btipe = (conf_tipe == null) ? 'btn-warning' : 'btn-'+conf_tipe;
|
||||||
@@ -486,7 +486,7 @@ var FoniaJS = {
|
|||||||
});
|
});
|
||||||
}).modal('show');
|
}).modal('show');
|
||||||
},
|
},
|
||||||
showWindow: function(id_wind, s_judul, s_isi, i_width, s_toolb, f_onload, f_offload, b_scroll) {//oke
|
showWindow: function(id_wind, s_judul, s_isi, i_width, s_toolb, f_onload, f_offload, b_scroll) {
|
||||||
var t_width = '', t_toolb = '', t_scroll = (typeof b_scroll == 'boolean' && b_scroll == false) ? '' : 'modal-dialog-scrollable';
|
var t_width = '', t_toolb = '', t_scroll = (typeof b_scroll == 'boolean' && b_scroll == false) ? '' : 'modal-dialog-scrollable';
|
||||||
var f_oncall = (typeof f_onload == "function") ? f_onload : function(){};
|
var f_oncall = (typeof f_onload == "function") ? f_onload : function(){};
|
||||||
var f_offcall = (typeof f_offload == "function") ? f_offload : function(){};
|
var f_offcall = (typeof f_offload == "function") ? f_offload : function(){};
|
||||||
@@ -519,10 +519,10 @@ var FoniaJS = {
|
|||||||
}).modal('show');
|
}).modal('show');
|
||||||
return '#win'+id_wind;
|
return '#win'+id_wind;
|
||||||
},
|
},
|
||||||
closeWindow: function(elWin) {//oke
|
closeWindow: function(elWin) {
|
||||||
if ($(elWin).length) $(elWin).modal('hide');
|
if ($(elWin).length) $(elWin).modal('hide');
|
||||||
},
|
},
|
||||||
closeAllWindows: function() {//oke
|
closeAllWindows: function() {
|
||||||
$(".modal").each(function() {
|
$(".modal").each(function() {
|
||||||
if ($(this).hasClass('show')) $(this).modal('toggle');
|
if ($(this).hasClass('show')) $(this).modal('toggle');
|
||||||
if ($(this).attr('id')!=='sidebarMain') $(this).modal('dispose').remove();
|
if ($(this).attr('id')!=='sidebarMain') $(this).modal('dispose').remove();
|
||||||
@@ -542,13 +542,13 @@ var FoniaJS = {
|
|||||||
n = n + "";
|
n = n + "";
|
||||||
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
|
return n.length >= width ? n : new Array(width - n.length + 1).join(z) + n;
|
||||||
},
|
},
|
||||||
setCookie: function(cname, cvalue, exdays) {//oke
|
setCookie: function(cname, cvalue, exdays) {
|
||||||
var d = new Date();
|
var d = new Date();
|
||||||
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
||||||
var expires = "expires="+d.toUTCString();
|
var expires = "expires="+d.toUTCString();
|
||||||
document.cookie = 'f' + this.APP_ID + '_' + cname + "=" + cvalue + ";" + expires + ";path=/";
|
document.cookie = 'f' + this.APP_ID + '_' + cname + "=" + cvalue + ";" + expires + ";path=/";
|
||||||
},
|
},
|
||||||
getCookie: function(cname) {//oke
|
getCookie: function(cname) {
|
||||||
var name = 'f' + this.APP_ID + '_' + cname + "=";
|
var name = 'f' + this.APP_ID + '_' + cname + "=";
|
||||||
var ca = document.cookie.split(';');
|
var ca = document.cookie.split(';');
|
||||||
for (var i = 0; i < ca.length; i++) {
|
for (var i = 0; i < ca.length; i++) {
|
||||||
@@ -562,7 +562,7 @@ var FoniaJS = {
|
|||||||
}
|
}
|
||||||
return "";
|
return "";
|
||||||
},
|
},
|
||||||
locale: function(key, oset){//oke
|
locale: function(key, oset){
|
||||||
if (typeof oset === "object") {
|
if (typeof oset === "object") {
|
||||||
this.locales[key] = oset;
|
this.locales[key] = oset;
|
||||||
if (this.deflocal == '') this.deflocal = key;
|
if (this.deflocal == '') this.deflocal = key;
|
||||||
@@ -573,7 +573,7 @@ var FoniaJS = {
|
|||||||
}, this.locales[this.deflocal]);
|
}, this.locales[this.deflocal]);
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
AutoComplete: function(elm, turl, aparam, func_comp, func_key){//oke
|
AutoComplete: function(elm, turl, aparam, func_comp, func_key){
|
||||||
var arrData = [], objComp = {};
|
var arrData = [], objComp = {};
|
||||||
if ('string' !== typeof aparam) arrData = this.RequestParam(aparam);
|
if ('string' !== typeof aparam) arrData = this.RequestParam(aparam);
|
||||||
objComp = {
|
objComp = {
|
||||||
@@ -629,7 +629,7 @@ var Request = function(options){
|
|||||||
this.construct(options);
|
this.construct(options);
|
||||||
};
|
};
|
||||||
|
|
||||||
Request.JSON = function(options){//oke
|
Request.JSON = function(options){
|
||||||
var vars = {
|
var vars = {
|
||||||
url: "",
|
url: "",
|
||||||
sendParam: [],
|
sendParam: [],
|
||||||
@@ -661,7 +661,7 @@ Request.JSON = function(options){//oke
|
|||||||
this.construct(options);
|
this.construct(options);
|
||||||
};
|
};
|
||||||
|
|
||||||
Request.JSONF = function(options){//oke
|
Request.JSONF = function(options){
|
||||||
var vars = {
|
var vars = {
|
||||||
url: "",
|
url: "",
|
||||||
sendParam: [],
|
sendParam: [],
|
||||||
@@ -703,7 +703,7 @@ Request.JSONF = function(options){//oke
|
|||||||
return this;
|
return this;
|
||||||
};
|
};
|
||||||
|
|
||||||
var show_msg = function(ini){//oke
|
var show_msg = function(ini){
|
||||||
var wtime = parseInt(ini.wait);
|
var wtime = parseInt(ini.wait);
|
||||||
if (ini.mode == "error") {
|
if (ini.mode == "error") {
|
||||||
FoniaJS.showError(ini.value, wtime);
|
FoniaJS.showError(ini.value, wtime);
|
||||||
@@ -711,17 +711,17 @@ Request.JSONF = function(options){//oke
|
|||||||
FoniaJS.showInfo(ini.value, wtime);
|
FoniaJS.showInfo(ini.value, wtime);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var make_html = function(ini){//oke
|
var make_html = function(ini){
|
||||||
$('#'+ini.id).html(ini.value);
|
$('#'+ini.id).html(ini.value);
|
||||||
};
|
};
|
||||||
var make_form = function(ini){//oke
|
var make_form = function(ini){
|
||||||
var formIni = $('#'+ini.id);
|
var formIni = $('#'+ini.id);
|
||||||
formIni.val(ini.value);
|
formIni.val(ini.value);
|
||||||
if (ini.css) {
|
if (ini.css) {
|
||||||
formIni.prop('disabled', ini.css=='disabled');
|
formIni.prop('disabled', ini.css=='disabled');
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var make_option = function(ini){//oke
|
var make_option = function(ini){
|
||||||
var optIni = $('#'+ini.id);
|
var optIni = $('#'+ini.id);
|
||||||
if (!optIni) return;
|
if (!optIni) return;
|
||||||
if (ini.avalue) {
|
if (ini.avalue) {
|
||||||
@@ -744,13 +744,13 @@ Request.JSONF = function(options){//oke
|
|||||||
}
|
}
|
||||||
optIni.trigger('change');
|
optIni.trigger('change');
|
||||||
};
|
};
|
||||||
var make_table = function(ini){//oke
|
var make_table = function(ini){
|
||||||
var divData = $('#'+ini.id).empty();
|
var divData = $('#'+ini.id).empty();
|
||||||
var strHead = '<thead><tr>', iCol = 0, sClass = '', aSortCol = [], aTombol = [];
|
var strHead = '<thead><tr>', iCol = 0, sClass = '', aSortCol = [], aTombol = [];
|
||||||
$.each(ini.header, function(key, val){
|
$.each(ini.header, function(key, val){
|
||||||
if (val.o == ini.config.sort_col) iCol = key;
|
if (val.o == ini.config.sort_col) iCol = key;
|
||||||
strHead += '<th data-class-name="'+val.f+'">'+val.c+'</th>';
|
strHead += '<th data-class-name="'+val.f+'">'+val.c+'</th>';
|
||||||
aSortCol.push((val.s ? { "orderDataType": val.s } : null));
|
aSortCol.push((val.s ? { 'orderDataType': val.s } : null));
|
||||||
});
|
});
|
||||||
if (ini.option.length > 0) {
|
if (ini.option.length > 0) {
|
||||||
var strAksi = 'Aksi', ChkField = '';
|
var strAksi = 'Aksi', ChkField = '';
|
||||||
@@ -762,11 +762,10 @@ Request.JSONF = function(options){//oke
|
|||||||
if ($.inArray(val.type,['button','button-dt'])!==-1) aTombol[val.icon] = [val.label, (val.type=='button'?0:1)];
|
if ($.inArray(val.type,['button','button-dt'])!==-1) aTombol[val.icon] = [val.label, (val.type=='button'?0:1)];
|
||||||
});
|
});
|
||||||
strHead += '<th data-class-name="c">'+strAksi+'</th>';
|
strHead += '<th data-class-name="c">'+strAksi+'</th>';
|
||||||
aSortCol.push(null);
|
|
||||||
} else {
|
} else {
|
||||||
strHead += '<th data-class-name="hid"> </th>';
|
strHead += '<th data-class-name="hid"> </th>';
|
||||||
aSortCol.push(null);
|
|
||||||
}
|
}
|
||||||
|
aSortCol.push({'orderable': false});
|
||||||
strHead += '</tr></thead>';
|
strHead += '</tr></thead>';
|
||||||
|
|
||||||
var strFoot = '';
|
var strFoot = '';
|
||||||
@@ -775,10 +774,7 @@ Request.JSONF = function(options){//oke
|
|||||||
$.each(ini.footer, function(key, val){
|
$.each(ini.footer, function(key, val){
|
||||||
strFoot += '<th class="'+ini.header[key].f+'">'+val.c+'</th>';
|
strFoot += '<th class="'+ini.header[key].f+'">'+val.c+'</th>';
|
||||||
});
|
});
|
||||||
if (ini.option.length > 0) {
|
strFoot += '<th> </th></tr></tfoot>';
|
||||||
strFoot += '<th> </th>';
|
|
||||||
}
|
|
||||||
strFoot += '</tr></tfoot>';
|
|
||||||
}
|
}
|
||||||
|
|
||||||
var sClass = '';
|
var sClass = '';
|
||||||
|
|||||||
Reference in New Issue
Block a user