[open-ils-commits] r15271 - in trunk/Open-ILS: src/perlmods/OpenILS/Application/Actor web/opac/locale/en-US xul/staff_client/chrome/content/cat xul/staff_client/chrome/content/main xul/staff_client/server/cat xul/staff_client/server/circ (phasefx)

svn at svn.open-ils.org svn at svn.open-ils.org
Thu Jan 7 16:17:08 EST 2010


Author: phasefx
Date: 2010-01-07 16:17:03 -0500 (Thu, 07 Jan 2010)
New Revision: 15271

Modified:
   trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
   trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
   trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
   trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
   trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul
   trunk/Open-ILS/xul/staff_client/server/cat/util.js
   trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
   trunk/Open-ILS/xul/staff_client/server/circ/copy_status.xul
   trunk/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
Log:
Bucket related enhancements:
* Add to Record Bucket action for Item Status interface
* Authoritative methods in bucket interfaces immune to database replication lag
* Removed a CGI param for better caching of the quick Add to Record Bucket interface
* Added a cat.util.add_titles_to_bucket utility method (but forgot to put it into cat.util.EXPORT_OK, though harmless)



Modified: trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm
===================================================================
--- trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/src/perlmods/OpenILS/Application/Actor/Container.pm	2010-01-07 21:17:03 UTC (rev 15271)
@@ -37,6 +37,7 @@
 __PACKAGE__->register_method(
 	method	=> "bucket_retrieve_all",
 	api_name	=> "open-ils.actor.container.all.retrieve_by_user",
+    authoritative => 1,
 	notes		=> <<"	NOTES");
 		Retrieves all un-fleshed buckets assigned to given user 
 		PARAMS(authtoken, bucketOwnerId)
@@ -65,6 +66,7 @@
 __PACKAGE__->register_method(
 	method	=> "bucket_flesh",
 	api_name	=> "open-ils.actor.container.flesh",
+    authoritative => 1,
 	argc		=> 3, 
 );
 

Modified: trunk/Open-ILS/web/opac/locale/en-US/lang.dtd
===================================================================
--- trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/web/opac/locale/en-US/lang.dtd	2010-01-07 21:17:03 UTC (rev 15271)
@@ -1949,6 +1949,8 @@
 <!ENTITY staff.circ.copy_status_overlay.sel_clip.accesskey "C">
 <!ENTITY staff.circ.copy_status_overlay.sel_bucket.label "Add to Item Bucket">
 <!ENTITY staff.circ.copy_status_overlay.sel_bucket.accesskey "A">
+<!ENTITY staff.circ.copy_status_overlay.sel_record_bucket.label "Add to Record Bucket">
+<!ENTITY staff.circ.copy_status_overlay.sel_record_bucket.accesskey "">
 <!ENTITY staff.circ.copy_status_overlay.sel_opac.label "Show in Catalog">
 <!ENTITY staff.circ.copy_status_overlay.sel_opac.accesskey "S">
 <!ENTITY staff.circ.copy_status_overlay.sel_copy_details.label "Show Item Details">

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/cat/opac.js	2010-01-07 21:17:03 UTC (rev 15271)
@@ -249,10 +249,12 @@
 function add_to_bucket() {
     JSAN.use('util.window'); var win = new util.window();
     win.open(
-        xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK)
-        + '?record_ids=' + js2JSON( [ docid ] ),
+        xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK),
         'sel_bucket_win' + win.window_name_increment(),
-        'chrome,resizable,modal,center'
+        'chrome,resizable,modal,center',
+        {
+            record_ids: [ docid ]
+        }
     );
 }
 

Modified: trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/chrome/content/main/constants.js	2010-01-07 21:17:03 UTC (rev 15271)
@@ -53,9 +53,9 @@
     'BLOB_MOBTS_CIRC_MVR_OPEN' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.user.transactions.fleshed' },
     'BLOB_BALANCE_OWED_VIA_USERGROUP' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.usergroup.members.balance_owed.authoritative' },
     'BUCKET_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.create' },
-    'BUCKET_FLESH' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.flesh' },
+    'BUCKET_FLESH' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.flesh.authoritative' },
     'BUCKET_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.full_delete' },
-    'BUCKET_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.all.retrieve_by_user' },
+    'BUCKET_RETRIEVE_VIA_USER' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.all.retrieve_by_user.authoritative' },
     'BUCKET_ITEM_CREATE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.item.create' },
     'BUCKET_ITEM_DELETE' : { 'app' : 'open-ils.actor', 'method' : 'open-ils.actor.container.item.delete' },
     'CAPTURE_COPY_FOR_HOLD_VIA_BARCODE' : { 'app' : 'open-ils.circ', 'method' : 'open-ils.circ.hold.capture_copy.barcode' },

Modified: trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/server/cat/record_buckets_quick.xul	2010-01-07 21:17:03 UTC (rev 15271)
@@ -47,10 +47,11 @@
                 g.record_ids = xul_param(
                     'record_ids',{
                         'concat' : true,
+                        'modal_xulG' : true,
                         'JSON2js_if_cgi' : true,
                         'JSON2js_if_xpcom' : true,
                         'stash_name':'rb_temp_record_ids',
-                        'clear_xpcom' : true,
+                        'clear_xpcom' : true
                     }
                 );
 

Modified: trunk/Open-ILS/xul/staff_client/server/cat/util.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/cat/util.js	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/server/cat/util.js	2010-01-07 21:17:03 UTC (rev 15271)
@@ -239,6 +239,18 @@
     );
 }
 
