Merge branch 'pu/2013.10-mailto' into 2014.11-develop
authorPhilipp Schüle <p.schuele@metaways.de>
Wed, 4 Feb 2015 12:43:52 +0000 (13:43 +0100)
committerPhilipp Schüle <p.schuele@metaways.de>
Wed, 4 Feb 2015 12:43:52 +0000 (13:43 +0100)
Conflicts:
tine20/Tinebase/js/MainMenu.js

Change-Id: Iff5447f347286824e7b8bcc824b9a084ea606ebe

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

Simple merge
Simple merge
@@@ -102,28 -103,17 +103,36 @@@ Tine.Tinebase.MainMenu = Ext.extend(Ext
                  this.action_editProfile,
                  this.action_showPreferencesDialog,
                  this.action_changePassword,
 -                this.action_notificationPermissions,
 -                this.action_installChromeWebApp
 +                this.action_notificationPermissions
              ];
 -
 +            
 +            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