[pve-devel] [PATCH pmg-gui 1/2] use LanguageEditWindow from widget-toolkit

Dominik Csapak d.csapak at proxmox.com
Fri Apr 17 13:23:37 CEST 2020


Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
 js/QuarantineView.js | 27 ++-------------------------
 1 file changed, 2 insertions(+), 25 deletions(-)

diff --git a/js/QuarantineView.js b/js/QuarantineView.js
index 3d0e9e1..1958a2d 100644
--- a/js/QuarantineView.js
+++ b/js/QuarantineView.js
@@ -131,31 +131,8 @@ Ext.define('PMG.QuarantineView', {
 	},
 
 	changeLanguage: function() {
-	    Ext.create('Ext.window.Window', {
-		title: gettext('Language'),
-		bodyPadding: 10,
-		items: [
-		    {
-			xtype: 'proxmoxLanguageSelector',
-			fieldLabel: gettext('Language'),
-			value: Ext.util.Cookies.get('PMGLangCookie') || 'en',
-		    },
-		],
-
-		buttons: [
-		    {
-			text: gettext('OK'),
-			handler: function() {
-			    let me = this;
-			    let win = this.up('window');
-			    let value = win.down('proxmoxLanguageSelector').getValue();
-			    var dt = Ext.Date.add(new Date(), Ext.Date.YEAR, 10);
-			    Ext.util.Cookies.set('PMGLangCookie', value, dt);
-			    win.mask(gettext('Please wait...'), 'x-mask-loading');
-			    window.location.reload();
-			},
-		    }
-		]
+	    Ext.create('Proxmox.window.LanguageEditWindow', {
+		cookieName: 'PMGLangCookie'
 	    }).show();
 	},
 
-- 
2.20.1





More information about the pve-devel mailing list