diff --git a/assets/css/app/index.styl b/assets/css/app/index.styl index 29555d176c..e944799f27 100644 --- a/assets/css/app/index.styl +++ b/assets/css/app/index.styl @@ -1,4 +1,4 @@ -//@import "nib/vendor"; +@import "nib/vendor" // Vendor Includes - include first so we can override @import "../../../public/vendor/datepicker/css/datepicker.css" @@ -164,5 +164,5 @@ hr background-color #dfe9ea padding 1px 3px 1px 3px -.nav li > a - cursor: pointer +a + cursor: pointer \ No newline at end of file diff --git a/assets/js/controllers/taskDetailsCtrl.coffee b/assets/js/controllers/taskDetailsCtrl.coffee index 21910bdb25..e4b09ca2f5 100644 --- a/assets/js/controllers/taskDetailsCtrl.coffee +++ b/assets/js/controllers/taskDetailsCtrl.coffee @@ -33,10 +33,3 @@ habitrpg.controller "TaskDetailsCtrl", ($scope, $rootScope, $location, User) -> $scope.originalTask = null $scope.editedTask = null $scope.editing = false - - $scope.remove = (task) -> - confirmed = window.confirm("Delete this task?") - return if confirmed isnt true - tasks = User.user[task.type + "s"] - User.log {op: "delTask", data: task} - delete tasks.splice(tasks.indexOf(task), 1) \ No newline at end of file diff --git a/assets/js/controllers/tasksCtrl.coffee b/assets/js/controllers/tasksCtrl.coffee index dfaf4752c8..8de582a9dc 100644 --- a/assets/js/controllers/tasksCtrl.coffee +++ b/assets/js/controllers/tasksCtrl.coffee @@ -77,6 +77,13 @@ habitrpg.controller "TasksCtrl", ($scope, $rootScope, $location, filterFilter, U counter = 0 + + $scope.remove = (task) -> + if window.confirm("Delete this task?") is true + tasks = User.user[task.type + "s"] + User.log {op: "delTask", data: task} + tasks.splice(tasks.indexOf(task), 1) + ### ------------------------ Items diff --git a/package.json b/package.json index f7bd0ba550..db18e186e4 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,8 @@ "mongoose": "~3.6.18", "stylus": "~0.37.0", "connect-assets": "~2.5.2", - "bower": "~1.2.4" + "bower": "~1.2.4", + "nib": "~1.0.1" }, "private": true, "subdomain": "habitrpg", diff --git a/views/tasks/task-list.jade b/views/tasks/task-list.jade index 7686f2073c..dc647d49f6 100644 --- a/views/tasks/task-list.jade +++ b/views/tasks/task-list.jade @@ -51,7 +51,7 @@ div(ng-controller='TasksCtrl') span.reward-cost {{item.value}} span.shop_gold // main content - span.shop-sprite.item-img(class='shop_{{item.classes}}') + span(ng-class='{"shop_{{item.classes}} shop-sprite item-img": true}') p.task-text {{item.text}} br @@ -78,7 +78,7 @@ div(ng-controller='TasksCtrl') button.task-action-btn.tile.spacious.bright(ng-show='_showCompleted', x-bind='click:clearCompleted') Clear Completed // remaining/completed tabs ul.nav.nav-tabs - li(ng-class='{active: !_showCompleted}') - a(x-bind='click: todosShowRemaining') Remaining - li(ng-class='{active: _showCompleted}') - a(x-bind='click: todosShowCompleted') Complete + li(ng-class='{active: !list.showCompleted}') + a(ng-click='list.showCompleted = false') Remaining + li(ng-class='{active: list.showCompleted}') + a(ng-click='list.showCompleted= true') Complete diff --git a/views/tasks/task.jade b/views/tasks/task.jade index 6879dcd64e..49fbf3814e 100644 --- a/views/tasks/task.jade +++ b/views/tasks/task.jade @@ -1,4 +1,4 @@ -li(ng-repeat='task in user[list.type + "s"]', class='task {{taskClasses(task,user.filters,user.preferences.dayStart,user.lastCron,_showCompleted,list.main)}}', data-id='{{task.id}}') +li(ng-repeat='task in user[list.type + "s"]', class='task {{taskClasses(task,user.filters,user.preferences.dayStart,user.lastCron,list.showCompleted,list.main)}}', data-id='{{task.id}}') // right-hand side control buttons .task-meta-controls // Streak @@ -19,7 +19,7 @@ li(ng-repeat='task in user[list.type + "s"]', class='task {{taskClasses(task,use // {{else}} // delete - a(x-bind='click:del', rel='tooltip', title='Delete') + a(ng-click='remove(task)', rel='tooltip', title='Delete') i.icon-trash // chart a(ng-show='task.history', x-bind='click:toggleChart', data-id='{{task.id}}', rel='tooltip', title='Progress')