[open-ils-commits] [GIT] Evergreen ILS branch master updated. f0a03c673bbd85b48bd93e9e43bf675e8b0268f3

Evergreen Git git at git.evergreen-ils.org
Tue Jun 7 16:16:16 EDT 2011


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".

The branch, master has been updated
       via  f0a03c673bbd85b48bd93e9e43bf675e8b0268f3 (commit)
       via  7a4c9360fb48e3b17d503f59692aef7d509e7590 (commit)
      from  16afbc211042bec038a15913ee7365690418328b (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit f0a03c673bbd85b48bd93e9e43bf675e8b0268f3
Author: Dan Scott <dan at coffeecode.net>
Date:   Tue May 31 11:41:13 2011 -0400

    Add i18n support for "Retrieving title..." tab name
    
    Signed-off-by: Dan Scott <dscott at laurentian.ca>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js
index ce9d492..98e7e49 100644
--- a/Open-ILS/xul/staff_client/server/cat/util.js
+++ b/Open-ILS/xul/staff_client/server/cat/util.js
@@ -231,7 +231,7 @@ cat.util.show_in_opac = function(selection_list) {
             };
             xulG.new_tab(
                 xulG.url_prefix(urls.XUL_OPAC_WRAPPER), 
-                {'tab_name':'Retrieving title...'}, 
+                {'tab_name':$('catStrings').getString('staff.cat.util.show_in_opac.retrieving_title')}, 
                 content_params
             );
         }
diff --git a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
index 4cde2ae..05fd3d1 100644
--- a/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
+++ b/Open-ILS/xul/staff_client/server/locale/en-US/cat.properties
@@ -401,6 +401,7 @@ staff.cat.util.mark_item_missing_pieces.marking_error=Error marking item %1$s as
 staff.cat.util.mark_item_missing_pieces.one_item_missing_pieces=Item marked as missing pieces.
 staff.cat.util.mark_item_missing_pieces.multiple_item_missing_pieces=%1$s items marked as missing pieces.
 staff.cat.util.mark_item_missing_pieces.circ_not_found=No circulation found for item with barcode %1$s.  Item left unmodified.
+staff.cat.util.show_in_opac.retrieving_title=Retrieving title...
 
 staff.cat.volume_buckets.window_tab_name=Volume Buckets
 staff.cat.volume_copy_creator.my_init.btn.label=Apply

commit 7a4c9360fb48e3b17d503f59692aef7d509e7590
Author: Jason Etheridge <jason at esilibrary.com>
Date:   Fri May 27 11:41:55 2011 -0400

    Integration of unified vol/copy editor and fast  add
    
    * Wire up unified vol/copy editor for marc editor fast item add function
    * Robustify callnumber vivication for unified vol/copy editor from marc editor
    * Load opac after unified vol/copy with marc editor fast add.
    * Various bug fixes
    
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>
    Signed-off-by: Bill Erickson <berick at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
index 9684740..9d54056 100644
--- a/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
+++ b/Open-ILS/xul/staff_client/chrome/content/cat/opac.js
@@ -217,7 +217,30 @@ function set_marc_edit() {
                             copy_obj.ref(get_db_false());
 
                             JSAN.use('util.window'); var win = new util.window();
-                            return cat.util.spawn_copy_editor( { 'handle_update' : 1, 'edit' : 1, 'docid' : doc_id, 'copies' : [ copy_obj ] });
+
+                            var unified_interface = String( data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+                            if (unified_interface) {
+                                var horizontal_interface = String( data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+                                var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+                                var w = xulG.set_tab(
+                                    url,
+                                    {
+                                        'tab_name' : document.getElementById('offlineStrings').getFormattedString(
+                                            'cat.bib_record',
+                                            [ doc_id ]
+                                        )
+                                    },
+                                    {
+                                        'doc_id' : doc_id, 
+                                        'existing_copies' : [ copy_obj ],
+                                        'load_opac_when_done' : true,
+                                        'labels_in_new_tab' : true
+                                    }
+                                );
+
+                            } else {
+                                return cat.util.spawn_copy_editor( { 'handle_update' : 1, 'edit' : 1, 'docid' : doc_id, 'copies' : [ copy_obj ] });
+                            }
 
                         } catch(E) {
                             if (error) error.standard_unexpected_error_alert('Error in chrome/content/cat/opac.js, cat.util.fast_item_add #2',E); else alert('FIXME: ' + E);
diff --git a/Open-ILS/xul/staff_client/chrome/content/main/menu.js b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
index 3c3818a..7b3f53c 100644
--- a/Open-ILS/xul/staff_client/chrome/content/main/menu.js
+++ b/Open-ILS/xul/staff_client/chrome/content/main/menu.js
@@ -2145,6 +2145,13 @@ commands:
                             } catch(E) {
                                 obj.error.sdump('D_ERROR', 'main.menu, set_tab, onload: ' + E);
                             }
+                            try {
+                                if (typeof params.on_tab_load == 'function') {
+                                    params.on_tab_load(cw);
+                                }
+                            } catch(E) {
+                                obj.error.sdump('D_ERROR', 'main.menu, set_tab, onload #2: ' + E);
+                            }
                         },
                         false
                     );
