activeadmin_addons 0.6.3 → 0.6.4
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
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 6d435121eb4c55a5255387dd87b0925f82893fa1
|
|
4
|
+
data.tar.gz: 88921f3c132692be19b644bfe5d8b9cf9eb26289
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 43e3d2ada63e439b53a0e6b785e1d275a821ae8000362e6823a8a5f34b4f7728d244f20a113b13266a9ec8cebc84748c9b9bce4af0e27f523735c95aa3d6c752
|
|
7
|
+
data.tar.gz: d15d77617e7c57f0037d8c3db605dfa5a2d689fcfaab749740a8904498f077b88cb245d62ff506e9999bb079a98ad94c99fc2215142777a7c4a185223007fca9
|
|
@@ -3,21 +3,23 @@
|
|
|
3
3
|
|
|
4
4
|
$(function() {
|
|
5
5
|
|
|
6
|
-
setupSelect2();
|
|
6
|
+
setupSelect2(document);
|
|
7
7
|
|
|
8
|
-
$(document).on('has_many_add:after',
|
|
8
|
+
$(document).on('has_many_add:after', function(event, container){
|
|
9
|
+
setupSelect2(container);
|
|
10
|
+
});
|
|
9
11
|
|
|
10
|
-
function setupSelect2() {
|
|
12
|
+
function setupSelect2(container) {
|
|
11
13
|
var INVALID_PARENT_ID = -1;
|
|
12
14
|
|
|
13
|
-
$('.select2-tags').each(function(i, el) {
|
|
15
|
+
$('.select2-tags', container).each(function(i, el) {
|
|
14
16
|
$(el).select2({
|
|
15
17
|
width: '80%',
|
|
16
18
|
tags: $(el).data('collection')
|
|
17
19
|
});
|
|
18
20
|
});
|
|
19
21
|
|
|
20
|
-
$('select:not(.default-select)').each(function(i, el) {
|
|
22
|
+
$('select:not(.default-select)', container).each(function(i, el) {
|
|
21
23
|
if ($(el).closest('.filter_form').length > 0) {
|
|
22
24
|
$(el).select2({
|
|
23
25
|
width: 'resolve'
|
|
@@ -30,7 +32,7 @@ $(function() {
|
|
|
30
32
|
});
|
|
31
33
|
|
|
32
34
|
|
|
33
|
-
$('.select2-ajax').each(function(i, el) {
|
|
35
|
+
$('.select2-ajax', container).each(function(i, el) {
|
|
34
36
|
var url = $(el).data('url');
|
|
35
37
|
var fields = $(el).data('fields');
|
|
36
38
|
var displayName = $(el).data('display_name');
|
|
@@ -3,6 +3,8 @@ class ListBuilder < ActiveAdminAddons::CustomBuilder
|
|
|
3
3
|
options[:localize] = options.fetch(:localize, false)
|
|
4
4
|
options[:list_type] = options.fetch(:list_type, :ul)
|
|
5
5
|
|
|
6
|
+
return if data.nil?
|
|
7
|
+
|
|
6
8
|
raise 'invalid list type (ul, ol)' unless [:ul, :ol].include?(options[:list_type])
|
|
7
9
|
raise "list must be Array or Hash" if !data.is_a?(Hash) && !data.is_a?(Array)
|
|
8
10
|
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: activeadmin_addons
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.6.
|
|
4
|
+
version: 0.6.4
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Platanus
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2016-03-
|
|
11
|
+
date: 2016-03-02 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: railties
|