From: Galen Charlton Date: Thu, 22 Feb 2018 20:44:52 +0000 (-0500) Subject: LP#1676608: allow focus-me to accept constant X-Git-Url: https://old-git.evergreen-ils.org/?a=commitdiff_plain;h=c9fb95e59db76815e05ad124a4290439df6f8819;p=evergreen%2Fjoelewis.git LP#1676608: allow focus-me to accept constant A handfull of cases have arisen, including but not limited to the copy alerts feature, where focus-me is set to simply "true" rather than being bound to to a scope variable. This patch formalizes this and gets rid of the following console warning: angular.min.js:119 TypeError: model.assign is not a function at ui.js:23 at angular.min.js:160 at f (angular.min.js:45) at angular.min.js:48 (anonymous) @ angular.min.js:119 Signed-off-by: Galen Charlton Signed-off-by: Mike Rylander --- diff --git a/Open-ILS/web/js/ui/default/staff/services/ui.js b/Open-ILS/web/js/ui/default/staff/services/ui.js index fb48ea0d71..b39c33b163 100644 --- a/Open-ILS/web/js/ui/default/staff/services/ui.js +++ b/Open-ILS/web/js/ui/default/staff/services/ui.js @@ -20,7 +20,8 @@ function($timeout , $parse) { }); element.bind('blur', function() { $timeout(function() { - scope.$apply(model.assign(scope, false)); + if (model.assign && typeof model.assign == 'function') + scope.$apply(model.assign(scope, false)); }); }) }