Merge pull request #327 from taigaio/remove-duplicated-roles-templates

remove duplicated roles templates
stable
Alejandro 2015-02-10 15:36:22 +01:00
commit 6a5641c06b
6 changed files with 6 additions and 38 deletions

View File

@ -747,8 +747,8 @@ module.directive("tgUsRolePointsSelector", ["$rootScope", "$tgTemplate", UsRoleP
UsPointsDirective = ($repo, $tgTemplate) ->
rolesTemplate = $tgTemplate.get("backlog/us-points-roles-popover.html", true)
pointsTemplate = $tgTemplate.get("backlog/us-points-popover.html", true)
rolesTemplate = $tgTemplate.get("common/estimation/us-points-roles-popover.html", true)
pointsTemplate = $tgTemplate.get("common/estimation/us-estimation-points.html", true)
link = ($scope, $el, $attrs) ->
$ctrl = $el.controller()
@ -787,7 +787,7 @@ UsPointsDirective = ($repo, $tgTemplate) ->
point.selected = if us.points[roleId] == point.id then false else true
return point
html = pointsTemplate({"points": points})
html = pointsTemplate({"points": points, "roleId": roleId})
# Remove any prevous state
$el.find(".popover").popover().close()

View File

@ -37,8 +37,8 @@ LbUsEstimationDirective = ($rootScope, $repo, $confirm, $template) ->
# - Us object (ng-model)
# - scope.project object
mainTemplate = $template.get("common/estimation/lb-us-estimation-points-per-role.html", true)
pointsTemplate = $template.get("common/estimation/lb-us-estimation-points.html", true)
mainTemplate = $template.get("common/estimation/us-estimation-points-per-role.html", true)
pointsTemplate = $template.get("common/estimation/us-estimation-points.html", true)
link = ($scope, $el, $attrs, $model) ->
render = (points) ->
@ -56,6 +56,7 @@ LbUsEstimationDirective = ($rootScope, $repo, $confirm, $template) ->
ctx = {
totalPoints: totalPoints
roles: roles
editable: true
}
html = mainTemplate(ctx)
$el.html(html)

View File

@ -1,11 +0,0 @@
ul.popover.pop-points-open
<% _.each(points, function(point) { %>
li
<% if (point.selected) { %>
a.point(href="", title!="<%- point.name %>", data-point-id!="<%- point.id %>")
| <%- point.name %>
<% } else { %>
a.point.active(href="", title!="<%- point.name %>", data-point-id!="<%- point.id %>")
| <%- point.name %>
<% } %>
<% }); %>

View File

@ -1,9 +0,0 @@
ul.points-per-role
li.total
span.points <%- totalPoints %>
span.role total
<% _.each(roles, function(role) { %>
li.total.clickable(data-role-id!="<%- role.id %>")
span.points <%- role.points %>
span.role <%- role.name %>
<% }); %>

View File

@ -1,13 +0,0 @@
ul.popover.pop-points-open
<% _.each(points, function(point) { %>
li
<% if (point.selected) { %>
a(href="", class="point", title!="<%- point.name %>",
data-point-id!="<%- point.id %>", data-role-id!="<%- roleId %>")
| <%- point.name %>
<% } else { %>
a(href="", class="point active", title!="<%- point.name %>",
data-point-id!="<%- point.id %>" data-role-id!="<%- roleId %>")
| <%- point.name %>
<% } %>
<% }); %>