Advertisement
Guest User

Untitled

a guest
Sep 17th, 2019
87
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.39 KB | None | 0 0
  1. let flkty;
  2. paragraphs.forEach(paragraph => {
  3.  
  4. const itemsToFilterContainers = [].slice.call(
  5. document.querySelector(`[data-selector^="${paragraph.getAttribute('data-selector')}"]`)
  6. .querySelectorAll('[data-selector="filterItemsContainer"]'));
  7. const tpGrid = [].slice.call(document.querySelectorAll('.tp--grid'));
  8.  
  9. itemsToFilterContainers.forEach(item => {
  10. new Vue({
  11. el: item,
  12. data: {
  13. selected_travel_themes: travelThemeDropdownOptionSelected,
  14. selected_destinations: destinationsDropdownOptionSelected,
  15. selected_destination_types: destinationTypesDropdownOptionSelected,
  16. searchString: '',
  17. destinationsDropdownOptionsMapped: [],
  18. hideList: true,
  19. hideBtn: false
  20. },
  21. computed: {
  22. },
  23. mounted() {
  24. this.$nextTick(this.countCardsInGridView(0));
  25. },
  26. methods: {
  27.  
  28. countCardsInGridView(pageNumber) {
  29. if (tpGrid) {
  30. tpGrid.forEach(grid => {
  31. const cards = [].slice.call(grid.children)
  32. cards.forEach((card, index) => {
  33. if (index + 1 > 9) {
  34. card.classList.add('hide')
  35. } else {
  36. card.classList.add('show')
  37. }
  38. });
  39. })
  40. }
  41. },
  42. loadMoreCards() {
  43. console.log('loadMoreCards');
  44.  
  45. }
  46.  
  47. }
  48. })
  49. })
  50. })
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement