ACQ invoice formatting improvements
authorBill Erickson <berick@esilibrary.com>
Thu, 12 Jul 2012 19:26:50 +0000 (15:26 -0400)
committerLebbeous Fogle-Weekley <lebbeous@esilibrary.com>
Wed, 1 Aug 2012 18:23:28 +0000 (14:23 -0400)
Prevent # invoiced and # paid inputs from wrapping.  Also, make the text
boxes a little smaller to reduce horizontal space requirements.  It's
still possible to enter any value, but only the 4 least significant
digits are visible.  Since it's not common to invoice 10k+ copies of the
same item, this seems like a fair trade off.

Signed-off-by: Bill Erickson <berick@esilibrary.com>
Signed-off-by: Lebbeous Fogle-Weekley <lebbeous@esilibrary.com>

Open-ILS/src/templates/acq/invoice/view.tt2
Open-ILS/web/js/ui/default/acq/invoice/view.js

index 6ed29f1..c1a7aa7 100644 (file)
@@ -46,7 +46,6 @@
 
     <div dojoType="dijit.layout.ContentPane" layoutAlign="client">
 
-
         <div dojoType="dijit.layout.TabContainer" style="width: 96%; height: 100%;">
             <div dojoType="dijit.layout.ContentPane" 
                 class='oils-acq-detail-content-pane' title="Invoice" selected='true' style='height:600px'>
@@ -84,7 +83,7 @@
                                 <div name='title_details'></div>
                                 <div name='note'></div>
                             </td>
-                            <td class='acq-invoice-center-col'>
+                            <td class='acq-invoice-center-col' nowrap='nowrap'>
                                 <span name='inv_item_count'></span>&nbsp;/&nbsp;<span name='phys_item_count'></span>
                             </td>
                             <td class='acq-invoice-billed-col'><div name='cost_billed'></div></td>
             </div> <!-- tab 2 -->
         </div> <!-- end tabcontainer -->
     </div> <!-- end contentpane -->
-
 </div>
 <div dojoType='openils.widget.ProgressDialog' jsId='progressDialog'></div>
 <div jsId='extraItemsDialog' dojoType="dijit.Dialog" title="Extra Items">
index 4f1fa60..bd1ff0a 100644 (file)
@@ -747,7 +747,11 @@ function addInvoiceEntry(entry) {
                 ['inv_item_count', 'phys_item_count', 'cost_billed', 'amount_paid'],
                 function(field) {
                     var dijitArgs = {required : true, constraints : {min: 0}, style : 'width:6em'};
-                    if(!field.match(/count/)) dijitArgs.style = 'width:9em';
+                    if(field.match(/count/)) {
+                        dijitArgs.style = 'width:4em;';
+                    } else {
+                        dijitArgs.style = 'width:9em;';
+                    }
                     if(entry.isnew() && field == 'phys_item_count') {
                         // by default, attempt to pay for all non-canceled and as-of-yet-un-invoiced items
                         var count = Number(li.order_summary().item_count() || 0) -