tabulatr2 0.9.36 → 0.9.37
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 53dad1e2c59e15c866b409f8865792fccef046d3
|
4
|
+
data.tar.gz: 5c4be7ebbb61b317706be92d5f2b38690257a98c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9f99fe355295d552b97d96d917344d4511eb72fe99d5720c034152be772de2ade98d412cf705905351ff0a0fa6205b871af29490ab987bf7b68f1919c62d0f44
|
7
|
+
data.tar.gz: f8dbe093d43d35b9f3e5dcb4fbe26c94aabeeab2f1925635b763d51266ceeb587ea735048b449eadf5976a908d493f1f4c7aed7193b4632f770858fe459b1fcc
|
@@ -36,13 +36,16 @@ Tabulatr.prototype = {
|
|
36
36
|
this.loadDataFromServer(hash);
|
37
37
|
},
|
38
38
|
|
39
|
-
sendRequestWithoutAjax: function(hash) {
|
39
|
+
sendRequestWithoutAjax: function(hash, extension) {
|
40
40
|
var data = this.getDataForAjax(hash);
|
41
41
|
var url;
|
42
42
|
if ($('table#'+ this.id).data('path') == '#')
|
43
|
-
url = $(location).attr("pathname")
|
43
|
+
url = $(location).attr("pathname");
|
44
44
|
else
|
45
|
-
url = $('table#'+ this.id).data('path')
|
45
|
+
url = $('table#'+ this.id).data('path');
|
46
|
+
if (!extension || extension.length == 0)
|
47
|
+
extension = 'txt';
|
48
|
+
url = url.replace(/\/+$/, "") + '.' + extension + '?' + $.param(data);
|
46
49
|
window.open(url);
|
47
50
|
},
|
48
51
|
|
@@ -28,14 +28,17 @@
|
|
28
28
|
ul.dropdown-menu role="menu" aria-labelledby="dLabel" data-confirm-text=t('tabulatr.batch_confirm_text')
|
29
29
|
- table_options[:batch_actions].each do |key, data|
|
30
30
|
- if data.is_a?(String)
|
31
|
-
- label
|
32
|
-
- download
|
31
|
+
- label = data
|
32
|
+
- download = false
|
33
|
+
- extension = nil
|
33
34
|
- else
|
34
35
|
- label = data[:text]
|
35
36
|
- download = !!data[:download]
|
37
|
+
- extension = data[:extension]
|
36
38
|
li
|
37
39
|
= link_to label, '#', class: "batch-action-inputs", data: { \
|
38
40
|
"do-batch-action-name" => iname, \
|
39
41
|
"do-batch-action" => key, \
|
40
42
|
"table-id" => table_id, \
|
41
|
-
"download" => download
|
43
|
+
"download" => download, \
|
44
|
+
"extension" => extension }
|
@@ -32,9 +32,9 @@ class Tabulatr::Data::Invoker
|
|
32
32
|
@result ||= if @batch_action == name
|
33
33
|
s = yield(@ids)
|
34
34
|
if s.is_a?(Hash) && s[:data]
|
35
|
-
Tabulatr::Responses::RawResponse.new(s[:data])
|
35
|
+
Tabulatr::Responses::RawResponse.new(s[:data], filename: s[:filename], type: s[:type])
|
36
36
|
elsif s.is_a?(Hash) && s[:file]
|
37
|
-
Tabulatr::Responses::FileResponse.new(s[:file], filename: s[:filename])
|
37
|
+
Tabulatr::Responses::FileResponse.new(s[:file], filename: s[:filename], type: s[:type])
|
38
38
|
elsif s.is_a?(Hash) && s[:url]
|
39
39
|
Tabulatr::Responses::RedirectResponse.new(s[:url], ids: @ids)
|
40
40
|
else
|
data/lib/tabulatr/version.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: tabulatr2
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.9.
|
4
|
+
version: 0.9.37
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Peter Horn
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2017-
|
13
|
+
date: 2017-12-05 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: rails
|
@@ -280,7 +280,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
280
280
|
version: '0'
|
281
281
|
requirements: []
|
282
282
|
rubyforge_project:
|
283
|
-
rubygems_version: 2.6.
|
283
|
+
rubygems_version: 2.6.14
|
284
284
|
signing_key:
|
285
285
|
specification_version: 4
|
286
286
|
summary: A tight DSL to build tables of ActiveRecord models with sorting, pagination,
|