diff --git a/Open-ILS/xul/staff_client/server/cat/util.js b/Open-ILS/xul/staff_client/server/cat/util.js
index 750de17..ce9d492 100644
--- a/Open-ILS/xul/staff_client/server/cat/util.js
+++ b/Open-ILS/xul/staff_client/server/cat/util.js
@@ -557,7 +557,30 @@ cat.util.fast_item_add = function(doc_id,cn_label,cp_barcode) {
 
         JSAN.use('util.window'); var win = new util.window();
         JSAN.use('cat.util');
-        return cat.util.spawn_copy_editor( { 'handle_update' : 1, 'edit' : 1, 'docid' : doc_id, 'copies' : [ copy_obj ] });
+
+        var unified_interface = String( data.hash.aous['ui.unified_volume_copy_editor'] ) == 'true';
+        if (unified_interface) {
+            var horizontal_interface = String( data.hash.aous['ui.cat.volume_copy_editor.horizontal'] ) == 'true';
+            var url = window.xulG.url_prefix( horizontal_interface ? urls.XUL_VOLUME_COPY_CREATOR_HORIZONTAL : urls.XUL_VOLUME_COPY_CREATOR );
+            var w = xulG.set_tab(
+                url,
+                {
+                    'tab_name' : document.getElementById('offlineStrings').getFormattedString(
+                        'cat.bib_record',
+                        [ doc_id ]
+                    )
+                },
+                {
+                    'doc_id' : doc_id, 
+                    'existing_copies' : [ copy_obj ],
+                    'load_opac_when_done' : true,
+                    'labels_in_new_tab' : true
+                }
+            );
+
+        } else {
+            return cat.util.spawn_copy_editor( { 'handle_update' : 1, 'edit' : 1, 'docid' : doc_id, 'copies' : [ copy_obj ] });
+        }
 
     } catch(E) {
         if (error) error.standard_unexpected_error_alert('cat.util.fast_item_add',E); else alert('FIXME: ' + E);
diff --git a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
index d9c2b2c..5112569 100644
--- a/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
+++ b/Open-ILS/xul/staff_client/server/cat/volume_copy_creator.js
@@ -118,6 +118,20 @@ function my_init() {
             var copy = g.existing_copies[i];
             g.id_copy_map[ copy.id() ] = copy;
             var call_number = copy.call_number();
+            if (typeof call_number != 'object') {
+                if (typeof g.acn_map[call_number] == 'undefined') {
+                    var temp_acn = g.network.simple_request(
+                        'FM_ACN_RETRIEVE.authoritative',
+                        [ call_number ]
+                    );
+                    if (typeof temp_acn.ilsevent != 'undefined') {
+                        alert('Error in my_init(), acn_id = ' + call_number + ' temp_acn = ' + js2JSON(temp_acn));
+                        continue;
+                    }
+                    g.acn_map[ call_number ] = temp_acn;
+                }
+                call_number = g.acn_map[call_number];
+            }
             g.doc_id = call_number.record();
             if (!g.copy_shortcut[ call_number.owning_lib() ]) {
                 ou_ids.push( call_number.owning_lib() );
@@ -1044,37 +1058,13 @@ g.vivicate_update_volumes = function() {
                             continue;
                         }
                         g.acn_map[ acn_id ] = temp_acn;
-                        if (callnumber_data.acn_id < 0) {
-                            g.acn_map[ callnumber_data.acn_id ] = temp_acn;
-                        }
                     }
 
-                }
-/*
-                var my_acn = g.acn_map[ acn_id ];
-
-                var node = g.volumes_scaffold[ou_id][composite_key].node;
-                var class_menulist = node.parentNode.previousSibling.previousSibling.firstChild;
-                var prefix_menulist = node.parentNode.previousSibling.firstChild;
-                var suffix_menulist = node.parentNode.nextSibling.firstChild;
-
-                if ( String(class_menulist.value) != String(my_acn.label_class()) {
-                    my_acn.label_class( class_menulist.value );
-                    my_acn.ischanged( get_db_true() );
-                }
-                if ( String(prefix_menulist.value) != String(my_acn.prefix()) {
-                    my_acn.prefix( prefix_menulist.value );
-                    my_acn.ischanged( get_db_true() );
-                }
-                if ( String(suffix_menulist.value) != String(my_acn.suffix()) {
-                    my_acn.suffix( suffix_menulist.value );
-                    my_acn.ischanged( get_db_true() );
-                }
+                    if (typeof g.acn_map[ callnumber_data.acn_id ] == 'undefined') {
+                        g.acn_map[ callnumber_data.acn_id ] = g.acn_map[ acn_id ];
+                    }
 
-                if (get_bool( my_acn.ischanged() )) {
-                    volumes.push( my_acn );
                 }
-*/
             }
         }
         if (volumes.length > 0) {
@@ -1125,6 +1115,7 @@ g.stash_and_close = function(param) {
             }
         }
 
