mirror of
https://git.proxmox.com/git/proxmox-widget-toolkit
synced 2025-08-08 10:01:05 +00:00
reintroduce api2request checks for toolkit
This commit is contained in:
parent
42a6e12072
commit
5812914ce5
20
Utils.js
20
Utils.js
@ -283,7 +283,11 @@ Ext.define('Proxmox.Utils', { utilities: {
|
|||||||
Ext.apply(newopts, {
|
Ext.apply(newopts, {
|
||||||
success: function(response, options) {
|
success: function(response, options) {
|
||||||
if (options.waitMsgTarget) {
|
if (options.waitMsgTarget) {
|
||||||
options.waitMsgTarget.setLoading(false);
|
if (Proxmox.Utils.toolkit === 'touch') {
|
||||||
|
options.waitMsgTarget.setMasked(false);
|
||||||
|
} else {
|
||||||
|
options.waitMsgTarget.setLoading(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
var result = Ext.decode(response.responseText);
|
var result = Ext.decode(response.responseText);
|
||||||
response.result = result;
|
response.result = result;
|
||||||
@ -298,7 +302,11 @@ Ext.define('Proxmox.Utils', { utilities: {
|
|||||||
},
|
},
|
||||||
failure: function(response, options) {
|
failure: function(response, options) {
|
||||||
if (options.waitMsgTarget) {
|
if (options.waitMsgTarget) {
|
||||||
options.waitMsgTarget.setLoading(false);
|
if (Proxmox.Utils.toolkit === 'touch') {
|
||||||
|
options.waitMsgTarget.setMasked(false);
|
||||||
|
} else {
|
||||||
|
options.waitMsgTarget.setLoading(false);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
response.result = {};
|
response.result = {};
|
||||||
try {
|
try {
|
||||||
@ -323,8 +331,12 @@ Ext.define('Proxmox.Utils', { utilities: {
|
|||||||
|
|
||||||
var target = newopts.waitMsgTarget;
|
var target = newopts.waitMsgTarget;
|
||||||
if (target) {
|
if (target) {
|
||||||
// Note: ExtJS bug - this does not work when component is not rendered
|
if (Proxmox.Utils.toolkit === 'touch') {
|
||||||
target.setLoading(newopts.waitMsg);
|
target.setMasked({ xtype: 'loadmask', message: newopts.waitMsg} );
|
||||||
|
} else {
|
||||||
|
// Note: ExtJS bug - this does not work when component is not rendered
|
||||||
|
target.setLoading(newopts.waitMsg);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
Ext.Ajax.request(newopts);
|
Ext.Ajax.request(newopts);
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user