diff --git a/website/public/css/items.styl b/website/public/css/items.styl index 166ab09321..b014ca3c62 100644 --- a/website/public/css/items.styl +++ b/website/public/css/items.styl @@ -22,6 +22,13 @@ background-color: $bad text-decoration: none +//Hide interativity if reward is locked (i.e. is a challenge reward) +.locked-task + .btn-buy + &:hover + background-color: $better + cursor:initial + .rewards margin-bottom: 1.5em padding-bottom: 1.5em @@ -66,4 +73,4 @@ margin-right: 0.5em // border: 1px solid rgba(0,0,0,0.1) border-top: 0 - border-bottom: 0 \ No newline at end of file + border-bottom: 0 diff --git a/website/public/css/tasks.styl b/website/public/css/tasks.styl index 43e848be81..574bc266ce 100644 --- a/website/public/css/tasks.styl +++ b/website/public/css/tasks.styl @@ -631,3 +631,23 @@ form .shop_gold + .reward-cost line-height: 1 top: -0.1em + +// Hide interativity if task is locked (i.e. is a challenge reward) +.locked-task + .action-yesno label:hover:after + height: 10px + width: 10px + margin: 15px auto + border: 1px solid #222 + opacity: 0.2 !important + .action-yesno label:focus, + .action-yesno label:hover + background-color: #ffcf42 !important + .task-actions a, + .task-checker label, + .task-text + cursor: initial + .task-actions a:hover + background-color:inherit !important + .task-checker label:hover:after + content: '' diff --git a/website/views/shared/tasks/lists.jade b/website/views/shared/tasks/lists.jade index 0041d8fba2..b1cf70c740 100644 --- a/website/views/shared/tasks/lists.jade +++ b/website/views/shared/tasks/lists.jade @@ -124,7 +124,10 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template") +specialSpell('petalFreePotion','shinySeed') // Actual List - ul(class='{{list.type}}s main-list', ng-show='obj[list.type + "s"].length > 0', hrpg-sort-tasks) + ul(class='{{list.type}}s main-list', ng-show='obj[list.type + "s"].length > 0', hrpg-sort-tasks, ng-if='!$state.includes("options.social.challenges")') + include ./task + //Loads the non-sortable lists for challenges + ul(class='{{list.type}}s main-list', ng-show='obj[list.type + "s"].length > 0', ng-if='$state.includes("options.social.challenges")') include ./task // Spells diff --git a/website/views/shared/tasks/task.jade b/website/views/shared/tasks/task.jade index 8ec41b65f0..13e810e092 100644 --- a/website/views/shared/tasks/task.jade +++ b/website/views/shared/tasks/task.jade @@ -1,11 +1,11 @@ -li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s"]', class='task {{Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', ng-click='spell && (list.type != "reward") && castEnd(task, "task", $event)', ng-class='{"cast-target":spell && (list.type != "reward")}', popover-trigger='mouseenter', data-popover-html="{{task.notes | markdown}}", popover-placement="top", popover-append-to-body='{{::modal ? "false":"true"}}', ng-show='shouldShow(task, list, user.preferences)') +li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s"]', class='task {{Shared.taskClasses(task, user.filters, user.preferences.dayStart, user.lastCron, list.showCompleted, main)}}', ng-click='spell && (list.type != "reward") && castEnd(task, "task", $event)', ng-class='{"cast-target":spell && (list.type != "reward"), "locked-task":obj._locked === true}', popover-trigger='mouseenter', data-popover-html="{{task.notes | markdown}}", popover-placement="top", popover-append-to-body='{{::modal ? "false":"true"}}', ng-show='shouldShow(task, list, user.preferences)') // right-hand side control buttons .task-meta-controls // Due Date span(ng-if='task.type=="todo" && task.date') span(ng-class='{"label label-danger":(moment(task.date).isBefore(_today, "days") && !task.completed)}') {{task.date | date:(user.preferences.dateFormat.indexOf('yyyy') == 0 ? user.preferences.dateFormat.substr(5) : user.preferences.dateFormat.substr(0,5))}} - + // Streak |   span(ng-show='task.streak') {{task.streak}}  @@ -48,14 +48,14 @@ li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s span.glyphicon.glyphicon-trash |   - // chart - a(ng-show='task.history', ng-click='toggleChart(obj._id+task.id, task)', tooltip=env.t('progress')) - span.glyphicon.glyphicon-signal - |   - // notes - span.task-notes(ng-show='task.notes && !task._editing') - span.glyphicon.glyphicon-comment - |   + // chart + a(ng-show='task.history', ng-click='toggleChart(obj._id+task.id, task)', tooltip=env.t('progress')) + span.glyphicon.glyphicon-signal + |   + // notes + span.task-notes(ng-show='task.notes && !task._editing') + span.glyphicon.glyphicon-comment + |   // left-hand side checkbox .task-controls.task-primary(ng-if='!task._editing') @@ -136,7 +136,7 @@ li(bindonce='list', id='task-{{::task.id}}', ng-repeat='task in obj[list.type+"s legend.option-title span.hint(popover=env.t('checklistText'),popover-trigger='mouseenter',popover-placement='bottom')=env.t('checklist') ul(hrpg-sort-checklist) - li(ng-repeat='item in task.checklist') + li(ng-repeat='item in task.checklist') //input(type='checkbox',ng-model='item.completed',ng-change='saveTask(task,true)') //-,ng-blur='saveTask(task,true)') span.checklist-icon.glyphicon.glyphicon-resize-vertical()