first commit
This commit is contained in:
@@ -0,0 +1,82 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/index.js
|
||||
Desc. : JS - Halaman Utama Desktop
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 24th, 2010.
|
||||
Last Modified : August 15th, 2019.
|
||||
|
||||
(c) 2010 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
$(document).ready(function(){
|
||||
jQuery("#preloader").remove();
|
||||
IndexJS.loading();
|
||||
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=check-contact'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.contact==0) {
|
||||
FoniaJS.showInfo('Tolong tambahkan / perbaharui informasi Pengguna, terima kasih.');
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
});
|
||||
|
||||
var IndexJS = {
|
||||
|
||||
loading: function(){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=default'],
|
||||
onSuccess: function(ares){
|
||||
$('#pageTitle').html(ares.title);
|
||||
$('#pageBread').html(ares.bread);
|
||||
$('#pageContent').html(ares.content);
|
||||
$('#pageToolbarTop').html('');
|
||||
$('#pageToolbarBot').html('');
|
||||
//this.loadPagu();
|
||||
//this.loadChart();
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
loadPagu: function(){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=pagu-info'],
|
||||
onSuccess: function(ares){
|
||||
$('#divHome1').html(ares.html);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
loadChart: function(){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=pagu-chart'],
|
||||
onSuccess: function(data){
|
||||
var ctx = $('#pieChart');
|
||||
var pieOptions = {
|
||||
legend: { display: true, position: 'bottom', labels:{pointStyle:'circle', usePointStyle:true} },
|
||||
aspectRatio: 1.3,
|
||||
cutoutPercentage: 35,
|
||||
responsiveAnimationDuration: 10,
|
||||
responsive: true,
|
||||
maintainAspectRatio: true,
|
||||
onResize: function(mcha, size) {
|
||||
var leg = (size.width <= 330) ? false : true;
|
||||
mcha.options.legend.display = leg;
|
||||
}
|
||||
};
|
||||
var myChart = new Chart(ctx, {
|
||||
type: 'doughnut',
|
||||
data: data,
|
||||
options: pieOptions
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
};
|
||||
@@ -0,0 +1,87 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/login.js
|
||||
Desc. : JS - Halaman Proses Login
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : January 15th, 2008.
|
||||
Last Modified : June 28th, 2020.
|
||||
|
||||
(c) 2008 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
$(document).ready(function(){
|
||||
$('#butLogin').click(LoginJS.Proses_Login);
|
||||
$('#Username').keydown(function(e){
|
||||
if (e.which==13) $('#Password').focus();
|
||||
});
|
||||
$('#Password').keydown(function(e){
|
||||
if (e.which==13) $('#butLogin').trigger('click');
|
||||
});
|
||||
LoginJS.Tampil_Login();
|
||||
document.oncontextmenu = new Function ('return false');
|
||||
|
||||
jQuery.backstretch([
|
||||
[
|
||||
{ width: 1280, url: FoniaJS.WEB_PATH+"assets/images/bs/kanda_1280.webp" },
|
||||
{ width: 960, url: FoniaJS.WEB_PATH+"assets/images/bs/kanda_960.webp" },
|
||||
{ width: 480, url: FoniaJS.WEB_PATH+"assets/images/bs/kanda_480.webp" }
|
||||
],
|
||||
[
|
||||
{ width: 1280, url: FoniaJS.WEB_PATH+"assets/images/bs/istana_1280.webp" },
|
||||
{ width: 960, url: FoniaJS.WEB_PATH+"assets/images/bs/istana_960.webp" },
|
||||
{ width: 480, url: FoniaJS.WEB_PATH+"assets/images/bs/istana_480.webp" }
|
||||
],
|
||||
[
|
||||
{ width: 1280, url: FoniaJS.WEB_PATH+"assets/images/bs/mangrove_1280.webp" },
|
||||
{ width: 960, url: FoniaJS.WEB_PATH+"assets/images/bs/mangrove_960.webp" },
|
||||
{ width: 480, url: FoniaJS.WEB_PATH+"assets/images/bs/mangrove_480.webp" }
|
||||
]
|
||||
], {
|
||||
duration: 6000,
|
||||
transition: 'push_left|push_right|cover_up|cover_down|fade',
|
||||
transitionDuration: 600
|
||||
});
|
||||
});
|
||||
|
||||
var LoginJS = {
|
||||
|
||||
Tampil_Login: function(){
|
||||
var Username = FoniaJS.getCookie('Username');
|
||||
if (Username != '') {
|
||||
$('#Username').val(Username);
|
||||
FoniaJS.setFocus('#Password');
|
||||
} else {
|
||||
FoniaJS.setFocus('#Username');
|
||||
}
|
||||
},
|
||||
|
||||
Proses_Login: function(){
|
||||
if (!$('#Username').val()){
|
||||
$('#Username').focus();
|
||||
FoniaJS.showError('Silahkan masukkan ID Pengguna !');
|
||||
return false;
|
||||
}
|
||||
if (!$('#Password').val()){
|
||||
$('#Password').focus();
|
||||
FoniaJS.showError('Silahkan masukkan Kata Sandi !');
|
||||
return false;
|
||||
}
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/login.php',
|
||||
sendParam: ['mode=login','Username','Password'],
|
||||
onSuccess: function(respon){
|
||||
if (respon.hasil == 'SUKSES'){
|
||||
FoniaJS.setCookie('Username', $('#Username').val(), 365);
|
||||
$('#divLoginMsg').html(respon.pesan).removeClass('d-none');
|
||||
$('.input-group').addClass('d-none');
|
||||
setTimeout(function(){self.location = FoniaJS.WEB_PATH;}, 1600);
|
||||
}else{
|
||||
FoniaJS.showInfo(respon.pesan, 3000);
|
||||
if (respon.redir) setTimeout(function(){self.location = respon.redir;}, 600);
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/pull/renstra_tujuan.js
|
||||
Desc. : JS - Pull Tujuan RENSTRA
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 15th, 2025.
|
||||
|
||||
(c) 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PRENSTRATujuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butTujuan').click(function(){
|
||||
this.simpan_tujuan();
|
||||
}.bind(this));
|
||||
$('#butIndikator').click(function(){
|
||||
this.simpan_indikator();
|
||||
}.bind(this));
|
||||
$('#butClear').click(function(){
|
||||
$('#JSON_Tujuan').val('');
|
||||
$('#JSON_Indikator').val('');
|
||||
$('#Tujuan_Log').val('');
|
||||
$('#Indikator_Log').val('');
|
||||
});
|
||||
},
|
||||
|
||||
simpan_tujuan: function(){
|
||||
$('#Tujuan_Log').val('');
|
||||
var _json = JSON.parse($('#JSON_Tujuan').val());
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-tujuan','JSON='+JSON.stringify(_json)],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
$('#Tujuan_Log').val('Sukses simpan Tujuan !');
|
||||
} else {
|
||||
$('#Tujuan_Log').val(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
simpan_indikator: function(){
|
||||
$('#Indikator_Log').val('');
|
||||
var _json = JSON.parse($('#JSON_Indikator').val());
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-indikator','JSON='+JSON.stringify(_json)],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
$('#Indikator_Log').val('Sukses simpan Indikator !');
|
||||
} else {
|
||||
$('#Indikator_Log').val(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/pull/rpjmd_sasaran.js
|
||||
Desc. : JS - Pull Sasaran RPJMD
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 15th, 2025.
|
||||
|
||||
(c) 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PRPJMDProgramJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butProgram').click(function(){
|
||||
this.simpan_sasaran();
|
||||
}.bind(this));
|
||||
$('#butOutcome').click(function(){
|
||||
this.simpan_Outcome();
|
||||
}.bind(this));
|
||||
$('#butClear').click(function(){
|
||||
$('#JSON_Program').val(' ');
|
||||
$('#JSON_Outcome').val(' ');
|
||||
$('#Program_Log').val('');
|
||||
$('#Outcome_Log').val('');
|
||||
});
|
||||
},
|
||||
|
||||
simpan_sasaran: function(){
|
||||
$('#Program_Log').val('');
|
||||
var _json = JSON.parse($('#JSON_Program').val());
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-program','JSON='+JSON.stringify(_json)],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
$('#Program_Log').val('Sukses simpan Program !');
|
||||
} else {
|
||||
$('#Program_Log').val(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
simpan_Outcome: function(){
|
||||
$('#Outcome_Log').val('');
|
||||
var _json = JSON.parse($('#JSON_Outcome').val());
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-outcome','JSON='+JSON.stringify(_json)],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
$('#Outcome_Log').val('Sukses simpan Outcome !');
|
||||
} else {
|
||||
$('#Outcome_Log').val(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,64 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/pull/rpjmd_sasaran.js
|
||||
Desc. : JS - Pull Sasaran RPJMD
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 15th, 2025.
|
||||
|
||||
(c) 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PRPJMDSasaranJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butSasaran').click(function(){
|
||||
this.simpan_sasaran();
|
||||
}.bind(this));
|
||||
$('#butIndikator').click(function(){
|
||||
this.simpan_indikator();
|
||||
}.bind(this));
|
||||
$('#butClear').click(function(){
|
||||
$('#JSON_Sasaran').val(' ');
|
||||
$('#JSON_Indikator').val(' ');
|
||||
$('#Sasaran_Log').val('');
|
||||
$('#Indikator_Log').val('');
|
||||
});
|
||||
},
|
||||
|
||||
simpan_sasaran: function(){
|
||||
$('#Sasaran_Log').val('');
|
||||
var _json = JSON.parse($('#JSON_Sasaran').val());
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sasaran','JSON='+JSON.stringify(_json)],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
$('#Sasaran_Log').val('Sukses simpan Sasaran !');
|
||||
} else {
|
||||
$('#Sasaran_Log').val(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
simpan_indikator: function(){
|
||||
$('#Indikator_Log').val('');
|
||||
var _json = JSON.parse($('#JSON_Indikator').val());
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-indikator','JSON='+JSON.stringify(_json)],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
$('#Indikator_Log').val('Sukses simpan Indikator !');
|
||||
} else {
|
||||
$('#Indikator_Log').val(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/push/rkpd_akhir.js
|
||||
Desc. : JS - Push API RKPD Akhir ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : August 20th, 2020.
|
||||
|
||||
(c) 2011 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PRKPDAkhirJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butSend').click(function(){this.proses_kirim();}.bind(this));
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
proses_kirim: function(){
|
||||
var prog = 0;
|
||||
$('#divPROG :input').each(function(e){
|
||||
if (this.type=='checkbox' && this.id.indexOf('ProgID_cbox')!==-1) {
|
||||
if ($(this).prop('checked')) prog++;
|
||||
}
|
||||
});
|
||||
if (prog==0) {
|
||||
FoniaJS.showError('Silakan Pilih Nama Program.');
|
||||
return false;
|
||||
}
|
||||
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Kirim Data RKPD Akhir ke SIPD Kemendagri ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kirim','OPDID'],
|
||||
onSuccess: function(adata){
|
||||
var txt = '<table width="100%"><tr><td class="c"><p>'+adata['msg']+'</p></td></tr><tr><td height="250" valign="top">'+adata['pre']+'</td></tr></table>';
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Pengiriman Data', txt, 900, '_,WK');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').css('display', 'none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divPROG').css('display', 'none');
|
||||
if (no == 1) { $('#divOPD').css('display', ''); this.data_query('detail-opd'); }
|
||||
if (no == 2) { $('#divPROG').css('display', ''); this.data_query('detail-prog'); }
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
$('#butPrint').prop('disabled', true);
|
||||
$('#butSend').prop('disabled', true);
|
||||
if (no == 2) {
|
||||
$('#butPrint').prop('disabled', false);
|
||||
$('#butSend').prop('disabled', false);
|
||||
}
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[8]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
opd_kirim: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Kirim Data '+acell[8]+' ke SIPD Kemendagri ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kirim','OPDID'],
|
||||
onSuccess: function(adata){
|
||||
var txt = '<table width="100%"><tr><td class="c"><p>'+adata['msg']+'</p></td></tr><tr><td height="250" valign="top">'+adata['pre']+'</td></tr></table>';
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Pengiriman Data', txt, 900, '_,WK');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd']
|
||||
}).send();
|
||||
} else if (tipe=="detail-prog"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-prog','OPDID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/push/rkpd_awal.js
|
||||
Desc. : JS - Push API RKPD Awal ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : August 20th, 2020.
|
||||
|
||||
(c) 2011 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PRKPDAwalJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butSend').click(function(){this.proses_kirim();}.bind(this));
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
proses_kirim: function(){
|
||||
var prog = 0;
|
||||
$('#divPROG :input').each(function(e){
|
||||
if (this.type=='checkbox' && this.id.indexOf('ProgID_cbox')!==-1) {
|
||||
if ($(this).prop('checked')) prog++;
|
||||
}
|
||||
});
|
||||
if (prog==0) {
|
||||
FoniaJS.showError('Silakan Pilih Nama Program.');
|
||||
return false;
|
||||
}
|
||||
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Kirim Data RKPD Awal ke SIPD Kemendagri ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kirim','OPDID'],
|
||||
onSuccess: function(adata){
|
||||
var txt = '<table width="100%"><tr><td class="c"><p>'+adata['msg']+'</p></td></tr><tr><td height="250" valign="top">'+adata['pre']+'</td></tr></table>';
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Pengiriman Data', txt, 900, '_,WK');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').css('display', 'none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divPROG').css('display', 'none');
|
||||
if (no == 1) { $('#divOPD').css('display', ''); this.data_query('detail-opd'); }
|
||||
if (no == 2) { $('#divPROG').css('display', ''); this.data_query('detail-prog'); }
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
$('#butPrint').prop('disabled', true);
|
||||
$('#butSend').prop('disabled', true);
|
||||
if (no == 2) {
|
||||
$('#butPrint').prop('disabled', false);
|
||||
$('#butSend').prop('disabled', false);
|
||||
}
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[8]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
opd_kirim: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Kirim Data '+acell[8]+' ke SIPD Kemendagri ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kirim','OPDID'],
|
||||
onSuccess: function(adata){
|
||||
var txt = '<table width="100%"><tr><td class="c"><p>'+adata['msg']+'</p></td></tr><tr><td height="250" valign="top">'+adata['pre']+'</td></tr></table>';
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Pengiriman Data', txt, 900, '_,WK');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd']
|
||||
}).send();
|
||||
} else if (tipe=="detail-prog"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-prog','OPDID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,106 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/push/rkpd_ranc.js
|
||||
Desc. : JS - Push API Rancangan RKPD ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : August 20th, 2020.
|
||||
|
||||
(c) 2011 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PRKPDRancJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butSend').click(function(){this.proses_kirim();}.bind(this));
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
proses_kirim: function(){
|
||||
var prog = 0;
|
||||
$('#divPROG :input').each(function(e){
|
||||
if (this.type=='checkbox' && this.id.indexOf('ProgID_cbox')!==-1) {
|
||||
if ($(this).prop('checked')) prog++;
|
||||
}
|
||||
});
|
||||
if (prog==0) {
|
||||
FoniaJS.showError('Silakan Pilih Nama Program.');
|
||||
return false;
|
||||
}
|
||||
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Kirim Data Rancangan RKPD ke SIPD Kemendagri ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kirim','OPDID'],
|
||||
onSuccess: function(adata){
|
||||
var txt = '<table width="100%"><tr><td class="c"><p>'+adata['msg']+'</p></td></tr><tr><td height="250" valign="top">'+adata['pre']+'</td></tr></table>';
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Pengiriman Data', txt, 900, '_,WK');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').css('display', 'none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divPROG').css('display', 'none');
|
||||
if (no == 1) { $('#divOPD').css('display', ''); this.data_query('detail-opd'); }
|
||||
if (no == 2) { $('#divPROG').css('display', ''); this.data_query('detail-prog'); }
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
$('#butPrint').prop('disabled', true);
|
||||
$('#butSend').prop('disabled', true);
|
||||
if (no == 2) {
|
||||
$('#butPrint').prop('disabled', false);
|
||||
$('#butSend').prop('disabled', false);
|
||||
}
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[8]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
opd_kirim: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Kirim Data '+acell[8]+' ke SIPD Kemendagri ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kirim','OPDID'],
|
||||
onSuccess: function(adata){
|
||||
var txt = '<table width="100%"><tr><td class="c"><p>'+adata['msg']+'</p></td></tr><tr><td height="250" valign="top">'+adata['pre']+'</td></tr></table>';
|
||||
this.winInfo = FoniaJS.showWindow('Info', 'Informasi Pengiriman Data', txt, 900, '_,WK');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd']
|
||||
}).send();
|
||||
} else if (tipe=="detail-prog"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-prog','OPDID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,76 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/bangda_mus.js
|
||||
Desc. : JS - Simulasi Push Musrenbang ke Bangda Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 6th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var BangdaMusJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butKEC').click(function(){
|
||||
if ($('#KecID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divKEC').css('display', 'none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').css('display', 'none');
|
||||
if (no == 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divKEC').css('display', ''); this.data_query('tabel-kec'); }
|
||||
if (no == 2) { $('#divKEL').css('display', ''); this.data_query('tabel-kel'); }
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[1]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kode_preview: function(cmd){
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("KecID");
|
||||
dprint.add_param("KelID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_mus: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-mus');
|
||||
},
|
||||
kode_ubah_mus: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
this.kode_preview('kode-ubah-mus');
|
||||
},
|
||||
|
||||
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();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,47 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/bangda_pok.js
|
||||
Desc. : JS - Simulasi Push Pokir ke Bangda Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 6th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var BangdaPokJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('tabel-dprd');
|
||||
},
|
||||
|
||||
kode_preview: function(cmd){
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("DPRDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_pok: function(acell){
|
||||
$('#DPRDID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-pok');
|
||||
},
|
||||
kode_ubah_pok: function(acell){
|
||||
$('#DPRDID').val(acell[0]);
|
||||
this.kode_preview('kode-ubah-pok');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-dprd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-dprd']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,167 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/bangda_renstra.js
|
||||
Desc. : JS - Simulasi Program Renstra ke Bangda Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : March 30th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var BangdaRenstraJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butPROG').click(function(){
|
||||
if ($('#ProgID').val()>0) this.show_hide(2);
|
||||
}.bind(this));
|
||||
$('#butKEG').click(function(){
|
||||
if ($('#KegID').val()>0) this.show_hide(3);
|
||||
}.bind(this));
|
||||
$('#opsiProg').click(function(){
|
||||
if (this.cek_opsi()) this.kode_preview('kode-tambah-prog');
|
||||
}.bind(this));
|
||||
$('#opsiProgIndi').click(function(){
|
||||
if (this.cek_opsi()) this.kode_preview('kode-tambah-prog-indi');
|
||||
}.bind(this));
|
||||
$('#opsiKeg').click(function(){
|
||||
if (this.cek_opsi()) this.kode_preview('kode-tambah-keg');
|
||||
}.bind(this));
|
||||
$('#opsiKegIndi').click(function(){
|
||||
if (this.cek_opsi()) this.kode_preview('kode-tambah-keg-indi');
|
||||
}.bind(this));
|
||||
$('#opsiSub').click(function(){
|
||||
if (this.cek_opsi()) this.kode_preview('kode-tambah-sub');
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
cek_opsi: function(){
|
||||
if ($('#OPDID').val()==0) {
|
||||
FoniaJS.showError('Harus Pilih Perangkat Daerah !');
|
||||
return false;
|
||||
}
|
||||
$('#ProgID').val(0);
|
||||
$('#KegID').val(0);
|
||||
return true;
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').css('display', 'none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divPROG').css('display', 'none'); $('#butPROG').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').css('display', 'none'); $('#butKEG').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divSUB').css('display', 'none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#ProgID').val(0);
|
||||
$('#Nama_PROG').val('');
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#butPROG').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').css('display', ''); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divPROG').css('display', ''); this.data_query('tabel-prog'); }
|
||||
if (no == 3) { $('#divKEG').css('display', ''); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[2]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
prog_select: function(acell){
|
||||
$('#ProgID').val(acell[0]);
|
||||
$('#Nama_PROG').val(acell[1]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
kode_preview: function(cmd){
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.add_param("ProgID");
|
||||
dprint.add_param("KegID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_prog: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-prog');
|
||||
},
|
||||
kode_tambah_prog_indi: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-prog-indi');
|
||||
},
|
||||
kode_tambah_keg: function(acell){
|
||||
$('#ProgID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-keg');
|
||||
},
|
||||
kode_tambah_keg_indi: function(acell){
|
||||
$('#ProgID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-keg-indi');
|
||||
},
|
||||
kode_tambah_sub: function(acell){
|
||||
$('#KegID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-sub');
|
||||
},
|
||||
kode_tambah_sub_indi: function(acell){
|
||||
$('#KegID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-sub-indi');
|
||||
},
|
||||
|
||||
html_show: function(acell){
|
||||
$('#KegID').val(acell[0]);
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_HTML" name="Kode_HTML" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winHTML = FoniaJS.showWindow('HTML', 'Upload data HTML', txt, 600, '_,WK,WS', function(){
|
||||
$('#winHTML').find('#butWSave').click(function(){this.html_simpan();}.bind(this));
|
||||
$('#Kode_HTML').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
html_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-html','OPDID','KegID','Kode_HTML'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
FoniaJS.showInfo('Sukses upload HTML!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winHTML);
|
||||
}.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-prog"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-prog','OPDID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','OPDID','ProgID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,138 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/musrenbang.js
|
||||
Desc. : JS - Simulasi Push Musrenbang ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 6th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var MUSJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butKEC').click(function(){
|
||||
if ($('#KecID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divKEC').css('display', 'none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').css('display', 'none');
|
||||
if (no == 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divKEC').css('display', ''); this.data_query('tabel-kec'); }
|
||||
if (no == 2) { $('#divKEL').css('display', ''); this.data_query('tabel-kel'); }
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[1]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kode_preview: function(cmd){
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("KecID");
|
||||
dprint.add_param("KelID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_mus_k: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#KelID').val(0);
|
||||
this.kode_preview('kode-tambah-mus');
|
||||
},
|
||||
kode_ubah_mus_k: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#KelID').val(0);
|
||||
this.kode_preview('kode-ubah-mus');
|
||||
},
|
||||
kode_tambah_mus: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-mus');
|
||||
},
|
||||
kode_ubah_mus: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
this.kode_preview('kode-ubah-mus');
|
||||
},
|
||||
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.show_hide(2);
|
||||
this.show_hide(1);
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.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();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,99 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/pokir.js
|
||||
Desc. : JS - Simulasi Push Pokir ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 6th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var POKJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('tabel-dprd');
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
},
|
||||
|
||||
kode_preview: function(cmd){
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("DPRDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_pok: function(acell){
|
||||
$('#DPRDID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-pok');
|
||||
},
|
||||
kode_ubah_pok: function(acell){
|
||||
$('#DPRDID').val(acell[0]);
|
||||
this.kode_preview('kode-ubah-pok');
|
||||
},
|
||||
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.show_hide(2);
|
||||
this.show_hide(1);
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-dprd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-dprd']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
};
|
||||
@@ -0,0 +1,155 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/renstra_kegiatan.js
|
||||
Desc. : JS - Simulasi Kegiatan Renstra ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : March 30th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RenstraKegiatanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_OPD').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_OPD').val('');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahKeg').click(function(){
|
||||
this.kode_tambah_keg();
|
||||
}.bind(this));
|
||||
$('#opsiUbahKeg').click(function(){
|
||||
this.kode_ubah_keg();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.setFocus('#Cari_OPD');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#OPDID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_keg: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-keg');
|
||||
},
|
||||
kode_ubah_keg: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-keg');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
/*show_upload: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="col-12 px-0"><div class="input-group"><label class="input-group-btn "><span class="btn btn-primary shadow-none">Browse…<input type="file" name="FileDoku" id="FileDoku" accept="application/json" style="display:none;"></span></label><input type="text" id="FileLabel" class="form-control" readonly></div></div></div></div>';
|
||||
this.winDoku = FoniaJS.showWindow('Doku', 'Upload data JSON', txt, 600, '_,WK', function(){
|
||||
$('#FileDoku').change(function(){
|
||||
var label = $('#FileDoku').val().replace(/\\/g, '/').replace(/.*\//, ''),
|
||||
fd = new FormData(),
|
||||
files = $('#FileDoku')[0].files[0];
|
||||
$('#FileLabel').val(label);
|
||||
fd.append('file', files);
|
||||
$.ajax({
|
||||
url: this.PHP+'?data=upload-json',
|
||||
type: 'post',
|
||||
data: fd,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
$('#FileLabel').val('');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
},*/
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd','Cari_OPD']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,155 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/renstra_program.js
|
||||
Desc. : JS - Simulasi Program Renstra ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : March 30th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RenstraProgramJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_OPD').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_OPD').val('');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahProg').click(function(){
|
||||
this.kode_tambah_prog();
|
||||
}.bind(this));
|
||||
$('#opsiUbahProg').click(function(){
|
||||
this.kode_ubah_prog();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.setFocus('#Cari_OPD');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#OPDID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_prog: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-prog');
|
||||
},
|
||||
kode_ubah_prog: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-prog');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
/*show_upload: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="col-12 px-0"><div class="input-group"><label class="input-group-btn"><span class="btn btn-primary shadow-none">Browse…<input type="file" name="FileDoku" id="FileDoku" accept="application/json" style="display:none;"></span></label><input type="text" id="FileLabel" class="form-control" readonly></div></div></div></div>';
|
||||
this.winDoku = FoniaJS.showWindow('Doku', 'Upload data JSON', txt, 600, '_,WK', function(){
|
||||
$('#FileDoku').change(function(){
|
||||
var label = $('#FileDoku').val().replace(/\\/g, '/').replace(/.*\//, ''),
|
||||
fd = new FormData(),
|
||||
files = $('#FileDoku')[0].files[0];
|
||||
$('#FileLabel').val(label);
|
||||
fd.append('file', files);
|
||||
$.ajax({
|
||||
url: this.PHP+'?data=upload-json',
|
||||
type: 'post',
|
||||
data: fd,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
$('#FileLabel').val('');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
},*/
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd','Cari_OPD']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,155 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/renstra_sasaran.js
|
||||
Desc. : JS - Simulasi Sasaran Renstra ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : March 30th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RenstraSasaranJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_OPD').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_OPD').val('');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahSasar').click(function(){
|
||||
this.kode_tambah_sasar();
|
||||
}.bind(this));
|
||||
$('#opsiUbahSasar').click(function(){
|
||||
this.kode_ubah_sasar();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.setFocus('#Cari_OPD');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#OPDID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_sasar: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-sasar');
|
||||
},
|
||||
kode_ubah_sasar: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-sasar');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
/*show_upload: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="col-12 px-0"><div class="input-group"><label class="input-group-btn"><span class="btn btn-primary shadow-none">Browse…<input type="file" name="FileDoku" id="FileDoku" accept="application/json" style="display:none;"></span></label><input type="text" id="FileLabel" class="form-control" readonly></div></div></div></div>';
|
||||
this.winDoku = FoniaJS.showWindow('Doku', 'Upload data JSON', txt, 600, '_,WK', function(){
|
||||
$('#FileDoku').change(function(){
|
||||
var label = $('#FileDoku').val().replace(/\\/g, '/').replace(/.*\//, ''),
|
||||
fd = new FormData(),
|
||||
files = $('#FileDoku')[0].files[0];
|
||||
$('#FileLabel').val(label);
|
||||
fd.append('file', files);
|
||||
$.ajax({
|
||||
url: this.PHP+'?data=upload-json',
|
||||
type: 'post',
|
||||
data: fd,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
$('#FileLabel').val('');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
},*/
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd','Cari_OPD']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,155 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/renstra_tujuan.js
|
||||
Desc. : JS - Simulasi Tujuan Renstra ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : March 30th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RenstraTujuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_OPD').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_OPD').val('');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahTuj').click(function(){
|
||||
this.kode_tambah_tuj();
|
||||
}.bind(this));
|
||||
$('#opsiUbahTuj').click(function(){
|
||||
this.kode_ubah_tuj();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.setFocus('#Cari_OPD');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#OPDID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_tuj: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-tuj');
|
||||
},
|
||||
kode_ubah_tuj: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-tuj');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
/*show_upload: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="col-12 px-0"><div class="input-group"><label class="input-group-btn"><span class="btn btn-primary shadow-none">Browse…<input type="file" name="FileDoku" id="FileDoku" accept="application/json" style="display:none;"></span></label><input type="text" id="FileLabel" class="form-control" readonly></div></div></div></div>';
|
||||
this.winDoku = FoniaJS.showWindow('Doku', 'Upload data JSON', txt, 600, '_,WK', function(){
|
||||
$('#FileDoku').change(function(){
|
||||
var label = $('#FileDoku').val().replace(/\\/g, '/').replace(/.*\//, ''),
|
||||
fd = new FormData(),
|
||||
files = $('#FileDoku')[0].files[0];
|
||||
$('#FileLabel').val(label);
|
||||
fd.append('file', files);
|
||||
$.ajax({
|
||||
url: this.PHP+'?data=upload-json',
|
||||
type: 'post',
|
||||
data: fd,
|
||||
contentType: false,
|
||||
processData: false,
|
||||
success: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
$('#FileLabel').val('');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
}.bind(this)
|
||||
});
|
||||
}.bind(this));
|
||||
}.bind(this));
|
||||
},*/
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd','Cari_OPD']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,148 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/rkpd_awal.js
|
||||
Desc. : JS - Simulasi Push RKPD Awal ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 1st, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RKPDAwalJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(function(){
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').css('display', 'none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divPROG').css('display', 'none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#ProgID').val(0);
|
||||
$('#Nama_OPD').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').css('display', ''); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divPROG').css('display', ''); this.data_query('tabel-prog'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#Nama_OPD').val(acell[1]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kode_preview: function(cmd){
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.add_param("ProgID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_sub_o: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#ProgID').val(0);
|
||||
this.kode_preview('kode-tambah-sub');
|
||||
},
|
||||
kode_ubah_sub_o: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#ProgID').val(0);
|
||||
this.kode_preview('kode-ubah-sub');
|
||||
},
|
||||
kode_ubah_keg_o: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#ProgID').val(0);
|
||||
this.kode_preview('kode-ubah-keg');
|
||||
},
|
||||
kode_tambah_sub: function(acell){
|
||||
$('#ProgID').val(acell[0]);
|
||||
this.kode_preview('kode-tambah-sub');
|
||||
},
|
||||
kode_ubah_sub: function(acell){
|
||||
$('#ProgID').val(acell[0]);
|
||||
this.kode_preview('kode-ubah-sub');
|
||||
},
|
||||
kode_ubah_keg: function(acell){
|
||||
$('#ProgID').val(acell[0]);
|
||||
this.kode_preview('kode-ubah-keg');
|
||||
},
|
||||
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.show_hide(2);
|
||||
this.show_hide(1);
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.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-prog"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-prog','OPDID']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/rpjmd_program.js
|
||||
Desc. : JS - Simulasi Program RPJMD ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : March 30th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RPJMDProgramJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_OPD').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_OPD').val('');
|
||||
this.data_query('detail-opd');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahProg').click(function(){
|
||||
this.kode_tambah_prog();
|
||||
}.bind(this));
|
||||
$('#opsiUbahProg').click(function(){
|
||||
this.kode_ubah_prog();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.setFocus('#Cari_OPD');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#OPDID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("OPDID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_prog: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-prog');
|
||||
},
|
||||
kode_ubah_prog: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-prog');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-opd','Cari_OPD']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/rpjmd_sasaran.js
|
||||
Desc. : JS - Simulasi Sasaran RPJMD ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 8th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RPJMDSasaranJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_Sasar').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-sasar');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-sasar');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Sasar').val('');
|
||||
this.data_query('detail-sasar');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahSasar').click(function(){
|
||||
this.kode_tambah_sasar();
|
||||
}.bind(this));
|
||||
$('#opsiUbahSasar').click(function(){
|
||||
this.kode_ubah_sasar();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-sasar');
|
||||
FoniaJS.setFocus('#Cari_Sasar');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#RD_SASARID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("RD_SASARID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_sasar: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-sasar');
|
||||
},
|
||||
kode_ubah_sasar: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-sasar');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-sasar"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sasar','Cari_Sasar']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,127 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/sim/rpjmd_tujuan.js
|
||||
Desc. : JS - Simulasi Tujuan RPJMD ke SIPD Kemendagri
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : April 8th, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RPJMDTujuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#Cari_Tujuan').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail-tujuan');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail-tujuan');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Tujuan').val('');
|
||||
this.data_query('detail-tujuan');
|
||||
}.bind(this));
|
||||
$('#butSIPD').click(function(){
|
||||
this.sipd_detail();
|
||||
}.bind(this));
|
||||
$('#opsiUpload').click(function(){
|
||||
this.json_show();
|
||||
}.bind(this));
|
||||
$('#opsiTambahTujuan').click(function(){
|
||||
this.kode_tambah_tujuan();
|
||||
}.bind(this));
|
||||
$('#opsiUbahTujuan').click(function(){
|
||||
this.kode_ubah_tujuan();
|
||||
}.bind(this));
|
||||
$('#opsiTambahIndi').click(function(){
|
||||
this.kode_tambah_indi();
|
||||
}.bind(this));
|
||||
$('#opsiUbahIndi').click(function(){
|
||||
this.kode_ubah_indi();
|
||||
}.bind(this));
|
||||
this.data_query('detail-tujuan');
|
||||
FoniaJS.setFocus('#Cari_Tujuan');
|
||||
},
|
||||
|
||||
kode_preview: function(acell, cmd){
|
||||
if (acell) $('#RD_TUJID').val(acell[0]);
|
||||
var dprint = new cSIMULATOR(this.PHP);
|
||||
dprint.add_param("data", cmd);
|
||||
dprint.add_param("RD_TUJID");
|
||||
dprint.doPreview();
|
||||
},
|
||||
|
||||
kode_tambah_tujuan: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-tujuan');
|
||||
},
|
||||
kode_ubah_tujuan: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-tujuan');
|
||||
},
|
||||
kode_tambah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-tambah-indi');
|
||||
},
|
||||
kode_ubah_indi: function(acell){
|
||||
this.kode_preview(acell, 'kode-ubah-indi');
|
||||
},
|
||||
|
||||
json_show: function(){
|
||||
var txt = '<div class="card mt-2 mb-1"><div class="card-body"><div class="row mb-1"><div class="col"><textarea class="form-control" id="Kode_JSON" name="Kode_JSON" rows="10" required="true"></textarea></div></div></div></div>';
|
||||
this.winJSON = FoniaJS.showWindow('JSON', 'Upload data JSON', txt, 600, '_,WK,WS', function(){
|
||||
$('#winJSON').find('#butWSave').click(function(){this.json_simpan();}.bind(this));
|
||||
$('#Kode_JSON').focus();
|
||||
}.bind(this));
|
||||
},
|
||||
json_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-json','Kode_JSON'],
|
||||
onSuccess: function(ares){
|
||||
if (ares.result != 0){
|
||||
this.data_query('detail-opd');
|
||||
FoniaJS.showInfo('Sukses upload JSON!');
|
||||
} else {
|
||||
FoniaJS.showError(ares.message);
|
||||
}
|
||||
FoniaJS.closeWindow(this.winJSON);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
sipd_detail: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-sipd'],
|
||||
onSuccess: function(txt){
|
||||
this.winSIPD = FoniaJS.showWindow('SIPD', 'Konfigurasi SIPD', txt, 400, '_,WK,WS', function(){
|
||||
$('#winSIPD').find('#butWSave').click(function(){this.sipd_simpan();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
sipd_simpan: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=simpan-sipd','Kode_Token','Kode_Acak'],
|
||||
onSuccess: function(){
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
FoniaJS.closeWindow(this.winSIPD);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail-tujuan"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-tujuan','Cari_Tujuan']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/sys/chpasswd.js
|
||||
Desc. : JS - Perubahan Password Operator
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2008.
|
||||
Last Modified : April 25th, 2020.
|
||||
|
||||
(c) 2008 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var SYSChpasswdJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butSave').click(function(){this.proses_save();}.bind(this));
|
||||
FoniaJS.setFocus('#LPass');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
if ($("#LPass").val()=="") {
|
||||
FoniaJS.showInfo("Silakan masukkan password lama Anda!");
|
||||
FoniaJS.setFocus("#LPass");
|
||||
return false;
|
||||
} else if ($("#BPass1").val()=="") {
|
||||
FoniaJS.showInfo("Silakan masukkan password baru 1 Anda!");
|
||||
FoniaJS.setFocus("#BPass1");
|
||||
return false;
|
||||
} else if ($("#BPass2").val()=="") {
|
||||
FoniaJS.showInfo("Silakan masukkan password baru 2 Anda!");
|
||||
FoniaJS.setFocus("#BPass2");
|
||||
return false;
|
||||
} else if ($("#BPass1").val()!=$("#BPass2").val()) {
|
||||
FoniaJS.showInfo("Password baru 1 dan 2 Anda tidak sama!");
|
||||
FoniaJS.setFocus("#BPass1");
|
||||
return false;
|
||||
}
|
||||
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=chpasswd','LPass','BPass1','BPass2'],
|
||||
onSuccess: function(ajson){
|
||||
if (ajson.status == true) {
|
||||
FoniaJS.showInfo(ajson.msg);
|
||||
FoniaJS.closeWindow('#win'+this.KODE);
|
||||
} else {
|
||||
FoniaJS.showError(ajson.msg);
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user