first commit
This commit is contained in:
@@ -0,0 +1,56 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/sys/config.js
|
||||
Desc. : JS - Konfigurasi Aplikasi
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 25th, 2010.
|
||||
Last Modified : February 6th, 2023.
|
||||
|
||||
(c) 2010 - 2023, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var SIPPDJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butUbah').click(() => this.proses_edit());
|
||||
$('#butSimpan').click(() => this.proses_save());
|
||||
this.data_query('view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
this.data_query('edit');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','REG_ID','INFO_RUN','RENC_RPJMDID','RENC_THN','RENC_VISIID','REAL_RPJMDID','REAL_THN','REAL_BLN','REAL_TGL'],
|
||||
onSuccess: (adata) => {
|
||||
if (adata.status==true) {
|
||||
FoniaJS.showInfo('Simpan konfigurasi aplikasi sukses !');
|
||||
}
|
||||
this.data_query('view');
|
||||
}
|
||||
}).send()
|
||||
},
|
||||
|
||||
data_query: function(mode){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=master','mode='+mode,'REG_ID'],
|
||||
onSuccess: (txt) => {
|
||||
$('#divMaster').html(txt);
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$("#butUbah").prop('disabled', true);
|
||||
$("#butSimpan").prop('disabled', false);
|
||||
} else {
|
||||
$("#butUbah").prop('disabled', false);
|
||||
$("#butSimpan").prop('disabled', true);
|
||||
}
|
||||
}
|
||||
}).send()
|
||||
}
|
||||
};
|
||||
Reference in New Issue
Block a user