glib-web 0.5.35 → 0.5.41

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: 7ab027b2e06860edd4c9b20cee7936d370ef8ba92ebd15379ae6dbd8c20395de
4
- data.tar.gz: 3d55b83d631e5c01e915cb4be80515c47e82314d8eb8ad38eb29d3e8e42785c9
3
+ metadata.gz: 667c7e9bef646b1a11ed8237b4fca8490dfd5cc6308dc6bbe01284402fbf605d
4
+ data.tar.gz: 159bda20f1a5d19c1834d51669f7f8c990ad3ae34d766bec28e7b2ac6110b9cb
5
5
  SHA512:
6
- metadata.gz: 620795d7d88023f7f03a44991758a90a4fe7a3680ab09bbe4f37c3f6fc3cfdd24dba4bf09ba1ff134fdcf48325c51da8c142f8b72eb3cb35514717bb1c695c62
7
- data.tar.gz: 51bd223aa3543323b3c2215a5a0258a25d3f52009e8e0c1b6b1865101e5180f3f43dff034016d974da39a45702e00e38cb34b4e10edce8afeed3f45c4e088e1e
6
+ metadata.gz: 2443bf21f9099aae0fddeed21226f02c466b4b123c5a7f69d9677a0a96c268f45b96ff7c91abebbd203ed88d71dc92ce817252083d8997cf0b8e09a1fd46ddae
7
+ data.tar.gz: 05e3fca19eb376087e2444af5b8635110a0d14fc86a4c88210a4234018e90b228129ff6cd19ecb4792db6e060c5d3cf6dc3aa9777dcf3c996b4cf064ef21c96e
@@ -23,6 +23,7 @@ module Glib::Json::Ui
23
23
  options = {}
24
24
  options[:_render] = params[:_render]
25
25
  options[:_locale] = params[:_locale]
26
+ options[:_preview] = params[:_preview]
26
27
  options[:format] = :json if request.format == :json
27
28
  options
28
29
  end
@@ -56,7 +57,9 @@ module Glib::Json::Ui
56
57
  @__json_ui_activated = true
57
58
  request.variant = :ui
58
59
 
59
- if request.format.html? && params[:_skip_render] != 'true'
60
+ # Some bots (e.g. Line and DuckDuckGo) passes `*/*` in the `Accept` header
61
+ is_html = request.format.html? || request.format == '*/*'
62
+ if is_html && params[:_skip_render] != 'true'
60
63
  @__json_ui_rendering = :vue
61
64
  request.format = 'json'
62
65
  end
@@ -0,0 +1,8 @@
1
+ module Glib
2
+ module EnumHelper
3
+ def glib_enum_options(clazz, enum_field, keys = nil)
4
+ keys ||= clazz.send("#{enum_field}s").keys
5
+ keys.map { |i| { text: clazz.glib_enum_humanize(enum_field, i), value: i } }
6
+ end
7
+ end
8
+ end
@@ -263,6 +263,14 @@ module Glib
263
263
  end
264
264
  end
265
265
 
266
+ def self.menu(propName)
267
+ define_method(propName) do |value|
268
+ json.set! propName do
269
+ value.call(page.menu_builder)
270
+ end
271
+ end
272
+ end
273
+
266
274
  def self.singleton_array(singletonName, arrayName)
267
275
  array arrayName
268
276
 
@@ -7,23 +7,22 @@ module Glib
7
7
  end
8
8
 
9
9
  class AbstractTemplate < JsonUiElement
10
- # def contextButtons(block)
11
- # json.contextButtons do
10
+ menu :leftButtons
11
+ menu :rightButtons
12
+ menu :editButtons
13
+ menu :chips
14
+
15
+ # def editButtons(block)
16
+ # json.editButtons do
12
17
  # block.call page.menu_builder
13
18
  # end
14
19
  # end
15
20
 
