decidim-decidim_awesome 0.10.3 → 0.11.1
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of decidim-decidim_awesome might be problematic. Click here for more details.
- checksums.yaml +4 -4
- data/CHANGELOG.md +14 -5
- data/README.md +65 -67
- data/app/cells/concerns/decidim/decidim_awesome/global_menu_cell_override.rb +20 -0
- data/app/cells/concerns/decidim/decidim_awesome/proposal_l_cell_override.rb +44 -0
- data/app/cells/decidim/decidim_awesome/content_blocks/map/show.erb +5 -12
- data/app/cells/decidim/decidim_awesome/voting/proposal_metadata_cell.rb +54 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/modal.erb +18 -0
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal/show.erb +37 -32
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_cell.rb +9 -4
- data/app/commands/concerns/decidim/decidim_awesome/admin/needs_constraint_helpers.rb +1 -1
- data/app/commands/concerns/decidim/decidim_awesome/proposals/create_proposal_override.rb +2 -2
- data/app/commands/concerns/decidim/decidim_awesome/proposals/update_proposal_override.rb +2 -2
- data/app/commands/decidim/decidim_awesome/admin/create_constraint.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/destroy_custom_redirect.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/destroy_menu_hack.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/rename_scope_label.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/update_constraint.rb +1 -1
- data/app/commands/decidim/decidim_awesome/admin/update_custom_redirect.rb +2 -2
- data/app/commands/decidim/decidim_awesome/command.rb +1 -7
- data/app/controllers/concerns/decidim/decidim_awesome/admin/maintenance_context.rb +1 -1
- data/app/controllers/concerns/decidim/decidim_awesome/admin_accountability/admin/filterable_helper.rb +3 -4
- data/app/controllers/concerns/decidim/decidim_awesome/content_security_policy.rb +34 -0
- data/app/controllers/concerns/decidim/decidim_awesome/not_found_redirect.rb +1 -1
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/orderable_override.rb +22 -9
- data/app/controllers/concerns/decidim/decidim_awesome/proposals/proposal_votes_controller_override.rb +3 -3
- data/app/controllers/decidim/decidim_awesome/admin/admin_accountability_controller.rb +7 -7
- data/app/controllers/decidim/decidim_awesome/admin/checks_controller.rb +7 -7
- data/app/controllers/decidim/decidim_awesome/admin/config_controller.rb +8 -10
- data/app/controllers/decidim/decidim_awesome/admin/constraints_controller.rb +20 -19
- data/app/controllers/decidim/decidim_awesome/admin/custom_redirects_controller.rb +6 -8
- data/app/controllers/decidim/decidim_awesome/admin/maintenance_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/admin/menu_hacks_controller.rb +6 -8
- data/app/controllers/decidim/decidim_awesome/admin/proposal_custom_fields_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/admin/scoped_admins_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/admin/scoped_styles_controller.rb +2 -2
- data/app/controllers/decidim/decidim_awesome/blank_component_controller.rb +8 -3
- data/app/controllers/decidim/decidim_awesome/editor_images_controller.rb +3 -3
- data/app/controllers/decidim/decidim_awesome/iframe_component/iframe_controller.rb +11 -5
- data/app/forms/concerns/decidim/decidim_awesome/proposals/proposal_wizard_create_step_form_override.rb +1 -1
- data/app/forms/decidim/decidim_awesome/admin/config_form.rb +13 -25
- data/app/forms/decidim/decidim_awesome/admin/custom_redirect_form.rb +2 -2
- data/app/forms/decidim/decidim_awesome/admin/intergram_form.rb +4 -0
- data/app/forms/decidim/decidim_awesome/admin/menu_form.rb +4 -4
- data/app/helpers/concerns/decidim/decidim_awesome/amendments_helper_override.rb +8 -1
- data/app/helpers/concerns/decidim/decidim_awesome/breadcrumb_helper_override.rb +23 -0
- data/app/helpers/concerns/decidim/decidim_awesome/proposals/application_helper_override.rb +23 -39
- data/app/helpers/decidim/decidim_awesome/admin/config_constraints_helpers.rb +2 -2
- data/app/helpers/decidim/decidim_awesome/map_helper.rb +8 -27
- data/app/jobs/decidim/decidim_awesome/migrate_legacy_images_job.rb +5 -4
- data/app/middleware/decidim/decidim_awesome/current_config.rb +3 -5
- data/app/models/concerns/decidim/decidim_awesome/has_proposal_extra_fields.rb +1 -1
- data/app/models/decidim/decidim_awesome/awesome_config.rb +1 -1
- data/app/models/decidim/decidim_awesome/paper_trail_version.rb +4 -8
- data/app/models/decidim/decidim_awesome/proposal_extra_field.rb +1 -1
- data/app/models/decidim/decidim_awesome/vote_weight.rb +2 -2
- data/app/overrides/decidim/proposals/proposals/{show → _proposal_aside}/limit_amendments_modal.html.erb.deface +1 -1
- data/app/overrides/decidim/proposals/proposals/_vote_button/replace_vote_button.html.erb.deface +1 -1
- data/app/overrides/layouts/decidim/_decidim_javascript/add_awesome_tags.html.erb.deface +6 -0
- data/app/overrides/layouts/decidim/_head/add_awesome_tags.html.erb.deface +4 -11
- data/app/overrides/layouts/decidim/admin/_header/{replace_scripts.html.erb.deface → add_awesome_tags.html.erb.deface} +4 -4
- data/app/packs/entrypoints/decidim_admin_decidim_awesome.js +1 -2
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.js +4 -0
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_global.scss +1 -0
- data/app/packs/entrypoints/decidim_decidim_awesome.js +2 -2
- data/app/packs/entrypoints/decidim_editor.js +14 -0
- data/app/packs/src/decidim/decidim_awesome/admin/auto_edit.js +95 -70
- data/app/packs/src/decidim/decidim_awesome/admin/check_redirections.js +46 -41
- data/app/packs/src/decidim/decidim_awesome/admin/codemirror.js +3 -3
- data/app/packs/src/decidim/decidim_awesome/admin/constraint_form_events.js +115 -0
- data/app/packs/src/decidim/decidim_awesome/admin/custom_fields_builder.js +4 -1
- data/app/packs/src/decidim/decidim_awesome/admin/form_exit_warn.js +22 -11
- data/app/packs/src/decidim/decidim_awesome/admin/proposal_sortings.js +26 -8
- data/app/packs/src/decidim/decidim_awesome/admin/user_picker.js +34 -21
- data/app/packs/src/decidim/decidim_awesome/amendments/show_modal_on_limits.js +20 -22
- data/app/packs/src/decidim/decidim_awesome/awesome_admin.js +5 -16
- data/app/packs/src/decidim/decidim_awesome/awesome_admin_global.js +1 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_application.js +0 -15
- data/app/packs/src/decidim/decidim_awesome/awesome_map/api/fetcher.js +33 -11
- data/app/packs/src/decidim/decidim_awesome/awesome_map/api/meetings_fetcher.js +9 -12
- data/app/packs/src/decidim/decidim_awesome/awesome_map/api/proposals_fetcher.js +28 -0
- data/app/packs/src/decidim/decidim_awesome/awesome_map/awesome_map.js +3 -4
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/controller.js +12 -12
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/meetings_controller.js +11 -7
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controllers/proposals_controller.js +6 -13
- data/app/packs/src/decidim/decidim_awesome/awesome_map/controls_ui.js +51 -20
- data/app/packs/src/decidim/decidim_awesome/awesome_map/load_map.js +27 -18
- data/app/packs/src/decidim/decidim_awesome/editor/index.js +94 -0
- data/app/packs/src/decidim/decidim_awesome/forms/autosave.js +28 -23
- data/app/packs/src/decidim/decidim_awesome/forms/custom_fields_renderer.js +9 -14
- data/app/packs/src/decidim/decidim_awesome/forms/rich_text_plugin.js +27 -32
- data/app/packs/src/decidim/decidim_awesome/proposals/images.js +16 -10
- data/app/packs/src/decidim/decidim_awesome/voting/voting_cards.js +47 -38
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/auto_edits.scss +11 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/check_redirections.scss +15 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/codemirror.scss +19 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/constraints.scss +8 -32
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_fields.scss +28 -78
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/custom_styles.scss +48 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/intergram_fixes.scss +11 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/admin/user_picker.scss +15 -24
- data/app/packs/stylesheets/decidim/decidim_awesome/amendments/modal.scss +5 -0
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin.scss +9 -47
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_admin_global.scss +3 -12
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_application.scss +3 -19
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_iframe/iframe.scss +1 -1
- data/app/packs/stylesheets/decidim/decidim_awesome/awesome_map/map.scss +27 -21
- data/app/packs/stylesheets/decidim/decidim_awesome/forms/autosave.scss +6 -6
- data/app/packs/stylesheets/decidim/decidim_awesome/forms/custom_fields.scss +32 -101
- data/app/packs/stylesheets/decidim/decidim_awesome/shared/spinner.scss +5 -26
- data/app/packs/stylesheets/decidim/decidim_awesome/voting/voting_cards.scss +34 -52
- data/app/permissions/decidim/decidim_awesome/permissions.rb +3 -4
- data/app/presenters/concerns/decidim/decidim_awesome/breadcrumb_root_menu_item_presenter_override.rb +23 -0
- data/app/presenters/concerns/decidim/decidim_awesome/menu_item_presenter_override.rb +10 -2
- data/app/presenters/concerns/decidim/decidim_awesome/menu_presenter_override.rb +8 -0
- data/app/presenters/decidim/decidim_awesome/participatory_space_role_presenter.rb +1 -1
- data/app/presenters/decidim/decidim_awesome/private_data_presenter.rb +11 -11
- data/app/presenters/decidim/decidim_awesome/user_entity_presenter.rb +1 -1
- data/app/queries/decidim/decidim_awesome/private_data_finder.rb +1 -1
- data/app/serializers/decidim/decidim_awesome/proposals/private_proposal_serializer.rb +0 -8
- data/app/views/decidim/decidim_awesome/admin/admin_accountability/index.html.erb +23 -17
- data/app/views/decidim/decidim_awesome/admin/checks/index.html.erb +1 -3
- data/app/views/decidim/decidim_awesome/admin/config/_autoedit_box_label.html.erb +3 -3
- data/app/views/decidim/decidim_awesome/admin/config/_constraints.html.erb +20 -21
- data/app/views/decidim/decidim_awesome/admin/config/_form_admins.html.erb +6 -5
- data/app/views/decidim/decidim_awesome/admin/config/_form_editors.html.erb +2 -2
- data/app/views/decidim/decidim_awesome/admin/config/_form_livechat.html.erb +39 -23
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposal_custom_fields.html.erb +4 -6
- data/app/views/decidim/decidim_awesome/admin/config/_form_proposals.html.erb +64 -76
- data/app/views/decidim/decidim_awesome/admin/config/_form_styles.html.erb +15 -11
- data/app/views/decidim/decidim_awesome/admin/config/_form_surveys.html.erb +8 -6
- data/app/views/decidim/decidim_awesome/admin/config/show.html.erb +22 -12
- data/app/views/decidim/decidim_awesome/admin/constraints/_form.html.erb +1 -49
- data/app/views/decidim/decidim_awesome/admin/constraints/new.html.erb +14 -9
- data/app/views/decidim/decidim_awesome/admin/constraints/show.html.erb +14 -9
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/_form.html.erb +20 -5
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/edit.html.erb +5 -5
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/index.html.erb +15 -15
- data/app/views/decidim/decidim_awesome/admin/custom_redirects/new.html.erb +5 -5
- data/app/views/decidim/decidim_awesome/admin/maintenance/_private_data.html.erb +4 -4
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/_form.html.erb +6 -6
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/edit.html.erb +21 -12
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/index.html.erb +16 -18
- data/app/views/decidim/decidim_awesome/admin/menu_hacks/new.html.erb +21 -12
- data/app/views/decidim/decidim_awesome/admin/shared/_filters_with_date.html.erb +14 -18
- data/app/views/decidim/decidim_awesome/amendments/_modal.html.erb +18 -11
- data/app/views/decidim/decidim_awesome/custom_fields/_form_render.html.erb +3 -5
- data/app/views/decidim/decidim_awesome/iframe_component/iframe/show.html.erb +7 -12
- data/app/views/decidim/decidim_awesome/map_component/map/_map_template.html.erb +53 -37
- data/app/views/decidim/decidim_awesome/map_component/map/show.html.erb +14 -5
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_show_vote_button.html.erb +0 -3
- data/app/views/layouts/decidim/decidim_awesome/_awesome_config.html.erb +9 -7
- data/app/views/layouts/decidim/decidim_awesome/_intergram_widget.html.erb +9 -6
- data/app/views/layouts/decidim/decidim_awesome/admin/_base.html.erb +3 -12
- data/config/assets.rb +3 -33
- data/config/i18n-tasks.yml +1 -0
- data/config/locales/ca.yml +17 -94
- data/config/locales/cs.yml +15 -93
- data/config/locales/de.yml +15 -91
- data/config/locales/en.yml +24 -28
- data/config/locales/es.yml +18 -96
- data/config/locales/eu.yml +8 -18
- data/config/locales/fr.yml +15 -94
- data/config/locales/hu.yml +4 -18
- data/config/locales/it.yml +9 -26
- data/config/locales/ja.yml +16 -93
- data/config/locales/lt.yml +2 -4
- data/config/locales/nl.yml +8 -18
- data/config/locales/pt-BR.yml +11 -25
- data/config/locales/ro-RO.yml +2 -14
- data/config/locales/sv.yml +10 -21
- data/config/rubocop/disabled.yml +11 -0
- data/config/rubocop/faker.yml +480 -0
- data/config/rubocop/rails.yml +88 -0
- data/config/rubocop/rspec.yml +65 -0
- data/config/rubocop/ruby.yml +1210 -0
- data/db/migrate/20240306175331_rename_editor_images_awesome_config.rb +18 -0
- data/db/migrate/20240729164227_add_decidim_awesome_proposal_private_fields_date.rb +1 -1
- data/db/seeds.rb +3 -3
- data/lib/decidim/decidim_awesome/admin_engine.rb +4 -1
- data/lib/decidim/decidim_awesome/api/types/translated_custom_fields_type.rb +2 -3
- data/lib/decidim/decidim_awesome/awesome.rb +42 -28
- data/lib/decidim/decidim_awesome/awesome_helpers.rb +1 -1
- data/lib/decidim/decidim_awesome/checksums.yml +39 -60
- data/lib/decidim/decidim_awesome/config.rb +1 -1
- data/lib/decidim/decidim_awesome/custom_fields.rb +5 -5
- data/lib/decidim/decidim_awesome/engine.rb +24 -6
- data/lib/decidim/decidim_awesome/iframe_component/component.rb +1 -2
- data/lib/decidim/decidim_awesome/lock.rb +2 -2
- data/lib/decidim/decidim_awesome/map_component/component.rb +1 -1
- data/lib/decidim/decidim_awesome/menu.rb +33 -14
- data/lib/decidim/decidim_awesome/menu_hacker.rb +4 -8
- data/lib/decidim/decidim_awesome/system_checker.rb +2 -4
- data/lib/decidim/decidim_awesome/test/factories.rb +10 -10
- data/lib/decidim/decidim_awesome/test/initializer.rb +3 -11
- data/lib/decidim/decidim_awesome/test/layouts/decidim/_head.html.erb +2 -2
- data/lib/decidim/decidim_awesome/test/layouts/decidim/admin/_header.html.erb +2 -2
- data/lib/decidim/decidim_awesome/test/shared_examples/box_label_editor_examples.rb +18 -18
- data/lib/decidim/decidim_awesome/test/shared_examples/config_examples.rb +3 -3
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_fields_examples.rb +11 -11
- data/lib/decidim/decidim_awesome/test/shared_examples/custom_redirects_contexts.rb +7 -7
- data/lib/decidim/decidim_awesome/test/shared_examples/editor_examples.rb +26 -66
- data/lib/decidim/decidim_awesome/test/shared_examples/menu_hack_contexts.rb +10 -9
- data/lib/decidim/decidim_awesome/test/shared_examples/scoped_admins_examples.rb +30 -20
- data/lib/decidim/decidim_awesome/test/shared_examples/summary_examples.rb +19 -10
- data/lib/decidim/decidim_awesome/version.rb +2 -2
- data/lib/decidim/decidim_awesome/voting_manifest.rb +5 -10
- data/lib/decidim/decidim_awesome.rb +1 -2
- data/lib/tasks/decidim_awesome_active_storage_migrations_tasks.rake +1 -1
- data/lib/tasks/decidim_awesome_upgrade_tasks.rake +4 -0
- data/package.json +19 -28
- metadata +40 -56
- data/app/cells/concerns/decidim/decidim_awesome/proposal_m_cell_override.rb +0 -18
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/show.erb +0 -15
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter/vote_button.erb +0 -15
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_counter_cell.rb +0 -21
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal/show.erb +0 -16
- data/app/cells/decidim/decidim_awesome/voting/voting_cards_proposal_modal_cell.rb +0 -20
- data/app/cells/decidim/proposals/proposal_m/footer.erb +0 -13
- data/app/overrides/layouts/decidim/_head/add_awesome_legacy_scripts.rb +0 -14
- data/app/overrides/layouts/decidim/admin/_header/replace_styles.html.erb.deface +0 -3
- data/app/packs/entrypoints/decidim_admin_decidim_awesome_custom_fields.js +0 -2
- data/app/packs/entrypoints/decidim_decidim_awesome_admin_form_exit_warn.js +0 -1
- data/app/packs/src/decidim/decidim_awesome/admin/constraints.js +0 -55
- data/app/packs/src/decidim/decidim_awesome/editors/editor.js +0 -213
- data/app/packs/stylesheets/decidim/decidim_awesome/editors/markdown_editor.scss +0 -19
- data/app/packs/stylesheets/decidim/decidim_awesome/editors/quill_editor.scss +0 -58
- data/app/packs/stylesheets/vendor/select2-foundation-theme.scss +0 -348
- data/app/serializers/concerns/decidim/decidim_awesome/proposal_serializer_override.rb +0 -65
- data/app/views/decidim/decidim_awesome/admin/config/_modal.html.erb +0 -11
- data/app/views/decidim/decidim_awesome/voting/voting_cards/_proposal_m_cell_footer.erb +0 -15
- /data/app/packs/src/decidim/decidim_awesome/{editors/tabs_focus.js → admin/tabs_change.js} +0 -0
@@ -1,63 +1,72 @@
|
|
1
|
-
|
2
|
-
|
1
|
+
document.addEventListener("DOMContentLoaded", () => {
|
2
|
+
const votingCards = document.querySelector(".voting-voting_cards");
|
3
|
+
const modal = document.getElementById("voting-cards-modal-help");
|
4
|
+
const signOutLink = document.querySelector('[href="/users/sign_out"]');
|
5
|
+
|
6
|
+
if (!votingCards || !modal || !signOutLink) {
|
3
7
|
return;
|
4
8
|
}
|
5
9
|
|
6
|
-
const
|
7
|
-
const
|
8
|
-
const $check = $("#voting_cards-skip_help");
|
10
|
+
const card = modal.querySelector(".current-choice .vote-card");
|
11
|
+
const check = document.getElementById("voting_cards-skip_help");
|
9
12
|
|
10
13
|
const storage = () => {
|
11
|
-
return JSON.parse(localStorage.getItem("
|
14
|
+
return JSON.parse(localStorage.getItem("awesome_voting_cards_hide_modal") || "{}");
|
12
15
|
};
|
13
16
|
|
14
17
|
const isChecked = () => {
|
15
|
-
return storage()[
|
18
|
+
return storage()[check.value];
|
16
19
|
};
|
17
20
|
|
18
21
|
const saveState = (val) => {
|
19
22
|
const show = storage();
|
20
|
-
show[
|
21
|
-
localStorage.setItem("
|
23
|
+
show[check.value] = val;
|
24
|
+
localStorage.setItem("awesome_voting_cards_hide_modal", JSON.stringify(show));
|
22
25
|
};
|
23
26
|
|
24
27
|
const showModal = () => {
|
25
|
-
if (isChecked()) {
|
26
|
-
return false;
|
27
|
-
}
|
28
|
-
if ($modal.is(":visible")) {
|
28
|
+
if (isChecked() || window.Decidim.currentDialogs[modal.id].isOpen) {
|
29
29
|
return false;
|
30
30
|
}
|
31
31
|
return true;
|
32
32
|
};
|
33
33
|
|
34
|
-
|
35
|
-
|
36
|
-
|
34
|
+
const bindVoteActions = () => {
|
35
|
+
document.querySelectorAll(".awesome-voting-card .vote-action").forEach((el) => {
|
36
|
+
el.addEventListener("click", (evt) => {
|
37
|
+
if (showModal()) {
|
38
|
+
evt.stopPropagation();
|
39
|
+
evt.preventDefault();
|
40
|
+
check.checked = isChecked();
|
41
|
+
modal.action = evt.currentTarget;
|
42
|
+
card.classList = evt.currentTarget.classList;
|
43
|
+
if (evt.currentTarget.children.length > 1) {
|
44
|
+
card.innerHTML = `${evt.currentTarget.children[1].outerHTML}<span class="vote-label">${evt.currentTarget.children[1].children[0].textContent}</span>`;
|
45
|
+
} else if (card.classList.contains("button")) {
|
46
|
+
card.classList.remove("button");
|
47
|
+
card.innerHTML = `<span class="vote-label">${evt.currentTarget.title}</span>`;
|
48
|
+
} else {
|
49
|
+
card.innerHTML = `<span class="vote-label">${evt.currentTarget.textContent}</span>`;
|
50
|
+
}
|
51
|
+
window.Decidim.currentDialogs[modal.id].open();
|
52
|
+
} else {
|
53
|
+
evt.currentTarget.closest(".voting-voting_cards").classList.add("loading");
|
54
|
+
}
|
55
|
+
});
|
56
|
+
});
|
57
|
+
};
|
37
58
|
|
38
|
-
|
39
|
-
|
40
|
-
$modal.foundation("close");
|
59
|
+
check.addEventListener("change", () => {
|
60
|
+
saveState(check.checked);
|
41
61
|
});
|
42
62
|
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
evt.preventDefault();
|
47
|
-
$check.prop("checked", isChecked());
|
48
|
-
$modal.data("action", evt.currentTarget);
|
49
|
-
$card[0].classList = evt.currentTarget.classList;
|
50
|
-
if (evt.currentTarget.children.length > 1) {
|
51
|
-
$card.html(`${evt.currentTarget.children[1].outerHTML}<p class="vote-label">${evt.currentTarget.children[1].children[0].textContent}</p>`);
|
52
|
-
} else if ($card[0].classList.contains("button")) {
|
53
|
-
$card[0].classList.remove("button");
|
54
|
-
$card.html(`<p class="vote-label">${evt.currentTarget.title}</p>`);
|
55
|
-
} else {
|
56
|
-
$card.html(`<p class="vote-label">${evt.currentTarget.textContent}</p>`);
|
57
|
-
}
|
58
|
-
$modal.foundation("open");
|
59
|
-
} else {
|
60
|
-
$(evt.currentTarget).closest(".voting-voting_cards").addClass("loading");
|
61
|
-
}
|
63
|
+
modal.querySelector(".vote-action").addEventListener("click", () => {
|
64
|
+
modal.action.click();
|
65
|
+
setTimeout(() => window.Decidim.currentDialogs[modal.id].close());
|
62
66
|
});
|
67
|
+
|
68
|
+
bindVoteActions();
|
69
|
+
|
70
|
+
// re-bind vote actions after AJAX events (due the use of Rails helper remote=treu)
|
71
|
+
document.body.addEventListener("ajax:success", () => bindVoteActions());
|
63
72
|
});
|
@@ -1,16 +1,15 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
1
|
+
a.awesome-auto-edit {
|
2
|
+
@apply inline-block;
|
3
|
+
}
|
4
|
+
|
5
|
+
a.awesome-auto-delete {
|
6
|
+
@apply float-right button button__xs button__text-secondary;
|
7
|
+
}
|
8
|
+
|
9
|
+
.form-defaults input[type="text"].awesome-auto-edit {
|
10
|
+
@apply inline-block m-0 py-[2px] px-[4px] h-auto w-auto leading-none outline-1 text-xs;
|
8
11
|
}
|
9
12
|
|
10
13
|
span.awesome-auto-edit {
|
11
|
-
|
12
|
-
background-color: #f0f0f0;
|
13
|
-
border-radius: 5px;
|
14
|
-
margin: 0;
|
15
|
-
font-weight: 600;
|
14
|
+
@apply bg-background-4 px-2 rounded m-0 font-semibold;
|
16
15
|
}
|
@@ -4,6 +4,21 @@
|
|
4
4
|
text-align: left !important;
|
5
5
|
}
|
6
6
|
|
7
|
+
th a.check-custom-redirections {
|
8
|
+
color: white;
|
9
|
+
}
|
10
|
+
|
11
|
+
th a.check-custom-redirections.disabled,
|
12
|
+
th a.check-custom-redirections.disabled:hover {
|
13
|
+
color: gray;
|
14
|
+
border: 1px solid gray;
|
15
|
+
background-color: #eee;
|
16
|
+
}
|
17
|
+
|
18
|
+
th a.check-custom-redirections:hover {
|
19
|
+
text-decoration: none;
|
20
|
+
}
|
21
|
+
|
7
22
|
td.redirect-status {
|
8
23
|
font-family: monospace;
|
9
24
|
|
@@ -1,10 +1,15 @@
|
|
1
|
-
|
1
|
+
/* Ensure the sticky save button is over codemirror */
|
2
|
+
.item__edit-sticky {
|
3
|
+
z-index: 2;
|
4
|
+
}
|
2
5
|
|
3
6
|
.awesome-edit-config {
|
4
7
|
.scoped_styles_container,
|
5
8
|
.proposal_custom_fields_container {
|
9
|
+
@apply bg-background;
|
10
|
+
|
6
11
|
&.private {
|
7
|
-
outline
|
12
|
+
@apply outline-2 outline-[#fca5a5] outline-dotted;
|
8
13
|
}
|
9
14
|
|
10
15
|
.form-error {
|
@@ -12,21 +17,23 @@
|
|
12
17
|
}
|
13
18
|
|
14
19
|
> .CodeMirror {
|
15
|
-
border-
|
16
|
-
border-
|
17
|
-
border-
|
18
|
-
border
|
19
|
-
border-
|
20
|
-
min-height:
|
21
|
-
height:
|
22
|
-
padding: 0;
|
23
|
-
max-height: 40em;
|
20
|
+
border-radius: 4px;
|
21
|
+
border-bottom-left-radius: 0;
|
22
|
+
border-bottom-right-radius: 0;
|
23
|
+
border: 5px solid #eee;
|
24
|
+
border-left: none;
|
25
|
+
min-height: 4em;
|
26
|
+
height: auto;
|
24
27
|
resize: vertical;
|
25
28
|
overflow: vertical !important;
|
29
|
+
padding: 0;
|
30
|
+
margin: 0;
|
31
|
+
width: 100%;
|
32
|
+
font-size: 0.9rem;
|
26
33
|
|
27
34
|
> .CodeMirror-scroll {
|
28
35
|
> .CodeMirror-gutters {
|
29
|
-
background: #
|
36
|
+
background: #eee;
|
30
37
|
}
|
31
38
|
}
|
32
39
|
}
|
@@ -1,8 +1,5 @@
|
|
1
1
|
.constraints-editor {
|
2
|
-
|
3
|
-
padding: 1rem;
|
4
|
-
margin: 0.5rem 0 2rem;
|
5
|
-
border-radius: 5px;
|
2
|
+
margin-top: 1rem;
|
6
3
|
|
7
4
|
h5 {
|
8
5
|
font-weight: 600;
|
@@ -14,7 +11,7 @@
|
|
14
11
|
.label {
|
15
12
|
font-weight: normal;
|
16
13
|
font-size: 0.8rem;
|
17
|
-
padding:
|
14
|
+
padding: 1px 5px;
|
18
15
|
|
19
16
|
&.participatory_space_manifest {
|
20
17
|
background-color: #f7b230;
|
@@ -46,48 +43,27 @@
|
|
46
43
|
|
47
44
|
.constraints-list {
|
48
45
|
margin: 16px 20px;
|
49
|
-
padding: 0 20px
|
46
|
+
padding: 0 20px 14px 33px;
|
50
47
|
list-style-type: disc;
|
51
48
|
|
49
|
+
.button__xs {
|
50
|
+
padding: 1px 5px;
|
51
|
+
font-size: 0.8rem;
|
52
|
+
}
|
53
|
+
|
52
54
|
li {
|
53
55
|
margin: 0 1em 0 0;
|
54
56
|
padding: 0;
|
55
57
|
}
|
56
58
|
|
57
|
-
button.edit-condition,
|
58
|
-
a.delete-condition {
|
59
|
-
margin-left: 1rem;
|
60
|
-
}
|
61
|
-
|
62
|
-
button.edit-condition {
|
63
|
-
color: $secondary-color;
|
64
|
-
cursor: pointer;
|
65
|
-
|
66
|
-
&:hover {
|
67
|
-
text-decoration: underline;
|
68
|
-
}
|
69
|
-
}
|
70
|
-
|
71
59
|
&.inactive {
|
72
60
|
.label:not(.constraint-none) {
|
73
61
|
filter: saturate(10%);
|
74
62
|
}
|
75
63
|
}
|
76
|
-
|
77
|
-
&.no-items {
|
78
|
-
margin: 0;
|
79
|
-
padding-bottom: 14px;
|
80
|
-
list-style-type: none;
|
81
|
-
}
|
82
64
|
}
|
83
65
|
|
84
66
|
.flash[hidden] {
|
85
67
|
display: none;
|
86
68
|
}
|
87
|
-
|
88
|
-
.add-condition .icon {
|
89
|
-
width: 11px;
|
90
|
-
height: 11px;
|
91
|
-
margin-right: 0.3rem;
|
92
|
-
}
|
93
69
|
}
|
@@ -1,100 +1,50 @@
|
|
1
|
-
|
2
|
-
.color-box {
|
3
|
-
display: inline-block;
|
4
|
-
height: 1em;
|
5
|
-
width: 1em;
|
6
|
-
margin-left: 1em;
|
7
|
-
vertical-align: middle;
|
8
|
-
|
9
|
-
&:first-child {
|
10
|
-
margin-left: 0;
|
11
|
-
}
|
1
|
+
@import "stylesheets/decidim/editor";
|
12
2
|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
"warning": $warning,
|
18
|
-
"alert": $alert,
|
19
|
-
"highlight": $highlight,
|
20
|
-
"highlight_alternative": $highlight_alternative,
|
21
|
-
);
|
22
|
-
|
23
|
-
@each $name, $color in $colors {
|
24
|
-
&.#{$name} {
|
25
|
-
background-color: $color;
|
26
|
-
}
|
3
|
+
// hide custom-fields inside tabs, an extra (unique) container is used instead
|
4
|
+
.tabs-content {
|
5
|
+
.proposal_custom_field {
|
6
|
+
display: none;
|
27
7
|
}
|
28
8
|
}
|
29
9
|
|
30
10
|
.proposal_custom_fields {
|
31
11
|
&_editor {
|
32
|
-
background-color: #e0e0e0;
|
33
|
-
padding: 0.5em 0.5em 1em;
|
34
|
-
border-top-left-radius: 5px;
|
35
|
-
border-top-right-radius: 5px;
|
36
|
-
|
37
12
|
ul.frmb,
|
38
13
|
.form-wrap.form-builder .frmb li.form-field,
|
39
14
|
.form-wrap.form-builder .stage-wrap.empty {
|
40
|
-
background
|
41
|
-
|
15
|
+
@apply bg-background mr-2;
|
16
|
+
}
|
42
17
|
|
43
|
-
|
44
|
-
|
45
|
-
justify-content: space-between;
|
46
|
-
align-items: center;
|
47
|
-
}
|
18
|
+
border-top-left-radius: 5px;
|
19
|
+
border-top-right-radius: 5px;
|
48
20
|
|
49
|
-
|
50
|
-
|
51
|
-
justify-content: center;
|
52
|
-
align-items: center;
|
53
|
-
}
|
21
|
+
svg {
|
22
|
+
@apply fill-black;
|
54
23
|
}
|
55
24
|
|
56
|
-
label {
|
57
|
-
|
58
|
-
|
59
|
-
font-weight: $global-weight-bold !important;
|
25
|
+
li > label {
|
26
|
+
line-height: 27px !important;
|
27
|
+
font-size: 16px !important;
|
60
28
|
}
|
61
29
|
|
62
|
-
|
63
|
-
|
64
|
-
|
65
|
-
|
66
|
-
margin: inherit;
|
67
|
-
border: inherit;
|
68
|
-
box-shadow: inherit;
|
69
|
-
font-size: inherit;
|
70
|
-
font-weight: inherit;
|
71
|
-
line-height: inherit;
|
72
|
-
color: inherit;
|
73
|
-
}
|
30
|
+
input.form-control {
|
31
|
+
background-color: #fff;
|
32
|
+
border: 1px solid #ccc !important;
|
33
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
74
34
|
|
75
|
-
|
76
|
-
|
77
|
-
|
78
|
-
|
35
|
+
&:focus {
|
36
|
+
outline: 0;
|
37
|
+
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075),
|
38
|
+
0 0 8px rgba(102, 175, 233, 0.6) !important;
|
39
|
+
}
|
79
40
|
}
|
80
41
|
|
81
|
-
.
|
82
|
-
|
42
|
+
.frmb-control li {
|
43
|
+
cursor: cell !important;
|
83
44
|
}
|
84
|
-
|
85
|
-
.
|
86
|
-
|
87
|
-
background-color: #fff;
|
88
|
-
border: 1px solid #ccc;
|
89
|
-
box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.075);
|
90
|
-
transition: border-color ease-in-out 0.15s, box-shadow ease-in-out 0.15s;
|
91
|
-
margin: 0;
|
92
|
-
padding: 6px 12px;
|
45
|
+
// drag and drop is disabled, let's not show the move cursor
|
46
|
+
.frmb .prev-holder {
|
47
|
+
cursor: default !important;
|
93
48
|
}
|
94
49
|
}
|
95
50
|
}
|
96
|
-
|
97
|
-
// Custom fields tuning
|
98
|
-
.rendered-form .form-control.ql-container {
|
99
|
-
height: auto !important;
|
100
|
-
}
|
@@ -0,0 +1,48 @@
|
|
1
|
+
.color-box {
|
2
|
+
display: inline-block;
|
3
|
+
height: 1em;
|
4
|
+
width: 1em;
|
5
|
+
margin-left: 1em;
|
6
|
+
vertical-align: middle;
|
7
|
+
|
8
|
+
&:first-child {
|
9
|
+
margin-left: 0;
|
10
|
+
}
|
11
|
+
|
12
|
+
&.primary {
|
13
|
+
background-color: var(--primary);
|
14
|
+
}
|
15
|
+
|
16
|
+
&.secondary {
|
17
|
+
background-color: var(--secondary);
|
18
|
+
}
|
19
|
+
|
20
|
+
&.tertiary {
|
21
|
+
background-color: var(--tertiary);
|
22
|
+
}
|
23
|
+
|
24
|
+
&.alert {
|
25
|
+
background-color: var(--alert);
|
26
|
+
}
|
27
|
+
|
28
|
+
&.warning {
|
29
|
+
background-color: var(--warning);
|
30
|
+
}
|
31
|
+
|
32
|
+
&.success {
|
33
|
+
background-color: var(--success);
|
34
|
+
}
|
35
|
+
}
|
36
|
+
|
37
|
+
.colors-help {
|
38
|
+
p {
|
39
|
+
@apply block text-sm text-gray-2 font-normal prose-a:text-secondary prose-a:underline;
|
40
|
+
|
41
|
+
margin-bottom: 1em;
|
42
|
+
}
|
43
|
+
|
44
|
+
.colors {
|
45
|
+
white-space: unset;
|
46
|
+
font-size: 0.7rem;
|
47
|
+
}
|
48
|
+
}
|
@@ -1,29 +1,20 @@
|
|
1
|
-
@import "
|
2
|
-
@import "stylesheets/vendor/select2-foundation-theme";
|
1
|
+
@import "tom-select/dist/scss/tom-select";
|
3
2
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
3
|
+
/* overwrite tom-select defaults */
|
4
|
+
.ts {
|
5
|
+
&-control {
|
6
|
+
@apply border-gray text-md min-h-[40px];
|
8
7
|
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
margin-right: 1em;
|
13
|
-
}
|
14
|
-
}
|
15
|
-
|
16
|
-
.select2-container--foundation .select2-selection--multiple {
|
17
|
-
.select2-selection__choice {
|
18
|
-
display: inline-block;
|
19
|
-
float: none;
|
20
|
-
font-weight: normal;
|
8
|
+
input {
|
9
|
+
@apply font-normal text-black text-md;
|
10
|
+
}
|
21
11
|
|
22
12
|
.is-admin {
|
23
13
|
&::before {
|
24
14
|
content: "⛔";
|
25
15
|
display: inline-block;
|
26
16
|
margin-right: 0.3em;
|
17
|
+
text-decoration: none;
|
27
18
|
}
|
28
19
|
|
29
20
|
text-decoration: line-through;
|
@@ -31,11 +22,11 @@
|
|
31
22
|
}
|
32
23
|
}
|
33
24
|
|
34
|
-
|
35
|
-
|
36
|
-
}
|
37
|
-
}
|
25
|
+
&-dropdown {
|
26
|
+
@apply text-md text-gray-2 font-normal;
|
38
27
|
|
39
|
-
.
|
40
|
-
|
28
|
+
.active {
|
29
|
+
@apply text-white bg-secondary;
|
30
|
+
}
|
31
|
+
}
|
41
32
|
}
|
@@ -1,38 +1,24 @@
|
|
1
|
-
@import "entrypoints/decidim_admin";
|
2
1
|
@import "stylesheets/decidim/decidim_awesome/admin/constraints";
|
2
|
+
@import "stylesheets/decidim/decidim_awesome/admin/custom_styles";
|
3
3
|
@import "stylesheets/decidim/decidim_awesome/admin/custom_fields";
|
4
4
|
@import "stylesheets/decidim/decidim_awesome/admin/auto_edits";
|
5
5
|
@import "stylesheets/decidim/decidim_awesome/admin/check_redirections";
|
6
|
-
@import "stylesheets/decidim/decidim_awesome/
|
7
|
-
@import "stylesheets/decidim/decidim_awesome/
|
6
|
+
@import "stylesheets/decidim/decidim_awesome/admin/user_picker";
|
7
|
+
@import "stylesheets/decidim/decidim_awesome/admin/codemirror";
|
8
|
+
@import "stylesheets/decidim/decidim_awesome/shared/spinner";
|
9
|
+
|
10
|
+
// Remove the 20% right column from the item__edit class
|
11
|
+
// .item__edit {
|
12
|
+
// @apply grid grid-cols-1 md:grid-cols-[100%_0%] mb-8;
|
13
|
+
// }
|
8
14
|
|
9
15
|
.pokecode-credits {
|
10
16
|
float: right;
|
11
17
|
margin: 0 1em 0.5em 0;
|
12
|
-
|
13
|
-
// position: absolute;
|
14
|
-
// bottom: 0;
|
15
|
-
// right: 0;
|
16
|
-
// margin: 1em;
|
17
18
|
font-size: 0.8em;
|
18
19
|
}
|
19
20
|
|
20
21
|
.decidim_awesome {
|
21
|
-
&.modal {
|
22
|
-
.spinner {
|
23
|
-
@include spinner(25px, #aaa, var(--secondary), 800ms);
|
24
|
-
|
25
|
-
vertical-align: middle;
|
26
|
-
display: none;
|
27
|
-
}
|
28
|
-
|
29
|
-
&.loading {
|
30
|
-
.spinner {
|
31
|
-
display: inline-block;
|
32
|
-
}
|
33
|
-
}
|
34
|
-
}
|
35
|
-
|
36
22
|
&-form {
|
37
23
|
margin-bottom: 2em;
|
38
24
|
border-bottom: 1px solid #999;
|
@@ -48,27 +34,3 @@
|
|
48
34
|
padding-bottom: 0;
|
49
35
|
}
|
50
36
|
}
|
51
|
-
|
52
|
-
// Some global fixes
|
53
|
-
.form label {
|
54
|
-
.help-text {
|
55
|
-
display: block;
|
56
|
-
margin-top: -1.5em;
|
57
|
-
font-weight: normal;
|
58
|
-
margin-bottom: 1.5em;
|
59
|
-
}
|
60
|
-
}
|
61
|
-
|
62
|
-
.form-input-extra-before ~ .form-error {
|
63
|
-
margin-top: -2.5rem;
|
64
|
-
}
|
65
|
-
|
66
|
-
tbody tr.menu_hack-addition {
|
67
|
-
background: rgb(255, 248, 222);
|
68
|
-
}
|
69
|
-
|
70
|
-
.secondary-nav {
|
71
|
-
li .icon {
|
72
|
-
margin-right: 0.5rem;
|
73
|
-
}
|
74
|
-
}
|
@@ -5,22 +5,13 @@
|
|
5
5
|
.component__show {
|
6
6
|
&_private_data {
|
7
7
|
&-grid {
|
8
|
-
background-
|
9
|
-
display: grid;
|
10
|
-
grid-template-columns: repeat(2, 1fr);
|
11
|
-
gap: 1rem;
|
12
|
-
margin: 1rem 0;
|
13
|
-
padding: 0.5rem;
|
8
|
+
@apply bg-background grid-cols-2 gap-4 my-4 p-2;
|
14
9
|
|
15
10
|
.date_info {
|
16
|
-
|
17
|
-
color: $medium-gray;
|
18
|
-
font-size: 0.875rem;
|
19
|
-
margin-top: 1rem;
|
11
|
+
@apply italic text-gray text-sm mt-4;
|
20
12
|
|
21
13
|
a {
|
22
|
-
|
23
|
-
color: $secondary-color;
|
14
|
+
@apply not-italic text-secondary;
|
24
15
|
}
|
25
16
|
}
|
26
17
|
}
|
@@ -1,21 +1,5 @@
|
|
1
|
-
@import "
|
2
|
-
@import "stylesheets/decidim/decidim_awesome/
|
3
|
-
@import "stylesheets/decidim/decidim_awesome/editors/quill_editor";
|
1
|
+
@import "stylesheets/decidim/decidim_awesome/voting/voting_cards";
|
2
|
+
@import "stylesheets/decidim/decidim_awesome/shared/spinner";
|
4
3
|
@import "stylesheets/decidim/decidim_awesome/forms/autosave";
|
5
4
|
@import "stylesheets/decidim/decidim_awesome/forms/custom_fields";
|
6
|
-
@import "stylesheets/decidim/decidim_awesome/
|
7
|
-
|
8
|
-
.decidim_awesome-custom_fields {
|
9
|
-
dd {
|
10
|
-
> div:last-child {
|
11
|
-
margin-bottom: 1rem;
|
12
|
-
}
|
13
|
-
|
14
|
-
&[name="textarea"] {
|
15
|
-
> div > p {
|
16
|
-
margin-top: 1rem;
|
17
|
-
margin-bottom: 0;
|
18
|
-
}
|
19
|
-
}
|
20
|
-
}
|
21
|
-
}
|
5
|
+
@import "stylesheets/decidim/decidim_awesome/amendments/modal";
|