Load data from the project object instead from the api
parent
a58d3b7098
commit
a412f5ec7b
|
@ -196,17 +196,16 @@ LbTagLineDirective = ($rs) ->
|
||||||
menu.css("top", position.top)
|
menu.css("top", position.top)
|
||||||
menu.css("left", position.left)
|
menu.css("left", position.left)
|
||||||
|
|
||||||
$rs.projects.tags(project.id).then (data) ->
|
$el.find("input").autocomplete({
|
||||||
$el.find("input").autocomplete({
|
source: _.keys(project.tags_colors)
|
||||||
source: data
|
position: {
|
||||||
position: {
|
my: "left top",
|
||||||
my: "left top",
|
using: positioningFunction
|
||||||
using: positioningFunction
|
}
|
||||||
}
|
select: (event, ui) ->
|
||||||
select: (event, ui) ->
|
addValue(ui.item.value)
|
||||||
addValue(ui.item.value)
|
ui.item.value = ""
|
||||||
ui.item.value = ""
|
})
|
||||||
})
|
|
||||||
|
|
||||||
$scope.$watch $attrs.ngModel, (tags) ->
|
$scope.$watch $attrs.ngModel, (tags) ->
|
||||||
tagsColors = $scope.project?.tags_colors or []
|
tagsColors = $scope.project?.tags_colors or []
|
||||||
|
@ -384,17 +383,16 @@ TagLineDirective = ($rootScope, $repo, $rs, $confirm) ->
|
||||||
menu.css("top", position.top)
|
menu.css("top", position.top)
|
||||||
menu.css("left", position.left)
|
menu.css("left", position.left)
|
||||||
|
|
||||||
$rs.projects.tags(project.id).then (data) ->
|
$el.find("input").autocomplete({
|
||||||
$el.find("input").autocomplete({
|
source: _.keys(project.tags_colors)
|
||||||
source: data
|
position: {
|
||||||
position: {
|
my: "left top",
|
||||||
my: "left top",
|
using: positioningFunction
|
||||||
using: positioningFunction
|
}
|
||||||
}
|
select: (event, ui) ->
|
||||||
select: (event, ui) ->
|
addValue(ui.item.value)
|
||||||
addValue(ui.item.value)
|
ui.item.value = ""
|
||||||
ui.item.value = ""
|
})
|
||||||
})
|
|
||||||
|
|
||||||
$scope.$watch $attrs.ngModel, (model) ->
|
$scope.$watch $attrs.ngModel, (model) ->
|
||||||
return if not model
|
return if not model
|
||||||
|
|
Loading…
Reference in New Issue