caboose-cms 0.8.36 → 0.8.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: c6d43c4905b9690830088e68bbbfacedd0221392
4
- data.tar.gz: 5e4f8fdf7b7adb741d6698f37f73d112cf94cc73
3
+ metadata.gz: 5553dcb87bfffa33afeb38413e06139408b2fca5
4
+ data.tar.gz: be19b6c314a15b6d21383fa97501c3db1b3af38a
5
5
  SHA512:
6
- metadata.gz: e9cb9272ec36f64fd4412f571eaae7cc4d8b6c78d9c653188a9fd9a423336829027a6f353ab867730fa7b964867ea1f05027fc1a0f24bb2522357aad6b43759f
7
- data.tar.gz: 5d81e97b983b0518e0337096339289e7d29519c13c017e82e88bc90dd152b0ff4c598e820c494c4303db9452f448a519076c424cca5a8ab2ac33d5ba8383a53e
6
+ metadata.gz: 18ab34a8272e6fbfb4d801679e592efaf454798527ff54e1b2f4358713b525660198a9c82a1f97d1fb8afbfc86206661e85e520b6c05731dd9b372dbd84fcc2c
7
+ data.tar.gz: c7c05847ef25b9249d6ecf1bddcd5c040d37013084051a5304dce776aba83daa8abc9df47d8f73a0cd809414fc52e321b82313fcf726bd193eb8585c568a146d
@@ -90,7 +90,7 @@ IndexTable.prototype = {
90
90
  after_print: false,
91
91
  table_class: 'data',
92
92
  allow_export: false,
93
- export_url: false,
93
+ export_urls: false,
94
94
 
95
95
  //============================================================================
96
96
  // End of parameters
@@ -700,8 +700,24 @@ IndexTable.prototype = {
700
700
  $.each(p, function(k,v) {
701
701
  if (k != '[object Object]') qs.push('' + k + '=' + encodeURIComponent(v));
702
702
  });
703
- var url = that.export_url ? that.export_url : that.base_url + '/export.csv';
704
- window.location = url + '?' + qs.join('&');
703
+ //var url = that.export_url ? that.export_url : that.base_url + '/export.csv';
704
+
705
+ var urls = that.export_urls ? that.export_urls : { "Export": that.base_url + '/export.csv' };
706
+
707
+ if (urls.length == 1)
708
+ window.location = url + '?' + qs.join('&');
709
+ else
710
+ {
711
+ var div = $('<div/>').addClass('note')
712
+ .append($('<p/>').append('Which export would you like to run?'));
713
+ var p = $('<p/>');
714
+ $.each(urls, function(name, url) {
715
+ p.append($('<input/>').attr('type', 'button').val(name).click(function(e) { window.location = url + '?' + qs.join('&'); })).append(' ');
716
+ });
717
+ div.append(p);
718
+ div.append($('<p/>').append($('<input/>').attr('type', 'button').val('Cancel').click(function(e) { that.hide_message(); })));
719
+ that.show_message(div);
720
+ }
705
721
  },
706
722
 
707
723
  pager_div: function(summary)
@@ -1,3 +1,3 @@
1
1
  module Caboose
2
- VERSION = '0.8.36'
2
+ VERSION = '0.8.37'
3
3
  end
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.36
4
+ version: 0.8.37
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-08-04 00:00:00.000000000 Z
11
+ date: 2016-08-05 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pg