|
|
|
@ -55,8 +55,8 @@ function (_, $, coreModule) { |
|
|
|
}); |
|
|
|
}); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
$scope.switchToLink = function() { |
|
|
|
$scope.switchToLink = function(fromClick) { |
|
|
|
if (linkMode) { return; } |
|
|
|
if (linkMode && !fromClick) { return; } |
|
|
|
|
|
|
|
|
|
|
|
clearTimeout(cancelBlur); |
|
|
|
clearTimeout(cancelBlur); |
|
|
|
cancelBlur = null; |
|
|
|
cancelBlur = null; |
|
|
|
@ -69,7 +69,7 @@ function (_, $, coreModule) { |
|
|
|
$scope.inputBlur = function() { |
|
|
|
$scope.inputBlur = function() { |
|
|
|
// happens long before the click event on the typeahead options
|
|
|
|
// happens long before the click event on the typeahead options
|
|
|
|
// need to have long delay because the blur
|
|
|
|
// need to have long delay because the blur
|
|
|
|
cancelBlur = setTimeout($scope.switchToLink, 100); |
|
|
|
cancelBlur = setTimeout($scope.switchToLink, 200); |
|
|
|
}; |
|
|
|
}; |
|
|
|
|
|
|
|
|
|
|
|
$scope.source = function(query, callback) { |
|
|
|
$scope.source = function(query, callback) { |
|
|
|
@ -100,7 +100,7 @@ function (_, $, coreModule) { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$input.val(value); |
|
|
|
$input.val(value); |
|
|
|
$scope.switchToLink(); |
|
|
|
$scope.switchToLink(true); |
|
|
|
|
|
|
|
|
|
|
|
return value; |
|
|
|
return value; |
|
|
|
}; |
|
|
|
}; |
|
|
|
|