From 66582fb671540ef8cbf1e4b0866e7b7b0d27c7ef Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Mon, 6 May 2013 14:54:42 +0800 Subject: [PATCH] fixed saving of positions of the tiles again --- app/assets/Archive/javascripts/orbitdesktop.js | 3 +++ 1 file changed, 3 insertions(+) diff --git a/app/assets/Archive/javascripts/orbitdesktop.js b/app/assets/Archive/javascripts/orbitdesktop.js index c63432ef..dea7c3f5 100755 --- a/app/assets/Archive/javascripts/orbitdesktop.js +++ b/app/assets/Archive/javascripts/orbitdesktop.js @@ -657,6 +657,7 @@ var orbitDesktop = function(dom){ .gridster({ widget_margins: [6, 6], widget_base_dimensions: [120, 120], + serialize_params: function($w, wgd) { return { col: wgd.col, row: wgd.row, id: $w.data("id") } }, draggable : { start: function(event, ui){ dragged.addClass("noClick"); @@ -671,6 +672,8 @@ var orbitDesktop = function(dom){ } }); } + var newpos = o.gridvar.serialize(); + $.post("/desktop/newpositions",{"newpositions":newpos}); } } })