text rotation in receipts and slips
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Evergreen |
Won't Fix
|
Wishlist
|
Unassigned |
Bug Description
collab/
http://
This requires the Mozilla Print strategy. You could use Mozilla-specific CSS directly to accomplish the same, but this abstracts it a bit, which could be useful if xulrunner ever changes, or receipt templates ever get ported to a non-Mozilla environment.
No pullrequest yet; thoughts?
commit 65cf372b67a0a7e
Author: Jason Etheridge <email address hidden>
Date: Mon May 14 12:14:30 2012 -0400
text rotation macro for receipts/slips
%ROTATE(
%ROTATE(
%ROTATE_END%
Degrees is an integer, but typically you'd use values like 90, -90, 180, 45 etc.
The things between %ROTATE% and %ROTATE_END% macros will be rotated by the
specified number of degrees. Negative values rotate counter-clockwise. Except
for very minimal receipts with judicious use of line breaks, simple rotation
will probably truncate part of whatever is being rotated. So, there's an
'extra CSS' variant where you can specify more CSS to fine tune positioning of
the rotated text/objects.
For an example, try this for a hold_slip template:
Header:
This item needs to be routed to <b>%route_
Title: %item_title%<br/>
<br/>
Notify by phone: %notify_
Line Item:
Footer:
Request date: %request_date%<br/>
Slip Date: %TODAY_TRIM%<br/>
Printed by %STAFF_FIRSTNAME% at %SHORTNAME%<br/>
<br/>
And then try replacing the
with a mere
and note how the text starts overlapping and becomes truncated.
Signed-off-by: Jason Etheridge <email address hidden>
Changed in evergreen: | |
importance: | Undecided → Wishlist |
Changed in evergreen: | |
status: | New → Incomplete |
Changed in evergreen: | |
status: | Incomplete → Triaged |
Any security loopholes with the extra CSS part?