toutpt / collective.js.fancybox

jquery.fancybox registration into Plone resource registries.
2 stars 3 forks source link

Advanced integration in Plone and some subproducts #1

Open gbastien opened 12 years ago

gbastien commented 12 years ago

Hi Jean-Michel,

we are using this package but always need to integrate it in Plone by adding some code. We would like to build a package for these systematic changes to be easily installable and I wondered if it could be integrated as profiles in collective.js.fancybox. I would create a profile named for example "integration" having some steps to integrate it :

What do you think about such an integration in this package? Or rather in another?

Gauthier

toutpt commented 12 years ago

Hi Gauthier,

It depends on the goal to achieve. If it's reccurrent need you can add viewlets that could be activated throw portal_registry for example. The idea of collective.js.* namespace is to just provide the javascripts and no integration at all.

For example I have added some components to collective.js.datatables, but nothing activated by default.

You can provide a javascript like ++resources++collective.js.fancybox_init but not registred by default and add documentation to let integrators know it exists.

Adding profile is quite bad because of the support in Plone's UI. QuickInstaller doens't like this, the default is used because it 's the first one (in the list of profile). If you create a 'content' profile the QI will use it ... shame ....

If you need real features, I would recommand to create an other packages.

You can also check collective.js.jqueryui which provide viewlet to have I18N support.

Let me know if you need sth (pypi rights, ...) and do not forget the upgrade step.

Regards / Cordialement, JeanMichel FRANCOIS Find me on Twitter http://twitter.com/toutpt / Retrouvez moi sur Twitterhttp://twitter.com/toutpt_nantes

2012/7/19 Gauthier Bastien < reply@reply.github.com

Hi Jean-Michel,

we are using this package but always need to integrate it in Plone by adding some code. We would like to build a package for these systematic changes to be easily installable and I wondered if it could be integrated as profiles in collective.js.fancybox. I would create a profile named for example "integration" having some steps to integrate it :

  • with the default Plone News item elements
  • being able to define it easily in a classic Document (using a specific class)
  • integration with leadimage

What do you think about such an integration in this package? Or rather in another?

Gauthier


Reply to this email directly or view it on GitHub: https://github.com/toutpt/collective.js.fancybox/issues/1

gbastien commented 12 years ago

Yes, the idea is to create a small set of interesting behaviour for it.

We know about the profile name problems, we would for example create an "extra" profile where some css and js could easily be activated (not by default). In fact, this resides in some lines of code and a page of documentation to explain how to install/use it, but I think this would permit "normal" users, aka no programmer/no advanced integrators to use this package because out of the box, you need advanced (...) knowledge to use it.

Well, I will fork and add this, if that seems right, you will merge it and if not, I will have somewhere to redirect users for when they ask about it ;-)

Regards,

Gauthier

gbastien commented 12 years ago

Hi,

you can see here what I more or less expect to do about integration of fancybox in Plone : https://github.com/gbastien/collective.js.fancybox/commit/1bfb177c22a1e93f32e1f716ca857c65ea972edb

This is just a proof of concept, there are many ways to go... I propose one js by "behaviour" and the default portal_registry as placeholder for configuration and behaviour activation.

It obviously miss an uninstall step and a sufficient documentation but what do you think about this? Could this be integrated in c.js.f or another package like collective.fancybox that depends on c.js.f is the way to go?

By the way, thank you for the work you did over c.js.f. I saw there was a 2.0.x version out now for some time, and reyling on jQuery 1.6+, do you already tried it with plone.app.jquery 1.7.2?

Have a nice day,

Gauthier