%LINE_NO% macro as an alternative to an ordinal <li> tag
authorpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Feb 2007 19:53:01 +0000 (19:53 +0000)
committerpines <pines@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Thu, 22 Feb 2007 19:53:01 +0000 (19:53 +0000)
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_1_0@7000 dcc99617-32d9-48b4-a31d-7c20da2025e4

Open-ILS/xul/staff_client/chrome/content/util/print.js

index 96c97d1..d516b33 100644 (file)
@@ -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');}