summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--app/assets/javascripts/graph.js10
-rw-r--r--app/assets/javascripts/graph.js.coffee10
2 files changed, 10 insertions, 10 deletions
diff --git a/app/assets/javascripts/graph.js b/app/assets/javascripts/graph.js
deleted file mode 100644
index 434cf70ac65..00000000000
--- a/app/assets/javascripts/graph.js
+++ /dev/null
@@ -1,10 +0,0 @@
-function initGraphNav() {
- $(".graph svg").css("position", "relative");
- $("body").bind("keyup", function(e) {
- if(e.keyCode == 37) { // left
- $(".graph svg").animate({ left: "+=400" });
- } else if(e.keyCode == 39) { // right
- $(".graph svg").animate({ left: "-=400" });
- }
- });
-}
diff --git a/app/assets/javascripts/graph.js.coffee b/app/assets/javascripts/graph.js.coffee
new file mode 100644
index 00000000000..5fe8ae3f020
--- /dev/null
+++ b/app/assets/javascripts/graph.js.coffee
@@ -0,0 +1,10 @@
+initGraphNav = ->
+ $('.graph svg').css 'position', 'relative'
+
+ $('body').bind 'keyup', (e) ->
+ if e.keyCode is 37 # left
+ $('.graph svg').animate left: '+=400'
+ else if e.keyCode is 39 # right
+ $('.graph svg').animate left: '-=400'
+
+window.initGraphNav = initGraphNav