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

svn at svn.open-ils.org svn at svn.open-ils.org
Mon Apr 13 16:21:20 EDT 2009


Author: erickson
Date: 2009-04-13 16:21:16 -0400 (Mon, 13 Apr 2009)
New Revision: 12854

Modified:
   trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js
   trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
Log:
plugged in per-po asset creation

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-04-13 20:20:43 UTC (rev 12853)
+++ trunk/Open-ILS/web/js/ui/default/acq/common/li_table.js	2009-04-13 20:21:16 UTC (rev 12854)
@@ -10,6 +10,8 @@
 dojo.require('openils.widget.AutoFieldWidget');
 dojo.require('dojo.data.ItemFileReadStore');
 dojo.require('openils.widget.ProgressDialog');
+dojo.requireLocalization('openils.acq', 'acq');
+var localeStrings = dojo.i18n.getLocalization('openils.acq', 'acq');
 
 function AcqLiTable() {
 
@@ -474,9 +476,34 @@
             case 'receive_po':
                 this.receivePO();
                 break;
+
+            case 'create_assets':
+                this.createAssets();
+                break;
         }
     }
 
+    this.createAssets = function() {
+        if(!this.isPO) return;
+        if(!confirm(localeStrings.CREATE_PO_ASSETS_CONFIRM)) return;
+        progressDialog.show();
+        fieldmapper.standardRequest(
+            ['open-ils.acq', 'open-ils.acq.purchase_order.assets.create'],
+            {   async: true,
+                params: [this.authtoken, this.isPO],
+                onresponse: function(r) {
+                    var resp = openils.Util.readResponse(r);
+                    if(!resp) return;
+                    if(resp.complete) {
+                        progressDialog.hide();
+                    } else {
+                        progressDialog.update({maximum:resp.total, progress:resp.progress});
+                    }
+                }
+            }
+        );
+    }
+
     this.printPO = function() {
         if(!this.isPO) return;
         progressDialogInd.show();

Modified: trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2
===================================================================
--- trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2009-04-13 20:20:43 UTC (rev 12853)
+++ trunk/Open-ILS/web/templates/default/acq/common/li_table.tt2	2009-04-13 20:21:16 UTC (rev 12854)
@@ -12,14 +12,15 @@
                                 <td>
                                     <span>
                                         <select dojoType='dijit.form.FilteringSelect' value='_' jsId='acqLitLiActionsSelector'>
-                                            <option value='_'>--Actions--</option>
-                                            <option value='save_picklist'>Save Items To Selection List</option>
-                                            <option value='selector_ready'>Mark Ready for Selector</option>
-                                            <option value='order_ready'>Mark Ready for Order</option>
-                                            <option value='create_order'>Create Purchase Order</option>
-                                            <option value='receive_po'>Mark Purchase Order as Received</option>
-                                            <option value='print_po'>Print Purchase Order</option>
-                                            <option value='delete_selected'>Delete Selected Items</option>
+                                            <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>
+                                            <option mask='pl' value='order_ready'>Mark Ready for Order</option>
+                                            <option mask='pl' value='create_order'>Create Purchase Order</option>
+                                            <option mask='po' value='receive_po'>Mark Purchase Order as Received</option>
+                                            <option mask='po' value='print_po'>Print Purchase Order</option>
+                                            <option mask='po' value='create_assets'>Create PO Assets</option>
+                                            <option mask='*'  value='delete_selected'>Delete Selected Items</option>
                                         </select>
                                     </span>
                                     <span id='acq-lit-generic-progress' class='hidden'>



More information about the open-ils-commits mailing list