[open-ils-commits] [GIT] Evergreen ILS branch rel_3_0 updated. 085472193502d22ff4529940bd3bfafb677aab8d
Evergreen Git
git at git.evergreen-ils.org
Mon Oct 16 15:28:07 EDT 2017
This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "Evergreen ILS".
The branch, rel_3_0 has been updated
via 085472193502d22ff4529940bd3bfafb677aab8d (commit)
from bd062fad7ed8495e1a4516c7f1f3b2a090378448 (commit)
Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.
- Log -----------------------------------------------------------------
commit 085472193502d22ff4529940bd3bfafb677aab8d
Author: Cesar Velez <Cesar.Velez at equinoxinitiative.org>
Date: Wed Sep 27 18:16:04 2017 +0100
LP#1716962 - honor In-House Use: num of uses threshold setting
The 'ui.circ.in_house_use.entry_warn' library setting was not being
taken into account nor any confirmation/warning modal being shown.
This fix addresses that by watching the changes and if selected
num_uses value exceeds setting value, displays egConfirm modal.
Signed-off by: Cesar Velez <cesar.velez at equinoxinitiative.org>
Signed-off-by: Mike Rylander <mrylander at gmail.com>
diff --git a/Open-ILS/src/templates/staff/base_js.tt2 b/Open-ILS/src/templates/staff/base_js.tt2
index 5d93fbe..324e452 100644
--- a/Open-ILS/src/templates/staff/base_js.tt2
+++ b/Open-ILS/src/templates/staff/base_js.tt2
@@ -186,6 +186,7 @@ UpUp.start({
s.CONFIRM_CLEAR_PENDING = "[% l('Clear pending transactions') %]";
s.CONFIRM_CLEAR_PENDING_BODY = "[% l('Are you certain you want to clear these pending offline transactions? This action is irreversible. Transactions cannot be recovered after clearing!') %]";
s.LOCATION_NAME_OU_QUALIFIED = "[% l('{{location_name}} ({{owning_lib_shortname}})') %]";
+ s.CONFIRM_IN_HOUSE_NUM_USES_COUNT_TITLE = "[% l('Are you sure you want to record {{num_uses}} uses for this?') %]";
}]);
</script>
diff --git a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2 b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2
index 254d804..0e3ab44 100644
--- a/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2
+++ b/Open-ILS/src/templates/staff/circ/in_house_use/index.tt2
@@ -28,7 +28,7 @@
</label>
<input type="number" min="1" max="{{countMax}}"
class="form-control" focus-me="useFocus"
- id="in-house-num-uses" ng-model="args.num_uses"/>
+ id="in-house-num-uses" ng-model="args.num_uses" ng-change="onNumUsesChanged()" />
</div>
</div>
diff --git a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
index dab5420..69427d1 100644
--- a/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
+++ b/Open-ILS/web/js/ui/default/staff/circ/in_house_use/app.js
@@ -46,7 +46,7 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog)
});
$scope.useFocus = true;
- $scope.args = {noncat_type : 'barcode', num_uses : 1};
+ $scope.args = {noncat_type : 'barcode', num_uses : 1, needsCountWarnModal: false };
var checkouts = [];
var provider = egGridDataProvider.instance({});
@@ -62,7 +62,25 @@ function($scope, egCore, egGridDataProvider , egConfirmDialog, egAlertDialog)
return type ? type.name() : null;
}
- $scope.checkout = function(args) {
+ $scope.onNumUsesChanged = function(){
+ $scope.args.needsCountWarnModal = countWarn < $scope.args.num_uses;
+ }
+
+ $scope.checkout = function(args){
+ if ($scope.args.needsCountWarnModal) {
+ // show modal to allow warning/confirmation
+ egConfirmDialog.open(egCore.strings.CONFIRM_IN_HOUSE_NUM_USES_COUNT_TITLE, '',
+ { num_uses: $scope.args.num_uses }
+ ).result.then(function(){
+ $scope.args.needsCountWarnModal = false
+ $scope.checkoutStart(args)
+ });
+ } else {
+ $scope.checkoutStart(args);
+ }
+ }
+
+ $scope.checkoutStart = function(args) {
$scope.copyNotFound = false;
var coArgs = {
-----------------------------------------------------------------------
Summary of changes:
Open-ILS/src/templates/staff/base_js.tt2 | 1 +
.../templates/staff/circ/in_house_use/index.tt2 | 2 +-
.../js/ui/default/staff/circ/in_house_use/app.js | 22 ++++++++++++++++++-
3 files changed, 22 insertions(+), 3 deletions(-)
hooks/post-receive
--
Evergreen ILS
More information about the open-ils-commits
mailing list