[open-ils-commits] r12641 - in trunk/Open-ILS/web: css/skin/default js/ui/default/acq/common templates/default/acq/common (erickson)

svn at svn.open-ils.org svn at svn.open-ils.org
Sun Mar 22 19:38:00 EDT 2009


Author: erickson
Date: 2009-03-22 19:37:59 -0400 (Sun, 22 Mar 2009)
New Revision: 12641

Modified:
   trunk/Open-ILS/web/css/skin/default/acq.css
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
   trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
clear batch edit widgets on page re-draw.  some css cleanup

Modified: trunk/Open-ILS/web/css/skin/default/acq.css
===================================================================
--- trunk/Open-ILS/web/css/skin/default/acq.css	2009-03-22 16:22:43 UTC (rev 12640)
+++ trunk/Open-ILS/web/css/skin/default/acq.css	2009-03-22 23:37:59 UTC (rev 12641)
@@ -97,7 +97,8 @@
 .acq-lit-row { border-bottom: 1px solid #AAA; }
 .acq-lit-alt-row td { padding-left:30px; }
 #acq-lit-info-tbody td {padding:5px;}
-#acq-lit-li-details-table {margin-top:25px;}
+#acq-lit-li-details-table {margin-top:20px;}
 #acq-lit-li-details-table td {padding:0px 10px 0px 10px;}
 #acq-lit-li-details-table th {padding:0px 10px 0px 10px; font-weight:bold;}
 .acq-lit-li-menu-bar {width:99%; text-align:left; border:1px solid #aaa; margin:5px 0px 10px 0px;}
+.acq-lit-table-spacer { height:20px; }

Modified: trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
===================================================================
--- trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-03-22 16:22:43 UTC (rev 12640)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-03-22 23:37:59 UTC (rev 12641)
@@ -19,6 +19,7 @@
     this.copyTbody = dojo.byId('acq-lit-li-details-tbody');
     this.copyRow = this.copyTbody.removeChild(dojo.byId('acq-lit-li-details-row'));
     this.copyBatchRow = dojo.byId('acq-lit-li-details-batch-row');
+    this.copyBatchWidgets = {};
 
     dojo.byId('acq-lit-select-toggle').onclick = function(){self.toggleSelect()};
     dojo.byId('acq-lit-info-back-button').onclick = function(){self.show('list')};
@@ -190,7 +191,7 @@
         var self = this;
         this.copyCache = {};
         this.copyWidgetCache = {};
-        this.copyBatchWidgets = {};
+
         acqLitSaveCopies.onClick = function() { self.saveCopyChanges(liId) };
         acqLitBatchUpdateCopies.onClick = function() { self.batchCopyUpdate() };
 
@@ -198,21 +199,24 @@
             this.copyTbody.removeChild(this.copyTbody.childNodes[0]);
 
         var row = this.copyBatchRow;
-        if(!this.copyBatchRowDrawn) {
-            dojo.forEach(['fund', 'owning_lib', 'location'],
-                function(field) {
+        dojo.forEach(['fund', 'owning_lib', 'location'],
+            function(field) {
+                if(self.copyBatchRowDrawn) {
+                    self.copyBatchWidgets[field].attr('value', null);
+                } else {
                     var widget = new openils.widget.AutoFieldWidget({
                         fmField : field,
                         fmClass : 'acqlid',
                         parentNode : dojo.query('[name='+field+']', row)[0],
                         orgLimitPerms : ['CREATE_PICKLIST'],
+                        dijitArgs : {required:false}
                     });
                     widget.build();
                     self.copyBatchWidgets[field] = widget.widget;
                 }
-            );
-            this.copyBatchRowDrawn = true;
-        };
+            }
+        );
+        this.copyBatchRowDrawn = true;
 
 
         openils.acq.Lineitem.fetchAttrDefs(

Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2009-03-22 16:22:43 UTC (rev 12640)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2009-03-22 23:37:59 UTC (rev 12641)
@@ -118,7 +118,7 @@
                     </td>
                 </tr>
             </tbody>
-            <tbody><tr><td colspan='0' style='height:20px;'/></tr></tbody>
+            <tbody><tr><td class='acq-lit-table-spacer' colspan='0'/></tr></tbody>
             <tbody style='font-weight:bold;'>
                 <tr>
                     <td style='margin-top:30px;'>Owning Branch</td>



More information about the open-ils-commits mailing list