Add js code needed in the product images page

This commit is contained in:
luisramos0
2019-12-19 20:11:36 +00:00
parent c20a41111c
commit 9a52a127a4
2 changed files with 22 additions and 0 deletions

View File

@@ -0,0 +1,15 @@
$ ->
($ '#new_image_link').click (event) ->
event.preventDefault()
($ '.no-objects-found').hide()
($ this).hide()
$.ajax
type: 'GET'
url: @href
data: (
authenticity_token: AUTH_TOKEN
)
success: (r) ->
($ '#images').html r

View File

@@ -0,0 +1,7 @@
($ '#cancel_link').click (event) ->
event.preventDefault()
($ '.no-objects-found').show()
($ '#new_image_link').show()
($ '#images').html('')