browser staff : print config UI cont.
authorBill Erickson <berick@esilibrary.com>
Wed, 23 Apr 2014 14:33:56 +0000 (10:33 -0400)
committerBill Erickson <berick@esilibrary.com>
Wed, 23 Apr 2014 14:33:56 +0000 (10:33 -0400)
Signed-off-by: Bill Erickson <berick@esilibrary.com>
Open-ILS/src/templates/staff/admin/workstation/t_printing.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js
Open-ILS/web/js/ui/default/staff/services/printstore.js

index 38743b1..48237f8 100644 (file)
               </div>
             </div>
             <div class="col-md-2">
-              <button type="button" 
-                ng-click="testPrint()"
-                class="btn btn-default btn-lg pull-right btn-success">
-                  [% l('Print') %]</button>
+              <div class="input-group pull-right">
+                <div class="input-group-btn">
+                  <button type="button" 
+                    ng-click="testPrint()"
+                    class="btn btn-default btn-success">
+                      [% l('Print') %]</button>
+                  <button type="button" 
+                    ng-click="testPrint(true)"
+                    class="btn btn-default btn-info">
+                      [% l('Print with Dialog') %]</button>
+                </div>
+              </div>
             </div>
           </div>
 
@@ -149,7 +157,7 @@ ng-init="htmlPrintContent='
   <style>p { color: blue }</style>
   <h2>[% l('Test HTML Print') %]</h2>
   <br/>
-  <img src=\'/opac/images/main_logo.png\' width=\'140\' height=\'24\'/>
+  <img src=\'http://[% ctx.hostname %]/opac/images/main_logo.png\' width=\'140\' height=\'24\'/>
   <p>[% l('Welcome, Stranger!') %]</p>
   <p>{{value1}}</p>
   <p>{{value2}}</p>
index 9ae2a3c..d2872be 100644 (file)
@@ -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
             );
         }
     }
index 7363eed..f0de9e3 100644 (file)
@@ -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
             });
         });
     }