16
- def editButtons(block)
17
- json.editButtons do
18
- block.call page.menu_builder
19
- end
20
- end
21
-
22
- def chips(block)
23
- json.chips do
24
- block.call page.menu_builder
25
- end
26
- end
21
+ # def chips(block)
22
+ # json.chips do
23
+ # block.call page.menu_builder
24
+ # end
25
+ # end
27
26
  end
28
27
 
29
28
  class Standard < AbstractTemplate
@@ -30,6 +30,7 @@ module Glib
30
30
  hash :padding
31
31
  singleton_array :styleClass, :styleClasses
32
32
  hash :showIf
33
+ hash :valueIf
33
34
  hash :analytics
34
35
 
35
36
  # def initialize(json, page)
@@ -157,6 +158,7 @@ module Glib
157
158
  float :longitude
158
159
  int :zoom
159
160
  string :dataUrl
161
+ bool :cluster
160
162
  end
161
163
 
162
164
  class Chip < View
@@ -4,10 +4,11 @@ class Glib::JsonUi::ViewBuilder
4
4
  class AbstractField < View
5
5
  bool :readOnly
6
6
  hash :validation
7
+ string :label
7
8
 
8
- def label(label)
9
- @label = label
10
- end
9
+ # def label(label)
10
+ # @label = label
11
+ # end
11
12
 
12
13
  def label_args(label_args)
13
14
  @label_args = label_args
@@ -39,20 +40,20 @@ class Glib::JsonUi::ViewBuilder
39
40
 
40
41
  def prop(prop)
41
42
  @prop = prop
42
- # if (form = page.current_form)
43
- # @name ||= form.field_name(prop)
44
- # @value ||= form.field_value(prop)
45
- # end
46
43
  end
47
44
 
48
45
  # Override
49
46
  def created
50
47
  if @prop && (form = page.current_form)
48
+ form.field_assert_respond_to(@prop)
49
+
51
50
  @name ||= form.field_name(@prop, @multiple || false)
52
51
  @value ||= form.field_value(@prop)
53
52
  @label ||= form.field_label(@prop, @label_args || {})
54
53
  @hint ||= form.hint_label(@prop, @hint_args || {})
55
54
  @placeholder ||= form.placeholder_label(@prop, @placeholder_args || {})
55
+
56
+ @validation ||= form.field_validation(@prop)
56
57
  end
57
58
  json.name @name
58
59
  json.value @value if @value
@@ -63,6 +64,9 @@ class Glib::JsonUi::ViewBuilder
63
64
  # - Placeholder gets hidden when there is input which may be confusing
64
65
  # - Placeholder competes with label for space
65
66
  json.placeholder @placeholder if @placeholder
67
+
68
+ # TODO: Add a flag so the framework's user can turn it on and off.
69
+ # json.validation @validation if @validation
66
70
  end
67
71
 
68
72
  end
@@ -16,6 +16,11 @@ class Glib::JsonUi::ViewBuilder
16
16
  @model.class.try(:reflect_on_association, prop)&.macro == :has_many
17
17
  end
18
18
 
19
+ def field_assert_respond_to(prop)
20
+ # Identify a prop being used on a nil model or incorrect model.
21
+ raise "Invalid property `#{prop}` on '#{@model.class}'" unless @model.respond_to?(prop)
22
+ end
23
+
19
24
  def field_name(prop, multiple)
20
25
  suffix = is_array_association?(prop) || multiple ? '[]' : ''
21
26
  "#{@model_name}[#{prop}]#{suffix}"
@@ -41,6 +46,16 @@ class Glib::JsonUi::ViewBuilder
41
46
  I18n.t("dt_models.#{@model_name}.#{prop}.placeholder", args.merge(default: nil))
42
47
  end
43
48
 
49
+ def field_validation(prop)
50
+ validations = {}
51
+ @model.class.validators_on(prop).each do |validator|
52
+ if validator.kind == :presence
53
+ validations[:required] = { message: 'Required' }
54
+ end
55
+ end
56
+ validations
57
+ end
58
+
44
59
  def url(url)
