activeadmin_dynamic_table 0.2.1 → 0.2.2
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/Gemfile.lock +7 -7
- data/app/assets/javascripts/activeadmin_dynamic_table/dynamic_table.js +19 -9
- data/app/assets/stylesheets/activeadmin_dynamic_table/all.scss +10 -8
- data/lib/activeadmin_dynamic_table/configurator.rb +1 -3
- data/lib/activeadmin_dynamic_table/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 990ccd171d2daf1f4367c43f1bed286aa2a240ec23705a60f3bcd6b9ffa33954
|
4
|
+
data.tar.gz: 66cbb973719a88e5cd8b50fce56a7befbc3688160502416acbb3d57c134f7b47
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7e8dcad15d77a6849d0a539a71d8c1c0a561975563dc3b99d54fdcf78252e6c44c7d97694b1280c48995e1d533267c76c03246d8e7d599125573da17369ef671
|
7
|
+
data.tar.gz: 38a0fb7181c0e438b0673fccef9fe25cc2b3efcb97ced41f0c4183a7a42f6688d396b4a5054e470b118ae151da74327eb2f3f8c83eda53692c9e944e7a1f121d
|
data/Gemfile.lock
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
activeadmin_dynamic_table (0.2.
|
4
|
+
activeadmin_dynamic_table (0.2.2)
|
5
5
|
activeadmin (>= 2.9, < 4.0)
|
6
6
|
|
7
7
|
GEM
|
@@ -80,7 +80,7 @@ GEM
|
|
80
80
|
railties (>= 6.0)
|
81
81
|
responders (>= 2)
|
82
82
|
io-console (0.8.0)
|
83
|
-
irb (1.15.
|
83
|
+
irb (1.15.2)
|
84
84
|
pp (>= 0.6.0)
|
85
85
|
rdoc (>= 4.0.0)
|
86
86
|
reline (>= 0.4.2)
|
@@ -100,7 +100,7 @@ GEM
|
|
100
100
|
activerecord
|
101
101
|
kaminari-core (= 1.2.2)
|
102
102
|
kaminari-core (1.2.2)
|
103
|
-
logger (1.
|
103
|
+
logger (1.7.0)
|
104
104
|
loofah (2.24.0)
|
105
105
|
crass (~> 1.0.2)
|
106
106
|
nokogiri (>= 1.12.0)
|
@@ -110,7 +110,7 @@ GEM
|
|
110
110
|
pp (0.6.2)
|
111
111
|
prettyprint
|
112
112
|
prettyprint (0.2.0)
|
113
|
-
psych (5.2.
|
113
|
+
psych (5.2.5)
|
114
114
|
date
|
115
115
|
stringio
|
116
116
|
racc (1.8.1)
|
@@ -142,16 +142,16 @@ GEM
|
|
142
142
|
activerecord (>= 6.1.5)
|
143
143
|
activesupport (>= 6.1.5)
|
144
144
|
i18n
|
145
|
-
rdoc (6.
|
145
|
+
rdoc (6.13.1)
|
146
146
|
psych (>= 4.0.0)
|
147
|
-
reline (0.6.
|
147
|
+
reline (0.6.1)
|
148
148
|
io-console (~> 0.5)
|
149
149
|
responders (3.1.1)
|
150
150
|
actionpack (>= 5.2)
|
151
151
|
railties (>= 5.2)
|
152
152
|
ruby2_keywords (0.0.5)
|
153
153
|
securerandom (0.4.1)
|
154
|
-
stringio (3.1.
|
154
|
+
stringio (3.1.7)
|
155
155
|
thor (1.3.2)
|
156
156
|
timeout (0.4.3)
|
157
157
|
tzinfo (2.0.6)
|
@@ -73,21 +73,33 @@ $(function() {
|
|
73
73
|
}, {});
|
74
74
|
}
|
75
75
|
|
76
|
+
let clone = null;
|
77
|
+
|
76
78
|
preferencesBtn.on('click', function() {
|
77
79
|
const offset = preferencesBtn.offset();
|
78
80
|
offset.top += preferencesBtn.outerHeight();
|
79
81
|
|
80
|
-
tableConfig.
|
82
|
+
clone = tableConfig.clone();
|
83
|
+
|
84
|
+
clone.removeClass('hidden');
|
85
|
+
clone.offset(offset);
|
86
|
+
offset.top += preferencesBtn.outerHeight();
|
87
|
+
|
88
|
+
$('.index_content').prepend(clone);
|
81
89
|
|
82
90
|
return false;
|
83
91
|
});
|
84
92
|
|
85
|
-
document.
|
86
|
-
|
93
|
+
$(document).on('click', '.dynamic_table_configuration', function(event) {
|
94
|
+
event.stopPropagation();
|
95
|
+
});
|
96
|
+
|
97
|
+
$(document).on('click', () => {
|
98
|
+
if (!clone) {
|
87
99
|
return;
|
88
100
|
}
|
89
101
|
|
90
|
-
const selected =
|
102
|
+
const selected = clone.find('input').filter(function() {
|
91
103
|
return $(this).is(':checked');
|
92
104
|
}).map(function() {
|
93
105
|
return $(this).attr('name');
|
@@ -105,12 +117,10 @@ $(function() {
|
|
105
117
|
});
|
106
118
|
const searchString = stringifyParams(params);
|
107
119
|
|
108
|
-
|
109
|
-
|
110
|
-
});
|
120
|
+
clone.remove();
|
121
|
+
clone = null;
|
111
122
|
|
112
|
-
|
113
|
-
event.stopPropagation();
|
123
|
+
window.location.search = searchString;
|
114
124
|
});
|
115
125
|
|
116
126
|
columns.resizable({
|
@@ -12,14 +12,6 @@
|
|
12
12
|
}
|
13
13
|
}
|
14
14
|
|
15
|
-
.dynamic_table_configuration {
|
16
|
-
position: absolute;
|
17
|
-
background: #fff;
|
18
|
-
padding: 8px;
|
19
|
-
border: 1px solid #c9d0d6;
|
20
|
-
width: max-content;
|
21
|
-
}
|
22
|
-
|
23
15
|
.dynamic_table {
|
24
16
|
table-layout: fixed;
|
25
17
|
width: min-content;
|
@@ -42,3 +34,13 @@
|
|
42
34
|
}
|
43
35
|
}
|
44
36
|
}
|
37
|
+
|
38
|
+
.dynamic_table_configuration {
|
39
|
+
position: absolute;
|
40
|
+
background: #fff;
|
41
|
+
padding: 8px;
|
42
|
+
border: 1px solid #c9d0d6;
|
43
|
+
width: max-content;
|
44
|
+
z-index: 10;
|
45
|
+
list-style: none;
|
46
|
+
}
|
@@ -27,11 +27,9 @@ module ActiveadminDynamicTable
|
|
27
27
|
def columns
|
28
28
|
applicable_columns.each do |applicable_column|
|
29
29
|
next @context.id_column *applicable_column.args if applicable_column.method == :id_column
|
30
|
-
next @context.actions(applicable_column.args[1] || applicable_column.args[0]) if applicable_column.method == :actions
|
30
|
+
next @context.actions(applicable_column.args[1] || applicable_column.args[0], &applicable_column.block) if applicable_column.method == :actions
|
31
31
|
next @context.index_column *applicable_column.args if applicable_column.method == :index_column
|
32
32
|
|
33
|
-
# next @context.selectable_column *applicable_column.args if applicable_column.method == :selectable_column
|
34
|
-
|
35
33
|
@context.public_send(applicable_column.method, *applicable_column.args, &applicable_column.block)
|
36
34
|
end
|
37
35
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: activeadmin_dynamic_table
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Anton Biliaiev
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2025-
|
11
|
+
date: 2025-05-10 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: activeadmin
|