publify_core 10.0.4 → 11.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/CHANGELOG.md +243 -53
- data/app/assets/javascripts/publify.js +0 -1
- data/app/assets/javascripts/publify_admin.js +10 -9
- data/app/assets/stylesheets/accounts.css.scss +0 -2
- data/app/assets/stylesheets/administration_structure.css.scss +0 -4
- data/app/assets/stylesheets/publify.css.scss +0 -1
- data/app/assets/stylesheets/publify_admin.css.scss +0 -2
- data/app/assets/stylesheets/sidebar_admin.css.scss +0 -6
- data/app/controllers/admin/articles_controller.rb +1 -1
- data/app/controllers/admin/base_controller.rb +2 -2
- data/app/controllers/admin/redirects_controller.rb +2 -2
- data/app/controllers/admin/resources_controller.rb +1 -1
- data/app/controllers/admin/seo_controller.rb +2 -2
- data/app/controllers/admin/settings_controller.rb +2 -2
- data/app/controllers/admin/tags_controller.rb +1 -1
- data/app/controllers/admin/users_controller.rb +2 -2
- data/app/controllers/articles_controller.rb +2 -5
- data/app/controllers/authors_controller.rb +0 -2
- data/app/controllers/comments_controller.rb +5 -2
- data/app/controllers/content_controller.rb +0 -4
- data/app/controllers/notes_controller.rb +1 -6
- data/app/controllers/setup_controller.rb +1 -1
- data/app/controllers/tags_controller.rb +0 -1
- data/app/controllers/users/registrations_controller.rb +1 -0
- data/app/helpers/admin/base_helper.rb +20 -13
- data/app/helpers/admin/feedback_helper.rb +4 -4
- data/app/helpers/base_helper.rb +10 -6
- data/app/helpers/xml_helper.rb +4 -0
- data/app/models/article.rb +7 -7
- data/app/models/blog.rb +3 -3
- data/app/models/comment.rb +1 -1
- data/app/models/config_manager.rb +1 -3
- data/app/models/content.rb +4 -5
- data/app/models/content_base.rb +4 -3
- data/app/models/feedback.rb +1 -1
- data/app/models/note.rb +74 -8
- data/app/models/page.rb +1 -1
- data/app/models/redirect.rb +0 -4
- data/app/models/resource.rb +1 -0
- data/app/models/sidebar.rb +6 -14
- data/app/models/tag.rb +2 -2
- data/app/models/text_filter.rb +2 -2
- data/app/models/trigger.rb +1 -1
- data/app/models/user.rb +12 -21
- data/app/uploaders/resource_uploader.rb +1 -0
- data/app/views/admin/articles/_form.html.erb +99 -105
- data/app/views/admin/articles/index.html.erb +15 -23
- data/app/views/admin/dashboard/_comment.html.erb +1 -1
- data/app/views/admin/dashboard/_comments.html.erb +4 -6
- data/app/views/admin/dashboard/_drafts.html.erb +4 -6
- data/app/views/admin/dashboard/_overview.html.erb +2 -5
- data/app/views/admin/dashboard/_welcome.html.erb +19 -19
- data/app/views/admin/dashboard/index.html.erb +3 -3
- data/app/views/admin/feedback/_button.html.erb +7 -13
- data/app/views/admin/feedback/article.html.erb +17 -17
- data/app/views/admin/feedback/edit.html.erb +17 -21
- data/app/views/admin/feedback/index.html.erb +8 -8
- data/app/views/admin/notes/_form.html.erb +5 -5
- data/app/views/admin/notes/_list.html.erb +1 -1
- data/app/views/admin/notes/_note.html.erb +1 -1
- data/app/views/admin/notes/edit.html.erb +1 -1
- data/app/views/admin/notes/index.html.erb +1 -1
- data/app/views/admin/pages/_form.html.erb +23 -27
- data/app/views/admin/post_types/_index_and_form.html.erb +5 -5
- data/app/views/admin/redirects/_index_and_form.html.erb +2 -2
- data/app/views/admin/resources/index.html.erb +20 -8
- data/app/views/admin/seo/_general.html.erb +36 -36
- data/app/views/admin/seo/_permalinks.html.erb +22 -14
- data/app/views/admin/seo/_titles.html.erb +63 -63
- data/app/views/admin/settings/display.html.erb +23 -23
- data/app/views/admin/settings/feedback.html.erb +29 -29
- data/app/views/admin/settings/index.html.erb +21 -21
- data/app/views/admin/settings/write.html.erb +18 -18
- data/app/views/admin/shared/_flash.html.erb +6 -0
- data/app/views/admin/shared/_menu.html.erb +56 -68
- data/app/views/admin/sidebar/_config.html.erb +15 -19
- data/app/views/admin/sidebar/_target.html.erb +3 -3
- data/app/views/admin/sidebar/_target_sidebar.html.erb +14 -13
- data/app/views/admin/sidebar/index.html.erb +2 -2
- data/app/views/admin/tags/_index_and_form.html.erb +3 -3
- data/app/views/admin/themes/index.html.erb +21 -19
- data/app/views/admin/users/_form.html.erb +79 -79
- data/app/views/articles/search.html.erb +1 -1
- data/app/views/layouts/accounts.html.erb +7 -9
- data/app/views/layouts/administration.html.erb +2 -2
- data/app/views/notes/show.html.erb +15 -0
- data/app/views/setup/index.html.erb +1 -1
- data/app/views/shared/_atom_item_article.atom.builder +1 -3
- data/app/views/shared/_rss_item_article.rss.builder +1 -2
- data/config/i18n-tasks.yml +0 -1
- data/config/locales/ar.yml +3 -2
- data/config/locales/da.yml +3 -2
- data/config/locales/de.yml +3 -2
- data/config/locales/en.yml +3 -2
- data/config/locales/es-MX.yml +3 -2
- data/config/locales/fr.yml +3 -2
- data/config/locales/he.yml +3 -2
- data/config/locales/it.yml +3 -2
- data/config/locales/ja.yml +3 -2
- data/config/locales/lt.yml +3 -2
- data/config/locales/nb.yml +3 -2
- data/config/locales/nl.yml +3 -2
- data/config/locales/pl.yml +3 -2
- data/config/locales/pt-BR.yml +3 -2
- data/config/locales/ro.yml +3 -2
- data/config/locales/ru.yml +3 -2
- data/config/locales/zh-CN.yml +3 -2
- data/config/locales/zh-TW.yml +3 -2
- data/config/routes.rb +0 -11
- data/db/migrate/114_fixes_buggy_articles_and_notes.rb +2 -2
- data/db/migrate/20150807134129_simplify_redirect_relations.rb +1 -1
- data/db/migrate/20160605154632_remove_profiles.rb +1 -1
- data/db/migrate/20190208152646_move_text_filter_to_name.rb +2 -2
- data/lib/format.rb +2 -2
- data/lib/publify_core/engine.rb +10 -0
- data/lib/publify_core/string_ext.rb +1 -13
- data/lib/publify_core/text_filter/markdown.rb +5 -1
- data/lib/publify_core/text_filter/markdown_smartquotes.rb +6 -1
- data/lib/publify_core/version.rb +1 -1
- data/lib/publify_core.rb +2 -2
- data/lib/text_filter_plugin.rb +20 -22
- data/lib/theme.rb +56 -37
- metadata +100 -397
- data/app/assets/javascripts/bootstrap/affix.js +0 -164
- data/app/assets/javascripts/bootstrap/alert.js +0 -95
- data/app/assets/javascripts/bootstrap/button.js +0 -125
- data/app/assets/javascripts/bootstrap/collapse.js +0 -212
- data/app/assets/javascripts/bootstrap/dropdown.js +0 -165
- data/app/assets/javascripts/bootstrap/modal.js +0 -358
- data/app/assets/javascripts/bootstrap/tab.js +0 -155
- data/app/assets/javascripts/bootstrap/transition.js +0 -59
- data/app/assets/javascripts/bootstrap-sprockets.js +0 -8
- data/app/assets/javascripts/lightbox.js +0 -350
- data/app/assets/stylesheets/_bootstrap-compass.scss +0 -9
- data/app/assets/stylesheets/_bootstrap-mincer.scss +0 -19
- data/app/assets/stylesheets/_bootstrap-sprockets.scss +0 -9
- data/app/assets/stylesheets/_bootstrap.scss +0 -42
- data/app/assets/stylesheets/bootstrap/_alerts.scss +0 -73
- data/app/assets/stylesheets/bootstrap/_button-groups.scss +0 -242
- data/app/assets/stylesheets/bootstrap/_buttons.scss +0 -168
- data/app/assets/stylesheets/bootstrap/_close.scss +0 -37
- data/app/assets/stylesheets/bootstrap/_code.scss +0 -69
- data/app/assets/stylesheets/bootstrap/_component-animations.scss +0 -38
- data/app/assets/stylesheets/bootstrap/_dropdowns.scss +0 -213
- data/app/assets/stylesheets/bootstrap/_forms.scss +0 -586
- data/app/assets/stylesheets/bootstrap/_grid.scss +0 -94
- data/app/assets/stylesheets/bootstrap/_labels.scss +0 -66
- data/app/assets/stylesheets/bootstrap/_media.scss +0 -66
- data/app/assets/stylesheets/bootstrap/_mixins.scss +0 -37
- data/app/assets/stylesheets/bootstrap/_modals.scss +0 -150
- data/app/assets/stylesheets/bootstrap/_navbar.scss +0 -479
- data/app/assets/stylesheets/bootstrap/_navs.scss +0 -242
- data/app/assets/stylesheets/bootstrap/_normalize.scss +0 -427
- data/app/assets/stylesheets/bootstrap/_pagination.scss +0 -86
- data/app/assets/stylesheets/bootstrap/_panels.scss +0 -222
- data/app/assets/stylesheets/bootstrap/_print.scss +0 -99
- data/app/assets/stylesheets/bootstrap/_scaffolding.scss +0 -160
- data/app/assets/stylesheets/bootstrap/_tables.scss +0 -234
- data/app/assets/stylesheets/bootstrap/_theme.scss +0 -224
- data/app/assets/stylesheets/bootstrap/_type.scss +0 -296
- data/app/assets/stylesheets/bootstrap/_utilities.scss +0 -55
- data/app/assets/stylesheets/bootstrap/_variables.scss +0 -638
- data/app/assets/stylesheets/bootstrap/_wells.scss +0 -29
- data/app/assets/stylesheets/bootstrap/mixins/_alerts.scss +0 -15
- data/app/assets/stylesheets/bootstrap/mixins/_background-variant.scss +0 -12
- data/app/assets/stylesheets/bootstrap/mixins/_border-radius.scss +0 -18
- data/app/assets/stylesheets/bootstrap/mixins/_buttons.scss +0 -56
- data/app/assets/stylesheets/bootstrap/mixins/_center-block.scss +0 -7
- data/app/assets/stylesheets/bootstrap/mixins/_clearfix.scss +0 -22
- data/app/assets/stylesheets/bootstrap/mixins/_forms.scss +0 -82
- data/app/assets/stylesheets/bootstrap/mixins/_gradients.scss +0 -56
- data/app/assets/stylesheets/bootstrap/mixins/_grid-framework.scss +0 -81
- data/app/assets/stylesheets/bootstrap/mixins/_grid.scss +0 -122
- data/app/assets/stylesheets/bootstrap/mixins/_hide-text.scss +0 -21
- data/app/assets/stylesheets/bootstrap/mixins/_image.scss +0 -28
- data/app/assets/stylesheets/bootstrap/mixins/_labels.scss +0 -12
- data/app/assets/stylesheets/bootstrap/mixins/_nav-divider.scss +0 -10
- data/app/assets/stylesheets/bootstrap/mixins/_nav-vertical-align.scss +0 -9
- data/app/assets/stylesheets/bootstrap/mixins/_opacity.scss +0 -7
- data/app/assets/stylesheets/bootstrap/mixins/_pagination.scss +0 -24
- data/app/assets/stylesheets/bootstrap/mixins/_panels.scss +0 -20
- data/app/assets/stylesheets/bootstrap/mixins/_reset-filter.scss +0 -8
- data/app/assets/stylesheets/bootstrap/mixins/_resize.scss +0 -6
- data/app/assets/stylesheets/bootstrap/mixins/_responsive-visibility.scss +0 -17
- data/app/assets/stylesheets/bootstrap/mixins/_size.scss +0 -10
- data/app/assets/stylesheets/bootstrap/mixins/_tab-focus.scss +0 -9
- data/app/assets/stylesheets/bootstrap/mixins/_table-row.scss +0 -28
- data/app/assets/stylesheets/bootstrap/mixins/_text-emphasis.scss +0 -12
- data/app/assets/stylesheets/bootstrap/mixins/_text-overflow.scss +0 -8
- data/app/assets/stylesheets/bootstrap/mixins/_vendor-prefixes.scss +0 -222
- data/app/assets/stylesheets/lightbox.css +0 -63
- data/app/controllers/theme_controller.rb +0 -63
- data/app/views/notes/show_in_reply.html.erb +0 -18
- data/app/views/theme/static_view_test.html.erb +0 -1
- data/lib/publify_core/text_filter/twitterfilter.rb +0 -55
- data/lib/tasks/manifest.rake +0 -30
- /data/app/views/layouts/{default.html.erb → application.html.erb} +0 -0
- /data/themes/plain/javascripts/{theme.js → plain/theme.js} +0 -0
- /data/themes/plain/stylesheets/{theme.css → plain/theme.css} +0 -0
|
@@ -1,164 +0,0 @@
|
|
|
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);
|
|
@@ -1,95 +0,0 @@
|
|
|
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);
|
|
@@ -1,125 +0,0 @@
|
|
|
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);
|
|
@@ -1,212 +0,0 @@
|
|
|
1
|
-
/* ========================================================================
|
|
2
|
-
* Bootstrap: collapse.js v3.4.1
|
|
3
|
-
* https://getbootstrap.com/docs/3.4/javascript/#collapse
|
|
4
|
-
* ========================================================================
|
|
5
|
-
* Copyright 2011-2019 Twitter, Inc.
|
|
6
|
-
* Licensed under MIT (https://github.com/twbs/bootstrap/blob/master/LICENSE)
|
|
7
|
-
* ======================================================================== */
|
|
8
|
-
|
|
9
|
-
/* jshint latedef: false */
|
|
10
|
-
|
|
11
|
-
+function ($) {
|
|
12
|
-
'use strict';
|
|
13
|
-
|
|
14
|
-
// COLLAPSE PUBLIC CLASS DEFINITION
|
|
15
|
-
// ================================
|
|
16
|
-
|
|
17
|
-
var Collapse = function (element, options) {
|
|
18
|
-
this.$element = $(element)
|
|
19
|
-
this.options = $.extend({}, Collapse.DEFAULTS, options)
|
|
20
|
-
this.$trigger = $('[data-toggle="collapse"][href="#' + element.id + '"],' +
|
|
21
|
-
'[data-toggle="collapse"][data-target="#' + element.id + '"]')
|
|
22
|
-
this.transitioning = null
|
|
23
|
-
|
|
24
|
-
if (this.options.parent) {
|
|
25
|
-
this.$parent = this.getParent()
|
|
26
|
-
} else {
|
|
27
|
-
this.addAriaAndCollapsedClass(this.$element, this.$trigger)
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
if (this.options.toggle) this.toggle()
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
Collapse.VERSION = '3.4.1'
|
|
34
|
-
|
|
35
|
-
Collapse.TRANSITION_DURATION = 350
|
|
36
|
-
|
|
37
|
-
Collapse.DEFAULTS = {
|
|
38
|
-
toggle: true
|
|
39
|
-
}
|
|
40
|
-
|
|
41
|
-
Collapse.prototype.dimension = function () {
|
|
42
|
-
var hasWidth = this.$element.hasClass('width')
|
|
43
|
-
return hasWidth ? 'width' : 'height'
|
|
44
|
-
}
|
|
45
|
-
|
|
46
|
-
Collapse.prototype.show = function () {
|
|
47
|
-
if (this.transitioning || this.$element.hasClass('in')) return
|
|
48
|
-
|
|
49
|
-
var activesData
|
|
50
|
-
var actives = this.$parent && this.$parent.children('.panel').children('.in, .collapsing')
|
|
51
|
-
|
|
52
|
-
if (actives && actives.length) {
|
|
53
|
-
activesData = actives.data('bs.collapse')
|
|
54
|
-
if (activesData && activesData.transitioning) return
|
|
55
|
-
}
|
|
56
|
-
|
|
57
|
-
var startEvent = $.Event('show.bs.collapse')
|
|
58
|
-
this.$element.trigger(startEvent)
|
|
59
|
-
if (startEvent.isDefaultPrevented()) return
|
|
60
|
-
|
|
61
|
-
if (actives && actives.length) {
|
|
62
|
-
Plugin.call(actives, 'hide')
|
|
63
|
-
activesData || actives.data('bs.collapse', null)
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
var dimension = this.dimension()
|
|
67
|
-
|
|
68
|
-
this.$element
|
|
69
|
-
.removeClass('collapse')
|
|
70
|
-
.addClass('collapsing')[dimension](0)
|
|
71
|
-
.attr('aria-expanded', true)
|
|
72
|
-
|
|
73
|
-
this.$trigger
|
|
74
|
-
.removeClass('collapsed')
|
|
75
|
-
.attr('aria-expanded', true)
|
|
76
|
-
|
|
77
|
-
this.transitioning = 1
|
|
78
|
-
|
|
79
|
-
var complete = function () {
|
|
80
|
-
this.$element
|
|
81
|
-
.removeClass('collapsing')
|
|
82
|
-
.addClass('collapse in')[dimension]('')
|
|
83
|
-
this.transitioning = 0
|
|
84
|
-
this.$element
|
|
85
|
-
.trigger('shown.bs.collapse')
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
if (!$.support.transition) return complete.call(this)
|
|
89
|
-
|
|
90
|
-
var scrollSize = $.camelCase(['scroll', dimension].join('-'))
|
|
91
|
-
|
|
92
|
-
this.$element
|
|
93
|
-
.one('bsTransitionEnd', $.proxy(complete, this))
|
|
94
|
-
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)[dimension](this.$element[0][scrollSize])
|
|
95
|
-
}
|
|
96
|
-
|
|
97
|
-
Collapse.prototype.hide = function () {
|
|
98
|
-
if (this.transitioning || !this.$element.hasClass('in')) return
|
|
99
|
-
|
|
100
|
-
var startEvent = $.Event('hide.bs.collapse')
|
|
101
|
-
this.$element.trigger(startEvent)
|
|
102
|
-
if (startEvent.isDefaultPrevented()) return
|
|
103
|
-
|
|
104
|
-
var dimension = this.dimension()
|
|
105
|
-
|
|
106
|
-
this.$element[dimension](this.$element[dimension]())[0].offsetHeight
|
|
107
|
-
|
|
108
|
-
this.$element
|
|
109
|
-
.addClass('collapsing')
|
|
110
|
-
.removeClass('collapse in')
|
|
111
|
-
.attr('aria-expanded', false)
|
|
112
|
-
|
|
113
|
-
this.$trigger
|
|
114
|
-
.addClass('collapsed')
|
|
115
|
-
.attr('aria-expanded', false)
|
|
116
|
-
|
|
117
|
-
this.transitioning = 1
|
|
118
|
-
|
|
119
|
-
var complete = function () {
|
|
120
|
-
this.transitioning = 0
|
|
121
|
-
this.$element
|
|
122
|
-
.removeClass('collapsing')
|
|
123
|
-
.addClass('collapse')
|
|
124
|
-
.trigger('hidden.bs.collapse')
|
|
125
|
-
}
|
|
126
|
-
|
|
127
|
-
if (!$.support.transition) return complete.call(this)
|
|
128
|
-
|
|
129
|
-
this.$element
|
|
130
|
-
[dimension](0)
|
|
131
|
-
.one('bsTransitionEnd', $.proxy(complete, this))
|
|
132
|
-
.emulateTransitionEnd(Collapse.TRANSITION_DURATION)
|
|
133
|
-
}
|
|
134
|
-
|
|
135
|
-
Collapse.prototype.toggle = function () {
|
|
136
|
-
this[this.$element.hasClass('in') ? 'hide' : 'show']()
|
|
137
|
-
}
|
|
138
|
-
|
|
139
|
-
Collapse.prototype.getParent = function () {
|
|
140
|
-
return $(document).find(this.options.parent)
|
|
141
|
-
.find('[data-toggle="collapse"][data-parent="' + this.options.parent + '"]')
|
|
142
|
-
.each($.proxy(function (i, element) {
|
|
143
|
-
var $element = $(element)
|
|
144
|
-
this.addAriaAndCollapsedClass(getTargetFromTrigger($element), $element)
|
|
145
|
-
}, this))
|
|
146
|
-
.end()
|
|
147
|
-
}
|
|
148
|
-
|
|
149
|
-
Collapse.prototype.addAriaAndCollapsedClass = function ($element, $trigger) {
|
|
150
|
-
var isOpen = $element.hasClass('in')
|
|
151
|
-
|
|
152
|
-
$element.attr('aria-expanded', isOpen)
|
|
153
|
-
$trigger
|
|
154
|
-
.toggleClass('collapsed', !isOpen)
|
|
155
|
-
.attr('aria-expanded', isOpen)
|
|
156
|
-
}
|
|
157
|
-
|
|
158
|
-
function getTargetFromTrigger($trigger) {
|
|
159
|
-
var href
|
|
160
|
-
var target = $trigger.attr('data-target')
|
|
161
|
-
|| (href = $trigger.attr('href')) && href.replace(/.*(?=#[^\s]+$)/, '') // strip for ie7
|
|
162
|
-
|
|
163
|
-
return $(document).find(target)
|
|
164
|
-
}
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
// COLLAPSE PLUGIN DEFINITION
|
|
168
|
-
// ==========================
|
|
169
|
-
|
|
170
|
-
function Plugin(option) {
|
|
171
|
-
return this.each(function () {
|
|
172
|
-
var $this = $(this)
|
|
173
|
-
var data = $this.data('bs.collapse')
|
|
174
|
-
var options = $.extend({}, Collapse.DEFAULTS, $this.data(), typeof option == 'object' && option)
|
|
175
|
-
|
|
176
|
-
if (!data && options.toggle && /show|hide/.test(option)) options.toggle = false
|
|
177
|
-
if (!data) $this.data('bs.collapse', (data = new Collapse(this, options)))
|
|
178
|
-
if (typeof option == 'string') data[option]()
|
|
179
|
-
})
|
|
180
|
-
}
|
|
181
|
-
|
|
182
|
-
var old = $.fn.collapse
|
|
183
|
-
|
|
184
|
-
$.fn.collapse = Plugin
|
|
185
|
-
$.fn.collapse.Constructor = Collapse
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
// COLLAPSE NO CONFLICT
|
|
189
|
-
// ====================
|
|
190
|
-
|
|
191
|
-
$.fn.collapse.noConflict = function () {
|
|
192
|
-
$.fn.collapse = old
|
|
193
|
-
return this
|
|
194
|
-
}
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
// COLLAPSE DATA-API
|
|
198
|
-
// =================
|
|
199
|
-
|
|
200
|
-
$(document).on('click.bs.collapse.data-api', '[data-toggle="collapse"]', function (e) {
|
|
201
|
-
var $this = $(this)
|
|
202
|
-
|
|
203
|
-
if (!$this.attr('data-target')) e.preventDefault()
|
|
204
|
-
|
|
205
|
-
var $target = getTargetFromTrigger($this)
|
|
206
|
-
var data = $target.data('bs.collapse')
|
|
207
|
-
var option = data ? 'toggle' : $this.data()
|
|
208
|
-
|
|
209
|
-
Plugin.call($target, option)
|
|
210
|
-
})
|
|
211
|
-
|
|
212
|
-
}(jQuery);
|