commit pertama

This commit is contained in:
2026-01-30 13:07:53 +07:00
commit 48199537d4
303 changed files with 136097 additions and 0 deletions
+80
View File
@@ -0,0 +1,80 @@
/*******************************************************************
Module : /apps/js/sys/about.js
Desc. : JS - Informasi Aplikasi
Created By : Siau Pheng ([email protected]).
Created Date : November 23th, 2011.
Last Modified : May 1st, 2022.
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var AboutJS = {
PHP: '',
KODE: '',
loading: function(){
$('#win'+this.KODE).find('#divBuildInfo').html('<p>Aplikasi dibuat dengan komponen :<br>- jQuery Version '+$().jquery+' <br>- Bootstrap Version '+$.fn.tooltip.Constructor.VERSION+' <br>- FoniaJS Version '+FoniaJS.version+' <br>- FoniaPHP Version '+FoniaJS.phpversion+'</p>');
},
proses_checkdb: function(){
new Request({
url: this.PHP,
sendParam: ['data=check_db'],
onSuccess: function(txt){
this.winCheck = FoniaJS.showWindow('CekDB', 'Cek, Perbaiki dan Optimalisasi Database', txt, 500, [{},{i:'butTutup'},{i:'butWProses',v:'Proses DB !',c:'success'}], function(){
$('#winCekDB').find('#butWProses').click(function(){this.checkdb_run();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
proses_update: function(){
new Request({
url: this.PHP,
sendParam: ['data=check_update'],
onSuccess: function(txt){
this.winUpdate = FoniaJS.showWindow('CekApp', 'Cek dan Update Aplikasi', txt, 500, [{},{i:'butTutup'},{i:'butWUpdate',v:'Proses Update !',c:'success'}], function(){
$('#winCekApp').find('#butWUpdate').click(function(){this.update_run();}.bind(this));
var tomb = $('#winCekApp').find('#butWUpdate');
if ($('#file_online').val()==1){
tomb.prop('disabled', false);
} else {
tomb.html('Telah Update!').prop('disabled', true);
}
}.bind(this));
}.bind(this)
}).send();
},
checkdb_run: function(){
new Request({
url: this.PHP,
sendParam: ['data=proses_db','DB_Cek','DB_Repair','DB_Opti'],
onSuccess: function(txt){
if ($('#DB_Hasil')) $('#DB_Hasil').removeClass('d-none').html(txt);
FoniaJS.showInfo('Proses Database selesai', 2000);
}
}).send();
},
update_run: function(){
if ($('#file_online')){
if ($('#file_online').val()==1){
new Request.JSON({
url: this.PHP,
sendParam: ['data=proses_update','file_web','file_sql','file_build'],
onSuccess: function(adata){
if (adata.sukses==true) {
FoniaJS.showInfo('Aplikasi telah di Update.<br>Silakan Log Out dari Aplikasi<br>Lalu refresh browser Anda!');
} else {
FoniaJS.showInfo('Aplikasi gagal di Update.');
}
}
}).send();
}
return false;
}
}
};
+101
View File
@@ -0,0 +1,101 @@
/*******************************************************************
Module : /apps/js/sys/akses_mus.js
Desc. : JS - Konfigurasi Hak Akses Data e-Musrenbang
Created By : Siau Pheng ([email protected]).
Created Date : August 8th, 2013.
Last Modified : January 1st, 2026.
(c) 2013 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var TAksesMJS = {
PHP: '',
KODE: '',
loading: function(){
this.data_query('detail');
$('#Cari_Akses').keydown(function(e){
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
}.bind(this));
$('#butSearch').click(function(e){
this.data_query('detail');
}.bind(this));
$('#butAll').click(function(){
$('#Cari_Akses').val('');
this.data_query('detail');
}.bind(this));
$('#butUpAll').click(function(){this.update_all();}.bind(this));
FoniaJS.setFocus('#Cari_Akses');
},
update_all: function(){
new Request({
url: this.PHP,
sendParam: ['data=akses-semua','Tahun'],
onSuccess: function(txt){
this.winSemua = FoniaJS.showWindow('Semua', 'Ubah Semua Hak Akses Sekaligus', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winSemua').find('#butWSimpan').click(function(){this.update_proc();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
update_proc: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','mode=save-all','Tahun','Hak_Usulan','Hak_Prioritas'],
onSuccess: function(){
FoniaJS.closeWindow(this.winSemua);
}.bind(this)
}).send();
},
detail_show: function(mode, KecID, AksesID){
new Request({
url: this.PHP,
sendParam: ['data=akses-detail','mode='+mode,'Tahun','KecID='+KecID,'AksesID='+AksesID],
onSuccess: function(txt){
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Konfigurasi Hak Askses', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
detail_ubah: function(acell){
this.detail_show('edit', acell[0], acell[1]);
},
detail_save: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save','mode=save','Tahun','AksesID','KecID','Hak_Usulan','Hak_Prioritas'],
onSuccess: function(adata){
if (adata.status==true){
this.data_query('detail');
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winDetail);
}.bind(this)
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','Tahun','Cari_Akses']
}).send()
}
},
oc_Tahun: function(){
this.data_query('detail');
}
};
+101
View File
@@ -0,0 +1,101 @@
/*******************************************************************
Module : /apps/js/sys/akses_pok.js
Desc. : JS - Konfigurasi Hak Akses Data e-Pokir
Created By : Siau Pheng ([email protected]).
Created Date : August 8th, 2013.
Last Modified : January 1st, 2026.
(c) 2013 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var TAksesPJS = {
PHP: '',
KODE: '',
loading: function(){
this.data_query('detail');
$('#Cari_Akses').keydown(function(e){
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
}.bind(this));
$('#butSearch').click(function(e){
this.data_query('detail');
}.bind(this));
$('#butAll').click(function(){
$('#Cari_Akses').val('');
this.data_query('detail');
}.bind(this));
$('#butUpAll').click(function(){this.update_all();}.bind(this));
FoniaJS.setFocus('#Cari_Akses');
},
update_all: function(){
new Request({
url: this.PHP,
sendParam: ['data=akses-semua','Tahun'],
onSuccess: function(txt){
this.winSemua = FoniaJS.showWindow('Semua', 'Ubah Semua Hak Akses Sekaligus', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winSemua').find('#butWSimpan').click(function(){this.update_proc();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
update_proc: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','mode=save-all','Tahun','Hak_Usulan','Hak_Ubah','Hak_Prioritas'],
onSuccess: function(){
FoniaJS.closeWindow(this.winSemua);
}.bind(this)
}).send();
},
detail_show: function(mode, DPRDID, AksesID){
new Request({
url: this.PHP,
sendParam: ['data=akses-detail','mode='+mode,'Tahun','DPRDID='+DPRDID,'AksesID='+AksesID],
onSuccess: function(txt){
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Konfigurasi Hak Askses', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
detail_ubah: function(acell){
this.detail_show('edit', acell[0], acell[1]);
},
detail_save: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save','mode=save','Tahun','AksesID','DPRDID','Hak_Usulan','Hak_Ubah','Hak_Prioritas'],
onSuccess: function(adata){
if (adata.status==true){
this.data_query('detail');
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winDetail);
}.bind(this)
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','Tahun','Cari_Akses']
}).send()
}
},
oc_Tahun: function(){
this.data_query('detail');
}
};
+96
View File
@@ -0,0 +1,96 @@
/*******************************************************************
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
Module : /apps/js/sys/akses_sip.js
Desc. : JS - Konfigurasi Hak Akses Data e-Planning
Created By : Siau Pheng ([email protected]).
Created Date : February 17th, 2020.
Last Modified : July 19th, 2020.
(c) 2020, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var TAksesSJS = {
PHP: '',
KODE: '',
loading: function(){
this.data_query('detail');
$('#Cari_OPD').keydown(function(e){
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
}.bind(this));
$('#butSearch').click(function(e){
this.data_query('detail');
}.bind(this));
$('#butAll').click(function(){
$('#Cari_OPD').val('');
this.data_query('detail');
}.bind(this));
$('#butUpAll').click(function(){this.update_all();}.bind(this));
FoniaJS.setFocus('#Cari_OPD');
},
update_all: function(){
new Request({
url: this.PHP,
sendParam: ['data=akses-semua','Tahun'],
onSuccess: function(txt){
this.winSemua = FoniaJS.showWindow('Semua', 'Ubah Semua Hak Akses Sekaligus', txt, 500, '_,WK,WS', function(){
$('#winSemua').find('#butWSave').click(function(){this.update_proc();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
update_proc: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','mode=save-all','Tahun','Hak_Renja1','Hak_Renja2'],
onSuccess: function(){
FoniaJS.closeWindow(this.winSemua);
}.bind(this)
}).send();
},
detail_show: function(mode, OPDID, AksesID){
new Request({
url: this.PHP,
sendParam: ['data=akses-detail','mode='+mode,'Tahun','OPDID='+OPDID,'AksesID='+AksesID],
onSuccess: function(txt){
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Konfigurasi Hak Akses', txt, 500, '_,WK,WS', function(){
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
detail_ubah: function(acell){
this.detail_show('edit', acell[0], acell[1]);
},
detail_save: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','mode=save','Tahun','AksesID','OPDID','Hak_Renja1','Hak_Renja1'],
onSuccess: function(){
FoniaJS.closeWindow(this.winDetail);
}.bind(this)
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','Tahun','Cari_OPD']
}).send()
}
},
oc_Tahun: function(){
this.data_query('detail');
}
};
+55
View File
@@ -0,0 +1,55 @@
/*******************************************************************
Module : /apps/js/sys/chpasswd.js
Desc. : JS - Perubahan Password Operator
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2008.
Last Modified : April 25th, 2020.
(c) 2008 - 2020, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var SYSChpasswdJS = {
PHP: '',
KODE: '',
loading: function(){
$('#butSave').click(function(){this.proses_save();}.bind(this));
FoniaJS.setFocus('#LPass');
},
proses_save: function(){
if ($("#LPass").val()=="") {
FoniaJS.showInfo("Silakan masukkan password lama Anda!");
FoniaJS.setFocus("#LPass");
return false;
} else if ($("#BPass1").val()=="") {
FoniaJS.showInfo("Silakan masukkan password baru 1 Anda!");
FoniaJS.setFocus("#BPass1");
return false;
} else if ($("#BPass2").val()=="") {
FoniaJS.showInfo("Silakan masukkan password baru 2 Anda!");
FoniaJS.setFocus("#BPass2");
return false;
} else if ($("#BPass1").val()!=$("#BPass2").val()) {
FoniaJS.showInfo("Password baru 1 dan 2 Anda tidak sama!");
FoniaJS.setFocus("#BPass1");
return false;
}
new Request.JSON({
url: this.PHP,
sendParam: ['data=chpasswd','LPass','BPass1','BPass2'],
onSuccess: function(ajson){
if (ajson.status == true) {
FoniaJS.showInfo(ajson.msg);
FoniaJS.closeWindow('#win'+this.KODE);
} else {
FoniaJS.showError(ajson.msg);
}
}.bind(this)
}).send();
}
};
+59
View File
@@ -0,0 +1,59 @@
/*******************************************************************
Module : /apps/js/sys/config.js
Desc. : JS - Konfigurasi Aplikasi
Created By : Siau Pheng ([email protected]).
Created Date : May 25th, 2010.
Last Modified : September 30th, 2025.
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var ConfigJS = {
PHP: '',
KODE: '',
loading: function(){
$('#butUbah').click(function(){this.proses_edit();}.bind(this));
$('#butSimpan').click(function(){this.proses_save();}.bind(this));
this.data_query('view');
},
proses_edit: function(){
this.data_query('edit');
},
proses_save: function(){
new Request({
url: this.PHP,
sendParam: ['data=master','mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_FAX','REG_WEBSITE','REG_EMAIL'],
onSuccess: function(txt){
$('#divMaster').html(txt);
this.update_event();
}.bind(this)
}).send()
},
data_query: function(mode){
new Request({
url: this.PHP,
sendParam: ['data=master','mode='+mode,'REG_ID'],
onSuccess: function(txt){
$('#divMaster').html(txt);
this.update_event();
}.bind(this)
}).send()
},
update_event: function(){
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false);
} else {
$("#butUbah").prop('disabled', false);
$("#butSimpan").prop('disabled', true);
}
}
};
+146
View File
@@ -0,0 +1,146 @@
/*******************************************************************
Module : /apps/js/sys/menu_grup.js
Desc. : JS - Manajemen Data Grup Login Menu
Created By : Siau Pheng ([email protected]).
Created Date : August 8th, 2013.
Last Modified : January 1st, 2026.
(c) 2013 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var MenuGrupJS = {
PHP: '',
KODE: '',
loading: function(){
this.data_query('detail');
$('#Cari_Grup').keydown(function(e){
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
}.bind(this));
$('#butSearch').click(function(e){
this.data_query('detail');
}.bind(this));
$('#butAll').click(function(){
$('#Cari_Grup').val('');
this.data_query('detail');
}.bind(this));
FoniaJS.setFocus('#Cari_Grup');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP,
sendParam: ['data=grup-detail','mode='+mode,'Grup_MenuID='+ID],
onSuccess: function(txt){
this.winDetail = FoniaJS.showWindow('Detail', 'Informasi Grup Menu', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winDetail').find('#butWSimpan').click(function(){this.detail_save();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
detail_tambah: function(){
this.detail_show('add', 0);
},
detail_ubah: function(acell){
this.detail_show('edit', acell[0]);
},
detail_hapus: function(acell){
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus "+acell[1]+"?", function(){
new Request.JSON({
url: this.PHP,
sendParam: ['data=save','mode=del','Grup_MenuID='+acell[0]],
onSuccess: function(adata){
if (adata.status==true){
this.data_query('detail');
FoniaJS.showInfo('Proses hapus data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
}
}.bind(this)
}).send();
}.bind(this), 'danger');
},
detail_save: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save','mode','Grup_MenuID','Nama_Grup','Ket','Aktif'],
onSuccess: function(adata){
if (adata.status==true){
this.data_query('detail');
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winDetail);
}.bind(this)
}).send();
},
menu_show: function(acell){
new Request({
url: this.PHP,
sendParam: ['data=menu','Grup_MenuID='+acell[0]],
onSuccess: function(txt){
this.winMenu = FoniaJS.showWindow('Menu', 'Hak Akses Modul', txt, 'lg', [{i:'butWSelAll',v:'Pilih Semua',c:'info'},{i:'butWClrAll',v:'Hapus Semua',c:'info'},{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winMenu')
.find('#butWSelAll').click(function(){this.menu_ceksemua();}.bind(this)).end()
.find('#butWClrAll').click(function(){this.menu_hapussemua();}.bind(this)).end()
.find('#butWSimpan').click(function(){this.menu_simpan();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
menu_cek: function(el){
var t_modul = el.value, b_check = el.checked;
$('#tabMenuList tbody input[type="checkbox"]').map(function(i, b){
var t_menu = $(b);
if (t_menu.hasClass(t_modul)) t_menu.prop('checked', b_check);
});
el.prop('checked', !b_check);
},
menu_ceksemua: function(){
$('#tabMenuList tbody input[type="checkbox"]').prop('checked', true);
},
menu_hapussemua: function(){
$('#tabMenuList tbody input[type="checkbox"]').prop('checked', false);
},
menu_simpan: function(){
var alist = $('#R_MENU').val().split(',');
$('#tabMenuList tbody input[type="checkbox"]:checked').map(function(i, b){
alist.push($(b).val());
});
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save-menu','Grup_MenuID','Menu='+alist.join()],
onSuccess: function(adata){
if (adata.status==true){
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winMenu);
}.bind(this)
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','Cari_Grup']
}).send()
}
}
};
+254
View File
@@ -0,0 +1,254 @@
/*******************************************************************
Module : /apps/js/sys/operator.js
Desc. : JS - Manajemen Data Pengguna
Created By : Siau Pheng ([email protected]).
Created Date : March 12th, 2008.
Last Modified : January 1st, 2026.
(c) 2008 - 2026, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var OperatorJS = {
PHP: '',
KODE: '',
loading: function(){
this.data_query('detail');
$('#Cari_User').keydown(function(e){
var key = e.keyCode || e.which || 0;
if (key==13 && e.target.value!='') this.data_query('detail');
}.bind(this));
$('#butSearch').click(function(e){
this.data_query('detail');
}.bind(this));
$('#butAll').click(function(){
$('#Cari_User').val('');
this.data_query('detail');
}.bind(this));
$('#butFilter').click(function(){this.filter_show();}.bind(this));
FoniaJS.setFocus('#Cari_User');
},
filter_show: function(){
new Request({
url: this.PHP,
sendParam: ['data=detail_filter','Filter_Level'],
onSuccess: function(txt){
this.winFilter = FoniaJS.showWindow('FLevel', 'Filter Data Pengguna / Level', txt, 400, [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winFLevel').find('#butWSimpan').click(function(){this.filter_simpan();}.bind(this));
$('#winFLevel').find('#Fi_Level').focus();
}.bind(this));
}.bind(this)
}).send();
},
filter_simpan: function(){
$('#Filter_Level').val($('#Fi_Level').val());
FoniaJS.closeWindow(this.winFilter);
this.data_query('detail');
},
detail_show: function(mode, UserID){
new Request({
url: this.PHP,
sendParam: ['data=user-detail','mode='+mode,'UserID='+UserID],
onSuccess: function(txt){
this.winDetail = FoniaJS.showWindow('Detail', 'Informasi Pengguna', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winDetail').find('#butWSimpan').click(function(){this.detail_check();}.bind(this));
this.oc_Level();
}.bind(this));
}.bind(this)
}).send();
},
detail_tambah: function(){
this.detail_show('add', 0);
},
detail_ubah: function(acell){
this.detail_show('edit', acell[0]);
},
detail_hapus: function(acell){
FoniaJS.showConfirm("Konfirmasi", "Yakin akan hapus ["+acell[1]+"] "+acell[2]+"?", function(){
new Request.JSON({
url: this.PHP,
sendParam: ['data=save','mode=del','UserID='+acell[0]],
onSuccess: function(adata){
if (adata.status==true){
this.data_query('detail');
FoniaJS.showInfo('Proses hapus data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
}
}.bind(this)
}).send();
}.bind(this), 'danger');
},
detail_check: function(){
if ($('#Username').val().toUpperCase()==$('#UserLama').val().toUpperCase()) {
this.detail_save();
return;
}
new Request.JSON({
url: this.PHP,
sendParam: ['data=user-check','Username'],
onSuccess: function(adata){
if (adata.ada==true) {
FoniaJS.showInfo("Username telah ada dalam sistem !");
} else {
this.detail_save();
}
}.bind(this)
}).send();
},
detail_save: function(){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save','mode','UserID','Username','Nama','Posisi','Level','Password','Grup_MenuID','Aktif'],
onSuccess: function(adata){
if (adata.status==true){
this.data_query('detail');
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winDetail);
}.bind(this)
}).send();
},
menu_show: function(acell){
new Request({
url: this.PHP,
sendParam: ['data=menu','UserID='+acell[0]],
onSuccess: function(txt){
this.winMenu = FoniaJS.showWindow('Menu', 'Hak Akses Modul', txt, 'lg', [{i:'butWSelAll',v:'Pilih Semua',c:'info'},{i:'butWClrAll',v:'Hapus Semua',c:'info'},{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winMenu')
.find('#butWSelAll').click(function(){this.menu_ceksemua();}.bind(this)).end()
.find('#butWClrAll').click(function(){this.menu_hapussemua();}.bind(this)).end()
.find('#butWSimpan').click(function(){this.menu_simpan();}.bind(this)).end()
.find('#tabMenuList thead input[type="checkbox"]:disabled').prop('indeterminate', true);
}.bind(this));
}.bind(this)
}).send();
},
menu_cek: function(el){
var t_modul = el.value, b_check = el.checked;
$('#tabMenuList tbody input[type="checkbox"]').map(function(i, b){
var t_menu = $(b);
if (t_menu.hasClass(t_modul)) t_menu.prop('checked', b_check);
});
el.prop('checked', !b_check);
},
menu_ceksemua: function(){
$('#tabMenuList tbody input[type="checkbox"]:not(:disabled)').prop('checked', true);
},
menu_hapussemua: function(){
$('#tabMenuList tbody input[type="checkbox"]:not(:disabled)').prop('checked', false);
},
menu_simpan: function(){
var alist = $('#R_MENU').val().split(',');
$('#tabMenuList tbody input[type="checkbox"]:not(:disabled):checked').map(function(i, b){
alist.push($(b).val());
});
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save-menu','UserID','Menu='+alist.join()],
onSuccess: function(adata){
if (adata.status==true){
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winMenu);
}.bind(this)
}).send();
},
opd_show: function(acell){
new Request({
url: this.PHP,
sendParam: ['data=opd','UserID='+acell[0]],
onSuccess: function(txt){
this.winOPD = FoniaJS.showWindow('OPD', 'Akses Data OPD', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winOPD').find('#butWSimpan').click(function(){this.opd_simpan();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
opd_simpan: function(){
var alist = [];
$('#tabOPDList tbody input[type="checkbox"]:checked').map(function(i, b){
alist.push($(b).val());
});
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save-opd','UserID','AK_OPD='+alist.join()],
onSuccess: function(adata){
if (adata.status==true){
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winOPD);
}.bind(this)
}).send();
},
kec_show: function(acell){
new Request({
url: this.PHP,
sendParam: ['data=kec','UserID='+acell[0]],
onSuccess: function(txt){
this.winKec = FoniaJS.showWindow('Kec', 'Akses Data Kecamatan', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
$('#winKec').find('#butWSimpan').click(function(){this.kec_simpan();}.bind(this));
}.bind(this));
}.bind(this)
}).send();
},
kec_simpan: function(){
var alist = [];
$('#tabKecList tbody input[type="checkbox"]:checked').map(function(i, b){
alist.push($(b).val());
});
new Request.JSONF({
url: this.PHP,
sendParam: ['data=save-kec','UserID','AK_KEC='+alist.join()],
onSuccess: function(adata){
if (adata.status==true){
FoniaJS.showInfo('Proses simpan data sukses!');
}else{
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
}
FoniaJS.closeWindow(this.winKec);
}.bind(this)
}).send();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','Filter_Level','Cari_User']
}).send()
}
},
oc_Level: function(){
if ($('#Level').val()>1) {
$('#Grup_MenuID').prop('disabled', true).val(0).trigger('change');
} else $('#Grup_MenuID').prop('disabled', false);
}
};
+60
View File
@@ -0,0 +1,60 @@
/*******************************************************************
Module : /apps/js/sys/sippd.js
Desc. : JS - Konfigurasi SIPPD
Created By : Siau Pheng ([email protected]).
Created Date : May 25th, 2010.
Last Modified : September 30th, 2025.
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var SIPPDJS = {
PHP: '',
KODE: '',
loading: function(){
$('#butUbah').click(function(){this.proses_edit();}.bind(this));
$('#butSimpan').click(function(){this.proses_save();}.bind(this));
this.data_query('view');
},
proses_edit: function(){
this.data_query('edit');
},
proses_save: function(){
new Request({
url: this.PHP,
sendParam: ['data=master','mode=save','REG_ID','INFO_RUN','RENC_RPJMDID','RENC_THN','RENC_VISIID','REAL_RPJMDID','REAL_THN','REAL_TW','REAL_TGL'],
onSuccess: function(txt){
$('#divMaster').html(txt);
this.update_event();
FoniaJS.showInfo('Simpan konfigurasi aplikasi sukses !');
}.bind(this)
}).send()
},
data_query: function(mode){
new Request({
url: this.PHP,
sendParam: ['data=master','mode='+mode,'REG_ID'],
onSuccess: function(txt){
$('#divMaster').html(txt);
this.update_event();
}.bind(this)
}).send()
},
update_event: function(){
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
$("#butUbah").prop('disabled', true);
$("#butSimpan").prop('disabled', false);
} else {
$("#butUbah").prop('disabled', false);
$("#butSimpan").prop('disabled', true);
}
}
};