45
60
  @url = url
46
61
  end
@@ -0,0 +1,18 @@
1
+ module Glib
2
+ class ApplicationRecord < ActiveRecord::Base
3
+ self.abstract_class = true
4
+
5
+ scope :created_asc, -> { order(created_at: :asc) }
6
+ scope :created_desc, -> { order(created_at: :desc) }
7
+
8
+ def glib_enum_humanize(enum_name)
9
+ self.class.glib_enum_humanize(enum_name, send(enum_name))
10
+ end
11
+
12
+ def self.glib_enum_humanize(enum_name, enum_value)
13
+ if enum_value
14
+ I18n.t("activerecord.attributes.#{model_name.i18n_key}.#{enum_name.to_s.pluralize}.#{enum_value}")
15
+ end
16
+ end
17
+ end
18
+ end
@@ -0,0 +1,36 @@
1
+ json.title 'Forms'
2
+
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
7
+ form.spacer height: 20
8
+ form.h2 text: 'Date'
9
+ form.spacer height: 6
10
+ form.fields_date name: 'user[date_start]', width: 'matchParent', label: 'Start Date', min: '2010-01-01', max: '2012-01-01', value: '2010-02-01'
11
+ form.fields_date name: 'user[date_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01', valueIf: {
12
+ "+": [
13
+ {
14
+ "var": 'user[date_start]'
15
+ },
16
+ 24 * 3600
17
+ ]
18
+ }
19
+
20
+ form.spacer height: 20
21
+ form.h2 text: 'Date/Time'
22
+ form.spacer height: 6
23
+ form.fields_datetime name: 'user[datetime_start]', width: 'matchParent', label: 'Start Date', min: '2010-01-01', max: '2012-01-01', value: '2010-02-01T01:00'
24
+ form.fields_datetime name: 'user[datetime_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01', valueIf: {
25
+ "+": [
26
+ {
27
+ "var": 'user[datetime_start]'
28
+ },
29
+ 3600
30
+ ]
31
+ }
32
+
33
+ form.spacer height: 20
34
+ form.fields_submit text: 'Submit'
35
+ form.spacer height: 40
36
+ end
@@ -10,17 +10,24 @@ json_ui_page json do |page|
10
10
  render "#{@path_prefix}/nav_menu", json: json, page: page
11
11
 
