From a0756e41165c2ab6476c2e287f44aeeede11daba Mon Sep 17 00:00:00 2001 From: John McLear Date: Thu, 21 Nov 2013 15:34:13 +0000 Subject: [PATCH] fixes for views --- index.js | 2 +- static/css/iframe.css | 3 ++- static/js/page_view.js | 3 ++- 3 files changed, 5 insertions(+), 3 deletions(-) diff --git a/index.js b/index.js index ba7f5bd..955606a 100644 --- a/index.js +++ b/index.js @@ -14,7 +14,7 @@ exports.getLineHTMLForExport = function (hook, context) { var header = _analyzeLine(context.attribLine, context.apool); if (header) { var inlineStyle = getInlineStyle(header); - return "" + context.text.substring(1) + ""; + return "" + context.text.substring(1) + ""; } } diff --git a/static/css/iframe.css b/static/css/iframe.css index 9ae2182..225c4ad 100644 --- a/static/css/iframe.css +++ b/static/css/iframe.css @@ -1,5 +1,6 @@ .pageBreak{ - page-break-before: always; + page-break-after: always; + -webkit-region-break-inside: avoid; border-bottom: 1px dotted #AAA; width:100%; height:1px; diff --git a/static/js/page_view.js b/static/js/page_view.js index 34a093a..e1e4c9a 100644 --- a/static/js/page_view.js +++ b/static/js/page_view.js @@ -88,8 +88,9 @@ exports.aceDomLineProcessLineAttributes = function(name, context){ if( context.cls.indexOf("pageBreak") !== -1) { var type="pageBreak"; } var tagIndex = context.cls.indexOf(type); if (tagIndex !== undefined && type){ + // NOTE THE INLINE CSS IS REQUIRED FOR IT TO WORK WITH PRINTING! Or is it? var modifier = { - preHtml: '
', + preHtml: '
', postHtml: '
', processedMarker: true };