publify_core 9.0.0 → 9.2.2
Sign up to get free protection for your applications and to get access to all the features.
Potentially problematic release.
This version of publify_core might be problematic. Click here for more details.
- checksums.yaml +5 -5
- data/CHANGELOG.md +92 -37
- data/app/assets/javascripts/bootstrap-sprockets.js +8 -0
- data/app/assets/javascripts/bootstrap/affix.js +164 -0
- data/app/assets/javascripts/bootstrap/alert.js +95 -0
- data/app/assets/javascripts/bootstrap/button.js +125 -0
- data/app/assets/javascripts/bootstrap/collapse.js +212 -0
- data/app/assets/javascripts/bootstrap/dropdown.js +165 -0
- data/app/assets/javascripts/bootstrap/modal.js +358 -0
- data/app/assets/javascripts/bootstrap/tab.js +155 -0
- data/app/assets/javascripts/bootstrap/transition.js +59 -0
- data/app/assets/javascripts/lightbox.js +4 -4
- data/app/assets/javascripts/publify_admin.js +1 -35
- data/app/assets/stylesheets/_bootstrap-compass.scss +9 -0
- data/app/assets/stylesheets/_bootstrap-mincer.scss +19 -0
- data/app/assets/stylesheets/_bootstrap-sprockets.scss +9 -0
- data/app/assets/stylesheets/_bootstrap.scss +42 -0
- data/app/assets/stylesheets/administration_structure.css.scss +1 -45
- data/app/assets/stylesheets/bootstrap/_alerts.scss +73 -0
- data/app/assets/stylesheets/bootstrap/_button-groups.scss +242 -0
- data/app/assets/stylesheets/bootstrap/_buttons.scss +168 -0
- data/app/assets/stylesheets/bootstrap/_close.scss +37 -0
- data/app/assets/stylesheets/bootstrap/_code.scss +69 -0
- data/app/assets/stylesheets/bootstrap/_component-animations.scss +38 -0
- data/app/assets/stylesheets/bootstrap/_dropdowns.scss +213 -0
- data/app/assets/stylesheets/bootstrap/_forms.scss +586 -0
- data/app/assets/stylesheets/bootstrap/_grid.scss +94 -0
- data/app/assets/stylesheets/bootstrap/_labels.scss +66 -0
- data/app/assets/stylesheets/bootstrap/_media.scss +66 -0
- data/app/assets/stylesheets/bootstrap/_mixins.scss +37 -0
- data/app/assets/stylesheets/bootstrap/_modals.scss +150 -0
- data/app/assets/stylesheets/bootstrap/_navbar.scss +479 -0
- data/app/assets/stylesheets/bootstrap/_navs.scss +242 -0
- data/app/assets/stylesheets/bootstrap/_normalize.scss +427 -0
- data/app/assets/stylesheets/bootstrap/_pagination.scss +86 -0
- data/app/assets/stylesheets/bootstrap/_panels.scss +222 -0
- data/app/assets/stylesheets/bootstrap/_print.scss +99 -0
- data/app/assets/stylesheets/bootstrap/_scaffolding.scss +160 -0
- data/app/assets/stylesheets/bootstrap/_tables.scss +234 -0
- data/app/assets/stylesheets/bootstrap/_theme.scss +224 -0
- data/app/assets/stylesheets/bootstrap/_type.scss +296 -0
- data/app/assets/stylesheets/bootstrap/_utilities.scss +55 -0
- data/app/assets/stylesheets/bootstrap/_variables.scss +638 -0
- data/app/assets/stylesheets/bootstrap/_wells.scss +29 -0
- data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +15 -0
- data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +12 -0
- data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +18 -0
- data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +56 -0
- data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +7 -0
- data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +22 -0
- data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +82 -0
- data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +56 -0
- data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +81 -0
- data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +122 -0
- data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +21 -0
- data/app/assets/stylesheets/bootstrap/mixins/_image.scss +28 -0
- data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +12 -0
- data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +10 -0
- data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +9 -0
- data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +7 -0
- data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +24 -0
- data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +20 -0
- data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +8 -0
- data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +6 -0
- data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +17 -0
- data/app/assets/stylesheets/bootstrap/mixins/_size.scss +10 -0
- data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +9 -0
- data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +28 -0
- data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +12 -0
- data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +8 -0
- data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +222 -0
- data/app/assets/stylesheets/lightbox.css +3 -3
- data/app/assets/stylesheets/publify_admin.css.scss +0 -1
- data/app/controllers/accounts_controller.rb +2 -0
- data/app/controllers/admin/base_controller.rb +8 -16
- data/app/controllers/admin/content_controller.rb +38 -36
- data/app/controllers/admin/dashboard_controller.rb +16 -65
- data/app/controllers/admin/feedback_controller.rb +45 -37
- data/app/controllers/admin/notes_controller.rb +16 -10
- data/app/controllers/admin/pages_controller.rb +19 -29
- data/app/controllers/admin/post_types_controller.rb +7 -5
- data/app/controllers/admin/profiles_controller.rb +15 -5
- data/app/controllers/admin/redirects_controller.rb +9 -5
- data/app/controllers/admin/resources_controller.rb +7 -4
- data/app/controllers/admin/seo_controller.rb +12 -10
- data/app/controllers/admin/settings_controller.rb +7 -5
- data/app/controllers/admin/sidebar_controller.rb +6 -5
- data/app/controllers/admin/tags_controller.rb +6 -3
- data/app/controllers/admin/themes_controller.rb +10 -7
- data/app/controllers/admin/users_controller.rb +10 -7
- data/app/controllers/articles_controller.rb +49 -33
- data/app/controllers/authors_controller.rb +6 -3
- data/app/controllers/base_controller.rb +9 -11
- data/app/controllers/comments_controller.rb +13 -13
- data/app/controllers/content_controller.rb +4 -2
- data/app/controllers/feedback_controller.rb +4 -2
- data/app/controllers/notes_controller.rb +5 -3
- data/app/controllers/setup_controller.rb +15 -12
- data/app/controllers/tags_controller.rb +6 -4
- data/app/controllers/text_controller.rb +2 -4
- data/app/controllers/textfilter_controller.rb +2 -0
- data/app/controllers/theme_controller.rb +18 -13
- data/app/controllers/xml_controller.rb +2 -0
- data/app/helpers/admin/base_helper.rb +28 -29
- data/app/helpers/admin/feedback_helper.rb +34 -24
- data/app/helpers/articles_helper.rb +4 -2
- data/app/helpers/authors_helper.rb +7 -16
- data/app/helpers/base_helper.rb +56 -52
- data/app/helpers/blog_helper.rb +4 -2
- data/app/helpers/xml_helper.rb +3 -1
- data/app/jobs/application_job.rb +2 -0
- data/app/mailers/notification_mailer.rb +5 -3
- data/app/models/ability.rb +25 -23
- data/app/models/archives_sidebar.rb +14 -11
- data/app/models/article.rb +42 -42
- data/app/models/article/factory.rb +14 -6
- data/app/models/blog.rb +86 -75
- data/app/models/comment.rb +10 -11
- data/app/models/config_manager.rb +4 -2
- data/app/models/content.rb +37 -50
- data/app/models/content_base.rb +10 -4
- data/app/models/feedback.rb +21 -17
- data/app/models/meta_sidebar.rb +4 -3
- data/app/models/note.rb +26 -25
- data/app/models/page.rb +9 -8
- data/app/models/page_sidebar.rb +4 -2
- data/app/models/ping.rb +3 -1
- data/app/models/post_type.rb +3 -3
- data/app/models/redirect.rb +13 -7
- data/app/models/redirection.rb +3 -1
- data/app/models/resource.rb +5 -3
- data/app/models/search_sidebar.rb +4 -2
- data/app/models/sidebar.rb +11 -6
- data/app/models/static_sidebar.rb +14 -13
- data/app/models/tag.rb +15 -11
- data/app/models/tag_sidebar.rb +6 -3
- data/app/models/text_filter.rb +85 -11
- data/app/models/trackback.rb +7 -11
- data/app/models/trigger.rb +7 -4
- data/app/models/user.rb +44 -43
- data/app/services/title_builder.rb +52 -45
- data/app/uploaders/resource_uploader.rb +5 -3
- data/app/views/accounts/confirm.html.erb +3 -3
- data/app/views/admin/content/_article_list.html.erb +23 -8
- data/app/views/admin/content/_form.html.erb +71 -47
- data/app/views/admin/content/autosave.js.erb +2 -2
- data/app/views/admin/content/edit.html.erb +1 -1
- data/app/views/admin/content/index.html.erb +25 -15
- data/app/views/admin/content/new.html.erb +2 -2
- data/app/views/admin/dashboard/_comment.html.erb +5 -5
- data/app/views/admin/dashboard/_comments.html.erb +2 -2
- data/app/views/admin/dashboard/_drafts.html.erb +5 -5
- data/app/views/admin/dashboard/_overview.html.erb +7 -9
- data/app/views/admin/dashboard/_welcome.html.erb +11 -11
- data/app/views/admin/dashboard/index.html.erb +12 -7
- data/app/views/admin/feedback/_button.html.erb +6 -6
- data/app/views/admin/feedback/_feedback.html.erb +3 -3
- data/app/views/admin/feedback/_ham.html.erb +27 -9
- data/app/views/admin/feedback/_spam.html.erb +26 -16
- data/app/views/admin/feedback/article.html.erb +20 -21
- data/app/views/admin/feedback/edit.html.erb +14 -15
- data/app/views/admin/feedback/{ham.js → ham.js.erb} +0 -0
- data/app/views/admin/feedback/index.html.erb +25 -23
- data/app/views/admin/feedback/{spam.js → spam.js.erb} +0 -0
- data/app/views/admin/migrations/show.html.erb +10 -11
- data/app/views/admin/notes/_form.html.erb +13 -13
- data/app/views/admin/notes/_list.html.erb +19 -8
- data/app/views/admin/notes/_note.html.erb +12 -7
- data/app/views/admin/notes/edit.html.erb +6 -1
- data/app/views/admin/notes/index.html.erb +5 -1
- data/app/views/admin/notes/show.html.erb +2 -2
- data/app/views/admin/pages/_form.html.erb +86 -77
- data/app/views/admin/pages/_pages.html.erb +11 -4
- data/app/views/admin/pages/edit.html.erb +3 -1
- data/app/views/admin/pages/index.html.erb +10 -6
- data/app/views/admin/pages/new.html.erb +3 -1
- data/app/views/admin/post_types/_index_and_form.html.erb +15 -16
- data/app/views/admin/post_types/edit.html.erb +1 -1
- data/app/views/admin/post_types/index.html.erb +1 -1
- data/app/views/admin/profiles/index.html.erb +2 -3
- data/app/views/admin/redirects/_index_and_form.html.erb +10 -11
- data/app/views/admin/redirects/edit.html.erb +1 -1
- data/app/views/admin/redirects/index.html.erb +1 -1
- data/app/views/admin/resources/index.html.erb +19 -16
- data/app/views/admin/seo/_general.html.erb +23 -47
- data/app/views/admin/seo/_permalinks.html.erb +16 -16
- data/app/views/admin/seo/_titles.html.erb +63 -64
- data/app/views/admin/seo/show.html.erb +14 -19
- data/app/views/admin/settings/display.html.erb +22 -25
- data/app/views/admin/settings/feedback.html.erb +31 -32
- data/app/views/admin/settings/index.html.erb +23 -24
- data/app/views/admin/settings/write.html.erb +21 -22
- data/app/views/admin/shared/_edit.html.erb +3 -3
- data/app/views/admin/shared/_menu.html.erb +26 -26
- data/app/views/admin/shared/_twitter_alert.html.erb +1 -1
- data/app/views/admin/sidebar/_config.html.erb +5 -5
- data/app/views/admin/sidebar/_target_sidebar.html.erb +4 -4
- data/app/views/admin/sidebar/index.html.erb +7 -7
- data/app/views/admin/tags/_index_and_form.html.erb +11 -12
- data/app/views/admin/tags/edit.html.erb +1 -1
- data/app/views/admin/tags/index.html.erb +1 -1
- data/app/views/admin/themes/index.html.erb +5 -6
- data/app/views/admin/users/_form.html.erb +34 -34
- data/app/views/admin/users/edit.html.erb +2 -2
- data/app/views/admin/users/index.html.erb +10 -12
- data/app/views/admin/users/new.html.erb +2 -2
- data/app/views/archives_sidebar/_content.html.erb +2 -2
- data/app/views/articles/_archives_article.html.erb +3 -3
- data/app/views/articles/_article.html.erb +7 -9
- data/app/views/articles/_article_author.html.erb +4 -0
- data/app/views/articles/_article_content.html.erb +2 -2
- data/app/views/articles/_article_excerpt.html.erb +2 -2
- data/app/views/articles/_article_links.html.erb +1 -1
- data/app/views/articles/_comment_errors.html.erb +1 -1
- data/app/views/articles/_comment_form.html.erb +12 -12
- data/app/views/articles/_comment_preview.html.erb +3 -3
- data/app/views/articles/_password_form.html.erb +4 -4
- data/app/views/articles/_trackback.html.erb +2 -2
- data/app/views/articles/archives.html.erb +1 -1
- data/app/views/articles/feedback_atom_feed.atom.builder +3 -1
- data/app/views/articles/feedback_rss_feed.rss.builder +9 -8
- data/app/views/articles/index_atom_feed.atom.builder +5 -3
- data/app/views/articles/index_rss_feed.rss.builder +10 -9
- data/app/views/articles/live_search.html.erb +3 -3
- data/app/views/articles/read.html.erb +16 -8
- data/app/views/articles/search.html.erb +2 -2
- data/app/views/articles/trackback.xml.builder +3 -1
- data/app/views/articles/view_page.html.erb +2 -2
- data/app/views/authors/show.html.erb +9 -9
- data/app/views/authors/show_atom_feed.atom.builder +4 -2
- data/app/views/authors/show_rss_feed.rss.builder +10 -9
- data/app/views/comments/_comment.html.erb +3 -3
- data/app/views/devise/mailer/reset_password_instructions.html.erb +7 -9
- data/app/views/devise/passwords/edit.html.erb +4 -4
- data/app/views/devise/passwords/new.html.erb +1 -1
- data/app/views/devise/registrations/new.html.erb +5 -5
- data/app/views/devise/sessions/new.html.erb +3 -3
- data/app/views/errors/404.html.erb +2 -2
- data/app/views/feedback/index.atom.builder +3 -1
- data/app/views/feedback/index.rss.builder +9 -8
- data/app/views/layouts/accounts.html.erb +26 -26
- data/app/views/layouts/administration.html.erb +31 -31
- data/app/views/layouts/default.html.erb +4 -3
- data/app/views/layouts/editor.html.erb +5 -19
- data/app/views/meta_sidebar/_content.html.erb +2 -2
- data/app/views/notes/_note.html.erb +1 -1
- data/app/views/notes/index.html.erb +1 -1
- data/app/views/notes/show_in_reply.html.erb +1 -1
- data/app/views/notification_mailer/_mail_footer.html.erb +3 -3
- data/app/views/notification_mailer/article.html.erb +2 -2
- data/app/views/notification_mailer/comment.html.erb +5 -5
- data/app/views/notification_mailer/notif_user.html.erb +1 -1
- data/app/views/page_sidebar/_content.html.erb +1 -1
- data/app/views/search_sidebar/_content.html.erb +2 -2
- data/app/views/settings/install.html.erb +2 -2
- data/app/views/setup/index.html.erb +7 -7
- data/app/views/shared/_atom_header.atom.builder +4 -4
- data/app/views/shared/_atom_item_article.atom.builder +19 -29
- data/app/views/shared/_atom_item_comment.atom.builder +4 -2
- data/app/views/shared/_atom_item_trackback.atom.builder +4 -2
- data/app/views/shared/_google_analytics.html.erb +8 -0
- data/app/views/shared/_page_header.html.erb +9 -12
- data/app/views/shared/_rss_item_article.rss.builder +9 -7
- data/app/views/shared/_rss_item_comment.rss.builder +3 -1
- data/app/views/shared/_rss_item_trackback.rss.builder +3 -1
- data/app/views/sidebar/display_plugins.html.erb +1 -1
- data/app/views/tag_sidebar/_content.html.erb +1 -1
- data/app/views/tags/index.html.erb +1 -1
- data/app/views/xml/_googlesitemap_item_article.googlesitemap.builder +2 -0
- data/app/views/xml/_googlesitemap_item_category.googlesitemap.builder +2 -0
- data/app/views/xml/_googlesitemap_item_page.googlesitemap.builder +2 -0
- data/app/views/xml/_googlesitemap_item_tag.googlesitemap.builder +2 -0
- data/app/views/xml/sitemap.googlesitemap.builder +4 -2
- data/config/i18n-tasks.yml +0 -5
- data/config/initializers/devise.rb +10 -4
- data/config/initializers/mime_types.rb +3 -1
- data/config/locales/da.yml +134 -73
- data/config/locales/de.yml +142 -77
- data/config/locales/en.yml +128 -68
- data/config/locales/es-MX.yml +135 -71
- data/config/locales/fr.yml +167 -88
- data/config/locales/he.yml +128 -72
- data/config/locales/it.yml +136 -74
- data/config/locales/ja.yml +110 -66
- data/config/locales/lt.yml +153 -76
- data/config/locales/nb-NO.yml +123 -67
- data/config/locales/nl.yml +140 -77
- data/config/locales/pl.yml +329 -240
- data/config/locales/pt-BR.yml +137 -72
- data/config/locales/ro.yml +148 -72
- data/config/locales/ru.yml +161 -71
- data/config/locales/zh-CN.yml +106 -61
- data/config/locales/zh-TW.yml +109 -63
- data/config/routes.rb +68 -63
- data/db/migrate/113_initial_schema.rb +191 -191
- data/db/migrate/114_fixes_buggy_articles_and_notes.rb +10 -7
- data/db/migrate/115_drops_categories_for_tags.rb +5 -4
- data/db/migrate/20150207131657_add_missing_indexes.rb +2 -0
- data/db/migrate/20150807134129_simplify_redirect_relations.rb +5 -0
- data/db/migrate/20150808052637_add_blog_ids.rb +9 -3
- data/db/migrate/20150808191127_add_blog_id_to_redirects.rb +2 -0
- data/db/migrate/20150810094754_add_blog_id_to_tags.rb +2 -0
- data/db/migrate/20160108111120_add_devise_to_users.rb +4 -2
- data/db/migrate/20160108184201_move_last_connection_to_last_sign_in_at.rb +2 -0
- data/db/migrate/20160110094906_remove_profiles_rights.rb +2 -0
- data/db/migrate/20160605103918_replace_profile_id_with_string.rb +2 -0
- data/db/migrate/20160605154632_remove_profiles.rb +10 -5
- data/db/migrate/20160701061851_demand_blog_id_on_contents.rb +2 -0
- data/db/migrate/20160701062604_add_blog_id_to_resources.rb +2 -0
- data/db/migrate/20170528093024_move_resources_to_content.rb +2 -0
- data/db/migrate/20170528094923_move_tags_to_content.rb +2 -0
- data/db/migrate/20170528201606_remove_separate_published_flag.rb +2 -0
- data/db/migrate/20170605071626_remove_extra_state_columns_from_feedback.rb +2 -0
- data/db/migrate/20170702105201_remove_published_at_from_feedback.rb +2 -0
- data/db/migrate/20190208151235_add_text_filter_name_fields.rb +9 -0
- data/db/migrate/20190208152646_move_text_filter_to_name.rb +97 -0
- data/db/migrate/20190209155717_remove_text_filter_ids.rb +19 -0
- data/db/migrate/20190209160610_remove_text_filters.rb +17 -0
- data/db/migrate/20200413140440_add_unique_indexes.rb +10 -0
- data/db/seeds.rb +8 -20
- data/lib/email_notify.rb +3 -1
- data/lib/format.rb +4 -12
- data/lib/publify_core.rb +36 -35
- data/lib/publify_core/engine.rb +11 -4
- data/lib/publify_core/lang.rb +5 -1
- data/lib/publify_core/testing_support/dns_mock.rb +15 -0
- data/lib/publify_core/testing_support/factories.rb +240 -0
- data/lib/publify_core/testing_support/feed_assertions.rb +48 -0
- data/lib/publify_core/testing_support/fixtures/exploit.svg +4 -0
- data/lib/publify_core/testing_support/fixtures/fakepng.png +1 -0
- data/lib/publify_core/testing_support/fixtures/otherfile.txt +1 -0
- data/lib/publify_core/testing_support/fixtures/testfile.png +0 -0
- data/lib/publify_core/testing_support/fixtures/testfile.txt +1 -0
- data/lib/publify_core/testing_support/upload_fixtures.rb +15 -0
- data/lib/publify_core/version.rb +3 -1
- data/lib/publify_guid.rb +3 -1
- data/lib/publify_plugins.rb +10 -5
- data/lib/publify_textfilter_markdown.rb +38 -25
- data/lib/publify_textfilter_none.rb +5 -3
- data/lib/publify_textfilter_smartypants.rb +5 -3
- data/lib/publify_textfilter_textile.rb +7 -4
- data/lib/publify_textfilter_twitterfilter.rb +13 -7
- data/lib/publify_time.rb +4 -0
- data/lib/sidebar_field.rb +15 -13
- data/lib/sidebar_registry.rb +5 -3
- data/lib/spam_protection.rb +19 -17
- data/lib/tasks/i18n.rake +9 -0
- data/lib/tasks/manifest.rake +30 -0
- data/lib/tasks/publify_core_tasks.rake +2 -0
- data/lib/text_filter_plugin.rb +30 -29
- data/lib/theme.rb +5 -5
- data/lib/transforms.rb +21 -20
- data/themes/plain/javascripts/theme.js +0 -0
- metadata +247 -109
- data/app/assets/javascripts/widearea.js +0 -486
- data/app/assets/stylesheets/widearea.css +0 -133
- data/app/controllers/admin/textfilters_controller.rb +0 -6
- data/app/views/admin/dashboard/_inbound.html.erb +0 -31
- data/app/views/admin/notes/_header.html.erb +0 -6
- data/app/views/articles/_protected_article_content.html.erb +0 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: c465b9f4aaebc33c4fb9013a7675c042ca1b5530ce8ed9d4af6752b2d2a255f9
|
4
|
+
data.tar.gz: 0d287bc8ca255ae3edb386c56840b9f637966dccca49746107601d5a9d2e30d6
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 83ff43281107a53da8187321e70d54752cd7a046e4f5ff79fa7018999de3a30de873a312e44e9ea95101459a88ffff738fdc4c729cc27900173293d8d63a3c7f
|
7
|
+
data.tar.gz: 6d3a518995ebc38c82450458b35950d5a5e02047606892aa84083ca4b01120313c3fc31db64fab9192f12aa68f34ff6de542f520bd47d2fdc51f4fcab8c61c85
|
data/CHANGELOG.md
CHANGED
@@ -1,70 +1,125 @@
|
|
1
1
|
# Changelog
|
2
2
|
|
3
|
+
## 9.2.2 / 2021-03-21
|
4
|
+
|
5
|
+
* No changes
|
6
|
+
|
7
|
+
## 9.2.1 / 2021-03-20
|
8
|
+
|
9
|
+
* No changes
|
10
|
+
|
11
|
+
## 9.2.0 / 2021-01-17
|
12
|
+
|
13
|
+
* Upgrade to Rails 5.2 (mvz)
|
14
|
+
* Fix logic for rendering excerpts or whole posts (mvz)
|
15
|
+
* Drop support for Ruby 2.2 and 2.3 (mvz)
|
16
|
+
* Provide FactoryBot factories for general use (mvz)
|
17
|
+
* Fix comment preview (mvz)
|
18
|
+
* Drop support for humans.txt (mvz)
|
19
|
+
* Remove unused ability to view macro help text (mvz)
|
20
|
+
* Simplify the article editor: remove widearea and button fade-out (mvz)
|
21
|
+
* Remove unused `title_prefix` setting (mvz)
|
22
|
+
* Remove text filter definitions from the database. Text filters are now
|
23
|
+
specified in code only (mvz)
|
24
|
+
* Remove broken inbound links feature from Admin dashboard (mvz)
|
25
|
+
* Always include a canonical URL in the header and remove `use_canonical_url`
|
26
|
+
option (mvz)
|
27
|
+
* Update various dependencies (mvz)
|
28
|
+
* Use new way to render Devise error messages in view override (mvz)
|
29
|
+
* Fix broken page creation (cfis)
|
30
|
+
* Improve calculation of canonical URL (mvz)
|
31
|
+
* Replace use of deprecated URI.escape and URI.encode (mvz)
|
32
|
+
* Add support for Ruby 2.7 (mvz)
|
33
|
+
* Deprecate Textile text filter (mvz)
|
34
|
+
* Remove icons from Admin and replace them with text (mvz)
|
35
|
+
* Show text filter in content lists in Admin, plus various other Admin
|
36
|
+
improvements (mvz)
|
37
|
+
* Warn about need to run task to convert textile to markdown (mvz)
|
38
|
+
* Update mimimum dependencies of Rails and Puma to avoid security issues (mvz)
|
39
|
+
|
40
|
+
## 9.1.0 / 2018-04-19
|
41
|
+
|
42
|
+
* Upgrade to Rails 5.1 (mvz)
|
43
|
+
* Update Danish translations (xy2z)
|
44
|
+
* Extend Polish translations (gergu)
|
45
|
+
* Remove outdated import tools (mvz)
|
46
|
+
* Fix a bunch of issues (e-tobi)
|
47
|
+
* Fix google analytics tag rendering (mvz)
|
48
|
+
|
49
|
+
## 9.0.1
|
50
|
+
|
51
|
+
* Remove `link_to_author` setting: author email is no longer shown. Whoever
|
52
|
+
really wants to have it shown should create a new theme (mvz)
|
53
|
+
* Update dependencies (mvz)
|
54
|
+
* Make Devise use the correct layout (mvz)
|
55
|
+
* Ensure email parameter is processed correctly on sign up (mvz)
|
56
|
+
* Correctly serve js files from themes (cantin)
|
57
|
+
|
3
58
|
## 9.0.0
|
4
59
|
|
5
|
-
* Replace page caching with fragment caching
|
6
|
-
* Replace home-grown state machine with aasm
|
7
|
-
* Remove automigration. Users should run db:migrate themselves
|
8
|
-
* Let first-run users pick their own password instead of generating one
|
60
|
+
* Replace page caching with fragment caching (mvz)
|
61
|
+
* Replace home-grown state machine with aasm (mvz)
|
62
|
+
* Remove automigration. Users should run db:migrate themselves (mvz)
|
63
|
+
* Let first-run users pick their own password instead of generating one (mvz)
|
9
64
|
|
10
65
|
* Dependencies
|
11
|
-
- Update dependencies
|
12
|
-
- Drop support for Ruby 2.1
|
66
|
+
- Update dependencies (mvz)
|
67
|
+
- Drop support for Ruby 2.1 (mvz)
|
13
68
|
|
14
69
|
* Removing of old/outdated functionality
|
15
|
-
- Remove support for feedburner
|
16
|
-
- Drop old redirects
|
17
|
-
- Remove RSD end point
|
70
|
+
- Remove support for feedburner (mvz)
|
71
|
+
- Drop old redirects (mvz)
|
72
|
+
- Remove RSD end point (mvz)
|
18
73
|
|
19
74
|
* Feedback
|
20
|
-
- Stop sending trackbacks and pingbacks
|
21
|
-
- Stop accepting trackbacks
|
75
|
+
- Stop sending trackbacks and pingbacks (mvz)
|
76
|
+
- Stop accepting trackbacks (mvz)
|
22
77
|
|
23
78
|
* Improve Atom/RSS feeds
|
24
|
-
- Fix URLs used for resources
|
25
|
-
- Fix URL/alternate links to not just point to the site root
|
26
|
-
- Unify comment and trackback feeds into feedback feed
|
27
|
-
- Add caching for feeds
|
28
|
-
- Fix atom entry publication date
|
29
|
-
- Fix ordering of feedback feed by using created_at
|
79
|
+
- Fix URLs used for resources (mvz)
|
80
|
+
- Fix URL/alternate links to not just point to the site root (mvz)
|
81
|
+
- Unify comment and trackback feeds into feedback feed (mvz)
|
82
|
+
- Add caching for feeds (mvz)
|
83
|
+
- Fix atom entry publication date (mvz)
|
84
|
+
- Fix ordering of feedback feed by using created_at (mvz)
|
30
85
|
|
31
86
|
* Bug fixes
|
32
|
-
- Fix user resource image display when using Fog
|
33
|
-
- Fix sending of welcome email
|
34
|
-
- Fix Tag page description
|
35
|
-
- Handle setting published_at to blank
|
36
|
-
- Handle preview of articles without publication date
|
37
|
-
- Include CSRF meta tag so remote forms work
|
38
|
-
- Fix sidebar field rendering in admin
|
39
|
-
- Fix formatting of settings forms in admin
|
87
|
+
- Fix user resource image display when using Fog (mvz)
|
88
|
+
- Fix sending of welcome email (mvz)
|
89
|
+
- Fix Tag page description (mvz)
|
90
|
+
- Handle setting published_at to blank (mvz)
|
91
|
+
- Handle preview of articles without publication date (mvz)
|
92
|
+
- Include CSRF meta tag so remote forms work (mvz)
|
93
|
+
- Fix sidebar field rendering in admin (mvz)
|
94
|
+
- Fix formatting of settings forms in admin (mvz)
|
40
95
|
|
41
96
|
* Code improvements
|
42
|
-
- Performance improvements
|
43
|
-
- Improve tags controller
|
44
|
-
- Clean up archives and authors page code
|
45
|
-
- Unify content models more to improve performance when mixing models
|
97
|
+
- Performance improvements (mvz)
|
98
|
+
- Improve tags controller (mvz)
|
99
|
+
- Clean up archives and authors page code (mvz)
|
100
|
+
- Unify content models more to improve performance when mixing models (mvz)
|
46
101
|
|
47
102
|
## 9.0.0.pre6 / 2016-12-23
|
48
103
|
|
49
|
-
* Remove now-broken caching of theme assets
|
50
|
-
* Remove cache invalidation support code from content
|
104
|
+
* Remove now-broken caching of theme assets (mvz)
|
105
|
+
* Remove cache invalidation support code from content (mvz)
|
51
106
|
|
52
107
|
## 9.0.0.pre5 / 2016-12-17
|
53
108
|
|
54
|
-
* Update dependencies
|
109
|
+
* Update dependencies (mvz)
|
55
110
|
* Remove activerecord-session_store. The main application should decide on the
|
56
|
-
store to use
|
57
|
-
* Remove unused translations
|
111
|
+
store to use (mvz)
|
112
|
+
* Remove unused translations (mvz)
|
58
113
|
|
59
114
|
## 9.0.0.pre4
|
60
115
|
|
61
|
-
* Ensure theme files are part of the gem
|
116
|
+
* Ensure theme files are part of the gem (mvz)
|
62
117
|
|
63
118
|
## 9.0.0.pre3
|
64
119
|
|
65
|
-
* Update to Rails 5.0
|
120
|
+
* Update to Rails 5.0 (mvz)
|
66
121
|
* Remove page caching since the released version of actionpack-page_caching is
|
67
|
-
incompatible with Rails 5
|
122
|
+
incompatible with Rails 5 (mvz)
|
68
123
|
|
69
124
|
## 9.0.0.pre2
|
70
125
|
|
@@ -0,0 +1,164 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: affix.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#affix
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// AFFIX CLASS DEFINITION
|
14
|
+
// ======================
|
15
|
+
|
16
|
+
var Affix = function (element, options) {
|
17
|
+
this.options = $.extend({}, Affix.DEFAULTS, options)
|
18
|
+
|
19
|
+
var target = this.options.target === Affix.DEFAULTS.target ? $(this.options.target) : $(document).find(this.options.target)
|
20
|
+
|
21
|
+
this.$target = target
|
22
|
+
.on('scroll.bs.affix.data-api', $.proxy(this.checkPosition, this))
|
23
|
+
.on('click.bs.affix.data-api', $.proxy(this.checkPositionWithEventLoop, this))
|
24
|
+
|
25
|
+
this.$element = $(element)
|
26
|
+
this.affixed = null
|
27
|
+
this.unpin = null
|
28
|
+
this.pinnedOffset = null
|
29
|
+
|
30
|
+
this.checkPosition()
|
31
|
+
}
|
32
|
+
|
33
|
+
Affix.VERSION = '3.4.1'
|
34
|
+
|
35
|
+
Affix.RESET = 'affix affix-top affix-bottom'
|
36
|
+
|
37
|
+
Affix.DEFAULTS = {
|
38
|
+
offset: 0,
|
39
|
+
target: window
|
40
|
+
}
|
41
|
+
|
42
|
+
Affix.prototype.getState = function (scrollHeight, height, offsetTop, offsetBottom) {
|
43
|
+
var scrollTop = this.$target.scrollTop()
|
44
|
+
var position = this.$element.offset()
|
45
|
+
var targetHeight = this.$target.height()
|
46
|
+
|
47
|
+
if (offsetTop != null && this.affixed == 'top') return scrollTop < offsetTop ? 'top' : false
|
48
|
+
|
49
|
+
if (this.affixed == 'bottom') {
|
50
|
+
if (offsetTop != null) return (scrollTop + this.unpin <= position.top) ? false : 'bottom'
|
51
|
+
return (scrollTop + targetHeight <= scrollHeight - offsetBottom) ? false : 'bottom'
|
52
|
+
}
|
53
|
+
|
54
|
+
var initializing = this.affixed == null
|
55
|
+
var colliderTop = initializing ? scrollTop : position.top
|
56
|
+
var colliderHeight = initializing ? targetHeight : height
|
57
|
+
|
58
|
+
if (offsetTop != null && scrollTop <= offsetTop) return 'top'
|
59
|
+
if (offsetBottom != null && (colliderTop + colliderHeight >= scrollHeight - offsetBottom)) return 'bottom'
|
60
|
+
|
61
|
+
return false
|
62
|
+
}
|
63
|
+
|
64
|
+
Affix.prototype.getPinnedOffset = function () {
|
65
|
+
if (this.pinnedOffset) return this.pinnedOffset
|
66
|
+
this.$element.removeClass(Affix.RESET).addClass('affix')
|
67
|
+
var scrollTop = this.$target.scrollTop()
|
68
|
+
var position = this.$element.offset()
|
69
|
+
return (this.pinnedOffset = position.top - scrollTop)
|
70
|
+
}
|
71
|
+
|
72
|
+
Affix.prototype.checkPositionWithEventLoop = function () {
|
73
|
+
setTimeout($.proxy(this.checkPosition, this), 1)
|
74
|
+
}
|
75
|
+
|
76
|
+
Affix.prototype.checkPosition = function () {
|
77
|
+
if (!this.$element.is(':visible')) return
|
78
|
+
|
79
|
+
var height = this.$element.height()
|
80
|
+
var offset = this.options.offset
|
81
|
+
var offsetTop = offset.top
|
82
|
+
var offsetBottom = offset.bottom
|
83
|
+
var scrollHeight = Math.max($(document).height(), $(document.body).height())
|
84
|
+
|
85
|
+
if (typeof offset != 'object') offsetBottom = offsetTop = offset
|
86
|
+
if (typeof offsetTop == 'function') offsetTop = offset.top(this.$element)
|
87
|
+
if (typeof offsetBottom == 'function') offsetBottom = offset.bottom(this.$element)
|
88
|
+
|
89
|
+
var affix = this.getState(scrollHeight, height, offsetTop, offsetBottom)
|
90
|
+
|
91
|
+
if (this.affixed != affix) {
|
92
|
+
if (this.unpin != null) this.$element.css('top', '')
|
93
|
+
|
94
|
+
var affixType = 'affix' + (affix ? '-' + affix : '')
|
95
|
+
var e = $.Event(affixType + '.bs.affix')
|
96
|
+
|
97
|
+
this.$element.trigger(e)
|
98
|
+
|
99
|
+
if (e.isDefaultPrevented()) return
|
100
|
+
|
101
|
+
this.affixed = affix
|
102
|
+
this.unpin = affix == 'bottom' ? this.getPinnedOffset() : null
|
103
|
+
|
104
|
+
this.$element
|
105
|
+
.removeClass(Affix.RESET)
|
106
|
+
.addClass(affixType)
|
107
|
+
.trigger(affixType.replace('affix', 'affixed') + '.bs.affix')
|
108
|
+
}
|
109
|
+
|
110
|
+
if (affix == 'bottom') {
|
111
|
+
this.$element.offset({
|
112
|
+
top: scrollHeight - height - offsetBottom
|
113
|
+
})
|
114
|
+
}
|
115
|
+
}
|
116
|
+
|
117
|
+
|
118
|
+
// AFFIX PLUGIN DEFINITION
|
119
|
+
// =======================
|
120
|
+
|
121
|
+
function Plugin(option) {
|
122
|
+
return this.each(function () {
|
123
|
+
var $this = $(this)
|
124
|
+
var data = $this.data('bs.affix')
|
125
|
+
var options = typeof option == 'object' && option
|
126
|
+
|
127
|
+
if (!data) $this.data('bs.affix', (data = new Affix(this, options)))
|
128
|
+
if (typeof option == 'string') data[option]()
|
129
|
+
})
|
130
|
+
}
|
131
|
+
|
132
|
+
var old = $.fn.affix
|
133
|
+
|
134
|
+
$.fn.affix = Plugin
|
135
|
+
$.fn.affix.Constructor = Affix
|
136
|
+
|
137
|
+
|
138
|
+
// AFFIX NO CONFLICT
|
139
|
+
// =================
|
140
|
+
|
141
|
+
$.fn.affix.noConflict = function () {
|
142
|
+
$.fn.affix = old
|
143
|
+
return this
|
144
|
+
}
|
145
|
+
|
146
|
+
|
147
|
+
// AFFIX DATA-API
|
148
|
+
// ==============
|
149
|
+
|
150
|
+
$(window).on('load', function () {
|
151
|
+
$('[data-spy="affix"]').each(function () {
|
152
|
+
var $spy = $(this)
|
153
|
+
var data = $spy.data()
|
154
|
+
|
155
|
+
data.offset = data.offset || {}
|
156
|
+
|
157
|
+
if (data.offsetBottom != null) data.offset.bottom = data.offsetBottom
|
158
|
+
if (data.offsetTop != null) data.offset.top = data.offsetTop
|
159
|
+
|
160
|
+
Plugin.call($spy, data)
|
161
|
+
})
|
162
|
+
})
|
163
|
+
|
164
|
+
}(jQuery);
|
@@ -0,0 +1,95 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: alert.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#alerts
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// ALERT CLASS DEFINITION
|
14
|
+
// ======================
|
15
|
+
|
16
|
+
var dismiss = '[data-dismiss="alert"]'
|
17
|
+
var Alert = function (el) {
|
18
|
+
$(el).on('click', dismiss, this.close)
|
19
|
+
}
|
20
|
+
|
21
|
+
Alert.VERSION = '3.4.1'
|
22
|
+
|
23
|
+
Alert.TRANSITION_DURATION = 150
|
24
|
+
|
25
|
+
Alert.prototype.close = function (e) {
|
26
|
+
var $this = $(this)
|
27
|
+
var selector = $this.attr('data-target')
|
28
|
+
|
29
|
+
if (!selector) {
|
30
|
+
selector = $this.attr('href')
|
31
|
+
selector = selector && selector.replace(/.*(?=#[^\s]*$)/, '') // strip for ie7
|
32
|
+
}
|
33
|
+
|
34
|
+
selector = selector === '#' ? [] : selector
|
35
|
+
var $parent = $(document).find(selector)
|
36
|
+
|
37
|
+
if (e) e.preventDefault()
|
38
|
+
|
39
|
+
if (!$parent.length) {
|
40
|
+
$parent = $this.closest('.alert')
|
41
|
+
}
|
42
|
+
|
43
|
+
$parent.trigger(e = $.Event('close.bs.alert'))
|
44
|
+
|
45
|
+
if (e.isDefaultPrevented()) return
|
46
|
+
|
47
|
+
$parent.removeClass('in')
|
48
|
+
|
49
|
+
function removeElement() {
|
50
|
+
// detach from parent, fire event then clean up data
|
51
|
+
$parent.detach().trigger('closed.bs.alert').remove()
|
52
|
+
}
|
53
|
+
|
54
|
+
$.support.transition && $parent.hasClass('fade') ?
|
55
|
+
$parent
|
56
|
+
.one('bsTransitionEnd', removeElement)
|
57
|
+
.emulateTransitionEnd(Alert.TRANSITION_DURATION) :
|
58
|
+
removeElement()
|
59
|
+
}
|
60
|
+
|
61
|
+
|
62
|
+
// ALERT PLUGIN DEFINITION
|
63
|
+
// =======================
|
64
|
+
|
65
|
+
function Plugin(option) {
|
66
|
+
return this.each(function () {
|
67
|
+
var $this = $(this)
|
68
|
+
var data = $this.data('bs.alert')
|
69
|
+
|
70
|
+
if (!data) $this.data('bs.alert', (data = new Alert(this)))
|
71
|
+
if (typeof option == 'string') data[option].call($this)
|
72
|
+
})
|
73
|
+
}
|
74
|
+
|
75
|
+
var old = $.fn.alert
|
76
|
+
|
77
|
+
$.fn.alert = Plugin
|
78
|
+
$.fn.alert.Constructor = Alert
|
79
|
+
|
80
|
+
|
81
|
+
// ALERT NO CONFLICT
|
82
|
+
// =================
|
83
|
+
|
84
|
+
$.fn.alert.noConflict = function () {
|
85
|
+
$.fn.alert = old
|
86
|
+
return this
|
87
|
+
}
|
88
|
+
|
89
|
+
|
90
|
+
// ALERT DATA-API
|
91
|
+
// ==============
|
92
|
+
|
93
|
+
$(document).on('click.bs.alert.data-api', dismiss, Alert.prototype.close)
|
94
|
+
|
95
|
+
}(jQuery);
|
@@ -0,0 +1,125 @@
|
|
1
|
+
/* ========================================================================
|
2
|
+
* Bootstrap: button.js v3.4.1
|
3
|
+
* https://getbootstrap.com/docs/3.4/javascript/#buttons
|
4
|
+
* ========================================================================
|
5
|
+
* Copyright 2011-2019 Twitter, Inc.
|
6
|
+
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
7
|
+
* ======================================================================== */
|
8
|
+
|
9
|
+
|
10
|
+
+function ($) {
|
11
|
+
'use strict';
|
12
|
+
|
13
|
+
// BUTTON PUBLIC CLASS DEFINITION
|
14
|
+
// ==============================
|
15
|
+
|
16
|
+
var Button = function (element, options) {
|
17
|
+
this.$element = $(element)
|
18
|
+
this.options = $.extend({}, Button.DEFAULTS, options)
|
19
|
+
this.isLoading = false
|
20
|
+
}
|
21
|
+
|
22
|
+
Button.VERSION = '3.4.1'
|
23
|
+
|
24
|
+
Button.DEFAULTS = {
|
25
|
+
loadingText: 'loading...'
|
26
|
+
}
|
27
|
+
|
28
|
+
Button.prototype.setState = function (state) {
|
29
|
+
var d = 'disabled'
|
30
|
+
var $el = this.$element
|
31
|
+
var val = $el.is('input') ? 'val' : 'html'
|
32
|
+
var data = $el.data()
|
33
|
+
|
34
|
+
state += 'Text'
|
35
|
+
|
36
|
+
if (data.resetText == null) $el.data('resetText', $el[val]())
|
37
|
+
|
38
|
+
// push to event loop to allow forms to submit
|
39
|
+
setTimeout($.proxy(function () {
|
40
|
+
$el[val](data[state] == null ? this.options[state] : data[state])
|
41
|
+
|
42
|
+
if (state == 'loadingText') {
|
43
|
+
this.isLoading = true
|
44
|
+
$el.addClass(d).attr(d, d).prop(d, true)
|
45
|
+
} else if (this.isLoading) {
|
46
|
+
this.isLoading = false
|
47
|
+
$el.removeClass(d).removeAttr(d).prop(d, false)
|
48
|
+
}
|
49
|
+
}, this), 0)
|
50
|
+
}
|
51
|
+
|
52
|
+
Button.prototype.toggle = function () {
|
53
|
+
var changed = true
|
54
|
+
var $parent = this.$element.closest('[data-toggle="buttons"]')
|
55
|
+
|
56
|
+
if ($parent.length) {
|
57
|
+
var $input = this.$element.find('input')
|
58
|
+
if ($input.prop('type') == 'radio') {
|
59
|
+
if ($input.prop('checked')) changed = false
|
60
|
+
$parent.find('.active').removeClass('active')
|
61
|
+
this.$element.addClass('active')
|
62
|
+
} else if ($input.prop('type') == 'checkbox') {
|
63
|
+
if (($input.prop('checked')) !== this.$element.hasClass('active')) changed = false
|
64
|
+
this.$element.toggleClass('active')
|
65
|
+
}
|
66
|
+
$input.prop('checked', this.$element.hasClass('active'))
|
67
|
+
if (changed) $input.trigger('change')
|
68
|
+
} else {
|
69
|
+
this.$element.attr('aria-pressed', !this.$element.hasClass('active'))
|
70
|
+
this.$element.toggleClass('active')
|
71
|
+
}
|
72
|
+
}
|
73
|
+
|
74
|
+
|
75
|
+
// BUTTON PLUGIN DEFINITION
|
76
|
+
// ========================
|
77
|
+
|
78
|
+
function Plugin(option) {
|
79
|
+
return this.each(function () {
|
80
|
+
var $this = $(this)
|
81
|
+
var data = $this.data('bs.button')
|
82
|
+
var options = typeof option == 'object' && option
|
83
|
+
|
84
|
+
if (!data) $this.data('bs.button', (data = new Button(this, options)))
|
85
|
+
|
86
|
+
if (option == 'toggle') data.toggle()
|
87
|
+
else if (option) data.setState(option)
|
88
|
+
})
|
89
|
+
}
|
90
|
+
|
91
|
+
var old = $.fn.button
|
92
|
+
|
93
|
+
$.fn.button = Plugin
|
94
|
+
$.fn.button.Constructor = Button
|
95
|
+
|
96
|
+
|
97
|
+
// BUTTON NO CONFLICT
|
98
|
+
// ==================
|
99
|
+
|
100
|
+
$.fn.button.noConflict = function () {
|
101
|
+
$.fn.button = old
|
102
|
+
return this
|
103
|
+
}
|
104
|
+
|
105
|
+
|
106
|
+
// BUTTON DATA-API
|
107
|
+
// ===============
|
108
|
+
|
109
|
+
$(document)
|
110
|
+
.on('click.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
111
|
+
var $btn = $(e.target).closest('.btn')
|
112
|
+
Plugin.call($btn, 'toggle')
|
113
|
+
if (!($(e.target).is('input[type="radio"], input[type="checkbox"]'))) {
|
114
|
+
// Prevent double click on radios, and the double selections (so cancellation) on checkboxes
|
115
|
+
e.preventDefault()
|
116
|
+
// The target component still receive the focus
|
117
|
+
if ($btn.is('input,button')) $btn.trigger('focus')
|
118
|
+
else $btn.find('input:visible,button:visible').first().trigger('focus')
|
119
|
+
}
|
120
|
+
})
|
121
|
+
.on('focus.bs.button.data-api blur.bs.button.data-api', '[data-toggle^="button"]', function (e) {
|
122
|
+
$(e.target).closest('.btn').toggleClass('focus', /^focus(in)?$/.test(e.type))
|
123
|
+
})
|
124
|
+
|
125
|
+
}(jQuery);
|