glib-web 0.5.2 → 0.5.8
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 +1 -1
- data/app/helpers/glib/app_feature_support_helper.rb +16 -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/forms_helper.rb +0 -0
- data/app/helpers/glib/json_ui/abstract_builder.rb +2 -2
- data/app/helpers/glib/json_ui/action_builder.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/dialogs.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/http.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/action_builder/windows.rb +1 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/list_builders.rb +5 -0
- data/app/helpers/glib/json_ui/menu_builder.rb +0 -0
- data/app/helpers/glib/json_ui/page_helper.rb +27 -19
- data/app/helpers/glib/json_ui/response_helper.rb +0 -0
- data/app/helpers/glib/json_ui/split_builders.rb +0 -0
- data/app/helpers/glib/json_ui/styling_helper.rb +22 -0
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder.rb +16 -16
- data/app/helpers/glib/json_ui/view_builder/banners.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +3 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +2 -0
- data/app/helpers/glib/urls_helper.rb +7 -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 +27 -30
- 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/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 +21 -12
- data/app/views/json_ui/garage/actions/_http.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/_timeouts.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_windows.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +6 -0
- data/app/views/json_ui/garage/actions/index.json.jbuilder +2 -2
- 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 +9 -18
- 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 +25 -10
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +5 -5
- 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 +6 -3
- 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/show_hide.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/styled_boxes.json.jbuilder +4 -1
- 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/home/slow.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/_infinite_scroll_section.json.jbuilder +15 -5
- 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 +0 -43
- data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +19 -21
- 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 +11 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +12 -13
- data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/nav_buttons.json.jbuilder +28 -16
- data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +40 -0
- data/app/views/json_ui/garage/pages/tab_bar.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/carousel.json.jbuilder +24 -3
- data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/flow.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/outlined.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/autoload_as_needed.json.jbuilder +39 -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 +3 -0
- data/app/views/json_ui/garage/tables/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/_chart_data.json.jbuilder +1 -1
- data/app/views/json_ui/garage/views/banners.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +23 -27
- data/app/views/json_ui/garage/views/charts.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/icons.json.jbuilder +22 -0
- data/app/views/json_ui/garage/views/images.json.jbuilder +4 -4
- data/app/views/json_ui/garage/views/index.json.jbuilder +3 -3
- 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-web.rb +0 -0
- data/lib/glib/crypt.rb +1 -1
- data/lib/glib/crypt/utils.rb +0 -0
- data/lib/glib/dynamic_text.rb +1 -1
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/engine.rb +0 -0
- data/lib/glib/json_crawler.rb +1 -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/menu.rb +12 -0
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.rb +1 -1
- 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/http.rb +7 -4
- data/lib/glib/json_crawler/router.rb +2 -1
- data/lib/glib/test_helpers.rb +4 -4
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/tasks/db.rake +0 -0
- metadata +10 -3
- data/app/views/json_ui/garage/views/carousels.json.jbuilder +0 -37
File without changes
|
File without changes
|
@@ -5,6 +5,8 @@ json_ui_page json do |page|
|
|
5
5
|
|
6
6
|
page.list sections: [
|
7
7
|
->(section) do
|
8
|
+
render "#{@path_prefix}/actions/reload", section: section
|
9
|
+
end, ->(section) do
|
8
10
|
render "#{@path_prefix}/actions/dialogs", section: section
|
9
11
|
end, ->(section) do
|
10
12
|
render "#{@path_prefix}/actions/snackbars", section: section
|
@@ -16,8 +18,6 @@ json_ui_page json do |page|
|
|
16
18
|
render "#{@path_prefix}/actions/timeouts", section: section
|
17
19
|
end, ->(section) do
|
18
20
|
render "#{@path_prefix}/actions/http", section: section
|
19
|
-
end, ->(section) do
|
20
|
-
render "#{@path_prefix}/actions/reload", section: section
|
21
21
|
end
|
22
22
|
]
|
23
23
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -10,7 +10,8 @@ json_ui_page json do |page|
|
|
10
10
|
value = [
|
11
11
|
{
|
12
12
|
'question': 'Punctuality',
|
13
|
-
'type': 'rating'
|
13
|
+
'type': 'rating',
|
14
|
+
'enabled': '1'
|
14
15
|
},
|
15
16
|
{
|
16
17
|
'question': 'Quality of work',
|
@@ -21,30 +22,20 @@ json_ui_page json do |page|
|
|
21
22
|
'type': 'yes_no'
|
22
23
|
}
|
23
24
|
]
|
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
25
|
|
39
26
|
form.fields_dynamicGroup width: 'matchParent', name: 'user[evaluation]', value: value, titlePrefix: 'Entry', content: ->(group) do
|
40
27
|
group.template padding: { left: 32 }, childViews: ->(template) do
|
41
28
|
template.spacer height: 10
|
42
|
-
template.fields_text width: 'matchParent', name: 'question', label: 'Question'
|
43
|
-
|
29
|
+
template.fields_text width: 'matchParent', name: 'question', label: 'Question', placeholder: 'Question'
|
30
|
+
options = [ :rating, :yes_no ]
|
31
|
+
template.fields_select width: 'matchParent', name: 'type', label: 'Answer Type', placeholder: 'Answer Type', options: options.map { |o| { text: o.to_s.humanize, value: o } }
|
32
|
+
template.fields_check width: 'matchParent', name: 'enabled', label: 'Enable', checkValue: '1'
|
33
|
+
|
34
|
+
template.spacer height: 14
|
44
35
|
end
|
45
36
|
end
|
46
37
|
|
47
38
|
form.spacer height: 20
|
48
|
-
form.
|
39
|
+
form.fields_submit text: 'Submit'
|
49
40
|
end
|
50
41
|
end
|
File without changes
|
@@ -6,18 +6,33 @@ if page < 2
|
|
6
6
|
json.nextPageUrl json_ui_garage_url(path: 'forms/dynamic_select_data', page: page + 1)
|
7
7
|
end
|
8
8
|
|
9
|
-
json.rows do
|
9
|
+
# json.rows do
|
10
10
|
|
11
|
+
# count_per_page = 20
|
12
|
+
# count_per_page.times do |i|
|
13
|
+
# json.child! do
|
14
|
+
# index = page * count_per_page + i
|
15
|
+
# json.template 'thumbnail'
|
16
|
+
# json.title "City #{index} (#{params[:q]})"
|
17
|
+
# json.subtitle "State #{index}"
|
18
|
+
# json.subsubtitle "Country #{index}"
|
19
|
+
# json.value "id#{index}"
|
20
|
+
# json.text "Item #{index}"
|
21
|
+
# end
|
22
|
+
# end
|
23
|
+
# end
|
24
|
+
|
25
|
+
section = json_ui_section json
|
26
|
+
section.rows builder: ->(row) do
|
11
27
|
count_per_page = 20
|
12
28
|
count_per_page.times do |i|
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
end
|
29
|
+
index = page * count_per_page + i
|
30
|
+
row.custom title: "City #{index} (#{params[:q]})",
|
31
|
+
subtitle: "State #{index}",
|
32
|
+
subsubtitle: "Country #{index}",
|
33
|
+
extra: {
|
34
|
+
value: "id#{index}",
|
35
|
+
text: "Item #{index}"
|
36
|
+
}
|
22
37
|
end
|
23
38
|
end
|
@@ -8,18 +8,18 @@ options = {
|
|
8
8
|
|
9
9
|
json_ui_page json do |page|
|
10
10
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
11
|
-
|
11
|
+
|
12
12
|
page.form options.merge(childViews: ->(form) do
|
13
13
|
rules1 = { fileType: "image/*", maxFileSize: 5000 }
|
14
14
|
rules2 = { fileType: "image/*", maxFileSize: 1, fileTypeErrorText: 'Invalid!', maxFileSizeErrorText: 'Too big!' }
|
15
|
-
form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Photo', accepts: rules1, directUploadUrl: rails_direct_uploads_url,
|
15
|
+
form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Landscape Photo', accepts: rules1, directUploadUrl: rails_direct_uploads_url,
|
16
16
|
value: 'eyJfcmFpbHMiOnsibWVzc2FnZSI6IkJBaHBFQT09IiwiZXhwIjpudWxsLCJwdXIiOiJibG9iX2lkIn19--193dc0d939b9558fc4973fafbba91d989cbb04d4',
|
17
17
|
fileUrl: 'https://imageserver-demo.herokuapp.com/image/itinerarybuilder-demo/o6CKzNt67PWnkPdUEnWMt7pr?h=100&w=100',
|
18
18
|
fileTitle: '1 month ago',
|
19
|
-
placeholderView: { type: 'image', width: 100, height:
|
19
|
+
placeholderView: { type: 'image', width: 100, height: 75, url: 'https://www.atms.com.au/wp-content/uploads/2019/10/placeholder-1-1024x683.png?x93630' }
|
20
20
|
|
21
|
-
form.fields_file name: 'user[photo][]', width: 'matchParent', label: '
|
22
|
-
placeholderView: { type: 'avatar', width: 100, height: 100 }
|
21
|
+
form.fields_file name: 'user[photo][]', width: 'matchParent', label: 'Avatar', accepts: rules2, directUploadUrl: rails_direct_uploads_url,
|
22
|
+
placeholderView: { type: 'avatar', width: 100, height: 100, url: 'data:image/jpeg;base64,/9j/4AAQSkZJRgABAQAAAQABAAD/2wCEAAkGBxMREBUREhAWFhUWGBcVFRg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9+l3DjsVYRoRY4tcCHNJBBxBGIV2Lx7bmpCj2lloiaoGkyX8Rw1Z8N++QQeNmDm7dlbIzf8lp/9h+nfcp5cvaX7osMEtYSGwbByCOBnTV9ONEAOv0w2oX3KY7Vl8jqY8KURhA1seNaIMB9+mG1C+5o4rLyDq48KIwgCTseNUAsuVx2IGXtJYYCNbDjWqOBJm3Dsg+mRL1CFoiwZcv3itzyDq48KUWWOAEjj+5IONF0PgbcDu+y0ESxQYREQEREBERAREQEREBERARfTGE4BdDGNbiaoNbYUhN3QfdbQy9penJYZMGbsONao4EmbcO3OiAHX6YbUL7uj+6rLyDq48KURpAEjj+5VQC25XHYgbfrhsWGAjWw41R4J1cOFKoMllyo5IGX6lYYCDN2HdHgkzbh2QGvv0NNqF93RWXkGjce1EaQBJ2Pf1QC25UV2IGXtL90WGAjWw71RwJM24dudEBrr9DTasRDLRIn819PIOrj2ojSAJOx7+qD4iWbce60uYRiF0MBGth3qskkmYw/exByIustacBPlRa3QW4TIPGvyQaEW91nl7QWPw53hBpRbhZydo7p5FZFwQaUXSYDRiSshu1rRLf8APFBoZDJwC2CEAZEzO4LbEde1T9FgESkdb67KoPqJo1HKWxfIZe0lhgIq7DujgSZtw7eiA11+hptQvu6P7qsvIOrj2ojSAJOx7+qAW3KiuxAy9pfuiwwEa2HeqOBJmMO3OiAHX6Gm1C65QV2rLzPVx7IwgUdj3QfVp1eqWfVREGqy49PskfW7IiDZasOv3WYGr3REGuy49FiPrdkRBstWHX7rMHV7rKINVlx6LEXX7IiDZasBzWYOp3+qyiDVZcTyWIuv2+iIg2WrAc1mHqdD9URB8WXEr5fr9R9ERBttOr1Sz6vdZRBpsuPT7JH1uyIg2WrDqswdTuiINdlxPJYtOt0REH//2Q==' }
|
23
23
|
|
24
24
|
form.fields_submit text: 'Submit'
|
25
25
|
# form.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -8,14 +8,16 @@ json_ui_page json do |page|
|
|
8
8
|
form.spacer height: 6
|
9
9
|
form.h4 text: 'Gender'
|
10
10
|
form.fields_radioGroup name: 'user[gender]', value: 'F', childViews: ->(group) do
|
11
|
+
group.fields_radio value: '', label: 'Unknown'
|
11
12
|
group.fields_radio value: 'M', label: 'Male'
|
12
13
|
group.fields_radio value: 'F', label: 'Female'
|
13
14
|
end
|
14
15
|
|
15
16
|
form.spacer height: 20
|
16
17
|
form.h2 text: 'Single Checkbox'
|
17
|
-
form.fields_check name: 'user[age_range]', value: '16+', uncheckValue: '0-16', label: 'I am over 16 (has default value)'
|
18
|
-
form.fields_check name: 'user[employer]',
|
18
|
+
form.fields_check name: 'user[age_range]', value: '16+', checkValue: '16+', uncheckValue: '0-16', label: 'I am over 16 (has default value)'
|
19
|
+
form.fields_check name: 'user[employer]', checkValue: 1, label: 'I am an employer (no default value)'
|
20
|
+
form.fields_check name: 'user[enabled]', checkValue: true, label: 'Enable', styleClass: 'switch', value: 'true'
|
19
21
|
|
20
22
|
form.spacer height: 20
|
21
23
|
form.h2 text: 'Date/Time'
|
@@ -36,7 +38,8 @@ json_ui_page json do |page|
|
|
36
38
|
latitudeField: { name: 'user[latitude]', label: 'Lat', value: -33.8523063, readOnly: true },
|
37
39
|
longitudeField: { name: 'user[longitude]', label: 'Long', value: 151.21078710000006, readOnly: true }
|
38
40
|
|
39
|
-
form.
|
41
|
+
form.spacer height: 20
|
42
|
+
form.fields_submit text: 'Submit'
|
40
43
|
|
41
44
|
end
|
42
45
|
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,11 +4,14 @@ json_ui_page json do |page|
|
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
5
5
|
|
6
6
|
page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
|
7
|
-
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Search', styleClasses: ['outlined', 'rounded']
|
7
|
+
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Search', placeholder: 'Enter a keyword', styleClasses: ['outlined', 'rounded']
|
8
8
|
|
9
9
|
form.spacer height: 14
|
10
10
|
form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password', placeholder: 'Type your password', styleClass: 'outlined'
|
11
11
|
|
12
|
+
form.spacer height: 14
|
13
|
+
form.fields_textarea name: 'user[bio]', width: 'matchParent', label: 'Bio', placeholder: 'Enter your bio', styleClasses: ['outlined']
|
14
|
+
|
12
15
|
form.spacer height: 14
|
13
16
|
form.fields_stripeToken name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
|
14
17
|
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,10 +1,20 @@
|
|
1
|
-
|
1
|
+
|
2
|
+
# json.rows do
|
3
|
+
# batch_count = 30
|
4
|
+
# batch_count.times do |i|
|
5
|
+
# index = page * batch_count + i
|
6
|
+
# json.child! do
|
7
|
+
# json.template 'thumbnail'
|
8
|
+
# json.title "Item #{index}"
|
9
|
+
# end
|
10
|
+
# end
|
11
|
+
# end
|
12
|
+
|
13
|
+
section = json_ui_section json
|
14
|
+
section.rows builder: ->(row) do
|
2
15
|
batch_count = 30
|
3
16
|
batch_count.times do |i|
|
4
17
|
index = page * batch_count + i
|
5
|
-
|
6
|
-
json.template 'thumbnail'
|
7
|
-
json.title "Item #{index}"
|
8
|
-
end
|
18
|
+
row.thumbnail title: "Item #{index}"
|
9
19
|
end
|
10
20
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -1,23 +1,5 @@
|
|
1
1
|
json.title 'Notifications'
|
2
2
|
|
3
|
-
# json.ws({
|
4
|
-
# "socket" => {
|
5
|
-
# "endpoint" => "/socket/websocket",
|
6
|
-
# "params" => {
|
7
|
-
# "vsn": "2.0.0"
|
8
|
-
# }
|
9
|
-
# },
|
10
|
-
# # "topic" => "room:30",
|
11
|
-
# # "event" => "comments_updated",
|
12
|
-
# "topic" => "links",
|
13
|
-
# "event" => "new_link_added",
|
14
|
-
# "header" => {
|
15
|
-
# "user_id" => 2,
|
16
|
-
# "prev_item_id" => nil,
|
17
|
-
# "last_item_id" => nil
|
18
|
-
# }
|
19
|
-
# })
|
20
|
-
|
21
3
|
page = json_ui_page json
|
22
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: true
|
23
5
|
|
@@ -31,31 +13,6 @@ page.list firstSection: ->(section) do
|
|
31
13
|
|
32
14
|
template.thumbnail title: 'WebSocket Real-time Update', onClick: ->(action) do
|
33
15
|
action.windows_open url: json_ui_garage_url(path: 'notifications/web_socket')
|
34
|
-
# dialogs_notification title: 'Hello World', message: 'This is a notification', onClick: ->(subaction) do
|
35
|
-
# subaction.dialogs_alert message: 'Perform action'
|
36
|
-
# end
|
37
16
|
end
|
38
|
-
|
39
|
-
# template.thumbnail title: 'Send WebSocket Notification', onClick: ->(action) do
|
40
|
-
# json.action "ws/push"
|
41
|
-
# json.topic "links"
|
42
|
-
# json.event "new_link"
|
43
|
-
# json.payload({
|
44
|
-
# "club_id": "2",
|
45
|
-
# "room_id": "30",
|
46
|
-
# "user_id": "2"
|
47
|
-
# # title: "TITLE",
|
48
|
-
# # url: "URL"
|
49
|
-
# })
|
50
|
-
|
51
|
-
# # "topic": "room:30",
|
52
|
-
# # "event": "create_comment",
|
53
|
-
# # "payload": {
|
54
|
-
# # "club_id": "2",
|
55
|
-
# # "room_id": "30",
|
56
|
-
# # "user_id": "2"
|
57
|
-
# # }
|
58
|
-
|
59
|
-
# end
|
60
17
|
end
|
61
18
|
end
|
@@ -14,7 +14,7 @@ json.ws({
|
|
14
14
|
# "topic" => "room:30",
|
15
15
|
# "event" => "comments_updated",
|
16
16
|
"topic" => "links",
|
17
|
-
"
|
17
|
+
"events" => ["new_link_added"],
|
18
18
|
"header" => {
|
19
19
|
"user_id" => 2,
|
20
20
|
"prev_item_id" => nil,
|
@@ -23,31 +23,29 @@ json.ws({
|
|
23
23
|
})
|
24
24
|
|
25
25
|
page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', padding: glib_json_padding_body, paramNameForFormData: 'formData', onSubmit: ->(action) do
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
# url: "URL"
|
37
|
-
})
|
38
|
-
|
39
|
-
# "topic": "room:30",
|
40
|
-
# "event": "create_comment",
|
41
|
-
# "payload": {
|
42
|
-
# "club_id": "2",
|
43
|
-
# "room_id": "30",
|
44
|
-
# "user_id": "2"
|
45
|
-
# }
|
26
|
+
json.action "ws/push"
|
27
|
+
json.topic "links"
|
28
|
+
json.event "new_link"
|
29
|
+
json.payload({
|
30
|
+
"club_id": "2",
|
31
|
+
"room_id": "30",
|
32
|
+
"user_id": "2"
|
33
|
+
# title: "TITLE",
|
34
|
+
# url: "URL"
|
35
|
+
})
|
46
36
|
|
47
37
|
end, childViews: ->(form) do
|
38
|
+
form.spacer height: 14
|
39
|
+
form.label text: "Message: #{params[:message]}"
|
40
|
+
form.spacer height: 14
|
41
|
+
|
48
42
|
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
|
43
|
+
|
44
|
+
# TODO: Change this to radio for selecting alert vs reload response
|
49
45
|
form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
|
50
46
|
|
47
|
+
form.fields_hidden name: 'baseUrl', width: 'matchParent', value: json_ui_garage_url(path: 'notifications/web_socket')
|
48
|
+
|
51
49
|
form.panels_split width: 'matchParent', content: ->(split) do
|
52
50
|
# split.left childViews: ->(left) do
|
53
51
|
# if params[:mode] == 'dialog'
|
File without changes
|
File without changes
|
File without changes
|
@@ -41,6 +41,17 @@ json_ui_page json do |page|
|
|
41
41
|
action.windows_open url: json_ui_garage_url(path: 'pages/full_width')
|
42
42
|
end
|
43
43
|
end
|
44
|
+
end,
|
45
|
+
->(section) do
|
46
|
+
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
47
|
+
header.h2 text: 'Misc (Web Only)'
|
48
|
+
end
|
49
|
+
|
50
|
+
section.rows builder: ->(template) do
|
51
|
+
template.thumbnail title: 'Nested Scroll', onClick: ->(action) do
|
52
|
+
action.windows_open url: json_ui_garage_url(path: 'pages/nested_scroll')
|
53
|
+
end
|
54
|
+
end
|
44
55
|
end
|
45
56
|
]
|
46
57
|
|
@@ -1,19 +1,18 @@
|
|
1
1
|
json.title 'Pages'
|
2
2
|
|
3
|
-
json_ui_page json
|
4
|
-
|
5
|
-
|
6
|
-
page.header padding: glib_json_padding_body, backgroundColor: '#b3bac2', childViews: ->(header) do
|
7
|
-
header.h1 text: 'Header'
|
8
|
-
end
|
3
|
+
page = json_ui_page json
|
4
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
9
5
|
|
10
|
-
|
11
|
-
|
12
|
-
|
6
|
+
page.header padding: glib_json_padding_body, backgroundColor: '#b3bac2', childViews: ->(header) do
|
7
|
+
header.h1 text: 'Header'
|
8
|
+
end
|
9
|
+
|
10
|
+
page.footer padding: glib_json_padding_body, backgroundColor: '#b3bac2', childViews: ->(footer) do
|
11
|
+
footer.h1 text: 'Footer'
|
12
|
+
end
|
13
13
|
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
end
|
14
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
15
|
+
(1..100).each do |index|
|
16
|
+
scroll.label text: 'Content'
|
18
17
|
end
|
19
18
|
end
|
File without changes
|