active_list 6.8.0 → 6.8.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: 675ea8ac7abb522168fc6c75a163f3231870ee3a
4
- data.tar.gz: 205969fb627d1b2e2bc2541940d75fb9a0b2426c
3
+ metadata.gz: bf653fae0c20c3b8ed8bf9ca717754e9430f6a6a
4
+ data.tar.gz: 57eaff2c913987fa4d968e2d37d691728e9c85ba
5
5
  SHA512:
6
- metadata.gz: c7d903bdf0235f855621d0c421dda0b6f6d34ae8612c4d2e3c05c4db2b9227fef2a71f34265f38b617505b8ad003a78fbf19926a6dc53b37f072ee7ef247fa80
7
- data.tar.gz: cd58bbd9e14793ba3231ee5127c9171082a1206c57f92b81b17379af7242349b9fc9ede02e2b79fad5d67005ae5364dedd8b5fbb7ea7f99a7bd36fb32eb3d8f6
6
+ metadata.gz: b2e5a72d8b4174fa56d4b75c7986fdef8a601e3bf537474c1e4426578369f0a9e839f78f9002d0eaf5c28d1819381fbbeeed1e42e973c73dc0e129c178294cbf
7
+ data.tar.gz: a381d18e21c80e82c15785c42fc3051e9bdcb31d7499e3762bca9e12d47151fb96ca6d5a8426697d140d07d83b92ae98f4b77503dfbe301221a588ad3729be50
@@ -119,16 +119,18 @@ ActiveList = {}
119
119
  selection = list.prop('selection')
120
120
  list_id = list.attr('id')
121
121
  actions = $("*[data-list-ref='#{list_id}']")
122
- caption = $(list).find("caption")
122
+ caption = $(list).find("tr.selected-count th")
123
123
  length = Object.keys(selection).length
124
+ console.log("HELLO")
124
125
  caption.text(caption.text().replace(new RegExp('(##NUM##|\\d+)'), length))
126
+ console.log "#{length}"
125
127
  if length > 0
126
- caption.show()
128
+ caption.parent().show()
127
129
  actions.find("*[data-list-actioner='none']:visible").hide()
128
130
  actions.find("*[data-list-actioner='none']:visible").hide()
129
131
  actions.find("*[data-list-actioner='many']:hidden").show()
130
132
  else
131
- caption.hide()
133
+ caption.parent().hide()
132
134
  actions.find("*[data-list-actioner='none']:hidden").show()
133
135
  actions.find("*[data-list-actioner='many']:visible").hide()
134
136
  actions.find("*[data-list-actioner='many']").each (index) ->
@@ -147,9 +149,6 @@ ActiveList = {}
147
149
  page: page
148
150
  false
149
151
 
150
- $(document).on "load", "*[data-list-source]", (event) ->
151
- AL.refresh $(this)
152
-
153
152
  # Sort by one column
154
153
  $(document).on "click", "*[data-list-source] th[data-list-column][data-list-column-sort]", (event) ->
155
154
  sorter = $(this)
@@ -296,7 +296,7 @@ module ActiveList
296
296
  code << "'<thead><tr>"
297
297
  if table.selectable?
298
298
  code << '<th class="list-selector"><input type="checkbox" data-list-selector="all" /></th>'
299
- disclaimer = '<caption>\'+ "list.selected".t + \'</caption>'
299
+ disclaimer = '<tr class="selected-count" style="display: none;"><th colspan="1000">\'+ "list.selected".t + \'</th></tr>'
300
300
  end
301
301
  table.columns.each do |column|
302
302
  next if column.is_a?(ActiveList::Definition::ActionColumn) && !column.use_single?
@@ -315,9 +315,9 @@ module ActiveList
315
315
  code << '</th>'
316
316
  end
317
317
  # code << "<th class=\"spe\">#{menu_code}</th>"
318
- code << '</tr></thead>'
318
+ code << '</tr>'
319
319
  code << (disclaimer || '')
320
- code << "'"
320
+ code << "</thead>'"
321
321
  code
322
322
  end
323
323
 
@@ -1,3 +1,3 @@
1
1
  module ActiveList
2
- VERSION = '6.8.0'.freeze
2
+ VERSION = '6.8.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.8.0
4
+ version: 6.8.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-01-23 00:00:00.000000000 Z
11
+ date: 2017-01-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails