table_on_steroids 0.1.1.0 → 0.1.1.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
  SHA256:
3
- metadata.gz: 2d4edd10e8041898d2a51d6ce362e6317579c0e16f8862bff1fcbc82f1111ff2
4
- data.tar.gz: c51917c51b558e9a4a158b8e5d3ed688064e945a44c689be91a3c759e23ee719
3
+ metadata.gz: c9d0db1565b5c92a644b129ec08263c56cb174ce00de3a415111d3683cf65958
4
+ data.tar.gz: b5db441dbd5e78723cd4ca3d7ae59737784fc0363e28915b3cb4d16825aa5e9b
5
5
  SHA512:
6
- metadata.gz: 7f83e38d52722c6bcac3b3a9078a3a6bcc38f88200b50632348d207af53c6f15f48cd4e80abe2cab53cc0fd5eef17dcc7dfbca094bd88c465f85c0512006f845
7
- data.tar.gz: 2666272c49fc25c18b35a175d61c83553d96f818229dfbfde48fac496b47b71c35bdce376a0a5d5c33cd654ded83b5d29fc9ff36d8744c89c63db82a503c61f9
6
+ metadata.gz: 4c1b1094fc0231cec8167781e05e154ccc9fe02e04fc3c14399ecb55b9b91fface474df8897df1cadc8dabc6f617a31319f51ca845bad0b7d703984ca9c6b01b
7
+ data.tar.gz: b0574a3eebd51d591b43c3f922155bef2d54c9f585726e5f0d4a4182eab74af5c71ef8b97c472211f8041dfdd381c202a9184119a9d621d570ab1d2665b1b5a7
data/Gemfile.lock CHANGED
@@ -1,51 +1,34 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- table_on_steroids (0.1.1.0)
4
+ table_on_steroids (0.1.1.2)
5
5
  bootstrap-datepicker-rails (~> 1)
6
- bootstrap-multiselect-rails (~> 0.9)
6
+ bootstrap-select-rails (~> 1.3)
7
7
  kaminari (~> 1.1)
8
8
 
9
9
  GEM
10
10
  remote: https://rubygems.org/
11
11
  specs:
12
- actioncable (5.2.2)
13
- actionpack (= 5.2.2)
14
- nio4r (~> 2.0)
15
- websocket-driver (>= 0.6.1)
16
- actionmailer (5.2.2)
17
- actionpack (= 5.2.2)
18
- actionview (= 5.2.2)
19
- activejob (= 5.2.2)
20
- mail (~> 2.5, >= 2.5.4)
21
- rails-dom-testing (~> 2.0)
22
- actionpack (5.2.2)
23
- actionview (= 5.2.2)
24
- activesupport (= 5.2.2)
12
+ actionpack (5.2.3)
13
+ actionview (= 5.2.3)
14
+ activesupport (= 5.2.3)
25
15
  rack (~> 2.0)
26
16
  rack-test (>= 0.6.3)
27
17
  rails-dom-testing (~> 2.0)
28
18
  rails-html-sanitizer (~> 1.0, >= 1.0.2)
29
- actionview (5.2.2)
30
- activesupport (= 5.2.2)
19
+ actionview (5.2.3)
20
+ activesupport (= 5.2.3)
31
21
  builder (~> 3.1)
32
22
  erubi (~> 1.4)
33
23
  rails-dom-testing (~> 2.0)
34
24
  rails-html-sanitizer (~> 1.0, >= 1.0.3)
35
- activejob (5.2.2)
36
- activesupport (= 5.2.2)
37
- globalid (>= 0.3.6)
38
- activemodel (5.2.2)
39
- activesupport (= 5.2.2)
40
- activerecord (5.2.2)
41
- activemodel (= 5.2.2)
42
- activesupport (= 5.2.2)
25
+ activemodel (5.2.3)
26
+ activesupport (= 5.2.3)
27
+ activerecord (5.2.3)
28
+ activemodel (= 5.2.3)
29
+ activesupport (= 5.2.3)
43
30
  arel (>= 9.0)
44
- activestorage (5.2.2)
45
- actionpack (= 5.2.2)
46
- activerecord (= 5.2.2)
47
- marcel (~> 0.3.1)
48
- activesupport (5.2.2)
31
+ activesupport (5.2.3)
49
32
  concurrent-ruby (~> 1.0, >= 1.0.2)
50
33
  i18n (>= 0.7, < 2)
51
34
  minitest (~> 5.1)
@@ -53,16 +36,13 @@ GEM
53
36
  arel (9.0.0)
54
37
  bootstrap-datepicker-rails (1.8.0.1)
55
38
  railties (>= 3.0)
56
- bootstrap-multiselect-rails (0.9.9)
57
- rails (>= 4.0.0)
39
+ bootstrap-select-rails (1.13.8)
58
40
  builder (3.2.3)
