Merge pull request #354 from taigaio/issue/2172/long-point-names

fix #2172 - horizontal popover with long point names
stable
Xaviju 2015-03-02 14:29:48 +01:00
commit 045e6b6e10
6 changed files with 17 additions and 7 deletions

View File

@ -203,7 +203,10 @@ EstimationsService = ($template, $qqueue, $repo, $confirm, $q) ->
point.selected = if @us.points[roleId] == point.id then false else true
return point
html = pointsTemplate({"points": points, roleId: roleId})
maxPointLength = 5
horizontalList = _.some points, (point) => point.name.length > maxPointLength
html = pointsTemplate({"points": points, roleId: roleId, horizontal: horizontalList})
# Remove any previous state
@$el.find(".popover").popover().close()
@$el.find(".pop-points-open").remove()

View File

@ -1,4 +1,4 @@
ul.popover.pop-points-open
ul.popover.pop-points-open(class!="<% if (horizontal) { %>horizontal<% }; %>")
<% _.each(points, function(point) { %>
li
<% if (point.selected) { %>

View File

@ -0,0 +1,10 @@
// This file should contain in future all the common styles for the points popover
.popover.pop-points-open {
&.horizontal {
li {
white-space: nowrap;
width: 100%;
}
}
}

View File

@ -323,6 +323,7 @@
@include popover(200px, $top: 105%, $left: -160px, $arrow-width: 10px, $arrow-top: -5px, $arrow-left: 90%, $arrow-height: 10px);
}
}
}
.duty-data-container {

View File

@ -95,11 +95,6 @@
display: none;
}
}
.points-per-role {
.popover {
@include popover(200px, $top: 105%, $left: 35%, $arrow-width: 10px, $arrow-top: -5px, $arrow-left: 10px);
}
}
}
.lightbox-generic-bulk {

View File

@ -56,6 +56,7 @@ exports.files = function () {
'components/beta',
'components/markitup',
'components/markdown-help',
'components/popover-points',
//#################################################