0
我有以下的CoffeeScript:CoffeeScript的不確定變量
$("#complete").click ->
bootbox.dialog "Remember, if you complete the workorder you won't be able to add labor and materials.", [
label: "Complete"
class: "btn-success"
callback: ->
$("td").filter(':contains("ID:")').each ->
woid = $(this).nextAll().text()
$.update "/workorders/" + woid,
workorder:
wostatus_id: 232
,
label: "Cancel"
class: "btn-danger"
callback: ->
return 'false'
]
當它運行時,我得到這個在瀏覽器控制檯:
Uncaught ReferenceError: woid is not defined
感謝您的幫助!
感謝您的幫助! – Reddirt