Update information texts translatable fields

This part used the code we deleted in order to make it easier to
refactor the rest of the translatable models. Now we add the code back.
This commit is contained in:
Javi Martín
2018-10-11 10:55:23 +02:00
committed by decabeza
parent 1f033383e5
commit 87484015da
7 changed files with 28 additions and 19 deletions

View File

@@ -35,9 +35,11 @@ App.Globalize =
enable_locale: (locale) ->
App.Globalize.destroy_locale_field(locale).val(false)
App.Globalize.site_customization_enable_locale_field(locale).val(1)
disable_locale: (locale) ->
App.Globalize.destroy_locale_field(locale).val(true)
App.Globalize.site_customization_enable_locale_field(locale).val(0)
enabled_locales: ->
$.map(
@@ -48,6 +50,9 @@ App.Globalize =
destroy_locale_field: (locale) ->
$(".destroy_locale[data-locale=" + locale + "]")
site_customization_enable_locale_field: (locale) ->
$("#enabled_translations_" + locale)
refresh_visible_translations: ->
locale = $('.js-globalize-locale-link.is-active').data("locale")
App.Globalize.display_translations(locale)