-
Bug
-
Resolution: Fixed
-
Major
-
4.0M8
-
None
-
None
-
FF
How to reproduce :
- overide photosGallery-main.xsl with this code :
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2012 Anyware Services Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" xmlns:ametys="org.ametys.web.transformation.xslt.AmetysXSLTHelper" xmlns:resolver="org.ametys.cms.transformation.xslt.ResolveURIComponent" exclude-result-prefixes="ametys" extension-element-prefixes="resolver"> <xsl:import href="plugin:multimedia://stylesheets/content/photosGallery/photosGallery-main.xsl"/> <xsl:import href="photosGallery.xsl"/> <xsl:template name="unitegallery-view"> <script type="text/javascript" src="{ametys:skinURL('js/unitegallery/themes/tilesgrid/ug-theme-tilesgrid.js')}"></script> <script type="text/javascript"> jQuery(document).ready(function(){ jQuery("#gallery-<xsl:value-of select="$uniqueId"/>").unitegallery({ grid_space_between_cols:4, grid_space_between_rows:4, tile_enable_border:false, tile_enable_shadow:false, grid_padding:0, tile_width:250, }); }); </script> </xsl:template> <xsl:template name="photo"> <img src="{resolver:resolveBoundedImage(image/@type, image/@path, 281, 0)}" alt="{alt-text}" data-image="{resolver:resolve(image/@type, image/@path)}" /> </xsl:template> </xsl:stylesheet>
- Overide the photosGallery.xsl with this code :
<?xml version="1.0" encoding="UTF-8"?> <!-- Copyright 2012 Anyware Services Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License. --> <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform" xmlns:i18n="http://apache.org/cocoon/i18n/2.1" xmlns:ametys="org.ametys.web.transformation.xslt.AmetysXSLTHelper" xmlns:math="http://exslt.org/math" exclude-result-prefixes="ametys"> <xsl:variable name="uniqueId" select="substring-after(math:random(), '.')"/> <xsl:template name="common-content-head-css"> <link rel="stylesheet" type="text/css" href="{ametys:skinURL('css/content/content.css')}" media="screen, print, handheld"/> <link rel="stylesheet" type="text/css" href="{ametys:skinURL('css/photosgallery.css')}" media="screen, print, handheld"/> <!-- Unite Gallery --> <link rel="stylesheet" href="{ametys:skinURL('js/unitegallery/css/unite-gallery.css')}" type="text/css" /> <link rel="stylesheet" href="{ametys:skinURL('js/unitegallery/themes/default/ug-theme-default.css')}" type="text/css" /> </xsl:template> <xsl:template name="common-content-head-js"> <!-- Unite Gallery --> <script type="text/javascript" src="{ametys:skinURL('js/unitegallery/unitegallery.min.js')}"></script> <xsl:call-template name="unitegallery-view" /> </xsl:template> <xsl:template name="photos"> <xsl:if test="metadata/photos/entry/image"> <div class="photosGallery-container"> <div id="gallery-{$uniqueId}" style="display:none;"> <xsl:for-each select="metadata/photos/entry[image]"> <xsl:call-template name="photo"/> </xsl:for-each> </div> </div> </xsl:if> </xsl:template> </xsl:stylesheet>
- put the unitegallery folder in the js resources of your skin (resources/js/)
In developpement mode, all works right
In production mode (with minified CSS), the rendering of the photo gallery has some graphical bugs