[gen] Calendar field: bugfixes; added params 'topPx' and 'bottomPx' allowing to define custom content before and after rendering the calendar view.

This commit is contained in:
Gaetan Delannay 2015-03-18 19:33:53 +01:00
parent e52fee658f
commit 3e6027c499
3 changed files with 145 additions and 38 deletions

View file

@ -267,8 +267,9 @@ class ToolMixin(BaseMixin):
def showPortlet(self, obj, layoutType):
'''When must the portlet be shown? p_obj and p_layoutType can be None
if we are not browing any objet (ie, we are on the home page).'''
# Not on 'edit' pages.
if layoutType == 'edit': return
# Not on 'edit' pages or if there is no root class
classes = self.getProductConfig(True).rootClasses
if not classes or (layoutType == 'edit'): return
res = True
if obj and hasattr(obj, 'showPortlet'):
res = obj.showPortlet()