Sha256: 48237385032a36c6b1bead892ed98b3674e85f95d3f49bc57a2e88b99ff1e20c

Contents?: true

Size: 1.32 KB

Versions: 3

Compression:

Stored size: 1.32 KB

Contents

Spree.ready(function($) {
  $('#sort-by-overlay-show-button').click(function() { $('#sort-by-overlay').show() })
  $('#sort-by-overlay-hide-button').click(function() { $('#sort-by-overlay').hide() })

  $('#filter-by-overlay-show-button').click(function() { $('#filter-by-overlay').show() })
  $('#filter-by-overlay-hide-button').click(function() { $('#filter-by-overlay').hide() })

  function closeNoProductModal() {
    $('#no-product-available').removeClass('shown')
    $('#overlay').removeClass('shown')
  }

  $('#no-product-available-close-button').click(closeNoProductModal)
  $('#no-product-available-hide-button').click(closeNoProductModal)

  $('.plp-overlay-card-item').click(function() {
    $(this).toggleClass('plp-overlay-card-item--selected')
  })

  $('.color-select').click(function() {
    var allOptionsBorders = $('.color-select-border')
    var borderElement = $(this).find('.color-select-border')

    allOptionsBorders.each(function() {
      $(this).removeClass('color-select-border--selected')
    })
    borderElement.addClass('color-select-border--selected')
  })

  $('.plp-overlay-ul-li').click(function() {
    $('.plp-overlay-ul-li--active').removeClass('plp-overlay-ul-li--active')
      .addClass('plp-overlay-ul-li')

    $(this).removeClass('plp-overlay-ul-li')
      .addClass('plp-overlay-ul-li--active')
  })
})

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spree_frontend-4.1.0.rc3 app/assets/javascripts/spree/frontend/views/spree/products/index.js
spree_frontend-4.1.0.rc2 app/assets/javascripts/spree/frontend/views/spree/products/index.js
spree_frontend-4.1.0.rc1 app/assets/javascripts/spree/frontend/views/spree/products/index.js