12
12
  page.form options.merge(childViews: ->(form) do
13
- rules1 = { fileType: "image/*", maxFileSize: 5000 }
14
- rules2 = { fileType: "image/*", maxFileSize: 1, fileTypeErrorText: 'Invalid!', maxFileSizeErrorText: 'Too big!' }
15
- form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Landscape Photo', accepts: rules1, directUploadUrl: rails_direct_uploads_url,
13
+ rules = { fileType: 'image/*', maxFileSize: 5000 }
14
+ form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Landscape Photo', accepts: rules, directUploadUrl: rails_direct_uploads_url,
16
15
  value: 'eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--193dc0d939b9558fc4973fafbba91d989cbb04d4',
17
16
  fileUrl: 'https://imageserver-demo.herokuapp.com/image/itinerarybuilder-demo/o6CKzNt67PWnkPdUEnWMt7pr?h=100&w=100',
18
17
  fileTitle: '1 month ago',
19
18
  placeholderView: { type: 'image', width: 100, height: 75, url: 'https://www.atms.com.au/wp-content/uploads/2019/10/placeholder-1-1024x683.png?x93630' }
20
19
 
21
- form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Avatar', accepts: rules2, directUploadUrl: rails_direct_uploads_url,
20
+ rules = { fileType: 'image/*', maxFileSize: 1, fileTypeErrorText: 'Invalid!', maxFileSizeErrorText: 'Too big!' }
21
+ form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Avatar', accepts: rules, directUploadUrl: rails_direct_uploads_url,
22
22
  placeholderView: { type: 'avatar', width: 100,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ZOiuGk7d+lvDjtWnIOaX4SO+I43hhBO0NOJduds771IkBERAREQEREBERAREQEREBERAREQeFnPm621MvNAbGA0Xe9+l3DjsVYRoRY4tcCHNJBBxBGIV2Lx7bmpCj2lloiaoGkyX8Rw1Z8N++QQeNmDm7dlbIzf8lp/9h+nfcp5cvaX7osMEtYSGwbByCOBnTV9ONEAOv0w2oX3KY7Vl8jqY8KURhA1seNaIMB9+mG1C+5o4rLyDq48KIwgCTseNUAsuVx2IGXtJYYCNbDjWqOBJm3Dsg+mRL1CFoiwZcv3itzyDq48KUWWOAEjj+5IONF0PgbcDu+y0ESxQYREQEREBERAREQEREBERARfTGE4BdDGNbiaoNbYUhN3QfdbQy9penJYZMGbsONao4EmbcO3OiAHX6YbUL7uj+6rLyDq48KURpAEjj+5VQC25XHYgbfrhsWGAjWw41R4J1cOFKoMllyo5IGX6lYYCDN2HdHgkzbh2QGvv0NNqF93RWXkGjce1EaQBJ2Pf1QC25UV2IGXtL90WGAjWw71RwJM24dudEBrr9DTasRDLRIn819PIOrj2ojSAJOx7+qD4iWbce60uYRiF0MBGth3qskkmYw/exByIustacBPlRa3QW4TIPGvyQaEW91nl7QWPw53hBpRbhZydo7p5FZFwQaUXSYDRiSshu1rRLf8APFBoZDJwC2CEAZEzO4LbEde1T9FgESkdb67KoPqJo1HKWxfIZe0lhgIq7DujgSZtw7eiA11+hptQvu6P7qsvIOrj2ojSAJOx7+qAW3KiuxAy9pfuiwwEa2HeqOBJmMO3OiAHX6Gm1C65QV2rLzPVx7IwgUdj3QfVp1eqWfVREGqy49PskfW7IiDZasOv3WYGr3REGuy49FiPrdkRBstWHX7rMHV7rKINVlx6LEXX7IiDZasBzWYOp3+qyiDVZcTyWIuv2+iIg2WrAc1mHqdD9URB8WXEr5fr9R9ERBttOr1Sz6vdZRBpsuPT7JH1uyIg2WrDqswdTuiINdlxPJYtOt0REH//2Q==' }
23
23
 
24
+ rules = { fileType: 'pdf', maxFileSize: 5000 }
25
+ form.fields_file name: 'user[pdf1][]', width: 'matchParent', label: 'PDF Document', accepts: rules, directUploadUrl: rails_direct_uploads_url,
26
+ placeholderView: { type: 'image', width: 100, height: 100, url: 'data:image/webp;base64,UklGRqQVAABXRUJQVlA4TJcVAAAv/8F/ELWK4rZtHGn/tVOv/CNiAvik1tymPAJg9nKbNQXcCFtqZ1Ar3sntGrnYYN0uaOb43j6AANd0YatNWaE3TK6UM74oQdq2qnXSHXRR7H9RiRCFT/y/3nRkci5YOb1I6QTGCQFJ0v/NQoraRnK0veoO0PH/D4ADI8mNJEeSouHntRarrA3zAIvWtqeNJL1KS7ZT0LjMzMx4/9c1UykZJOv/tVhd7iR/YxpqZjdDFQbStol/zf8qgQIA0omebduuZdu2bdu2XYdqC0M2z7ZWt27L7uxcw/+LEhtJjiQps23lifLIbLk2UY3GvpYvDg+FFE6p8Msy5BS5PZhmuf+hVFSxnM/CL8uAZcX3PRd6WYZMCSVbexR6WYasKXUcrZDNshTDJaWVCWFLNyqiWcpLMmAFZWsNXVSeWcppuBSUE2O9i1rZZSk561e2GpUb76LGdeWWpTz2/FK0f5KEGvu9NdyytHY97RN4hFr7vTXUsmxH20/tV2pHCP3eGmpZQjhaLp0793Zs/d4aallqDceju5e8t9bvreGWJdagKahyvUfp99ZwyxLrVjSIl5wJ3xpDWvQ7Gd9a02K4niOapSz93hqmWX70v9LvraGWZUh3WDnesO6Q4v34szuc/e8OZ/+7wy+n2ClquhVadJawFJ//93AB7vn863sWvMcQIsCsI+/wR+Nrg3pE78p35VzhKj4Pu2WZBhbnfydTQ97h1yYZYIdtMTmOpTH+x+NSj3f4q+cKFmRjWYKZL0WrHe+wq0o6dgeMg1o33uHPnt87Eg+z/Weq8Q7PChCQi4tmvMOuBvnYvCjGO2zAxePyRS/eodMrHbGLWv7wGT3CEb280Yp7sJUSO9w+VYp6shWT3dKYeaoT82gbpypegZxPzG2UqngFckYxt1FEfAVSIN3hNoaQr0DKozvc9i8NYLC6NFdsznI5z/XJk90Cq4tZzGO59K0Y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f', maxFileSize: 5000 }
29
+ form.fields_file name: 'user[pdf2][]', width: 'matchParent', label: 'PDF Document', accepts: rules, directUploadUrl: rails_direct_uploads_url
30
+
24
31
  form.fields_submit text: 'Submit'
25
32
  # form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
26
33
  end)
@@ -36,6 +36,9 @@ json_ui_page json do |page|
36
36
  template.thumbnail title: 'Show/Hide', onClick: ->(action) do
37
37
  action.windows_open url: json_ui_garage_url(path: 'forms/show_hide')
38
38
  end
39
+ template.thumbnail title: 'Conditional Value', onClick: ->(action) do
40
+ action.windows_open url: json_ui_garage_url(path: 'forms/conditional_value')
41
+ end
39
42
 
40
43
  end
41
44
  end, ->(section) do
@@ -5,7 +5,18 @@ json_ui_page json do |page|
5
5
 
6
6
  page.list firstSection: ->(section) do
7
7
  section.rows builder: ->(template) do
8
- template.thumbnail title: 'Click menu (web) or swipe left (Android/iOS)', editButtons: ->(menu) do
8
+ template.thumbnail title: 'Click menu (web) or swipe left (Android/iOS)', leftButtons: ->(menu) do
9
+ menu.button styleClass: 'icon', icon: 'check_box', onClick: ->(subaction) do
10
+ subaction.dialogs_alert message: 'Tick/untick'
11
+ end
12
+ end, rightButtons: ->(menu) do
13
+ menu.button styleClass: 'icon', icon: 'share', onClick: ->(subaction) do
14
+ subaction.dialogs_alert message: 'Share'
15
+ end
16
+ menu.button styleClass: 'icon', icon: 'open_in_new', onClick: ->(subaction) do
17
+ subaction.dialogs_alert message: 'Open'
18
+ end
19
+ end, editButtons: ->(menu) do
9
20
  menu.button text: 'Edit', onClick: ->(action) do
10
21
  action.dialogs_alert message: 'Perform action'
11
22
  end
@@ -8,7 +8,7 @@ json_ui_page json do |page|
8
8
  template.thumbnail icon: 'list', title: 'Templating', onClick: ->(action) do
9
9
  action.windows_open url: json_ui_garage_url(path: 'lists/templating')
10
10
  end
11
- template.thumbnail title: 'Edit Actions', onClick: ->(action) do
11
+ template.thumbnail title: 'Action Buttons', onClick: ->(action) do
12
12
  action.windows_open url: json_ui_garage_url(path: 'lists/edit_actions')
13
13
  end
14
14
  template.thumbnail title: 'FAB (Floating Action Button)', onClick: ->(action) do
@@ -22,6 +22,9 @@ json_ui_page json do |page|
22
22
  template.thumbnail title: 'Banners', onClick: ->(action) do
23
23
  action.windows_open url: json_ui_garage_url(path: 'views/banners')
24
24
  end
25
+ template.thumbnail title: 'Maps', onClick: ->(action) do
26
+ action.windows_open url: json_ui_garage_url(path: 'views/maps')
27
+ end
25
28
  template.thumbnail title: 'Misc', onClick: ->(action) do
26
29
  action.windows_open url: json_ui_garage_url(path: 'views/misc')
27
30
  end
@@ -0,0 +1,38 @@
1
+
2
+ json.pins do
3
+ locations = [
4
+ { lat: -31.56391, lng: 147.154312 },
5
+ { lat: -33.718234, lng: 150.363181 },
6
+ { lat: -33.727111, lng: 150.371124 },
7
+ { lat: -33.848588, lng: 151.209834 },
8
+ { lat: -33.851702, lng: 151.216968 },
9
+ { lat: -34.671264, lng: 150.863657 },
10
+ { lat: -35.304724, lng: 148.662905 },
11
+ { lat: -36.817685, lng: 175.699196 },
12
+ { lat: -36.828611, lng: 175.790222 },
13
+ { lat: -37.75, lng: 145.116667 },
14
+ { lat: -37.759859, lng: 145.128708 },
15
+ { lat: -37.765015, lng: 145.133858 },
16
+ { lat: -37.770104, lng: 145.143299 },
17
+ { lat: -37.7737, lng: 145.145187 },
18
+ { lat: -37.774785, lng: 145.137978 },
19
+ { lat: -37.819616, lng: 144.968119 },
20
+ { lat: -38.330766, lng: 144.695692 },
21
+ { lat: -39.927193, lng: 175.053218 },
22
+ { lat: -41.330162, lng: 174.865694 },
23
+ { lat: -42.734358, lng: 147.439506 },
24
+ { lat: -42.734358, lng: 147.501315 },
25
+ { lat: -42.735258, lng: 147.438 },
26
+ { lat: -43.999792, lng: 170.463352 },
27
+ ];
28
+
29
+ locations.each do |location|
30
+ json.child! do
31
+ json.latitude location[:lat]
32
+ json.longitude location[:lng]
33
+ json.infoWindow do
34
+ json.title "TEST #{rand(1000)}"
35
+ end
36
+ end
37
+ end
38
+ end
@@ -0,0 +1,31 @@
1
+ json.title 'Views'
2
+
3
+ json_ui_page json do |page|
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ scroll.spacer height: 20
8
+ scroll.h2 text: 'Map with Markers'
9
+ scroll.spacer height: 6
10
+ scroll.map \
11
+ width: 'matchParent',
12
+ latitude: 13.4837,
13
+ longitude: 144.7917,
14
+ zoom: 11,
15
+ height: 250,
16
+ dataUrl: json_ui_garage_url(path: 'views/map_data')
17
+
18
+ scroll.spacer height: 20
19
+ scroll.h2 text: 'Map with Clustered Markers'
20
+ scroll.spacer height: 6
21
+ scroll.map \
22
+ width: 'matchParent',
23
+ latitude: -42.162376,
24
+ longitude: 172.671437,
25
+ zoom: 7,
26
+ height: 480,
27
+ cluster: true,
28
+ dataUrl: json_ui_garage_url(path: 'views/map_cluster_data')
29
+
30
+ end
31
+ end
@@ -20,10 +20,10 @@ json_ui_page json do |page|
20
20
  scroll.datetime value: 1.week.ago, format: 'YYYY-MM-DD'
21
21
  scroll.datetime value: DateTime.current, format: 'hh:mm:ss', tick: true
22
22
 
23
- scroll.spacer height: 20
24
- scroll.h2 text: 'Map'
25
- scroll.spacer height: 6
26
- scroll.map width: 'matchParent', latitude: 13.4837, longitude: 144.7917, zoom: 11, height: 250, dataUrl: json_ui_garage_url(path: 'views/map_data')
23
+ # scroll.spacer height: 20
24
+ # scroll.h2 text: 'Map'
25
+ # scroll.spacer height: 6
26
+ # scroll.map width: 'matchParent', latitude: 13.4837, longitude: 144.7917, zoom: 11, height: 250, dataUrl: json_ui_garage_url(path: 'views/map_data')
27
27
 
28
28
  scroll.spacer height: 20
29
29
  scroll.h2 text: 'Calendar'
@@ -10,7 +10,9 @@ module Glib
10
10
  crawl left_drawer['rows']
11
11
  end
12
12
 
13
- perform(json['onLoad'])
13
+ if (on_load = (args.fetch('onLoad', nil)))
14
+ perform(on_load)
15
+ end
14
16
  end
15
17
  end
16
18
  end
@@ -22,7 +22,9 @@ module Glib
22
22
  end
23
23
  end
24
24
 
25
- perform(json['onLoad'])
25
+ if (on_load = (args.fetch('onLoad', nil)))
26
+ perform(on_load)
27
+ end
26
28
  end
27
29
  end
28
30
  end
@@ -30,8 +30,8 @@ module Glib
30
30
  end
31
31
 
32
32
  if args.is_a?(Hash) && args['rel'] != 'nofollow'
33
- if (onClick = (args.fetch('onClick', nil)))
34
- process_action(http, onClick)
33
+ if (on_click = (args.fetch('onClick', nil)))
34
+ process_action(http, on_click)
35
35
  end
36
36
  end
37
37
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: glib-web
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.5.35
4
+ version: 0.5.41
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -77,6 +77,7 @@ files:
77
77
  - app/helpers/glib/app_feature_support_helper.rb
78
78
  - app/helpers/glib/dynamic_images_helper.rb
79
79
  - app/helpers/glib/dynamic_texts_helper.rb
80
+ - app/helpers/glib/enum_helper.rb
80
81
  - app/helpers/glib/forms_helper.rb
81
82
  - app/helpers/glib/json_ui/abstract_builder.rb
82
83
  - app/helpers/glib/json_ui/action_builder.rb
@@ -103,6 +104,7 @@ files:
103
104
  - app/helpers/glib/urls_helper.rb
104
105
  - app/models/glib/active_storage/attachment.rb
105
106
  - app/models/glib/active_storage/blob.rb
107
+ - app/models/glib/application_record.rb
106
108
  - app/models/glib/dynamic_text_record.rb
107
109
  - app/models/glib/text.rb
108
110
  - app/policies/glib/application_policy.rb
@@ -123,6 +125,7 @@ files:
123
125
  - app/views/json_ui/garage/forms/basic.json.jbuilder
124
126
  - app/views/json_ui/garage/forms/basic_post.json.jbuilder
125
127
  - app/views/json_ui/garage/forms/checkboxes.json.jbuilder
128
+ - app/views/json_ui/garage/forms/conditional_value.json.jbuilder
126
129
  - app/views/json_ui/garage/forms/dynamic_group.json.jbuilder
127
130
  - app/views/json_ui/garage/forms/dynamic_select.json.jbuilder
128
131
  - app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder
@@ -195,7 +198,9 @@ files:
195
198
  - app/views/json_ui/garage/views/images.json.jbuilder
196
199
  - app/views/json_ui/garage/views/index.json.jbuilder
197
200
  - app/views/json_ui/garage/views/links.json.jbuilder
201
+ - app/views/json_ui/garage/views/map_cluster_data.json.jbuilder
198
202
  - app/views/json_ui/garage/views/map_data.json.jbuilder
203
+ - app/views/json_ui/garage/views/maps.json.jbuilder
199
204
  - app/views/json_ui/garage/views/markdowns.json.jbuilder
200
205
  - app/views/json_ui/garage/views/misc.json.jbuilder
201
206
  - app/views/json_ui/garage/views/texts.json.jbuilder