LP1774008 Remove Hatch storage options
authorBill Erickson <berickxx@gmail.com>
Wed, 5 Aug 2020 18:19:52 +0000 (14:19 -0400)
committerJason Boyer <JBoyer@equinoxinitiative.org>
Wed, 30 Sep 2020 19:17:22 +0000 (15:17 -0400)
Remove option to store settings in Hatch from the AngJS Hatch admin
page.  Update some Hatch labels to remove the term 'Storage'.  Remove
deprecated JS code related to tracking this setting and the
long-deprecated offline file storage setting.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Signed-off-by: Terran McCanna <tmccanna@georgialibraries.org>
Signed-off-by: Jason Boyer <JBoyer@equinoxinitiative.org>
Open-ILS/src/templates/staff/admin/workstation/t_hatch.tt2
Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

index bec3bf2..51f22fd 100644 (file)
@@ -1,6 +1,6 @@
 <div class="container admin-splash-container">
 
-  <h2>[% l('Print / Storage Service ("Hatch")') %]</h2>
+  <h2>[% l('Print Service ("Hatch")') %]</h2>
 
   <div class="alert alert-success" ng-if="hatch_available">
     [% l("Hatch is Available") %]
       </div>
     </div>
   </div>
-
-  <div class="row new-entry">
-    <div class="panel panel-danger">
-      <div class="panel-heading">[% l('Storing settings in Hatch is deprecated') %]</div>
-      <div class="panel-body">
-        [% l("If 'Store Local Settings in Hatch' is enabled, use the 'Copy Hatch Settings To Local Storage' button before disabling 'Store Local Settings in Hatch'") %]
-      </div>
-    </div>
-  </div>
-
-  <div class="row new-entry">
-    <div class="col-md-4">
-      <div class="checkbox">
-        <label>
-          <input type="checkbox" 
-            ng-model="hatch_settings">
-            [% l('Store Local Settings in Hatch') %]
-        </label>
-      </div>
-    </div>
-    <div class="col-md-3">
-      <button class="btn btn-default" ng-click="copy_to_local()">
-        [% l('Copy Hatch Settings To Local Storage') %]
-      </button>
-    </div>
-  </div>
-
 </div>
 
 
index 345f7db..61a8d08 100644 (file)
@@ -44,7 +44,7 @@
         <div class="col-md-6">
           <span class="glyphicon glyphicon-retweet"></span>
           <a target="_self" href="./admin/workstation/hatch">
-            [% l('Print/Storage Service ("Hatch")') %]
+            [% l('Print Service ("Hatch")') %]
           </a>
         </div>
       </div>
index d01ccd5..4877334 100644 (file)
@@ -1020,8 +1020,6 @@ function($scope , egCore , ngToast) {
     var hatch = egCore.hatch;  // convenience
 
     $scope.hatch_available = hatch.hatchAvailable;
-    $scope.hatch_settings = hatch.useSettings();
-    $scope.hatch_offline  = hatch.useOffline();
 
     hatch.usePrinting().then(function(answer) {
         $scope.hatch_printing = answer;
@@ -1033,35 +1031,6 @@ function($scope , egCore , ngToast) {
         if (typeof newval != 'boolean') return;
         hatch.setItem('eg.hatch.enable.printing', newval);
     });
-
-    $scope.$watch('hatch_settings', function(newval) {
-        if (typeof newval != 'boolean') return;
-        hatch.setLocalItem('eg.hatch.enable.settings', newval);
-    });
-
-    $scope.$watch('hatch_offline', function(newval) {
-        if (typeof newval != 'boolean') return;
-        hatch.setLocalItem('eg.hatch.enable.offline', newval);
-    });
-
-    $scope.copy_to_hatch = function() {
-        hatch.copySettingsToHatch().then(
-            function() {
-                ngToast.create(egCore.strings.HATCH_SETTINGS_MIGRATION_SUCCESS)},
-            function() {
-                ngToast.warning(egCore.strings.HATCH_SETTINGS_MIGRATION_FAILURE)}
-        );
-    }
-
-    $scope.copy_to_local = function() {
-        hatch.copySettingsToLocal().then(
-            function() {
-                ngToast.create(egCore.strings.HATCH_SETTINGS_MIGRATION_SUCCESS)},
-            function() {
-                ngToast.warning(egCore.strings.HATCH_SETTINGS_MIGRATION_FAILURE)}
-        );
-    }
-
 }])
 
 /*