Add fixme lines to taskboard lightboxes.
parent
4be9f27400
commit
9cb214e519
|
@ -36,6 +36,7 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
assigned_to: null
|
assigned_to: null
|
||||||
}
|
}
|
||||||
isNew = true
|
isNew = true
|
||||||
|
|
||||||
# Update texts for creation
|
# Update texts for creation
|
||||||
$el.find(".button-green span").html("Create") #TODO: i18n
|
$el.find(".button-green span").html("Create") #TODO: i18n
|
||||||
$el.find(".title").html("New task ") #TODO: i18n
|
$el.find(".title").html("New task ") #TODO: i18n
|
||||||
|
@ -44,6 +45,7 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
$scope.$on "taskform:edit", (ctx, task) ->
|
$scope.$on "taskform:edit", (ctx, task) ->
|
||||||
$scope.task = task
|
$scope.task = task
|
||||||
isNew = false
|
isNew = false
|
||||||
|
|
||||||
# Update texts for edition
|
# Update texts for edition
|
||||||
$el.find(".button-green span").html("Save") #TODO: i18n
|
$el.find(".button-green span").html("Save") #TODO: i18n
|
||||||
$el.find(".title").html("Edit task ") #TODO: i18n
|
$el.find(".title").html("Edit task ") #TODO: i18n
|
||||||
|
@ -53,12 +55,10 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
if task.is_blocked
|
if task.is_blocked
|
||||||
$el.find(".blocked-note").show()
|
$el.find(".blocked-note").show()
|
||||||
$el.find("label.blocked").addClass("selected")
|
$el.find("label.blocked").addClass("selected")
|
||||||
|
|
||||||
if task.is_iocaine
|
if task.is_iocaine
|
||||||
$el.find("label.iocaine").addClass("selected")
|
$el.find("label.iocaine").addClass("selected")
|
||||||
|
|
||||||
$scope.$on "$destroy", ->
|
|
||||||
$el.off()
|
|
||||||
|
|
||||||
# Dom Event Handlers
|
# Dom Event Handlers
|
||||||
|
|
||||||
$el.on "click", ".close", (event) ->
|
$el.on "click", ".close", (event) ->
|
||||||
|
@ -79,6 +79,7 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
promise = $repo.save($scope.task)
|
promise = $repo.save($scope.task)
|
||||||
broadcastEvent = "taskform:edit:success"
|
broadcastEvent = "taskform:edit:success"
|
||||||
|
|
||||||
|
# FIXME: error handling?
|
||||||
promise.then (data) ->
|
promise.then (data) ->
|
||||||
$el.addClass("hidden")
|
$el.addClass("hidden")
|
||||||
$rootScope.$broadcast(broadcastEvent, data)
|
$rootScope.$broadcast(broadcastEvent, data)
|
||||||
|
@ -100,6 +101,7 @@ CreateEditTaskDirective = ($repo, $model, $rs, $rootScope) ->
|
||||||
|
|
||||||
return {link: link}
|
return {link: link}
|
||||||
|
|
||||||
|
|
||||||
CreateBulkTasksDirective = ($repo, $rs, $rootscope) ->
|
CreateBulkTasksDirective = ($repo, $rs, $rootscope) ->
|
||||||
link = ($scope, $el, attrs) ->
|
link = ($scope, $el, attrs) ->
|
||||||
$scope.form = {data: "", usId: null}
|
$scope.form = {data: "", usId: null}
|
||||||
|
@ -123,6 +125,7 @@ CreateBulkTasksDirective = ($repo, $rs, $rootscope) ->
|
||||||
projectId = $scope.projectId
|
projectId = $scope.projectId
|
||||||
usId = $scope.form.usId
|
usId = $scope.form.usId
|
||||||
|
|
||||||
|
# FIXME: error handling?
|
||||||
$rs.tasks.bulkCreate(projectId, usId, data).then (result) ->
|
$rs.tasks.bulkCreate(projectId, usId, data).then (result) ->
|
||||||
$rootscope.$broadcast("taskform:bulk:success", result)
|
$rootscope.$broadcast("taskform:bulk:success", result)
|
||||||
$el.addClass("hidden")
|
$el.addClass("hidden")
|
||||||
|
@ -134,7 +137,18 @@ CreateBulkTasksDirective = ($repo, $rs, $rootscope) ->
|
||||||
|
|
||||||
|
|
||||||
module = angular.module("taigaTaskboard")
|
module = angular.module("taigaTaskboard")
|
||||||
module.directive("tgLbCreateEditTask", ["$tgRepo", "$tgModel", "$tgResources", "$rootScope",
|
|
||||||
CreateEditTaskDirective])
|
module.directive("tgLbCreateEditTask", [
|
||||||
module.directive("tgLbCreateBulkTasks", ["$tgRepo", "$tgResources", "$rootScope",
|
"$tgRepo",
|
||||||
CreateBulkTasksDirective])
|
"$tgModel",
|
||||||
|
"$tgResources",
|
||||||
|
"$rootScope",
|
||||||
|
CreateEditTaskDirective
|
||||||
|
])
|
||||||
|
|
||||||
|
module.directive("tgLbCreateBulkTasks", [
|
||||||
|
"$tgRepo",
|
||||||
|
"$tgResources",
|
||||||
|
"$rootScope",
|
||||||
|
CreateBulkTasksDirective
|
||||||
|
])
|
||||||
|
|
Loading…
Reference in New Issue