Add new macros for print templates.
authorphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 17 Apr 2011 19:26:05 +0000 (19:26 +0000)
committerphasefx <phasefx@dcc99617-32d9-48b4-a31d-7c20da2025e4>
Sun, 17 Apr 2011 19:26:05 +0000 (19:26 +0000)
commit82a8fe9649fe259cf71b61b1a345cc9419489564
treef77f8ee696985919c91327743c737647d6e277ab
parent9852fe14eadd8f786391b70c82713f61a929f2a1
Add new macros for print templates.

%-TRIM%
Trims whitespace before the macro

%TRIM-%
Trims whitespace after the macro

%SUBSTR(#)%...%SUBSTR_END%
Take substring starting at position # to end of string.
If # is negative count backwards from end of string.

%SUBSTR(#,#)%...%SUBSTR_END%
Same as previous, but limit to second provided number characters after start point.
If second number is negative, count backwards instead of forwards.

TRIM macros inside of SUBSTR will be replaced first, then SUBSTR, then TRIM outside of SUBSTR.

Author: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Thomas Berezansky <tsbere@mvlc.org>
Signed-off-by: Jason Etheridge <jason@esilibrary.com>
git-svn-id: svn://svn.open-ils.org/ILS/branches/rel_2_1@20138 dcc99617-32d9-48b4-a31d-7c20da2025e4
Open-ILS/xul/staff_client/chrome/content/util/print.js