mirror of
https://github.com/sudoxnym/habitica.git
synced 2026-08-05 12:02:13 +00:00
reset dom on tags instead of location.reload()
This commit is contained in:
parent
a3003a758d
commit
9740e79d8d
1 changed files with 3 additions and 2 deletions
|
|
@ -1,4 +1,5 @@
|
|||
_ = require 'underscore'
|
||||
browser = require './browser'
|
||||
|
||||
module.exports.app = (appExports, model) ->
|
||||
user = model.at('_user')
|
||||
|
|
@ -12,7 +13,7 @@ module.exports.app = (appExports, model) ->
|
|||
user.push "tags",
|
||||
id: model.id()
|
||||
name: model.get("_newTag")
|
||||
, (-> location.reload())
|
||||
, -> browser.resetDom(model)
|
||||
|
||||
appExports.toggleEditingTags = ->
|
||||
model.set '_editingTags', !model.get('_editingTags')
|
||||
|
|
@ -26,5 +27,5 @@ module.exports.app = (appExports, model) ->
|
|||
if tag.id is tagId
|
||||
tags.splice(i,1)
|
||||
model.del "_user.filters.#{tag.id}"
|
||||
model.set "_user.tags", tags, -> location.reload()
|
||||
model.set "_user.tags", tags , -> browser.resetDom(model)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue