[pve-devel] [PATCH manager 4/4] fix #1116: center modal windows on browser resize
Dominik Csapak
d.csapak at proxmox.com
Tue Oct 4 16:29:23 CEST 2016
Signed-off-by: Dominik Csapak <d.csapak at proxmox.com>
---
www/manager6/Workspace.js | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/www/manager6/Workspace.js b/www/manager6/Workspace.js
index 06357a0..7f5a4c1 100644
--- a/www/manager6/Workspace.js
+++ b/www/manager6/Workspace.js
@@ -496,6 +496,16 @@ Ext.define('PVE.StdWorkspace', {
me.callParent();
me.updateUserInfo();
+
+ // on resize, center all modal windows
+ Ext.on('resize', function(){
+ var wins = Ext.ComponentQuery.query('window[modal]');
+ if (wins.length > 0) {
+ wins.forEach(function(win){
+ win.alignTo(me, 'c-c');
+ });
+ }
+ });
}
});
--
2.1.4
More information about the pve-devel
mailing list