59
- concurrent-ruby (1.1.4)
41
+ concurrent-ruby (1.1.5)
60
42
  crass (1.0.4)
61
43
  diff-lcs (1.3)
62
44
  erubi (1.8.0)
63
- globalid (0.4.2)
64
- activesupport (>= 4.2.0)
65
- i18n (1.5.3)
45
+ i18n (1.6.0)
66
46
  concurrent-ruby (~> 1.0)
67
47
  kaminari (1.1.1)
68
48
  activesupport (>= 4.1.0)
@@ -79,42 +59,22 @@ GEM
79
59
  loofah (2.2.3)
80
60
  crass (~> 1.0.2)
81
61
  nokogiri (>= 1.5.9)
82
- mail (2.7.1)
83
- mini_mime (>= 0.1.1)
84
- marcel (0.3.3)
85
- mimemagic (~> 0.3.2)
86
62
  method_source (0.9.2)
87
- mimemagic (0.3.3)
88
- mini_mime (1.0.1)
89
63
  mini_portile2 (2.4.0)
90
64
  minitest (5.11.3)
91
- nio4r (2.3.1)
92
- nokogiri (1.10.1)
65
+ nokogiri (1.10.3)
93
66
  mini_portile2 (~> 2.4.0)
94
- rack (2.0.6)
67
+ rack (2.0.7)
95
68
  rack-test (1.1.0)
96
69
  rack (>= 1.0, < 3)
97
- rails (5.2.2)
98
- actioncable (= 5.2.2)
99
- actionmailer (= 5.2.2)
100
- actionpack (= 5.2.2)
101
- actionview (= 5.2.2)
102
- activejob (= 5.2.2)
103
- activemodel (= 5.2.2)
104
- activerecord (= 5.2.2)
105
- activestorage (= 5.2.2)
106
- activesupport (= 5.2.2)
107
- bundler (>= 1.3.0)
108
- railties (= 5.2.2)
109
- sprockets-rails (>= 2.0.0)
110
70
  rails-dom-testing (2.0.3)
111
71
  activesupport (>= 4.2.0)
112
72
  nokogiri (>= 1.6)
113
73
  rails-html-sanitizer (1.0.4)
114
74
  loofah (~> 2.2, >= 2.2.2)
115
- railties (5.2.2)
116
- actionpack (= 5.2.2)
117
- activesupport (= 5.2.2)
75
+ railties (5.2.3)
76
+ actionpack (= 5.2.3)
77
+ activesupport (= 5.2.3)
118
78
  method_source
119
79
  rake (>= 0.8.7)
120
80
  thor (>= 0.19.0, < 2.0)
@@ -132,20 +92,10 @@ GEM
132
92
  diff-lcs (>= 1.2.0, < 2.0)
133
93
  rspec-support (~> 3.8.0)
134
94
  rspec-support (3.8.0)
135
- sprockets (3.7.2)
136
- concurrent-ruby (~> 1.0)
137
- rack (> 1, < 3)
138
- sprockets-rails (3.2.1)
139
- actionpack (>= 4.0)
140
- activesupport (>= 4.0)
141
- sprockets (>= 3.0.0)
142
95
  thor (0.20.3)
143
96
  thread_safe (0.3.6)
144
97
  tzinfo (1.2.5)
145
98
  thread_safe (~> 0.1)
146
- websocket-driver (0.7.0)
147
- websocket-extensions (>= 0.1.0)
148
- websocket-extensions (0.1.3)
149
99
 
150
100
  PLATFORMS
151
101
  ruby
@@ -51,7 +51,7 @@
51
51
  <% end %>
52
52
  </div>
53
53
  <div class="column_filter">
54
- <%= select_tag("columns#{table_on_steroid_id}", options_for_select(columns.map{|c| [c[1][:label], c[0]]}, selected_columns), multiple: true, class: "column-selector table-on-steroids-selectpicker #{table_on_steroid_id}", data: {"none-selected-text" => "Display columns (max #{max_column})", "max-options" => max_column }, form: "knowledge_base_filters#{table_on_steroid_id}") %>
54
+ <%= select_tag("columns#{table_on_steroid_id}", options_for_select(columns.map{|c| [c[1][:label], c[0]]}, selected_columns), multiple: true, class: "column-selector #{table_on_steroid_id}", data: {"none-selected-text" => "Display columns (max #{max_column})", "max-options" => max_column, style: 'table-on-steroids-selectpicker ' }, form: "knowledge_base_filters#{table_on_steroid_id}") %>
55
55
  </div>
56
56
  <% if(download_csv) %>
57
57
  <div class="float-right">
@@ -1,6 +1,6 @@
1
1
  require "table_on_steroids/version"
2
2
  require 'bootstrap-datepicker-rails'
3
- require 'bootstrap-multiselect-rails'
3
+ require 'bootstrap-select-rails'
4
4
 
