Prefix classes used in JavaScript with "js-"
The same way it's done in the rest of the application.
This commit is contained in:
@@ -16,7 +16,7 @@ App.Globalize =
|
||||
else
|
||||
$(this).hide()
|
||||
$('.js-delete-language').hide()
|
||||
$('#delete_' + locale).show()
|
||||
$('#js_delete_' + locale).show()
|
||||
|
||||
highlight_locale: (element) ->
|
||||
$('.js-globalize-locale-link').removeClass('is-active');
|
||||
@@ -72,7 +72,7 @@ App.Globalize =
|
||||
$(this).hide()
|
||||
App.Globalize.remove_language(locale)
|
||||
|
||||
$(".add-fields-container").on "cocoon:after-insert", ->
|
||||
$(".js-add-fields-container").on "cocoon:after-insert", ->
|
||||
$.each(
|
||||
App.Globalize.enabled_locales(),
|
||||
(index, locale) -> App.Globalize.enable_locale(locale)
|
||||
|
||||
@@ -35,7 +35,7 @@
|
||||
<%= render 'question_option_fields', f: ff %>
|
||||
<% end %>
|
||||
|
||||
<div class="add-fields-container">
|
||||
<div class="js-add-fields-container">
|
||||
<div class="small-12 medium-9 column">
|
||||
<%= link_to_add_association t("admin.legislation.questions.form.add_option"),
|
||||
f, :question_options, class: "button hollow" %>
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
<% I18n.available_locales.each do |locale| %>
|
||||
<%= link_to t("admin.translations.remove_language"), "#",
|
||||
id: "delete_#{locale}",
|
||||
id: "js_delete_#{locale}",
|
||||
style: display_translation_style(resource, locale),
|
||||
class: 'float-right delete js-delete-language',
|
||||
data: { locale: locale } %>
|
||||
|
||||
Reference in New Issue
Block a user