reset dom on tags instead of location.reload()
This commit is contained in:
@@ -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)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user