From 1a6b23d49f1758599a2f9904882cca61def13c20 Mon Sep 17 00:00:00 2001 From: Galen Charlton Date: Tue, 16 May 2017 15:42:02 -0400 Subject: [PATCH] webstaff: improvements to creating prediction from pattern template Signed-off-by: Galen Charlton --- Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 | 2 +- .../js/ui/default/staff/serials/directives/prediction_manager.js | 9 +++++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 b/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 index 68e47d9981..e2e403a784 100644 --- a/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 +++ b/Open-ILS/src/templates/staff/serials/t_prediction_manager.tt2 @@ -7,7 +7,7 @@ -
diff --git a/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js b/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js index d0ed636652..1a0b4611d4 100644 --- a/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js +++ b/Open-ILS/web/js/ui/default/staff/serials/directives/prediction_manager.js @@ -11,9 +11,9 @@ angular.module('egSerialsAppDep') templateUrl: './serials/t_prediction_manager', controller: ['$scope','$q','egSerialsCoreSvc','egCore','egGridDataProvider', - '$uibModal', + '$uibModal','$timeout', function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , - $uibModal) { + $uibModal , $timeout) { egSerialsCoreSvc.fetch($scope.bibId).then(function() { reload($scope.ssubId); @@ -99,6 +99,11 @@ function($scope , $q , egSerialsCoreSvc , egCore , egGridDataProvider , break; } } + // Mark form dirty because, when it's created from a template, + // it can be immediately saved if the user so chooses. The + // $timeout() allows this to happen after the form is bound + // is bound to $scope.new_prediction. + $timeout(function() { $scope.new_prediction.predform.$setDirty() }); } $scope.openPatternEditorDialog = function(pred) { -- 2.11.0