From: Bill Erickson Date: Thu, 24 May 2018 19:14:29 +0000 (-0400) Subject: LP#1750894 Grid workstation settings; fixes X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=1444a9342388f1cea05b57dfec0e604b2addcd93;p=working%2FEvergreen.git LP#1750894 Grid workstation settings; fixes Signed-off-by: Bill Erickson --- diff --git a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.workstation-settings.sql b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.workstation-settings.sql index 3efb30a8b6..d0262d2f6a 100644 --- a/Open-ILS/src/sql/Pg/upgrade/YYYY.data.workstation-settings.sql +++ b/Open-ILS/src/sql/Pg/upgrade/YYYY.data.workstation-settings.sql @@ -5,7 +5,7 @@ INSERT INTO config.workstation_setting_type (name, grp, datatype, label) VALUES ( 'eg.circ.checkin.no_precat_alert', 'circ', 'bool', oils_i18n_gettext( - 'eg.circ.checkin.no_precat_alert', + 'eg.circ.checkin.no_precat_alert', 'Checkin: Ignore Precataloged Items', 'cwst', 'label' ) @@ -13,7 +13,7 @@ VALUES ( 'eg.circ.checkin.noop', 'circ', 'bool', oils_i18n_gettext( 'eg.circ.checkin.noop', - 'Checkin: Suppress Holds and Transits', + 'Checkin: Suppress Holds and Transits', 'cwst', 'label' ) ), ( @@ -54,7 +54,7 @@ VALUES ( ), ( 'eg.circ.checkin.hold_as_transit', 'circ', 'bool', oils_i18n_gettext( - 'eg.circ.checkin.hold_as_transit', + 'eg.circ.checkin.hold_as_transit', 'Checkin: Capture Local Holds as Transits', 'cwst', 'label' ) @@ -114,13 +114,347 @@ VALUES ( 'Holdings View Show Volumes', 'cwst', 'label' ) +), ( + 'eg.circ.patron.search.include_inactive', 'circ', 'bool', + oils_i18n_gettext( + 'eg.circ.patron.search.include_inactive', + 'Patron Search Include Inactive', + 'cwst', 'label' + ) +), ( + 'eg.circ.patron.search.show_extras', 'circ', 'bool', + oils_i18n_gettext( + 'eg.circ.patron.search.show_extras', + 'Patron Search Show Extra Search Options', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.checkin.checkin', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.checkin.checkin', + 'Grid Config: circ.checkin.checkin', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.checkin.capture', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.checkin.capture', + 'Grid Config: circ.checkin.capture', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.server.config.copy_tag_type', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.config.copy_tag_type', + 'Grid Config: admin.server.config.copy_tag_type', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.server.config.metabib_field_virtual_map.grid', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.config.metabib_field_virtual_map.grid', + 'Grid Config: admin.server.config.metabib_field_virtual_map.grid', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.server.config.metabib_field.grid', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.config.metabib_field.grid', + 'Grid Config: admin.server.config.metabib_field.grid', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.server.config.marc_field', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.config.marc_field', + 'Grid Config: admin.server.config.marc_field', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.server.asset.copy_tag', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.server.asset.copy_tag', + 'Grid Config: admin.server.asset.copy_tag', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.local.circ.neg_balance_users', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.local.circ.neg_balance_users', + 'Grid Config: admin.local.circ.neg_balance_users', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.local.rating.badge', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.local.rating.badge', + 'Grid Config: admin.local.rating.badge', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.workstation.work_log', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.workstation.work_log', + 'Grid Config: admin.workstation.work_log', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.workstation.patron_log', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.workstation.patron_log', + 'Grid Config: admin.workstation.patron_log', + 'cwst', 'label' + ) +), ( + 'eg.grid.admin.serials.pattern_template', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.admin.serials.pattern_template', + 'Grid Config: admin.serials.pattern_template', + 'cwst', 'label' + ) +), ( + 'eg.grid.serials.copy_templates', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.serials.copy_templates', + 'Grid Config: serials.copy_templates', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.record_overlay.holdings', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.record_overlay.holdings', + 'Grid Config: cat.record_overlay.holdings', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.bucket.record.search', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.bucket.record.search', + 'Grid Config: cat.bucket.record.search', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.bucket.record.view', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.bucket.record.view', + 'Grid Config: cat.bucket.record.view', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.bucket.record.pending', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.bucket.record.pending', + 'Grid Config: cat.bucket.record.pending', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.bucket.copy.view', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.bucket.copy.view', + 'Grid Config: cat.bucket.copy.view', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.bucket.copy.pending', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.bucket.copy.pending', + 'Grid Config: cat.bucket.copy.pending', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.items', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.items', + 'Grid Config: cat.items', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.volcopy.copies', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.volcopy.copies', + 'Grid Config: cat.volcopy.copies', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.volcopy.copies.complete', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.volcopy.copies.complete', + 'Grid Config: cat.volcopy.copies.complete', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.peer_bibs', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.peer_bibs', + 'Grid Config: cat.peer_bibs', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.catalog.holds', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.catalog.holds', + 'Grid Config: cat.catalog.holds', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.holdings', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.holdings', + 'Grid Config: cat.holdings', + 'cwst', 'label' + ) +), ( + 'eg.grid.cat.z3950_results', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.cat.z3950_results', + 'Grid Config: cat.z3950_results', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.holds.shelf', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.holds.shelf', + 'Grid Config: circ.holds.shelf', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.holds.pull', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.holds.pull', + 'Grid Config: circ.holds.pull', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.in_house_use', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.in_house_use', + 'Grid Config: circ.in_house_use', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.renew', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.renew', + 'Grid Config: circ.renew', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.transits.list', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.transits.list', + 'Grid Config: circ.transits.list', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.holds', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.holds', + 'Grid Config: circ.patron.holds', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.pending_patrons.list', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.pending_patrons.list', + 'Grid Config: circ.pending_patrons.list', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.items_out.noncat', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.items_out.noncat', + 'Grid Config: circ.patron.items_out.noncat', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.items_out', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.items_out', + 'Grid Config: circ.patron.items_out', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.billhistory_payments', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.billhistory_payments', + 'Grid Config: circ.patron.billhistory_payments', + 'cwst', 'label' + ) +), ( + 'eg.grid.user.bucket.view', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.user.bucket.view', + 'Grid Config: user.bucket.view', + 'cwst', 'label' + ) +), ( + 'eg.grid.user.bucket.pending', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.user.bucket.pending', + 'Grid Config: user.bucket.pending', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.staff_messages', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.staff_messages', + 'Grid Config: circ.patron.staff_messages', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.archived_messages', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.archived_messages', + 'Grid Config: circ.patron.archived_messages', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.bills', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.bills', + 'Grid Config: circ.patron.bills', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.checkout', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.checkout', + 'Grid Config: circ.patron.checkout', + 'cwst', 'label' + ) +), ( + 'eg.grid.serials.mfhd_grid', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.serials.mfhd_grid', + 'Grid Config: serials.mfhd_grid', + 'cwst', 'label' + ) +), ( + 'eg.grid.serials.view_item_grid', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.serials.view_item_grid', + 'Grid Config: serials.view_item_grid', + 'cwst', 'label' + ) +), ( + 'eg.grid.serials.dist_stream_grid', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.serials.dist_stream_grid', + 'Grid Config: serials.dist_stream_grid', + 'cwst', 'label' + ) +), ( + 'eg.grid.circ.patron.search', 'gui', 'object', + oils_i18n_gettext( + 'eg.grid.circ.patron.search', + 'Grid Config: circ.patron.search', + 'cwst', 'label' + ) ); - /* - INSERT INTO permission.perm_list (id, code, description) VALUES - (594, 'APPLY_WORKSTATION_SETTING', + (594, 'APPLY_WORKSTATION_SETTING', oils_i18n_gettext(594, 'APPLY_WORKSTATION_SETTING', 'ppl', 'description')); */ @@ -128,3 +462,6 @@ COMMIT; + + + diff --git a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js index f599bc0bbc..80327046c7 100644 --- a/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js +++ b/Open-ILS/web/js/ui/default/staff/admin/workstation/app.js @@ -784,7 +784,9 @@ function($scope , $q , egCore , egConfirmDialog) { egCore.hatch.removeLocalItem(key); refreshKeys(); } else { - egCore.hatch.removeItem(key) + // Honor requests to remove items from Hatch even + // when Hatch is configured for data storage. + egCore.hatch.removeRemoteItem(key) .then(function() { refreshKeys() }); } }, diff --git a/Open-ILS/web/js/ui/default/staff/services/hatch.js b/Open-ILS/web/js/ui/default/staff/services/hatch.js index cd97e3ef1c..bc9be012af 100644 --- a/Open-ILS/web/js/ui/default/staff/services/hatch.js +++ b/Open-ILS/web/js/ui/default/staff/services/hatch.js @@ -371,9 +371,13 @@ angular.module('egCoreMod') summary.has_user_setting() === 'f' && summary.has_workstation_setting() === 'f') { - console.warn('No server setting type exists for ' + key); - service.setLocalItem(key, value); - return $q.when(); + if (value === null) { + // a null value means clear the server setting. + return service.removeBrowserItem(key); + } else { + console.warn('No server setting type exists for ' + key); + return service.setBrowserItem(key, value); + } } var settings = {}; @@ -385,7 +389,7 @@ angular.module('egCoreMod') service.auth.token(), settings ).then(function(appliedCount) { - if (appliedCount === 0) { + if (appliedCount == 0) { console.warn('No server setting type exists for ' + key); // We were unable to store the setting on the server, // presumably becuase no server-side setting type exists. @@ -442,7 +446,7 @@ angular.module('egCoreMod') var deferred = $q.defer(); service.getBrowserItem(key).then(function(browserVal) { - if (browserVal === null && browserVal === undefined) { + if (browserVal === null || browserVal === undefined) { // No local value to migrate. return deferred.resolve(service.keyCache[key] = undefined); } @@ -451,7 +455,7 @@ angular.module('egCoreMod') service.setServerItem(key, browserVal).then( function(appliedCount) { - if (appliedCount === 1) { + if (appliedCount == 1) { console.info('setting ' + key + ' successfully ' + 'migrated to a server setting'); service.removeBrowserItem(key); // fire & forget @@ -459,7 +463,7 @@ angular.module('egCoreMod') console.error('error migrating setting to server,' + ' falling back to local value'); } - deferred.resolve(service.keyCache[key] = undefined); + deferred.resolve(service.keyCache[key] = browserVal); } ); });