[open-ils-commits] r13967 - in branches/rel_1_6/Open-ILS/web/js: dojo/openils/widget ui/default/acq/common (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Fri Sep 4 15:58:43 EDT 2009


Author: erickson
Date: 2009-09-04 15:58:38 -0400 (Fri, 04 Sep 2009)
New Revision: 13967

Modified:
   branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
   branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js
Log:
plug baseWidgetValue setting for readOnly widgets back in with try/catch and comment.  typo: state -> state()

Modified: branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-09-04 19:58:21 UTC (rev 13966)
+++ branches/rel_1_6/Open-ILS/web/js/dojo/openils/widget/AutoFieldWidget.js	2009-09-04 19:58:38 UTC (rev 13967)
@@ -338,7 +338,21 @@
          * For widgets that run asynchronously, provide a callback for finishing up
          */
         _widgetLoaded : function(value) {
-            if(!this.readOnly) {
+            
+            if(this.readOnly) {
+
+                /* -------------------------------------------------------------
+                   when using widgets in a grid, the cell may dissapear, which 
+                   kills the underlying DOM node, which causes this to fail.
+                   For now, back out gracefully and let grid getters use
+                   getDisplayString() instead
+                  -------------------------------------------------------------*/
+                try { 
+                    this.baseWidgetValue(this.getDisplayString());
+                } catch (E) {};
+
+            } else {
+
                 this.baseWidgetValue(this.widgetValue);
                 if(this.idlField.name == this.fmIDL.pkey && this.fmIDL.pkey_sequence)
                     this.widget.attr('disabled', true); 

Modified: branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-09-04 19:58:21 UTC (rev 13966)
+++ branches/rel_1_6/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-09-04 19:58:38 UTC (rev 13967)
@@ -198,7 +198,7 @@
 
         var recv_link = dojo.query('[name=receive_link]', row)[0];
 
-        if(li.state == 'on-order') {
+        if(li.state() == 'on-order') {
             recv_link.onclick = function() {
                 self.receiveLi(li);
                 openils.Util.hide(recv_link)



More information about the open-ils-commits mailing list