Merge pull request #327 from taigaio/remove-duplicated-roles-templates
remove duplicated roles templatesstable
commit
6a5641c06b
|
@ -747,8 +747,8 @@ module.directive("tgUsRolePointsSelector", ["$rootScope", "$tgTemplate", UsRoleP
|
||||||
|
|
||||||
|
|
||||||
UsPointsDirective = ($repo, $tgTemplate) ->
|
UsPointsDirective = ($repo, $tgTemplate) ->
|
||||||
rolesTemplate = $tgTemplate.get("backlog/us-points-roles-popover.html", true)
|
rolesTemplate = $tgTemplate.get("common/estimation/us-points-roles-popover.html", true)
|
||||||
pointsTemplate = $tgTemplate.get("backlog/us-points-popover.html", true)
|
pointsTemplate = $tgTemplate.get("common/estimation/us-estimation-points.html", true)
|
||||||
|
|
||||||
link = ($scope, $el, $attrs) ->
|
link = ($scope, $el, $attrs) ->
|
||||||
$ctrl = $el.controller()
|
$ctrl = $el.controller()
|
||||||
|
@ -787,7 +787,7 @@ UsPointsDirective = ($repo, $tgTemplate) ->
|
||||||
point.selected = if us.points[roleId] == point.id then false else true
|
point.selected = if us.points[roleId] == point.id then false else true
|
||||||
return point
|
return point
|
||||||
|
|
||||||
html = pointsTemplate({"points": points})
|
html = pointsTemplate({"points": points, "roleId": roleId})
|
||||||
|
|
||||||
# Remove any prevous state
|
# Remove any prevous state
|
||||||
$el.find(".popover").popover().close()
|
$el.find(".popover").popover().close()
|
||||||
|
|
|
@ -37,8 +37,8 @@ LbUsEstimationDirective = ($rootScope, $repo, $confirm, $template) ->
|
||||||
# - Us object (ng-model)
|
# - Us object (ng-model)
|
||||||
# - scope.project object
|
# - scope.project object
|
||||||
|
|
||||||
mainTemplate = $template.get("common/estimation/lb-us-estimation-points-per-role.html", true)
|
mainTemplate = $template.get("common/estimation/us-estimation-points-per-role.html", true)
|
||||||
pointsTemplate = $template.get("common/estimation/lb-us-estimation-points.html", true)
|
pointsTemplate = $template.get("common/estimation/us-estimation-points.html", true)
|
||||||
|
|
||||||
link = ($scope, $el, $attrs, $model) ->
|
link = ($scope, $el, $attrs, $model) ->
|
||||||
render = (points) ->
|
render = (points) ->
|
||||||
|
@ -56,6 +56,7 @@ LbUsEstimationDirective = ($rootScope, $repo, $confirm, $template) ->
|
||||||
ctx = {
|
ctx = {
|
||||||
totalPoints: totalPoints
|
totalPoints: totalPoints
|
||||||
roles: roles
|
roles: roles
|
||||||
|
editable: true
|
||||||
}
|
}
|
||||||
html = mainTemplate(ctx)
|
html = mainTemplate(ctx)
|
||||||
$el.html(html)
|
$el.html(html)
|
||||||
|
|
|
@ -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 %>
|
|
||||||
<% } %>
|
|
||||||
<% }); %>
|
|
|
@ -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 %>
|
|
||||||
<% }); %>
|
|
|
@ -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 %>
|
|
||||||
<% } %>
|
|
||||||
<% }); %>
|
|
Loading…
Reference in New Issue