diff --git a/app/assets/javascripts/power_relay.js b/app/assets/javascripts/power_relay.js index 8b7029bd4d..1a305b6985 100644 --- a/app/assets/javascripts/power_relay.js +++ b/app/assets/javascripts/power_relay.js @@ -1,3 +1,4 @@ +// Used on the instrument manage page $(function() { var power_relay_section = $('#power-relay') , instrument_control_mechanism = $('#instrument_control_mechanism'); diff --git a/app/assets/javascripts/relay.js b/app/assets/javascripts/relay.js deleted file mode 100644 index 5be7b4c260..0000000000 --- a/app/assets/javascripts/relay.js +++ /dev/null @@ -1,25 +0,0 @@ -$(document).ready(function() { - $(".instrument_table").click(function(e){ - var link = $(e.target); - if (!link.hasClass('instrument_status_link') && !link.hasClass('instrument_switch_link')) { - return; - } - e.preventDefault(); - var inst_id = link.attr("id").match(/\d+/) - var status_div = $('#instrument_status_' + inst_id); - old_html = status_div.html(); - status_div.html('Updating. Please Wait.'); - jQuery.ajax({ - type: "get", - url: link.attr("href"), - timeout: 10000, - success: function(r){ - status_div.html(r); - }, - error: function(){ - status_div.html(old_html); - } - }); - return false; - }); -}); \ No newline at end of file