Merge branch '2013.03'
authorPhilipp Schüle <p.schuele@metaways.de>
Fri, 23 Aug 2013 16:02:18 +0000 (18:02 +0200)
committerPhilipp Schüle <p.schuele@metaways.de>
Fri, 23 Aug 2013 16:02:18 +0000 (18:02 +0200)
1  2 
tine20/Tinebase/js/widgets/mainscreen/WestPanel.js

@@@ -3,7 -3,7 +3,7 @@@
   * 
   * @license     http://www.gnu.org/licenses/agpl.html AGPL Version 3
   * @author      Cornelius Weiss <c.weiss@metaways.de>
 - * @copyright   Copyright (c) 2007-2010 Metaways Infosystems GmbH (http://www.metaways.de)
 + * @copyright   Copyright (c) 2007-2013 Metaways Infosystems GmbH (http://www.metaways.de)
   */
  Ext.ns('Tine.widgets.mainscreen');
  
@@@ -98,9 -98,9 +98,9 @@@ Ext.extend(Tine.widgets.mainscreen.West
          
          if (this.hasContainerTreePanel === null) {
              this.hasContainerTreePanel = true;
 -            if(this.contentTypes) {
 +            if (this.contentTypes) {
                  Ext.each(this.contentTypes, function(ct) {
 -                    if (((ct.hasOwnProperty('model') && ct.model == this.contentType) || (ct.hasOwnProperty('meta') && ct.meta.modelName == this.contentType)) && (ct.singularContainerMode)) {
 +                    if ((ct.hasOwnProperty('modelName') && ct.modelName == this.contentType) && (ct.singularContainerMode)) {
                          this.hasContainerTreePanel = false;
                          return false;
                      }
          
          this.items = this.getPortalColumn();
          Tine.widgets.mainscreen.WestPanel.superclass.initComponent.apply(this, arguments);
 -    },    
 +    },
      
      /**
       * called after rendering process
       */
      getContainerTreePanel: function() {
          var panelName = this.app.getMainScreen().getActiveContentType() + 'TreePanel';
-         if(!this[panelName]) {
-             if(Tine[this.app.appName].hasOwnProperty(panelName)) this[panelName] = new Tine[this.app.appName][panelName]({app: this.app});
-             else this[panelName] = new Tine.widgets.persistentfilter.PickerPanel({app: this.app});
+         if (! this[panelName]) {
+             if (Tine[this.app.appName].hasOwnProperty(panelName)) {
+                 this[panelName] = new Tine[this.app.appName][panelName]({app: this.app});
+             } else {
+                 this[panelName] = new Tine.widgets.persistentfilter.PickerPanel({app: this.app});
+             }
              this[panelName].on('click', function (node, event) {
                  if(node != this.lastClickedNode) {
                      this.lastClickedNode = node;
       * @return {Tine.widgets.grid.FilterPlugin}
       */
      getFilterPlugin: function(contentType) {
 -        if(this.hasContainerTreePanel) {
 +        if (this.hasContainerTreePanel) {
              return this.getContainerTreePanel().getFilterPlugin();
          } else {
              return new Tine.widgets.grid.FilterPlugin({