mirror of
https://github.com/rickbarrette/redmine_qbo.git
synced 2025-11-08 17:04:23 -05:00
Update and rename vehicles.js.coffee to vehicles.js
This commit is contained in:
11
assets/javascripts/vehicles.js
Normal file
11
assets/javascripts/vehicles.js
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
|
||||||
|
function customerSelected() {
|
||||||
|
customer_id = $('issue_customer_id').getValue();
|
||||||
|
console.log(customer_id);
|
||||||
|
# update stuff
|
||||||
|
}
|
||||||
|
|
||||||
|
document.observe('dom:loaded', function() {
|
||||||
|
customerSelected();
|
||||||
|
$('issue_customer_id').observe('change', customerSelected);
|
||||||
|
});
|
||||||
@@ -1,12 +0,0 @@
|
|||||||
$ ->
|
|
||||||
$(document).on 'change', '#issue_customer_id', (evt) ->
|
|
||||||
$.ajax 'update_vehicles',
|
|
||||||
type: 'GET'
|
|
||||||
dataType: 'script'
|
|
||||||
data: {
|
|
||||||
customer_id: $("#issue_customer_id option:selected").val()
|
|
||||||
}
|
|
||||||
error: (jqXHR, textStatus, errorThrown) ->
|
|
||||||
console.log("AJAX Error: #{textStatus}")
|
|
||||||
success: (data, textStatus, jqXHR) ->
|
|
||||||
console.log("Dynamic country select OK!")
|
|
||||||
Reference in New Issue
Block a user