+cat.util.add_titles_to_bucket = function(record_ids) {
+    JSAN.use('util.window'); var win = new util.window();
+    win.open(
+        xulG.url_prefix(urls.XUL_RECORD_BUCKETS_QUICK),
+        'sel_bucket_win' + win.window_name_increment(),
+        'chrome,resizable,modal,center',
+        {
+            record_ids: record_ids 
+        }
+    );
+}
+
 cat.util.spawn_copy_editor = function(params) {
     try {
         if (!params.copy_ids && !params.copies) return;

Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_status.js	2010-01-07 21:17:03 UTC (rev 15271)
@@ -59,6 +59,7 @@
                             obj.controller.view.sel_edit.setAttribute('disabled','true');
                             obj.controller.view.sel_opac.setAttribute('disabled','true');
                             obj.controller.view.sel_bucket.setAttribute('disabled','true');
+                            obj.controller.view.sel_record_bucket.setAttribute('disabled','true');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','true');
                             obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','true');
                             obj.controller.view.sel_mark_items_missing.setAttribute('disabled','true');
@@ -87,6 +88,7 @@
                             obj.controller.view.sel_patron.setAttribute('disabled','false');
                             obj.controller.view.cmd_triggered_events.setAttribute('disabled','false');
                             obj.controller.view.sel_bucket.setAttribute('disabled','false');
+                            obj.controller.view.sel_record_bucket.setAttribute('disabled','false');
                             obj.controller.view.sel_copy_details.setAttribute('disabled','false');
                             obj.controller.view.sel_mark_items_damaged.setAttribute('disabled','false');
                             obj.controller.view.sel_mark_items_missing.setAttribute('disabled','false');
@@ -380,6 +382,19 @@
                             cat.util.add_copies_to_bucket(obj.selection_list);
                         }
                     ],
+                    'sel_record_bucket' : [
+                        ['command'],
+                        function() {
+                            JSAN.use('cat.util'); JSAN.use('util.functional');
+                            cat.util.add_titles_to_bucket(
+                                util.functional.map_list(
+                                    obj.selection_list, function (o) {
+                                        return o.doc_id;
+                                    }
+                                )
+                            );
+                        }
+                    ],
                     'copy_status_barcode_entry_textbox' : [
                         ['keypress'],
                         function(ev) {

Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_status.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_status.xul	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_status.xul	2010-01-07 21:17:03 UTC (rev 15271)
@@ -126,6 +126,7 @@
         <command id="sel_edit" disabled="true"/>
         <command id="sel_opac" disabled="true"/>
         <command id="sel_bucket" disabled="true"/>
+        <command id="sel_record_bucket" disabled="true" label="&staff.circ.copy_status_overlay.sel_record_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_record_bucket.accesskey;" />
         <command id="sel_spine" disabled="true"/>
         <command id="sel_transit_abort" disabled="true"/>
         <command id="sel_clip" disabled="true"/>

Modified: trunk/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul
===================================================================
--- trunk/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul	2010-01-07 17:01:46 UTC (rev 15270)
+++ trunk/Open-ILS/xul/staff_client/server/circ/copy_status_overlay.xul	2010-01-07 21:17:03 UTC (rev 15271)
@@ -13,6 +13,7 @@
     <popup id="copy_status_actions" position="at_pointer"> 
         <menuitem command="sel_clip" label="&staff.circ.copy_status_overlay.sel_clip.label;" accesskey="&staff.circ.copy_status_overlay.sel_clip.accesskey;" />
         <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
+        <menuitem command="sel_record_bucket" />
         <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
         <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
         <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
@@ -42,6 +43,7 @@
     <popup id="copy_cat_status_actions" position="at_pointer"> 
         <menuitem command="sel_clip" label="&staff.circ.copy_status_overlay.sel_clip.label;" accesskey="&staff.circ.copy_status_overlay.sel_clip.accesskey;" />
         <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
+        <menuitem command="sel_record_bucket" />
         <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
         <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
         <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
@@ -117,6 +119,7 @@
         <menupopup>
             <menuitem command="sel_clip" label="&staff.circ.copy_status_overlay.sel_clip.label;" accesskey="&staff.circ.copy_status_overlay.sel_clip.accesskey;" />
             <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
+            <menuitem command="sel_record_bucket" />
             <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
             <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
             <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>
@@ -148,6 +151,7 @@
         <menupopup>
             <menuitem command="sel_clip" label="&staff.circ.copy_status_overlay.sel_clip.label;" accesskey="&staff.circ.copy_status_overlay.sel_clip.accesskey;" />
             <menuitem command="sel_bucket" label="&staff.circ.copy_status_overlay.sel_bucket.label;" accesskey="&staff.circ.copy_status_overlay.sel_bucket.accesskey;"/>
+            <menuitem command="sel_record_bucket" />
             <menuitem command="sel_opac" label="&staff.circ.copy_status_overlay.sel_opac.label;" accesskey="&staff.circ.copy_status_overlay.sel_opac.accesskey;" />
             <menuitem command="sel_copy_details" label="&staff.circ.copy_status_overlay.sel_copy_details.label;" accesskey="&staff.circ.copy_status_overlay.sel_copy_details.accesskey;" />
             <menuitem command="sel_patron" label="&staff.circ.copy_status_overlay.sel_patron.label;" accesskey="&staff.circ.copy_status_overlay.sel_patron.accesskey;"/>



More information about the open-ils-commits mailing list