]> git.proxmox.com Git - proxmox-widget-toolkit.git/blobdiff - Utils.js
fixup: vlan type: use 'Linux VLAN'
[proxmox-widget-toolkit.git] / Utils.js
index ac243ce6f3c0eef782c5184038361b7c2d044125..feff6d544701d9c2015553ed3ea80f8051e05574 100644 (file)
--- a/Utils.js
+++ b/Utils.js
@@ -1,10 +1,6 @@
 Ext.ns('Proxmox');
 Ext.ns('Proxmox.Setup');
 
-if (!Ext.isFunction(gettext)) {
-    function gettext(buf) { return buf; }
-}
-
 if (!Ext.isDefined(Proxmox.Setup.auth_cookie_name)) {
     throw "Proxmox library not initialized";
 }
@@ -61,7 +57,8 @@ Ext.define('Proxmox.Utils', { utilities: {
     groupText: gettext('Group'),
 
     language_map: {
-       zh_CN: 'Chinese',
+       zh_CN: 'Chinese (Simplified)',
+       zh_TW: 'Chinese (Traditional)',
        ca: 'Catalan',
        da: 'Danish',
        en: 'English',
@@ -283,7 +280,11 @@ Ext.define('Proxmox.Utils', { utilities: {
            Ext.apply(newopts, {
                success: function(response, options) {
                    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);
                    response.result = result;
@@ -298,7 +299,11 @@ Ext.define('Proxmox.Utils', { utilities: {
                },
                failure: function(response, options) {
                    if (options.waitMsgTarget) {
-                       options.waitMsgTarget.setLoading(false);
+                       if (Proxmox.Utils.toolkit === 'touch') {
+                           options.waitMsgTarget.setMasked(false);
+                       } else {
+                           options.waitMsgTarget.setLoading(false);
+                       }
                    }
                    response.result = {};
                    try {
@@ -323,8 +328,12 @@ Ext.define('Proxmox.Utils', { utilities: {
 
        var target = newopts.waitMsgTarget;
        if (target) {
-           // Note: ExtJS bug - this does not work when component is not rendered
-           target.setLoading(newopts.waitMsg);
+           if (Proxmox.Utils.toolkit === 'touch') {
+               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);
     },
@@ -396,6 +405,7 @@ Ext.define('Proxmox.Utils', { utilities: {
        eth: gettext("Network Device"),
        bridge: 'Linux Bridge',
        bond: 'Linux Bond',
+       vlan: 'Linux VLAN',
        OVSBridge: 'OVS Bridge',
        OVSBond: 'OVS Bond',
        OVSPort: 'OVS Port',
@@ -408,6 +418,16 @@ Ext.define('Proxmox.Utils', { utilities: {
     },
 
     task_desc_table: {
+       acmenewcert: [ 'SRV', gettext('Order Certificate') ],
+       acmeregister: [ 'ACME Account', gettext('Register') ],
+       acmedeactivate: [ 'ACME Account', gettext('Deactivate') ],
+       acmeupdate: [ 'ACME Account', gettext('Update') ],
+       acmerefresh: [ 'ACME Account', gettext('Refresh') ],
+       acmerenew: [ 'SRV', gettext('Renew Certificate') ],
+       acmerevoke: [ 'SRV', gettext('Revoke Certificate') ],
+       'move_volume': [ 'CT', gettext('Move Volume') ],
+       clustercreate: [ '', gettext('Create Cluster') ],
+       clusterjoin: [ '', gettext('Join Cluster') ],
        diskinit: [ 'Disk', gettext('Initialize Disk with GPT') ],
        vncproxy: [ 'VM/CT', gettext('Console') ],
        spiceproxy: [ 'VM/CT', gettext('Console') + ' (Spice)' ],
@@ -453,6 +473,8 @@ Ext.define('Proxmox.Utils', { utilities: {
        srvstop: ['SRV', gettext('Stop') ],
        srvrestart: ['SRV', gettext('Restart') ],
        srvreload: ['SRV', gettext('Reload') ],
+       cephcreatemgr: ['Ceph Manager', gettext('Create') ],
+       cephdestroymgr: ['Ceph Manager', gettext('Destroy') ],
        cephcreatemon: ['Ceph Monitor', gettext('Create') ],
        cephdestroymon: ['Ceph Monitor', gettext('Destroy') ],
        cephcreateosd: ['Ceph OSD', gettext('Create') ],