Fixed pop points in US detail

stable
Xavier Julián 2014-08-05 13:48:31 +02:00
parent 997d803abd
commit 2242e84127
3 changed files with 11 additions and 4 deletions

View File

@ -240,6 +240,7 @@ UsStatusDetailDirective = () ->
""") """)
selectionPointsTemplate = _.template(""" selectionPointsTemplate = _.template("""
<ul class="popover pop-points-open"> <ul class="popover pop-points-open">
<li class="pop-points-selected"></li>
<% _.each(points, function(point) { %> <% _.each(points, function(point) { %>
<li><a href="" class="point" title="<%- point.name %>" <li><a href="" class="point" title="<%- point.name %>"
data-point-id="<%- point.id %>"><%- point.name %></a> data-point-id="<%- point.id %>"><%- point.name %></a>
@ -319,11 +320,13 @@ UsStatusDetailDirective = () ->
event.stopPropagation() event.stopPropagation()
target = angular.element(event.currentTarget) target = angular.element(event.currentTarget)
updatingSelectedRoleId = target.data("role-id") updatingSelectedRoleId = target.data("role-id")
target.siblings().removeClass('active')
target.addClass('active')
showSelectPoints() showSelectPoints()
body = angular.element("body") body = angular.element("body")
body.one "click", (event) -> body.one "click", (event) ->
$el.find(".popover").hide() $el.find(".popover").hide()
target.removeClass('active')
$el.on "click", ".point", (event) -> $el.on "click", ".point", (event) ->
event.preventDefault() event.preventDefault()
event.stopPropagation() event.stopPropagation()

View File

@ -36,7 +36,7 @@ block content
section.us-detail-settings section.us-detail-settings
fieldset fieldset
label.clickable.button.button-green(for="is-iocaine", ng-class="{true:'active', false:''}[task.is_iocaine]") Iocaine label.clickable.button.button-gray(for="is-iocaine", ng-class="{true:'active', false:''}[task.is_iocaine]") Iocaine
input(ng-model="task.is_iocaine", type="checkbox", id="is-iocaine", name="is-iocaine") input(ng-model="task.is_iocaine", type="checkbox", id="is-iocaine", name="is-iocaine")
a.button.button-gray.clickable(ng-show="!task.is_blocked", ng-click="ctrl.block()") Block a.button.button-gray.clickable(ng-show="!task.is_blocked", ng-click="ctrl.block()") Block

View File

@ -199,13 +199,17 @@
.points-per-role { .points-per-role {
position: relative; position: relative;
> li { > li {
border-right: 1px solid $grayer; @include transition(color .3s linear);
border-right: 1px solid rgba($grayer, .3);
color: rgba($grayer, .3);
display: inline-block; display: inline-block;
margin: .5rem .1rem; margin: .5rem .1rem;
opacity: .3;
position: relative; position: relative;
text-align: center; text-align: center;
width: 18%; width: 18%;
&.active {
color: rgba($green-taiga, 1);
}
&:first-child { &:first-child {
opacity: 1; opacity: 1;
} }