search for: oncalls_select

Displaying 2 results from an estimated 2 matches for "oncalls_select".

2014 Apr 23
0
Select fields, Coffeescript and Cocoon
...up_fields', :f => usergroup %> <%= link_to_add_association "Add Group", f, :usergroups %> usergroup_fields: <%= 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_onc...
2014 May 06
0
js .closest
...".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 => @oncalls)) %>") As I have multiple instances of ".ops_select" I want to bind it to the recent selected and update only this. I have tried to fiddle in the closest function but can't succed. Some hel...