glib-web 0.5.86 → 0.5.87
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/channels/glib/channel/is_typing_channel.rb +34 -34
- data/app/channels/glib/channel/online_channel.rb +36 -36
- data/app/controllers/concerns/glib/analytics/funnel.rb +61 -61
- data/app/controllers/concerns/glib/auth/policy.rb +149 -149
- data/app/controllers/concerns/glib/json/dynamic_text.rb +126 -126
- data/app/controllers/concerns/glib/json/libs.rb +149 -149
- data/app/controllers/concerns/glib/json/new_dynamic_text.rb +122 -122
- data/app/controllers/concerns/glib/json/transformation.rb +11 -11
- data/app/controllers/concerns/glib/json/traversal.rb +92 -92
- data/app/controllers/concerns/glib/json/ui.rb +88 -88
- data/app/controllers/concerns/glib/json/validation.rb +13 -13
- data/app/controllers/glib/home_controller.rb +54 -54
- data/app/helpers/glib/app_feature_support_helper.rb +16 -16
- data/app/helpers/glib/dynamic_images_helper.rb +55 -55
- data/app/helpers/glib/dynamic_texts_helper.rb +42 -42
- data/app/helpers/glib/enum_helper.rb +18 -18
- data/app/helpers/glib/forms_helper.rb +15 -15
- data/app/helpers/glib/json_ui/abstract_builder.rb +309 -309
- data/app/helpers/glib/json_ui/action_builder/dialogs.rb +58 -58
- data/app/helpers/glib/json_ui/action_builder/http.rb +39 -39
- data/app/helpers/glib/json_ui/action_builder/iap.rb +15 -15
- data/app/helpers/glib/json_ui/action_builder/panels.rb +14 -14
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +15 -15
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +41 -41
- data/app/helpers/glib/json_ui/action_builder/windows.rb +38 -38
- data/app/helpers/glib/json_ui/action_builder.rb +140 -140
- data/app/helpers/glib/json_ui/analytics_helper.rb +17 -17
- data/app/helpers/glib/json_ui/dynamic_field_builders.rb +25 -25
- data/app/helpers/glib/json_ui/generic_builders.rb +28 -28
- data/app/helpers/glib/json_ui/list_builders.rb +110 -110
- data/app/helpers/glib/json_ui/menu_builder.rb +96 -96
- data/app/helpers/glib/json_ui/page_helper.rb +221 -221
- data/app/helpers/glib/json_ui/response_helper.rb +25 -25
- data/app/helpers/glib/json_ui/styling_helper.rb +55 -55
- data/app/helpers/glib/json_ui/table_builders.rb +74 -74
- data/app/helpers/glib/json_ui/view_builder/banners.rb +26 -26
- data/app/helpers/glib/json_ui/view_builder/charts.rb +49 -49
- data/app/helpers/glib/json_ui/view_builder/fields.rb +291 -291
- data/app/helpers/glib/json_ui/view_builder/iap.rb +11 -11
- data/app/helpers/glib/json_ui/view_builder/panels.rb +258 -258
- data/app/helpers/glib/json_ui/view_builder.rb +248 -248
- data/app/helpers/glib/urls_helper.rb +12 -12
- data/app/models/concerns/glib/soft_deletable.rb +68 -68
- data/app/models/glib/active_storage/attachment.rb +9 -9
- data/app/models/glib/active_storage/blob.rb +9 -9
- data/app/models/glib/application_record.rb +18 -18
- data/app/models/glib/dynamic_text_record.rb +9 -9
- data/app/models/glib/text.rb +95 -95
- data/app/policies/glib/application_policy.rb +191 -191
- data/app/validators/email_typo_validator.rb +38 -38
- data/app/validators/email_validator.rb +7 -7
- data/app/validators/url_validator.rb +20 -20
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +70 -70
- data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +104 -104
- data/app/views/json_ui/garage/actions/_http.json.jbuilder +24 -24
- data/app/views/json_ui/garage/actions/_panels.json.jbuilder +18 -18
- data/app/views/json_ui/garage/actions/_reload.json.jbuilder +17 -17
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +18 -18
- data/app/views/json_ui/garage/actions/_snackbars.json.jbuilder +33 -33
- data/app/views/json_ui/garage/actions/_timeouts.json.jbuilder +24 -24
- data/app/views/json_ui/garage/actions/_windows.json.jbuilder +24 -24
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +6 -6
- data/app/views/json_ui/garage/actions/index.json.jbuilder +24 -24
- data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +10 -10
- data/app/views/json_ui/garage/forms/basic.json.jbuilder +21 -21
- data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +8 -8
- data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +43 -43
- data/app/views/json_ui/garage/forms/conditional_value.json.jbuilder +36 -36
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +39 -39
- data/app/views/json_ui/garage/forms/dynamic_select.json.jbuilder +24 -24
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +38 -38
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +37 -37
- data/app/views/json_ui/garage/forms/floating_submit.json.jbuilder +19 -19
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +3 -3
- data/app/views/json_ui/garage/forms/get_request.json.jbuilder +27 -27
- data/app/views/json_ui/garage/forms/index.json.jbuilder +116 -116
- data/app/views/json_ui/garage/forms/new_rich_text.json.jbuilder +40 -40
- data/app/views/json_ui/garage/forms/online_participant1.json.jbuilder +25 -25
- data/app/views/json_ui/garage/forms/online_participant2.json.jbuilder +25 -25
- data/app/views/json_ui/garage/forms/payments.json.jbuilder +34 -34
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +81 -81
- data/app/views/json_ui/garage/forms/ratings.json.jbuilder +49 -49
- data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +40 -40
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +91 -91
- data/app/views/json_ui/garage/forms/show_hide.json.jbuilder +150 -150
- data/app/views/json_ui/garage/forms/styled_boxes.json.jbuilder +35 -35
- data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +17 -17
- data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +26 -26
- data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +63 -63
- data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +25 -25
- data/app/views/json_ui/garage/forms/text_validation.json.jbuilder +65 -65
- data/app/views/json_ui/garage/forms/timers.json.jbuilder +120 -120
- data/app/views/json_ui/garage/home/blank.json.jbuilder +10 -10
- data/app/views/json_ui/garage/home/index.json.jbuilder +36 -36
- data/app/views/json_ui/garage/home/slow.json.jbuilder +11 -11
- data/app/views/json_ui/garage/lists/_autoload_section.json.jbuilder +30 -30
- data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +32 -32
- data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +35 -35
- data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +94 -94
- data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +62 -62
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +12 -12
- data/app/views/json_ui/garage/lists/index.json.jbuilder +38 -38
- data/app/views/json_ui/garage/lists/reordering.json.jbuilder +34 -34
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +35 -35
- data/app/views/json_ui/garage/notifications/action_cable.json.jbuilder +114 -114
- data/app/views/json_ui/garage/notifications/android_post.json.jbuilder +48 -48
- data/app/views/json_ui/garage/notifications/index.json.jbuilder +36 -36
- data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +60 -60
- data/app/views/json_ui/garage/pages/flat_centered.json.jbuilder +29 -29
- data/app/views/json_ui/garage/pages/full_width.json.jbuilder +29 -29
- data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +16 -16
- data/app/views/json_ui/garage/pages/index.json.jbuilder +62 -62
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +18 -18
- data/app/views/json_ui/garage/pages/lifecycle_hooks.json.jbuilder +13 -13
- data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +10 -10
- data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +21 -21
- data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +40 -40
- data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +92 -92
- data/app/views/json_ui/garage/panels/_styled.json.jbuilder +78 -78
- data/app/views/json_ui/garage/panels/card.json.jbuilder +4 -4
- data/app/views/json_ui/garage/panels/carousel.json.jbuilder +38 -38
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +17 -17
- data/app/views/json_ui/garage/panels/flow.json.jbuilder +59 -59
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +91 -91
- data/app/views/json_ui/garage/panels/index.json.jbuilder +138 -138
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +4 -4
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +98 -98
- data/app/views/json_ui/garage/panels/split.json.jbuilder +182 -182
- data/app/views/json_ui/garage/panels/ul.json.jbuilder +33 -33
- data/app/views/json_ui/garage/panels/vertical.json.jbuilder +55 -55
- data/app/views/json_ui/garage/panels/web.json.jbuilder +15 -15
- data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +13 -13
- data/app/views/json_ui/garage/services/image.json.jbuilder +47 -47
- data/app/views/json_ui/garage/services/index.json.jbuilder +17 -17
- data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +16 -16
- data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +43 -43
- data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +50 -50
- data/app/views/json_ui/garage/tables/export_import.json.jbuilder +29 -29
- data/app/views/json_ui/garage/tables/horizontal_scroll.json.jbuilder +26 -26
- data/app/views/json_ui/garage/tables/index.json.jbuilder +25 -25
- data/app/views/json_ui/garage/tables/layout.json.jbuilder +40 -40
- data/app/views/json_ui/garage/views/_chart_data.json.jbuilder +17 -17
- data/app/views/json_ui/garage/views/banners.json.jbuilder +67 -67
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +30 -30
- data/app/views/json_ui/garage/views/charts.json.jbuilder +125 -125
- data/app/views/json_ui/garage/views/controls.json.jbuilder +37 -37
- data/app/views/json_ui/garage/views/iap.json.jbuilder +21 -21
- data/app/views/json_ui/garage/views/icon_names.json.jbuilder +1450 -1450
- data/app/views/json_ui/garage/views/icons.json.jbuilder +15 -15
- data/app/views/json_ui/garage/views/images.json.jbuilder +89 -89
- data/app/views/json_ui/garage/views/index.json.jbuilder +83 -83
- data/app/views/json_ui/garage/views/links.json.jbuilder +70 -70
- data/app/views/json_ui/garage/views/map_cluster_data.json.jbuilder +41 -41
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +51 -51
- data/app/views/json_ui/garage/views/maps.json.jbuilder +31 -31
- data/app/views/json_ui/garage/views/markdowns.json.jbuilder +41 -41
- data/app/views/json_ui/garage/views/misc.json.jbuilder +34 -34
- data/app/views/json_ui/garage/views/progress.json.jbuilder +31 -31
- data/app/views/json_ui/garage/views/texts.json.jbuilder +35 -35
- data/app/views/layouts/json_ui/renderer.html.erb +35 -35
- data/config/routes.rb +7 -7
- data/lib/generators/glib/install_generator.rb +24 -24
- data/lib/generators/templates/20191017062519_create_texts.rb +12 -12
- data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +7 -7
- data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +7 -7
- data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +27 -27
- data/lib/generators/templates/database.yml +107 -107
- data/lib/generators/templates/dynamic_text.rb +2 -2
- data/lib/glib/crypt/utils.rb +26 -26
- data/lib/glib/crypt.rb +0 -0
- data/lib/glib/dynamic_text/config.rb +21 -21
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/engine.rb +7 -7
- data/lib/glib/json_crawler/action_crawler.rb +23 -23
- data/lib/glib/json_crawler/action_crawlers/action_http.rb +11 -11
- data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +48 -48
- data/lib/glib/json_crawler/action_crawlers/menu.rb +12 -12
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +19 -19
- data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +13 -13
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +33 -33
- data/lib/glib/json_crawler/coverage.rb +20 -20
- data/lib/glib/json_crawler/http.rb +120 -120
- data/lib/glib/json_crawler/router.rb +90 -90
- data/lib/glib/json_crawler.rb +11 -11
- data/lib/glib/mailer_tester.rb +36 -36
- data/lib/glib/test_helpers.rb +52 -52
- data/lib/glib/value.rb +7 -7
- data/lib/glib/version.rb +5 -5
- data/lib/glib-web.rb +9 -9
- data/lib/tasks/db.rake +95 -95
- metadata +1 -1
@@ -1,51 +1,51 @@
|
|
1
|
-
|
2
|
-
page = json_ui_page json
|
3
|
-
|
4
|
-
json.pins do
|
5
|
-
latitude = params[:lat]&.to_f
|
6
|
-
longitude = params[:long]&.to_f
|
7
|
-
|
8
|
-
json.child! do
|
9
|
-
json.latitude 13.516680
|
10
|
-
json.longitude 144.817322
|
11
|
-
json.infoWindow do
|
12
|
-
json.title 'Place 1'
|
13
|
-
json.subtitle 'Big shopping mall'
|
14
|
-
end
|
15
|
-
end
|
16
|
-
|
17
|
-
json.child! do
|
18
|
-
json.latitude 13.473001
|
19
|
-
json.longitude 144.771303
|
20
|
-
json.infoWindow do
|
21
|
-
json.title 'Place 2'
|
22
|
-
json.subtitle 'High class restaurant'
|
23
|
-
end
|
24
|
-
end
|
25
|
-
|
26
|
-
json.child! do
|
27
|
-
json.latitude 13.375903 + rand(0..0.1)
|
28
|
-
json.longitude 144.749791 + rand(0..0.1)
|
29
|
-
json.infoWindow do
|
30
|
-
json.title 'Place 3'
|
31
|
-
json.subtitle 'Random location'
|
32
|
-
end
|
33
|
-
end
|
34
|
-
|
35
|
-
json.child! do
|
36
|
-
json.latitude latitude
|
37
|
-
json.longitude longitude
|
38
|
-
json.infoWindow do
|
39
|
-
json.title 'You'
|
40
|
-
json.subtitle 'Current location'
|
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
|
49
|
-
end
|
50
|
-
end
|
51
|
-
end
|
1
|
+
|
2
|
+
page = json_ui_page json
|
3
|
+
|
4
|
+
json.pins do
|
5
|
+
latitude = params[:lat]&.to_f
|
6
|
+
longitude = params[:long]&.to_f
|
7
|
+
|
8
|
+
json.child! do
|
9
|
+
json.latitude 13.516680
|
10
|
+
json.longitude 144.817322
|
11
|
+
json.infoWindow do
|
12
|
+
json.title 'Place 1'
|
13
|
+
json.subtitle 'Big shopping mall'
|
14
|
+
end
|
15
|
+
end
|
16
|
+
|
17
|
+
json.child! do
|
18
|
+
json.latitude 13.473001
|
19
|
+
json.longitude 144.771303
|
20
|
+
json.infoWindow do
|
21
|
+
json.title 'Place 2'
|
22
|
+
json.subtitle 'High class restaurant'
|
23
|
+
end
|
24
|
+
end
|
25
|
+
|
26
|
+
json.child! do
|
27
|
+
json.latitude 13.375903 + rand(0..0.1)
|
28
|
+
json.longitude 144.749791 + rand(0..0.1)
|
29
|
+
json.infoWindow do
|
30
|
+
json.title 'Place 3'
|
31
|
+
json.subtitle 'Random location'
|
32
|
+
end
|
33
|
+
end
|
34
|
+
|
35
|
+
json.child! do
|
36
|
+
json.latitude latitude
|
37
|
+
json.longitude longitude
|
38
|
+
json.infoWindow do
|
39
|
+
json.title 'You'
|
40
|
+
json.subtitle 'Current location'
|
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
|
49
|
+
end
|
50
|
+
end
|
51
|
+
end
|
@@ -1,31 +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
|
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
|
@@ -1,41 +1,41 @@
|
|
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: 'Markdown'
|
9
|
-
scroll.spacer height: 6
|
10
|
-
scroll.markdown text:
|
11
|
-
'# h1 Heading' + "\n" +
|
12
|
-
'## h2 Heading' + "\n" +
|
13
|
-
'### h3 Heading' + "\n" +
|
14
|
-
'#### h4 Heading' + "\n" +
|
15
|
-
'##### h5 Heading' + "\n" +
|
16
|
-
'###### h6 Heading' + "\n" +
|
17
|
-
"\n" +
|
18
|
-
'## Emphasis' + "\n" +
|
19
|
-
"\n" +
|
20
|
-
'**This is bold text**' + "\n" +
|
21
|
-
"\n" +
|
22
|
-
'__This is bold text__' + "\n" +
|
23
|
-
"\n" +
|
24
|
-
'*This is italic text*' + "\n" +
|
25
|
-
"\n" +
|
26
|
-
'_This is italic text_' + "\n" +
|
27
|
-
"\n" +
|
28
|
-
'~~Strikethrough~~' + "\n" +
|
29
|
-
"\n" +
|
30
|
-
'https://www.google.com' + "\n"
|
31
|
-
|
32
|
-
scroll.spacer height: 20
|
33
|
-
scroll.h2 text: 'Markdown with preview (Web Only)'
|
34
|
-
scroll.spacer height: 6
|
35
|
-
scroll.markdown text: 'Here is the video: https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
|
36
|
-
|
37
|
-
scroll.spacer height: 10
|
38
|
-
scroll.markdown text: 'Some videos: https://youtu.be/ATnpEOo3GJA, https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
|
39
|
-
|
40
|
-
end
|
41
|
-
end
|
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: 'Markdown'
|
9
|
+
scroll.spacer height: 6
|
10
|
+
scroll.markdown text:
|
11
|
+
'# h1 Heading' + "\n" +
|
12
|
+
'## h2 Heading' + "\n" +
|
13
|
+
'### h3 Heading' + "\n" +
|
14
|
+
'#### h4 Heading' + "\n" +
|
15
|
+
'##### h5 Heading' + "\n" +
|
16
|
+
'###### h6 Heading' + "\n" +
|
17
|
+
"\n" +
|
18
|
+
'## Emphasis' + "\n" +
|
19
|
+
"\n" +
|
20
|
+
'**This is bold text**' + "\n" +
|
21
|
+
"\n" +
|
22
|
+
'__This is bold text__' + "\n" +
|
23
|
+
"\n" +
|
24
|
+
'*This is italic text*' + "\n" +
|
25
|
+
"\n" +
|
26
|
+
'_This is italic text_' + "\n" +
|
27
|
+
"\n" +
|
28
|
+
'~~Strikethrough~~' + "\n" +
|
29
|
+
"\n" +
|
30
|
+
'https://www.google.com' + "\n"
|
31
|
+
|
32
|
+
scroll.spacer height: 20
|
33
|
+
scroll.h2 text: 'Markdown with preview (Web Only)'
|
34
|
+
scroll.spacer height: 6
|
35
|
+
scroll.markdown text: 'Here is the video: https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
|
36
|
+
|
37
|
+
scroll.spacer height: 10
|
38
|
+
scroll.markdown text: 'Some videos: https://youtu.be/ATnpEOo3GJA, https://www.youtube.com/watch?v=947op8yKJRY', previewVideo: true
|
39
|
+
|
40
|
+
end
|
41
|
+
end
|
@@ -1,34 +1,34 @@
|
|
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
|
-
|
8
|
-
# scroll.h2 text: 'Unordered List'
|
9
|
-
# scroll.spacer height: 6
|
10
|
-
# scroll.panels_ul childViews: ->(ul) do
|
11
|
-
# ul.button text: 'Button', styleClass: 'link', onClick: ->(action) do
|
12
|
-
# action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
13
|
-
# end
|
14
|
-
# ul.label text: 'Label'
|
15
|
-
# end
|
16
|
-
|
17
|
-
scroll.spacer height: 20
|
18
|
-
scroll.h2 text: 'Time'
|
19
|
-
scroll.spacer height: 6
|
20
|
-
scroll.datetime value: 1.week.ago, format: 'YYYY-MM-DD'
|
21
|
-
scroll.datetime value: DateTime.current, format: 'hh:mm:ss', tick: true
|
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')
|
27
|
-
|
28
|
-
scroll.spacer height: 20
|
29
|
-
scroll.h2 text: 'Calendar'
|
30
|
-
scroll.spacer height: 6
|
31
|
-
scroll.calendar width: 'matchParent', height: 500, dataUrl: json_ui_garage_url(path: 'views/calendar_data')
|
32
|
-
|
33
|
-
end
|
34
|
-
end
|
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
|
+
|
8
|
+
# scroll.h2 text: 'Unordered List'
|
9
|
+
# scroll.spacer height: 6
|
10
|
+
# scroll.panels_ul childViews: ->(ul) do
|
11
|
+
# ul.button text: 'Button', styleClass: 'link', onClick: ->(action) do
|
12
|
+
# action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
13
|
+
# end
|
14
|
+
# ul.label text: 'Label'
|
15
|
+
# end
|
16
|
+
|
17
|
+
scroll.spacer height: 20
|
18
|
+
scroll.h2 text: 'Time'
|
19
|
+
scroll.spacer height: 6
|
20
|
+
scroll.datetime value: 1.week.ago, format: 'YYYY-MM-DD'
|
21
|
+
scroll.datetime value: DateTime.current, format: 'hh:mm:ss', tick: true
|
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')
|
27
|
+
|
28
|
+
scroll.spacer height: 20
|
29
|
+
scroll.h2 text: 'Calendar'
|
30
|
+
scroll.spacer height: 6
|
31
|
+
scroll.calendar width: 'matchParent', height: 500, dataUrl: json_ui_garage_url(path: 'views/calendar_data')
|
32
|
+
|
33
|
+
end
|
34
|
+
end
|
@@ -1,31 +1,31 @@
|
|
1
|
-
json.title 'Views'
|
2
|
-
|
3
|
-
page = json_ui_page json
|
4
|
-
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
-
|
6
|
-
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
|
-
scroll.h2 text: 'Progress Bar'
|
8
|
-
scroll.spacer height: 6
|
9
|
-
scroll.progressBar value: 0.1
|
10
|
-
scroll.spacer height: 20
|
11
|
-
|
12
|
-
scroll.h2 text: 'Thin Progress Bar'
|
13
|
-
scroll.spacer height: 6
|
14
|
-
scroll.progressBar value: 0.25, height: 5, styleClass: 'no-text'
|
15
|
-
scroll.spacer height: 20
|
16
|
-
|
17
|
-
scroll.h2 text: 'Striped Progress Bar'
|
18
|
-
scroll.spacer height: 6
|
19
|
-
scroll.progressBar value: 0.5, styleClass: 'striped'
|
20
|
-
scroll.spacer height: 20
|
21
|
-
|
22
|
-
scroll.h2 text: 'Progress Bar with custom colors'
|
23
|
-
scroll.spacer height: 6
|
24
|
-
scroll.progressBar value: 0.75, color: '#272551', backgroundColor: '#FFFF00', styleClass: 'light'
|
25
|
-
scroll.spacer height: 20
|
26
|
-
|
27
|
-
scroll.h2 text: 'Reversed Progress Bar'
|
28
|
-
scroll.spacer height: 6
|
29
|
-
scroll.progressBar value: 0.1, reversed: true
|
30
|
-
scroll.spacer height: 20
|
31
|
-
end
|
1
|
+
json.title 'Views'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
|
+
scroll.h2 text: 'Progress Bar'
|
8
|
+
scroll.spacer height: 6
|
9
|
+
scroll.progressBar value: 0.1
|
10
|
+
scroll.spacer height: 20
|
11
|
+
|
12
|
+
scroll.h2 text: 'Thin Progress Bar'
|
13
|
+
scroll.spacer height: 6
|
14
|
+
scroll.progressBar value: 0.25, height: 5, styleClass: 'no-text'
|
15
|
+
scroll.spacer height: 20
|
16
|
+
|
17
|
+
scroll.h2 text: 'Striped Progress Bar'
|
18
|
+
scroll.spacer height: 6
|
19
|
+
scroll.progressBar value: 0.5, styleClass: 'striped'
|
20
|
+
scroll.spacer height: 20
|
21
|
+
|
22
|
+
scroll.h2 text: 'Progress Bar with custom colors'
|
23
|
+
scroll.spacer height: 6
|
24
|
+
scroll.progressBar value: 0.75, color: '#272551', backgroundColor: '#FFFF00', styleClass: 'light'
|
25
|
+
scroll.spacer height: 20
|
26
|
+
|
27
|
+
scroll.h2 text: 'Reversed Progress Bar'
|
28
|
+
scroll.spacer height: 6
|
29
|
+
scroll.progressBar value: 0.1, reversed: true
|
30
|
+
scroll.spacer height: 20
|
31
|
+
end
|
@@ -1,35 +1,35 @@
|
|
1
|
-
json.title 'Views'
|
2
|
-
|
3
|
-
page = json_ui_page json
|
4
|
-
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
-
|
6
|
-
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
|
-
scroll.h1 text: 'Heading 1'
|
8
|
-
|
9
|
-
scroll.spacer height: 10
|
10
|
-
scroll.h2 text: 'Heading 2'
|
11
|
-
|
12
|
-
scroll.spacer height: 10
|
13
|
-
scroll.h3 text: 'Heading 3'
|
14
|
-
|
15
|
-
scroll.spacer height: 10
|
16
|
-
scroll.h4 text: 'Heading 4'
|
17
|
-
|
18
|
-
scroll.spacer height: 10
|
19
|
-
scroll.label text: 'Label'
|
20
|
-
|
21
|
-
scroll.spacer height: 20
|
22
|
-
scroll.hr width: 'matchParent'
|
23
|
-
|
24
|
-
scroll.spacer height: 20
|
25
|
-
scroll.h2 text: 'Paragraph'
|
26
|
-
scroll.spacer height: 6
|
27
|
-
scroll.p text: 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC,'\
|
28
|
-
' making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words,'\
|
29
|
-
' consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'\
|
30
|
-
' Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC.'\
|
31
|
-
' This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..",'\
|
32
|
-
' comes from a line in section 1.10.32.' + "\n\n" +
|
33
|
-
'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum"'\
|
34
|
-
' by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.'
|
35
|
-
end
|
1
|
+
json.title 'Views'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
+
|
6
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
|
+
scroll.h1 text: 'Heading 1'
|
8
|
+
|
9
|
+
scroll.spacer height: 10
|
10
|
+
scroll.h2 text: 'Heading 2'
|
11
|
+
|
12
|
+
scroll.spacer height: 10
|
13
|
+
scroll.h3 text: 'Heading 3'
|
14
|
+
|
15
|
+
scroll.spacer height: 10
|
16
|
+
scroll.h4 text: 'Heading 4'
|
17
|
+
|
18
|
+
scroll.spacer height: 10
|
19
|
+
scroll.label text: 'Label'
|
20
|
+
|
21
|
+
scroll.spacer height: 20
|
22
|
+
scroll.hr width: 'matchParent'
|
23
|
+
|
24
|
+
scroll.spacer height: 20
|
25
|
+
scroll.h2 text: 'Paragraph'
|
26
|
+
scroll.spacer height: 6
|
27
|
+
scroll.p text: 'Contrary to popular belief, Lorem Ipsum is not simply random text. It has roots in a piece of classical Latin literature from 45 BC,'\
|
28
|
+
' making it over 2000 years old. Richard McClintock, a Latin professor at Hampden-Sydney College in Virginia, looked up one of the more obscure Latin words,'\
|
29
|
+
' consectetur, from a Lorem Ipsum passage, and going through the cites of the word in classical literature, discovered the undoubtable source.'\
|
30
|
+
' Lorem Ipsum comes from sections 1.10.32 and 1.10.33 of "de Finibus Bonorum et Malorum" (The Extremes of Good and Evil) by Cicero, written in 45 BC.'\
|
31
|
+
' This book is a treatise on the theory of ethics, very popular during the Renaissance. The first line of Lorem Ipsum, "Lorem ipsum dolor sit amet..",'\
|
32
|
+
' comes from a line in section 1.10.32.' + "\n\n" +
|
33
|
+
'The standard chunk of Lorem Ipsum used since the 1500s is reproduced below for those interested. Sections 1.10.32 and 1.10.33 from "de Finibus Bonorum et Malorum"'\
|
34
|
+
' by Cicero are also reproduced in their exact original form, accompanied by English versions from the 1914 translation by H. Rackham.'
|
35
|
+
end
|
@@ -1,35 +1,35 @@
|
|
1
|
-
<!DOCTYPE html>
|
2
|
-
<html lang="<%= I18n.locale %>">
|
3
|
-
|
4
|
-
<head>
|
5
|
-
<meta charset="utf-8" />
|
6
|
-
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
|
7
|
-
|
8
|
-
<title>App</title>
|
9
|
-
<%= csrf_meta_tags %>
|
10
|
-
|
11
|
-
<%= javascript_pack_tag 'vue_renderer', defer: true %>
|
12
|
-
<%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
|
13
|
-
|
14
|
-
<%= stylesheet_pack_tag 'vue_renderer' %>
|
15
|
-
|
16
|
-
<link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
|
17
|
-
|
18
|
-
<%# Without this, checkboxes and radio buttons will not display. %>
|
19
|
-
<link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
|
20
|
-
|
21
|
-
<%= yield :head %>
|
22
|
-
</head>
|
23
|
-
|
24
|
-
<body>
|
25
|
-
<noscript>Please enable JavaScript to view this web site.</noscript>
|
26
|
-
<div id="app"></div>
|
27
|
-
|
28
|
-
<script>
|
29
|
-
var __page = <%= raw @__json_ui_orig_page%>;
|
30
|
-
</script>
|
31
|
-
|
32
|
-
<%= yield :footer %>
|
33
|
-
</body>
|
34
|
-
|
35
|
-
</html>
|
1
|
+
<!DOCTYPE html>
|
2
|
+
<html lang="<%= I18n.locale %>">
|
3
|
+
|
4
|
+
<head>
|
5
|
+
<meta charset="utf-8" />
|
6
|
+
<meta content="width=device-width, initial-scale=1, shrink-to-fit=no" name="viewport" />
|
7
|
+
|
8
|
+
<title>App</title>
|
9
|
+
<%= csrf_meta_tags %>
|
10
|
+
|
11
|
+
<%= javascript_pack_tag 'vue_renderer', defer: true %>
|
12
|
+
<%#= javascript_include_tag 'vue_renderer_extras', defer: true %>
|
13
|
+
|
14
|
+
<%= stylesheet_pack_tag 'vue_renderer' %>
|
15
|
+
|
16
|
+
<link href="//fonts.googleapis.com/css?family=Material+Icons" rel="stylesheet" />
|
17
|
+
|
18
|
+
<%# Without this, checkboxes and radio buttons will not display. %>
|
19
|
+
<link href="//cdn.materialdesignicons.com/2.1.99/css/materialdesignicons.min.css" rel="stylesheet" />
|
20
|
+
|
21
|
+
<%= yield :head %>
|
22
|
+
</head>
|
23
|
+
|
24
|
+
<body>
|
25
|
+
<noscript>Please enable JavaScript to view this web site.</noscript>
|
26
|
+
<div id="app"></div>
|
27
|
+
|
28
|
+
<script>
|
29
|
+
var __page = <%= raw @__json_ui_orig_page%>;
|
30
|
+
</script>
|
31
|
+
|
32
|
+
<%= yield :footer %>
|
33
|
+
</body>
|
34
|
+
|
35
|
+
</html>
|
data/config/routes.rb
CHANGED
@@ -1,8 +1,8 @@
|
|
1
|
-
Glib::Web::Engine.routes.draw do
|
2
|
-
scope module: :glib do
|
3
|
-
get 'json_ui_garage', to: 'home#json_ui_garage'
|
4
|
-
post 'json_ui_garage', to: 'home#json_ui_garage'
|
5
|
-
patch 'json_ui_garage', to: 'home#json_ui_garage'
|
6
|
-
delete 'json_ui_garage', to: 'home#json_ui_garage'
|
7
|
-
end
|
1
|
+
Glib::Web::Engine.routes.draw do
|
2
|
+
scope module: :glib do
|
3
|
+
get 'json_ui_garage', to: 'home#json_ui_garage'
|
4
|
+
post 'json_ui_garage', to: 'home#json_ui_garage'
|
5
|
+
patch 'json_ui_garage', to: 'home#json_ui_garage'
|
6
|
+
delete 'json_ui_garage', to: 'home#json_ui_garage'
|
7
|
+
end
|
8
8
|
end
|
@@ -1,24 +1,24 @@
|
|
1
|
-
module Glib
|
2
|
-
module Generators
|
3
|
-
class InstallGenerator < Rails::Generators::Base
|
4
|
-
source_root File.expand_path('../../templates', __FILE__)
|
5
|
-
|
6
|
-
class_option :redis_env_key, type: :string, default: 'DT_REDIS_URL'
|
7
|
-
class_option :database_env_key, type: :string, default: 'DT_DATABASE_URL'
|
8
|
-
class_option :app_name, type: :string, default: Rails.application.class.parent_name
|
9
|
-
|
10
|
-
def copy_initializer
|
11
|
-
[
|
12
|
-
'20191017062519_create_texts.rb',
|
13
|
-
'20191024063257_add_scope_to_texts.rb',
|
14
|
-
'20191112095018_add_lang_to_texts.rb',
|
15
|
-
'20191126071051_create_active_storage_tables.active_storage.rb'
|
16
|
-
].each do |migration_file|
|
17
|
-
template migration_file, "db/dynamic_text_migrate/#{migration_file}"
|
18
|
-
end
|
19
|
-
template 'dynamic_text.rb', 'config/initializers/dynamic_text.rb'
|
20
|
-
template 'database.yml', 'config/database.yml'
|
21
|
-
end
|
22
|
-
end
|
23
|
-
end
|
24
|
-
end
|
1
|
+
module Glib
|
2
|
+
module Generators
|
3
|
+
class InstallGenerator < Rails::Generators::Base
|
4
|
+
source_root File.expand_path('../../templates', __FILE__)
|
5
|
+
|
6
|
+
class_option :redis_env_key, type: :string, default: 'DT_REDIS_URL'
|
7
|
+
class_option :database_env_key, type: :string, default: 'DT_DATABASE_URL'
|
8
|
+
class_option :app_name, type: :string, default: Rails.application.class.parent_name
|
9
|
+
|
10
|
+
def copy_initializer
|
11
|
+
[
|
12
|
+
'20191017062519_create_texts.rb',
|
13
|
+
'20191024063257_add_scope_to_texts.rb',
|
14
|
+
'20191112095018_add_lang_to_texts.rb',
|
15
|
+
'20191126071051_create_active_storage_tables.active_storage.rb'
|
16
|
+
].each do |migration_file|
|
17
|
+
template migration_file, "db/dynamic_text_migrate/#{migration_file}"
|
18
|
+
end
|
19
|
+
template 'dynamic_text.rb', 'config/initializers/dynamic_text.rb'
|
20
|
+
template 'database.yml', 'config/database.yml'
|
21
|
+
end
|
22
|
+
end
|
23
|
+
end
|
24
|
+
end
|
@@ -1,12 +1,12 @@
|
|
1
|
-
class CreateTexts < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
create_table :texts do |t|
|
4
|
-
t.string :key
|
5
|
-
t.text :content
|
6
|
-
|
7
|
-
t.timestamps
|
8
|
-
end
|
9
|
-
|
10
|
-
add_index :texts, :key, unique: true
|
11
|
-
end
|
12
|
-
end
|
1
|
+
class CreateTexts < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
create_table :texts do |t|
|
4
|
+
t.string :key
|
5
|
+
t.text :content
|
6
|
+
|
7
|
+
t.timestamps
|
8
|
+
end
|
9
|
+
|
10
|
+
add_index :texts, :key, unique: true
|
11
|
+
end
|
12
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class AddScopeToTexts < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
add_column :texts, :scope, :string
|
4
|
-
remove_index :texts, :key
|
5
|
-
add_index :texts, [:scope, :key], unique: true
|
6
|
-
end
|
7
|
-
end
|
1
|
+
class AddScopeToTexts < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
add_column :texts, :scope, :string
|
4
|
+
remove_index :texts, :key
|
5
|
+
add_index :texts, [:scope, :key], unique: true
|
6
|
+
end
|
7
|
+
end
|
@@ -1,7 +1,7 @@
|
|
1
|
-
class AddLangToTexts < ActiveRecord::Migration[6.0]
|
2
|
-
def change
|
3
|
-
add_column :texts, :lang, :string
|
4
|
-
remove_index :texts, [:scope, :key]
|
5
|
-
add_index :texts, [:scope, :lang, :key], unique: true
|
6
|
-
end
|
7
|
-
end
|
1
|
+
class AddLangToTexts < ActiveRecord::Migration[6.0]
|
2
|
+
def change
|
3
|
+
add_column :texts, :lang, :string
|
4
|
+
remove_index :texts, [:scope, :key]
|
5
|
+
add_index :texts, [:scope, :lang, :key], unique: true
|
6
|
+
end
|
7
|
+
end
|