Updating a context goes wrond
Using [439]
When I set a context to hidden, hit update, the update is committed to the database, but the screen is filled with html (wrong content type?):
Element.update("container_context_4", "\n<div id=\"container_context_4\" class=\"list\">\n <div id=\"context_4\" class=\"context even_row\" style=\"display:'';\">\n <div class=\"position\">\n <span class=\"handle\">DRAG</span>\n </div>\n <div class=\"data\">\n <a href=\"/contexts/%40NICTIZz\" title=\"View context: @NICTIZz\">@NICTIZz</a> (13 actions)\n </div>\n\n <div class=\"buttons\">\n \n <span class=\"grey\">VISIBLE</span>\n \n <a class=\"delete_context_button\" href=\"/contexts/%40NICTIZz.js\" title=\"delete the context '@NICTIZz'\"><img alt=\"Blank\" class=\"delete_item\" src=\"/images/blank.png?1171545177\" title=\"Delete context\" /></a>\n <a class=\"edit_context_button\" href=\"#\"><img alt=\"Blank\" class=\"edit_item\" src=\"/images/blank.png?1171545177\" title=\"Edit context\" /></a>\n </div>\n </div>\n <div id=\"edit_context_4\" class=\"edit-form\" style=\"display:none;\">\n <form action=\"/contexts/%40NICTIZz\" class=\"inline-form\" id=\"edit_form_context_4\" method=\"post\"><div style=\"margin:0;padding:0\"><input name=\"_method\" type=\"hidden\" value=\"put\" /></div> <table style=\"table-layout: fixed;\" width=\"450\">\n \n\n<tr>\n <td width=\"150\"><label for=\"context_name\">Name</label></td>\n <td width=\"300\"><input class=\"context-name\" id=\"context_name\" name=\"context[name]\" size=\"30\" type=\"text\" value=\"@NICTIZz\" /></td>\n</tr>\n<tr> \n <td width=\"150\"><label for=\"context_hide\">Hidden?</label></td>\n <td width=\"300\"><input class=\"context-hide\" id=\"context_hide\" name=\"context[hide]\" type=\"checkbox\" value=\"1\" /><input name=\"context[hide]\" type=\"hidden\" value=\"0\" /></td>\n</tr>\n\n <tr>\n <td width=\"150\"> <input type=\"hidden\" name=\"wants_render\" value=\"true\" /></td>\n <td width=\"300\"><input type=\"submit\" value=\"Update\" /> <a href=\"#\" class=\"form_reset\">Cancel</a></td>\n </tr>\n </table>\n </form> \n \n </div>\n</div>\n\n");
Sortable.create("list-contexts", {handle:'handle', onUpdate:function(){new Ajax.Request('/contexts;order', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-contexts",{});}, parameters:Sortable.serialize("list-contexts")})}, tag:'div'});
When I set a context to hidden, hit update, the update is committed to the database, but the screen is filled with html (wrong content type?):
Element.update("container_context_4", "\n<div id=\"container_context_4\" class=\"list\">\n <div id=\"context_4\" class=\"context even_row\" style=\"display:'';\">\n <div class=\"position\">\n <span class=\"handle\">DRAG</span>\n </div>\n <div class=\"data\">\n <a href=\"/contexts/%40NICTIZz\" title=\"View context: @NICTIZz\">@NICTIZz</a> (13 actions)\n </div>\n\n <div class=\"buttons\">\n \n <span class=\"grey\">VISIBLE</span>\n \n <a class=\"delete_context_button\" href=\"/contexts/%40NICTIZz.js\" title=\"delete the context '@NICTIZz'\"><img alt=\"Blank\" class=\"delete_item\" src=\"/images/blank.png?1171545177\" title=\"Delete context\" /></a>\n <a class=\"edit_context_button\" href=\"#\"><img alt=\"Blank\" class=\"edit_item\" src=\"/images/blank.png?1171545177\" title=\"Edit context\" /></a>\n </div>\n </div>\n <div id=\"edit_context_4\" class=\"edit-form\" style=\"display:none;\">\n <form action=\"/contexts/%40NICTIZz\" class=\"inline-form\" id=\"edit_form_context_4\" method=\"post\"><div style=\"margin:0;padding:0\"><input name=\"_method\" type=\"hidden\" value=\"put\" /></div> <table style=\"table-layout: fixed;\" width=\"450\">\n \n\n<tr>\n <td width=\"150\"><label for=\"context_name\">Name</label></td>\n <td width=\"300\"><input class=\"context-name\" id=\"context_name\" name=\"context[name]\" size=\"30\" type=\"text\" value=\"@NICTIZz\" /></td>\n</tr>\n<tr> \n <td width=\"150\"><label for=\"context_hide\">Hidden?</label></td>\n <td width=\"300\"><input class=\"context-hide\" id=\"context_hide\" name=\"context[hide]\" type=\"checkbox\" value=\"1\" /><input name=\"context[hide]\" type=\"hidden\" value=\"0\" /></td>\n</tr>\n\n <tr>\n <td width=\"150\"> <input type=\"hidden\" name=\"wants_render\" value=\"true\" /></td>\n <td width=\"300\"><input type=\"submit\" value=\"Update\" /> <a href=\"#\" class=\"form_reset\">Cancel</a></td>\n </tr>\n </table>\n </form> \n \n </div>\n</div>\n\n");
Sortable.create("list-contexts", {handle:'handle', onUpdate:function(){new Ajax.Request('/contexts;order', {asynchronous:true, evalScripts:true, onComplete:function(request){new Effect.Highlight("list-contexts",{});}, parameters:Sortable.serialize("list-contexts")})}, tag:'div'});
Leave a comment
on 2007-02-21 13:12 *
By Anonymous
Status changed from Fixed to New
Status changed from Fixed to New
Sorry, but still one minor issue. The double edits works, but the progress bar (circle?) keeps spinning
Edit a context, change the name, press update. After a second or two the progress bar starts spinning and does not stop.
Edit a context, change the name, press update. After a second or two the progress bar starts spinning and does not stop.