Permalink
Browse files

Fix login window not resizing on client validation warning message

  • Loading branch information...
1 parent c3badd1 commit 8207d45c2d6599f6f47f77cc9f17917ce4c5d63e @nabcos nabcos committed with cstamas Nov 14, 2012
Showing with 17 additions and 2 deletions.
  1. +17 −2 nexus/nexus-webapp/src/main/webapp/js/repoServer/RepoServer.js
@@ -16,7 +16,8 @@ define('repoServer/RepoServer',['extjs', 'sonatype', 'sonatype/lib', 'nexus/conf
// Repository main Controller(conglomerate) Singleton
Sonatype.repoServer.RepoServer = (function() {
var cfg = Sonatype.config.repos,
- sp = Sonatype.lib.Permissions;
+ sp = Sonatype.lib.Permissions,
+ lastFormHeight = -1;
// ************************************
return {
@@ -29,6 +30,21 @@ define('repoServer/RepoServer',['extjs', 'sonatype', 'sonatype/lib', 'nexus/conf
defaultType : 'textfield',
monitorValid : true,
+ listeners : {
+ clientvalidation : function(form, valid) {
+ // IE does not resize the window when invalid messages are shown
+ var window, formHeight = form.getHeight();
+
+ if ( lastFormHeight !== formHeight ) {
+ window = form.findParentByType('window');
+ if ( window !== undefined ) {
+ lastFormHeight = formHeight;
+ window.setHeight(formHeight + form.getToolbarHeight());
+ }
+ }
+ },
+ scope : this
+ },
items : [{
id : 'usernamefield',
@@ -164,7 +180,6 @@ define('repoServer/RepoServer',['extjs', 'sonatype', 'sonatype/lib', 'nexus/conf
},
autoWidth : false,
width : 300,
- autoHeight : true,
modal : true,
constrain : true,
resizable : false,

0 comments on commit 8207d45

Please sign in to comment.