about: update auto update from git server
This commit is contained in:
+27
-37
@@ -4,9 +4,9 @@
|
||||
Desc. : JS - Informasi Aplikasi
|
||||
Created By : Siau Pheng ([email protected]).
|
||||
Created Date : November 23th, 2011.
|
||||
Last Modified : May 1st, 2022.
|
||||
Last Modified : February 12th, 2026.
|
||||
|
||||
(c) 2011 - 2022, 3FONIA Software; WWW.3FONIA.COM.
|
||||
(c) 2011 - 2026, 3FONIA Software; WWW.3FONIA.COM.
|
||||
|
||||
*******************************************************************/
|
||||
|
||||
@@ -19,40 +19,34 @@ var AboutJS = {
|
||||
},
|
||||
|
||||
proses_checkdb: function(){
|
||||
new Request({
|
||||
new Request.JSON({
|
||||
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)
|
||||
onSuccess: (ajson) => {
|
||||
this.winCheck = FoniaJS.showWindow('CekDB', 'Cek, Perbaiki dan Optimalisasi Database', ajson.html, 500, [{},{i:'butTutup'},{i:'butWProses',v:'Proses DB !',c:'success'}], () => $('#winCekDB').find('#butWProses').click(() => this.checkdb_run()));
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
proses_update: function(){
|
||||
new Request({
|
||||
new Request.JSON({
|
||||
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)
|
||||
onSuccess: (ajson) => {
|
||||
var tomb = [{},{i:'butTutup'},{i:'butWUpdate',v:'Proses Update !',c:'success'}];
|
||||
if (ajson.is_update) tomb.pop();
|
||||
this.winUpdate = FoniaJS.showWindow('CekApp', 'Cek dan Update Aplikasi', ajson.html, 500, tomb, () => {
|
||||
$('#winCekApp').find('#butWUpdate').click(() => this.update_run());
|
||||
});
|
||||
}
|
||||
}).send();
|
||||
},
|
||||
|
||||
checkdb_run: function(){
|
||||
new Request({
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=proses_db','DB_Cek','DB_Repair','DB_Opti'],
|
||||
onSuccess: function(txt){
|
||||
onSuccess: (ajson) => {
|
||||
if ($('#DB_Hasil')) $('#DB_Hasil').removeClass('d-none').html(txt);
|
||||
FoniaJS.showInfo('Proses Database selesai', 2000);
|
||||
}
|
||||
@@ -60,21 +54,17 @@ var AboutJS = {
|
||||
},
|
||||
|
||||
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();
|
||||
new Request.JSON({
|
||||
url: this.PHP,
|
||||
sendParam: ['data=proses_update','new_sha1','new_date'],
|
||||
onSuccess: (adata) => {
|
||||
if (adata.sukses==true) {
|
||||
FoniaJS.showInfo('Aplikasi telah di Update.<br>Silakan refresh browser Anda!');
|
||||
} else {
|
||||
FoniaJS.showInfo('Aplikasi gagal di Update.');
|
||||
}
|
||||
console.log(adata.message);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
}).send();
|
||||
}
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user