Skip to content

Commit 2df6c7a

Browse files
committed
Auto-adjust window location when taller than page
1 parent 3b2f651 commit 2df6c7a

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

mcc/resources/web/mcc/window/MarkShippedWindow.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,14 @@ Ext4.define('MCC.window.MarkShippedWindow', {
9393
handler: function(btn){
9494
btn.up('window').close();
9595
}
96-
}]
96+
}],
97+
listeners: {
98+
show: function(win){
99+
if (win.getHeight() > Ext4.getBody().getHeight()) {
100+
win.alignTo(Ext4.getBody(), 't-t?');
101+
}
102+
}
103+
}
97104
});
98105

99106
this.callParent(arguments);

0 commit comments

Comments
 (0)