From 79bf9c67c07b184b6e43dbff2627a1028d3eb8fd Mon Sep 17 00:00:00 2001 From: Bill Erickson Date: Wed, 23 Apr 2014 10:33:56 -0400 Subject: [PATCH] browser staff : print config UI cont. Signed-off-by: Bill Erickson --- .../templates/staff/admin/workstation/t_printing.tt2 | 18 +++++++++++++----- .../web/js/ui/default/staff/admin/workstation/app.js | 12 +++++++++--- .../web/js/ui/default/staff/services/printstore.js | 4 +++- 3 files changed, 25 insertions(+), 9 deletions(-) diff --git a/Open-ILS/src/templates/staff/admin/workstation/t_printing.tt2 b/Open-ILS/src/templates/staff/admin/workstation/t_printing.tt2 index 38743b15e5..48237f8817 100644 --- a/Open-ILS/src/templates/staff/admin/workstation/t_printing.tt2 +++ b/Open-ILS/src/templates/staff/admin/workstation/t_printing.tt2 @@ -112,10 +112,18 @@
- +
+
+ + +
+
@@ -149,7 +157,7 @@ ng-init="htmlPrintContent='

[% l('Test HTML Print') %]


- +

[% l('Welcome, Stranger!') %]

{{value1}}

{{value2}}

diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index 9ae2a3c62e..d2872becaf 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -131,9 +131,14 @@ function($scope , egPrintStore) { // for testing $scope.setContentType = function(type) { $scope.contentType = type } - $scope.testPrint = function() { + $scope.testPrint = function(withDialog) { if ($scope.contentType == 'text/plain') { - egPrintStore.print($scope.context, $scope.contentType, $scope.textPrintContent); + egPrintStore.print( + $scope.context, + $scope.contentType, + $scope.textPrintContent, + withDialog + ); } else { egPrintStore.print( $scope.context, @@ -143,7 +148,8 @@ function($scope , egPrintStore) { value1 : 'Value One', value2 : 'Value Two', date_value : '2015-02-04T14:04:34-0400' - } + }, + withDialog ); } } diff --git a/Open-ILS/web/js/ui/default/staff/services/printstore.js b/Open-ILS/web/js/ui/default/staff/services/printstore.js index 7363eed6ae..f0de9e36b9 100644 --- a/Open-ILS/web/js/ui/default/staff/services/printstore.js +++ b/Open-ILS/web/js/ui/default/staff/services/printstore.js @@ -217,7 +217,8 @@ angular.module('egCoreMod') // print the provided content // supported values for contentType are 'text/html' and 'text/plain' - service.print = function(context, contentType, content, printScope) { + service.print = function( + context, contentType, content, printScope, withDialog) { if (contentType == 'text/html') { content = service.interpolateHtmlTemplate(content, printScope); @@ -232,6 +233,7 @@ angular.module('egCoreMod') config : conf[context], content : content, contentType : contentType, + showDialog : withDialog }); }); } -- 2.11.0