glib-web 2.3.0 → 2.5.0
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/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/controllers/glib/home_controller.rb +9 -0
- data/app/helpers/glib/app_feature_support_helper.rb +0 -0
- data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
- data/app/helpers/glib/forms_helper.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -0
- data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/menu_builder.rb +1 -0
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +4 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +4 -0
- data/app/helpers/glib/json_ui/view_builder.rb +9 -1
- data/app/helpers/glib/urls_helper.rb +0 -0
- data/app/models/concerns/glib/soft_deletable.rb +5 -0
- data/app/models/glib/active_storage/attachment.rb +0 -0
- data/app/models/glib/active_storage/blob.rb +0 -0
- data/app/models/glib/dynamic_text_record.rb +0 -0
- data/app/models/glib/text.rb +0 -0
- data/app/validators/email_typo_validator.rb +0 -0
- data/app/validators/email_validator.rb +0 -0
- data/app/validators/url_validator.rb +0 -0
- data/app/views/json_ui/garage/actions/_panels.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_reload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_snackbars.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/index.json.jbuilder +3 -0
- data/app/views/json_ui/garage/forms/otp_field.json.jbuilder +35 -0
- data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +16 -6
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
- data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +1 -0
- data/app/views/json_ui/garage/panels/timeline.json.jbuilder +17 -7
- data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
- data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/controls.json.jbuilder +15 -1
- data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_cluster_data.json.jbuilder +1 -1
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_direction_data.json.jbuilder +61 -0
- data/app/views/json_ui/garage/views/maps.json.jbuilder +29 -0
- data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
- data/config/routes.rb +0 -0
- data/lib/generators/glib/install_generator.rb +0 -0
- data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
- data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
- data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
- data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
- data/lib/generators/templates/database.yml +0 -0
- data/lib/generators/templates/dynamic_text.rb +0 -0
- data/lib/glib/crypt/utils.rb +0 -0
- data/lib/glib/crypt.rb +0 -0
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/engine.rb +0 -0
- data/lib/glib/json_crawler/action_crawler.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
- data/lib/glib/json_crawler/coverage.rb +0 -0
- data/lib/glib/json_crawler.rb +0 -0
- data/lib/glib/mailer_tester.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/glib-web.rb +0 -0
- data/lib/tasks/db.rake +0 -0
- metadata +4 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: deb5d59ee387f197f53b7f3fa024db36aabb41cf5e81a0f477a7a5a867d1a679
|
|
4
|
+
data.tar.gz: 910dece1f77237f42ca6fee5e9029f6f67aba38dc5a63383d8d1a29fa822d5b3
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 195c5ec7f7835027d85b5f5fb90c8b78c1ebd92d450d6cb9559693fe428bbb17e47dd986bd77f8615857f9c89bf52b0c7e6c5848bb318c085c665a138184a7e0
|
|
7
|
+
data.tar.gz: 8fc172c8e683c59858d6f3d2484576ea62282475b504bb05eb17fcca07eeadf993c7f7bc6de40ee45771555be6fa10d22aa08864c052b2593dc06c7dc373a050
|
|
File without changes
|
|
@@ -18,6 +18,15 @@ module Glib
|
|
|
18
18
|
margin-right: auto;
|
|
19
19
|
margin-left: auto;
|
|
20
20
|
}
|
|
21
|
+
|
|
22
|
+
.rounded-corner {
|
|
23
|
+
border-radius: 16px;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
/* Make sure the hover highlight effect also has rounded corners */
|
|
27
|
+
.rounded-corner:hover:after {
|
|
28
|
+
border-radius: 16px;
|
|
29
|
+
}
|
|
21
30
|
</style>
|
|
22
31
|
eos
|
|
23
32
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -5,6 +5,10 @@ class Glib::JsonUi::ViewBuilder
|
|
|
5
5
|
string :paramNameForFormData
|
|
6
6
|
bool :local
|
|
7
7
|
|
|
8
|
+
# TODO: Enable this when we know it won't break existing apps.
|
|
9
|
+
# Even for pure client-side apps, this is required because form.validate() requires a URL to construct form data.
|
|
10
|
+
# required :url
|
|
11
|
+
|
|
8
12
|
def is_array_association?(prop)
|
|
9
13
|
# # Not all model is ActiveRecord
|
|
10
14
|
# if @model.class.respond_to?(:reflect_on_association)
|
|
@@ -192,6 +192,12 @@ module Glib
|
|
|
192
192
|
action :onClick
|
|
193
193
|
color :color
|
|
194
194
|
bool :disabled
|
|
195
|
+
|
|
196
|
+
def childButtons(block)
|
|
197
|
+
json.childButtons do
|
|
198
|
+
block.call page.menu_builder
|
|
199
|
+
end
|
|
200
|
+
end
|
|
195
201
|
end
|
|
196
202
|
|
|
197
203
|
class Fab < View
|
|
@@ -220,6 +226,8 @@ module Glib
|
|
|
220
226
|
int :zoom
|
|
221
227
|
string :dataUrl
|
|
222
228
|
bool :cluster
|
|
229
|
+
bool :direction
|
|
230
|
+
array :locations
|
|
223
231
|
end
|
|
224
232
|
|
|
225
233
|
class Chip < View
|
|
@@ -279,7 +287,7 @@ module Glib
|
|
|
279
287
|
|
|
280
288
|
class ProgressCircle < View
|
|
281
289
|
int :rotate # from 0 to 360
|
|
282
|
-
int :size
|
|
290
|
+
int :size
|
|
283
291
|
int :value # from 0 to 100
|
|
284
292
|
color :color
|
|
285
293
|
string :text
|
|
File without changes
|
|
@@ -22,6 +22,11 @@ module Glib
|
|
|
22
22
|
soft_destroy_record
|
|
23
23
|
end
|
|
24
24
|
|
|
25
|
+
# More explicit naming which is sometimes useful for readability.
|
|
26
|
+
def soft_destroy
|
|
27
|
+
soft_destroy_record
|
|
28
|
+
end
|
|
29
|
+
|
|
25
30
|
# Revive a soft-deleted record and associated records if soft-deleted,
|
|
26
31
|
# otherwise return self
|
|
27
32
|
def revive
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/app/models/glib/text.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -83,6 +83,9 @@ page.list sections: [
|
|
|
83
83
|
template.thumbnail title: 'Payments', onClick: ->(action) do
|
|
84
84
|
action.windows_open url: json_ui_garage_url(path: 'forms/payments')
|
|
85
85
|
end
|
|
86
|
+
template.thumbnail title: 'OTP Field', onClick: ->(action) do
|
|
87
|
+
action.windows_open url: json_ui_garage_url(path: 'forms/otp_field')
|
|
88
|
+
end
|
|
86
89
|
end
|
|
87
90
|
end, ->(section) do
|
|
88
91
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
|
@@ -0,0 +1,35 @@
|
|
|
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 \
|
|
7
|
+
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
8
|
+
method: 'post',
|
|
9
|
+
padding: glib_json_padding_body,
|
|
10
|
+
childViews: ->(form) do
|
|
11
|
+
|
|
12
|
+
form.spacer height: 20
|
|
13
|
+
form.h2 text: 'OTP Input Field'
|
|
14
|
+
form.spacer height: 6
|
|
15
|
+
form.fields_otp \
|
|
16
|
+
name: 'user[otp_summary1]',
|
|
17
|
+
lengths: 7
|
|
18
|
+
|
|
19
|
+
form.spacer height: 20
|
|
20
|
+
form.h2 text: 'OTP Custom Length'
|
|
21
|
+
form.spacer height: 6
|
|
22
|
+
form.fields_otp \
|
|
23
|
+
name: 'user[otp_summary2]',
|
|
24
|
+
lengths: 3
|
|
25
|
+
|
|
26
|
+
form.spacer height: 20
|
|
27
|
+
form.h2 text: 'OTP with Long Field'
|
|
28
|
+
form.spacer height: 6
|
|
29
|
+
form.fields_otp \
|
|
30
|
+
name: 'user[otp_summary3]',
|
|
31
|
+
lengths: 20
|
|
32
|
+
|
|
33
|
+
form.spacer height: 20
|
|
34
|
+
form.fields_submit text: 'Submit'
|
|
35
|
+
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -17,12 +17,22 @@ page.list firstSection: ->(section) do
|
|
|
17
17
|
subaction.dialogs_alert message: 'Tick/untick'
|
|
18
18
|
end
|
|
19
19
|
end, rightButtons: ->(menu) do
|
|
20
|
-
menu.button
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
20
|
+
menu.button \
|
|
21
|
+
styleClass: 'icon',
|
|
22
|
+
icon: 'share',
|
|
23
|
+
tooltip: { text: 'Share' },
|
|
24
|
+
childButtons: ->(submenu) do
|
|
25
|
+
submenu.button text: 'Dropdown item 1'
|
|
26
|
+
submenu.button text: 'Dropdown item 2'
|
|
27
|
+
submenu.button text: 'Dropdown item 3'
|
|
28
|
+
end
|
|
29
|
+
menu.button \
|
|
30
|
+
styleClass: 'icon',
|
|
31
|
+
icon: 'open_in_new',
|
|
32
|
+
tooltip: { text: 'Open in new window' },
|
|
33
|
+
onClick: ->(subaction) do
|
|
34
|
+
subaction.dialogs_alert message: 'Open'
|
|
35
|
+
end
|
|
26
36
|
end, editButtons: ->(menu) do
|
|
27
37
|
menu.button text: "Edit (ID: #{page_index})", onClick: ->(action) do
|
|
28
38
|
action.dialogs_alert message: 'Perform Edit action'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -123,6 +123,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
123
123
|
scroll.spacer height: 8
|
|
124
124
|
scroll.panels_responsive \
|
|
125
125
|
backgroundColor: '#c3cad2',
|
|
126
|
+
styleClasses: ['rounded-corner'],
|
|
126
127
|
padding: { left: 20, right: 20, top: 10, bottom: 10 },
|
|
127
128
|
tooltip: { text: 'Tooltip text' },
|
|
128
129
|
childViews: ->(responsive) do
|
|
@@ -7,7 +7,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
7
7
|
timeline_items = [
|
|
8
8
|
{ icon: 'place', color: '#4BB543' },
|
|
9
9
|
{ icon: 'check_circle', color: 'blue' },
|
|
10
|
-
{ icon: 'hourglass_empty', color: 'blue',
|
|
10
|
+
{ icon: 'hourglass_empty', color: 'blue', text: 'Pending' },
|
|
11
11
|
{ icon: 'radio_button_unchecked' },
|
|
12
12
|
{ icon: 'radio_button_unchecked' },
|
|
13
13
|
]
|
|
@@ -32,16 +32,15 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
32
32
|
end
|
|
33
33
|
|
|
34
34
|
timeline_items = [
|
|
35
|
-
{ icon: 'place', color: '#4BB543' },
|
|
36
|
-
{ icon: 'check_circle', color: 'blue' },
|
|
37
|
-
{ icon: 'check_circle', color: 'blue' },
|
|
38
|
-
{ icon: 'check_circle', color: 'blue' },
|
|
39
|
-
{ icon: 'flag', color: '#FFA500' },
|
|
35
|
+
{ icon: 'place', color: '#4BB543', styleClasses: ['outlined'] },
|
|
36
|
+
{ icon: 'check_circle', color: 'blue', styleClasses: ['outlined'] },
|
|
37
|
+
{ icon: 'check_circle', color: 'blue', styleClasses: ['outlined'] },
|
|
38
|
+
{ icon: 'check_circle', color: 'blue', styleClasses: ['outlined'] },
|
|
39
|
+
{ icon: 'flag', color: '#FFA500', styleClasses: ['outlined'] },
|
|
40
40
|
]
|
|
41
41
|
|
|
42
42
|
scroll.h2 text: 'Timeline with outlined dots'
|
|
43
43
|
scroll.panels_timeline \
|
|
44
|
-
styleClasses: ['outlined', 'icon-on-mdAndUp'],
|
|
45
44
|
events: timeline_items,
|
|
46
45
|
childViews: ->(timeline) do
|
|
47
46
|
timeline.panels_vertical childViews: ->(vertical) do
|
|
@@ -74,4 +73,15 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
74
73
|
timeline.label text: '1 minute ago'
|
|
75
74
|
end
|
|
76
75
|
end
|
|
76
|
+
|
|
77
|
+
timeline_items = [
|
|
78
|
+
{ backgroundColor: 'blue', styleClasses: ['small'] },
|
|
79
|
+
{ backgroundColor: 'blue', styleClasses: ['small'] },
|
|
80
|
+
{ backgroundColor: 'blue', color: 'white', text: '3' },
|
|
81
|
+
{ backgroundColor: 'white', icon: 'radio_button_unchecked', styleClasses: ['small'] },
|
|
82
|
+
{ backgroundColor: 'white', icon: 'radio_button_unchecked', styleClasses: ['small'] },
|
|
83
|
+
]
|
|
84
|
+
|
|
85
|
+
scroll.h2 text: 'Timeline without content'
|
|
86
|
+
scroll.panels_timeline events: timeline_items
|
|
77
87
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -25,8 +25,22 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
25
25
|
onClick: ->(action) do
|
|
26
26
|
action.dialogs_alert message: 'Perform action'
|
|
27
27
|
end
|
|
28
|
-
scroll.spacer height: 20
|
|
29
28
|
|
|
29
|
+
scroll.spacer height: 10
|
|
30
|
+
scroll.button text: 'Button with dropdown', childButtons: ->(menu) do
|
|
31
|
+
menu.button text: 'Dropdown item 1'
|
|
32
|
+
menu.button text: 'Dropdown item 2'
|
|
33
|
+
menu.button text: 'Dropdown item 3'
|
|
34
|
+
end
|
|
35
|
+
|
|
36
|
+
scroll.spacer height: 10
|
|
37
|
+
scroll.button text: 'Button with tooltip and dropdown', tooltip: { text: 'Tooltip text' }, childButtons: ->(menu) do
|
|
38
|
+
menu.button text: 'Dropdown item 1'
|
|
39
|
+
menu.button text: 'Dropdown item 2'
|
|
40
|
+
menu.button text: 'Dropdown item 3'
|
|
41
|
+
end
|
|
42
|
+
|
|
43
|
+
scroll.spacer height: 20
|
|
30
44
|
scroll.button \
|
|
31
45
|
icon: 'info',
|
|
32
46
|
styleClass: 'icon',
|
|
File without changes
|
|
File without changes
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
|
|
2
|
+
# page = json_ui_page json
|
|
3
|
+
|
|
4
|
+
json.pins do
|
|
5
|
+
|
|
6
|
+
locations = [
|
|
7
|
+
[
|
|
8
|
+
{ lat: -31.56391, lng: 147.154312 },
|
|
9
|
+
{ lat: -33.718234, lng: 150.363181 },
|
|
10
|
+
{ lat: -33.727111, lng: 150.371124 },
|
|
11
|
+
{ lat: -33.848588, lng: 151.209834 },
|
|
12
|
+
{ lat: -33.851702, lng: 151.216968 },
|
|
13
|
+
],
|
|
14
|
+
[
|
|
15
|
+
{ lat: -33.80664156068477, lng: 145.62789926321355 },
|
|
16
|
+
{ lat: -34.282842261683825, lng: 146.0436968577822 },
|
|
17
|
+
{ lat: -34.542028425407175, lng: 146.39268392820802 }
|
|
18
|
+
]
|
|
19
|
+
]
|
|
20
|
+
|
|
21
|
+
# locations = [
|
|
22
|
+
# { lat: -31.56391, lng: 147.154312 },
|
|
23
|
+
# { lat: -33.718234, lng: 150.363181 },
|
|
24
|
+
# { lat: -33.727111, lng: 150.371124 },
|
|
25
|
+
# { lat: -33.848588, lng: 151.209834 },
|
|
26
|
+
# { lat: -33.851702, lng: 151.216968 },
|
|
27
|
+
# ]
|
|
28
|
+
|
|
29
|
+
locations.each_with_index do |loc, i|
|
|
30
|
+
loc.each_with_index do |location, index|
|
|
31
|
+
json.child! do
|
|
32
|
+
json.latitude location[:lat]
|
|
33
|
+
json.longitude location[:lng]
|
|
34
|
+
json.markerNumber index + 1
|
|
35
|
+
json.markerColor i == 0 ? '#537FE7' : '#362FD9'
|
|
36
|
+
json.infoWindow do
|
|
37
|
+
json.title "Place #{index}"
|
|
38
|
+
json.subtitle 'Big shopping mall'
|
|
39
|
+
end
|
|
40
|
+
end
|
|
41
|
+
end
|
|
42
|
+
end
|
|
43
|
+
|
|
44
|
+
# json.child! do
|
|
45
|
+
# json.latitude 13.473001
|
|
46
|
+
# json.longitude 144.771303
|
|
47
|
+
# json.infoWindow do
|
|
48
|
+
# json.title 'Place 2'
|
|
49
|
+
# json.subtitle 'High class restaurant'
|
|
50
|
+
# end
|
|
51
|
+
# end
|
|
52
|
+
|
|
53
|
+
# json.child! do
|
|
54
|
+
# json.latitude 13.375903 + rand(0..0.1)
|
|
55
|
+
# json.longitude 144.749791 + rand(0..0.1)
|
|
56
|
+
# json.infoWindow do
|
|
57
|
+
# json.title 'Place 3'
|
|
58
|
+
# json.subtitle 'Random location'
|
|
59
|
+
# end
|
|
60
|
+
# end
|
|
61
|
+
end
|
|
@@ -27,5 +27,34 @@ json_ui_page json do |page|
|
|
|
27
27
|
cluster: true,
|
|
28
28
|
dataUrl: json_ui_garage_url(path: 'views/map_cluster_data')
|
|
29
29
|
|
|
30
|
+
|
|
31
|
+
locations = [
|
|
32
|
+
[
|
|
33
|
+
{ lat: -31.56391, lng: 147.154312 },
|
|
34
|
+
{ lat: -33.718234, lng: 150.363181 },
|
|
35
|
+
{ lat: -33.727111, lng: 150.371124 },
|
|
36
|
+
{ lat: -33.848588, lng: 151.209834 },
|
|
37
|
+
{ lat: -33.851702, lng: 151.216968 },
|
|
38
|
+
],
|
|
39
|
+
[
|
|
40
|
+
{ lat: -33.80664156068477, lng: 145.62789926321355 },
|
|
41
|
+
{ lat: -34.282842261683825, lng: 146.0436968577822 },
|
|
42
|
+
{ lat: -34.542028425407175, lng: 146.39268392820802 }
|
|
43
|
+
]
|
|
44
|
+
]
|
|
45
|
+
|
|
46
|
+
scroll.spacer height: 20
|
|
47
|
+
scroll.h2 text: 'Map with Direction'
|
|
48
|
+
scroll.spacer height: 6
|
|
49
|
+
scroll.map \
|
|
50
|
+
width: 'matchParent',
|
|
51
|
+
latitude: -31.56391,
|
|
52
|
+
longitude: 147.154312,
|
|
53
|
+
direction: true,
|
|
54
|
+
locations: locations,
|
|
55
|
+
zoom: 9,
|
|
56
|
+
height: 480,
|
|
57
|
+
dataUrl: json_ui_garage_url(path: 'views/map_direction_data')
|
|
58
|
+
|
|
30
59
|
end
|
|
31
60
|
end
|
|
File without changes
|
data/config/routes.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/glib/crypt/utils.rb
CHANGED
|
File without changes
|
data/lib/glib/crypt.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
|
File without changes
|
data/lib/glib/engine.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
data/lib/glib/json_crawler.rb
CHANGED
|
File without changes
|
data/lib/glib/mailer_tester.rb
CHANGED
|
File without changes
|
data/lib/glib/value.rb
CHANGED
|
File without changes
|
data/lib/glib/version.rb
CHANGED
|
File without changes
|
data/lib/glib-web.rb
CHANGED
|
File without changes
|
data/lib/tasks/db.rake
CHANGED
|
File without changes
|
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: 2.
|
|
4
|
+
version: 2.5.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -165,6 +165,7 @@ files:
|
|
|
165
165
|
- app/views/json_ui/garage/forms/new_rich_text.json.jbuilder
|
|
166
166
|
- app/views/json_ui/garage/forms/online_participant1.json.jbuilder
|
|
167
167
|
- app/views/json_ui/garage/forms/online_participant2.json.jbuilder
|
|
168
|
+
- app/views/json_ui/garage/forms/otp_field.json.jbuilder
|
|
168
169
|
- app/views/json_ui/garage/forms/page_update_on_response.json.jbuilder
|
|
169
170
|
- app/views/json_ui/garage/forms/partial_update.json.jbuilder
|
|
170
171
|
- app/views/json_ui/garage/forms/partial_update_response.json.jbuilder
|
|
@@ -254,6 +255,7 @@ files:
|
|
|
254
255
|
- app/views/json_ui/garage/views/links.json.jbuilder
|
|
255
256
|
- app/views/json_ui/garage/views/map_cluster_data.json.jbuilder
|
|
256
257
|
- app/views/json_ui/garage/views/map_data.json.jbuilder
|
|
258
|
+
- app/views/json_ui/garage/views/map_direction_data.json.jbuilder
|
|
257
259
|
- app/views/json_ui/garage/views/maps.json.jbuilder
|
|
258
260
|
- app/views/json_ui/garage/views/markdowns.json.jbuilder
|
|
259
261
|
- app/views/json_ui/garage/views/misc.json.jbuilder
|
|
@@ -311,8 +313,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
311
313
|
- !ruby/object:Gem::Version
|
|
312
314
|
version: '0'
|
|
313
315
|
requirements: []
|
|
314
|
-
|
|
315
|
-
rubygems_version: 2.7.6
|
|
316
|
+
rubygems_version: 3.1.6
|
|
316
317
|
signing_key:
|
|
317
318
|
specification_version: 4
|
|
318
319
|
summary: ''
|