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.

104 lines
1.8 KiB

[MIG] web_widget_slick: Migrate to v10 * Add local slick files to use instead of CDN * Override CSS to display widget correctly * Adjust arrow button size/placement * Bump version * Rename __openerp__.py -> __manifest__.py * Rename widget_slick.js -> web_widget_slick.js * Update copyright, license (AGPL -> LGPL) * Update readme * Correct eslint errors * Change module name in various places for consistency * Improve styling of widget arrows, dots * Change css -> less * Remove unneeded slick files * Copyright 2017 -> 2016-2017 * Add OCA to authors * Use OCA icon * Fix readme * Clean up assets * Fix file permissions * Update readme with reference to example module * Fix formatting error, incorrect link * Add javascript tests * Add note to readme about functional testing with example module * Fix/cleanup javascript * Fix destroy_content() method * Move slide navigation out of slide addition loop * Remove unused variables * Remove unneeded DOM append * Reorganize files/directories * Adjust template tags (templates -> template) * Add slick-field class to field template instead of using jQuery * Misc cleanup * Adjust breakpoint settings to show fewer images by default * Enable adaptiveHeight by default * Add .img and .img-responsive classes to images * Fix dragging issues by preventing default mousedown and touchstart event behavior * Set swipeToSlide default to true * Change how slick slides are populated to allow grid mode * Fix issue causing carousel images to display improperly in some situations * Add better functional testing instructions to readme * Add roadmap to readme * Make minor styling changes * Fix issue with template loading w/ PhantomJS * Clean up template, use css class provided by widget * Remove unneeded dependency from tests * Break up render_value method * Break up destroy_content method * Add unslicking to destroy_content, add test * Clean up qweb template formatting * Fix indentation * Change widget name * Add Slick copyright information * Add padding left/right, move arrows in to avoid clipping when widget not in a sheet tag * Apply dot and arrow styles only when needed * Add _resizeCarousel() and related methods to ensure accurate carousel sizing in various views * Resize carousel on core.bus resize * Account for differences in group layouts and labels, sheet/no-sheet layouts * Adjust, clean up less * Clean up js
7 years ago
  1. /* Copyright 2013-2016 Ken Wheeler
  2. * Version 1.7.1
  3. * License MIT (https://opensource.org/licenses/MIT) */
  4. /* Slider */
  5. .slick-slider {
  6. position: relative;
  7. display: block;
  8. box-sizing: border-box;
  9. -webkit-touch-callout: none;
  10. -webkit-user-select: none;
  11. -khtml-user-select: none;
  12. -moz-user-select: none;
  13. -ms-user-select: none;
  14. user-select: none;
  15. -ms-touch-action: pan-y;
  16. touch-action: pan-y;
  17. -webkit-tap-highlight-color: transparent;
  18. }
  19. .slick-list {
  20. position: relative;
  21. overflow: hidden;
  22. display: block;
  23. margin: 0;
  24. padding: 0;
  25. &:focus {
  26. outline: none;
  27. }
  28. &.dragging {
  29. cursor: pointer;
  30. cursor: hand;
  31. }
  32. }
  33. .slick-slider .slick-track,
  34. .slick-slider .slick-list {
  35. -webkit-transform: translate3d(0, 0, 0);
  36. -moz-transform: translate3d(0, 0, 0);
  37. -ms-transform: translate3d(0, 0, 0);
  38. -o-transform: translate3d(0, 0, 0);
  39. transform: translate3d(0, 0, 0);
  40. }
  41. .slick-track {
  42. position: relative;
  43. left: 0;
  44. top: 0;
  45. display: block;
  46. margin-left: auto;
  47. margin-right: auto;
  48. &:before,
  49. &:after {
  50. content: "";
  51. display: table;
  52. }
  53. &:after {
  54. clear: both;
  55. }
  56. .slick-loading & {
  57. visibility: hidden;
  58. }
  59. }
  60. .slick-slide {
  61. float: left;
  62. height: 100%;
  63. min-height: 1px;
  64. [dir="rtl"] & {
  65. float: right;
  66. }
  67. img {
  68. display: block;
  69. }
  70. &.slick-loading img {
  71. display: none;
  72. }
  73. display: none;
  74. &.dragging img {
  75. pointer-events: none;
  76. }
  77. .slick-initialized & {
  78. display: block;
  79. }
  80. .slick-loading & {
  81. visibility: hidden;
  82. }
  83. .slick-vertical & {
  84. display: block;
  85. height: auto;
  86. border: 1px solid transparent;
  87. }
  88. }
  89. .slick-arrow.slick-hidden {
  90. display: none;
  91. }