LP#1787479: Adds customization for multipage print label printing and fixes the issue
authorAdam Bowling <abowling@emeralddata.net>
Thu, 10 Jan 2019 07:12:28 +0000 (02:12 -0500)
committerAdam Bowling <abowling@emeralddata.net>
Thu, 10 Jan 2019 07:12:28 +0000 (02:12 -0500)
with saving templates after the change to DB saving from local storage.

Signed-off-by: Adam Bowling <abowling@emeralddata.net>
Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js

index 88ae5d0..9907985 100644 (file)
@@ -325,21 +325,21 @@ function ($scope, $q, $window, $routeParams, $location, $timeout, egCore, egNet,
     $scope.fetchTemplates(true);
 
     $scope.applyTemplate = function (n) {
-        if (n) {\r
-            if ($scope.templates[n]) {\r
+        if (n) {
+            if ($scope.templates[n]) {
                 $scope.print.cn_template_content = $scope.templates[n].cn_content;
                 $scope.print.template_content = $scope.templates[n].content;
                 $scope.print.template_context = $scope.templates[n].context;
-                for (var s in $scope.templates[n].settings) {\r
-                    $scope.preview_scope.settings[s] = $scope.templates[n].settings[s];\r
+                for (var s in $scope.templates[n].settings) {
+                    $scope.preview_scope.settings[s] = $scope.templates[n].settings[s];
                 }
-                if ($scope.templates[n].toolbox_settings) {\r
+                if ($scope.templates[n].toolbox_settings) {
                     $scope.preview_scope.toolbox_settings = $scope.templates[n].toolbox_settings;
-                    $scope.create_print_label_table();\r
+                    $scope.create_print_label_table();
                 }
                 egCore.hatch.setItem('cat.printlabels.default_template', n);
-                $scope.save_locally();\r
-            }\r
+                $scope.save_locally();
+            }
         }
     }