mirror of
https://github.com/DeviceFarmer/stf.git
synced 2026-04-19 00:23:25 +02:00
Fix all res/ files with ESLint rules with 0 errors.
This commit is contained in:
@@ -1,18 +1,18 @@
|
||||
module.exports = function blurElementDirective($parse, $timeout) {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attrs) {
|
||||
link: function(scope, element, attrs) {
|
||||
var model = $parse(attrs.blurElement)
|
||||
|
||||
scope.$watch(model, function (value) {
|
||||
scope.$watch(model, function(value) {
|
||||
if (value === true) {
|
||||
$timeout(function () {
|
||||
$timeout(function() {
|
||||
element[0].blur()
|
||||
})
|
||||
}
|
||||
})
|
||||
|
||||
element.bind('blur', function () {
|
||||
element.bind('blur', function() {
|
||||
scope.$apply(model.assign(scope, false))
|
||||
})
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user