diff options
| author | hukl <contact@smyck.org> | 2009-09-02 21:39:59 +0200 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-09-02 21:39:59 +0200 |
| commit | 630348be8ee49ad2392e3031e6872b36e2a7b5ae (patch) | |
| tree | 53f2e8682841f6e7d9a68e89fff671c8c4012f70 /public/javascripts | |
| parent | 24cc69876fe99bbab6fc3cb3f39c9e838d033703 (diff) | |
even better
Diffstat (limited to 'public/javascripts')
| -rw-r--r-- | public/javascripts/admin_interface.js | 21 |
1 files changed, 9 insertions, 12 deletions
diff --git a/public/javascripts/admin_interface.js b/public/javascripts/admin_interface.js index 4084983..cb5ddb0 100644 --- a/public/javascripts/admin_interface.js +++ b/public/javascripts/admin_interface.js | |||
| @@ -159,20 +159,17 @@ image_interface = { | |||
| 159 | 159 | ||
| 160 | $("ul#image_box").sortable({ | 160 | $("ul#image_box").sortable({ |
| 161 | revert : true, | 161 | revert : true, |
| 162 | stop : function(event, ui) { | 162 | update : function(event, ui) { |
| 163 | images = $("ul#image_box").sortable("serialize", {attribute : "rel"}); | 163 | images = $("ul#image_box").sortable("serialize", {attribute : "rel"}); |
| 164 | 164 | ||
| 165 | if (images != image_interface.current_images) { | 165 | $.ajax({ |
| 166 | $.ajax({ | 166 | type : "POST", |
| 167 | type : "POST", | 167 | url : "/pages/" + $("ul#image_box").attr("rel") + "/sort_images", |
| 168 | url : "/pages/" + $("ul#image_box").attr("rel") + "/sort_images", | 168 | dataType : "json", |
| 169 | dataType : "json", | 169 | data : images + "&_method=put", |
| 170 | data : images + "&_method=put", | 170 | success : function() { |
| 171 | success : function() { | 171 | } |
| 172 | image_interface.update_current_images(); | 172 | }); |
| 173 | } | ||
| 174 | }); | ||
| 175 | } | ||
| 176 | } | 173 | } |
| 177 | }); | 174 | }); |
| 178 | }, | 175 | }, |
