table footer missing of last column
This commit is contained in:
+30
-34
@@ -27,7 +27,7 @@ var FoniaJS = {
|
||||
deflocal: "",
|
||||
_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;
|
||||
if (typeof(key) === 'string' && key !== '') {
|
||||
_hasil = $.base64.decode(key);
|
||||
@@ -50,15 +50,15 @@ var FoniaJS = {
|
||||
this.User.Level = parseInt(_adata[3]);
|
||||
}
|
||||
},
|
||||
user_level: function(l) {//oke
|
||||
user_level: function(l) {
|
||||
if (this.User.Level <= (l ?? 9)) return true;
|
||||
return false;
|
||||
},
|
||||
user_level_not: function(l) {//oke
|
||||
user_level_not: function(l) {
|
||||
if (this.User.Level !== (l ?? 9)) return true;
|
||||
return false;
|
||||
},
|
||||
callMenu: function(p, q) {//oke
|
||||
callMenu: function(p, q) {
|
||||
var apar = ["p=" + p];
|
||||
if (q != null) apar.push("q=" + q);
|
||||
new Request.JSON({
|
||||
@@ -102,7 +102,7 @@ var FoniaJS = {
|
||||
}).send();
|
||||
},
|
||||
|
||||
loadMenu: function() {//oke
|
||||
loadMenu: function() {
|
||||
$(".mlink").click(function(e){
|
||||
var sbar = $(this).closest('#sidebarMain');
|
||||
var linkid = $(this).attr('id').replace("Link", "");
|
||||
@@ -136,14 +136,14 @@ var FoniaJS = {
|
||||
}.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');
|
||||
_tmpto.on('hidden.bs.toast', function(e){
|
||||
$(this).remove();
|
||||
});
|
||||
(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');
|
||||
_tmpto.on('hidden.bs.toast', function(e){
|
||||
$(this).remove();
|
||||
@@ -243,7 +243,7 @@ var FoniaJS = {
|
||||
}
|
||||
}.bind(this));
|
||||
},
|
||||
genWinToolBut: function(menu) {//oke
|
||||
genWinToolBut: function(menu) {
|
||||
if (!menu) return '';
|
||||
var smenu = '';
|
||||
if (typeof menu === 'object'){
|
||||
@@ -266,7 +266,7 @@ var FoniaJS = {
|
||||
}
|
||||
return smenu;
|
||||
},
|
||||
genToolButton: function(menu) {//oke
|
||||
genToolButton: function(menu) {
|
||||
if (!menu) return '';
|
||||
var smenu = '';
|
||||
if (typeof menu === 'object'){
|
||||
@@ -289,7 +289,7 @@ var FoniaJS = {
|
||||
}
|
||||
return smenu;
|
||||
},
|
||||
FormDecorated: function() {//oke
|
||||
FormDecorated: 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
|
||||
// 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);
|
||||
}
|
||||
});
|
||||
$('.option-tags').each(function() {//oke
|
||||
$('.option-tags').each(function() {
|
||||
if (!jQuery.isFunction(jQuery.fn.select2)) return;
|
||||
var _opts = {tags: false, dropdownAutoWidth: true, width: 'auto', theme: 'bootstrap-5'};
|
||||
var _dmodal = $(this).closest('div.modal');
|
||||
@@ -458,14 +458,14 @@ var FoniaJS = {
|
||||
}
|
||||
return x1 + x2;
|
||||
},
|
||||
formatBytes: function(bytes, deci) {//oke
|
||||
formatBytes: function(bytes, deci) {
|
||||
if (bytes === 0) return '0 Bytes';
|
||||
const dm = deci ?? 0;
|
||||
const sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB'];
|
||||
const i = Math.floor(Math.log(bytes) / Math.log(1024));
|
||||
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 _ctipe = (conf_tipe == null) ? 'modal-warning' : 'modal-'+conf_tipe;
|
||||
var _btipe = (conf_tipe == null) ? 'btn-warning' : 'btn-'+conf_tipe;
|
||||
@@ -486,7 +486,7 @@ var FoniaJS = {
|
||||
});
|
||||
}).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 f_oncall = (typeof f_onload == "function") ? f_onload : function(){};
|
||||
var f_offcall = (typeof f_offload == "function") ? f_offload : function(){};
|
||||
@@ -519,10 +519,10 @@ var FoniaJS = {
|
||||
}).modal('show');
|
||||
return '#win'+id_wind;
|
||||
},
|
||||
closeWindow: function(elWin) {//oke
|
||||
closeWindow: function(elWin) {
|
||||
if ($(elWin).length) $(elWin).modal('hide');
|
||||
},
|
||||
closeAllWindows: function() {//oke
|
||||
closeAllWindows: function() {
|
||||
$(".modal").each(function() {
|
||||
if ($(this).hasClass('show')) $(this).modal('toggle');
|
||||
if ($(this).attr('id')!=='sidebarMain') $(this).modal('dispose').remove();
|
||||
@@ -542,13 +542,13 @@ var FoniaJS = {
|
||||
n = 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();
|
||||
d.setTime(d.getTime() + (exdays * 24 * 60 * 60 * 1000));
|
||||
var expires = "expires="+d.toUTCString();
|
||||
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 ca = document.cookie.split(';');
|
||||
for (var i = 0; i < ca.length; i++) {
|
||||
@@ -562,7 +562,7 @@ var FoniaJS = {
|
||||
}
|
||||
return "";
|
||||
},
|
||||
locale: function(key, oset){//oke
|
||||
locale: function(key, oset){
|
||||
if (typeof oset === "object") {
|
||||
this.locales[key] = oset;
|
||||
if (this.deflocal == '') this.deflocal = key;
|
||||
@@ -573,7 +573,7 @@ var FoniaJS = {
|
||||
}, 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 = {};
|
||||
if ('string' !== typeof aparam) arrData = this.RequestParam(aparam);
|
||||
objComp = {
|
||||
@@ -629,7 +629,7 @@ var Request = function(options){
|
||||
this.construct(options);
|
||||
};
|
||||
|
||||
Request.JSON = function(options){//oke
|
||||
Request.JSON = function(options){
|
||||
var vars = {
|
||||
url: "",
|
||||
sendParam: [],
|
||||
@@ -661,7 +661,7 @@ Request.JSON = function(options){//oke
|
||||
this.construct(options);
|
||||
};
|
||||
|
||||
Request.JSONF = function(options){//oke
|
||||
Request.JSONF = function(options){
|
||||
var vars = {
|
||||
url: "",
|
||||
sendParam: [],
|
||||
@@ -703,7 +703,7 @@ Request.JSONF = function(options){//oke
|
||||
return this;
|
||||
};
|
||||
|
||||
var show_msg = function(ini){//oke
|
||||
var show_msg = function(ini){
|
||||
var wtime = parseInt(ini.wait);
|
||||
if (ini.mode == "error") {
|
||||
FoniaJS.showError(ini.value, wtime);
|
||||
@@ -711,17 +711,17 @@ Request.JSONF = function(options){//oke
|
||||
FoniaJS.showInfo(ini.value, wtime);
|
||||
}
|
||||
};
|
||||
var make_html = function(ini){//oke
|
||||
var make_html = function(ini){
|
||||
$('#'+ini.id).html(ini.value);
|
||||
};
|
||||
var make_form = function(ini){//oke
|
||||
var make_form = function(ini){
|
||||
var formIni = $('#'+ini.id);
|
||||
formIni.val(ini.value);
|
||||
if (ini.css) {
|
||||
formIni.prop('disabled', ini.css=='disabled');
|
||||
}
|
||||
};
|
||||
var make_option = function(ini){//oke
|
||||
var make_option = function(ini){
|
||||
var optIni = $('#'+ini.id);
|
||||
if (!optIni) return;
|
||||
if (ini.avalue) {
|
||||
@@ -744,13 +744,13 @@ Request.JSONF = function(options){//oke
|
||||
}
|
||||
optIni.trigger('change');
|
||||
};
|
||||
var make_table = function(ini){//oke
|
||||
var make_table = function(ini){
|
||||
var divData = $('#'+ini.id).empty();
|
||||
var strHead = '<thead><tr>', iCol = 0, sClass = '', aSortCol = [], aTombol = [];
|
||||
$.each(ini.header, function(key, val){
|
||||
if (val.o == ini.config.sort_col) iCol = key;
|
||||
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) {
|
||||
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)];
|
||||
});
|
||||
strHead += '<th data-class-name="c">'+strAksi+'</th>';
|
||||
aSortCol.push(null);
|
||||
} else {
|
||||
strHead += '<th data-class-name="hid"> </th>';
|
||||
aSortCol.push(null);
|
||||
}
|
||||
aSortCol.push({'orderable': false});
|
||||
strHead += '</tr></thead>';
|
||||
|
||||
var strFoot = '';
|
||||
@@ -775,10 +774,7 @@ Request.JSONF = function(options){//oke
|
||||
$.each(ini.footer, function(key, val){
|
||||
strFoot += '<th class="'+ini.header[key].f+'">'+val.c+'</th>';
|
||||
});
|
||||
if (ini.option.length > 0) {
|
||||
strFoot += '<th> </th>';
|
||||
}
|
||||
strFoot += '</tr></tfoot>';
|
||||
strFoot += '<th> </th></tr></tfoot>';
|
||||
}
|
||||
|
||||
var sClass = '';
|
||||
|
||||
Reference in New Issue
Block a user