commit pertama
This commit is contained in:
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/bidu.js
|
||||
Desc. : JS - Tabel Master Bidang Urusan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 19th, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TBiduJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Bidu').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Bidu').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Bidu');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=bidu-detail','mode='+mode,'BUID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Bidang Urusan', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[3]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','BUID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','BUID','K_Urusan','K_Bidu','N_Bidu','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Bidu']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/kegiatan.js
|
||||
Desc. : JS - Tabel Master Kegiatan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 19th, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TKegiatanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Keg').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Keg').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Keg');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=kegiatan-detail','mode='+mode,'KegID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Kegiatan', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[3]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','KegID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','KegID','ProgID','K_Keg','N_Keg','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Keg']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/prio_dae.js
|
||||
Desc. : JS - Tabel Master Prioritas Daerah
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 31st, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TPrioDJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_PrioD').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_PrioD').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_PrioD');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=priodae-detail','mode='+mode,'PrioDID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Prioritas Daerah', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','PrioDID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','PrioDID','K_PrioD','N_PrioD','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_PrioD']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/prio_nas.js
|
||||
Desc. : JS - Tabel Master Prioritas Nasional
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 31st, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TPrioNJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_PrioN').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_PrioN').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_PrioN');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=prionas-detail','mode='+mode,'PrioNID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Prioritas Nasional', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','PrioNID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','PrioNID','K_PrioN','N_PrioN','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_PrioN']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/program.js
|
||||
Desc. : JS - Tabel Master Program
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 19th, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TProgramJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Prog').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Prog').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Prog');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=program-detail','mode='+mode,'ProgID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Program', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[3]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','ProgID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','ProgID','K_Bidu','K_Prog','N_Prog','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Prog']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/satuan.js
|
||||
Desc. : JS - Tabel Master Satuan Kegiatan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 30th, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TSatuanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Satuan').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Satuan').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Satuan');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=satuan-detail','mode='+mode,'SatuanID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Satuan Kegiatan', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','SatuanID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','SatuanID','K_Satuan','N_Satuan','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Satuan']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/subkeg.js
|
||||
Desc. : JS - Tabel Master Sub Kegiatan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 19th, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TSubKegJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Sub').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Sub').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Sub');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=subkeg-detail','mode='+mode,'SubID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Sub Kegiatan', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[3]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','SubID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','SubID','ProgID','KegID','K_Sub','N_Sub','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Sub']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,96 @@
|
||||
/*******************************************************************
|
||||
|
||||
App. Name : SISTEM INFORMASI PERENCANAAN PEMBANGUNAN DAERAH
|
||||
Module : /apps/js/tab/urusan.js
|
||||
Desc. : JS - Tabel Master Urusan
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : December 7th, 2010.
|
||||
Last Modified : July 19th, 2020.
|
||||
|
||||
(c) 2012 - 2020, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var TUrusanJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
this.data_query('detail');
|
||||
$('#Cari_Urusan').keydown(function(e){
|
||||
var key = e.keyCode || e.which || 0;
|
||||
if (key==13 && e.target.value!='') this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butSearch').click(function(e){
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
$('#butAll').click(function(){
|
||||
$('#Cari_Urusan').val('');
|
||||
this.data_query('detail');
|
||||
}.bind(this));
|
||||
FoniaJS.setFocus('#Cari_Urusan');
|
||||
},
|
||||
|
||||
detail_show: function(mode, ID){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=urusan-detail','mode='+mode,'UrusanID='+ID],
|
||||
onSuccess: function(txt){
|
||||
this.winDetail = FoniaJS.showWindow('Detail', 'Detail Urusan', txt, 600, '_,WK,WS', function(){
|
||||
$('#winDetail').find('#butWSave').click(function(){this.detail_save();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
detail_tambah: function(){
|
||||
this.detail_show('add', 0);
|
||||
},
|
||||
|
||||
detail_ubah: function(acell){
|
||||
this.detail_show('edit', acell[0]);
|
||||
},
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Yakin akan hapus <b>"'+acell[2]+'"</b> ?', function(){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode=del','UrusanID='+acell[0]],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses hapus data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses hapus data!');
|
||||
}
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}.bind(this), 'danger');
|
||||
},
|
||||
|
||||
detail_save: function(){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=save','mode','UrusanID','K_Urusan','N_Urusan','Aktif'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.status==true){
|
||||
this.data_query('detail');
|
||||
FoniaJS.showInfo('Proses simpan data sukses!');
|
||||
}else{
|
||||
FoniaJS.showInfo('Ada masalah dalam proses simpan data!');
|
||||
}
|
||||
FoniaJS.closeWindow(this.winDetail);
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=="detail"){
|
||||
new Request.JSONF({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=detail','Cari_Urusan']
|
||||
}).send();
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user