5
5
  module TableOnSteroids
6
6
  class Engine < ::Rails::Engine
@@ -1,3 +1,3 @@
1
1
  module TableOnSteroids
2
- VERSION = "0.1.1.0"
2
+ VERSION = "0.1.1.2"
3
3
  end
@@ -33,7 +33,7 @@ Gem::Specification.new do |spec|
33
33
  spec.executables = spec.files.grep(%r{^exe/}) { |f| File.basename(f) }
34
34
  spec.require_paths = ["lib"]
35
35
  spec.add_runtime_dependency 'bootstrap-datepicker-rails', '~> 1'
36
- spec.add_runtime_dependency 'bootstrap-multiselect-rails', '~> 0.9'
36
+ spec.add_runtime_dependency 'bootstrap-select-rails', '~> 1.3'
37
37
  spec.add_runtime_dependency 'kaminari', '~> 1.1'
38
38
  spec.add_development_dependency "bundler", "~> 1.16"
39
39
  spec.add_development_dependency "rake", "~> 10.0"
@@ -1,4 +1,4 @@
1
- //= require bootstrap-multiselect
1
+ //= require bootstrap-select
2
2
  //= require bootstrap-datepicker
3
3
 
4
4
 
@@ -9,38 +9,17 @@ var TableOnSteroids = {
9
9
  this.initColumnSelection();
10
10
  this.initDatePicker();
11
11
  this.observe();
12
- $('.filter-cell-left select[multiple]').multiselect({inheritClass: true});
12
+ $('.filter-cell-left select[multiple]').selectpicker();
13
13
  },
14
14
  initColumnSelection: function(){
15
15
  var _this = this;
16
- $('.column_filter select[multiple]').multiselect({
17
- inheritClass: true,
18
- buttonWidth: '400px',
19
- maxHeight: 250,
20
- onChange: function(option, checked, select) {
21
- var tableOnSteroidId = $(option).closest(".table-on-steroids").attr("id");
22
- _this.$element.find('.column.' + tableOnSteroidId).addClass('d-none');
23
- option.parent().val().forEach(function(element) {
24
- _this.$element.find('.column-'+element).removeClass('d-none')+' .'+tableOnSteroidId
25
- });
26
- },
27
- buttonText: function(options, select) {
28
- if (options.length > 4) {
29
- return options.length + ' columns displayed';
30
- }
31
- else {
32
- var labels = [];
33
- options.each(function() {
34
- if ($(this).attr('label') !== undefined) {
35
- labels.push($(this).attr('label'));
36
- }
37
- else {
38
- labels.push($(this).html());
39
- }
40
- });
41
- return labels.join(', ') + '';
42
- }
43
- }
16
+ $('.column_filter select[multiple]').selectpicker();
17
+ $('.column_filter select[multiple]').on('change', function(e) {
18
+ var tableOnSteroidId = $(e.currentTarget).closest(".table-on-steroids").attr("id");
19
+ _this.$element.find('.column.' + tableOnSteroidId).addClass('d-none');
20
+ $(e.currentTarget).val().forEach(function(element) {
21
+ _this.$element.find('.column-'+element).removeClass('d-none')+' .'+tableOnSteroidId
22
+ });
44
23
  });
45
24
  },
46
25
  observe: function(){
@@ -1,5 +1,6 @@
1
- //= require bootstrap-multiselect
2
-
1
+ /*
2
+ *= require bootstrap-select
3
+ */
3
4
 
4
5
  .table-on-steroids{
5
6
  thead{
@@ -114,6 +115,13 @@
114
115
  color: #585858;
115
116
 
116
117
  }
117
-
118
+ .table-on-steroids-selectpicker {
119
+ color: #495057 !important;
120
+ border: 1px solid #777;
121
+ max-width: 250px;
122
+ height: calc(2.25rem + 2px);
123
+ font-family: inherit;
124
+ padding: .375rem 1.5rem;
125
+ }
118
126
 
119
127
  }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: table_on_steroids
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.1.0
4
+ version: 0.1.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Marieke Gueye
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: exe
11
11
  cert_chain: []
12
- date: 2019-05-15 00:00:00.000000000 Z
12
+ date: 2019-05-21 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bootstrap-datepicker-rails
@@ -26,19 +26,19 @@ dependencies:
26
26
  - !ruby/object:Gem::Version
27
27
  version: '1'
28
28
  - !ruby/object:Gem::Dependency
29
- name: bootstrap-multiselect-rails
29
+ name: bootstrap-select-rails
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
32
  - - "~>"
33
33
  - !ruby/object:Gem::Version
34
- version: '0.9'
34
+ version: '1.3'
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
39
  - - "~>"
40
40
  - !ruby/object:Gem::Version
41
- version: '0.9'
41
+ version: '1.3'
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: kaminari
44
44
  requirement: !ruby/object:Gem::Requirement