diff --git a/website/public/css/items.styl b/website/public/css/items.styl index b014ca3c62..b5d4b257cd 100644 --- a/website/public/css/items.styl +++ b/website/public/css/items.styl @@ -22,6 +22,13 @@ background-color: $bad text-decoration: none +.btn-buy input:focus + opacity:0 + +input:focus + a.btn-buy + background-color: $bad + text-decoration: none + //Hide interativity if reward is locked (i.e. is a challenge reward) .locked-task .btn-buy diff --git a/website/public/css/tasks.styl b/website/public/css/tasks.styl index 5708aee8de..908c2a310b 100644 --- a/website/public/css/tasks.styl +++ b/website/public/css/tasks.styl @@ -44,7 +44,7 @@ for $stage in $stages background-color: darken($stage[1], 30%) &:hover, &:focus background-color: darken($stage[1], 40%) - input[type=checkbox]:focus + label + input[type=checkbox]:focus + label, input.habit:focus + a background-color: darken($stage[1], 40%) .task-actions a:nth-of-type(2) border-top: 1px solid darken($stage[1],50%) // If there are two habit buttons (+ -), add a border to separate them @@ -281,7 +281,8 @@ for $stage in $stages text-decoration: none // checkbox -.task-checker input[type=checkbox], .task-checker input[type=checkbox]:focus +.task-checker input[type=checkbox], .task-checker input[type=checkbox]:focus, +input.habit, input.habit:focus, input.reward, input.reward:focus margin: 0 padding: 0 height: 0px diff --git a/website/views/shared/tasks/task_view/index.jade b/website/views/shared/tasks/task_view/index.jade index 0808903b96..3b1c165147 100644 --- a/website/views/shared/tasks/task_view/index.jade +++ b/website/views/shared/tasks/task_view/index.jade @@ -4,13 +4,28 @@ // Habits .task-actions(ng-if='::task.type=="habit"') // score() is overridden in challengesCtrl to do nothing + input.visuallyhidden( + class="habit", + ng-if='task.up', + type='checkbox', + ui-keypress='{13:"score(task, up)"}') a(ng-if='task.up', ng-click='applyingAction || score(task,"up")') span.glyphicon.glyphicon-plus + input.visuallyhidden( + class="habit", + ng-if='task.down', + type='checkbox', + ng-init='direction = "down"' + ui-keypress='{13:"score(task, direction)"}' ) a(ng-if='task.down', ng-click='applyingAction || score(task,"down")') span.glyphicon.glyphicon-minus // Rewards span(ng-if='::task.type=="reward"') + input.visuallyhidden( + class="reward", + type='checkbox', + ui-keypress='{ 13:"score(task, down)" }') a.money.btn-buy(ng-class='{highValue: task.value >= 1000}', ng-click='score(task, "down")') span.shop_gold span.reward-cost {{task.value}} diff --git a/website/views/shared/tasks/task_view/static_rewards.jade b/website/views/shared/tasks/task_view/static_rewards.jade index 7a19f66db3..eb737be5dd 100644 --- a/website/views/shared/tasks/task_view/static_rewards.jade +++ b/website/views/shared/tasks/task_view/static_rewards.jade @@ -6,6 +6,10 @@ ul.items.rewards(ng-if='main && list.type=="reward"') span.glyphicon.glyphicon-comment //left-hand size commands .task-controls.task-primary + input.visuallyhidden( + class="reward", + type='checkbox', + ui-keypress='{13:"buy(item)"}') a.money.btn-buy.item-btn(ng-class='{highValue: item.value >= 1000}', ng-click='buy(item)') span.shop_gold span.reward-cost {{item.value}}