active_list 6.9.0 → 6.9.1

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: 43cd0de92791ecf694d3312c293f8746eb1d5ac9
4
- data.tar.gz: 3d67108f2fd9b1bf609a0cb163c4324ecd214cf7
3
+ metadata.gz: 21e6cec418301ab434edc97335af21d5cdd88ce9
4
+ data.tar.gz: 2a48e4601c9d1af663944f1869aa9b3e139cdcba
5
5
  SHA512:
6
- metadata.gz: 977c013131fd6e3131df738f996cd605d3112e2118635c2dad4d4675868528f65292369f0e8302e449acb56d12a50f19dc320a73ed897b9d5bc655d552c2eca7
7
- data.tar.gz: 3b45a3a9d72e5090af3659075a475c068bc117221aa22e3e186818759662d0a6343b7f9319449c2adba77130605f4d0d6da78482f445aaa732153634e2b1f306
6
+ metadata.gz: af8ff5f81a206f5253eb0efe52a0d5cba83a7a5f7748d790bd7a4afc6b34637e3326b6c514d25372b4804fead2765e3b0c6ea5e0e4b418d2cd86b1eead2f5c67
7
+ data.tar.gz: f792da2cbde29ad8b063770b3246efbe3bba82d763344ffa26b5ba3e6374615194cee78d12764b681328d008c93dba37c814ffaa0acbc01696b30977ab9298ca
@@ -67,7 +67,7 @@ ActiveList = {}
67
67
  $(cell).data('list-cell-value')
68
68
 
69
69
  # Select a row of "many" buttons
70
- AL.select = (checkbox) ->
70
+ AL.select = (checkbox, update = true) ->
71
71
  list = checkbox.closest('*[data-list-source]')
72
72
  row = checkbox.closest('tr')
73
73
  selection = if list.prop('selection')? then list.prop('selection') else {}
@@ -80,9 +80,9 @@ ActiveList = {}
80
80
  delete selection[key] if present
81
81
  row.removeClass("selected")
82
82
  list.prop('selection', selection)
83
-
84
- AL.updateResults list
85
- AL.checkGlobalButtons list
83
+ if update
84
+ AL.updateResults list
85
+ AL.checkGlobalButtons list
86
86
 
87
87
  AL.updateResults = (list) ->
88
88
  results = {}
@@ -121,9 +121,7 @@ ActiveList = {}
121
121
  actions = $("*[data-list-ref='#{list_id}']")
122
122
  caption = $(list).find("tr.selected-count th")
123
123
  length = Object.keys(selection).length
124
- console.log("HELLO")
125
124
  caption.text(caption.text().replace(new RegExp('(##NUM##|\\d+)'), length))
126
- console.log "#{length}"
127
125
  if length > 0
128
126
  caption.parent().show()
129
127
  actions.find("*[data-list-actioner='none']:visible").hide()
@@ -217,8 +215,11 @@ ActiveList = {}
217
215
 
218
216
  $(document).on "change", "input[data-list-selector=all]", (event) ->
219
217
  check = $(this).is(':checked')
220
- $(this).closest("table").find("td > input[data-list-selector]:not(:checked)").click() if check
221
- $(this).closest("table").find("td > input[data-list-selector]:checked").click() unless check
218
+ $(this).closest("table").find("td > input[data-list-selector]").each ->
219
+ $(this).prop('checked', check).parents('tr').toggleClass('selected', check)
220
+ AL.select($(this), false)
221
+ AL.updateResults $(this).closest('*[data-list-source]')
222
+ AL.checkGlobalButtons $(this).closest('*[data-list-source]')
222
223
 
223
224
  # Change page of table on link clicks
224
225
  $(document).on "click", "*[data-list-ref] a[data-list-move-to-page]", (event) ->
@@ -1,3 +1,3 @@
1
1
  module ActiveList
2
- VERSION = '6.9.0'.freeze
2
+ VERSION = '6.9.1'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: active_list
3
3
  version: !ruby/object:Gem::Version
4
- version: 6.9.0
4
+ version: 6.9.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brice Texier
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-05-04 00:00:00.000000000 Z
11
+ date: 2017-05-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -228,7 +228,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
228
228
  version: '0'
229
229
  requirements: []
230
230
  rubyforge_project:
231
- rubygems_version: 2.4.5.1
231
+ rubygems_version: 2.6.8
232
232
  signing_key:
233
233
  specification_version: 4
234
234
  summary: Simple interactive tables for Rails app