[Testbot] Plone 5.0 - Python 2.7 - Build # 4166 - Fixed! - 0 failure(s)

jenkins at plone.org jenkins at plone.org
Mon Feb 9 21:11:41 UTC 2015


-------------------------------------------------------------------------------
Plone 5.0 - Python 2.7 - Build # 4166 - Fixed!
-------------------------------------------------------------------------------

http://jenkins.plone.org/job/plone-5.0-python-2.7/4166/


-------------------------------------------------------------------------------
CHANGES
-------------------------------------------------------------------------------

Repository: plone.app.event
Branch: refs/heads/master
Date: 2015-02-09T14:43:23-06:00
Author: vangheem (vangheem) <vangheem at gmail.com>
Commit: https://github.com/plone/plone.app.event/commit/ab6dee5670291e42a8449dfe2b968e49198e108d

mod again to only get portlet data instead of reloading the whole page

Files changed:
M plone/app/event/portlets/portlet_calendar.pt
M plone/app/event/portlets/portlet_calendar.py

diff --git a/plone/app/event/portlets/portlet_calendar.pt b/plone/app/event/portlets/portlet_calendar.pt
index cb7cb2c..6909b49 100644
--- a/plone/app/event/portlets/portlet_calendar.pt
+++ b/plone/app/event/portlets/portlet_calendar.pt
@@ -15,7 +15,7 @@
         tal:attributes="href view/prev_query;
                         data-year prev_year;
                         data-month prev_month;
-                        data-pat-contentloader python: view.nav_pattern_options"
+                        data-pat-contentloader python: view.nav_pattern_options(prev_year, prev_month)"
         i18n:attributes="title title_previous_month;">«</a>
 
     <span i18n:translate="" tal:omit-tag="">
@@ -33,7 +33,7 @@
          tal:attributes="href view/next_query;
                          data-year next_year;
                          data-month next_month;
-                         data-pat-contentloader python: view.nav_pattern_options"
+                         data-pat-contentloader python: view.nav_pattern_options(next_year, next_month)"
          i18n:attributes="title title_next_month;">»</a>
   </header>
 
diff --git a/plone/app/event/portlets/portlet_calendar.py b/plone/app/event/portlets/portlet_calendar.py
index d8be1ca..07cdbc7 100644
--- a/plone/app/event/portlets/portlet_calendar.py
+++ b/plone/app/event/portlets/portlet_calendar.py
@@ -18,6 +18,7 @@
 from zope import schema
 from zope.i18nmessageid import MessageFactory
 from zope.interface import implements
+from zope.component.hooks import getSite
 
 import calendar
 import json
@@ -228,17 +229,20 @@ def cal_data(self):
                  'events': date_events})
         return caldata
 
-    @property
-    def nav_pattern_options(self):
+    def nav_pattern_options(self, year, month):
         return json.dumps({
-            'url': 'el',
-            'content': '#portletwrapper-%s' % self.hash,
-            'target': '#portletwrapper-%s' % self.hash
+            'url': '%s/@@render-portlet?portlethash=%s&year=%s&month=%s' % (
+                getSite().absolute_url(),
+                self.hash,
+                year, month),
+            'target': '#portletwrapper-%s > *' % self.hash
         })
 
     @property
     def hash(self):
-        return self.__portlet_metadata__.get('hash', '')
+        return self.request.form.get(
+            'portlethash',
+            getattr(self, '__portlet_metadata__', {}).get('hash', ''))
 
 
 class AddForm(base.AddForm):




-------------------------------------------------------------------------------


More information about the Testbot mailing list