From a21714242076697ef8c9b4c61c1e229bb7afa352 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Benoi=CC=82t=20Pin?= Date: Sun, 29 Jun 2014 22:42:50 +0200 Subject: [PATCH] =?utf8?q?Taille=20du=20batch=20reprise=20dans=20les=20par?= =?utf8?q?am=C3=A8tres=20globaux=20du=20portail.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- skins/getPhotoContextInfos.py | 4 +++- skins/lightboxcontext.py | 2 +- skins/selectioncontext.py | 2 +- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/skins/getPhotoContextInfos.py b/skins/getPhotoContextInfos.py index f332b2a..71b4aea 100755 --- a/skins/getPhotoContextInfos.py +++ b/skins/getPhotoContextInfos.py @@ -3,9 +3,11 @@ from ZTUtils import make_query as mq from Products.CMFCore.utils import getToolByName pptool = getToolByName(context, 'portal_photo_print', None) uidtool = getToolByName(context, 'portal_uidhandler') +utool = getToolByName(context, 'portal_url') +portal = utool.getPortalObject() form = context.REQUEST.form portfolio = context.getParentNode() -bsize = form.get('b_size',20) +bsize = portal.getProperty('default_batch_size', 20) infos = [] index = 0 diff --git a/skins/lightboxcontext.py b/skins/lightboxcontext.py index d031b1a..9458974 100644 --- a/skins/lightboxcontext.py +++ b/skins/lightboxcontext.py @@ -2,7 +2,6 @@ from Products.CMFCore.utils import getToolByName from Products.Portfolio.utils import translate def _(message) : return translate(message, context).encode('utf-8') -bsize = 20 options = {} uidh = getToolByName(context, 'portal_uidhandler') @@ -17,6 +16,7 @@ req = context.REQUEST toUrl = req.physicalPathToURL resp = req.RESPONSE selDict = req.SESSION.get('objects_selection_dict', {}) +bsize = portal.getProperty('default_batch_size', 20) if traverse_subpath[-1] == 'photo_view_ajax' : photoSubPath = traverse_subpath[:-1] diff --git a/skins/selectioncontext.py b/skins/selectioncontext.py index 8539a4e..df3e63b 100644 --- a/skins/selectioncontext.py +++ b/skins/selectioncontext.py @@ -2,7 +2,6 @@ from Products.CMFCore.utils import getToolByName from Products.Portfolio.utils import translate def _(message) : return translate(message, context).encode('utf-8') -bsize = 20 options = {} uidh = getToolByName(context, 'portal_uidhandler') @@ -16,6 +15,7 @@ portalDepth = len(portal.getPhysicalPath()) req = context.REQUEST toUrl = req.physicalPathToURL resp = req.RESPONSE +bsize = portal.getProperty('default_batch_size', 20) if traverse_subpath[-1] == 'photo_view_ajax' : photoSubPath = traverse_subpath[:-1] -- 2.20.1