From 66a53a49705c269d73f9d51bb0d4a51283049c71 Mon Sep 17 00:00:00 2001 From: Stefan Wintermeyer Date: Mon, 4 Feb 2013 13:00:45 +0100 Subject: Changed softkey table to be sortable. #150 --- app/assets/javascripts/softkey.js.coffee | 6 ++++++ app/assets/stylesheets/application.css | 1 + app/assets/stylesheets/softkeys.css.scss | 5 +++++ 3 files changed, 12 insertions(+) create mode 100644 app/assets/javascripts/softkey.js.coffee create mode 100644 app/assets/stylesheets/softkeys.css.scss (limited to 'app/assets') diff --git a/app/assets/javascripts/softkey.js.coffee b/app/assets/javascripts/softkey.js.coffee new file mode 100644 index 0000000..19103f0 --- /dev/null +++ b/app/assets/javascripts/softkey.js.coffee @@ -0,0 +1,6 @@ +jQuery -> + $("table tbody").sortable + axis: 'y' + handle: '.handle' + update: -> + $.post('/softkeys/sort', $(this).sortable('serialize')) \ No newline at end of file diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css index 999afb5..128a391 100644 --- a/app/assets/stylesheets/application.css +++ b/app/assets/stylesheets/application.css @@ -13,4 +13,5 @@ *= require bootstrap/bootstrap-responsive *= require gemeinschaft-generic *= require call_routes + *= require softkeys */ diff --git a/app/assets/stylesheets/softkeys.css.scss b/app/assets/stylesheets/softkeys.css.scss new file mode 100644 index 0000000..425c6f1 --- /dev/null +++ b/app/assets/stylesheets/softkeys.css.scss @@ -0,0 +1,5 @@ +#softkeys .handle { + font-size: 12px; + color: #777; + cursor: move; +} \ No newline at end of file -- cgit v1.2.3