Added tooltip for when a task is empty

This commit is contained in:
kholliday 2015-03-23 19:36:37 -05:00
parent 160b19eb70
commit 9a157eea8c
2 changed files with 5 additions and 2 deletions

View file

@ -77,5 +77,6 @@
"sureDelete": "Are you sure you want to delete this task?",
"streakCoins": "Streak Bonus!",
"pushTaskToTop": "Push task to top",
"pushTaskToBottom": "Push task to bottom"
"pushTaskToBottom": "Push task to bottom",
"emptyTask": "Please enter a <%= taskType %>."
}

View file

@ -27,7 +27,9 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
textarea(rows='6', task-focus='list.bulk && list.focus', ng-model='list.newTask', placeholder='{{list.placeHolderBulk}}', ng-if='list.bulk', ui-keydown='{"meta-enter ctrl-enter":"addTask(obj[list.type+\'s\'],list)"}', required)
input(type='text', task-focus='!list.bulk && list.focus', ng-model='list.newTask', placeholder='{{list.placeHolder}}', ng-if='!list.bulk', required)
button(type='submit', ng-disabled='new{{list.type}}form.$invalid')
span.glyphicon.glyphicon-plus
div( ng-show='new{{list.type}}form.$invalid', tooltip=env.t("emptyTask", {taskType: "{{list.type}}"}) )
span.glyphicon.glyphicon-plus
span.glyphicon.glyphicon-plus(ng-show='!new{{list.type}}form.$invalid')
small.help-block.btn-link.pull-right(ng-click='toggleBulk(list)')
span(ng-if='!list.bulk')=env.t('addmultiple')
span(ng-if='list.bulk')=env.t('addsingle')