hi dylan somehow an import of collective.leadimage made it into trunk with http://dev.plone.org/collective/changeset/111097/
the import should be conditional to not break collective.carousel for people that did not install leadimage. regards, harald Dylan Jay wrote: > I've just uploaded the work I've done on this > > https://svn.plone.org/svn/collective/collective.carousel/branches/djay- collective.leadimage > > I opted for doing the work in the collective.carousel package and > using the register a new tile type method conditionally on the > existence of contentleadimage. > > However I've also made some other changes. > > - the autoresizing was somewhat broken so I've made changes the the js > to make it wrap text properly and handle larger size content. > - the css wasn't very generic and doesn't play nice with normal > portlet layouts > - added a pause button to comply with accessibility standards. > > I haven't made similar changes to the viewlet version so these changes > aren't complete. > > I'm also not sure if it's possible to merge these changes in. > > --- > Dylan Jay, Plone Solutions Manager > www.pretaweb.com > tel:+61299552830 > mob:+61421477460 > skype:dylan_jay > > On 17/02/2010, at 12:55 AM, Maurits van Rees wrote: > >> Hi, >> >> For http://www.milieudefensie.nl (Friends of the Earth Netherlands) I >> am looking into integrating collective.carousel (show items of a >> collection in a viewlet or portlet, and show the next after a while, >> using javascript) and collective.contentleadimage (add a leading image >> to all content types, with archetypes.schemaextender). >> >> In essence it is easy enough (once you throw away your initial idea >> after getting some strange Unauthorized errors...) and I did that on a >> branch of collective.carousel: >> >> http://svn.plone.org/svn/collective/collective.carousel/branches/maurits- collective-contentleadimage >> >> Relevant changeset: >> http://dev.plone.org/collective/changeset/111068 >> >> Since it is so small I can just paste the few lines I added: >> >> ============================================================= >> <a href="#" >> tal:define="field python:context.getField('leadImage')" >> tal:condition="python:field and field.get_size(context) != 0" >> tal:attributes="href python:(item_type in use_view_action) and >> item_url+'/view' or item_url;"> >> <img src="" alt="" >> tal:replace="structure python:field.tag(context, >> scale='thumb', css_class='tileImage')" /> >> </a> >> ============================================================= >> >> >> I wonder if it is better to add this in one of these two packages or >> to create a new very small package to integrate this; seems overkill >> for just these few lines that do not hurt when >> collective.contentleadimage is not available (except the time needed >> to check for the existence of the field, which should hardly be >> noticeble). >> >> >> Any objections from the Jarn folks (mostly Denys Mishunov) to merge >> this to trunk? Tests pass with and without contentleadimage on Plone >> 3.3 and 4. >> >> And any plans to create an actual release of this? :-) >> >> BTW, an alternative solution in collective.carousel would be to keep >> the current tile unchanged and register a different one when >> collective.contentleadimage is installed: >> >> ============================================================= >> <browser:page >> name="carousel-view" >> + zcml:condition="not-installed collective.contentleadimage" >> for="Products.ATContentTypes.interface.IATContentType" >> template="templates/default_tile.pt" >> permission="zope2.View" >> layer="..interfaces.ICollectiveCarouselLayer" >> /> >> + >> + <browser:page >> + zcml:condition="installed collective.contentleadimage" >> + name="carousel-view" >> + for="Products.ATContentTypes.interface.IATContentType" >> + template="templates/lead_image_tile.pt" >> + permission="zope2.View" >> + layer="..interfaces.ICollectiveCarouselLayer" >> + /> >> ============================================================= >> >> >> -- >> Maurits van Rees | http://maurits.vanrees.org/ >> Work | http://zestsoftware.nl/ >> What are you going to create today? >> >> >> _______________________________________________ >> Product-Developers mailing list >> [email protected] >> http://lists.plone.org/mailman/listinfo/product-developers -- Webmeisterei GmbH - Büro für Netzfragen Tel: +43 5572 908877, Fax: +43 5572 908877-66 Steinebach 18, A-6850 Dornbirn http://www.webmeisterei.com _______________________________________________ Product-Developers mailing list [email protected] http://lists.plone.org/mailman/listinfo/product-developers
