glib-web 0.12.1 → 0.12.2
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/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/commands.rb +1 -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/analytics_helper.rb +0 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +6 -0
- data/app/helpers/glib/urls_helper.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/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/_dialogs.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_dialogs_show.json.jbuilder +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/basic.json.jbuilder +1 -0
- data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +7 -1
- data/app/views/json_ui/garage/forms/{disable_dirty_prompt.json.jbuilder → dirty_prompt.json.jbuilder} +8 -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 +7 -7
- data/app/views/json_ui/garage/forms/page_update_on_response.json.jbuilder +57 -0
- data/app/views/json_ui/garage/forms/rich_text.json.jbuilder +2 -1
- data/app/views/json_ui/garage/forms/selects.json.jbuilder +2 -2
- 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 +42 -4
- 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_mode.json.jbuilder +12 -1
- 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/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/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/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/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/links.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_cluster_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/shareButton.json.jbuilder +42 -40
- 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/forms_submit.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.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 +5 -4
- data/app/views/json_ui/garage/forms/get_request.json.jbuilder +0 -27
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bab29dba5e648d50d03a57bac0904d97aaadfe5f0e5b1a9e01b123fbf6e2c787
|
|
4
|
+
data.tar.gz: 245ce0246212f41d87842659d68d83f2634282f9b803e09a278ef051cbfcc962
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 671310954e5011e2867d7d1c330c5b218c9af9c36617a81f9461eca1d3f32cc9436fdec208ca1d19b24e73f3eaf0216c0f4f6d5954fc8cc782abde757ae78194
|
|
7
|
+
data.tar.gz: fdc79df0a84f2ecec8e599209dbefe87f1709e85d07dffb3fbca4cefdfcd571e6108aa76fc0410576f98a128eee92848458dae6bb53abe05b655b996b08761ec
|
|
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
|
|
@@ -112,11 +112,17 @@ class Glib::JsonUi::ViewBuilder
|
|
|
112
112
|
end
|
|
113
113
|
|
|
114
114
|
class List < View
|
|
115
|
+
# Setting this will turn the list into edit mode.
|
|
115
116
|
string :fieldPrefix
|
|
117
|
+
|
|
118
|
+
# Setting this will enable title editing.
|
|
116
119
|
string :fieldTitleName
|
|
117
120
|
string :fieldSubtitleName
|
|
118
121
|
string :fieldSubsubtitleName
|
|
119
122
|
|
|
123
|
+
# This can be used to implement "check all" and "uncheck all".
|
|
124
|
+
hash :fieldCheckValueIf
|
|
125
|
+
|
|
120
126
|
hash :phoenixSocket
|
|
121
127
|
hash :actionCable
|
|
122
128
|
|
|
File without changes
|
|
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
|
|
@@ -12,6 +12,7 @@ page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', pad
|
|
|
12
12
|
left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
|
|
13
13
|
case params[:mode]
|
|
14
14
|
when 'dialog'
|
|
15
|
+
horizontal.fields_hidden name: 'mode', value: 'dialog'
|
|
15
16
|
horizontal.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
|
|
16
17
|
when 'dialog_reload'
|
|
17
18
|
horizontal.button styleClass: 'link', text: 'back', onClick: ->(action) do
|
|
@@ -3,6 +3,12 @@ json_ui_response json do |action|
|
|
|
3
3
|
if !name.present?
|
|
4
4
|
action.dialogs_alert message: 'Please enter name'
|
|
5
5
|
else
|
|
6
|
-
|
|
6
|
+
if params[:mode] == 'dialog'
|
|
7
|
+
action.dialogs_close onClose: ->(subaction) do
|
|
8
|
+
render "#{@path_prefix}/forms/alert_post_data", action: subaction
|
|
9
|
+
end
|
|
10
|
+
else
|
|
11
|
+
render "#{@path_prefix}/forms/alert_post_data", action: action
|
|
12
|
+
end
|
|
7
13
|
end
|
|
8
14
|
end
|
|
@@ -22,6 +22,14 @@ page.form \
|
|
|
22
22
|
form.fields_text name: 'user[dirty_check_disabled]', width: 'matchParent', label: 'Dirty check disabled', disableDirtyCheck: true
|
|
23
23
|
|
|
24
24
|
form.panels_split width: 'matchParent', content: ->(split) do
|
|
25
|
+
split.left childViews: ->(left) do
|
|
26
|
+
left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
|
|
27
|
+
horizontal.label text: 'Dialog Form', onClick: ->(action) do
|
|
28
|
+
action.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
|
|
29
|
+
end
|
|
30
|
+
end
|
|
31
|
+
end
|
|
32
|
+
|
|
25
33
|
split.right childViews: ->(right) do
|
|
26
34
|
right.fields_submit text: 'Submit'
|
|
27
35
|
end
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -19,14 +19,14 @@ page.list sections: [
|
|
|
19
19
|
template.thumbnail title: 'Submission Indicator', onClick: ->(action) do
|
|
20
20
|
action.windows_open url: json_ui_garage_url(path: 'forms/submission_indicator')
|
|
21
21
|
end
|
|
22
|
-
template.thumbnail title: '
|
|
23
|
-
action.windows_open url: json_ui_garage_url(path: 'forms/
|
|
22
|
+
template.thumbnail title: 'Page Update on Response', onClick: ->(action) do
|
|
23
|
+
action.windows_open url: json_ui_garage_url(path: 'forms/page_update_on_response')
|
|
24
24
|
end
|
|
25
25
|
template.thumbnail title: 'Synchronous Request', onClick: ->(action) do
|
|
26
26
|
action.windows_open url: json_ui_garage_url(path: 'forms/local_request')
|
|
27
27
|
end
|
|
28
|
-
template.thumbnail title: '
|
|
29
|
-
action.windows_open url: json_ui_garage_url(path: 'forms/
|
|
28
|
+
template.thumbnail title: 'Dirty Prompt', onClick: ->(action) do
|
|
29
|
+
action.windows_open url: json_ui_garage_url(path: 'forms/dirty_prompt')
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
end
|
|
@@ -63,6 +63,9 @@ page.list sections: [
|
|
|
63
63
|
template.thumbnail title: 'Select Fields', onClick: ->(action) do
|
|
64
64
|
action.windows_open url: json_ui_garage_url(path: 'forms/selects')
|
|
65
65
|
end
|
|
66
|
+
template.thumbnail title: 'Checkboxes', onClick: ->(action) do
|
|
67
|
+
action.windows_open url: json_ui_garage_url(path: 'forms/checkboxes')
|
|
68
|
+
end
|
|
66
69
|
template.thumbnail title: 'File Upload', onClick: ->(action) do
|
|
67
70
|
action.windows_open url: json_ui_garage_url(path: 'forms/file_upload')
|
|
68
71
|
end
|
|
@@ -117,9 +120,6 @@ page.list sections: [
|
|
|
117
120
|
template.thumbnail title: 'Dynamic Select', onClick: ->(action) do
|
|
118
121
|
action.windows_open url: json_ui_garage_url(path: 'forms/dynamic_select')
|
|
119
122
|
end
|
|
120
|
-
template.thumbnail title: 'Checkboxes', onClick: ->(action) do
|
|
121
|
-
action.windows_open url: json_ui_garage_url(path: 'forms/checkboxes')
|
|
122
|
-
end
|
|
123
123
|
|
|
124
124
|
end
|
|
125
125
|
end
|
|
@@ -0,0 +1,57 @@
|
|
|
1
|
+
json.title 'Forms'
|
|
2
|
+
|
|
3
|
+
data = params[:user] || {}
|
|
4
|
+
|
|
5
|
+
page = json_ui_page json
|
|
6
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
7
|
+
|
|
8
|
+
# page.form url: json_ui_garage_url(path: 'forms/get_request'), method: 'get', padding: glib_json_padding_body, childViews: ->(form) do
|
|
9
|
+
page.scroll childViews: ->(scroll) do
|
|
10
|
+
scroll.panels_form \
|
|
11
|
+
width: 'matchParent',
|
|
12
|
+
url: json_ui_garage_url(path: 'forms/get_request'),
|
|
13
|
+
method: 'get',
|
|
14
|
+
padding: glib_json_padding_body,
|
|
15
|
+
childViews: ->(form) do
|
|
16
|
+
form.h2 text: 'GET Request'
|
|
17
|
+
form.label text: 'On the web, upon submit, URL needs to change on the browser'
|
|
18
|
+
form.spacer height: 10
|
|
19
|
+
|
|
20
|
+
# TODO: Potential improvement:
|
|
21
|
+
# Use `reload` behaviour instead of `open` (i.e. don't keep adding URL to history).
|
|
22
|
+
# Probably introduce a flag to panels_form so developer can enable/disable this behaviour.
|
|
23
|
+
form.markdown text: "Hello **#{ data[:name] }**"
|
|
24
|
+
form.spacer height: 6
|
|
25
|
+
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
|
|
26
|
+
|
|
27
|
+
form.spacer height: 6
|
|
28
|
+
form.panels_split width: 'matchParent', content: ->(split) do
|
|
29
|
+
split.right childViews: ->(right) do
|
|
30
|
+
right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
end
|
|
34
|
+
|
|
35
|
+
scroll.panels_form \
|
|
36
|
+
width: 'matchParent',
|
|
37
|
+
url: json_ui_garage_url(path: 'forms/get_request'),
|
|
38
|
+
method: 'post',
|
|
39
|
+
padding: glib_json_padding_body,
|
|
40
|
+
childViews: ->(form) do
|
|
41
|
+
form.h2 text: 'POST Request'
|
|
42
|
+
form.label text: 'This produces the same effect as the form above, but the browser URL will not change in this case.'
|
|
43
|
+
form.spacer height: 10
|
|
44
|
+
|
|
45
|
+
form.markdown text: "Hello **#{ data[:name] }**"
|
|
46
|
+
form.spacer height: 6
|
|
47
|
+
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
|
|
48
|
+
|
|
49
|
+
form.spacer height: 6
|
|
50
|
+
form.panels_split width: 'matchParent', content: ->(split) do
|
|
51
|
+
split.right childViews: ->(right) do
|
|
52
|
+
right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
|
53
|
+
end
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
57
|
+
end
|
|
@@ -31,7 +31,8 @@ page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', pad
|
|
|
31
31
|
end
|
|
32
32
|
|
|
33
33
|
json.imageUploader do
|
|
34
|
-
json.
|
|
34
|
+
json.name 'user[images_attributes][]'
|
|
35
|
+
json.accepts(fileType: 'image/*', maxFileSize: 5000)
|
|
35
36
|
json.directUploadUrl rails_direct_uploads_url
|
|
36
37
|
end
|
|
37
38
|
end
|
|
@@ -15,8 +15,8 @@ page.form url: json_ui_garage_url(path: 'forms/generic_post'), method: 'post', p
|
|
|
15
15
|
'melbourne' => 'Melbourne',
|
|
16
16
|
'sydney' => 'Sydney',
|
|
17
17
|
}
|
|
18
|
-
form.fields_select name: 'user[city]', width: 'matchParent', label: '
|
|
19
|
-
form.fields_select name: 'user[cities][]', width: 'matchParent', label: '
|
|
18
|
+
form.fields_select name: 'user[city]', width: 'matchParent', label: 'City', options: languages.map { |k, v| { value: k, text: v } }, value: 'canberra'
|
|
19
|
+
form.fields_select name: 'user[cities][]', width: 'matchParent', label: 'Cities', options: languages.map { |k, v| { value: k, text: v } }, value: ['melbourne', 'sydney'], multiple: true
|
|
20
20
|
|
|
21
21
|
form.spacer height: 20
|
|
22
22
|
form.h2 text: 'Select fields with grouping'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -52,13 +52,51 @@ page.form \
|
|
|
52
52
|
maxLength: 50,
|
|
53
53
|
validation: { required: { message: 'Required' } }
|
|
54
54
|
|
|
55
|
-
options = ['male', 'female'].map { |i| { text: i.humanize, value: i } }
|
|
55
|
+
# options = ['male', 'female'].map { |i| { text: i.humanize, value: i } }
|
|
56
|
+
# form.fields_select \
|
|
57
|
+
# name: 'user[gender]',
|
|
58
|
+
# width: 'matchParent',
|
|
59
|
+
# label: 'Gender',
|
|
60
|
+
# validation: { required: { message: 'Required' } },
|
|
61
|
+
# options: options
|
|
62
|
+
|
|
63
|
+
languages = {
|
|
64
|
+
'brisbane' => 'Brisbane',
|
|
65
|
+
'canberra' => 'Canberra',
|
|
66
|
+
'melbourne' => 'Melbourne',
|
|
67
|
+
'sydney' => 'Sydney',
|
|
68
|
+
}
|
|
56
69
|
form.fields_select \
|
|
57
|
-
name: 'user[
|
|
70
|
+
name: 'user[city]',
|
|
58
71
|
width: 'matchParent',
|
|
59
|
-
label: '
|
|
72
|
+
label: 'City',
|
|
73
|
+
options: languages.map { |k, v| { value: k, text: v } },
|
|
74
|
+
validation: { required: { message: 'Required' } }
|
|
75
|
+
|
|
76
|
+
form.spacer height: 10
|
|
77
|
+
form.h4 text: 'Gender'
|
|
78
|
+
form.spacer height: 4
|
|
79
|
+
form.fields_radioGroup \
|
|
80
|
+
name: 'user[gender]',
|
|
81
|
+
validation: { required: { message: 'Required' } },
|
|
82
|
+
childViews: ->(group) do
|
|
83
|
+
group.fields_radio value: '', label: 'Unknown'
|
|
84
|
+
group.fields_radio value: 'M', label: 'Male'
|
|
85
|
+
group.fields_radio value: 'F', label: 'Female'
|
|
86
|
+
end
|
|
87
|
+
|
|
88
|
+
form.spacer height: 10
|
|
89
|
+
form.h4 text: 'Skills'
|
|
90
|
+
form.spacer height: 4
|
|
91
|
+
form.fields_checkGroup \
|
|
92
|
+
name: 'user[skills][]',
|
|
93
|
+
uncheckValue: 1,
|
|
60
94
|
validation: { required: { message: 'Required' } },
|
|
61
|
-
|
|
95
|
+
childViews: ->(group) do
|
|
96
|
+
group.fields_check checkValue: 2, label: 'Game Development'
|
|
97
|
+
group.fields_check checkValue: 3, label: 'Web Development'
|
|
98
|
+
group.fields_check checkValue: 4, label: 'Mobile Development'
|
|
99
|
+
end
|
|
62
100
|
|
|
63
101
|
form.spacer height: 30
|
|
64
102
|
form.fields_submit text: 'Submit'
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -15,6 +15,9 @@ page.form \
|
|
|
15
15
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
|
16
16
|
|
|
17
17
|
header.panels_horizontal childViews: ->(horizontal) do
|
|
18
|
+
horizontal.fields_check name: 'user[check_all]', label: 'All', checkValue: true
|
|
19
|
+
|
|
20
|
+
header.spacer width: 20
|
|
18
21
|
# header.fields_text width: 'matchParent', styleClass: 'outlined', name: 'user[new_name]', label: 'Item name'
|
|
19
22
|
statuses = [:pending, :active]
|
|
20
23
|
header.fields_select \
|
|
@@ -23,6 +26,7 @@ page.form \
|
|
|
23
26
|
width: 'matchParent',
|
|
24
27
|
label: 'Status',
|
|
25
28
|
options: statuses.map { |status| { value: status, text: status.to_s.humanize } }
|
|
29
|
+
|
|
26
30
|
header.spacer width: 20
|
|
27
31
|
header.fields_submit text: 'Update'
|
|
28
32
|
end
|
|
@@ -34,5 +38,12 @@ page.form \
|
|
|
34
38
|
end
|
|
35
39
|
end
|
|
36
40
|
end
|
|
37
|
-
]
|
|
41
|
+
], fieldCheckValueIf: {
|
|
42
|
+
"==": [
|
|
43
|
+
{
|
|
44
|
+
"var": 'user[check_all]'
|
|
45
|
+
},
|
|
46
|
+
true
|
|
47
|
+
]
|
|
48
|
+
}
|
|
38
49
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -11,40 +11,42 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
11
11
|
f.shareButton \
|
|
12
12
|
network: 'copy',
|
|
13
13
|
url: '',
|
|
14
|
-
title: '
|
|
15
|
-
description: 'Internship opportunities at talentbasket',
|
|
14
|
+
title: '',
|
|
16
15
|
text: 'Copy Link',
|
|
17
16
|
onClick: ->(action) do
|
|
18
|
-
action.commands_copy text: 'copied'
|
|
17
|
+
action.commands_copy text: 'This is copied text', onCopy: ->(subaction) do
|
|
18
|
+
subaction.snackbars_alert message: 'Copied', styleClass: 'success'
|
|
19
|
+
end
|
|
19
20
|
end
|
|
20
21
|
|
|
22
|
+
# For testing: https://developers.facebook.com/tools/debug/
|
|
21
23
|
f.shareButton \
|
|
22
24
|
network: 'facebook',
|
|
23
|
-
url: 'https://www.
|
|
24
|
-
title: '
|
|
25
|
-
description: '
|
|
26
|
-
facebookQuote: '
|
|
25
|
+
url: 'https://www.google.com',
|
|
26
|
+
title: 'This is a title',
|
|
27
|
+
description: 'This is a description',
|
|
28
|
+
facebookQuote: 'This is a quote',
|
|
27
29
|
text: 'Facebook'
|
|
28
30
|
|
|
29
31
|
f.shareButton \
|
|
30
32
|
network: 'linkedin',
|
|
31
|
-
url: 'https://www.
|
|
32
|
-
title: '
|
|
33
|
-
description: '
|
|
33
|
+
url: 'https://www.google.com',
|
|
34
|
+
title: 'This is a title',
|
|
35
|
+
description: 'This is a description',
|
|
34
36
|
text: 'LinkedIn'
|
|
35
37
|
|
|
36
38
|
f.shareButton \
|
|
37
39
|
network: 'whatsapp',
|
|
38
|
-
url: 'https://www.
|
|
39
|
-
title: '
|
|
40
|
-
description: '
|
|
40
|
+
url: 'https://www.google.com',
|
|
41
|
+
title: 'This is a title',
|
|
42
|
+
description: 'This is a description',
|
|
41
43
|
text: 'WhatsApp'
|
|
42
44
|
|
|
43
45
|
f.shareButton \
|
|
44
46
|
network: 'telegram',
|
|
45
|
-
url: 'https://www.
|
|
46
|
-
title: '
|
|
47
|
-
description: '
|
|
47
|
+
url: 'https://www.google.com',
|
|
48
|
+
title: 'This is a title',
|
|
49
|
+
description: 'This is a description',
|
|
48
50
|
text: 'Telegram'
|
|
49
51
|
end
|
|
50
52
|
end
|
|
@@ -53,27 +55,27 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
53
55
|
col.panels_flow innerPadding: { top: 0, right: 0, bottom: 0, left: 0 }, childViews: ->(f) do
|
|
54
56
|
f.shareButton \
|
|
55
57
|
network: 'facebook',
|
|
56
|
-
url: 'https://www.
|
|
57
|
-
title: '
|
|
58
|
-
description: '
|
|
58
|
+
url: 'https://www.google.com',
|
|
59
|
+
title: 'This is a title',
|
|
60
|
+
description: 'This is a description'
|
|
59
61
|
|
|
60
62
|
f.shareButton \
|
|
61
63
|
network: 'linkedin',
|
|
62
|
-
url: 'https://www.
|
|
63
|
-
title: '
|
|
64
|
-
description: '
|
|
64
|
+
url: 'https://www.google.com',
|
|
65
|
+
title: 'This is a title',
|
|
66
|
+
description: 'This is a description'
|
|
65
67
|
|
|
66
68
|
f.shareButton \
|
|
67
69
|
network: 'whatsapp',
|
|
68
|
-
url: 'https://www.
|
|
69
|
-
title: '
|
|
70
|
-
description: '
|
|
70
|
+
url: 'https://www.google.com',
|
|
71
|
+
title: 'This is a title',
|
|
72
|
+
description: 'This is a description'
|
|
71
73
|
|
|
72
74
|
f.shareButton \
|
|
73
75
|
network: 'telegram',
|
|
74
|
-
url: 'https://www.
|
|
75
|
-
title: '
|
|
76
|
-
description: '
|
|
76
|
+
url: 'https://www.google.com',
|
|
77
|
+
title: 'This is a title',
|
|
78
|
+
description: 'This is a description'
|
|
77
79
|
end
|
|
78
80
|
end
|
|
79
81
|
scroll.spacer height: 20
|
|
@@ -82,32 +84,32 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
82
84
|
col.panels_vertical width: 200, childViews: ->(v) do
|
|
83
85
|
v.shareButton \
|
|
84
86
|
network: 'facebook',
|
|
85
|
-
url: 'https://www.
|
|
86
|
-
title: '
|
|
87
|
-
description: '
|
|
87
|
+
url: 'https://www.google.com',
|
|
88
|
+
title: 'This is a title',
|
|
89
|
+
description: 'This is a description',
|
|
88
90
|
text: 'Facebook'
|
|
89
91
|
|
|
90
92
|
v.shareButton \
|
|
91
93
|
network: 'linkedin',
|
|
92
|
-
url: 'https://www.
|
|
93
|
-
title: '
|
|
94
|
-
description: '
|
|
94
|
+
url: 'https://www.google.com',
|
|
95
|
+
title: 'This is a title',
|
|
96
|
+
description: 'This is a description',
|
|
95
97
|
text: 'LinkedIn'
|
|
96
98
|
|
|
97
99
|
v.shareButton \
|
|
98
100
|
width: 'matchParent',
|
|
99
101
|
network: 'whatsapp',
|
|
100
|
-
url: 'https://www.
|
|
101
|
-
title: '
|
|
102
|
-
description: '
|
|
102
|
+
url: 'https://www.google.com',
|
|
103
|
+
title: 'This is a title',
|
|
104
|
+
description: 'This is a description',
|
|
103
105
|
text: 'WhatsApp'
|
|
104
106
|
|
|
105
107
|
v.shareButton \
|
|
106
108
|
width: 'matchParent',
|
|
107
109
|
network: 'telegram',
|
|
108
|
-
url: 'https://www.
|
|
109
|
-
title: '
|
|
110
|
-
description: '
|
|
110
|
+
url: 'https://www.google.com',
|
|
111
|
+
title: 'This is a title',
|
|
112
|
+
description: 'This is a description',
|
|
111
113
|
text: 'Telegram'
|
|
112
114
|
end
|
|
113
115
|
end
|
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: 0.12.
|
|
4
|
+
version: 0.12.2
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -146,19 +146,19 @@ files:
|
|
|
146
146
|
- app/views/json_ui/garage/forms/basic_post.json.jbuilder
|
|
147
147
|
- app/views/json_ui/garage/forms/checkboxes.json.jbuilder
|
|
148
148
|
- app/views/json_ui/garage/forms/conditional_value.json.jbuilder
|
|
149
|
-
- app/views/json_ui/garage/forms/
|
|
149
|
+
- app/views/json_ui/garage/forms/dirty_prompt.json.jbuilder
|
|
150
150
|
- app/views/json_ui/garage/forms/dynamic_group.json.jbuilder
|
|
151
151
|
- app/views/json_ui/garage/forms/dynamic_select.json.jbuilder
|
|
152
152
|
- app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder
|
|
153
153
|
- app/views/json_ui/garage/forms/file_upload.json.jbuilder
|
|
154
154
|
- app/views/json_ui/garage/forms/floating_submit.json.jbuilder
|
|
155
155
|
- app/views/json_ui/garage/forms/generic_post.json.jbuilder
|
|
156
|
-
- app/views/json_ui/garage/forms/get_request.json.jbuilder
|
|
157
156
|
- app/views/json_ui/garage/forms/index.json.jbuilder
|
|
158
157
|
- app/views/json_ui/garage/forms/local_request.json.jbuilder
|
|
159
158
|
- app/views/json_ui/garage/forms/new_rich_text.json.jbuilder
|
|
160
159
|
- app/views/json_ui/garage/forms/online_participant1.json.jbuilder
|
|
161
160
|
- app/views/json_ui/garage/forms/online_participant2.json.jbuilder
|
|
161
|
+
- app/views/json_ui/garage/forms/page_update_on_response.json.jbuilder
|
|
162
162
|
- app/views/json_ui/garage/forms/payments.json.jbuilder
|
|
163
163
|
- app/views/json_ui/garage/forms/pickers.json.jbuilder
|
|
164
164
|
- app/views/json_ui/garage/forms/ratings.json.jbuilder
|
|
@@ -299,7 +299,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
299
299
|
- !ruby/object:Gem::Version
|
|
300
300
|
version: '0'
|
|
301
301
|
requirements: []
|
|
302
|
-
|
|
302
|
+
rubyforge_project:
|
|
303
|
+
rubygems_version: 2.7.6
|
|
303
304
|
signing_key:
|
|
304
305
|
specification_version: 4
|
|
305
306
|
summary: ''
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
json.title 'Forms'
|
|
2
|
-
|
|
3
|
-
data = params[:user] || {}
|
|
4
|
-
|
|
5
|
-
page = json_ui_page json
|
|
6
|
-
render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
7
|
-
|
|
8
|
-
page.form url: json_ui_garage_url(path: 'forms/get_request'), method: 'get', padding: glib_json_padding_body, childViews: ->(form) do
|
|
9
|
-
# TODO: Potential improvement:
|
|
10
|
-
# Use `reload` behaviour instead of `open` (i.e. don't keep adding URL to history).
|
|
11
|
-
# Probably introduce a flag to panels_form so developer can enable/disable this behaviour.
|
|
12
|
-
form.h3 text: "Hello #{ data[:name] }"
|
|
13
|
-
form.spacer height: 6
|
|
14
|
-
form.label text: 'On the web, upon submit, URL needs to change on the browser'
|
|
15
|
-
form.spacer height: 10
|
|
16
|
-
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name', disableDirtyCheck: true
|
|
17
|
-
|
|
18
|
-
# form.panels_split width: 'matchParent', rightViews: ->(split) do
|
|
19
|
-
# split.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
|
20
|
-
# end
|
|
21
|
-
|
|
22
|
-
form.panels_split width: 'matchParent', content: ->(split) do
|
|
23
|
-
split.right childViews: ->(right) do
|
|
24
|
-
right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
|
25
|
-
end
|
|
26
|
-
end
|
|
27
|
-
end
|