Acq: change a FilteringSelect dijit to a regular <select> to avoid a
authorsenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Sep 2010 05:05:00 +0000 (05:05 +0000)
committersenator <senator@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Mon, 20 Sep 2010 05:05:00 +0000 (05:05 +0000)
manifestation  of Dojo bug #11062; add more refresh grid buttons to unified
search

"Refresh Grid" buttons are a sad little stopgap measure to address a problem
where some AutoGrids show only some of the rows they're supposed to. Calling
.refresh() on the AutoGrid consitently right the grid.  Maybe the problem
is some kind of race condition, and maybe it's related to the use of "get"
and "formatter" attributes for some columns.  Or maybe it's something else.
Attempts continue to find the root of the problem and repair it.

git-svn-id: svn://svn.open-ils.org/ILS/trunk@17829 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/templates/default/acq/common/li_table.tt2
Open-ILS/web/templates/default/acq/search/unified.tt2

index 5e7357b..3f58eec 100644 (file)
@@ -75,11 +75,10 @@ function AcqLiTable() {
         }
     );
 
-    dojo.connect(acqLitLiActionsSelector, 'onChange', 
-        function() { 
-            self.applySelectedLiAction(this.attr('value')) 
-            acqLitLiActionsSelector.attr('value', '_');
-        });
+    dojo.byId("acq-lit-li-actions-selector").onchange = function() { 
+        self.applySelectedLiAction(this.options[this.selectedIndex].value);
+        this.selectedIndex = 0;
+    };
 
     acqLitCreatePoSubmit.onClick = function() {
         if (self._confirmPoPrepaySituation()) {
index 69e91d9..4ff02e8 100644 (file)
@@ -13,7 +13,7 @@
                             <tr>
                                 <td>
                                     <span>
-                                        <select dojoType='dijit.form.FilteringSelect' value='_' jsId='acqLitLiActionsSelector'>
+                                        <select id="acq-lit-li-actions-selector">
                                             <option mask='*'  value='_'>--Actions--</option>
                                             <option mask='sr' value='save_picklist'>Save Items To Selection List</option>
                                             <option mask='pl' value='selector_ready'>Mark Ready for Selector</option>
index 1c2fd64..1d3f369 100644 (file)
         </div>
     </div>
     <div id="acq-unified-results-purchase_order" class="hidden">
+        <div class="acq-unified-result-specific-controls">
+            <button onclick="dijit.byId('acq-unified-po-grid').refresh();">
+                Refresh Grid
+            </button>
+        </div>
         <table
             id="acq-unified-po-grid"
             autoHeight="true"
     </div>
     <div id="acq-unified-results-picklist" class="hidden">
         <div class="acq-unified-result-specific-controls">
+            <button dojoType="dijit.form.Button"
+                onClick="dijit.byId('acq-unified-pl-grid').refresh();">
+                Refresh Grid
+            </button>
             <div dojoType="dijit.form.DropDownButton">
                 <span>New Selection List</span>
                 <div dojoType="dijit.TooltipDialog"