Commits

Sebastian Sdorra  committed f107d44

set focus to name field

  • Participants
  • Parent commits 95dc843

Comments (0)

Files changed (1)

File scm-webapp/src/main/webapp/resources/js/sonia.group.js

       fields: [ 'name' ]
     });
 
+    var update = this.data != null;
+
     var config = {
       title: 'Edit Group',
+      listeners: {
+        afterrender: function(){
+          if ( ! update ){
+            Ext.getCmp('nameField').focus(true, 500);
+          }
+        }
+      },
       items:[{
+        id: 'nameField',
         fieldLabel:'Name',
         name:'name',
         anchor: '100%',
         allowBlank: false,
-        readOnly: this.data != null
+        readOnly: update
       },{
         fieldLabel: 'Members',
         xtype: 'fieldset',