first commit

This commit is contained in:
2026-07-16 14:07:54 +07:00
commit d3f1794df7
100 changed files with 8647 additions and 0 deletions
+96
View File
@@ -0,0 +1,96 @@
/*******************************************************************
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
Module : /apps/js/tab/subkeg.js
Desc. : JS - Tabel Master Sub Kegiatan
Created By : Siau Pheng ([email protected]).
Created Date : December 7th, 2010.
Last Modified : July 19th, 2020.
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
*******************************************************************/
var TSubKegJS = {
PHP: '',
KODE: '',
loading: function(){
this.data_query('detail');
$('#Cari_Sub').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_Sub').val('');
this.data_query('detail');
}.bind(this));
FoniaJS.setFocus('#Cari_Sub');
},
detail_show: function(mode, ID){
new Request({
url: this.PHP,
sendParam: ['data=subkeg-detail','mode='+mode,'SubID='+ID],
onSuccess: function(txt){
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Sub Kegiatan', txt, 600, '_,WK,WS', function(){
$('#winDetail').find('#butWSave').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 <b>"'+acell[3]+'"</b> ?', function(){
new Request.JSON({
url: this.PHP,
sendParam: ['data=save','mode=del','SubID='+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','SubID','ProgID','KegID','K_Sub','N_Sub','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();
},
data_query: function(tipe, mode){
if (tipe=="detail"){
new Request.JSONF({
url: this.PHP,
sendParam: ['data=detail','Cari_Sub']
}).send();
}
}
};