diff --git a/common/locales/en/tasks.json b/common/locales/en/tasks.json index 650484181f..42c1a82508 100644 --- a/common/locales/en/tasks.json +++ b/common/locales/en/tasks.json @@ -38,6 +38,9 @@ "streakCounter": "Streak Counter", "repeat": "Repeat", "repeatEvery": "Repeat Every", + "repeatHelpTitle": "How often should this task be repeated?", + "dailyRepeatHelpContent": "This task will be due every X days. You can set that value below.", + "weeklyRepeatHelpContent": "This task will be due on the highlighted days below. Click on a day to activate/deactivate it.", "repeatDays": "Every X Days", "repeatWeek": "On Certain Days of the Week", "day": "Day", @@ -51,6 +54,7 @@ "complete": "Done", "dated": "Dated", "due": "Due", + "notDue": "Not Due", "grey": "Grey", "score": "Score", "rewards": "Rewards", diff --git a/website/public/css/global-modules.styl b/website/public/css/global-modules.styl index 9aae889d4c..1c05319fbc 100644 --- a/website/public/css/global-modules.styl +++ b/website/public/css/global-modules.styl @@ -68,6 +68,8 @@ hrpg-button-color-mixin($hrpg-button-color, highlight=false) color: darken($hrpg-button-color, 70%) !important .glyphicon color:darken($hrpg-button-color, 60%) + .tooltip + border:0 &.active a, button background-color: darken($hrpg-button-color, 3.82%) !important diff --git a/website/views/shared/tasks/edit/dailies/repeat_options.jade b/website/views/shared/tasks/edit/dailies/repeat_options.jade index b27755bd03..7f2127af71 100644 --- a/website/views/shared/tasks/edit/dailies/repeat_options.jade +++ b/website/views/shared/tasks/edit/dailies/repeat_options.jade @@ -1,4 +1,6 @@ -legend.option-title=env.t('repeatEvery') +legend.option-title + span.hint(popover-trigger='mouseenter', popover-title=env.t('repeatHelpTitle'), + popover='{{env.t(task.frequency + "RepeatHelpContent")}}')=env.t('repeatEvery') // If frequency is daily ng-form.form-group(name='everyX' ng-if='task.frequency=="daily"') @@ -12,8 +14,9 @@ ng-form.form-group(name='everyX' ng-if='task.frequency=="daily"') // note, does not use data-toggle="buttons-checkbox" - it would interfere with our own click binding mixin dayOfWeek(day, num) li - button(type='button', ng-class='{active: task.repeat.#{day}}', - ng-disabled='task.challenge.id', ng-click='task.repeat.#{day} = !task.repeat.#{day}') + button(type='button', ng-class='{active: task.repeat.#{day}}', + ng-disabled='task.challenge.id', ng-click='task.repeat.#{day} = !task.repeat.#{day}', + tooltip='{{env.t((task.repeat.#{day}) ? "due" : "notDue")}}') | {{::moment.weekdaysMin(#{num})}} +dayOfWeek('su', 0)