first commit
This commit is contained in:
@@ -0,0 +1,90 @@
|
||||
/*******************************************************************
|
||||
|
||||
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 : February, 2022.
|
||||
|
||||
(c) 2020 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TAksesSJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_OPD').keydown((e) => {
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
});
|
||||
$('#butSearch').click(() => this.data_query('detail'));
|
||||
$('#butAll').click(() => {
|
||||
$('#Cari_OPD').val('');
|
||||
this.data_query('detail');
|
||||
});
|
||||
$('#butUpAll').click(() => this.update_all());
|
||||
FoniaJS.setFocus('#Cari_OPD');
|
||||
},
|
||||
|
||||
update_all: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=akses-semua','Tahun'],
|
||||
onSuccess: (txt) => {
|
||||
this.winSemua = FoniaJS.showWindow('Semua', 'Ubah Semua Hak Akses Sekaligus', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winSemua').find('#butWSimpan').click(() => this.update_proc());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_proc: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','mode=save-all','Tahun','Hak_Renja1','Hak_Renja2'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winSemua)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_show: function(mode, OPDID, AksesID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=akses-detail','mode='+mode,'Tahun','OPDID='+OPDID,'AksesID='+AksesID],
|
||||
onSuccess: (txt) => {
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Konfigurasi Hak Akses', txt, 'lg', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDetail').find('#butWSimpan').click(() => this.detail_save());
|
||||
});
|
||||
}
|
||||
}).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_Renja2'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
|
||||
}).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');
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user