first commit
This commit is contained in:
@@ -0,0 +1,80 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/sys/about.js
|
||||
Desc. : JS - Informasi Aplikasi
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : November 23th, 2011.
|
||||
Last Modified : May 1st, 2022.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var AboutJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#win'+this.KODE).find('#divBuildInfo').html('<p>Aplikasi dibuat dengan komponen :<br>- jQuery Version '+$().jquery+' <br>- Bootstrap Version '+$.fn.tooltip.Constructor.VERSION+' <br>- FoniaJS Version '+FoniaJS.version+' <br>- FoniaPHP Version '+FoniaJS.phpversion+'</p>');
|
||||
},
|
||||
|
||||
proses_checkdb: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=check_db'],
|
||||
onSuccess: function(txt){
|
||||
this.winCheck = FoniaJS.showWindow('CekDB', 'Cek, Perbaiki dan Optimalisasi Database', txt, 500, [{},{i:'butTutup'},{i:'butWProses',v:'Proses DB !',c:'success'}], function(){
|
||||
$('#winCekDB').find('#butWProses').click(function(){this.checkdb_run();}.bind(this));
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_update: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=check_update'],
|
||||
onSuccess: function(txt){
|
||||
this.winUpdate = FoniaJS.showWindow('CekApp', 'Cek dan Update Aplikasi', txt, 500, [{},{i:'butTutup'},{i:'butWUpdate',v:'Proses Update !',c:'success'}], function(){
|
||||
$('#winCekApp').find('#butWUpdate').click(function(){this.update_run();}.bind(this));
|
||||
var tomb = $('#winCekApp').find('#butWUpdate');
|
||||
if ($('#file_online').val()==1){
|
||||
tomb.prop('disabled', false);
|
||||
} else {
|
||||
tomb.html('Telah Update!').prop('disabled', true);
|
||||
}
|
||||
}.bind(this));
|
||||
}.bind(this)
|
||||
}).send();
|
||||
},
|
||||
|
||||
checkdb_run: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=proses_db','DB_Cek','DB_Repair','DB_Opti'],
|
||||
onSuccess: function(txt){
|
||||
if ($('#DB_Hasil')) $('#DB_Hasil').removeClass('d-none').html(txt);
|
||||
FoniaJS.showInfo('Proses Database selesai', 2000);
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
update_run: function(){
|
||||
if ($('#file_online')){
|
||||
if ($('#file_online').val()==1){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=proses_update','file_web','file_sql','file_build'],
|
||||
onSuccess: function(adata){
|
||||
if (adata.sukses==true) {
|
||||
FoniaJS.showInfo('Aplikasi telah di Update.<br>Silakan Log Out dari Aplikasi<br>Lalu refresh browser Anda!');
|
||||
} else {
|
||||
FoniaJS.showInfo('Aplikasi gagal di Update.');
|
||||
}
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}
|
||||
};
|
||||
@@ -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();
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,59 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/sys/config.js
|
||||
Desc. : JS - Konfigurasi Aplikasi
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : May 25th, 2010.
|
||||
Last Modified : September 30th, 2025.
|
||||
|
||||
(c) 2010 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var ConfigJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butUbah').click(function(){this.proses_edit();}.bind(this));
|
||||
$('#butSimpan').click(function(){this.proses_save();}.bind(this));
|
||||
this.data_query('view');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
this.data_query('edit');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=master','mode=save','REG_ID','REG_ADDRESS','REG_CITY','REG_POSTCODE','REG_PHONE','REG_FAX','REG_WEBSITE','REG_EMAIL','REG_OWNER','REG_NPWP'],
|
||||
onSuccess: function(txt){
|
||||
$('#divMaster').html(txt);
|
||||
this.update_event();
|
||||
}.bind(this)
|
||||
}).send()
|
||||
},
|
||||
|
||||
data_query: function(mode){
|
||||
new Request({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=master','mode='+mode,'REG_ID'],
|
||||
onSuccess: function(txt){
|
||||
$('#divMaster').html(txt);
|
||||
this.update_event();
|
||||
}.bind(this)
|
||||
}).send()
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$("#butUbah").prop('disabled', true);
|
||||
$("#butSimpan").prop('disabled', false);
|
||||
} else {
|
||||
$("#butUbah").prop('disabled', false);
|
||||
$("#butSimpan").prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
@@ -0,0 +1,55 @@
|
||||
/*******************************************************************
|
||||
|
||||
Module : /apps/js/sys/printer.js
|
||||
Desc. : JS - Konfigurasi Printer POS
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : August 4th, 2013.
|
||||
Last Modified : November 7th, 2025.
|
||||
|
||||
(c) 2013 - 2025, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
var PrinterJS = {
|
||||
PHP: '',
|
||||
KODE: '',
|
||||
|
||||
loading: function(){
|
||||
$('#butUbah').click(function(){this.proses_edit();}.bind(this));
|
||||
$('#butSimpan').click(function(){this.proses_save();}.bind(this));
|
||||
this.data_query('form-printer');
|
||||
},
|
||||
|
||||
proses_edit: function(){
|
||||
this.data_query('form-printer', 'edit');
|
||||
},
|
||||
|
||||
proses_save: function(){
|
||||
this.data_query('form-printer', 'save');
|
||||
},
|
||||
|
||||
data_query: function(tipe, mode){
|
||||
if (tipe=='form-printer'){
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=form-printer','mode='+mode,'REG_ID','PRINT_AUTO','PRINT_OPENCD','PRINT_AUTOCUT','PRINT_ROW','TITLE_END'],
|
||||
onSuccess: function(a){
|
||||
$('#divPrinter').html(a.html);
|
||||
this.update_event();
|
||||
if (a.sukses) FoniaJS.showInfo('Konfigurasi printer sukses disimpan!');
|
||||
}.bind(this)
|
||||
}).send();
|
||||
}
|
||||
},
|
||||
|
||||
update_event: function(){
|
||||
if ($.inArray($('#mode').val(), ['edit']) >= 0) {
|
||||
$('#butUbah').prop('disabled', true);
|
||||
$('#butSimpan').prop('disabled', false);
|
||||
} else {
|
||||
$('#butUbah').prop('disabled', false);
|
||||
$('#butSimpan').prop('disabled', true);
|
||||
}
|
||||
}
|
||||
|
||||
};
|
||||
Reference in New Issue
Block a user