Displaying 2 results from an estimated 2 matches for "update_oncalls".
2014 Apr 23
0
Select fields, Coffeescript and Cocoon
...t;%= f.select :ops_group_id, options_for_select(@groups…..{ id: 'ops_select'
} %>
<%= f.select :oncall_id, options_for_select(@oncalls….{ id:
'oncalls_select' } %>
Coffee:
$ ->
$(document).on 'change', ('#ops_select'), ->
$.ajax '/projects/update_oncalls/',
type: 'GET'
dataType: 'script'
data: {
ops_group_id: $("#ops_select option:selected").val()
update_oncalls.js
$("#oncalls_select").empty().append("<%= escape_javascript(render(:partial
=> @oncalls)) %>")
I th...
2014 May 06
0
js .closest
I have a script:
$ ->
$(document).on 'change', ('.ops_select'), ->
val = $(".ops_select option:selected").val()
$.ajax '/projects/update_oncalls/',
type: 'GET'
dataType: 'script'
data: {ops_group_id: val }
which triggers a "update_concalls.js.coffee" file to replace a the value in
a select-tag.
$(".oncalls_select").empty().append("<%= escape_javascript(render(:partial
=&...