card 1.96.8 → 1.97.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/VERSION +1 -1
- data/config/initializers/01_core_extensions/hash.rb +7 -7
- data/config/initializers/01_core_extensions/object.rb +8 -4
- data/config/initializers/02_patches/kaminari.rb +0 -6
- data/config/locales/de.yml +7 -4
- data/config/locales/en.yml +46 -39
- data/db/migrate/20110511221913_require_earlier_migrations.rb +1 -0
- data/db/migrate/20120105203350_require_1_8_migrations.rb +1 -0
- data/db/migrate/20190116170824_add_left_key_to_card_virtuals.rb +11 -0
- data/db/migrate/20190131223248_add_codename_index.rb +9 -0
- data/db/migrate_core_cards/20120611203506_rails_inflection_updates.rb +8 -2
- data/db/migrate_core_cards/20180712042655_head_rule.rb +14 -0
- data/db/migrate_core_cards/20180905061536_migrate_layouts.rb +64 -0
- data/db/migrate_core_cards/20190125125150_add_script_rules_card.rb +9 -0
- data/db/migrate_core_cards/20190204195039_add_rule_card.rb +7 -0
- data/db/migrate_core_cards/data/decko_logo.svg +59 -0
- data/db/schema.rb +3 -2
- data/db/seed/new/card_actions.yml +1506 -1458
- data/db/seed/new/card_acts.yml +2 -2
- data/db/seed/new/card_references.yml +633 -633
- data/db/seed/new/cards.yml +1802 -1634
- data/db/seed/new/schema_migrations.yml +4 -0
- data/db/seed/new/schema_migrations_core_cards.yml +28 -2
- data/db/seed/test/fixtures/card_actions.yml +2485 -2533
- data/db/seed/test/fixtures/card_acts.yml +520 -460
- data/db/seed/test/fixtures/card_changes.yml +66 -66
- data/db/seed/test/fixtures/card_references.yml +1533 -1407
- data/db/seed/test/fixtures/cards.yml +3392 -2945
- data/db/seed/test/fixtures/schema_migrations.yml +4 -0
- data/db/seed/test/fixtures/schema_migrations_core_cards.yml +28 -2
- data/db/seed/test/seed.rb +33 -1
- data/db/version.txt +1 -1
- data/db/version_core_cards.txt +1 -1
- data/lib/card.rb +1 -0
- data/lib/card/act_manager.rb +6 -2
- data/lib/card/act_manager/stage.rb +5 -5
- data/lib/card/act_manager/stage_director.rb +11 -7
- data/lib/card/act_manager/stage_director/phases.rb +4 -8
- data/lib/card/auth.rb +1 -0
- data/lib/card/auth/current.rb +1 -1
- data/lib/card/auth/permissions.rb +1 -0
- data/lib/card/auth/proxy.rb +1 -0
- data/lib/card/cache.rb +10 -9
- data/lib/card/cache/persistent.rb +2 -1
- data/lib/card/cache/prepopulate.rb +1 -0
- data/lib/card/cache/temporary.rb +1 -0
- data/lib/card/codename.rb +11 -6
- data/lib/card/content/chunk.rb +24 -9
- data/lib/card/content/clean.rb +4 -2
- data/lib/card/content/diff.rb +4 -4
- data/lib/card/content/diff/lcs.rb +1 -3
- data/lib/card/content/diff/processor.rb +2 -0
- data/lib/card/content/diff/result.rb +3 -0
- data/lib/card/content/parser.rb +2 -1
- data/lib/card/content/truncate.rb +4 -1
- data/lib/card/dirty.rb +3 -2
- data/lib/card/env.rb +11 -2
- data/lib/card/env/location_history.rb +3 -1
- data/lib/card/env/success.rb +3 -1
- data/lib/card/error.rb +42 -8
- data/lib/card/format.rb +22 -9
- data/lib/card/format/content.rb +10 -2
- data/lib/card/format/context_names.rb +4 -2
- data/lib/card/format/error.rb +1 -1
- data/lib/card/format/nest.rb +4 -3
- data/lib/card/format/nesting.rb +2 -0
- data/lib/card/format/nesting/main.rb +11 -5
- data/lib/card/format/nesting/mode.rb +1 -0
- data/lib/card/format/nesting/subformat.rb +12 -0
- data/lib/card/format/permission.rb +3 -0
- data/lib/card/format/registration.rb +7 -3
- data/lib/card/format/render.rb +73 -17
- data/lib/card/mailer.rb +2 -1
- data/lib/card/mark.rb +2 -2
- data/lib/card/migration.rb +115 -113
- data/lib/card/migration/core.rb +1 -0
- data/lib/card/migration/deck_structure.rb +1 -0
- data/lib/card/migration/import.rb +1 -1
- data/lib/card/migration/import/import_data.rb +6 -3
- data/lib/card/migration/import/import_data/card_attributes.rb +56 -54
- data/lib/card/migration/import/import_data/card_content.rb +0 -1
- data/lib/card/mod.rb +4 -1
- data/lib/card/mod/dirs.rb +11 -2
- data/lib/card/mod/load_strategy.rb +4 -4
- data/lib/card/mod/load_strategy/set_binding_magic.rb +9 -5
- data/lib/card/mod/load_strategy/set_tmp_files.rb +1 -1
- data/lib/card/mod/load_strategy/tmp_files.rb +1 -0
- data/lib/card/mod/loader.rb +8 -9
- data/lib/card/mod/loader/set_loader.rb +4 -4
- data/lib/card/mod/loader/set_pattern_loader.rb +2 -2
- data/lib/card/mod/module_template.rb +12 -12
- data/lib/card/model/save_helper.rb +13 -4
- data/lib/card/name.rb +3 -2
- data/lib/card/name/name_variants.rb +3 -3
- data/lib/card/query.rb +19 -12
- data/lib/card/query/abstract_query/query_helper.rb +2 -0
- data/lib/card/query/card_query.rb +1 -0
- data/lib/card/query/card_query/conjunctions.rb +2 -0
- data/lib/card/query/card_query/interpretation.rb +2 -7
- data/lib/card/query/card_query/match_attributes.rb +1 -0
- data/lib/card/query/card_query/reference_attributes.rb +4 -4
- data/lib/card/query/card_query/run.rb +1 -0
- data/lib/card/query/card_query/sorting.rb +1 -0
- data/lib/card/query/clause.rb +14 -12
- data/lib/card/query/join.rb +4 -2
- data/lib/card/query/reference_query.rb +1 -0
- data/lib/card/query/sql_statement.rb +4 -8
- data/lib/card/query/sql_statement/joins.rb +1 -0
- data/lib/card/query/sql_statement/order.rb +7 -6
- data/lib/card/query/sql_statement/where.rb +3 -1
- data/lib/card/query/value.rb +1 -0
- data/lib/card/reference.rb +1 -0
- data/lib/card/set/advanced_api.rb +2 -2
- data/lib/card/set/code_nest.rb +15 -0
- data/lib/card/set/event.rb +4 -3
- data/lib/card/set/event/callbacks.rb +1 -0
- data/lib/card/set/event/delayed_event.rb +7 -6
- data/lib/card/set/event/options.rb +5 -1
- data/lib/card/set/format.rb +21 -0
- data/lib/card/set/format/abstract_format.rb +15 -6
- data/lib/card/set/format/haml_views.rb +1 -1
- data/lib/card/set/format/wrapper.rb +89 -0
- data/lib/card/set/helpers.rb +5 -0
- data/lib/card/set/i18n_scanner.rb +5 -4
- data/lib/card/set/i18n_scope.rb +10 -10
- data/lib/card/set/inheritance.rb +3 -0
- data/lib/card/set/loader.rb +1 -0
- data/lib/card/set/required_field.rb +74 -0
- data/lib/card/set/trait.rb +6 -0
- data/lib/card/set_pattern.rb +8 -4
- data/lib/card/subcards.rb +9 -1
- data/lib/card/subcards/add.rb +1 -3
- data/lib/card/subcards/remove.rb +2 -0
- data/lib/card/tasks/card.rake +2 -0
- data/lib/card/tasks/card/create.rake +2 -1
- data/lib/card/tasks/card/file_card_creator.rb +1 -1
- data/lib/card/tasks/card/file_card_creator/abstract_file_card/migration_file.rb +1 -0
- data/lib/card/tasks/card/migrate.rake +3 -3
- data/lib/card/version.rb +6 -4
- data/lib/card/view.rb +15 -2
- data/lib/card/view/cache.rb +12 -12
- data/lib/card/view/cache_action.rb +11 -14
- data/lib/card/view/classy.rb +168 -0
- data/lib/card/view/layout.rb +14 -0
- data/lib/card/view/options.rb +12 -8
- data/lib/card/view/options/key_lists.rb +4 -4
- data/lib/card/view/options/voo_api.rb +46 -9
- data/lib/card/view/stub.rb +2 -2
- data/lib/card/view/visibility.rb +4 -5
- data/lib/card/view/wrapper.rb +28 -0
- data/lib/cardio.rb +2 -1
- data/mod/Modfile +2 -0
- data/mod/account/set/right/account.rb +4 -6
- data/mod/account/set/right/password.rb +2 -2
- data/mod/account/set/self/signin.rb +16 -9
- data/mod/account/set/type/signup.rb +1 -1
- data/mod/account/spec/set/right/password_spec.rb +26 -19
- data/mod/account/spec/set/type/signup_spec.rb +1 -1
- data/mod/basic_formats/set/self/head.rb +4 -0
- data/mod/bootstrap/lib/javascript/script_load_select2.js.coffee +2 -0
- data/mod/bootstrap/lib/stylesheets/style_bootstrap_cards.scss +76 -21
- data/mod/bootstrap/lib/stylesheets/style_select2_bootstrap.scss +24 -6
- data/mod/bootstrap/set/abstract/bootswatch_theme/html_views.rb +2 -1
- data/mod/bootstrap/set/type/customized_bootswatch_skin/core.haml +2 -2
- data/mod/bootstrap/set/type/customized_bootswatch_skin/html_views.rb +14 -14
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors.rb +4 -0
- data/mod/bootstrap/set/type_plus_right/customized_bootswatch_skin/colors/core.haml +10 -0
- data/mod/carrierwave/lib/carrier_wave/file_card_uploader.rb +2 -2
- data/mod/carrierwave/set/abstract/attachment.rb +1 -1
- data/mod/carrierwave/set/type/file.rb +4 -0
- data/mod/carrierwave/set/type/image.rb +13 -0
- data/mod/carrierwave/spec/lib/carrier_wave/file_card_uploader_spec.rb +2 -2
- data/mod/carrierwave/spec/set/type/file_spec.rb +4 -4
- data/mod/carrierwave/spec/set/type/image_spec.rb +6 -6
- data/mod/core/chunk/nest.rb +9 -1
- data/mod/core/format/html_format.rb +9 -45
- data/mod/core/layout/blank.html +5 -5
- data/mod/core/layout/default.html +10 -8
- data/mod/core/layout/noside.html +6 -9
- data/mod/core/layout/pre.html +1 -2
- data/mod/core/layout/simple.html +1 -5
- data/mod/core/set/abstract/code_file.rb +1 -1
- data/mod/core/set/all/cache.rb +0 -2
- data/mod/core/set/all/codename.rb +2 -0
- data/mod/core/set/all/collection.rb +3 -1
- data/mod/core/set/all/event_conditions.rb +36 -4
- data/mod/core/set/all/export.rb +1 -10
- data/mod/core/set/all/haml.rb +3 -2
- data/mod/core/set/all/layouts.rb +34 -0
- data/mod/core/set/all/name_events.rb +1 -1
- data/mod/core/set/all/pattern.rb +6 -11
- data/mod/core/set/all/subcards.rb +4 -0
- data/mod/core/set/all/utils.rb +21 -1
- data/mod/core/set_pattern/07_type_plus_right.rb +1 -1
- data/mod/core/set_pattern/08_rule.rb +17 -0
- data/mod/core/set_pattern/{08_self.rb → 09_self.rb} +0 -0
- data/mod/core/spec/format/html_format_spec.rb +6 -99
- data/mod/core/spec/set/all/codename_spec.rb +1 -1
- data/mod/core/spec/set/all/collection_spec.rb +9 -5
- data/mod/core/spec/set/all/event_conditions_spec.rb +91 -0
- data/mod/core/spec/set/all/pattern_spec.rb +17 -10
- data/mod/developer/spec/set/right/debug_spec.rb +1 -1
- data/mod/edit/set/all/bridge.rb +61 -0
- data/mod/edit/set/all/bridge/bridge.haml +6 -0
- data/mod/edit/set/all/bridge/follow_section.rb +37 -0
- data/mod/edit/set/all/bridge/tab_views.rb +75 -0
- data/mod/edit/set/all/bridge/tab_visibility.rb +51 -0
- data/mod/edit/set/all/edit_content.rb +58 -0
- data/mod/edit/set/all/edit_in_place.rb +58 -0
- data/mod/edit/set/all/edit_name.rb +87 -0
- data/mod/edit/set/all/edit_type.rb +28 -0
- data/mod/edit/set/all/editing.rb +79 -0
- data/mod/{standard/set/all/rich_html → edit/set/all}/editor.rb +1 -0
- data/mod/{standard/set/all/rich_html → edit/set/all}/form.rb +17 -10
- data/mod/edit/set/all/form_buttons.rb +52 -0
- data/mod/{standard/set/all/rich_html → edit/set/all}/form_elements.rb +2 -1
- data/mod/{standard/set/all/rich_html → edit/set/all}/formgroup.rb +3 -1
- data/mod/{standard/set/all/rich_html → edit/set/all}/new.rb +0 -2
- data/mod/edit/set/all/toolbar.rb +8 -0
- data/mod/edit/spec/set/all/bridge/tab_views_spec.rb +14 -0
- data/mod/{standard/spec/set/all/rich_html/editing_spec.rb → edit/spec/set/all/bridge_spec.rb} +1 -1
- data/mod/edit/spec/set/all/editing_spec.rb +15 -0
- data/mod/{standard/spec/set/all/rich_html → edit/spec/set/all}/form_elements_spec.rb +10 -8
- data/mod/edit/spec/set/all/form_spec.rb +50 -0
- data/mod/follow/lib/card/follower_stash.rb +5 -0
- data/mod/follow/set/abstract/follow_option.rb +0 -1
- data/mod/follow/set/all/follow/follow_link.rb +42 -54
- data/mod/follow/set/all/follow/follow_link_views.rb +29 -0
- data/mod/follow/set/all/follow/followed_by.rb +3 -0
- data/mod/follow/set/all/follow/follower_ids.rb +5 -0
- data/mod/follow/set/all/follow/start_follow_link.rb +11 -0
- data/mod/follow/set/all/follow/stop_follow_link.rb +12 -0
- data/mod/follow/set/all/notify.rb +4 -0
- data/mod/follow/set/all/notify/base_views.rb +11 -0
- data/mod/follow/set/right/account.rb +2 -1
- data/mod/follow/set/right/follow.rb +4 -0
- data/mod/follow/set/right/follow/follow_status.haml +2 -2
- data/mod/follow/set/right/followers.rb +1 -0
- data/mod/follow/set/right/following.rb +2 -3
- data/mod/follow/set/self/follow_defaults.rb +17 -16
- data/mod/follow/set/type/set.rb +2 -0
- data/mod/follow/set/type/user.rb +1 -0
- data/mod/follow/set/type_plus_right/user/follow.rb +1 -0
- data/mod/follow/set/type_plus_right/user/follow/follow_editor.haml +4 -1
- data/mod/follow/set/type_plus_right/user/follow/follow_editor_helper.rb +6 -0
- data/mod/follow/spec/set/all/follow/follow_link_views_spec.rb +27 -0
- data/mod/follow/spec/set/all/follow/start_follow_link_spec.rb +11 -0
- data/mod/follow/spec/set/all/follow/stop_follow_link_spec.rb +13 -0
- data/mod/follow/spec/set/all/follow_spec.rb +13 -9
- data/mod/follow/spec/set/all/notify_spec.rb +4 -3
- data/mod/follow/spec/set/right/account_spec.rb +29 -31
- data/mod/follow/spec/set/right/following_spec.rb +2 -8
- data/mod/history/lib/card/act.rb +9 -7
- data/mod/history/lib/card/act/act_renderer.rb +12 -9
- data/mod/history/lib/card/act/act_renderer/absolute_act_renderer.rb +2 -2
- data/mod/history/lib/card/act/act_renderer/bridge_act_renderer.rb +53 -0
- data/mod/history/lib/card/act/act_renderer/relative_act_renderer.rb +3 -0
- data/mod/history/lib/card/action.rb +9 -4
- data/mod/history/lib/card/action/action_renderer.rb +5 -3
- data/mod/history/lib/card/action/differ.rb +3 -0
- data/mod/history/set/all/history.rb +2 -1
- data/mod/history/set/all/history/act_listing.rb +11 -8
- data/mod/history/set/all/history/actions.rb +11 -2
- data/mod/history/set/all/history/events.rb +0 -1
- data/mod/history/set/all/history/last.rb +2 -1
- data/mod/history/set/all/history/revision.rb +1 -0
- data/mod/history/set/all/history/selected.rb +1 -1
- data/mod/history/set/all/history/views.rb +0 -1
- data/mod/history/set/all/history_bridge.rb +66 -0
- data/mod/item/set/all/bar.haml +1 -3
- data/mod/item/set/all/bar.rb +39 -21
- data/mod/item/set/all/box.haml +1 -0
- data/mod/item/set/all/box.rb +13 -3
- data/mod/item/set/all/expanded_bar.haml +4 -6
- data/mod/machines/file/all_script_machine_output/file.js +37380 -65
- data/mod/machines/file/all_style_machine_output/file.css +2 -2
- data/mod/machines/file/script_html5shiv_printshiv_machine_output/file.js +1 -1
- data/mod/machines/lib/javascript/decko.js.coffee +2 -17
- data/mod/machines/lib/javascript/decko_bridge.js.coffee +28 -0
- data/mod/machines/lib/javascript/decko_components.js.coffee +21 -0
- data/mod/machines/lib/javascript/decko_filter.js.coffee +3 -1
- data/mod/machines/lib/javascript/decko_mod.js.coffee +7 -64
- data/mod/machines/lib/javascript/decko_modal.js.coffee +108 -0
- data/mod/machines/lib/javascript/decko_navbox.js.coffee +2 -0
- data/mod/machines/lib/javascript/decko_overlay.js.coffee +42 -0
- data/mod/machines/lib/javascript/decko_recaptcha.js.coffee +9 -1
- data/mod/machines/lib/javascript/decko_slot.js.coffee +46 -50
- data/mod/machines/lib/javascript/decko_slotter.js.coffee +204 -63
- data/mod/machines/lib/javascript/script_card_menu.js.coffee +3 -3
- data/mod/machines/lib/stylesheets/style_cards.scss +234 -107
- data/mod/machines/set/abstract/machine.rb +4 -3
- data/mod/machines/set/self/script_slot.rb +2 -2
- data/mod/machines/set/type/css.rb +8 -1
- data/mod/machines/set/type/skin.rb +1 -1
- data/mod/machines/spec/set/type/coffeescript_spec.rb +3 -3
- data/mod/pointer/set/abstract/00_paging_params.rb +2 -0
- data/mod/pointer/set/abstract/01_paging.rb +12 -6
- data/mod/pointer/set/abstract/02_pointer/html_views.rb +25 -0
- data/mod/pointer/set/abstract/02_pointer/html_views/filter.rb +20 -4
- data/mod/pointer/set/abstract/02_pointer/html_views/filter/filter_items.haml +1 -6
- data/mod/pointer/set/abstract/02_pointer/html_views/filter/filtered_list_input.haml +4 -13
- data/mod/pointer/set/type/pointer.rb +9 -0
- data/mod/pointer/spec/set/abstract/pointer/events_spec.rb +6 -0
- data/mod/rules/lib/javascript/script_rules.js.coffee +23 -0
- data/mod/rules/set/rstar/rule_user.rb +8 -0
- data/mod/rules/set/rule/bridge_rules_editor.rb +32 -0
- data/mod/rules/set/rule/editor.rb +144 -0
- data/mod/rules/set/rule/rule_form.rb +57 -0
- data/mod/rules/set/rule/rule_form/buttons.rb +44 -0
- data/mod/rules/set/rule/rule_form/form_elements.rb +52 -0
- data/mod/rules/set/rule/rule_form/rule_form.haml +20 -0
- data/mod/rules/set/rule/rule_form/rule_set_radio.rb +86 -0
- data/mod/rules/set/rule/rule_form/set_selection.rb +46 -0
- data/mod/{standard/set/rstar → rules/set/rule}/rules.rb +5 -9
- data/mod/rules/set/rule/table.rb +27 -0
- data/mod/rules/set/rule/table_row.rb +62 -0
- data/mod/rules/set/self/script_rules.rb +3 -0
- data/mod/{standard → rules}/set/type/set.rb +8 -10
- data/mod/rules/set/type/set/html_views.rb +72 -0
- data/mod/{standard → rules}/set/type/set/html_views/group_panel.haml +0 -0
- data/mod/rules/set/type/set/html_views/rules_bridge.rb +129 -0
- data/mod/rules/set/type/set/html_views/rules_table.haml +11 -0
- data/mod/{standard → rules}/set/type/set/html_views/template.rb +3 -7
- data/mod/{standard → rules}/set/type/set/html_views/template/template_editor.haml +0 -0
- data/mod/rules/spec/set/rule/editor_spec.rb +9 -0
- data/mod/rules/spec/set/rule/table_row_spec.rb +9 -0
- data/mod/rules/spec/set/rule/table_spec.rb +15 -0
- data/mod/rules/spec/set/type/set/html_views_spec.rb +22 -0
- data/mod/{standard → rules}/spec/set/type/set_spec.rb +18 -18
- data/mod/search/set/abstract/00_filter_helper.rb +15 -7
- data/mod/search/set/abstract/01_filter_form_helper.rb +1 -0
- data/mod/search/set/abstract/02_search_params.rb +7 -5
- data/mod/search/set/abstract/03_filter.rb +3 -2
- data/mod/search/set/abstract/04_right_filter_form.rb +1 -2
- data/mod/search/set/abstract/search.rb +1 -1
- data/mod/search/set/abstract/search/views.rb +2 -0
- data/mod/search/set/abstract/wql_search.rb +6 -0
- data/mod/search/set/self/navbox.rb +1 -1
- data/mod/search/set/self/search.rb +2 -2
- data/mod/settings/lib/card/setting.rb +6 -1
- data/mod/settings/set/right/help.rb +4 -0
- data/mod/settings/set/right/read.rb +14 -4
- data/mod/settings/set/right/structure.rb +3 -0
- data/mod/settings/set/right/style.rb +2 -1
- data/mod/settings/set/self/create.rb +2 -1
- data/mod/settings/set/self/default.rb +2 -1
- data/mod/settings/set/self/delete.rb +2 -1
- data/mod/settings/set/self/head.rb +2 -0
- data/mod/settings/set/self/help.rb +2 -1
- data/mod/settings/set/self/input.rb +1 -1
- data/mod/settings/set/self/read.rb +2 -1
- data/mod/settings/set/self/structure.rb +2 -1
- data/mod/settings/set/self/thanks.rb +2 -1
- data/mod/settings/set/self/update.rb +2 -1
- data/mod/settings/set/type/setting.rb +1 -1
- data/mod/solid_cache/set/abstract/solid_cache.rb +2 -2
- data/mod/standard/file/logo/image-original.svg +59 -0
- data/mod/standard/lib/card/layout.rb +79 -0
- data/mod/standard/lib/card/layout/card_layout.rb +44 -0
- data/mod/standard/lib/card/layout/code_layout.rb +9 -0
- data/mod/standard/lib/card/layout/proc_layout.rb +9 -0
- data/mod/standard/lib/card/layout/unknown_layout.rb +20 -0
- data/mod/standard/set/all/links.rb +5 -20
- data/mod/standard/set/all/rich_html.rb +4 -0
- data/mod/standard/set/all/rich_html/alert.rb +23 -0
- data/mod/standard/set/all/rich_html/content.rb +26 -100
- data/mod/standard/set/all/rich_html/error.rb +27 -3
- data/mod/standard/set/all/rich_html/error/debug_server_error.haml +1015 -0
- data/mod/standard/set/all/rich_html/frame.rb +10 -54
- data/mod/standard/set/all/rich_html/header.rb +25 -15
- data/mod/standard/set/all/rich_html/header/header_wrap.haml +2 -1
- data/mod/standard/set/all/rich_html/html_views/help.rb +18 -0
- data/mod/standard/set/all/rich_html/html_views/info.rb +59 -0
- data/mod/standard/set/all/rich_html/html_views/size.rb +17 -0
- data/mod/standard/set/all/rich_html/menu.rb +44 -146
- data/mod/standard/set/all/rich_html/modal.rb +99 -24
- data/mod/standard/set/all/rich_html/modal/modal_dialog.haml +12 -0
- data/mod/standard/set/all/rich_html/overlay.rb +57 -13
- data/mod/standard/set/all/rich_html/process_layout.rb +91 -0
- data/mod/standard/set/all/rich_html/show.rb +37 -0
- data/mod/standard/set/all/rich_html/wrapper.rb +47 -10
- data/mod/standard/set/right/head.rb +11 -0
- data/mod/standard/set/type/cardtype.rb +1 -1
- data/mod/standard/set/type/listed_by.rb +3 -3
- data/mod/standard/spec/set/all/email_html_format_spec.rb +17 -0
- data/mod/standard/spec/set/all/links_spec.rb +1 -22
- data/mod/standard/spec/set/all/rich_html/overlay_spec.rb +18 -0
- data/mod/standard/spec/set/all/rich_html/process_layout/explicit_modal_wrapper_spec.rb +29 -0
- data/mod/standard/spec/set/all/rich_html/process_layout_spec.rb +110 -0
- data/mod/standard/spec/set/all/rich_html/show_spec.rb +9 -0
- data/mod/standard/spec/set/all/rich_html/wrapper_spec.rb +17 -24
- data/mod/standard/spec/set/type/email_template/email_config_spec.rb +9 -5
- data/mod/standard/spec/set/type/layout_type_spec.rb +6 -0
- data/mod/standard/spec/set/type/search_type_spec.rb +1 -1
- data/mod/tinymce_editor/db/migrate_core_cards/20190306172623_update_tinymce_config_to_v5.rb +23 -0
- data/mod/tinymce_editor/lib/javascript/script_tinymce.js +9 -2
- data/mod/tinymce_editor/lib/javascript/script_tinymce_config.js.coffee +3 -2
- data/mod/tinymce_editor/public/assets/tinymce/jquery.tinymce.min.js +92 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/advlist/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/anchor/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autolink/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autoresize/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/autosave/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/bbcode/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/charmap/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/code/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/codesample/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/colorpicker/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/contextmenu/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/directionality/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/js/emojis.js +9015 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/js/emojis.min.js +2 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/emoticons/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullpage/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/fullscreen/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/help/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/hr/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/image/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/imagetools/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/importcss/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/insertdatetime/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/legacyoutput/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/link/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/lists/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/media/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/nonbreaking/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/noneditable/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/pagebreak/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/paste/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/preview/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/print/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/quickbars/plugin.min.js +9 -0
- data/mod/tinymce_editor/public/assets/tinymce/plugins/save/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/searchreplace/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/spellchecker/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/tabfocus/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/table/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/template/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textcolor/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/textpattern/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/toc/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualblocks/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/visualchars/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/plugins/wordcount/plugin.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/default/content.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/document/content.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/content/writer/content.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.inline.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/content.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide-dark/skin.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.inline.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/content.mobile.min.css +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/fonts/tinymce-mobile.woff +0 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.min.css +7 -0
- data/mod/tinymce_editor/public/assets/tinymce/skins/ui/oxide/skin.mobile.min.css +1 -0
- data/mod/tinymce_editor/public/assets/tinymce/themes/mobile/theme.min.js +9 -1
- data/mod/tinymce_editor/public/assets/tinymce/themes/silver/theme.min.js +9 -0
- data/mod/tinymce_editor/public/assets/tinymce/tinymce.min.js +9 -2
- data/mod/utility/spec/set/abstract/media_spec.rb +6 -6
- data/mod/virtual/lib/card/virtual.rb +17 -2
- data/mod/virtual/set/abstract/virtual_cache.rb +1 -1
- data/mod/virtual/spec/set/lib/card/virtual_spec.rb +1 -1
- metadata +121 -42
- data/mod/core/layout/modal.html +0 -9
- data/mod/core/layout/simple_modal.html +0 -3
- data/mod/follow/spec/set/all/follow/follow_link_spec.rb +0 -7
- data/mod/standard/file/logo/image-icon.png +0 -0
- data/mod/standard/file/logo/image-large.png +0 -0
- data/mod/standard/file/logo/image-medium.png +0 -0
- data/mod/standard/file/logo/image-original.png +0 -0
- data/mod/standard/file/logo/image-small.png +0 -0
- data/mod/standard/set/abstract/toolbar_split_button.rb +0 -22
- data/mod/standard/set/all/rich_html/classy.rb +0 -37
- data/mod/standard/set/all/rich_html/editing.rb +0 -176
- data/mod/standard/set/all/rich_html/related.rb +0 -30
- data/mod/standard/set/all/rich_html/toolbar.rb +0 -264
- data/mod/standard/set/rstar/rules_editor.rb +0 -371
- data/mod/standard/set/self/activity_toolbar_button.rb +0 -14
- data/mod/standard/set/self/rules_toolbar_button.rb +0 -44
- data/mod/standard/set/type/set/html_views.rb +0 -155
- data/mod/standard/set/type/set/html_views/rules_table.haml +0 -9
- data/mod/standard/spec/set/all/rich_html/form_spec.rb +0 -47
- data/mod/standard/spec/set/all/rich_html/toolbar_spec.rb +0 -25
- data/mod/standard/spec/set/rstar/rules_spec.rb +0 -26
- data/mod/standard/spec/set/self/activity_toolbar_button_spec.rb +0 -22
- data/mod/standard/spec/set/type/set/html_views_spec.rb +0 -10
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3b59550d09bbcc807ad2b77447b9210447752630
|
4
|
+
data.tar.gz: 395dc3c7be36b523bc0253dc15a030b6cc72afdf
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: '09f5e93e2ab0e97289fc9158672e278f9814efaf67fc1355b49e1002ae4e7f1cc848983ff388243490db23602c32ff095b309aec781757a2b0aa76aaec410115'
|
7
|
+
data.tar.gz: 272c9e9f7827f7b91d3ef2fde2d3aaa96f46cc5f05853e730ff51fdc6acb03adcff7a9238365a5c4b816d3cdb8a72a097895c710686948df70a8164755184a21
|
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.
|
1
|
+
0.7.0.pre
|
@@ -56,14 +56,14 @@ module CoreExtensions
|
|
56
56
|
# opposite of #dig
|
57
57
|
# eg. hash.bury(:a, :b, 7) will make sure hash[:a][:b] equals 7
|
58
58
|
# @return [Hash] with arbitrary depth
|
59
|
-
def bury *
|
60
|
-
|
61
|
-
validate_bury_key!
|
62
|
-
if
|
63
|
-
self[
|
59
|
+
def bury *val
|
60
|
+
k = val.shift
|
61
|
+
validate_bury_key! k
|
62
|
+
if val.size == 1
|
63
|
+
self[k] = val.first
|
64
64
|
else
|
65
|
-
self[
|
66
|
-
self[
|
65
|
+
self[k] = {} unless self[k].is_a? ::Hash
|
66
|
+
self[k].bury(*val)
|
67
67
|
end
|
68
68
|
self
|
69
69
|
end
|
@@ -2,9 +2,7 @@ module CoreExtensions
|
|
2
2
|
module Object
|
3
3
|
def deep_clone
|
4
4
|
case self
|
5
|
-
when
|
6
|
-
# FIXME: Fixnum and Bignum are deprecated in Ruby 2.4 but need to be supported here
|
7
|
-
# so long as decko supports older ruby versions
|
5
|
+
when Integer, Float, NilClass, FalseClass, TrueClass, Symbol
|
8
6
|
klone = self
|
9
7
|
when Hash
|
10
8
|
klone = clone
|
@@ -14,7 +12,13 @@ module CoreExtensions
|
|
14
12
|
klone.clear
|
15
13
|
each { |v| klone << v.deep_clone }
|
16
14
|
else
|
17
|
-
klone =
|
15
|
+
klone =
|
16
|
+
if Gem::Version.new(RUBY_VERSION) < Gem::Version.new("2.4") &&
|
17
|
+
(self.is_a?(Fixnum) || self.is_a?(Bignum))
|
18
|
+
self
|
19
|
+
else
|
20
|
+
clone
|
21
|
+
end
|
18
22
|
end
|
19
23
|
klone.deep_clone_instance_variables
|
20
24
|
klone
|
@@ -12,12 +12,6 @@ module Patches
|
|
12
12
|
p = params_for(page)
|
13
13
|
p.delete :controller
|
14
14
|
p.delete :action
|
15
|
-
# TODO: make sure paging works with new related handling
|
16
|
-
if p["related"]
|
17
|
-
p["related"]["page"] = p["page"]
|
18
|
-
p["related"]["subslot"] = true
|
19
|
-
p = p["related"]
|
20
|
-
end
|
21
15
|
mark = p.delete("mark") || p.delete("name")
|
22
16
|
Card.fetch(mark).format.path p
|
23
17
|
end
|
data/config/locales/de.yml
CHANGED
@@ -70,9 +70,10 @@ de:
|
|
70
70
|
html_format:
|
71
71
|
unknown_layout: "Unbekanntes Layout: %{name}"
|
72
72
|
built_in: "Built-in Layouts: %{built_in_layouts}"
|
73
|
+
available_layouts: "Verfügbare Layouts: %{available_layouts}"
|
73
74
|
set:
|
74
75
|
all:
|
75
|
-
codename:
|
76
|
+
codename:
|
76
77
|
only_admins_codename: cur Administratoren können Codenamen festlegen
|
77
78
|
error_code_in_use: codename %{codename} wird bereits benutzt
|
78
79
|
event:
|
@@ -82,7 +83,7 @@ de:
|
|
82
83
|
fetch:
|
83
84
|
exception_fetch_arg_skipvirt: "%{func} called with new arguments and %{sv}"
|
84
85
|
name_events:
|
85
|
-
error_name_exists: muss eindeutig sein; '%{name}'
|
86
|
+
error_name_exists: muss eindeutig sein; '%{name}' existiert bereits.
|
86
87
|
error_too_long: ist zu lang (%{length} Zeichen; erlaubt sind maximal 255)
|
87
88
|
error_blank_name: darf nicht frei bleiben
|
88
89
|
error_blank_key: darf nicht frei bleiben
|
@@ -189,7 +190,7 @@ de:
|
|
189
190
|
json:
|
190
191
|
invalid_json: invalid json
|
191
192
|
:bootstrap:
|
192
|
-
set:
|
193
|
+
set:
|
193
194
|
type:
|
194
195
|
customized_bootswatch_skin:
|
195
196
|
not_valid_theme: kein gültiges Thema %{theme_name}
|
@@ -525,7 +526,9 @@ de:
|
|
525
526
|
error_unknown_email: Unbekannte E-Mail-Adresse.
|
526
527
|
error_not_active: Entschuldigung, der Account ist nicht aktiviert.
|
527
528
|
error_wrong_password: Falsches Passwort
|
528
|
-
|
529
|
+
error_blank: fehlt
|
530
|
+
email_missing: E-Mail-Addresse fehlt
|
531
|
+
password_missing: Passwort fehlt
|
529
532
|
error_not_active: nicht aktiviert
|
530
533
|
error_not_recognized: unbekannt
|
531
534
|
type:
|
data/config/locales/en.yml
CHANGED
@@ -80,9 +80,10 @@ en:
|
|
80
80
|
html_format:
|
81
81
|
unknown_layout: "Unknown layout: %{name}"
|
82
82
|
built_in: "Built-in Layouts: %{built_in_layouts}"
|
83
|
+
available_layouts: "Available Layouts: %{available_layouts}"
|
83
84
|
set:
|
84
85
|
all:
|
85
|
-
codename:
|
86
|
+
codename:
|
86
87
|
only_admins_codename: only admins can set codename
|
87
88
|
error_code_in_use: codename %{codename} already in use
|
88
89
|
event:
|
@@ -199,7 +200,7 @@ en:
|
|
199
200
|
json:
|
200
201
|
invalid_json: invalid json
|
201
202
|
:bootstrap:
|
202
|
-
set:
|
203
|
+
set:
|
203
204
|
type:
|
204
205
|
customized_bootswatch_skin:
|
205
206
|
not_valid_theme: not a valid theme %{theme_name}
|
@@ -367,42 +368,6 @@ en:
|
|
367
368
|
account: account
|
368
369
|
modal:
|
369
370
|
close: Close
|
370
|
-
toolbar:
|
371
|
-
account: account
|
372
|
-
activity: activity
|
373
|
-
all: all
|
374
|
-
autosaved_draft: autosaved draft
|
375
|
-
by_group: by group
|
376
|
-
by_name: by name
|
377
|
-
cancel: cancel
|
378
|
-
card_delete_confirm: Are you sure you want to delete %{cardname}?
|
379
|
-
card_deleted: "%{cardname} deleted"
|
380
|
-
children: children
|
381
|
-
common: common
|
382
|
-
content: content
|
383
|
-
created: created
|
384
|
-
delete: delete
|
385
|
-
details: details
|
386
|
-
discuss: discuss
|
387
|
-
edit: edit
|
388
|
-
edited: edited
|
389
|
-
editors: editors
|
390
|
-
engage: engage
|
391
|
-
follow: follow
|
392
|
-
history: history
|
393
|
-
mates: mates
|
394
|
-
name: name
|
395
|
-
nests: nests
|
396
|
-
pin_pin: pin
|
397
|
-
pin_unpin: unpin
|
398
|
-
recent: recent
|
399
|
-
references_out: references out
|
400
|
-
references_in: references in
|
401
|
-
refresh: refresh
|
402
|
-
roles: roles
|
403
|
-
rules: rules
|
404
|
-
structure: structure
|
405
|
-
type: type
|
406
371
|
wrapper:
|
407
372
|
close: Close
|
408
373
|
rstar:
|
@@ -561,8 +526,10 @@ en:
|
|
561
526
|
check_email: Check your email for a link to reset your password
|
562
527
|
error_unknown_email: Unrecognized email.
|
563
528
|
error_not_active: Sorry, that account is not active.
|
529
|
+
error_blank: can't be blank
|
564
530
|
error_wrong_password: Wrong password
|
565
|
-
|
531
|
+
email_missing: email can't be blank
|
532
|
+
password_missing: password can't be blank
|
566
533
|
error_not_active: not active
|
567
534
|
error_not_recognized: not recognized
|
568
535
|
:carrierwave:
|
@@ -592,5 +559,45 @@ en:
|
|
592
559
|
howto_turn_off: 'How to turn captcha off:'
|
593
560
|
howto_go: Go to %{captcha_card}
|
594
561
|
howto_update: Update all *captcha rules to "no".
|
562
|
+
:edit:
|
563
|
+
set:
|
564
|
+
all:
|
565
|
+
bridge:
|
566
|
+
tab_views:
|
567
|
+
account: account
|
568
|
+
activity: activity
|
569
|
+
all: all
|
570
|
+
autosaved_draft: autosaved draft
|
571
|
+
by_group: by group
|
572
|
+
by_name: by name
|
573
|
+
cancel: cancel
|
574
|
+
card_delete_confirm: Are you sure you want to delete %{cardname}?
|
575
|
+
card_deleted: "%{cardname} deleted"
|
576
|
+
children: children
|
577
|
+
common: common
|
578
|
+
content: content
|
579
|
+
created: created
|
580
|
+
delete: delete
|
581
|
+
details: details
|
582
|
+
discuss: discuss
|
583
|
+
edit: edit
|
584
|
+
edited: edited
|
585
|
+
editors: editors
|
586
|
+
engage: engage
|
587
|
+
follow: follow
|
588
|
+
history: history
|
589
|
+
mates: mates
|
590
|
+
name: name
|
591
|
+
nests: nests
|
592
|
+
pin_pin: pin
|
593
|
+
pin_unpin: unpin
|
594
|
+
recent: recent
|
595
|
+
references_out: references out
|
596
|
+
references_in: references in
|
597
|
+
refresh: refresh
|
598
|
+
roles: roles
|
599
|
+
rules: rules
|
600
|
+
structure: structure
|
601
|
+
type: type
|
595
602
|
|
596
603
|
|
@@ -1,4 +1,5 @@
|
|
1
1
|
# -*- encoding : utf-8 -*-
|
2
|
+
|
2
3
|
class RailsInflectionUpdates < Card::Migration::Core
|
3
4
|
def word ar
|
4
5
|
[/(?<=\W|_|^)#{ar[0]}(?=\W|_|$)/i, /(?<=\W|_|^)#{ar[1]}(?=\W|_|$)/i, ar[2]]
|
@@ -18,7 +19,11 @@ class RailsInflectionUpdates < Card::Migration::Core
|
|
18
19
|
twin.destroy
|
19
20
|
yield
|
20
21
|
elsif !card.trash
|
21
|
-
raise Card::Error::Oops
|
22
|
+
raise Card::Error::Oops,
|
23
|
+
"Your deck has two different cards with names '#{card.name}' and "\
|
24
|
+
"'#{twin.name}'. After this update it's no longer possible to "\
|
25
|
+
"differentiate between those two names. Please rename or delete one of "\
|
26
|
+
"the two cards and run the update again."
|
22
27
|
end
|
23
28
|
else
|
24
29
|
yield
|
@@ -36,7 +41,8 @@ class RailsInflectionUpdates < Card::Migration::Core
|
|
36
41
|
word(keep_the_s("analysi")),
|
37
42
|
word(keep_the_s("axi"))
|
38
43
|
]
|
39
|
-
%w
|
44
|
+
%w[statu crisi alia bu octopu viru analysi basi diagnosi parenthesi
|
45
|
+
prognosi synopsi thesi].each do |word|
|
40
46
|
corrections << word_end(keep_the_s(word))
|
41
47
|
end
|
42
48
|
|
@@ -0,0 +1,14 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
class HeadRule < Card::Migration::Core
|
4
|
+
def up
|
5
|
+
update_card :head, type_id: Card::SettingID
|
6
|
+
ensure_card [:all, :head],
|
7
|
+
type_id: Card::HTMLID,
|
8
|
+
content: "{{*head|core}}"
|
9
|
+
ensure_card [:head, :right, :help],
|
10
|
+
content: "head tag content"
|
11
|
+
ensure_card [:head, :right, :default], type_id: Card::HtmlID
|
12
|
+
|
13
|
+
end
|
14
|
+
end
|
@@ -0,0 +1,64 @@
|
|
1
|
+
# -*- encoding : utf-8 -*-
|
2
|
+
|
3
|
+
class MigrateLayouts < Card::Migration::Core
|
4
|
+
def up
|
5
|
+
Card.search referred_to_by: { right: :layout } do |card|
|
6
|
+
create_head_rules card
|
7
|
+
update_layout_card card
|
8
|
+
end
|
9
|
+
end
|
10
|
+
|
11
|
+
# strip layout content down to body tag
|
12
|
+
def update_layout_card card
|
13
|
+
body = body_tag card
|
14
|
+
missing "body", card unless body.present?
|
15
|
+
|
16
|
+
puts "updating layout '#{card.name}'"
|
17
|
+
card.update! content: body.to_s
|
18
|
+
end
|
19
|
+
|
20
|
+
def body_tag card
|
21
|
+
card.content[/<body[^>]+>.*<\/body>/mi]
|
22
|
+
end
|
23
|
+
|
24
|
+
def create_head_rules layout_card
|
25
|
+
head = find_head_content layout_card
|
26
|
+
return missing "head", layout_card unless head
|
27
|
+
|
28
|
+
each_layout_set layout_card do |set_name|
|
29
|
+
puts "creating head rule for '#{set_name}'"
|
30
|
+
ensure_card [set_name, :head], content: head, type_id: Card::HtmlID
|
31
|
+
end
|
32
|
+
end
|
33
|
+
|
34
|
+
def find_head_content card
|
35
|
+
head_tag(card) || find_nested_head(card)
|
36
|
+
end
|
37
|
+
|
38
|
+
def head_tag card
|
39
|
+
if (match = card.content.match(/<head>(.*)<\/head>/mi))
|
40
|
+
match[1].strip
|
41
|
+
end
|
42
|
+
end
|
43
|
+
|
44
|
+
def missing obj, card
|
45
|
+
puts "warning: couldn't find #{obj} in layout '#{card.name}'"
|
46
|
+
end
|
47
|
+
|
48
|
+
def each_layout_set layout_card
|
49
|
+
Card.search(link_to: layout_card.name) do |rule|
|
50
|
+
yield rule.name.left
|
51
|
+
end
|
52
|
+
end
|
53
|
+
|
54
|
+
private
|
55
|
+
|
56
|
+
def find_nested_head card
|
57
|
+
# we go only one level deep
|
58
|
+
Card::Content.new(card.content, card, chunk_list: :nest_only).each_chunk do |chunk|
|
59
|
+
nested = chunk.referee_card
|
60
|
+
return head_tag(nested) if nested&.content&.match?(/<head>/i)
|
61
|
+
end
|
62
|
+
nil
|
63
|
+
end
|
64
|
+
end
|
@@ -0,0 +1,59 @@
|
|
1
|
+
<svg style="min-width: 75px; min-height: 55px;" viewBox="0 0 242 220" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
2
|
+
<!-- Generator: Sketch 46.2 (44496) - http://www.bohemiancoding.com/sketch -->
|
3
|
+
<title>b&w_logo</title>
|
4
|
+
<desc>Created with Sketch.</desc>
|
5
|
+
<defs>
|
6
|
+
<rect id="path-1" x="35.3297422" y="10.484836" width="157.279595" height="190.607432" rx="12.491335"></rect>
|
7
|
+
<filter x="-12.1%" y="-10.5%" width="125.4%" height="121.0%" filterUnits="objectBoundingBox" id="filter-2">
|
8
|
+
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
|
9
|
+
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
10
|
+
<feGaussianBlur stdDeviation="5.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
11
|
+
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
12
|
+
</filter>
|
13
|
+
<rect id="path-3" x="51.9878879" y="19.404077" width="123.9533" height="171.161486" rx="9.6888466"></rect>
|
14
|
+
<filter x="-15.3%" y="-11.7%" width="132.3%" height="123.4%" filterUnits="objectBoundingBox" id="filter-4">
|
15
|
+
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
|
16
|
+
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
17
|
+
<feGaussianBlur stdDeviation="5.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
18
|
+
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
19
|
+
</filter>
|
20
|
+
<path d="M70.1050368,35.6666109 L159.089911,35.6666109 L159.089911,35.6666109 C163.678051,35.6666109 167.397473,39.386033 167.397473,43.9741728 L167.397473,87.717145 L167.397473,166.808436 L167.397473,166.808436 C167.397473,171.396576 163.678051,175.115998 159.089911,175.115998 L70.1050368,175.115998 L70.1050368,175.115998 C65.516897,175.115998 61.7974749,171.396576 61.7974749,166.808436 L61.7974749,43.9741728 L61.7974749,43.9741728 C61.7974749,39.386033 65.516897,35.6666109 70.1050368,35.6666109 Z" id="path-5"></path>
|
21
|
+
<filter x="-18.0%" y="-14.3%" width="137.9%" height="128.7%" filterUnits="objectBoundingBox" id="filter-6">
|
22
|
+
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
|
23
|
+
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
24
|
+
<feGaussianBlur stdDeviation="5.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
25
|
+
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.1 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
26
|
+
</filter>
|
27
|
+
<rect id="path-7" x="70.7637805" y="49.8525134" width="92.149175" height="107.18743" rx="7.8659801"></rect>
|
28
|
+
<filter x="-20.6%" y="-18.7%" width="143.4%" height="137.3%" filterUnits="objectBoundingBox" id="filter-8">
|
29
|
+
<feMorphology radius="1" operator="dilate" in="SourceAlpha" result="shadowSpreadOuter1"></feMorphology>
|
30
|
+
<feOffset dx="1" dy="0" in="shadowSpreadOuter1" result="shadowOffsetOuter1"></feOffset>
|
31
|
+
<feGaussianBlur stdDeviation="5.5" in="shadowOffsetOuter1" result="shadowBlurOuter1"></feGaussianBlur>
|
32
|
+
<feColorMatrix values="0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.102553216 0" type="matrix" in="shadowBlurOuter1"></feColorMatrix>
|
33
|
+
</filter>
|
34
|
+
</defs>
|
35
|
+
<g id="Page-3" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
|
36
|
+
<g id="b&w_logo" fill-rule="nonzero">
|
37
|
+
<g id="Decko-Logo-" transform="translate(7.000000, 4.000000)">
|
38
|
+
<g id="g5642">
|
39
|
+
<g id="svg-card-1" transform="translate(113.969540, 105.788552) scale(-1, 1) rotate(105.855860) translate(-113.969540, -105.788552) ">
|
40
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-2)" xlink:href="#path-1"></use>
|
41
|
+
<use fill="#4D4D4D" fill-rule="evenodd" xlink:href="#path-1"></use>
|
42
|
+
</g>
|
43
|
+
<g id="svg-card-2" opacity="0.879999995" transform="translate(113.964538, 104.984820) scale(-1, 1) rotate(117.480003) translate(-113.964538, -104.984820) ">
|
44
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-4)" xlink:href="#path-3"></use>
|
45
|
+
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-3"></use>
|
46
|
+
</g>
|
47
|
+
<g id="svg-card-3" transform="translate(114.597474, 105.391304) scale(-1, 1) rotate(133.539993) translate(-114.597474, -105.391304) ">
|
48
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-6)" xlink:href="#path-5"></use>
|
49
|
+
<use fill="#4C4C4C" fill-rule="evenodd" xlink:href="#path-5"></use>
|
50
|
+
</g>
|
51
|
+
<g id="svg-card-4" opacity="0.879999995" transform="translate(116.838368, 103.446228) scale(-1, 1) rotate(142.690002) translate(-116.838368, -103.446228) ">
|
52
|
+
<use fill="black" fill-opacity="1" filter="url(#filter-8)" xlink:href="#path-7"></use>
|
53
|
+
<use fill="#FFFFFF" fill-rule="evenodd" xlink:href="#path-7"></use>
|
54
|
+
</g>
|
55
|
+
</g>
|
56
|
+
</g>
|
57
|
+
</g>
|
58
|
+
</g>
|
59
|
+
</svg>
|