Refactor AJAX requests from Request.JSONF to Request_JSF across multiple scripts for consistency and improved functionality.
This commit is contained in:
@@ -22,7 +22,7 @@ var RepoInvLabelJS = {
|
||||
},
|
||||
|
||||
proses_empty: function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=empty']
|
||||
}).send();
|
||||
@@ -52,7 +52,7 @@ var RepoInvLabelJS = {
|
||||
},
|
||||
|
||||
produk_simpan: function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-produk'],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBProduk)
|
||||
@@ -77,7 +77,7 @@ var RepoInvLabelJS = {
|
||||
},
|
||||
|
||||
grup_select: function(acell){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=simpan-grup','Grup_InvID='+acell[0]],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winBGrup)
|
||||
@@ -103,7 +103,7 @@ var RepoInvLabelJS = {
|
||||
|
||||
detail_hapus: function(acell){
|
||||
FoniaJS.showConfirm('Konfirmasi', 'Hapus item <strong>"'+acell[1]+'"</strong> ?', () => {
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=delete','ID='+acell[0]]
|
||||
}).send();
|
||||
@@ -111,7 +111,7 @@ var RepoInvLabelJS = {
|
||||
},
|
||||
|
||||
detail_simpan: function(){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail=update','ID='+$('#ID').val(),'Nama_Produk='+encodeURIComponent($('#Nama_Produk').val())],
|
||||
onSuccess: () => FoniaJS.closeWindow(this.winDetail)
|
||||
@@ -120,18 +120,18 @@ var RepoInvLabelJS = {
|
||||
|
||||
data_query: function(tipe, mode, kd_tx){
|
||||
if (tipe=="tabel-detail"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/table_detail',
|
||||
sendParam: ['mode_detail='+mode,'No_Label'+((typeof(kd_tx)!=='undefined')?'='+kd_tx:'')]
|
||||
}).send();
|
||||
} else if (tipe=="brow-produk"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_produk',
|
||||
sendParam: ['Cari_Produk'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Produk')
|
||||
}).send();
|
||||
} else if (tipe=="brow-grup"){
|
||||
new Request.JSONF({
|
||||
new Request_JSF({
|
||||
url: this.PHP + '/brow_grup',
|
||||
sendParam: ['Cari_Grup'],
|
||||
onSuccess: () => FoniaJS.setFocus('#Cari_Grup')
|
||||
|
||||
Reference in New Issue
Block a user