ui_bibz 2.3.11 → 2.3.12

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
  SHA256:
3
- metadata.gz: d03105e6c5996d6506ab3a33eeb19c946ebc17c2437faacb014d92d2a505357b
4
- data.tar.gz: 5db7b3015c910e93b6a0993875707acc5d4409c8fa483ec96621276ebe684b68
3
+ metadata.gz: 10cd9ab9b647ff28c979bfeb508fea49c78547a3efd216a585cfd131da3c5d10
4
+ data.tar.gz: f95eacbe232aa7ffc032cc45e7b0e5b80f816f23be04991b87d2f0fbe2f2a234
5
5
  SHA512:
6
- metadata.gz: dcf082fd760e2edd532c73b4363b0f6dc776728997f3ac6e757bb8ab40ce9cc27ec9d8f9cbc2e238a7558f66b7d5480dccd9e6cab8a777305333c24354078248
7
- data.tar.gz: 70f28783259e20ae083e7d8c8490fb13e7aced071f8a6e778b772161f06e2b8a4ff260a1ce4925db3fa0d39f8c3458beee65141dfc3c337548dbc4032eab1813
6
+ metadata.gz: f48645facb46cd7043564db494fd82075c85397e5e5ed1469d7548622f8b8b31adbc112d1ff9911a40c83346643ebef0aa8c9c0804698a5965833b152a3ca560
7
+ data.tar.gz: 5b88aee7f088609fcc0ee7aba8e5dcbfa4ecee5ddf66c8b165cda864b1bf625ff64cd96d36ac5aa3c9d2d0afd3c103dcb9946fcaa5f547844f96c7219fe3d3f0
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- ui_bibz (2.3.11)
4
+ ui_bibz (2.3.12)
5
5
  bootstrap (= 4.3.1)
6
6
  haml
7
7
  haml-rails
@@ -56,17 +56,20 @@
56
56
  return this.each ->
57
57
  component = $(this)
58
58
  connect = component.data().connect
59
- connect.target = connect.target || {}
59
+
60
+ if ! connect.targets?
61
+ connect.target = connect.target || {}
62
+ connect.target.url = connect.target.url || settings.target.url
63
+ connect.target.data = connect.target.data || settings.target.data
64
+ connect.target.selector = connect.target.selector || settings.target.selector
65
+
66
+ connect.targets = connect.targets || []
67
+ connect.targets.push(connect.target) if connect.target?
68
+
60
69
  return unless connect?
61
70
 
62
- mode = connect.mode || settings.mode
71
+ connectMode = connect.mode || settings.mode
63
72
  events = connect.events || settings.events
64
- target =
65
- url: connect.target.url || settings.target.url
66
- data: connect.target.data || settings.target.data
67
- selector: connect.target.selector || settings.target.selector
68
-
69
- componentTarget = $("#{ target.selector }")
70
73
 
71
74
  component.on events, (e) ->
72
75
  e.preventDefault()
@@ -77,17 +80,22 @@
77
80
  name = if name? then name else "id"
78
81
  #name = if Array.isArray(values) then "#{ name }s" else name
79
82
 
80
- if mode == "remote"
81
- params = { "#{ name }": values }
82
- $.ajax({ url: target.url, data: params }).done (data) ->
83
- updateTargetComponent(data, componentTarget, component)
83
+ connect.targets.forEach (target) ->
84
+ componentTarget = $("#{ target.selector }")
85
+
86
+ mode = target.mode || connectMode
84
87
 
85
- if mode == "local"
86
- data = target.data || settings.target.data
87
- data = data.filter (value) ->
88
- values = [].concat.apply([], [values]) # flatten
89
- return values.includes(String(value.connect_option_id))
88
+ if mode == "remote"
89
+ params = { "#{ name }": values }
90
+ $.ajax({ url: target.url, data: params }).done (data) ->
91
+ updateTargetComponent(data, componentTarget, component)
90
92
 
91
- updateTargetComponent(data, componentTarget, component)
93
+ if mode == "local"
94
+ data = target.data || settings.target.data
95
+ data = data.filter (value) ->
96
+ values = [].concat.apply([], [values]) # flatten
97
+ return values.includes(String(value.connect_option_id))
98
+
99
+ updateTargetComponent(data, componentTarget, component)
92
100
 
93
101
  )(jQuery)
@@ -1,6 +1,6 @@
1
1
  module UiBibz
2
2
  NAME = "Ui Bibz"
3
- VERSION = "2.3.11"
3
+ VERSION = "2.3.12"
4
4
  DESCRIPTION = "A Rails Interface Framework using Bootstrap."
5
5
  SUMMARY = "Create your project with Ui Bibz. Over a thirty reusable components built to provide iconography, dropdowns, input groups, navigation, alerts, and much more."
6
6
  LICENSE = "MIT"
@@ -25,7 +25,11 @@ module UiBibz
25
25
  end
26
26
 
27
27
  initializer 'font-awesome-sass.assets.precompile', group: :all do |app|
28
- config.assets.precompile << /\.(?:svg|eot|woff|woff2|ttf)\z/
28
+ %w[eot svg ttf woff woff2].each do |ext|
29
+ app.config.assets.precompile << "fonts/fa-brands-400.#{ext}"
30
+ app.config.assets.precompile << "fonts/fa-regular-400.#{ext}"
31
+ app.config.assets.precompile << "fonts/fa-solid-900.#{ext}"
32
+ end
29
33
  end
30
34
 
31
35
  config.after_initialize do
@@ -9,7 +9,13 @@ module UiBibz::Ui::Ux::Tables
9
9
  # header use i18n
10
10
  def header column, name = nil
11
11
  @column = column
12
- defaults = [translate_headers_by_defaults, translate_headers_by_defaults_active_record, translate_headers_by_active_record, header_name(name)]
12
+ defaults = [
13
+ header_name(name),
14
+ translate_headers_by_defaults,
15
+ translate_headers_by_defaults_active_record,
16
+ translate_headers_by_active_record,
17
+ default_header_name(name)
18
+ ].compact
13
19
  @name = UiBibz::Utils::Internationalization.new(translate_headers_by_model, default: defaults).translate
14
20
  sortable? ? sortable_link : title
15
21
  end
@@ -21,7 +27,10 @@ module UiBibz::Ui::Ux::Tables
21
27
  end
22
28
 
23
29
  def header_name name
24
- name = name || @column.name
30
+ name || @column.name
31
+ end
32
+
33
+ def default_header_name name
25
34
  name || @column.data_index.to_s.try('titleize')
26
35
  end
27
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: ui_bibz
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.3.11
4
+ version: 2.3.12
5
5
  platform: ruby
6
6
  authors:
7
7
  - Thooams