activeadmin 2.14.0 → 3.3.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 +143 -0
- data/CONTRIBUTING.md +0 -7
- data/README.md +2 -2
- data/app/assets/stylesheets/active_admin/_forms.scss +1 -2
- data/app/assets/stylesheets/active_admin/components/_comments.scss +1 -1
- data/app/assets/stylesheets/active_admin/components/_dropdown_menu.scss +7 -4
- data/app/assets/stylesheets/active_admin/components/_pagination.scss +5 -2
- data/app/assets/stylesheets/active_admin/components/_table_tools.scss +9 -6
- data/app/assets/stylesheets/active_admin/components/_tabs.scss +10 -7
- data/app/assets/stylesheets/active_admin/mixins/_buttons.scss +2 -2
- data/app/assets/stylesheets/active_admin/pages/_logged_out.scss +1 -1
- data/app/assets/stylesheets/active_admin/structure/_footer.scss +1 -1
- data/app/assets/stylesheets/active_admin/structure/_title_bar.scss +6 -3
- data/config/locales/ar.yml +0 -7
- data/config/locales/az.yml +0 -7
- data/config/locales/bg.yml +0 -7
- data/config/locales/bs.yml +0 -7
- data/config/locales/ca.yml +0 -7
- data/config/locales/cs.yml +0 -7
- data/config/locales/da.yml +0 -7
- data/config/locales/de-CH.yml +0 -7
- data/config/locales/de.yml +0 -8
- data/config/locales/el.yml +0 -7
- data/config/locales/en-CA.yml +0 -7
- data/config/locales/en-GB.yml +0 -7
- data/config/locales/en.yml +0 -8
- data/config/locales/eo.yml +0 -8
- data/config/locales/es-MX.yml +0 -7
- data/config/locales/es.yml +0 -8
- data/config/locales/fa.yml +0 -7
- data/config/locales/fi.yml +0 -7
- data/config/locales/fr.yml +0 -8
- data/config/locales/he.yml +0 -9
- data/config/locales/hr.yml +0 -7
- data/config/locales/hu.yml +0 -8
- data/config/locales/id.yml +0 -7
- data/config/locales/it.yml +0 -8
- data/config/locales/ja.yml +0 -8
- data/config/locales/ko.yml +0 -7
- data/config/locales/lt.yml +0 -8
- data/config/locales/lv.yml +0 -7
- data/config/locales/mk.yml +0 -8
- data/config/locales/nb.yml +0 -8
- data/config/locales/nl.yml +0 -8
- data/config/locales/pl.yml +0 -8
- data/config/locales/pt-BR.yml +0 -8
- data/config/locales/pt-PT.yml +0 -7
- data/config/locales/ro.yml +0 -7
- data/config/locales/ru.yml +0 -6
- data/config/locales/sk.yml +0 -8
- data/config/locales/sv-SE.yml +58 -39
- data/config/locales/tr.yml +0 -11
- data/config/locales/uk.yml +0 -6
- data/config/locales/vi.yml +0 -8
- data/config/locales/zh-CN.yml +0 -8
- data/config/locales/zh-TW.yml +0 -7
- data/lib/active_admin/csv_builder.rb +23 -2
- data/lib/active_admin/engine.rb +4 -0
- data/lib/active_admin/filters/active_filter.rb +1 -1
- data/lib/active_admin/filters/forms.rb +2 -2
- data/lib/active_admin/filters/formtastic_addons.rb +1 -1
- data/lib/active_admin/form_builder.rb +5 -6
- data/lib/active_admin/inputs/filters/base/search_method_select.rb +2 -2
- data/lib/active_admin/inputs/filters/date_range_input.rb +2 -2
- data/lib/active_admin/inputs/filters/numeric_input.rb +1 -1
- data/lib/active_admin/inputs/filters/select_input.rb +3 -3
- data/lib/active_admin/inputs/filters/string_input.rb +1 -1
- data/lib/active_admin/menu.rb +1 -0
- data/lib/active_admin/namespace.rb +1 -1
- data/lib/active_admin/namespace_settings.rb +1 -1
- data/lib/active_admin/orm/active_record/comments/comment.rb +8 -0
- data/lib/active_admin/pundit_adapter.rb +2 -2
- data/lib/active_admin/resource/attributes.rb +8 -1
- data/lib/active_admin/resource/belongs_to.rb +0 -1
- data/lib/active_admin/resource_controller/decorators.rb +1 -1
- data/lib/active_admin/resource_controller/streaming.rb +1 -1
- data/lib/active_admin/version.rb +1 -1
- data/lib/active_admin/view_helpers/display_helper.rb +10 -3
- data/lib/active_admin/views/components/active_admin_form.rb +14 -6
- data/lib/active_admin/views/components/paginated_collection.rb +4 -1
- data/lib/active_admin/views/index_as_table.rb +7 -6
- data/lib/active_admin/views/pages/show.rb +1 -7
- data/lib/active_admin.rb +4 -2
- data/lib/generators/active_admin/install/templates/active_admin.rb.erb +2 -2
- data/vendor/assets/javascripts/jquery-ui/data.js +12 -8
- data/vendor/assets/javascripts/jquery-ui/disable-selection.js +10 -7
- data/vendor/assets/javascripts/jquery-ui/focusable.js +12 -9
- data/vendor/assets/javascripts/jquery-ui/form-reset-mixin.js +60 -57
- data/vendor/assets/javascripts/jquery-ui/form.js +15 -12
- data/vendor/assets/javascripts/jquery-ui/ie.js +5 -2
- data/vendor/assets/javascripts/jquery-ui/keycode.js +11 -7
- data/vendor/assets/javascripts/jquery-ui/labels.js +46 -40
- data/vendor/assets/javascripts/jquery-ui/plugin.js +5 -2
- data/vendor/assets/javascripts/jquery-ui/position.js +30 -17
- data/vendor/assets/javascripts/jquery-ui/safe-active-element.js +6 -2
- data/vendor/assets/javascripts/jquery-ui/safe-blur.js +6 -2
- data/vendor/assets/javascripts/jquery-ui/scroll-parent.js +10 -7
- data/vendor/assets/javascripts/jquery-ui/tabbable.js +11 -8
- data/vendor/assets/javascripts/jquery-ui/unique-id.js +10 -7
- data/vendor/assets/javascripts/jquery-ui/version.js +6 -3
- data/vendor/assets/javascripts/jquery-ui/widget.js +53 -30
- data/vendor/assets/javascripts/jquery-ui/widgets/button.js +87 -24
- data/vendor/assets/javascripts/jquery-ui/widgets/checkboxradio.js +276 -273
- data/vendor/assets/javascripts/jquery-ui/widgets/controlgroup.js +15 -11
- data/vendor/assets/javascripts/jquery-ui/widgets/datepicker.js +182 -62
- data/vendor/assets/javascripts/jquery-ui/widgets/dialog.js +53 -36
- data/vendor/assets/javascripts/jquery-ui/widgets/draggable.js +28 -19
- data/vendor/assets/javascripts/jquery-ui/widgets/mouse.js +22 -11
- data/vendor/assets/javascripts/jquery-ui/widgets/resizable.js +47 -26
- data/vendor/assets/javascripts/jquery-ui/widgets/sortable.js +186 -125
- data/vendor/assets/javascripts/jquery-ui/widgets/tabs.js +20 -20
- metadata +30 -36
- data/lib/active_admin/deprecation.rb +0 -11
- data/lib/ransack_ext.rb +0 -21
- data/vendor/assets/javascripts/jquery-ui/escape-selector.js +0 -23
data/lib/active_admin/engine.rb
CHANGED
@@ -21,5 +21,9 @@ module ActiveAdmin
|
|
21
21
|
initializer "active_admin.routes" do
|
22
22
|
require "active_admin/helpers/routes/url_helpers"
|
23
23
|
end
|
24
|
+
|
25
|
+
initializer "active_admin.deprecator" do |app|
|
26
|
+
app.deprecators[:activeadmin] = ActiveAdmin.deprecator if app.respond_to?(:deprecators)
|
27
|
+
end
|
24
28
|
end
|
25
29
|
end
|
@@ -21,7 +21,7 @@ module ActiveAdmin
|
|
21
21
|
# Returns the default filter type for a given attribute. If you want
|
22
22
|
# to use a custom search method, you have to specify the type yourself.
|
23
23
|
def default_input_type(method, options = {})
|
24
|
-
if method =~ /_(eq|
|
24
|
+
if method =~ /_(eq|cont|start|end)\z/
|
25
25
|
:string
|
26
26
|
elsif klass._ransackers.key?(method.to_s)
|
27
27
|
klass._ransackers[method.to_s].type
|
@@ -31,7 +31,7 @@ module ActiveAdmin
|
|
31
31
|
case column.type
|
32
32
|
when :date, :datetime
|
33
33
|
:date_range
|
34
|
-
when :string, :text
|
34
|
+
when :string, :text, :citext
|
35
35
|
:string
|
36
36
|
when :integer, :float, :decimal
|
37
37
|
:numeric
|
@@ -47,7 +47,7 @@ module ActiveAdmin
|
|
47
47
|
#
|
48
48
|
|
49
49
|
def searchable_has_many_through?
|
50
|
-
if reflection && reflection.options[:through]
|
50
|
+
if klass.ransackable_associations.include?(method.to_s) && reflection && reflection.options[:through]
|
51
51
|
reflection.through_reflection.klass.ransackable_attributes.include? reflection.foreign_key
|
52
52
|
else
|
53
53
|
false
|
@@ -95,7 +95,7 @@ module ActiveAdmin
|
|
95
95
|
contents = without_wrapper { inputs(options, &form_block) }
|
96
96
|
contents ||= "".html_safe
|
97
97
|
|
98
|
-
js = new_record ? js_for_has_many(
|
98
|
+
js = new_record ? js_for_has_many(&form_block) : ""
|
99
99
|
contents << js
|
100
100
|
end
|
101
101
|
|
@@ -159,14 +159,13 @@ module ActiveAdmin
|
|
159
159
|
end
|
160
160
|
|
161
161
|
# Capture the ADD JS
|
162
|
-
def js_for_has_many(
|
162
|
+
def js_for_has_many(&form_block)
|
163
163
|
assoc_name = assoc_klass.model_name
|
164
|
-
placeholder = "NEW_#{assoc_name.to_s.underscore.upcase.
|
165
|
-
opts =
|
164
|
+
placeholder = "NEW_#{assoc_name.to_s.underscore.upcase.tr('/', '_')}_RECORD"
|
165
|
+
opts = options.merge(
|
166
166
|
for: [assoc, assoc_klass.new],
|
167
|
-
class: class_string,
|
168
167
|
for_options: { child_index: placeholder }
|
169
|
-
|
168
|
+
)
|
170
169
|
html = template.capture { __getobj__.send(:inputs_for_nested_attributes, opts, &form_block) }
|
171
170
|
text = new_record.is_a?(String) ? new_record : I18n.t("active_admin.has_many_new", model: assoc_name.human)
|
172
171
|
|
@@ -9,7 +9,7 @@
|
|
9
9
|
# include Base
|
10
10
|
# include Base::SearchMethodSelect
|
11
11
|
#
|
12
|
-
# filter :
|
12
|
+
# filter :eq, :gt, :lt
|
13
13
|
# end
|
14
14
|
#
|
15
15
|
module ActiveAdmin
|
@@ -65,7 +65,7 @@ module ActiveAdmin
|
|
65
65
|
|
66
66
|
def filter_options
|
67
67
|
filters.collect do |filter|
|
68
|
-
[I18n.t("
|
68
|
+
[I18n.t("ransack.predicates.#{filter}").capitalize, "#{method}_#{filter}"]
|
69
69
|
end
|
70
70
|
end
|
71
71
|
|
@@ -15,12 +15,12 @@ module ActiveAdmin
|
|
15
15
|
end
|
16
16
|
|
17
17
|
def gt_input_name
|
18
|
-
|
18
|
+
"#{method}_gteq"
|
19
19
|
end
|
20
20
|
alias :input_name :gt_input_name
|
21
21
|
|
22
22
|
def lt_input_name
|
23
|
-
|
23
|
+
"#{method}_lteq"
|
24
24
|
end
|
25
25
|
|
26
26
|
def input_html_options
|
@@ -15,9 +15,7 @@ module ActiveAdmin
|
|
15
15
|
if searchable_has_many_through?
|
16
16
|
"#{reflection.through_reflection.name}_#{reflection.foreign_key}"
|
17
17
|
else
|
18
|
-
|
19
|
-
name.concat "_#{reflection.association_primary_key}" if reflection_searchable?
|
20
|
-
name
|
18
|
+
reflection_searchable? ? "#{method}_#{reflection.association_primary_key}" : method.to_s
|
21
19
|
end
|
22
20
|
end
|
23
21
|
|
@@ -43,6 +41,8 @@ module ActiveAdmin
|
|
43
41
|
else
|
44
42
|
super
|
45
43
|
end
|
44
|
+
rescue ActiveRecord::QueryCanceled => error
|
45
|
+
raise ActiveRecord::QueryCanceled.new "#{error.message.strip} while querying the values for the ActiveAdmin :#{method} filter"
|
46
46
|
end
|
47
47
|
|
48
48
|
def pluck_column
|
@@ -6,7 +6,7 @@ module ActiveAdmin
|
|
6
6
|
include Base
|
7
7
|
include Base::SearchMethodSelect
|
8
8
|
|
9
|
-
filter :
|
9
|
+
filter :cont, :eq, :start, :end
|
10
10
|
|
11
11
|
# If the filter method includes a search condition, build a normal string search field.
|
12
12
|
# Else, build a search field with a companion dropdown to choose a search condition from.
|
data/lib/active_admin/menu.rb
CHANGED
@@ -48,6 +48,7 @@ module ActiveAdmin
|
|
48
48
|
# menu.add parent: 'Dashboard', label: 'My Child Dashboard'
|
49
49
|
#
|
50
50
|
def add(options)
|
51
|
+
options = options.dup # Make sure parameter is not modified
|
51
52
|
parent_chain = Array.wrap(options.delete(:parent))
|
52
53
|
|
53
54
|
item = if parent = parent_chain.shift
|
@@ -28,7 +28,7 @@ module ActiveAdmin
|
|
28
28
|
class Namespace
|
29
29
|
class << self
|
30
30
|
def setting(name, default)
|
31
|
-
|
31
|
+
ActiveAdmin.deprecator.warn "This method does not do anything and will be removed."
|
32
32
|
end
|
33
33
|
end
|
34
34
|
|
@@ -119,7 +119,7 @@ module ActiveAdmin
|
|
119
119
|
:title,
|
120
120
|
:email,
|
121
121
|
]
|
122
|
-
register :filter_method_for_large_association, "
|
122
|
+
register :filter_method_for_large_association, "_start"
|
123
123
|
|
124
124
|
# Switch between asset pipeline and webpacker assets
|
125
125
|
register :use_webpacker, false
|
@@ -28,5 +28,13 @@ module ActiveAdmin
|
|
28
28
|
self.resource_type = self.class.resource_type(resource)
|
29
29
|
end
|
30
30
|
|
31
|
+
def self.ransackable_attributes(auth_object = nil)
|
32
|
+
authorizable_ransackable_attributes
|
33
|
+
end
|
34
|
+
|
35
|
+
def self.ransackable_associations(auth_object = nil)
|
36
|
+
authorizable_ransackable_associations
|
37
|
+
end
|
38
|
+
|
31
39
|
end
|
32
40
|
end
|
@@ -42,7 +42,7 @@ module ActiveAdmin
|
|
42
42
|
end
|
43
43
|
|
44
44
|
def format_action(action, subject)
|
45
|
-
# https://github.com/varvet/pundit/blob/
|
45
|
+
# https://github.com/varvet/pundit/blob/main/lib/generators/pundit/install/templates/application_policy.rb
|
46
46
|
case action
|
47
47
|
when Auth::READ then subject.is_a?(Class) ? :index? : :show?
|
48
48
|
when Auth::DESTROY then subject.is_a?(Class) ? :destroy_all? : :destroy?
|
@@ -77,7 +77,7 @@ module ActiveAdmin
|
|
77
77
|
|
78
78
|
policy_name = policy.class.to_s
|
79
79
|
|
80
|
-
|
80
|
+
ActiveAdmin.deprecator.warn "You have `pundit_policy_namespace` configured as `#{default_policy_namespace}`, " \
|
81
81
|
"but ActiveAdmin was unable to find policy #{default_policy_module}::#{policy_name}. " \
|
82
82
|
"#{policy_name} will be used instead. " \
|
83
83
|
"This behavior will be removed in future versions of ActiveAdmin. " \
|
@@ -37,7 +37,14 @@ module ActiveAdmin
|
|
37
37
|
end
|
38
38
|
|
39
39
|
def counter_cache_col?(c)
|
40
|
-
|
40
|
+
# This helper is called inside a loop. Let's memoize the result.
|
41
|
+
@counter_cache_columns ||= begin
|
42
|
+
resource_class.reflect_on_all_associations(:has_many)
|
43
|
+
.select(&:has_cached_counter?)
|
44
|
+
.map(&:counter_cache_column)
|
45
|
+
end
|
46
|
+
|
47
|
+
@counter_cache_columns.include?(c.name)
|
41
48
|
end
|
42
49
|
|
43
50
|
def filtered_col?(c)
|
@@ -61,7 +61,7 @@ module ActiveAdmin
|
|
61
61
|
def self.wrap!(parent, name)
|
62
62
|
::Class.new parent do
|
63
63
|
delegate :reorder, :page, :current_page, :total_pages, :limit_value,
|
64
|
-
:total_count, :
|
64
|
+
:total_count, :offset, :to_key, :group_values,
|
65
65
|
:except, :find_each, :ransack, to: :object
|
66
66
|
|
67
67
|
define_singleton_method(:name) { name }
|
@@ -31,7 +31,7 @@ module ActiveAdmin
|
|
31
31
|
end
|
32
32
|
|
33
33
|
def csv_filename
|
34
|
-
"#{resource_collection_name.to_s.gsub('_', '-')}-#{Time.zone.now.to_date.
|
34
|
+
"#{resource_collection_name.to_s.gsub('_', '-')}-#{Time.zone.now.to_date.to_s}.csv"
|
35
35
|
end
|
36
36
|
|
37
37
|
def stream_csv
|
data/lib/active_admin/version.rb
CHANGED
@@ -24,7 +24,14 @@ module ActiveAdmin
|
|
24
24
|
# Attempts to call any known display name methods on the resource.
|
25
25
|
# See the setting in `application.rb` for the list of methods and their priority.
|
26
26
|
def display_name(resource)
|
27
|
-
|
27
|
+
unless resource.nil?
|
28
|
+
result = render_in_context(resource, display_name_method_for(resource))
|
29
|
+
if result.to_s&.strip&.present?
|
30
|
+
ERB::Util.html_escape(result)
|
31
|
+
else
|
32
|
+
ERB::Util.html_escape(render_in_context(resource, DISPLAY_NAME_FALLBACK))
|
33
|
+
end
|
34
|
+
end
|
28
35
|
end
|
29
36
|
|
30
37
|
# Looks up and caches the first available display name method.
|
@@ -101,8 +108,8 @@ module ActiveAdmin
|
|
101
108
|
when TrueClass, FalseClass
|
102
109
|
true
|
103
110
|
else
|
104
|
-
if resource.class.respond_to? :
|
105
|
-
|
111
|
+
if resource.class.respond_to? :attribute_types
|
112
|
+
resource.class.attribute_types[attr.to_s].is_a?(ActiveModel::Type::Boolean)
|
106
113
|
end
|
107
114
|
end
|
108
115
|
end
|
@@ -102,10 +102,6 @@ module ActiveAdmin
|
|
102
102
|
form_builder.object
|
103
103
|
end
|
104
104
|
|
105
|
-
def form_buffers
|
106
|
-
raise "'form_buffers' has been removed from ActiveAdmin::FormBuilder, please read https://github.com/activeadmin/activeadmin/blob/master/docs/5-forms.md for details."
|
107
|
-
end
|
108
|
-
|
109
105
|
private
|
110
106
|
|
111
107
|
def create_another_checkbox
|
@@ -131,12 +127,24 @@ module ActiveAdmin
|
|
131
127
|
html_options[:class] ||= "inputs"
|
132
128
|
legend = args.shift if args.first.is_a?(::String)
|
133
129
|
legend = html_options.delete(:name) if html_options.key?(:name)
|
134
|
-
legend_tag = legend ?
|
135
|
-
fieldset_attrs = html_options
|
130
|
+
legend_tag = legend ? helpers.tag.legend(helpers.tag.span(legend), class: "fieldset-title") : ""
|
131
|
+
fieldset_attrs = tag_attributes html_options
|
136
132
|
@opening_tag = "<fieldset #{fieldset_attrs}>#{legend_tag}<ol>"
|
137
133
|
@closing_tag = "</ol></fieldset>"
|
138
134
|
super(*(args << html_options), &block)
|
139
135
|
end
|
136
|
+
|
137
|
+
private
|
138
|
+
|
139
|
+
def tag_attributes(html_options)
|
140
|
+
if Rails::VERSION::MAJOR <= 6
|
141
|
+
# Reimplement tag.attributes to backport support for Rails 6.1.
|
142
|
+
# TODO: this can be removed when support for Rails 6.x is dropped
|
143
|
+
helpers.tag.tag_options(html_options.to_h).to_s.strip.html_safe
|
144
|
+
else
|
145
|
+
helpers.tag.attributes html_options
|
146
|
+
end
|
147
|
+
end
|
140
148
|
end
|
141
149
|
|
142
150
|
class SemanticActionsProxy < FormtasticProxy
|
@@ -103,7 +103,10 @@ module ActiveAdmin
|
|
103
103
|
# you pass in the :total_pages option. We issue a query to determine
|
104
104
|
# if there is another page or not, but the limit/offset make this
|
105
105
|
# query fast.
|
106
|
-
|
106
|
+
offset_scope = collection.offset(collection.current_page * collection.limit_value)
|
107
|
+
# Support array collections. Kaminari::PaginatableArray does not respond to except
|
108
|
+
offset_scope = offset_scope.except(:select, :order) if offset_scope.respond_to?(:except)
|
109
|
+
offset = offset_scope.limit(1).count
|
107
110
|
options[:total_pages] = collection.current_page + offset
|
108
111
|
options[:right] = 0
|
109
112
|
end
|
@@ -291,9 +291,14 @@ module ActiveAdmin
|
|
291
291
|
end
|
292
292
|
|
293
293
|
# Display a column for the id
|
294
|
-
def id_column
|
294
|
+
def id_column(*args)
|
295
295
|
raise "#{resource_class.name} has no primary_key!" unless resource_class.primary_key
|
296
|
-
|
296
|
+
|
297
|
+
options = args.extract_options!
|
298
|
+
title = args[0].presence || resource_class.human_attribute_name(resource_class.primary_key)
|
299
|
+
sortable = options.fetch(:sortable, resource_class.primary_key)
|
300
|
+
|
301
|
+
column(title, sortable: sortable) do |resource|
|
297
302
|
if controller.action_methods.include?("show")
|
298
303
|
link_to resource.id, resource_path(resource), class: "resource_id_link"
|
299
304
|
elsif controller.action_methods.include?("edit")
|
@@ -304,10 +309,6 @@ module ActiveAdmin
|
|
304
309
|
end
|
305
310
|
end
|
306
311
|
|
307
|
-
def default_actions
|
308
|
-
raise "`default_actions` is no longer provided in ActiveAdmin 1.x. Use `actions` instead."
|
309
|
-
end
|
310
|
-
|
311
312
|
# Add links to perform actions.
|
312
313
|
#
|
313
314
|
# ```ruby
|
@@ -40,13 +40,7 @@ module ActiveAdmin
|
|
40
40
|
protected
|
41
41
|
|
42
42
|
def default_title
|
43
|
-
|
44
|
-
|
45
|
-
if title.blank?
|
46
|
-
title = "#{active_admin_config.resource_label} ##{resource.id}"
|
47
|
-
end
|
48
|
-
|
49
|
-
title
|
43
|
+
display_name(resource)
|
50
44
|
end
|
51
45
|
|
52
46
|
module DefaultMainContent
|
data/lib/active_admin.rb
CHANGED
@@ -3,7 +3,6 @@ require "active_support/core_ext"
|
|
3
3
|
require "set"
|
4
4
|
|
5
5
|
require "ransack"
|
6
|
-
require "ransack_ext"
|
7
6
|
require "kaminari"
|
8
7
|
require "formtastic"
|
9
8
|
require "formtastic_i18n"
|
@@ -27,7 +26,6 @@ module ActiveAdmin
|
|
27
26
|
autoload :ControllerAction, "active_admin/controller_action"
|
28
27
|
autoload :CSVBuilder, "active_admin/csv_builder"
|
29
28
|
autoload :Dependency, "active_admin/dependency"
|
30
|
-
autoload :Deprecation, "active_admin/deprecation"
|
31
29
|
autoload :Devise, "active_admin/devise"
|
32
30
|
autoload :DSL, "active_admin/dsl"
|
33
31
|
autoload :FormBuilder, "active_admin/form_builder"
|
@@ -62,6 +60,10 @@ module ActiveAdmin
|
|
62
60
|
@application ||= ::ActiveAdmin::Application.new
|
63
61
|
end
|
64
62
|
|
63
|
+
def deprecator
|
64
|
+
@deprecator ||= ActiveSupport::Deprecation.new("4.0", "active-admin")
|
65
|
+
end
|
66
|
+
|
65
67
|
# Gets called within the initializer
|
66
68
|
def setup
|
67
69
|
application.setup!
|
@@ -258,7 +258,7 @@ ActiveAdmin.setup do |config|
|
|
258
258
|
#
|
259
259
|
# config.namespace :admin do |admin|
|
260
260
|
# admin.build_menu :default do |menu|
|
261
|
-
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target:
|
261
|
+
# menu.add label: "My Great Website", url: "http://www.mygreatwebsite.com", html_options: { target: "_blank" }
|
262
262
|
# end
|
263
263
|
# end
|
264
264
|
|
@@ -320,7 +320,7 @@ ActiveAdmin.setup do |config|
|
|
320
320
|
# :title,
|
321
321
|
# :email,
|
322
322
|
# ]
|
323
|
-
# config.filter_method_for_large_association = '
|
323
|
+
# config.filter_method_for_large_association = '_start'
|
324
324
|
|
325
325
|
# == Head
|
326
326
|
#
|
@@ -1,20 +1,22 @@
|
|
1
1
|
//= require jquery-ui/version
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI :data 1.
|
5
|
-
*
|
4
|
+
* jQuery UI :data 1.13.3
|
5
|
+
* https://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright OpenJS Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
|
-
*
|
9
|
+
* https://jquery.org/license
|
10
10
|
*/
|
11
11
|
|
12
12
|
//>>label: :data Selector
|
13
13
|
//>>group: Core
|
14
14
|
//>>description: Selects elements which have data stored under the specified key.
|
15
|
-
//>>docs:
|
15
|
+
//>>docs: https://api.jqueryui.com/data-selector/
|
16
16
|
|
17
17
|
( function( factory ) {
|
18
|
+
"use strict";
|
19
|
+
|
18
20
|
if ( typeof define === "function" && define.amd ) {
|
19
21
|
|
20
22
|
// AMD. Register as an anonymous module.
|
@@ -24,8 +26,10 @@
|
|
24
26
|
// Browser globals
|
25
27
|
factory( jQuery );
|
26
28
|
}
|
27
|
-
} ( function( $ ) {
|
28
|
-
|
29
|
+
} )( function( $ ) {
|
30
|
+
"use strict";
|
31
|
+
|
32
|
+
return $.extend( $.expr.pseudos, {
|
29
33
|
data: $.expr.createPseudo ?
|
30
34
|
$.expr.createPseudo( function( dataName ) {
|
31
35
|
return function( elem ) {
|
@@ -38,4 +42,4 @@ return $.extend( $.expr[ ":" ], {
|
|
38
42
|
return !!$.data( elem, match[ 3 ] );
|
39
43
|
}
|
40
44
|
} );
|
41
|
-
} )
|
45
|
+
} );
|
@@ -1,21 +1,23 @@
|
|
1
1
|
//= require jquery-ui/version
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Disable Selection 1.
|
5
|
-
*
|
4
|
+
* jQuery UI Disable Selection 1.13.3
|
5
|
+
* https://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright OpenJS Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
|
-
*
|
9
|
+
* https://jquery.org/license
|
10
10
|
*/
|
11
11
|
|
12
12
|
//>>label: disableSelection
|
13
13
|
//>>group: Core
|
14
14
|
//>>description: Disable selection of text content within the set of matched elements.
|
15
|
-
//>>docs:
|
15
|
+
//>>docs: https://api.jqueryui.com/disableSelection/
|
16
16
|
|
17
17
|
// This file is deprecated
|
18
18
|
( function( factory ) {
|
19
|
+
"use strict";
|
20
|
+
|
19
21
|
if ( typeof define === "function" && define.amd ) {
|
20
22
|
|
21
23
|
// AMD. Register as an anonymous module.
|
@@ -25,7 +27,8 @@
|
|
25
27
|
// Browser globals
|
26
28
|
factory( jQuery );
|
27
29
|
}
|
28
|
-
} ( function( $ ) {
|
30
|
+
} )( function( $ ) {
|
31
|
+
"use strict";
|
29
32
|
|
30
33
|
return $.fn.extend( {
|
31
34
|
disableSelection: ( function() {
|
@@ -45,4 +48,4 @@ return $.fn.extend( {
|
|
45
48
|
}
|
46
49
|
} );
|
47
50
|
|
48
|
-
} )
|
51
|
+
} );
|
@@ -1,20 +1,22 @@
|
|
1
1
|
//= require jquery-ui/version
|
2
2
|
|
3
3
|
/*!
|
4
|
-
* jQuery UI Focusable 1.
|
5
|
-
*
|
4
|
+
* jQuery UI Focusable 1.13.3
|
5
|
+
* https://jqueryui.com
|
6
6
|
*
|
7
|
-
* Copyright
|
7
|
+
* Copyright OpenJS Foundation and other contributors
|
8
8
|
* Released under the MIT license.
|
9
|
-
*
|
9
|
+
* https://jquery.org/license
|
10
10
|
*/
|
11
11
|
|
12
12
|
//>>label: :focusable Selector
|
13
13
|
//>>group: Core
|
14
14
|
//>>description: Selects elements which can be focused.
|
15
|
-
//>>docs:
|
15
|
+
//>>docs: https://api.jqueryui.com/focusable-selector/
|
16
16
|
|
17
17
|
( function( factory ) {
|
18
|
+
"use strict";
|
19
|
+
|
18
20
|
if ( typeof define === "function" && define.amd ) {
|
19
21
|
|
20
22
|
// AMD. Register as an anonymous module.
|
@@ -24,7 +26,8 @@
|
|
24
26
|
// Browser globals
|
25
27
|
factory( jQuery );
|
26
28
|
}
|
27
|
-
} ( function( $ ) {
|
29
|
+
} )( function( $ ) {
|
30
|
+
"use strict";
|
28
31
|
|
29
32
|
// Selectors
|
30
33
|
$.ui.focusable = function( element, hasTabindex ) {
|
@@ -72,10 +75,10 @@ function visible( element ) {
|
|
72
75
|
element = element.parent();
|
73
76
|
visibility = element.css( "visibility" );
|
74
77
|
}
|
75
|
-
return visibility
|
78
|
+
return visibility === "visible";
|
76
79
|
}
|
77
80
|
|
78
|
-
$.extend( $.expr
|
81
|
+
$.extend( $.expr.pseudos, {
|
79
82
|
focusable: function( element ) {
|
80
83
|
return $.ui.focusable( element, $.attr( element, "tabindex" ) != null );
|
81
84
|
}
|
@@ -83,4 +86,4 @@ $.extend( $.expr[ ":" ], {
|
|
83
86
|
|
84
87
|
return $.ui.focusable;
|
85
88
|
|
86
|
-
} )
|
89
|
+
} );
|