Merge branch 'pu/2013.10-mailto' into 2014.09
authorPhilipp Schüle <p.schuele@metaways.de>
Tue, 9 Dec 2014 14:36:34 +0000 (15:36 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 9 Dec 2014 14:36:34 +0000 (15:36 +0100)
Conflicts:
tine20/Tinebase/js/MainMenu.js

Change-Id: I701c3cfdf21e1c351b6e055e3b6af459e4c20fe1

1  2 
tine20/Tinebase/Tinebase.jsb2
tine20/Tinebase/js/ExceptionHandler.js
tine20/Tinebase/js/MainMenu.js
tine20/Tinebase/js/common.js
tine20/Tinebase/js/widgets/grid/FileUploadGrid.js

Simple merge
@@@ -105,26 -106,14 +106,34 @@@ Tine.Tinebase.MainMenu = Ext.extend(Ext
                  this.action_notificationPermissions,
                  this.action_installChromeWebApp
              ];
 -
 +            
 +            if (Tine.Tinebase.registry.get('userAccountChanged')) {
 +                this.action_returnToOriginalUser = new Tine.widgets.account.ChangeAccountAction({
 +                    returnToOriginalUser: true,
 +                    text: _('Return to original user account')
 +                });
 +                this.userActions = this.userActions.concat(this.action_returnToOriginalUser);
 +                
 +            } else if (Tine.Tinebase.registry.get("config") 
 +                && Tine.Tinebase.registry.get("config").roleChangeAllowed 
 +                && Tine.Tinebase.registry.get("config").roleChangeAllowed.value) 
 +            {
 +                this.action_changeUserAccount = new Tine.widgets.account.ChangeAccountAction({});
 +                
 +                var roleChangeAllowed = Tine.Tinebase.registry.get("config").roleChangeAllowed.value,
 +                    currentAccountName = Tine.Tinebase.registry.get('currentAccount').accountLoginName;
 +                if (roleChangeAllowed[currentAccountName]) {
 +                    this.userActions = this.userActions.concat(this.action_changeUserAccount);
 +                }
 +            }
++            
+             var regItems = Ext.ux.ItemRegistry.itemMap['Tine.Tinebase.MainMenu.userActions'] || [];
 -
++            
+             Ext.each(regItems, function(reg) {
+                 var addItem = def = reg.item;
+                 this.userActions.push(addItem);
+             }, this);
          }
          return this.userActions;
      },
Simple merge