Commit 7ec1b9fc by Bence Dányi

firewall_gui: typeahead compatibility fixed

parent a7e4aaef
...@@ -345,8 +345,17 @@ function EntityController(url, init) { ...@@ -345,8 +345,17 @@ function EntityController(url, init) {
var self = this; var self = this;
console.log(this); console.log(this);
$scope.$apply(function() { $scope.$apply(function() {
var model = self.$element[0].getAttribute('ng-model').split('.'); var model = self.$element[0].getAttribute('ng-model').split('.')[1];
$scope.entity[model].name = item; console.log(model);
try {
$scope.entity[model].name = item;
} catch (ex) {
try {
$scope[model] = item;
} catch(ex) {
}
}
}) })
return item; return item;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment