]> git.proxmox.com Git - pve-manager.git/commitdiff
fix #1116: center modal windows on browser resize
authorDominik Csapak <d.csapak@proxmox.com>
Tue, 4 Oct 2016 14:29:23 +0000 (16:29 +0200)
committerDietmar Maurer <dietmar@proxmox.com>
Wed, 5 Oct 2016 05:03:27 +0000 (07:03 +0200)
Signed-off-by: Dominik Csapak <d.csapak@proxmox.com>
www/manager6/Workspace.js

index 06357a029470d041d9082271907add4ce1435dd3..7f5a4c1049ae55271de5034be7386484744d9135 100644 (file)
@@ -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');
+               });
+           }
+       });
     }
 });