jquery-tablesorter-deduper-rails 0.1 → 0.2

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 9be095429092a51b159e9e8e4b7e3557e3186e2b
4
- data.tar.gz: eeb87091e9116b4bd6a9fa874287d7a65a5b8a3f
3
+ metadata.gz: 44d3e353b7fda1c0e6806fd7c8948295d2b9386e
4
+ data.tar.gz: 1ed15d109c5ca26fa7e2d739e38301a9153383b2
5
5
  SHA512:
6
- metadata.gz: f4b331deb8fbcf93cf68756b624ec947908d99ad9384fcf72e6eae01401f7d8d81835c479c55a18021163217dd6d0b6178f94237f0aa5ac6172402e550f426ed
7
- data.tar.gz: 35890be0929db1b6f53261ee614fe335600e5004c305c1932dec3198889827f74adb13fc97632302aa1574ae26b0a5fe3f2ca49571321c1b1155857851cd2a17
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
  module JqueryTablesorterDeduperRails
2
2
  module Rails
3
- VERSION = "0.1"
3
+ VERSION = "0.2"
4
4
  end
5
5
  end
@@ -1,5 +1,5 @@
1
1
  // DeDup JQuery tablesorter plugin
2
- // version 0.1
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.1'
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-01 00:00:00.000000000 Z
11
+ date: 2015-07-08 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: jquery-tablesorter