Files
habitica/archive/derby_controllers/index.coffee
Tyler Renelle 56080db5a1 [#1491] start adding corruption-cleanup migration, including egg cleanup
& granting gems for all broken eggs #1386
2013-09-08 20:23:57 -04:00

21 lines
574 B
CoffeeScript

# Translations
i18n = require './i18n'
i18n.localize app,
availableLocales: ['en', 'he', 'bg', 'nl']
defaultLocale: 'en'
urlScheme: false
checkHeader: true
# ========== CONTROLLER FUNCTIONS ==========
ready (model) ->
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')