diff --git a/app/coffee/modules/common/components.coffee b/app/coffee/modules/common/components.coffee index 84d5504f..ef71e14a 100644 --- a/app/coffee/modules/common/components.coffee +++ b/app/coffee/modules/common/components.coffee @@ -114,7 +114,8 @@ CreatedByDisplayDirective = -> # div.us-created-by(tg-created-by-display, ng-model="us") # # Requirements: - # - model object must have the attributes 'created_date' and 'owner' + # - model object must have the attributes 'created_date' and + # 'owner'(ng-model) # - scope.usersById object is required. template = _.template(""" @@ -142,7 +143,11 @@ CreatedByDisplayDirective = -> $scope.$on "$destroy", -> $el.off() - return {link:link, require:"ngModel"} + return { + link: link + restrict: "EA" + require: "ngModel" + } module.directive("tgCreatedByDisplay", CreatedByDisplayDirective) diff --git a/app/coffee/modules/userstories/detail.coffee b/app/coffee/modules/userstories/detail.coffee index 0ee5fb38..ce7e81e8 100644 --- a/app/coffee/modules/userstories/detail.coffee +++ b/app/coffee/modules/userstories/detail.coffee @@ -372,10 +372,10 @@ UsStatusDisplayDirective = -> # Display if a US is open or closed and its kanban status. # # Example: - # h1(tg-us-status-display, ng-model="us") + # tg-us-status-display(ng-model="us") # # Requirements: - # - US object + # - US object (ng-model) # - scope.statusById object template = _.template(""" @@ -405,7 +405,11 @@ UsStatusDisplayDirective = -> $scope.$on "$destroy", -> $el.off() - return {link:link, require:"ngModel"} + return { + link: link + restrict: "EA" + require: "ngModel" + } module.directive("tgUsStatusDisplay", UsStatusDisplayDirective) @@ -418,10 +422,10 @@ UsTasksProgressDisplayDirective = -> # Display a progress bar with the stats of completed tasks. # # Example: - # div.us-detail-progress-bar(tg-us-tasks-progress-display, ng-model="tasks") + # tg-us-tasks-progress-display(ng-model="tasks") # # Requirements: - # - Task object list + # - Task object list (ng-model) # - scope.taskStatusById object template = _.template(""" @@ -451,7 +455,11 @@ UsTasksProgressDisplayDirective = -> $scope.$on "$destroy", -> $el.off() - return {link:link, require:"ngModel"} + return { + link: link + restrict: "EA" + require: "ngModel" + } module.directive("tgUsTasksProgressDisplay", UsTasksProgressDisplayDirective) @@ -506,7 +514,6 @@ UsEstimationDirective = ($rootScope, $repo, $confirm) -> saveAfterModify = $attrs.saveAfterModify or false render = (us) -> - console.log us.points totalPoints = us.total_points or 0 computableRoles = _.filter($scope.project.roles, "computable") diff --git a/app/partials/us-detail.jade b/app/partials/us-detail.jade index c8a455cb..d8e51b7a 100644 --- a/app/partials/us-detail.jade +++ b/app/partials/us-detail.jade @@ -53,7 +53,7 @@ block content section.us-status h1(tg-us-status-display, ng-model="us") div.us-detail-progress-bar(tg-us-tasks-progress-display, ng-model="tasks") - div.us-created-by(tg-created-by-display, ng-model="us") + tg-created-by-display.us-created-by(ng-model="us") tg-us-estimation(ng-model="us", save-after-modify="true") tg-us-status-button.issue-data(ng-model="us")