clear batch edit widgets on page re-draw. some css cleanup
authorerickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 22 Mar 2009 23:37:59 +0000 (23:37 +0000)
committererickson <erickson@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 22 Mar 2009 23:37:59 +0000 (23:37 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/trunk@12641 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/web/css/skin/default/acq.css
Open-ILS/web/js/ui/default/acq/common/li_table.js
Open-ILS/web/templates/default/acq/common/li_table.tt2

index 32fbeb3..301b542 100644 (file)
@@ -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; }
index d3a98de..3b547e6 100644 (file)
@@ -19,6 +19,7 @@ function AcqLiTable() {
     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 @@ function AcqLiTable() {
         var self = this;
         this.copyCache = {};
         this.copyWidgetCache = {};
-        this.copyBatchWidgets = {};
+
         acqLitSaveCopies.onClick = function() { self.saveCopyChanges(liId) };
         acqLitBatchUpdateCopies.onClick = function() { self.batchCopyUpdate() };
 
@@ -198,21 +199,24 @@ function AcqLiTable() {
             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(
index a0b2935..52f112f 100644 (file)
                     </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>