[open-ils-commits] r19592 - branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget (dbs)

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 7 10:14:03 EST 2011


Author: dbs
Date: 2011-03-07 10:14:01 -0500 (Mon, 07 Mar 2011)
New Revision: 19592

Modified:
   branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
Log:
Fix cloning of AutoField widgets: LP #728055

Cloning Action/Trigger event definitions was not working properly, as
all values were being copied from the original object using their display
strings rather than the underlying values.

Bill Erickson suggested a fix in IRC that works, so full credit to him
for this change!


Modified: branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-03-07 15:13:35 UTC (rev 19591)
+++ branches/rel_2_0/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-03-07 15:14:01 UTC (rev 19592)
@@ -469,8 +469,8 @@
                         if(field.widget.widget.attr('disabled')) return;
                         var w = clonePane.fieldList.filter(
                             function(i) { return (i.name == field.name) })[0];
-                        w.widget.baseWidgetValue(field.widget.widgetValue); // sync widgets
-                        w.widget.onload = function(){w.widget.baseWidgetValue(field.widget.widgetValue)}; // async widgets
+                        w.widget.baseWidgetValue(field.widget.widget.attr('value')); // sync widgets
+                        w.widget.onload = function(){w.widget.baseWidgetValue(field.widget.widget.attr('value'))}; // async widgets
                     }
                 );
                 origPane.destroy();



More information about the open-ils-commits mailing list