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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Mar 7 10:15:51 EST 2011


Author: dbs
Date: 2011-03-07 10:15:49 -0500 (Mon, 07 Mar 2011)
New Revision: 19595

Modified:
   branches/rel_1_6_1/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_1_6_1/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js
===================================================================
--- branches/rel_1_6_1/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-03-07 15:15:08 UTC (rev 19594)
+++ branches/rel_1_6_1/Open-ILS/web/js/dojo/openils/widget/AutoGrid.js	2011-03-07 15:15:49 UTC (rev 19595)
@@ -467,8 +467,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