weaver 0.6.8 → 0.6.9

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/lib/weaver/version.rb +1 -1
  3. data/lib/weaver.rb +16 -2
  4. metadata +2 -2
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 855c38159284998395ceeed4e25e6c209bfced47
4
- data.tar.gz: 9faef50675895e6c1b4d815adcf71b33009e71a3
3
+ metadata.gz: 8d00d7630fc59ad250dc9c6575d6bea90bcbbb41
4
+ data.tar.gz: ba7ad6448f4945cd08bb84965401b3b6a6aec7e0
5
5
  SHA512:
6
- metadata.gz: fe322f7d851d80eb7779a7dbce88508124962b7eecb12414c232fa5fc6cb506ccefb5393351464ed154d548a301ebef5fb209a35d70b85c0fac3589226867fe8
7
- data.tar.gz: bac44a79946f82646a36845b3d5376786ed0d810830aa2b0435e8a300c28e263404a9b700a0cb515870db9d365aeb3e0d36f87c336c872e0428286534f837ec4
6
+ metadata.gz: 193ac8071bb876c0e6fc50ef52c84364202f863f8b68b00f33ce8d9e4f27ec8768b892dad47c5892b46b7dc3ecc63c13fc022b74c19f60643b39a10beac1d5f4
7
+ data.tar.gz: 5d80f7cad10d6e4daf330ddb2fb28cc9a81e89bd77856a2cd4a5631058cdbec45df55cec30f589feefa0d1492831ad38784f2ebe1d468822409185b42be76125
@@ -1,3 +1,3 @@
1
1
  module Weaver
2
- VERSION = "0.6.8"
2
+ VERSION = "0.6.9"
3
3
  end
data/lib/weaver.rb CHANGED
@@ -520,6 +520,7 @@ module Weaver
520
520
  table_name = options[:id] || @page.create_anchor("table")
521
521
  table_style = ""
522
522
 
523
+
523
524
  if options[:style] != nil
524
525
  table_style = options[:style]
525
526
  end
@@ -530,6 +531,12 @@ module Weaver
530
531
  classname += " table-hover" if options[:hover]
531
532
  classname += " table-striped" if options[:striped]
532
533
 
534
+ table_options = {
535
+ class: classname,
536
+ id: table_name,
537
+ style: table_style
538
+ }
539
+
533
540
  if options[:system] == :data_table
534
541
  @page.request_js "js/plugins/dataTables/jquery.dataTables.js"
535
542
  @page.request_js "js/plugins/dataTables/dataTables.bootstrap.js"
@@ -546,7 +553,13 @@ module Weaver
546
553
  end
547
554
 
548
555
  if options[:system] == :foo_table
549
- classname += " toggle-arrow-tiny"
556
+ input type: "text", class: "form-control input-sm m-b-xs", id: "#{table_name}_filter", placeholder: "Search in table"
557
+
558
+ table_options[:"data-filter"] = "##{table_name}_filter"
559
+ table_options[:"data-page-size"] = "#{options[:max_items_per_page].to_i || 8}"
560
+ table_options[:class] = table_options[:class] + " toggle-arrow-tiny"
561
+
562
+
550
563
  @page.request_js "js/plugins/footable/footable.all.min.js"
551
564
 
552
565
  @page.request_css "css/plugins/footable/footable.core.css"
@@ -557,7 +570,8 @@ module Weaver
557
570
  end
558
571
 
559
572
 
560
- method_missing(:table, :class => classname, id: table_name, style: table_style, &block)
573
+ method_missing(:table, table_options, &block)
574
+ ul class: "pagination"
561
575
  end
562
576
 
563
577
  def table_from_source(url, options={}, &block)
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: weaver
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.6.8
4
+ version: 0.6.9
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Siaw
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2018-09-23 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport