Guest User

Untitled

a guest
Oct 23rd, 2017
72
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.57 KB | None | 0 0
  1. for select2 in $("select.select2-package[name^='component_bundle']")
  2. product = select2.getAttribute('data-product')
  3. $.get "/bundles/fetch_components.json?product=#{product}", (resp) ->
  4. $(product).val(resp)
  5.  
  6. $.ajax
  7. url: "/bundles/fetch_components.json?product=#{product}"
  8. dataType: 'application/json'
  9. cache: true
  10. ifModified: false
  11. async: true
  12. success: (resp) ->
  13. console.log(resp.responseText)
  14. $("#component_bundle_#{product}").val(resp.responseText)
  15. error: (resp) ->
  16. console.log(resp)
  17. portal.showErrorDialog("ERROR", resp.responseText)
Add Comment
Please, Sign In to add comment