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'
|
2013-05-09 17:07:54 +00:00
|
|
|
urlScheme: false
|
|
|
|
|
checkHeader: true
|
2013-03-23 20:03:12 +00:00
|
|
|
|
2012-04-27 02:19:31 +00:00
|
|
|
|
2012-07-28 01:11:53 +00:00
|
|
|
# ========== CONTROLLER FUNCTIONS ==========
|
2012-04-27 02:19:31 +00:00
|
|
|
|
|
|
|
|
ready (model) ->
|
2013-05-30 22:43:39 +00:00
|
|
|
misc.fixCorruptUser(model) # https://github.com/lefnire/habitrpg/issues/634
|
|
|
|
|
|
2013-06-05 15:55:09 +00:00
|
|
|
# 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')
|