+        var label_editor_func;
         if (copies.length > 0) {
             if (param == 'edit') {
                 JSAN.use('cat.util');
@@ -1144,15 +1135,19 @@ g.stash_and_close = function(param) {
             try {
                 //case 1706 /* ITEM_BARCODE_EXISTS */ :
                 if (copies && copies.length > 0 && $('print_labels').checked) {
-                    JSAN.use('util.functional');
                     dont_close = true;
-                    xulG.set_tab(
-                        urls.XUL_SPINE_LABEL,
-                        { 'tab_name' : $("catStrings").getString('staff.cat.util.spine_editor.tab_name') },
-                        {
-                            'barcodes' : util.functional.map_list( copies, function(o){return o.barcode();})
-                        }
-                    );
+                    var tab_name = $("catStrings").getString('staff.cat.util.spine_editor.tab_name');
+                    var tab_method = xul_param('labels_in_new_tab') ? 'new_tab' : 'set_tab';
+                    label_editor_func = function() {
+                        JSAN.use('util.functional');
+                        xulG[tab_method](
+                            urls.XUL_SPINE_LABEL,
+                            { 'tab_name' : tab_name },
+                            {
+                                'barcodes' : util.functional.map_list( copies, function(o){return o.barcode();})
+                            }
+                        );
+                    };
                 }
             } catch(E) {
                 alert('2: Error in volume_copy_creator.js with g.stash_and_close(): ' + E);
@@ -1166,7 +1161,31 @@ g.stash_and_close = function(param) {
             xulG.unlock_copy_editor();
         }
 
-        if (! dont_close) { xulG.close_tab(); }
+        if (xul_param('load_opac_when_done')) {
+            var opac_url = xulG.url_prefix( urls.opac_rdetail ) + '?r=' + g.doc_id;
+            var content_params = {
+                'session' : ses(),
+                'authtime' : ses('authtime'),
+                'opac_url' : opac_url
+            };
+            xulG.set_tab(
+                xulG.url_prefix(urls.XUL_OPAC_WRAPPER),
+                {
+                    'tab_name':'Retrieving title...',
+                    'on_tab_load' : function(cw) {
+                        if (typeof label_editor_func == 'function') {
+                            label_editor_func();
+                        }
+                    }
+                },
+                content_params
+            );
+        } else {
+            if (typeof label_editor_func == 'function') {
+                label_editor_func();
+            }
+            if (! dont_close) { xulG.close_tab(); }
+        }
 
     } catch(E) {
         alert('3: Error in volume_copy_creator.js with g.stash_and_close(): ' + E);

-----------------------------------------------------------------------

Summary of changes:
 .../xul/staff_client/chrome/content/cat/opac.js    |   25 +++++-
 .../xul/staff_client/chrome/content/main/menu.js   |    7 ++
 Open-ILS/xul/staff_client/server/cat/util.js       |   27 ++++++-
 .../staff_client/server/cat/volume_copy_creator.js |   91 ++++++++++++--------
 .../server/locale/en-US/cat.properties             |    1 +
 5 files changed, 112 insertions(+), 39 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list