[Jifty-commit] r5245 - in jifty/trunk: share/web/static/js

Jifty commits jifty-commit at lists.jifty.org
Sat Mar 29 00:58:38 EDT 2008


Author: alexmv
Date: Sat Mar 29 00:58:35 2008
New Revision: 5245

Modified:
   jifty/trunk/   (props changed)
   jifty/trunk/share/web/static/js/jifty.js

Log:
 r28924 at kohr-ah:  chmrr | 2008-03-29 00:58:27 -0400
  * When doing new region creation, make sure we get the new value of
    the element that we're applying Behavior, etc, to.


Modified: jifty/trunk/share/web/static/js/jifty.js
==============================================================================
--- jifty/trunk/share/web/static/js/jifty.js	(original)
+++ jifty/trunk/share/web/static/js/jifty.js	Sat Mar 29 00:58:35 2008
@@ -597,6 +597,9 @@
     getForm: function (element) {
         element = $(element);
 
+        if (!element)
+            return null;
+
         if (element.virtualform)
             return element.virtualform;
 
@@ -1072,6 +1075,7 @@
             if (f['mode'] && (f['mode'] != 'Replace')) {
                 var insertion = eval('Insertion.'+f['mode']);
                 new insertion(element, textContent.stripScripts());
+                element = document.getElementById('region-' + f['region']);
             } else {
                 Element.update(element, textContent.stripScripts());
             }


More information about the Jifty-commit mailing list