Merge branch '2013.03' into 2013.10
authorPhilipp Schüle <p.schuele@metaways.de>
Thu, 16 Jan 2014 20:57:01 +0000 (21:57 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Thu, 16 Jan 2014 20:57:01 +0000 (21:57 +0100)
Conflicts:
tine20/Addressbook/js/ContactEditDialog.js

1  2 
tine20/Addressbook/js/ContactEditDialog.js

@@@ -536,22 -529,14 +536,14 @@@ Tine.Addressbook.ContactEditDialog = Ex
          // NOTE: it comes again and again till
          if (this.rendered) {
              var container = this.record.get('container_id');
 -            
 +
              // handle default container
-             // TODO is this still needed? don't we already have generic default container handling?
-             if (! this.record.id) {
-                 if (this.forceContainer) {
-                     container = this.forceContainer;
-                     // only force initially!
-                     this.forceContainer = null;
-                 } else if (! Ext.isObject(container)) {
-                     container = Tine.Addressbook.registry.get('defaultAddressbook');
-                 }
-                 this.record.set('container_id', '');
+             // TODO should be generalized
+             if (! this.record.id && ! Ext.isObject(container)) {
+                 container = this.app.getMainScreen().getWestPanel().getContainerTreePanel().getSelectedContainer('addGrant', Tine.Addressbook.registry.get('defaultAddressbook'));
                  this.record.set('container_id', container);
              }
 -            
 +
              if (this.mapPanel instanceof Tine.Addressbook.MapPanel) {
                  this.mapPanel.onRecordLoad(this.record);
              }