diff --git a/static/coffee/src/main.coffee b/static/coffee/src/main.coffee index 5c658f3415..85c98ff929 100644 --- a/static/coffee/src/main.coffee +++ b/static/coffee/src/main.coffee @@ -20,3 +20,6 @@ $ -> schematic_value $("#schematic_#{circuit_id}").attr("value") $.post "/save_circuit/#{circuit_id}", schematic: schematic_value, (data) -> alert('Saved') if data.results == 'success' + + window.postJSON = (url, data, callback) -> + $.post url, data, callback