glib-web 0.4.22 → 0.4.23
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +5 -5
- data/app/controllers/concerns/glib/auth/policy.rb +0 -0
- data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
- data/app/controllers/concerns/glib/json/traversal.rb +0 -0
- data/app/controllers/glib/home_controller.rb +0 -0
- data/app/helpers/glib/dynamic_images_helper.rb +0 -0
- data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
- data/app/helpers/glib/json_ui/abstract_builder.rb +6 -0
- data/app/helpers/glib/json_ui/action_builder/dialogs.rb +63 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +15 -0
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +41 -0
- data/app/helpers/glib/json_ui/action_builder/windows.rb +25 -0
- data/app/helpers/glib/json_ui/action_builder.rb +0 -113
- data/app/helpers/glib/json_ui/dynamic_field_builders.rb +25 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +28 -0
- data/app/helpers/glib/json_ui/list_builders.rb +0 -0
- data/app/helpers/glib/json_ui/menu_builder.rb +0 -0
- data/app/helpers/glib/json_ui/page_helper.rb +13 -1
- data/app/helpers/glib/json_ui/response_helper.rb +3 -3
- data/app/helpers/glib/json_ui/split_builders.rb +2 -2
- data/app/helpers/glib/json_ui/styling_helper.rb +0 -0
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/banners.rb +3 -2
- data/app/helpers/glib/json_ui/view_builder/fields.rb +6 -3
- data/app/helpers/glib/json_ui/view_builder/panels.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder.rb +0 -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/policies/glib/application_policy.rb +148 -148
- data/app/views/app/views/json_ui/vue/renderer.html.erb +0 -0
- data/app/views/json_ui/garage/_nav_menu.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +95 -0
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +19 -0
- data/app/views/json_ui/garage/actions/_snackbars.json.jbuilder +33 -0
- data/app/views/json_ui/garage/actions/_windows.json.jbuilder +24 -0
- data/app/views/json_ui/garage/actions/index.json.jbuilder +5 -109
- data/app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/checkboxes.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_group.json.jbuilder +21 -4
- data/app/views/json_ui/garage/forms/dynamic_select.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/file_upload.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/get_request.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +0 -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/forms/text_validation.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
- data/app/views/json_ui/garage/home/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/edit_actions.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/infinite_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +0 -0
- data/app/views/json_ui/garage/notifications/index.json.jbuilder +2 -2
- data/app/views/json_ui/garage/pages/flat_centered.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/nav_buttons.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/carousel.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/horizontal.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/split.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/vertical.json.jbuilder +0 -0
- 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/export_import.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/horizontal_scroll.json.jbuilder +0 -0
- data/app/views/json_ui/garage/tables/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/banners.json.jbuilder +22 -5
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/charts.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/images.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/index.json.jbuilder +2 -32
- data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/misc.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/texts.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/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/forms_submit.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
- data/lib/glib/json_crawler/http.rb +10 -4
- data/lib/glib/json_crawler/router.rb +2 -2
- data/lib/glib/json_crawler.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 +82 -0
- metadata +13 -2
@@ -0,0 +1,19 @@
|
|
1
|
+
|
2
|
+
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
3
|
+
header.h3 text: 'Sheets'
|
4
|
+
end
|
5
|
+
|
6
|
+
section.rows builder: ->(template) do
|
7
|
+
template.thumbnail title: 'sheets/select', onClick: ->(action) do
|
8
|
+
action.sheets_select message: 'Select one', buttons: ->(menu) do
|
9
|
+
menu.button text: 'Option1', onClick: ->(subaction) do
|
10
|
+
action.dialogs_alert message: 'Option 1'
|
11
|
+
end
|
12
|
+
menu.button text: 'Option2', onClick: ->(subaction) do
|
13
|
+
action.dialogs_alert message: 'Option 2'
|
14
|
+
end
|
15
|
+
menu.button text: 'Cancel'
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
19
|
+
end
|
@@ -0,0 +1,33 @@
|
|
1
|
+
|
2
|
+
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
3
|
+
header.h3 text: 'Snackbars'
|
4
|
+
end
|
5
|
+
|
6
|
+
section.rows builder: ->(template) do
|
7
|
+
template.thumbnail title: 'snackbars/alert', onClick: ->(action) do
|
8
|
+
action.snackbars_alert message: 'This is an alert snackbar', onClose: ->(action) do
|
9
|
+
action.dialogs_alert message: 'Closed'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
|
13
|
+
# template.thumbnail title: 'snackbars/alert with markdown', onClick: ->(action) do
|
14
|
+
# action.snackbars_alert message: 'This is an *alert* snackbar', message_format: 'markdown'
|
15
|
+
# end
|
16
|
+
|
17
|
+
template.thumbnail title: 'snackbars/select', onClick: ->(action) do
|
18
|
+
action.snackbars_select message: 'Select one', buttons: ->(menu) do
|
19
|
+
menu.button text: 'Option1', onClick: ->(subaction) do
|
20
|
+
subaction.dialogs_alert message: 'Option 1'
|
21
|
+
end
|
22
|
+
menu.button text: 'Option2', onClick: ->(subaction) do
|
23
|
+
subaction.dialogs_alert message: 'Option 2'
|
24
|
+
end
|
25
|
+
menu.button text: 'Cancel'
|
26
|
+
end
|
27
|
+
end
|
28
|
+
|
29
|
+
template.thumbnail title: 'snackbars with styling', onClick: ->(action) do
|
30
|
+
action.snackbars_alert message: 'This is a styled snackbar', verticalPosition: 'top', styleClass: 'success'
|
31
|
+
end
|
32
|
+
|
33
|
+
end
|
@@ -0,0 +1,24 @@
|
|
1
|
+
|
2
|
+
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
3
|
+
header.h3 text: 'Windows'
|
4
|
+
end
|
5
|
+
|
6
|
+
section.rows builder: ->(template) do
|
7
|
+
template.thumbnail title: 'windows/close', onClick: ->(action) do
|
8
|
+
action.windows_close onClose: ->(subaction) do
|
9
|
+
subaction.dialogs_alert message: 'Previous window closed'
|
10
|
+
end
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
section.rows builder: ->(template) do
|
15
|
+
template.thumbnail title: 'windows/open', onClick: ->(action) do
|
16
|
+
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
17
|
+
end
|
18
|
+
end
|
19
|
+
|
20
|
+
section.rows builder: ->(template) do
|
21
|
+
template.thumbnail title: 'windows/openWeb', onClick: ->(action) do
|
22
|
+
action.windows_openWeb url: 'http://www.google.com'
|
23
|
+
end
|
24
|
+
end
|
@@ -5,117 +5,13 @@ json_ui_page json do |page|
|
|
5
5
|
|
6
6
|
page.list sections: [
|
7
7
|
->(section) do
|
8
|
-
|
9
|
-
header.h3 text: 'Dialogs'
|
10
|
-
end
|
11
|
-
|
12
|
-
section.rows builder: ->(template) do
|
13
|
-
template.thumbnail title: 'dialogs/alert', onClick: ->(action) do
|
14
|
-
action.dialogs_alert message: 'This is an alert dialog', onClose: ->(action) do
|
15
|
-
action.snackbars_alert message: 'Closed'
|
16
|
-
end
|
17
|
-
end
|
18
|
-
|
19
|
-
# template.thumbnail title: 'dialogs/confirm (Experimental)', onClick: ->(action) do
|
20
|
-
# action.dialogs_confirm message: 'This is a confirm dialog', onCancel: ->(action) do
|
21
|
-
# action.snackbars_alert message: 'Canceled'
|
22
|
-
# end, onConfirm: ->(action) do
|
23
|
-
# action.snackbars_alert message: 'Confirmed'
|
24
|
-
# end
|
25
|
-
# end
|
26
|
-
|
27
|
-
template.thumbnail title: 'dialogs/option', onClick: ->(action) do
|
28
|
-
action.dialogs_options message: 'Select one', buttons: ->(menu) do
|
29
|
-
menu.button text: 'Option1', onClick: ->(action) do
|
30
|
-
action.dialogs_alert message: 'Option 1'
|
31
|
-
end
|
32
|
-
menu.button text: 'Option2', onClick: ->(action) do
|
33
|
-
action.dialogs_alert message: 'Option 2'
|
34
|
-
end
|
35
|
-
menu.button text: 'Cancel'
|
36
|
-
end
|
37
|
-
end
|
38
|
-
|
39
|
-
template.thumbnail title: 'dialogs/open', onClick: ->(action) do
|
40
|
-
action.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
|
41
|
-
end
|
42
|
-
|
43
|
-
template.thumbnail title: 'dialogs/oauth', onClick: ->(action) do
|
44
|
-
provider = {
|
45
|
-
name: "facebook",
|
46
|
-
webRequestUrl: "https://www.facebook.com/v3.1/dialog/oauth?auth_type=rerequest&client_id=CLIENT_ID&redirect_uri=http%3A%2F%2Fwww.lvh.me%3A3000%2Foauth_callback%2Ffacebook&response_type=code&scope=email",
|
47
|
-
requestUrl: "https://www.facebook.com/v3.1/dialog/oauth",
|
48
|
-
clientId: "CLIENT_ID",
|
49
|
-
redirectUrl: "http://www.lvh.me:3000/oauth_callback/facebook.json"
|
50
|
-
}
|
51
|
-
|
52
|
-
action.dialogs_oauth provider: provider, providerParamName: "session[oauth_provider]", callbackUrlParamName: "session[[oauth_callback_url]", onSuccess: ->(action) do
|
53
|
-
action.http_post url: 'TODO: post params to server'
|
54
|
-
end
|
55
|
-
end
|
56
|
-
|
57
|
-
end
|
8
|
+
render "#{@path_prefix}/actions/dialogs", section: section
|
58
9
|
end, ->(section) do
|
59
|
-
|
60
|
-
header.h3 text: 'Snackbars'
|
61
|
-
end
|
62
|
-
|
63
|
-
section.rows builder: ->(template) do
|
64
|
-
template.thumbnail title: 'snackbars/alert', onClick: ->(action) do
|
65
|
-
action.snackbars_alert message: 'This is an alert snackbar', onClose: ->(action) do
|
66
|
-
action.dialogs_alert message: 'Closed'
|
67
|
-
end
|
68
|
-
end
|
69
|
-
|
70
|
-
# template.thumbnail title: 'snackbars/confirm (Experimental)', onClick: ->(action) do
|
71
|
-
# action.snackbars_confirm message: 'This is a confirm dialog', onCancel: ->(action) do
|
72
|
-
# action.dialogs_alert message: 'Canceled'
|
73
|
-
# end, onConfirm: ->(action) do
|
74
|
-
# action.dialogs_alert message: 'Confirmed'
|
75
|
-
# end
|
76
|
-
# end
|
77
|
-
|
78
|
-
template.thumbnail title: 'snackbars/options', onClick: ->(action) do
|
79
|
-
action.snackbars_options message: 'Select one', buttons: ->(menu) do
|
80
|
-
menu.button text: 'Option1', onClick: ->(action) do
|
81
|
-
action.dialogs_alert message: 'Option 1'
|
82
|
-
end
|
83
|
-
menu.button text: 'Option2', onClick: ->(action) do
|
84
|
-
action.dialogs_alert message: 'Option 2'
|
85
|
-
end
|
86
|
-
menu.button text: 'Cancel'
|
87
|
-
end
|
88
|
-
end
|
89
|
-
|
90
|
-
template.thumbnail title: 'snackbars with styling', onClick: ->(action) do
|
91
|
-
action.snackbars_alert message: 'This is a styled snackbar', verticalPosition: 'top', styleClass: 'success'
|
92
|
-
end
|
93
|
-
|
94
|
-
end
|
10
|
+
render "#{@path_prefix}/actions/snackbars", section: section
|
95
11
|
end, ->(section) do
|
96
|
-
|
97
|
-
|
98
|
-
|
99
|
-
|
100
|
-
section.rows builder: ->(template) do
|
101
|
-
template.thumbnail title: 'windows/close', onClick: ->(action) do
|
102
|
-
action.windows_close onClose: ->(subaction) do
|
103
|
-
subaction.dialogs_alert message: 'Previous window closed'
|
104
|
-
end
|
105
|
-
end
|
106
|
-
end
|
107
|
-
|
108
|
-
section.rows builder: ->(template) do
|
109
|
-
template.thumbnail title: 'windows/open', onClick: ->(action) do
|
110
|
-
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
111
|
-
end
|
112
|
-
end
|
113
|
-
|
114
|
-
section.rows builder: ->(template) do
|
115
|
-
template.thumbnail title: 'windows/openWeb', onClick: ->(action) do
|
116
|
-
action.windows_openWeb url: 'http://www.google.com'
|
117
|
-
end
|
118
|
-
end
|
12
|
+
render "#{@path_prefix}/actions/sheets", section: section
|
13
|
+
end, ->(section) do
|
14
|
+
render "#{@path_prefix}/actions/windows", section: section
|
119
15
|
end, ->(section) do
|
120
16
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
121
17
|
header.h3 text: 'Reload'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -21,10 +21,27 @@ json_ui_page json do |page|
|
|
21
21
|
'type': 'yes_no'
|
22
22
|
}
|
23
23
|
]
|
24
|
-
form.fields_dynamicGroup width: 'matchParent', name: 'user[evaluation]', value: value, groupTitlePrefix: 'Entry', groupTemplateViews: ->(group) do
|
25
|
-
|
26
|
-
|
27
|
-
|
24
|
+
# form.fields_dynamicGroup width: 'matchParent', name: 'user[evaluation]', value: value, groupTitlePrefix: 'Entry', groupTemplateViews: ->(group) do
|
25
|
+
# group.spacer height: 10
|
26
|
+
# group.fields_text width: 'matchParent', name: 'question', label: 'Question'
|
27
|
+
# group.fields_text width: 'matchParent', name: 'type', label: 'Answer type'
|
28
|
+
# end
|
29
|
+
|
30
|
+
# form.fields_dynamicGroup width: 'matchParent', name: 'user[evaluation]', value: value, group: ->(group) do
|
31
|
+
# group.titlePrefix 'Entry'
|
32
|
+
# group.template childViews: ->(template) do
|
33
|
+
# template.spacer height: 10
|
34
|
+
# template.fields_text width: 'matchParent', name: 'question', label: 'Question'
|
35
|
+
# template.fields_text width: 'matchParent', name: 'type', label: 'Answer type'
|
36
|
+
# end
|
37
|
+
# end
|
38
|
+
|
39
|
+
form.fields_dynamicGroup width: 'matchParent', name: 'user[evaluation]', value: value, titlePrefix: 'Entry', content: ->(group) do
|
40
|
+
group.template padding: { left: 32 }, childViews: ->(template) do
|
41
|
+
template.spacer height: 10
|
42
|
+
template.fields_text width: 'matchParent', name: 'question', label: 'Question'
|
43
|
+
template.fields_text width: 'matchParent', name: 'type', label: 'Answer type'
|
44
|
+
end
|
28
45
|
end
|
29
46
|
|
30
47
|
form.spacer height: 20
|
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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -6,8 +6,8 @@ json_ui_page json do |page|
|
|
6
6
|
page.list firstSection: ->(section) do
|
7
7
|
section.rows builder: ->(template) do
|
8
8
|
template.thumbnail title: 'Send Desktop Notification', onClick: ->(action) do
|
9
|
-
action.dialogs_notification title: 'Hello World',
|
10
|
-
|
9
|
+
action.dialogs_notification title: 'Hello World', message: 'This is a notification', onClick: ->(subaction) do
|
10
|
+
subaction.dialogs_alert message: 'Perform action'
|
11
11
|
end
|
12
12
|
end
|
13
13
|
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
|
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
|
@@ -2,18 +2,35 @@ json.title 'Views'
|
|
2
2
|
|
3
3
|
json_ui_page json do |page|
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
|
-
|
5
|
+
|
6
6
|
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
7
|
-
|
7
|
+
|
8
8
|
scroll.spacer height: 20
|
9
9
|
scroll.h2 text: 'Alert banner'
|
10
10
|
scroll.spacer height: 6
|
11
11
|
scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner'
|
12
|
-
|
12
|
+
|
13
13
|
scroll.spacer height: 20
|
14
|
-
scroll.h2 text: 'Alert banner with styling'
|
14
|
+
scroll.h2 text: 'Alert banner with color styling'
|
15
15
|
scroll.spacer height: 6
|
16
16
|
scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner', styleClass: 'success'
|
17
|
-
|
17
|
+
|
18
|
+
scroll.spacer height: 20
|
19
|
+
scroll.h2 text: 'Alert banner with frameless styling (Experimental)'
|
20
|
+
scroll.spacer height: 6
|
21
|
+
scroll.banners_alert width: 'matchParent', icon: 'info', message: 'This is an alert banner', styleClass: 'frameless'
|
22
|
+
|
23
|
+
# # TODO: Deprecate in favour of `banners/custom` and `markdown`
|
24
|
+
# markdown = '## Emphasis' + "\n" +
|
25
|
+
# "\n" +
|
26
|
+
# '**This is bold text**' + "\n" +
|
27
|
+
# "\n" +
|
28
|
+
# '*This is italic text*' + "\n" +
|
29
|
+
# "\n" +
|
30
|
+
# '~~Strikethrough~~'
|
31
|
+
# scroll.spacer height: 20
|
32
|
+
# scroll.h2 text: 'Alert banner with markdown'
|
33
|
+
# scroll.spacer height: 6
|
34
|
+
# scroll.banners_alert width: 'matchParent', icon: 'info', message: markdown, message_format: 'markdown'
|
18
35
|
end
|
19
36
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,8 +2,8 @@ json.title 'Views'
|
|
2
2
|
|
3
3
|
json_ui_page json do |page|
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: true
|
5
|
-
|
6
|
-
page.list sections: [
|
5
|
+
|
6
|
+
page.list sections: [
|
7
7
|
->(section) do
|
8
8
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
9
9
|
header.h2 text: 'Components'
|
@@ -45,34 +45,4 @@ json_ui_page json do |page|
|
|
45
45
|
end
|
46
46
|
end
|
47
47
|
]
|
48
|
-
|
49
|
-
# page.list firstSection: ->(section) do
|
50
|
-
# section.rows builder: ->(template) do
|
51
|
-
# template.thumbnail title: 'Texts', onClick: ->(action) do
|
52
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/texts')
|
53
|
-
# end
|
54
|
-
# template.thumbnail title: 'Images', onClick: ->(action) do
|
55
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/images')
|
56
|
-
# end
|
57
|
-
# template.thumbnail title: 'Carousels', onClick: ->(action) do
|
58
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/carousels')
|
59
|
-
# end
|
60
|
-
# template.thumbnail title: 'Charts', onClick: ->(action) do
|
61
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/charts')
|
62
|
-
# end
|
63
|
-
# template.thumbnail title: 'Banners', onClick: ->(action) do
|
64
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/banners')
|
65
|
-
# end
|
66
|
-
# template.thumbnail title: 'Misc', onClick: ->(action) do
|
67
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/misc')
|
68
|
-
# end
|
69
|
-
# template.thumbnail title: 'Markdowns', onClick: ->(action) do
|
70
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/markdowns')
|
71
|
-
# end
|
72
|
-
# template.thumbnail title: 'Links', onClick: ->(action) do
|
73
|
-
# action.windows_open url: json_ui_garage_url(path: 'views/links')
|
74
|
-
# end
|
75
|
-
# end
|
76
|
-
|
77
|
-
# end
|
78
48
|
end
|