first commit
This commit is contained in:
@@ -0,0 +1,201 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/index.js
|
||||
Desc. : JS - Halaman Utama Desktop
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 24th, 2010.
|
||||
Last Modified : April 19th, 2026.
|
||||
|
||||
(c) 2010 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var ajax = [];
|
||||
$(document).ready(() => {
|
||||
jQuery("#preloader").remove();
|
||||
loadSidebar();
|
||||
IndexJS.loading();
|
||||
});
|
||||
$(window).on("beforeunload", () => {
|
||||
for (var key in ajax) {
|
||||
ajax[key].abort();
|
||||
}
|
||||
});
|
||||
|
||||
var IndexJS = {
|
||||
|
||||
loading: function(){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=default'],
|
||||
onSuccess: (ares) => {
|
||||
$('#pageContent').html(ares.content);
|
||||
$('#pageToolbarTop').html('');
|
||||
$('#pageToolbarBot').html('');
|
||||
this.Chart_Map();
|
||||
this.Chart_Bar();
|
||||
this.periode_info();
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
periode_show: function(reset){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=periode-show','reset='+reset],
|
||||
onSuccess: function(adata){
|
||||
if (!adata.aktif) this.winPeriode = FoniaJS.showWindow('Periode', 'Pilih Periode Data', adata.html, 500, [{},{i:'butTutup'},{i:'butWSave',v:'Simpan',c:'success'}], function(){
|
||||
$('#winPeriode').find('#butWSave').click(function(){IndexJS.periode_simpan();});
|
||||
});
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
periode_simpan: function(){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=periode-simpan','OPTION_THN','OPTION_BLN'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.sukses) FoniaJS.showInfo('Sukses Ganti Periode Data');
|
||||
FoniaJS.closeWindow(IndexJS.winPeriode);
|
||||
setTimeout(function(){self.location = FoniaJS.WEB_PATH;}, 10);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
periode_info: function(){
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=periode-info'],
|
||||
onSuccess: function(ajson){
|
||||
$('#liPeriode').html(ajson.html);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
Chart_Map: function(){
|
||||
ajax["chart_map"] = $.ajax({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php?data=chart-map',
|
||||
dataType: "json",
|
||||
contentType: "application/json",
|
||||
cache: false,
|
||||
success: (data_kab) => IndexJS.Draw_Map(data_kab.data),
|
||||
});
|
||||
},
|
||||
|
||||
Draw_Map: function(data_pagu) {
|
||||
ajax["json_map"] = $.ajax({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php?data=json-map',
|
||||
dataType: "json",
|
||||
cache: true,
|
||||
contentType: "application/json",
|
||||
success: (dataJ) => {
|
||||
$('#divHome1').addClass('chart_map').highcharts("Map", {
|
||||
chart: {
|
||||
borderWidth: 0.1,
|
||||
backgroundColor: "#f3f3f3"
|
||||
},
|
||||
title: { text: undefined },
|
||||
legend: { enabled: false },
|
||||
mapNavigation: { enabled: true, buttonOptions: { align: 'right', verticalAlign: 'bottom' } },
|
||||
colorAxis: {
|
||||
dataClasses: [
|
||||
{
|
||||
name:"Diatas 40%",
|
||||
from: 20.01,
|
||||
to: 100,
|
||||
color: "#63B8E5"
|
||||
},{
|
||||
name:"Diatas 30%",
|
||||
from: 15.01,
|
||||
to: 20,
|
||||
color: "#00bd55"
|
||||
},{
|
||||
name:"Diatas 20%",
|
||||
from: 10.01,
|
||||
to:15,
|
||||
color: "#ded716"
|
||||
},{
|
||||
name:"Diatas 10%",
|
||||
from: 5.01,
|
||||
to:10,
|
||||
color: "#fc8403"
|
||||
},{
|
||||
name:"Dibawah 10%",
|
||||
from: 0,
|
||||
to:5,
|
||||
color: "#bd1900"
|
||||
}
|
||||
]
|
||||
},
|
||||
series: [
|
||||
{
|
||||
data: data_pagu,
|
||||
mapData: dataJ,
|
||||
joinBy: ['id_kec', 'id_kec'],
|
||||
animation: false,
|
||||
name: "Kecamatan"
|
||||
}
|
||||
],
|
||||
tooltip: {
|
||||
useHTML: true,
|
||||
backgroundColor: 'transparent',
|
||||
borderColor: 'transparent',
|
||||
shadow: false,
|
||||
padding: 0,
|
||||
shared: true,
|
||||
formatter: function() {
|
||||
return '<div style="border-radius:.5rem .5rem .5rem 0;background-color:white;box-shadow:#b1c7ff 0px 3px 10px 0px;padding:.5rem;display:flex;align-items:center;"><span>'+this.point.properties.kec+' <br>'+this.point.value+'%</span></div>';
|
||||
}
|
||||
}
|
||||
}, function(xchart){
|
||||
//xchart.renderer.image(FoniaJS.WEB_PATH+'assets/images/logo90.png',10,15,80,80).add();
|
||||
});
|
||||
}
|
||||
});
|
||||
},
|
||||
|
||||
Chart_Bar: function(){
|
||||
if (!$('#divHome2').length) return;
|
||||
new Request.JSON({
|
||||
url: FoniaJS.WEB_PATH+'apps/php/index.php',
|
||||
sendParam: ['data=chart-bar'],
|
||||
onSuccess: (ares) => {
|
||||
if (ares.tipe=='chart') {
|
||||
$('#divHome2').html('<div class="c-chart-wrapper pb-2"><canvas id="canvasChart2"></canvas></div>');
|
||||
var ctx = $('#canvasChart2');
|
||||
var myChart = new Chart(ctx, {
|
||||
type: ares.chart.type,
|
||||
data: ares.chart.data,
|
||||
options: ares.chart.options
|
||||
});
|
||||
} else {
|
||||
$('#divHome2').html(ares.html);
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
function loadSidebar(){
|
||||
const mySidebar = document.getElementById('sidebarMain');
|
||||
mySidebar.addEventListener('shown.bs.modal', () => {
|
||||
document.querySelectorAll('.sidebar .nav-link').forEach((element) => {
|
||||
element.addEventListener('click', (e) => {
|
||||
let nextEl = element.nextElementSibling, parentEl = element.parentElement;
|
||||
if (nextEl){
|
||||
e.preventDefault();
|
||||
let mycollapse = new bootstrap.Collapse(nextEl);
|
||||
if (nextEl.classList.contains('show')){
|
||||
mycollapse.hide();
|
||||
} else {
|
||||
mycollapse.show();
|
||||
var opened_submenu = parentEl.parentElement.querySelector('.submenu.show');
|
||||
if (opened_submenu){ new bootstrap.Collapse(opened_submenu); }
|
||||
}
|
||||
}
|
||||
});
|
||||
})
|
||||
});
|
||||
}
|
||||
@@ -0,0 +1,148 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/induk/asmas.js
|
||||
Desc. : JS - Kegiatan Aspirasi Masyarakat
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 24th, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var IndukAsmasJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butKEC').click(function(){
|
||||
if ($('#KecID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#butKEL').click(function(){
|
||||
if ($('#KelID').val()>0) this.show_hide(2);
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divKEC').css('display', 'none'); $('#butKEC').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEL').css('display', 'none'); $('#butKEL').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').css('display', 'none');
|
||||
if (no == 1) {
|
||||
$('#KecID').val(0);
|
||||
$('#Nama_KEC').val('');
|
||||
}
|
||||
if (no <= 1) {
|
||||
$('#KelID').val(0);
|
||||
$('#Nama_KEL').val('');
|
||||
$('#butKEC').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no <= 2) {
|
||||
$('#butKEL').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'); }
|
||||
if (no == 3) { $('#divKEG').css('display', ''); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
kec_select: function(acell){
|
||||
$('#KecID').val(acell[0]);
|
||||
$('#Nama_KEC').val(acell[2]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
kel_select: function(acell){
|
||||
$('#KelID').val(acell[0]);
|
||||
$('#Nama_KEL').val(acell[2]);
|
||||
this.show_hide(3);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'KecID','KelID','SapiID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Aspirasi Masyarakat', txt, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
$('#formUsulAsmas').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
ProgID: {required:true, min:1},
|
||||
KegID: {required:true, min:1},
|
||||
SubID: {required:true, min:1},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Volume: {required:true, double_id:true},
|
||||
Satuan: {required:true},
|
||||
Rupiah: {required:true, double_id:true}
|
||||
}
|
||||
});
|
||||
this.oc_OPD();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formUsulAsmas').submit();
|
||||
if (true !== $('#formUsulAsmas').validate().checkForm()) return false;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail','KecID','KelID','SapiID','OPDID','ProgID','KegID','SubID','Lokasi','Masalah','Volume','Satuan','Rupiah'],
|
||||
onSuccess: function(adata){
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Aspirasi Masyarakat.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-kec"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kec']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-kel"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-kel','KecID']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','KecID','KelID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_OPD: function(){
|
||||
if (parseInt($('#OPDID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-prog','OPDID','ProgID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,141 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/induk/pokir.js
|
||||
Desc. : JS - Kegiatan Pokir Dewan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 24th, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var IndukPokirJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butDPRD').click(function(){
|
||||
if ($('#DPRDID').val()>0) this.show_hide(1);
|
||||
}.bind(this));
|
||||
$('#Nama_DPRD').keydown(function(e){
|
||||
if (13==e.which && false==$(e.target).prop('readonly')) this.data_query('tabel-dprd');
|
||||
}.bind(this));
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divDPRD').css('display', 'none'); $('#butDPRD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').css('display', 'none');
|
||||
if (no == 1) {
|
||||
$('#DPRDID').val(0);
|
||||
$('#Nama_DPRD').val('').prop('readonly', false);
|
||||
$('#DapilID').val(0);
|
||||
$('#butDPRD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divDPRD').css('display', ''); this.data_query('tabel-dprd'); }
|
||||
if (no == 2) { $('#divKEG').css('display', ''); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
dprd_select: function(acell){
|
||||
$('#DPRDID').val(acell[0]);
|
||||
$('#Nama_DPRD').val(acell[2]).prop('readonly', true);
|
||||
$('#DapilID').val(acell[1]);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'DPRDID','DapilID','SapiID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir', txt, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], function(){
|
||||
$('#winDKeg').find('#butWSimpan').click(function(){this.keg_simpan();}.bind(this));
|
||||
$('#formUsulDewan').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
OPDID: {required:true, min:1},
|
||||
ProgID: {required:true, min:1},
|
||||
KegID: {required:true, min:1},
|
||||
SubID: {required:true, min:1},
|
||||
KecID: {required:true, min:1},
|
||||
KelID: {required:false},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Volume: {required:true, double_id:true},
|
||||
Satuan: {required:true},
|
||||
Rupiah: {required:true, double_id:true}
|
||||
}
|
||||
});
|
||||
this.oc_OPD();
|
||||
this.oc_Kec();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formUsulDewan').submit();
|
||||
if (true !== $('#formUsulDewan').validate().checkForm()) return false;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','mode_detail','DPRDID','SapiID','OPDID','ProgID','KegID','SubID','KecID','KelID','Lokasi','Masalah','Volume','Satuan','Rupiah'],
|
||||
onSuccess: function(adata){
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Pokir.');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-dprd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-dprd','Nama_DPRD']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','DPRDID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_OPD: function(){
|
||||
if (parseInt($('#OPDID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-prog','OPDID','ProgID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Kec: function(){
|
||||
if (parseInt($('#KecID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-kel','KecID','KelID']
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,143 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/induk/renja.js
|
||||
Desc. : JS - Kegiatan Renja
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : May 3rd, 2026.
|
||||
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var IndukRenjaJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butOPD').click(() => {
|
||||
if ($('#OPDID').val()>0) this.show_hide(1);
|
||||
});
|
||||
$('#Nama_OPD').keydown((e) => {
|
||||
if (13==e.which && false==$(e.target).prop('readonly')) this.data_query('tabel-opd');
|
||||
});
|
||||
this.show_hide(1);
|
||||
},
|
||||
|
||||
show_hide: function(no){
|
||||
$('#divOPD').addClass('d-none'); $('#butOPD').removeClass('btn-secondary').addClass('btn-info');
|
||||
$('#divKEG').addClass('d-none');
|
||||
if (no == 1) {
|
||||
$('#OPDID').val(0);
|
||||
$('#AK_Bidu').val('');
|
||||
$('#Nama_OPD').val('').prop('readonly', false);
|
||||
$('#butOPD').removeClass('btn-info').addClass('btn-secondary');
|
||||
}
|
||||
if (no == 1) { $('#divOPD').removeClass('d-none'); this.data_query('tabel-opd'); }
|
||||
if (no == 2) { $('#divKEG').removeClass('d-none'); this.data_query('tabel-keg'); }
|
||||
},
|
||||
|
||||
opd_select: function(acell){
|
||||
$('#OPDID').val(acell[0]);
|
||||
$('#AK_Bidu').val(acell[1]);
|
||||
$('#Nama_OPD').val(acell[2]).prop('readonly', true);
|
||||
this.show_hide(2);
|
||||
},
|
||||
|
||||
keg_detail: function(mode, ID){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail-keg','mode_detail='+mode,'OPDID','AK_Bidu','SapiID='+ID],
|
||||
onSuccess: (ajson) => {
|
||||
this.winDKeg = FoniaJS.showWindow('DKeg', 'Detail Kegiatan Pokir', ajson.html, 'xl', [{},{i:'butTutup'},{i:'butWSimpan',v:'Simpan',c:'success'}], () => {
|
||||
$('#winDKeg').find('#butWSimpan').click(() => this.keg_simpan());
|
||||
$('#formRenja').validate({
|
||||
rules: {
|
||||
required: true,
|
||||
ProgID: {required:true, min:1},
|
||||
KegID: {required:true, min:1},
|
||||
SubID: {required:true, min:1},
|
||||
KecID: {required:true, min:1},
|
||||
KelID: {required:false},
|
||||
Lokasi: {required:true},
|
||||
Masalah: {required:true},
|
||||
Rupiah: {required:true, double_id:true},
|
||||
Hidden: {required:true},
|
||||
}
|
||||
});
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
keg_tambah: function(){
|
||||
this.keg_detail('insert', 0);
|
||||
},
|
||||
|
||||
keg_ubah: function(acell){
|
||||
this.keg_detail('update', acell[0]);
|
||||
},
|
||||
|
||||
keg_simpan: function(){
|
||||
$('#formRenja').submit();
|
||||
if (true !== $('#formRenja').validate().checkForm()) return false;
|
||||
const _param = ['data=tabel-keg','mode_detail','SapiID','OPDID','ProgID','KegID','SubID','KecID','KelID','Lokasi','Masalah','Hidden','Rupiah'];
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => { _param.push(e.id); });
|
||||
$(':input[id^="Pending_"]').each((i,e) => { _param.push(e.id); });
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: _param,
|
||||
onSuccess: (adata) => {
|
||||
FoniaJS.closeWindow(this.winDKeg);
|
||||
FoniaJS.showInfo('Sukses menyimpan Kegiatan Renja.');
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-opd"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-opd','Nama_OPD']
|
||||
}).send();
|
||||
} else if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','OPDID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','OPDID','ProgID','KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','OPDID','ProgID','KegID','SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Kec: function(){
|
||||
if (parseInt($('#KecID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-kel','KecID','KelID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
copy_Pagu: function(){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan salin Pagu Awal / Default<br>ke Semua Pagu Bulanan ?', () => {
|
||||
const _pagu = $('#Rupiah').val();
|
||||
$(':input[id^="Rupiah_"]').each((i,e) => $(e).val(_pagu));
|
||||
}, 'warning');
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,84 @@
|
||||
/*******************************************************************
|
||||
|
||||
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.jpg" },
|
||||
{ width: 960, url: FoniaJS.WEB_PATH+"assets/images/bs/kanda_960.jpg" }
|
||||
],
|
||||
[
|
||||
{ width: 1280, url: FoniaJS.WEB_PATH+"assets/images/bs/istana_1280.jpg" },
|
||||
{ width: 960, url: FoniaJS.WEB_PATH+"assets/images/bs/istana_960.jpg" }
|
||||
],
|
||||
[
|
||||
{ width: 1280, url: FoniaJS.WEB_PATH+"assets/images/bs/mangrove_1280.jpg" },
|
||||
{ width: 960, url: FoniaJS.WEB_PATH+"assets/images/bs/mangrove_960.jpg" }
|
||||
]
|
||||
], {
|
||||
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','OPTION_TAHUN','OPTION_BLN'],
|
||||
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+'?auth='+(respon.token??'');}, 1600);
|
||||
}else{
|
||||
FoniaJS.showInfo(respon.pesan, 3000);
|
||||
if (respon.redir) setTimeout(function(){self.location = respon.redir;}, 600);
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,129 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/repo/browse.js
|
||||
Desc. : JS - Tampilan Data Pelaporan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : October 28th, 2011.
|
||||
Last Modified : November 26th, 2025.
|
||||
|
||||
(c) 2011 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var RepoBrowseJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('tabel-keg');
|
||||
$('#Cari_Keg').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Keg').val('');
|
||||
this.data_query('tabel-keg');
|
||||
}.bind(this));
|
||||
$('#butFilter').click(function(){this.filter_show();}.bind(this));
|
||||
$('#butExcel').click(function(){this.down_excel();}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Keg');
|
||||
},
|
||||
|
||||
down_excel: function(){
|
||||
var dload = new cEXPORT(this.PHP);
|
||||
dload.add_param("data", "excel");
|
||||
dload.add_param("Jenis");
|
||||
dload.add_param("DPRDID");
|
||||
dload.add_param("KecID");
|
||||
dload.add_param("KelID");
|
||||
dload.add_param("OPDID");
|
||||
dload.add_param("ProgID");
|
||||
dload.download();
|
||||
},
|
||||
|
||||
filter_show: function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail_filter','Jenis','DPRDID','KecID','KelID','OPDID','ProgID'],
|
||||
onSuccess: function(ajson){
|
||||
this.winFilter = FoniaJS.showWindow('FData', 'Filter Tampilan Data Pelaporan', ajson.html, 600, [{i:'butWReset',v:'Reset Semua',c:'secondary'},{},{i:'butTutup'},{i:'butWSimpan',v:'Terapkan Filter',c:'success'}], function(){
|
||||
$('#winFData')
|
||||
.find('#butWReset').click(function(){this.filter_reset();}.bind(this)).end()
|
||||
.find('#butWSimpan').click(function(){this.filter_simpan();}.bind(this));
|
||||
this.oc_OPD();
|
||||
this.oc_Kec();
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
filter_reset: function(){
|
||||
$('#Jenis').val(0);
|
||||
$('#DPRDID').val(0);
|
||||
$('#KecID').val(0);
|
||||
$('#KelID').val(0);
|
||||
$('#OPDID').val(0);
|
||||
$('#ProgID').val(0);
|
||||
$('#Cari_Keg').val('');
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-keg');
|
||||
},
|
||||
|
||||
filter_simpan: function(){
|
||||
$('#Jenis').val($('#Fi_Jenis').val());
|
||||
$('#DPRDID').val($('#Fi_DPRDID').val());
|
||||
$('#KecID').val($('#Fi_KecID').val());
|
||||
$('#KelID').val($('#Fi_KelID').val());
|
||||
$('#OPDID').val($('#Fi_OPDID').val());
|
||||
$('#ProgID').val($('#Fi_ProgID').val());
|
||||
$('#Cari_Keg').val('');
|
||||
FoniaJS.closeWindow(this.winFilter);
|
||||
this.data_query('tabel-keg');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="tabel-keg"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=tabel-keg','Cari_Keg','Jenis','DPRDID','KecID','KelID','OPDID','ProgID']
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
oc_OPD: function(){
|
||||
if (parseInt($('#Fi_OPDID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-prog','Fi_OPDID','Fi_ProgID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Prog: function(){
|
||||
if (parseInt($('#Fi_ProgID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-keg','Fi_OPDID','Fi_ProgID','Fi_KegID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Keg: function(){
|
||||
if (parseInt($('#Fi_KegID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-sub','Fi_OPDID','Fi_ProgID','Fi_KegID','Fi_SubID']
|
||||
}).send();
|
||||
},
|
||||
|
||||
oc_Kec: function(){
|
||||
if (parseInt($('#Fi_KecID').val())==0) return;
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=option-kel','Fi_KecID','Fi_KelID']
|
||||
}).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