habitica/archive/derby_controllers/index.coffee

21 lines
574 B
CoffeeScript
Raw Normal View History

2013-03-23 20:03:12 +00:00
# Translations
i18n = require './i18n'
i18n.localize app,
2013-05-12 17:58:50 +00:00
availableLocales: ['en', 'he', 'bg', 'nl']
2013-03-23 20:03:12 +00:00
defaultLocale: 'en'
urlScheme: false
checkHeader: true
2013-03-23 20:03:12 +00:00
# ========== CONTROLLER FUNCTIONS ==========
ready (model) ->
2013-05-30 22:43:39 +00:00
misc.fixCorruptUser(model) # https://github.com/lefnire/habitrpg/issues/634
# used for things like remove website, chat, etc
exports.removeAt = (e, el) ->
if (confirmMessage = $(el).attr 'data-confirm')?
return unless confirm(confirmMessage) is true
e.at().remove()
browser.resetDom(model) if $(el).attr('data-refresh')