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