Merge commit 'a4cb4d96face514924387d34746b3148848ac092' into zope-2.13
authorBenoît Pin <pin@cri.ensmp.fr>
Wed, 16 Jul 2014 09:11:07 +0000 (11:11 +0200)
committerBenoît Pin <pin@cri.ensmp.fr>
Wed, 16 Jul 2014 09:11:07 +0000 (11:11 +0200)
Intrégration de Solr effectuée. Reste à le rendre optionnel.

Folder.py
profiles/default/types/Portfolio.xml
profiles/photo/properties.xml
profiles/photo/types/Portfolio.xml
skins/ajax_scripts/ajax_form_manager.js
skins/ajax_scripts/javascript_events_api.js
skins/generic/batch_macros.pt

index 2c498c6..8ed3cc3 100644 (file)
--- a/Folder.py
+++ b/Folder.py
@@ -1,7 +1,7 @@
 # -*- 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                       #
@@ -266,7 +266,9 @@ class PlinnFolder(CMFCatalogAware, PortalFolder, DefaultDublinCoreImpl) :
         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):
index 3be7ccb..f8c9fec 100644 (file)
@@ -28,7 +28,7 @@
  <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=""
index 854f3ec..7ef7fb6 100644 (file)
@@ -27,8 +27,8 @@
  <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>
index 4127495..f8c9fec 100644 (file)
@@ -28,7 +28,7 @@
  <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"
@@ -40,7 +40,7 @@
  <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=""
index 248f183..acca796 100644 (file)
@@ -1,4 +1,4 @@
-// (c) Benoît PIN 2006-2007
+// (c) Benoît PIN 2006-2014
 // http://plinn.org
 // Licence GPL
 // 
index 4e721e2..2539fd9 100644 (file)
@@ -1,4 +1,4 @@
-// (c) Benoît PIN 2006-2009
+// (c) Benoît PIN 2006-2014
 // http://plinn.org
 // Licence GPL
 // 
@@ -6,7 +6,7 @@
 // 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.
@@ -26,7 +26,11 @@ var getCopyOfNode; /* (node) returns a clone of the given node.
                                                * 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(){
 
@@ -41,6 +45,8 @@ function buildMetaFunctions() {
        disablePropagation = _build_disablePropagation();
        getWindowWidth = _build_getWindowWidth();
        getWindowHeight = _build_getWindowHeight();
+       getWindowScrollX = _build_getWindowScrollX();
+       getWindowScrollY = _build_getWindowScrollY();
        clearSelection = _build_clearSelection();
 }
 
@@ -206,6 +212,32 @@ function _build_getWindowHeight() {
        }
 }
 
+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() {
@@ -219,9 +251,19 @@ function _build_clearSelection() {
        }
 }
 
-
 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;
index 78fd9f7..b753a16 100644 (file)
      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">
-       &laquo;&nbsp;<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>&nbsp;&raquo;
+       <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">