tabulatr2 0.8.8 → 0.8.9

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: f4d632b7ef3a02bfc432ff6281a41ea6ade9231b
4
- data.tar.gz: 5db20e1ce285e979a72a544c08dfe7c224afddbf
3
+ metadata.gz: e5ce50ecf99d801c82194b66ada63d0f89cb3d23
4
+ data.tar.gz: df7ffad4b2cd63c92c6d18279b8b1f1ecd9dfd28
5
5
  SHA512:
6
- metadata.gz: 5bc17e8ade01f2ee73e08d6daea2df5254b46a23d0d3783aed7214fff66e9521492f6e065cc691cbe4dd4be4c7b29eacc7eae0b67527ffe3432219c924e3a70a
7
- data.tar.gz: 319b8c9861bc83179d78447197d7b0ec848066eb98aa89c5204b2e20843766fb040d5078638b6fd5b77ab9bb465737883324090ef862312ed1fb8a9d74829a19
6
+ metadata.gz: 8ae9fba512fd7395ebc96e3bf0e03b0c909e0985f96165d7aa81b88d1aac71a50dc871c2f6702b3953774a56ff23d61165d49c1418061ace5dc1a421a5aaba63
7
+ data.tar.gz: 158c404a8e6bd33faf8728f641f278972cb2d72d7c3fc2bb11bfd03ea74929cf39325b085fb27f5d3415ca65b07b5acb4047bb5c9b9f74ad3bafbb438a35ea3b
data/CHANGELOG.md CHANGED
@@ -1,3 +1,8 @@
1
+ ## 0.8.9
2
+
3
+ * fix sorting, filtering, searching and batch_actions for tables whose class
4
+ is camelCased.
5
+
1
6
  ## 0.8.8
2
7
 
3
8
  * new Generator:
@@ -264,18 +264,6 @@ $(document).on('ready page:load', function(){
264
264
  Tabulatr.updateTable({}, tableId);
265
265
  });
266
266
 
267
- var cbfn = function(event, isInView, visiblePartX, visiblePartY) {
268
- if (isInView) {
269
- // element is now visible in the viewport
270
- if (visiblePartY == 'top') {
271
- // top part of element is visible
272
- } else if (visiblePartY == 'bottom') {
273
- // bottom part of element is visible
274
- } else {
275
- Tabulatr.updateTable({append: true}, $(event.currentTarget).data('table'));
276
- }
277
- }
278
- };
279
267
 
