summaryrefslogtreecommitdiff
path: root/core/views
diff options
context:
space:
mode:
authorBharat Mediratta <bharat@menalto.com>2008-11-09 19:20:23 +0000
committerBharat Mediratta <bharat@menalto.com>2008-11-09 19:20:23 +0000
commit1b490c5fe6ce6ced7b02bbdf8c939a991f0378af (patch)
treed06cda6e05d7121f6ec08154115c15b148436d44 /core/views
parent065bbb2120ce0aaee96a3886bd06c90ca26da9bd (diff)
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.
Diffstat (limited to 'core/views')
-rw-r--r--core/views/in_place_edit.html.php4
1 files changed, 3 insertions, 1 deletions
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("<?= url::site("item/__ID__") ?>".replace("__ID__", id),
- {"key": settings.name, "value": value},
+ post_data,
function(data, textStatus) {
if (textStatus == "success") {
$(className).html(data);