From: pines Date: Thu, 22 Feb 2007 19:53:01 +0000 (+0000) Subject: %LINE_NO% macro as an alternative to an ordinal
  • tag X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=dc4a73385305113f2756d84405ad274b972aed3d;p=Evergreen.git %LINE_NO% macro as an alternative to an ordinal
  • tag git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7000 dcc99617-32d9-48b4-a31d-7c20da2025e4 --- 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 96c97d1fb9..d516b33cd0 100644 --- a/Open-ILS/xul/staff_client/chrome/content/util/print.js +++ b/Open-ILS/xul/staff_client/chrome/content/util/print.js @@ -125,6 +125,7 @@ util.print.prototype = { if (params.list) { for (var i = 0; i < params.list.length; i++) { params.row = params.list[i]; + params.row_idx = i; s += this.template_sub( params.line_item, cols, params ); } } @@ -143,6 +144,9 @@ util.print.prototype = { JSAN.use('util.date'); var s = msg; var b; + try{b = s; s = s.replace(/%LINE_NO%/,Number(params.row_idx)+1);} + catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');} + try{b = s; s = s.replace(/%patron_barcode%/,params.patron_barcode);} catch(E){s = b; this.error.sdump('D_WARN','string = <' + s + '> error = ' + js2JSON(E)+'\n');}