From 4fcee66c3b7c34a51f12f2b86f926ec5c6174958 Mon Sep 17 00:00:00 2001 From: Tyler Renelle Date: Mon, 30 Dec 2013 14:40:07 -0700 Subject: [PATCH] checklists: inline by default, add help popover --- src/models/user.js | 2 +- views/options/settings.jade | 2 +- views/shared/tasks/task.jade | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/models/user.js b/src/models/user.js index 7b2d787b8d..8726e31e81 100644 --- a/src/models/user.js +++ b/src/models/user.js @@ -232,7 +232,7 @@ var UserSchema = new Schema({ sleep: {type: Boolean, 'default': false}, stickyHeader: {type: Boolean, 'default': true}, disableClasses: {type: Boolean, 'default': false}, - inlineChecklists: {type: Boolean, 'default': false} + inlineChecklists: {type: Boolean, 'default': true} }, profile: { blurb: String, diff --git a/views/options/settings.jade b/views/options/settings.jade index 313582b6dc..3375bf5445 100644 --- a/views/options/settings.jade +++ b/views/options/settings.jade @@ -39,7 +39,7 @@ script(type='text/ng-template', id='partials/options.settings.settings.html') | Sticky Header i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover='Affix the header to the top of the screen. Unchecked means it scrolls out of view.') label.checkbox - input(type='checkbox', ng-click='set({"preferences.inlineChecklists":user.preferences.inlineChecklists?false:true})', ng-checked='user.preferences.inlineChecklists==true') + input(type='checkbox', ng-click='set({"preferences.inlineChecklists":user.preferences.inlineChecklists?false:true})', ng-checked='user.preferences.inlineChecklists!==false') | Inline Checklists i.icon-question-sign(popover-trigger='mouseenter', popover-placement='right', popover='Show Daily & To-Do Checklists on the task at all times, instead of only when editing.') button.btn(ng-click='showTour()', popover-placement='right', popover-trigger='mouseenter', popover='Restart the introductory tour from when you first joined HabitRPG.') Show Tour diff --git a/views/shared/tasks/task.jade b/views/shared/tasks/task.jade index 52ccbca97d..1a0377a6f2 100644 --- a/views/shared/tasks/task.jade +++ b/views/shared/tasks/task.jade @@ -67,7 +67,7 @@ li(bindonce='list', bo-id='"task-"+task.id', ng-repeat='task in obj[list.type+"s markdown(ng-model='task.text',target='_blank') //-| {{task.text}} - div(ng-if='task.checklist && !$state.includes("options.social.challenges") && user.preferences.inlineChecklists && !task._editing') + div(ng-if='task.checklist && !$state.includes("options.social.challenges") && user.preferences.inlineChecklists!==false && !task._editing') fieldset.option-group label.checkbox(ng-repeat='item in task.checklist') input(type='checkbox',ng-model='item.completed',ng-change='saveTask(task,true)') @@ -111,7 +111,9 @@ li(bindonce='list', bo-id='"task-"+task.id', ng-repeat='task in obj[list.type+"s | Add Checklist form.checklist-form(ng-if='task.checklist') fieldset.option-group.task-checklist(ng-if='!$state.includes("options.social.challenges")') - legend.option-title Checklist + legend.option-title + | Checklist  + i.icon.icon-question-sign(popover='For Dailies, partially-completed Dailies will cut damage (eg, a 4-item checklist with 3 completed, your Daily will hurt you 25% of the damage). For To-Dos, when completed, your points will be multiplied by the number of checklist-items (eg, a 4-item To-Do will be 4x the Exp & GP).',popover-trigger='mouseenter',popover-placement='bottom') ul.unstyled li(ng-repeat='item in task.checklist') a.pull-right.checklist-icons(ng-click='removeChecklistItem(task,$index,true)')