0013104: One cannot add a new calendar within the calendar-app
authorMichael Spahn <m.spahn@metaways.de>
Tue, 23 May 2017 09:46:48 +0000 (11:46 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Tue, 23 May 2017 15:59:20 +0000 (17:59 +0200)
https://forge.tine20.org/view.php?id=13104

Change-Id: Ieb142ccc9601e535cb33d20e3ab1dc670dd7dad5
Reviewed-on: http://gerrit.tine20.com/customers/4734
Tested-by: Jenkins CI (http://ci.tine20.com/)
Reviewed-by: Philipp Schüle <p.schuele@metaways.de>
tine20/Calendar/js/TreePanel.js

index 333a9cb..47de0a5 100644 (file)
@@ -137,7 +137,10 @@ Tine.Calendar.TreePanel = Ext.extend(Tine.widgets.container.TreePanel, {
             );
         }
 
-        this.action_editResource.setHidden(! grants.readGrant || ! resourceId);
+        if (grants) {
+            this.action_editResource.setHidden(! grants.readGrant || ! resourceId);
+        }
+
         this.action_editResource.resourceId = resourceId;
 
         this.supr().onContextMenu.apply(this, arguments);