return service.getPrintTemplate(args.template)
.then(function(content) {
args.content = content;
- if (!args.content_type) args.content_type = 'html';
- return service.print_content(args);
+ if (!args.content_type) args.content_type = 'text/html';
+ service.getPrintTemplateContext(args.template)
+ .then(function(context) {
+ args.context = context;
+ return service.print_content(args);
+ });
});
}
* DOM element). Having multiple egPrintContainers could result in chaos.
*/
-<<<<<<< HEAD
-// FIXME: only apply print CSS when print commands are issued via the
-// print container, otherwise using the browser's native print page
-// option will always result in empty pages. Move the print CSS
-// out of the standalone CSS file and put it into a template file
-// for this directive.
-=======
->>>>>>> 9ff498f... LP#1646166 Hatch print requires no print CSS
.directive('egPrintContainer', ['$compile', function($compile) {
return {
restrict : 'AE',
// DOM with print CSS.
// Returns a promise reolved with the compiled HTML as a string.
egPrint.ingest_print_content = function(type, content, printScope) {
-<<<<<<< HEAD
-
- if (type == 'text/csv' || type == 'text/plain') {
- // preserve newlines, spaces, etc.
- content = '<pre>' + content + '</pre>';
- }
-
-=======
->>>>>>> 9ff498f... LP#1646166 Hatch print requires no print CSS
$scope.elm.html(content);
var sub_scope = $scope.$new(true);