Intrégration de Solr effectuée. Reste à le rendre optionnel.
# -*- coding: utf-8 -*-
#######################################################################################
# Plinn - http://plinn.org #
-# Copyright (C) 2005-2007 Benoît PIN <benoit.pin@ensmp.fr> #
+# Copyright (C) 2005-2014 Benoît Pin <benoit.pin@ensmp.fr> #
# #
# This program is free software; you can redistribute it and/or #
# modify it under the terms of the GNU General Public License #
ctool = getUtilityByInterfaceName('Products.CMFCore.interfaces.ICatalogTool')
contentFilter['path'] = {'query':'/'.join(self.getPhysicalPath()),
'depth':1}
- return ctool(sort_on='position', **contentFilter)
+ if not contentFilter.has_key('sort_on') :
+ contentFilter['sort_index'] = 'position'
+ return ctool(**contentFilter)
security.declarePublic('synContentValues')
def synContentValues(self):
<action title="Slide show" action_id="noajax" category="object"
condition_expr="python:object.listNearestFolderContents(contentFilter={'portal_type' : 'Photo'})"
icon_expr="" link_target="" url_expr="string:${object_url}/slide_show"
- visible="True">
+ visible="False">
<permission value="View"/>
</action>
<action title="Presentation" action_id="presentation" category="object"
<action title="List" action_id="folderContents" category="object"
condition_expr="" icon_expr="" link_target=""
url_expr="string:${object_url}/folder_contents" visible="True">
- <permission value="List folder contents"/>
- </action>
- <action title="Import" action_id="import" category="object" condition_expr=""
- icon_expr="" link_target=""
- url_expr="string:${object_url}/portfolio_edit_form" visible="True">
- <permission value="Add portal content"/>
+ <permission value="Modify portal content"/>
</action>
<action title="Share" action_id="localroles" category="object"
condition_expr="" icon_expr="" link_target=""
<property name="ajax_config" type="int">2</property>
<property name="copyright_notice"
type="string"></property>
- <property name="thumb_size" type="int">192</property>
- <property name="slide_size" type="int">222</property>
+ <property name="thumb_size" type="int">278</property>
+ <property name="slide_size" type="int">300</property>
<property name="tiles_background_color" type="string">#484848</property>
<property name="tiles_min_zoom" type="int">25</property>
<property name="tiles_max_zoom" type="int">100</property>
<action title="Slide show" action_id="noajax" category="object"
condition_expr="python:object.listNearestFolderContents(contentFilter={'portal_type' : 'Photo'})"
icon_expr="" link_target="" url_expr="string:${object_url}/slide_show"
- visible="True">
+ visible="False">
<permission value="View"/>
</action>
<action title="Presentation" action_id="presentation" category="object"
<action title="List" action_id="folderContents" category="object"
condition_expr="" icon_expr="" link_target=""
url_expr="string:${object_url}/folder_contents" visible="True">
- <permission value="List folder contents"/>
+ <permission value="Modify portal content"/>
</action>
<action title="Share" action_id="localroles" category="object"
condition_expr="" icon_expr="" link_target=""
-// (c) Benoît PIN 2006-2007
+// (c) Benoît PIN 2006-2014
// http://plinn.org
// Licence GPL
//
-// (c) Benoît PIN 2006-2009
+// (c) Benoît PIN 2006-2014
// http://plinn.org
// Licence GPL
//
// Meta functions for events management.
var addListener; /* (ob, eventName, listenerFunction, group) add event listener eventName without "on" prefix.
- * optionally, listeners can be grouped to make removing convenient.
+ * optionally, listeners can be grouped to make removing convenient.
*/
var removeListener; // (ob, eventName, listenerFunction, group) remove event listener.
var removeGroupListeners; // (group) remove all listeners in group.
* the node came from a foreign document (eg. XmlHttpRequest xml reponse)
* to inject HMTL code inside tags where innerHtml is read only (IE)
*/
+
var copyPrototype; // (descendant, parent) lightwheight javascript inheritance
+if (!history.pushState) {
+ history.pushState = function(){};
+}
(function(){
disablePropagation = _build_disablePropagation();
getWindowWidth = _build_getWindowWidth();
getWindowHeight = _build_getWindowHeight();
+ getWindowScrollX = _build_getWindowScrollX();
+ getWindowScrollY = _build_getWindowScrollY();
clearSelection = _build_clearSelection();
}
}
}
+function _build_getWindowScrollX() {
+ if (window.scrollX !== undefined) {
+ return function(){
+ return window.scrollX;
+ };
+ }
+ else {
+ return function(){
+ return document.documentElement.scrollLeft;
+ };
+ }
+}
+
+function _build_getWindowScrollY() {
+ if (window.scrollY !== undefined) {
+ return function(){
+ return window.scrollY;
+ };
+ }
+ else {
+ return function(){
+ return document.documentElement.scrollTop;
+ };
+ }
+}
+
function _build_clearSelection() {
if (document.selection) {
return function() {
}
}
-
buildMetaFunctions();
+addListener(window, 'load', function(evt) {
+ // html5 facade
+ if (!document.body.classList) {
+ var nop = function(){};
+ var fakeDOMTokenList = {'length':0, 'item':nop, 'contains':nop, 'add':nop, 'remove':nop, 'toggle':nop};
+ Element.prototype.classList = fakeDOMTokenList;
+ }
+});
+
+
+
var ELEMENT_NODE = 1;
var TEXT_NODE = 3;
var _setAttribute;
i18n:domain="plinn">
<a href="" class="previous"
- tal:define="p batch/previous | nothing"
- tal:attributes="href python: '%s?%s' % (url , mq( form, {batch.b_start_str:p.first} ))"
- tal:condition="p">
- « <span i18n:translate="batch_previous_x_items" tal:omit-tag="">Previous<span i18n:name="number" tal:content="p/length" tal:omit-tag="">n</span></span>
+ tal:define="p batch/previous | nothing"
+ tal:attributes="href python: '%s?%s' % (url , mq( form, {batch.b_start_str:p.first} ))"
+ tal:condition="p">
+ « <span i18n:translate="batch_previous_x_items" tal:omit-tag="">previous <span i18n:name="number" tal:content="p/length" tal:omit-tag="">n</span></span>
</a>
<a href="" class="next"
tal:define="n batch/next | nothing"
tal:condition="n"
tal:attributes="href python: '%s?%s' % (url , mq( form, {batch.b_start_str:n.first} ))">
- <span i18n:translate="batch_next_x_items" tal:omit-tag="">Next<span i18n:name="number" tal:content="n/length">n</span>items</span> »
+ <span i18n:translate="batch_next_x_items" tal:omit-tag="">next <span i18n:name="number" tal:content="n/length">n</span></span> »
</a>
<span tal:condition="python: 1 not in batch.navlist">