Follow naming conventions for HTML classes and IDs

We use underscores for IDs and hyphens for classes.
This commit is contained in:
Javi Martín
2018-10-15 17:49:41 +02:00
parent 08c043425a
commit dbea577062
8 changed files with 17 additions and 17 deletions

View File

@@ -16,7 +16,7 @@ App.Globalize =
else
$(this).hide()
$('.js-delete-language').hide()
$('#delete-' + locale).show()
$('#delete_' + locale).show()
highlight_locale: (element) ->
$('.js-globalize-locale-link').removeClass('is-active');
@@ -48,7 +48,7 @@ App.Globalize =
)
destroy_locale_field: (locale) ->
$(".destroy_locale[data-locale=" + locale + "]")
$(".destroy-locale[data-locale=" + locale + "]")
site_customization_enable_locale_field: (locale) ->
$("#enabled_translations_" + locale)
@@ -72,7 +72,7 @@ App.Globalize =
$(this).hide()
App.Globalize.remove_language(locale)
$(".add_fields_container").on "cocoon:after-insert", ->
$(".add-fields-container").on "cocoon:after-insert", ->
$.each(
App.Globalize.enabled_locales(),
(index, locale) -> App.Globalize.enable_locale(locale)

View File

@@ -12,5 +12,5 @@ App.LegislationAdmin =
else
$(this).val("")
$("#nested-question-options").on "cocoon:after-insert", ->
$("#nested_question_options").on "cocoon:after-insert", ->
App.Globalize.refresh_visible_translations()