LP#1750894 Undo settings review/migrate UI changes
authorBill Erickson <berickxx@gmail.com>
Thu, 24 May 2018 16:26:41 +0000 (12:26 -0400)
committerBill Erickson <berickxx@gmail.com>
Tue, 29 May 2018 14:13:36 +0000 (10:13 -0400)
No way to know (at present any way) what settings exist on the server
for a given workstation, since some settings are user settings (and not
all user settings are staff workstation settings).

Maybe revisit later.

Signed-off-by: Bill Erickson <berickxx@gmail.com>
Open-ILS/src/templates/staff/admin/workstation/t_splash.tt2
Open-ILS/src/templates/staff/admin/workstation/t_stored_prefs.tt2
Open-ILS/web/js/ui/default/staff/admin/workstation/app.js

index 50a60ef..345f7db 100644 (file)
@@ -82,7 +82,6 @@
         </div>
       </div>
 
-
     </div><!-- left column -->
     <div class="col-md-6"><!-- right column -->
 
         </div>
       </div>
 
-      <div class="row new-entry">
-        <div class="col-md-12">
-          <label>
-            [% l('Experimental: Migrate Workstation Settings to Server') %]
-          </label>
-          <p>[% | l %]Settings may be migrated to the server using the first
-option below as many times as needed for testing and verification.  Once 
-local settings are deleted via the second option, the migration will be 
-marked as complete and no more migration attempts may occur.[% END %]
-          </p>
-          <ol>
-            <li class="pad-vert">
-              <button class="btn btn-default" ng-click="migrateServerSettings()">
-                [% l('Migrate and Keep Local Settings (for testing)') %]
-              </button>
-            </li>
-            <li>
-              <button class="btn btn-warning" 
-                ng-click="migrateServerSettings(true)">
-                [% l('Migrate and Delete Local Settings') %]
-              </button>
-            </li>
-          </ol>
-        </div>
-      </div>
-
-
     </div><!-- col -->
   </div><!-- row -->
 
index 6722748..dc031b4 100644 (file)
 [% |l %]
 Preference values are stored as JSON strings.  
 Click on a preference to view the stored value.
-Click on the delete (X) button to remove a preference value.
+Click on the delete (X) button to remove a preference's value.
 [% END %]
       </div>
     </div>
   </div>
+
   <div class="row">
     <div class="col-md-4">
 
@@ -28,10 +29,7 @@ Click on the delete (X) button to remove a preference value.
           <a href='' ng-click="setContext('local')">[% l('Local Prefs') %]</a>
         </li>
         <li ng-class="{active : context == 'remote'}">
-          <a href='' ng-click="setContext('remote')">[% l('Hatch Prefs') %]</a>
-        </li>
-        <li ng-class="{active : context == 'server'}">
-          <a href='' ng-click="setContext('server')">[% l('Server Prefs') %]</a>
+          <a href='' ng-click="setContext('remote')">[% l('Remote Prefs') %]</a>
         </li>
       </ul>
       <div class="tab-content">
index 893a2dc..f599bc0 100644 (file)
@@ -728,8 +728,8 @@ function($scope , $q , egCore , ngToast) {
 }])
 
 .controller('StoredPrefsCtrl',
-       ['$scope','$q','egCore','egConfirmDialog','egProgressDialog','$timeout',
-function($scope , $q , egCore , egConfirmDialog , egProgressDialog , $timeout) {
+       ['$scope','$q','egCore','egConfirmDialog',
+function($scope , $q , egCore , egConfirmDialog) {
     console.log('StoredPrefsCtrl');
 
     $scope.setContext = function(ctx) {
@@ -745,7 +745,7 @@ function($scope , $q , egCore , egConfirmDialog , egProgressDialog , $timeout) {
     // fetch the keys
 
     function refreshKeys() {
-        $scope.keys = {local : [], remote : [], server: []};
+        $scope.keys = {local : [], remote : []};
 
         if (egCore.hatch.hatchAvailable) {
             egCore.hatch.getRemoteKeys().then(
@@ -754,10 +754,6 @@ function($scope , $q , egCore , egConfirmDialog , egProgressDialog , $timeout) {
     
         // local calls are non-async
         $scope.keys.local = egCore.hatch.getLocalKeys();
-
-        egCore.hatch.getServerKeys().then(function(keys) {
-            $scope.keys.server = keys;
-        });
     }
     refreshKeys();
 
@@ -767,11 +763,6 @@ function($scope , $q , egCore , egConfirmDialog , egProgressDialog , $timeout) {
 
         if ($scope.context == 'local') {
             $scope.currentKeyContent = egCore.hatch.getLocalItem(key);
-        } else if ($scope.context === 'server') {
-            egCore.hatch.getServerItem(key)
-            .then(function(content) {
-                $scope.currentKeyContent = content
-            });
         } else {
             egCore.hatch.getRemoteItem(key)
             .then(function(content) {
@@ -792,9 +783,6 @@ function($scope , $q , egCore , egConfirmDialog , egProgressDialog , $timeout) {
                     if ($scope.context == 'local') {
                         egCore.hatch.removeLocalItem(key);
                         refreshKeys();
-                    } else if ($scope.context == 'server') {
-                        egCore.hatch.removeServerItem(key)
-                        .then(function() { refreshKeys() });
                     } else {
                         egCore.hatch.removeItem(key)
                         .then(function() { refreshKeys() });