glib-web 0.5.41 → 0.5.42

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: 667c7e9bef646b1a11ed8237b4fca8490dfd5cc6308dc6bbe01284402fbf605d
4
- data.tar.gz: 159bda20f1a5d19c1834d51669f7f8c990ad3ae34d766bec28e7b2ac6110b9cb
3
+ metadata.gz: 6ab405054fbe1b42c1027a1b17f3c347be295c9321b02a0bb34be63171d1ec84
4
+ data.tar.gz: 0f2ee1810c68d21052d45a9c2a8c8eecfc793b4dc6cb75ade1b3055786658ba5
5
5
  SHA512:
6
- metadata.gz: 2443bf21f9099aae0fddeed21226f02c466b4b123c5a7f69d9677a0a96c268f45b96ff7c91abebbd203ed88d71dc92ce817252083d8997cf0b8e09a1fd46ddae
7
- data.tar.gz: 05e3fca19eb376087e2444af5b8635110a0d14fc86a4c88210a4234018e90b228129ff6cd19ecb4792db6e060c5d3cf6dc3aa9777dcf3c996b4cf064ef21c96e
6
+ metadata.gz: fe5d7dc16c90de11ac3202e08911df710815b510798ca1c97184faafbdd8ea9d1fe533caf04ff8e3ca40da0ffdb6e4ebed07e6b369c2693d7e833238621a88df
7
+ data.tar.gz: 85b8e9cb0c45abf9a5127842dc2f31f0be322e04833a28ff7bab5fbc1425f534cdee2d06cd92b6a2b7e0445d164a081edd268ad0d999c6957c4a3db63e6a4901
@@ -48,10 +48,15 @@ module Glib
48
48
  end
49
49
 
50
50
  def json_ui_action(json)
51
- @__json_ui_section ||= Page.new(json, self)
52
- @__json_ui_section.action_builder
51
+ @__json_ui_action ||= Page.new(json, self)
52
+ @__json_ui_action.action_builder
53
53
  end
54
54
 
55
+ # def json_ui_view(json)
56
+ # @__json_ui_view ||= Page.new(json, self)
57
+ # @__json_ui_view.view_builder
58
+ # end
59
+
55
60
  def json_ui_action_payload(&block)
56
61
  dataJson = Jbuilder.new
57
62
  block&.call Page.new(dataJson, self).action_builder
@@ -4,11 +4,11 @@ class Glib::JsonUi::ViewBuilder
4
4
  class AbstractField < View
5
5
  bool :readOnly
6
6
  hash :validation
7
- string :label
7
+ # string :label
8
8
 
9
- # def label(label)
10
- # @label = label
11
- # end
9
+ def label(label)
10
+ @label = label
11
+ end
12
12
 
13
13
  def label_args(label_args)
14
14
  @label_args = label_args
@@ -1,6 +1,7 @@
1
1
 
2
- json.pins do
2
+ page = json_ui_page json
3
3
 
4
+ json.pins do
4
5
  latitude = params[:lat]&.to_f
5
6
  longitude = params[:long]&.to_f
6
7
 
@@ -37,7 +38,14 @@ json.pins do
37
38
  json.infoWindow do
38
39
  json.title 'You'
39
40
  json.subtitle 'Current location'
40
- json.subsubtitle "#{latitude}, #{longitude}"
41
+
42
+ json.body do
43
+ page.vertical_content padding: { top: 10 }, childViews: ->(body) do
44
+ body.button text: 'Info', onClick: ->(action) do
45
+ action.dialogs_alert message: "#{latitude}, #{longitude}"
46
+ end
47
+ end
48
+ end
41
49
  end
42
50
  end
43
51
  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.41
4
+ version: 0.5.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''