From 1b490c5fe6ce6ced7b02bbdf8c939a991f0378af Mon Sep 17 00:00:00 2001 From: Bharat Mediratta Date: Sun, 9 Nov 2008 19:20:23 +0000 Subject: Make Gallery3 more RESTful. Create Item_Controller as a common superclass for Album_Controller and Photo_Controller. Change routes to route requests to Item_Controller for dispatching, which in turn will generate get/post/put/delete requests to the controlller so that each controller has a RESTful surface. Change in_place editing to take advantage of this. --- core/views/in_place_edit.html.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'core/views') diff --git a/core/views/in_place_edit.html.php b/core/views/in_place_edit.html.php index 2cf0c8a1..8d60df64 100644 --- a/core/views/in_place_edit.html.php +++ b/core/views/in_place_edit.html.php @@ -3,8 +3,10 @@ $(document).ready(function() { ajax_update = function(className, id) { return function(value, settings) { + var post_data = {'__return': settings.name}; + post_data[settings.name] = value; $.post("".replace("__ID__", id), - {"key": settings.name, "value": value}, + post_data, function(data, textStatus) { if (textStatus == "success") { $(className).html(data); -- cgit v1.2.3