commit pertama
This commit is contained in:
@@ -0,0 +1,46 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/forum/ba_kec.js
|
||||
Desc. : JS - Cetak Berita Acara / Kecamatan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : March 21st, 2014.
|
||||
Last Modified : January 30th, 2021.
|
||||
|
||||
(c) 2014 - 2021, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var FRepoBAKecJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butPDF').click(function(){this.proses_pdf();}.bind(this));
|
||||
this.oc_Forum();
|
||||
},
|
||||
|
||||
proses_pdf: function(){
|
||||
if ($('#KecID').val() == 0) {
|
||||
FoniaJS.showInfo('Silahkan Pilih Nama Kecamatan !');
|
||||
return false;
|
||||
}
|
||||
var dpdf = new cPDF(this.PHP);
|
||||
dpdf.set_zoom(80);
|
||||
dpdf.add_param("data", "pdf");
|
||||
dpdf.add_param("Tahun");
|
||||
dpdf.add_param("KecID");
|
||||
dpdf.add_param("ForumID");
|
||||
dpdf.add_param("OPDID");
|
||||
dpdf.add_param("StatusID");
|
||||
dpdf.showPDF();
|
||||
},
|
||||
|
||||
oc_Forum: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-opd','KecID','ForumID']
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,142 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/usul/bahan_opd.js
|
||||
Desc. : JS - Kelola Bahan Forum OPD
|
||||
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 FBahanOPDJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butKEC').click(function(){
|
||||
if ($('#KecID').val()>0) this.show_hide(2);
|
||||
}.bind(this));
|
||||
$('#butKEL').click(function(){
|
||||
//if ($('#KelID').val()>0)
|
||||
this.show_hide(3);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').addClass('d-none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEC').addClass('d-none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').addClass('d-none'); $('#butKEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#KelID').val(0);
|
||||
$('#Nama_KEL').val('');
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 3) {
|
||||
$('#butKEL').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').removeClass('d-none'); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divKEC').removeClass('d-none'); this.data_query('tabel-kec'); }
|
||||
if (no == 3) { $('#divKEL').removeClass('d-none'); this.data_query('tabel-kel'); }
|
||||
if (no == 4) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[2]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[2]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
kel_select: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
$('#Nama_KEL').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,'UsulanLID='+ID],
|
||||
onSuccess: function(ajson){
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Usulan Kegiatan Desa', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
$('#formBahanOPD').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},
|
||||
Prio: {required:false},
|
||||
StatusID: {required:false}
|
||||
}
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formBahanOPD').submit();
|
||||
if (true !== $('#formBahanOPD').validate().checkForm()) return false;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail','OPDID','KecID','KelID','UsulanLID','Lokasi','Dusun','RT','Masalah','Usulan','Sasaran','Waktu','Volume','SatuanID','Rupiah','Prio','StatusID'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Usulan Kegiatan.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-opd']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kec"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kec','OPDID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kel','OPDID','KecID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','OPDID','KecID','KelID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,164 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/usul/forum_opd.js
|
||||
Desc. : JS - Forum OPD / Pembahasan
|
||||
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 FForumOPDJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butKEC').click(function(){
|
||||
if ($('#KecID').val()>0) this.show_hide(2);
|
||||
}.bind(this));
|
||||
$('#butKEL').click(function(){
|
||||
//if ($('#KelID').val()>0)
|
||||
this.show_hide(3);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').addClass('d-none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEC').addClass('d-none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').addClass('d-none'); $('#butKEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#KelID').val(0);
|
||||
$('#Nama_KEL').val('');
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 3) {
|
||||
$('#butKEL').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').removeClass('d-none'); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divKEC').removeClass('d-none'); this.data_query('tabel-kec'); }
|
||||
if (no == 3) { $('#divKEL').removeClass('d-none'); this.data_query('tabel-kel'); }
|
||||
if (no == 4) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[2]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[2]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
kel_select: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
$('#Nama_KEL').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,'UsulanLID='+ID],
|
||||
onSuccess: function(ajson){
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Usulan Kegiatan Desa', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail','OPDID','KecID','KelID','UsulanLID','StatusID'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Usulan Kegiatan.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_1: function(acell){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail=update','OPDID','KecID','KelID','UsulanLID='+acell[0],'StatusID=1'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_2: function(acell){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail=update','OPDID','KecID','KelID','UsulanLID='+acell[0],'StatusID=2'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_3: function(acell){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail=update','OPDID','KecID','KelID','UsulanLID='+acell[0],'StatusID=3'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_4: function(acell){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail=update','OPDID','KecID','KelID','UsulanLID='+acell[0],'StatusID=4'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_5: function(acell){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail=update','OPDID','KecID','KelID','UsulanLID='+acell[0],'StatusID=5'],
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-opd']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kec"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kec','OPDID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kel','OPDID','KecID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','OPDID','KecID','KelID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user