caboose-cms 0.8.30 → 0.8.31
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/assets/javascripts/caboose/model/index_table.js +15 -0
- data/lib/caboose/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: c8f8a99af4e04e3ae411be155833129e5ceb95fc
|
4
|
+
data.tar.gz: 378c7c4b12f24ce825eb2e2631b17736c7a8acc8
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 08fe603657e033d8edfb2892d0a12d834d121052cd9cd954105a10883ab0594fba597f179fc4dd70d3e0f38a61e434a1627abefab6ff0160a7ec62e00fee0172
|
7
|
+
data.tar.gz: 3a90f78c0d4d64d59058fac1e7220a0dbac735cabab46b819675f4044d0dabeaf17e5d481e88860287a6027c1d959bba627c6da31292043b47473598da5786f0
|
@@ -89,6 +89,8 @@ IndexTable.prototype = {
|
|
89
89
|
custom_row_controls: false,
|
90
90
|
after_print: false,
|
91
91
|
table_class: 'data',
|
92
|
+
allow_export: false,
|
93
|
+
export_url: false,
|
92
94
|
|
93
95
|
//============================================================================
|
94
96
|
// End of parameters
|
@@ -287,6 +289,7 @@ IndexTable.prototype = {
|
|
287
289
|
if (this.allow_bulk_import ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_bulk_import' ).val('Import' ).click(function(e) { that.bulk_import(); })).append(' ');
|
288
290
|
if (this.allow_duplicate ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_duplicate' ).val('Duplicate' ).click(function(e) { that.duplicate(); })).append(' ');
|
289
291
|
if (this.allow_bulk_delete ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_bulk_delete' ).val('Delete' ).click(function(e) { that.bulk_delete(); })).append(' ');
|
292
|
+
if (this.allow_export ) controls.append($('<input/>').attr('type', 'button').attr('id', this.container + '_export' ).val('Export' ).click(function(e) { that.csv_export(); })).append(' ');
|
290
293
|
|
291
294
|
var c = $('#' + that.container);
|
292
295
|
c.empty();
|
@@ -689,6 +692,18 @@ IndexTable.prototype = {
|
|
689
692
|
});
|
690
693
|
},
|
691
694
|
|
695
|
+
csv_export: function()
|
696
|
+
{
|
697
|
+
var that = this;
|
698
|
+
var p = this.pager_params();
|
699
|
+
var qs = [];
|
700
|
+
$.each(p, function(k,v) {
|
701
|
+
if (k != '[object Object]') qs.push('' + k + '=' + encodeURIComponent(v));
|
702
|
+
});
|
703
|
+
var url = that.export_url ? that.export_url : that.base_url + '/export.csv';
|
704
|
+
window.location = url + '?' + qs.join('&');
|
705
|
+
},
|
706
|
+
|
692
707
|
pager_div: function(summary)
|
693
708
|
{
|
694
709
|
var that = this;
|
data/lib/caboose/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: caboose-cms
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.8.
|
4
|
+
version: 0.8.31
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- William Barry
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-
|
11
|
+
date: 2016-08-02 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pg
|