Move links to check all/none on RTL languages
Since we don't usually style HTML classes starting with `js-`, we're renaming it, so it's consistent with the `CheckAllNone` name used in the `check_all_none.js` file.
This commit is contained in:
@@ -27,6 +27,7 @@
|
||||
@import "autocomplete_overrides";
|
||||
@import "avatar";
|
||||
@import "banner";
|
||||
@import "check_all_none";
|
||||
@import "comments_count";
|
||||
@import "datepicker_overrides";
|
||||
@import "layout";
|
||||
|
||||
3
app/assets/stylesheets/check_all_none.scss
Normal file
3
app/assets/stylesheets/check_all_none.scss
Normal file
@@ -0,0 +1,3 @@
|
||||
.check-all-none {
|
||||
float: $global-left;
|
||||
}
|
||||
@@ -9,7 +9,7 @@
|
||||
<% end %>
|
||||
|
||||
<%= form_tag form_path, method: :put do %>
|
||||
<p class="float-left js-check">
|
||||
<p class="check-all-none">
|
||||
<%= t("shared.check") %>:
|
||||
<%= link_to t("shared.check_all"), "#", data: { check_all: field_name } %>
|
||||
|
|
||||
|
||||
@@ -112,11 +112,11 @@ describe "Moderate budget investments" do
|
||||
|
||||
expect(page).to have_field type: :checkbox, count: 3
|
||||
|
||||
within(".js-check") { click_link "All" }
|
||||
within(".check-all-none") { click_link "All" }
|
||||
|
||||
expect(all(:checkbox)).to all(be_checked)
|
||||
|
||||
within(".js-check") { click_link "None" }
|
||||
within(".check-all-none") { click_link "None" }
|
||||
|
||||
all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked }
|
||||
end
|
||||
|
||||
@@ -132,11 +132,11 @@ describe "Moderate comments" do
|
||||
|
||||
expect(page).to have_field type: :checkbox, count: 2
|
||||
|
||||
within(".js-check") { click_link "All" }
|
||||
within(".check-all-none") { click_link "All" }
|
||||
|
||||
expect(all(:checkbox)).to all(be_checked)
|
||||
|
||||
within(".js-check") { click_link "None" }
|
||||
within(".check-all-none") { click_link "None" }
|
||||
|
||||
all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked }
|
||||
end
|
||||
|
||||
@@ -101,11 +101,11 @@ describe "Moderate debates" do
|
||||
|
||||
expect(page).to have_field type: :checkbox, count: 2
|
||||
|
||||
within(".js-check") { click_link "All" }
|
||||
within(".check-all-none") { click_link "All" }
|
||||
|
||||
expect(all(:checkbox)).to all(be_checked)
|
||||
|
||||
within(".js-check") { click_link "None" }
|
||||
within(".check-all-none") { click_link "None" }
|
||||
|
||||
all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked }
|
||||
end
|
||||
|
||||
@@ -112,11 +112,11 @@ describe "Moderate proposal notifications" do
|
||||
|
||||
expect(page).to have_field type: :checkbox, count: 2
|
||||
|
||||
within(".js-check") { click_link "All" }
|
||||
within(".check-all-none") { click_link "All" }
|
||||
|
||||
expect(all(:checkbox)).to all(be_checked)
|
||||
|
||||
within(".js-check") { click_link "None" }
|
||||
within(".check-all-none") { click_link "None" }
|
||||
|
||||
all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked }
|
||||
end
|
||||
|
||||
@@ -100,11 +100,11 @@ describe "Moderate proposals" do
|
||||
|
||||
expect(page).to have_field type: :checkbox, count: 3
|
||||
|
||||
within(".js-check") { click_link "All" }
|
||||
within(".check-all-none") { click_link "All" }
|
||||
|
||||
expect(all(:checkbox)).to all(be_checked)
|
||||
|
||||
within(".js-check") { click_link "None" }
|
||||
within(".check-all-none") { click_link "None" }
|
||||
|
||||
all(:checkbox).each { |checkbox| expect(checkbox).not_to be_checked }
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user