cm-admin 3.0.3 → 3.0.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 +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/cm_admin/filters.js +9 -2
- data/app/models/file_import.rb +1 -1
- data/app/views/cm_admin/main/_sort.html.slim +1 -1
- data/lib/cm_admin/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: 5a4959d23e72acb3973b23cd3c275cc64545fa0d99a899d6315df73026fd889d
|
4
|
+
data.tar.gz: dd2daf0d768d1dc01409383c1966905975bfdead82aa126909228ec9b88e90dc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: b323940b77edf010dd5079c53f2a17b5334c8e005f430a27097f9597e827343f5ab9342452a74060f9703d9c3ac7010454bdb99ace1353cf5679749a98f82cb3
|
7
|
+
data.tar.gz: 412ff6701ea7ec48b982c8ee011fed1728ae9ac48334b80e7ca5b6f20f5a8d48d95d3f4f3c2ddbd3a945578b1baa84df4ecf026586ede4fb46783338abb20b2d
|
data/Gemfile.lock
CHANGED
@@ -18,7 +18,7 @@ var CmFilter = {
|
|
18
18
|
|
19
19
|
// Main method which will structure the existing filter values with the newly
|
20
20
|
// applied filter. Send and receive the value from the backend.
|
21
|
-
var getFilteredData = function(filterType, filterValue, filterColumn=null) {
|
21
|
+
var getFilteredData = function(filterType, filterValue, filterColumn=null, sortData=null) {
|
22
22
|
let sortColumn = $('[data-behaviour="sort-column"]').val();
|
23
23
|
let sortDirection = $('[data-behaviour="sort-direction"]:checked').val();
|
24
24
|
|
@@ -86,6 +86,13 @@ var getFilteredData = function(filterType, filterValue, filterColumn=null) {
|
|
86
86
|
} else {
|
87
87
|
$('.cm-index-page__table-container').html(data);
|
88
88
|
}
|
89
|
+
if (sortData) {
|
90
|
+
const dropdownElement = document.querySelector('[data-behaviour="sort-button-toggle"]');
|
91
|
+
if (dropdownElement) {
|
92
|
+
const dropdown = new bootstrap.Dropdown(dropdownElement);
|
93
|
+
dropdown.show();
|
94
|
+
}
|
95
|
+
}
|
89
96
|
},
|
90
97
|
error: function(jqxhr, textStatus, errorThrown) {
|
91
98
|
console.log(errorThrown, textStatus);
|
@@ -353,7 +360,7 @@ $(document).on('click', '[data-behaviour="selected-chip"]', function(e) {
|
|
353
360
|
})
|
354
361
|
|
355
362
|
$(document).on("change", '[data-behaviour="sort-column"], [data-behaviour="sort-direction"]', function (e) {
|
356
|
-
getFilteredData(null, null, null);
|
363
|
+
getFilteredData(null, null, null, true);
|
357
364
|
});
|
358
365
|
|
359
366
|
$(document).on("click", '[data-behaviour="reset-sort"]', function (e) {
|
data/app/models/file_import.rb
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
- sort_column = params[:sort_column] || model.default_sort_column
|
2
2
|
- sort_direction = params[:sort_direction] || model.default_sort_direction
|
3
3
|
.dropdown
|
4
|
-
button.sort-button data-bs-toggle="dropdown"
|
4
|
+
button.sort-button data-bs-toggle="dropdown" data-bs-auto-close="outside" data-behaviour="sort-button-toggle"
|
5
5
|
- if sort_column.present?
|
6
6
|
span
|
7
7
|
- if sort_direction == 'asc'
|
data/lib/cm_admin/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: cm-admin
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.0.
|
4
|
+
version: 3.0.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Michael
|
@@ -14,7 +14,7 @@ authors:
|
|
14
14
|
autorequire:
|
15
15
|
bindir: exe
|
16
16
|
cert_chain: []
|
17
|
-
date: 2024-10-
|
17
|
+
date: 2024-10-24 00:00:00.000000000 Z
|
18
18
|
dependencies:
|
19
19
|
- !ruby/object:Gem::Dependency
|
20
20
|
name: caxlsx_rails
|