summaryrefslogtreecommitdiff
path: root/app/assets
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:26:30 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-02-12 13:26:30 +0100
commitf8f35f666613eff24d3988bda1a22cc40ef2ab30 (patch)
treeaa6ed467ba56ea74b0061af4d06cfb9b853da489 /app/assets
parentaa5a2b806d117ffde9888e282c7100066156d94b (diff)
Make the call_elements table sortable by drag and drop.
Diffstat (limited to 'app/assets')
-rw-r--r--app/assets/javascripts/route_element.js.coffee6
-rw-r--r--app/assets/stylesheets/application.css1
-rw-r--r--app/assets/stylesheets/route_elements.css.scss5
3 files changed, 12 insertions, 0 deletions
diff --git a/app/assets/javascripts/route_element.js.coffee b/app/assets/javascripts/route_element.js.coffee
new file mode 100644
index 0000000..75dc553
--- /dev/null
+++ b/app/assets/javascripts/route_element.js.coffee
@@ -0,0 +1,6 @@
+jQuery ->
+ $('#route_elements').sortable
+ axis: 'y'
+ handle: '.handle'
+ update: ->
+ $.post($(this).data('update-url'), $(this).sortable('serialize')) \ No newline at end of file
diff --git a/app/assets/stylesheets/application.css b/app/assets/stylesheets/application.css
index 3e1cc66..44868e4 100644
--- a/app/assets/stylesheets/application.css
+++ b/app/assets/stylesheets/application.css
@@ -15,4 +15,5 @@
*= require call_routes
*= require softkeys
*= require phone_numbers
+ *= require route_elements
*/
diff --git a/app/assets/stylesheets/route_elements.css.scss b/app/assets/stylesheets/route_elements.css.scss
new file mode 100644
index 0000000..a0080ab
--- /dev/null
+++ b/app/assets/stylesheets/route_elements.css.scss
@@ -0,0 +1,5 @@
+#route_elements .handle {
+ font-size: 12px;
+ color: #777;
+ cursor: move;
+} \ No newline at end of file