You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

94 lines
3.2 KiB

  1. .. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg
  2. :target: http://www.gnu.org/licenses/agpl
  3. :alt: License: AGPL-3
  4. ===================================================
  5. Slick Carousel Widget with DarkroomJS Image Editing
  6. ===================================================
  7. This module extends the `Slick`_ carousel widget provided by
  8. `web_widget_slick` to include the `DarkroomJS`_ image editing features provided
  9. by `web_widget_darkroom`.
  10. .. _Slick: http://kenwheeler.github.io/slick
  11. .. _DarkroomJS: https://github.com/MattKetmo/darkroomjs
  12. Usage
  13. =====
  14. To create a Slick carousel widget with DarkroomJS support, follow the
  15. usage instructions in the `web_widget_slick` documentation, but replace
  16. "one2many_slick_images" with "slickroom" in the field definition, as shown
  17. here::
  18. <field name="image_ids" widget="slickroom" options="{}"/>
  19. To edit an image in a carousel, simply click the Edit button in the form view,
  20. then click on the image you wish to edit to open a DarkroomJS modal. Edit the
  21. image as desired according to the `web_widget_darkroom` documentation, and
  22. click Save to save the changes and update the carousel.
  23. Example Module
  24. --------------
  25. An example implementation, for instructional purposes as well as convenient
  26. functional testing, is provided in the `web_widget_slick_example` module.
  27. * Install `web_widget_slick_example`.
  28. * Activate Developer Mode.
  29. * Go to Settings / Technical / Slick, and open the record.
  30. * The standard Slick carousel widget (from `web_widget_slick`) is displayed on
  31. top, followed by the slickroom widget with DarkroomJS support. Click the Edit
  32. button in the form view to try out the DarkroomJS features.
  33. To try out different Slick settings:
  34. * Go to Settings/User Interface/Views and search for 'slick.example.view.form'.
  35. * Open the form view record.
  36. * Click the Edit button.
  37. * In the Architecture editor, find `options="{'slidesToShow': 2}`, and add
  38. any desired settings (separated by commas) inside the curly braces.
  39. * Save the changes and browse to the widget, as described above, to see the
  40. widget with the new settings in effect.
  41. .. image:: https://odoo-community.org/website/image/ir.attachment/5784_f2813bd/datas
  42. :alt: Try me on Runbot
  43. :target: https://runbot.odoo-community.org/runbot/162/10.0
  44. Bug Tracker
  45. ===========
  46. Bugs are tracked on `GitHub Issues
  47. <https://github.com/OCA/web/issues>`_. In case of trouble, please
  48. check there if your issue has already been reported. If you spotted it first,
  49. help us smash it by providing detailed and welcomed feedback.
  50. Credits
  51. =======
  52. Images
  53. ------
  54. * Odoo Community Association: `Icon <https://github.com/OCA/maintainer-tools/blob/master/template/module/static/description/icon.svg>`_.
  55. Contributors
  56. ------------
  57. * Brent Hughes <brent.hughes@laslabs.com>
  58. Do not contact contributors directly about support or help with technical issues.
  59. Maintainer
  60. ----------
  61. .. image:: https://odoo-community.org/logo.png
  62. :alt: Odoo Community Association
  63. :target: https://odoo-community.org
  64. This module is maintained by the OCA.
  65. OCA, or the Odoo Community Association, is a nonprofit organization whose
  66. mission is to support the collaborative development of Odoo features and
  67. promote its widespread use.
  68. To contribute to this module, please visit https://odoo-community.org.