diff options
| author | Bharat Mediratta <bharat@menalto.com> | 2008-11-19 06:35:54 +0000 |
|---|---|---|
| committer | Bharat Mediratta <bharat@menalto.com> | 2008-11-19 06:35:54 +0000 |
| commit | 161998dde6d976c45cfcea31f1128147acc3d64f (patch) | |
| tree | a1ba84b418e98eafb112c577844aa04e4592bde6 /core/views | |
| parent | e14d5574b6861314c2133b156c8f2c9c94aeb1b6 (diff) | |
Fix some broken-ness:
1) Item_Controller::_create() and _update() were swapped
2) _create() was redirecting to the wrong urls on success
3) Change in-place return parameter from __return to _return
4) Change in-place code to tunnel _put via POST
Diffstat (limited to 'core/views')
| -rw-r--r-- | core/views/in_place_edit.html.php | 2 | ||||
| -rw-r--r-- | core/views/welcome.html.php | 2 |
2 files changed, 1 insertions, 3 deletions
diff --git a/core/views/in_place_edit.html.php b/core/views/in_place_edit.html.php index 75500625..f02b77ba 100644 --- a/core/views/in_place_edit.html.php +++ b/core/views/in_place_edit.html.php @@ -3,7 +3,7 @@ $(document).ready(function() { ajax_update = function(className, id) { return function(value, settings) { - var post_data = {'__return': settings.name}; + var post_data = {'_method': 'put', '_return': settings.name}; post_data[settings.name] = value; $.post("<?= url::site("items/__ID__") ?>".replace("__ID__", id), post_data, diff --git a/core/views/welcome.html.php b/core/views/welcome.html.php index a015fc92..a3f70d33 100644 --- a/core/views/welcome.html.php +++ b/core/views/welcome.html.php @@ -187,7 +187,6 @@ <input type="submit" value="upload"/> <input id="photo_upload" name="file[]" type="file"/> <input type="hidden" name="type" value="photo"/> - <input type="hidden" name="_method" value="put"/> </form> </fieldset> <fieldset> @@ -196,7 +195,6 @@ <input type="submit" value="create"/> <input type="text" name="name"/> <input type="hidden" name="type" value="album"/> - <input type="hidden" name="_method" value="put"/> </form> </fieldset> </div> |
