mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-03 08:21:07 +00:00
renamed Daily tabs to save space, removed To-Dos from new code because compled/all tabs were blank, decoupled To-Do code from Dailes code to allow future changes (e.g., "Dated" tab for To-Dos)
This commit is contained in:
parent
c4a2e720fd
commit
43d2d1355e
3 changed files with 22 additions and 12 deletions
|
|
@ -193,7 +193,7 @@ habitrpg.controller("TasksCtrl", ['$scope', '$rootScope', '$location', 'User','N
|
|||
*/
|
||||
|
||||
$scope.shouldShow = function(task, list, prefs){
|
||||
if (task.type == 'habit' || task.type == 'reward')
|
||||
if (task.type == 'habit' || task.type == 'todo' || task.type == 'reward')
|
||||
return true;
|
||||
var shouldDo = task.type == 'daily' ? habitrpgShared.shouldDo(new Date, task.repeat, prefs) : true;
|
||||
switch (list.view) {
|
||||
|
|
|
|||
|
|
@ -74,8 +74,8 @@ habitrpg
|
|||
}, {
|
||||
header: window.env.t('todos'),
|
||||
type: 'todo',
|
||||
placeHolder: window.env.t('newTodo'),
|
||||
view: "remaining"
|
||||
placeHolder: window.env.t('newTodo')
|
||||
// view: "remaining"
|
||||
}, {
|
||||
header: window.env.t('rewards'),
|
||||
type: 'reward',
|
||||
|
|
|
|||
|
|
@ -101,17 +101,27 @@ script(id='templates/habitrpg-tasks.html', type="text/ng-template")
|
|||
// Habit3
|
||||
ins.adsbygoogle(ng-init='initAds()', style='display: inline-block; width: 234px; height: 60px;', data-ad-client='ca-pub-3242350243827794', data-ad-slot='9529624576')
|
||||
|
||||
// Todo/Daily Tabs
|
||||
div(bo-if='main && (list.type=="daily" || list.type=="todo")', class='tabbable tabs-below')
|
||||
div(ng-show='(list.view == "complete" || list.view == "all") && list.type == todo')
|
||||
// Daily Tabs
|
||||
div(bo-if='main && list.type=="daily"', class='tabbable tabs-below')
|
||||
// remaining/completed tabs
|
||||
ul.nav.nav-tabs
|
||||
li(ng-class='{active: list.view == "remaining"}')
|
||||
a(ng-click='list.view = "remaining"')=env.t('due')
|
||||
li(ng-class='{active: list.view == "complete"}')
|
||||
a(ng-click='list.view = "complete"')=env.t('grey')
|
||||
li(ng-class='{active: list.view == "all"}')
|
||||
a(ng-click='list.view = "all"')=env.t('all')
|
||||
|
||||
// Todo Tabs
|
||||
div(bo-if='main && list.type=="todo"', bo-class='{"tabbable tabs-below": list.type=="todo"}')
|
||||
// div(ng-show='list.view == "complete" || list.view == "all"')
|
||||
div(ng-show='list.showCompleted')
|
||||
.alert
|
||||
=env.t('lotOfToDos')
|
||||
button.task-action-btn.tile.spacious.bright(ng-click='user.ops.clearCompleted({})',popover=env.t('deleteToDosExplanation'),popover-trigger='mouseenter')=env.t('clearCompleted')
|
||||
// remaining/completed tabs
|
||||
ul.nav.nav-tabs
|
||||
li(ng-class='{active: list.view == "remaining"}')
|
||||
a(ng-click='list.view = "remaining"')=env.t('remaining')
|
||||
li(ng-class='{active: list.view == "complete"}')
|
||||
a(ng-click='list.view = "complete"')=env.t('complete')
|
||||
li(ng-class='{active: list.view == "all"}')
|
||||
a(ng-click='list.view = "all"')=env.t('all')
|
||||
li(ng-class='{active: !list.showCompleted}')
|
||||
a(ng-click='list.showCompleted = false')=env.t('remaining')
|
||||
li(ng-class='{active: list.showCompleted}')
|
||||
a(ng-click='list.showCompleted= true')=env.t('complete')
|
||||
|
|
|
|||
Loading…
Reference in a new issue