weaver 0.6.8 → 0.6.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/weaver/version.rb +1 -1
- data/lib/weaver.rb +16 -2
- 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: 8d00d7630fc59ad250dc9c6575d6bea90bcbbb41
|
|
4
|
+
data.tar.gz: ba7ad6448f4945cd08bb84965401b3b6a6aec7e0
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 193ac8071bb876c0e6fc50ef52c84364202f863f8b68b00f33ce8d9e4f27ec8768b892dad47c5892b46b7dc3ecc63c13fc022b74c19f60643b39a10beac1d5f4
|
|
7
|
+
data.tar.gz: 5d80f7cad10d6e4daf330ddb2fb28cc9a81e89bd77856a2cd4a5631058cdbec45df55cec30f589feefa0d1492831ad38784f2ebe1d468822409185b42be76125
|
data/lib/weaver/version.rb
CHANGED
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
|
-
|
|
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,
|
|
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.
|
|
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-
|
|
11
|
+
date: 2018-09-23 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: activesupport
|