Modified Evergreen custom print label toolbox with save modifications.
authorAdam Bowling <abowling@emeralddata.net>
Fri, 9 Nov 2018 05:35:25 +0000 (00:35 -0500)
committerChris Sharp <csharp@georgialibraries.org>
Thu, 21 Feb 2019 17:46:45 +0000 (12:46 -0500)
Signed-off-by: Adam Bowling <abowling@emeralddata.net>
Signed-off-by: Chris Sharp <csharp@georgialibraries.org>

Open-ILS/src/templates/staff/cat/printlabels/t_view.tt2
Open-ILS/web/js/ui/default/staff/cat/printlabels/app.js

index 880eaed..ba1590f 100644 (file)
                             </div>
                             <div class="eg-print-label-section" ng-if="preview_scope.toolbox_settings.page.dimensions.rows > 1 || preview_scope.toolbox_settings.page.dimensions.columns > 1">
                                 <h4>Starting Position on Label Grid</h4>
-                                <p>Specify the starting row and column where labels should begin printing. Values must not exceed the respective row and column size specified in "Print Grid Size"</p>
+                                <p>Specify the starting <span ng-if="preview_scope.toolbox_settings.feed_option.selected == 'sheet'">row and </span>column where labels should begin printing. Values must not exceed the respective <span ng-if="preview_scope.toolbox_settings.feed_option.selected == 'sheet'">row and </span>column size specified in "Print Grid Size"</p>
                                 <ul>
                                     <li ng-if="preview_scope.toolbox_settings.feed_option.selected === 'sheet'">
                                         <label>Row:</label>
index 9d006b8..cf8e159 100644 (file)
@@ -288,6 +288,13 @@ function ($scope, $q, $window, $routeParams, $location, $timeout, egCore, egNet,
                         egCore.print.fleshPrintScope($scope.preview_scope);
                         $scope.template_changed(); // load the default
                         $scope.rebuild_cn_set();
+                        if ($scope.preview_scope.toolbox_settings && $scope.template_name && $scope.print.template_content) {
+                            var re = /eg\_plt/i;
+                            if (re.test($scope.print.template_content)) {\r
+                                $scope.applyTemplate($scope.template_name);\r
+                                $scope.redraw_label_table();\r
+                            }
+                        }
                     });
 
                 });
@@ -527,6 +534,7 @@ function ($scope, $q, $window, $routeParams, $location, $timeout, egCore, egNet,
             var output = (style ? style.join("\n") : "") + (comments ? comments.join("\n") : "") + table;
             output = output.replace(/\n+/, "\n");
             $scope.print.template_content = output;
+            $scope.save_locally();
         }
     }