update .gitignore
This commit is contained in:
@@ -0,0 +1,159 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/usul/tjslp.js
|
||||
Desc. : JS - Usulan TJSLP
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : January 9th, 2026.
|
||||
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var MUsulTJSLPJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butKEC').click(function(){
|
||||
if ($('#KecID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butKEL').click(function(){
|
||||
if ($('#KelID').val()>0) this.show_hide(2);
|
||||
}.bind(this));
|
||||
$('#butBEL').click(function(){
|
||||
if ($('#BelID').val()>0) this.show_hide(3);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divKEC').addClass('d-none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').addClass('d-none'); $('#butKEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divBEL').addClass('d-none'); $('#butBEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
$('#Hak_Usulan').val(1);
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#KelID').val(0);
|
||||
$('#Nama_KEL').val('');
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#BelID').val(0);
|
||||
$('#Nama_BEL').val('');
|
||||
$('#butKEL').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 3) {
|
||||
$('#butBEL').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divKEC').removeClass('d-none'); this.data_query('tabel-kec'); }
|
||||
if (no == 2) { $('#divKEL').removeClass('d-none'); this.data_query('tabel-kel'); }
|
||||
if (no == 3) { $('#divBEL').removeClass('d-none'); this.data_query('tabel-bel'); }
|
||||
if (no == 4) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[3]);
|
||||
$('#Hak_Usulan').val(acell[1]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kel_select: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
$('#Nama_KEL').val(acell[2]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
bel_select: function(acell){
|
||||
$('#BelID').val(acell[0]);
|
||||
$('#Nama_BEL').val(acell[2]);
|
||||
this.show_hide(4);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'Hak_Usulan','UsulanLID='+ID],
|
||||
onSuccess: function(ajson){
|
||||
var tombol = [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}];
|
||||
if ($('#Hak_Usulan').val()==0) tombol.pop();
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Usulan Kegiatan Desa', ajson.html, 'xl', tombol, function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
$('#formUsulDesa').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
Volume: {required:true, double_id:true},
|
||||
SatuanID: {required:true, min:1},
|
||||
Rupiah: {required:true, double_id:true}
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus usulan <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail=delete','Hak_Usulan','KecID','KelID','BelID','UsulanLID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formUsulDesa').submit();
|
||||
if (true !== $('#formUsulDesa').validate().checkForm()) return false;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail','Hak_Usulan','OPDID','KecID','KelID','BelID','UsulanLID','Lokasi','Dusun','RT','Masalah','Usulan','Sasaran','Waktu','Volume','SatuanID','Rupiah'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Usulan Kegiatan.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-kec"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kec']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kel','KecID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-bel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-bel','KecID','KelID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','Hak_Usulan','KecID','KelID','BelID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user