jquery-tablesorter-deduper-rails 0.1 → 0.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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 44d3e353b7fda1c0e6806fd7c8948295d2b9386e
|
4
|
+
data.tar.gz: 1ed15d109c5ca26fa7e2d739e38301a9153383b2
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: fb8834dd31964f408bca266a6700b9144fa2d253bb05cba5dcded52be13f67a7f814797799ef74ad9f4fa65ad3a8a89ca9e715cc86da95c5b10d88e23b3be131
|
7
|
+
data.tar.gz: e968bc6f891c13bcf7658696e1a3445f19a69bf454fcc829a2a518050022e3f16a1c3b9ea167d1e8f53cdbc18215e420618e43d87a894796530f5627fe9a30c7
|
data/README.md
CHANGED
@@ -57,6 +57,10 @@ DeDuper is a Tablesorter widget to hide duplicated values in columns
|
|
57
57
|
'light': class for duplicated elements
|
58
58
|
* dupCompareFuction, default: function(x, y) {return x.toLowerCase() == y.toLowerCase();}: function for comparing strings
|
59
59
|
|
60
|
+
### Metadata:
|
61
|
+
|
62
|
+
data-deduper="false" in table header to disable dedupering the given header
|
63
|
+
|
60
64
|
## CREDITS
|
61
65
|
(c) 2015 Tomek "Grych" Gryszkiewicz
|
62
66
|
|
@@ -1,5 +1,5 @@
|
|
1
1
|
// DeDup JQuery tablesorter plugin
|
2
|
-
// version 0.
|
2
|
+
// version 0.2
|
3
3
|
// (c) 2015 Tomek 'Grych' Gryszkiewicz, grych@tg.pl
|
4
4
|
// MIT License
|
5
5
|
// https://github.com/grych/dedup
|
@@ -55,6 +55,10 @@
|
|
55
55
|
// 'light': class for duplicated elements
|
56
56
|
// * dupCompareFuction, default: function(x, y) {return x.toLowerCase() == y.toLowerCase();}: function for comparing strings
|
57
57
|
//
|
58
|
+
// ### Metadata:
|
59
|
+
//
|
60
|
+
// data-deduper="false" in table header to disable dedupering the given header
|
61
|
+
//
|
58
62
|
// ## CREDITS
|
59
63
|
// (c) 2015 Tomek "Grych" Gryszkiewicz
|
60
64
|
// grych@tg.pl
|
@@ -71,7 +75,6 @@ $(function() {
|
|
71
75
|
return x.toLowerCase() == y.toLowerCase();
|
72
76
|
}
|
73
77
|
},
|
74
|
-
// format is called on init and when a sorting has finished
|
75
78
|
format: function(table, c, wo) {
|
76
79
|
// remove dupClass from all rows prior to sort
|
77
80
|
$("td." + wo.dupClass, table).removeClass(wo.dupClass);
|
@@ -80,7 +83,7 @@ $(function() {
|
|
80
83
|
// only visible rows
|
81
84
|
c.$tbodies.children('tr:visible').each(function() {
|
82
85
|
$("td", this).each(function(i) {
|
83
|
-
if ( wo.dupCompareFunction(before_row[i].text(), $(this).text()) ) {
|
86
|
+
if ( $("th:eq(" + i + ")", table).data('deduper') != false && wo.dupCompareFunction(before_row[i].text(), $(this).text()) ) {
|
84
87
|
$(this).addClass(wo.dupClass);
|
85
88
|
}
|
86
89
|
});
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-tablesorter-deduper-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: '0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Tomek 'Grych' Gryszkiewicz
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2015-07-
|
11
|
+
date: 2015-07-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: jquery-tablesorter
|