[Jifty-commit] r4422 - jifty/branches/prototype-1.6/share/web/static/js

jifty-commit at lists.jifty.org jifty-commit at lists.jifty.org
Tue Nov 13 08:26:29 EST 2007


Author: sunnavy
Date: Tue Nov 13 08:26:29 2007
New Revision: 4422

Modified:
   jifty/branches/prototype-1.6/share/web/static/js/jifty.js

Log:
take a common object instead of a Hash as an argument of Jifty.update

Modified: jifty/branches/prototype-1.6/share/web/static/js/jifty.js
==============================================================================
--- jifty/branches/prototype-1.6/share/web/static/js/jifty.js	(original)
+++ jifty/branches/prototype-1.6/share/web/static/js/jifty.js	Tue Nov 13 08:26:29 2007
@@ -1547,6 +1547,11 @@
     }
 
     var args = hiddens.merge(buttons.merge(inputs));
+
+    /* we want to feed a common object instead of a Hash to Jifty.update */ 
+    var args_object = {};
+    args.each( function( pair ) { args_object[pair.key] = args_object[pair.value]; } );
+
     if(event.ctrlKey||event.metaKey||event.altKey||event.shiftKey) return true;
-    return Jifty.update( {'continuation':{},'actions':null,'fragments':[{'mode':'Replace','args':args.toJSON(),'region':'__page','path': submit_to}]}, elt );
+    return Jifty.update( {'continuation':{},'actions':null,'fragments':[{'mode':'Replace','args':args_object,'region':'__page','path': submit_to}]}, elt );
 }


More information about the Jifty-commit mailing list