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

Evergreen Git git at git.evergreen-ils.org
Thu May 19 09:57:54 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  3232fbd8864ae988fb16fdce1fcbd46a32a158ae (commit)
       via  c8a263f9f3b0e9d14711bc3e49b7dcc091cb15f0 (commit)
      from  0b4b17a2f6713c29ac81cadc0fca53fe4dd959da (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 3232fbd8864ae988fb16fdce1fcbd46a32a158ae
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Thu May 19 08:51:47 2011 -0400

    Make DATE_FORMAT macro check inputs
    
    Specifically, if no date and no format (empty replaces?) replace with empty string.
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js
index 8c571c5..28d78f9 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/print.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js
@@ -305,9 +305,13 @@ util.print.prototype = {
             // Date Format
             try {
                 var match;
-                var date_format_patt=/%DATE_FORMAT\(([^,]*),([^)]*)\)%/
-                while(match = date_format_patt.exec(s))
-                    s = s.replace(match[0], util.date.formatted_date(match[1], match[2]));
+                var date_format_patt=/%DATE_FORMAT\(\s*([^,]*?)\s*,\s*([^)]*?)\s*\)%/
+                while(match = date_format_patt.exec(s)) {
+                    if(match[1] == '' || match[2] == '')
+                        s = s.replace(match[0], '');
+                    else
+                        s = s.replace(match[0], util.date.formatted_date(match[1], match[2]));
+                }
             } catch(E) { dump(E+'\n'); }
 
             // Substrings

commit c8a263f9f3b0e9d14711bc3e49b7dcc091cb15f0
Author: Thomas Berezansky <tsbere at mvlc.org>
Date:   Wed May 18 19:12:42 2011 -0400

    Add Shelf Expire Time to hold slip, date formatter
    
    Date formatter would work like so:
    %DATE_FORMAT(date,format)%
    
    For example:
    %DATE_FORMAT(%shelf_expire_time%,%m/%d)%
    
    Signed-off-by: Thomas Berezansky <tsbere at mvlc.org>
    Signed-off-by: Jason Etheridge <jason at esilibrary.com>

diff --git a/Open-ILS/xul/staff_client/chrome/content/util/print.js b/Open-ILS/xul/staff_client/chrome/content/util/print.js
index 4f9cbdd..8c571c5 100644
--- a/Open-ILS/xul/staff_client/chrome/content/util/print.js
+++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js
@@ -302,6 +302,14 @@ util.print.prototype = {
                 }
             } catch(E) { dump(E+'\n'); }
 
+            // Date Format
+            try {
+                var match;
+                var date_format_patt=/%DATE_FORMAT\(([^,]*),([^)]*)\)%/
+                while(match = date_format_patt.exec(s))
+                    s = s.replace(match[0], util.date.formatted_date(match[1], match[2]));
+            } catch(E) { dump(E+'\n'); }
+
             // Substrings
             try {
                 var match;
diff --git a/Open-ILS/xul/staff_client/server/circ/util.js b/Open-ILS/xul/staff_client/server/circ/util.js
index 9859415..32f3a60 100644
--- a/Open-ILS/xul/staff_client/server/circ/util.js
+++ b/Open-ILS/xul/staff_client/server/circ/util.js
@@ -2566,6 +2566,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
             'notify_by_email_msg' : '',
             'request_date' : '',
             'request_date_msg' : '',
+            'shelf_expire_time' : '',
             'slip_date' : '',
             'slip_date_msg' : '',
             'user' : '',
@@ -2764,6 +2765,7 @@ circ.util.checkin_via_barcode2 = function(session,params,backdate,auto_print,che
                         msg += '\n';
                         print_data.request_date = util.date.formatted_date(check.payload.hold.request_time(),'%F');
                         print_data.request_date_msg = document.getElementById('circStrings').getFormattedString('staff.circ.utils.payload.hold.request_date', [print_data.request_date]);
+                        print_data.shelf_expire_time = check.payload.hold.shelf_expire_time();
                         msg += print_data.request_date_msg;
                         msg += '\n';
                     }

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

Summary of changes:
 .../xul/staff_client/chrome/content/util/print.js  |   12 ++++++++++++
 Open-ILS/xul/staff_client/server/circ/util.js      |    2 ++
 2 files changed, 14 insertions(+), 0 deletions(-)


hooks/post-receive
-- 
Evergreen ILS


More information about the open-ils-commits mailing list