glib-web 0.5.41 → 0.5.42
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
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 6ab405054fbe1b42c1027a1b17f3c347be295c9321b02a0bb34be63171d1ec84
|
4
|
+
data.tar.gz: 0f2ee1810c68d21052d45a9c2a8c8eecfc793b4dc6cb75ade1b3055786658ba5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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
|
-
@
|
52
|
-
@
|
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
|
-
|
10
|
-
|
11
|
-
|
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
|
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
|
-
|
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
|