280
268
  $('.tabulatr_table').each(function(ix, el){
281
269
  if($('.pagination[data-table="'+ $(el).attr('id') +'"]').length == 0){
@@ -454,3 +442,17 @@ $(document).on('change', 'select[data-tabulatr-date-filter]', function() {
454
442
  select.parents('.controls').find(".from_to").hide().val('');
455
443
  }
456
444
  });
445
+
446
+
447
+ var cbfn = function(event, isInView, visiblePartX, visiblePartY) {
448
+ if (isInView) {
449
+ // element is now visible in the viewport
450
+ if (visiblePartY == 'top') {
451
+ // top part of element is visible
452
+ } else if (visiblePartY == 'bottom') {
453
+ // bottom part of element is visible
454
+ } else {
455
+ Tabulatr.updateTable({append: true}, $(event.currentTarget).data('table'));
456
+ }
457
+ }
458
+ };
@@ -20,7 +20,7 @@
20
20
  / WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
22
  - if table_options[:batch_actions]
23
- - iname = "#{classname}_batch"
23
+ - iname = "#{formatted_name}_batch"
24
24
  .dropdown
25
25
  a.btn.btn-default data-toggle="dropdown" href="#"
26
26
  i.icon-cog.glyphicon.glyphicon-cog.fa.fa-cog'
@@ -21,12 +21,12 @@
21
21
 
22
22
 
23
23
  form.form.form-horizontal.tabulatr_filter_form data-table=table_id data-remote="true" role='form'
24
- input name="#{classname}_sort" type="hidden" value=table_options[:order_by]
24
+ input name="#{formatted_name}_sort" type="hidden" value=table_options[:order_by]
25
25
  - if table_options[:filter] && columns.filtered_columns.present?
26
26
  - columns.filtered_columns.each do |column|
27
27
  - name = column.full_name
28
28
  .control-group.form-group data-filter-column-name=name
29
- - iname = "#{classname}_filter[#{name}]"
29
+ - iname = "#{formatted_name}_filter[#{name}]"
30
30
  - filter_name = "tabulatr_form_#{name}"
31
31
 
32
32
  label.control-label.col-md-3 for=filter_name
@@ -54,7 +54,7 @@ form.form.form-horizontal.tabulatr_filter_form data-table=table_id data-remote=
54
54
  input.tabulatr_filter.form-control type="text" id="#{name}_from" data-tabulatr-attribute="#{name}" name="#{iname}"
55
55
  - elsif column.filter == :date
56
56
  .col-md-3
57
- select.form-control name="#{iname}[date][simple]" data-tabulatr-date-filter="#{classname}_#{name}_filter"
57
+ select.form-control name="#{iname}[date][simple]" data-tabulatr-date-filter="#{formatted_name}_#{name}_filter"
58
58
  option= I18n.t("tabulatr.date_filter.none")
59
59
  option value="today"= I18n.t("tabulatr.date_filter.today")
60
60
  option value="yesterday"= I18n.t("tabulatr.date_filter.yesterday")
@@ -65,12 +65,12 @@ form.form.form-horizontal.tabulatr_filter_form data-table=table_id data-remote=
65
65
  option value="from_to"= I18n.t("tabulatr.date_filter.from_to")
66
66
  .col-md-1
67
67
  .col-md-3
68
- input.tabulatr_filter.form-control.date-picker.hidden.from_to type="text" id="#{classname}_#{name}_filter_from" name="#{iname}[date][from]"
68
+ input.tabulatr_filter.form-control.date-picker.hidden.from_to type="text" id="#{formatted_name}_#{name}_filter_from" name="#{iname}[date][from]"
69
69
  .col-md-1.text-center
70
70
  .span.from_to.hidden
71
71
  |—
72
72
  .col-md-3
73
- input.tabulatr_filter.form-control.date-picker.from_to.hidden type="text" id="#{classname}_#{name}_filter_to" name="#{iname}[date][to]"
73
+ input.tabulatr_filter.form-control.date-picker.from_to.hidden type="text" id="#{formatted_name}_#{name}_filter_to" name="#{iname}[date][to]"
74
74
  - else
75
75
  .col-md-11
76
76
  input.tabulatr_filter.form-control type="text" id="#{name}_from" data-tabulatr-attribute="#{name}" name="#{iname}[like]"
@@ -21,4 +21,4 @@
21
21
 
22
22
  form#product_fuzzy_search.form-inline.tabulatr-fuzzy-search.pull-right data-table=table_id role="form"
23
23
  .form-group
24
- input.form-control.search id="#{klass.name.underscore}_fuzzy_search_query" placeholder="Search" type="search"
24
+ input.form-control.search id="#{formatted_name}_fuzzy_search_query" placeholder="Search" type="search"
@@ -19,9 +19,11 @@
19
19
  / OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
20
  / WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
21
21
 
22
- - table_id = "#{klass.to_s.gsub(/::/, '--').downcase}_table"
22
+ - formatted_name = "#{klass.to_s.gsub(/::/, '--').downcase}"
23
+ - table_id = "#{formatted_name}_table"
23
24
  - opts = { columns: columns, table_options: table_options, \
24
- klass: klass, classname: classname, table_id: table_id }
25
+ klass: klass, classname: classname, table_id: table_id,
26
+ formatted_name: formatted_name }
25
27
 
26
28
  .tabulatr-table-controls-wrapper data-table-id=table_id
27
29
  .tabulatr-filter-menu-wrapper data-table-id=table_id
@@ -22,5 +22,5 @@
22
22
  #++
23
23
 
24
24
  module Tabulatr
25
- VERSION = "0.8.8"
25
+ VERSION = "0.8.9"
26
26
  end
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.8.8
4
+ version: 0.8.9
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: 2013-11-16 00:00:00.000000000 Z
13
+ date: 2013-12-02 00:00:00.000000000 Z
14
14
  dependencies:
15
15
  - !ruby/object:Gem::Dependency
16
16
  name: rails
@@ -267,4 +267,3 @@ test_files:
267
267
  - spec/features/tabulatrs_spec.rb
268
268
  - spec/lib/tabulatr/data/data_spec.rb
269
269
  - spec/spec_helper.rb
270
- has_rdoc: