From ba5b2737365592cc511a526a3b14be46c3a75467 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Sat, 2 Feb 2013 11:42:52 +0100 Subject: Created a sortable table for the call_routes. #151 --- app/assets/javascripts/application.js | 1 + app/assets/javascripts/call_route.js.coffee | 6 ++++++ 2 files changed, 7 insertions(+) create mode 100644 app/assets/javascripts/call_route.js.coffee (limited to 'app/assets/javascripts') diff --git a/app/assets/javascripts/application.js b/app/assets/javascripts/application.js index 9097d83..c6f4107 100644 --- a/app/assets/javascripts/application.js +++ b/app/assets/javascripts/application.js @@ -11,5 +11,6 @@ // GO AFTER THE REQUIRES BELOW. // //= require jquery +//= require jquery-ui //= require jquery_ujs //= require_tree . diff --git a/app/assets/javascripts/call_route.js.coffee b/app/assets/javascripts/call_route.js.coffee new file mode 100644 index 0000000..f41d65b --- /dev/null +++ b/app/assets/javascripts/call_route.js.coffee @@ -0,0 +1,6 @@ +jQuery -> + $("table tbody").sortable + axis: 'y' + handle: '.handle' + update: -> + $.post('call_routes/sort', $(this).sortable('serialize')) \ No newline at end of file -- cgit v1.2.3