mirror of
https://github.com/sudoxnym/habitica-self-host.git
synced 2026-04-14 19:47:03 +00:00
rewrite2 fix shop, fix checkboxes, delete tasks
This commit is contained in:
parent
fefca2c372
commit
8c3e50372e
6 changed files with 19 additions and 18 deletions
|
|
@ -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
|
||||
|
|
@ -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)
|
||||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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",
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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')
|
||||
|
|
|
|||
Loading…
Reference in a new issue