glib-web 0.0.14 → 0.0.15
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/helpers/glib/json_ui/action_builder.rb +4 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +5 -0
- data/app/views/json_ui/garage/actions/index.json.jbuilder +12 -7
- data/app/views/json_ui/garage/forms/basic.json.jbuilder +10 -0
- data/app/views/json_ui/garage/forms/basic_post.json.jbuilder +2 -2
- data/app/views/json_ui/garage/pages/tab_bar.json.jbuilder +3 -3
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 072ca1b048f02b75678a253c6c5547ad5278b2c30f572a626c2ced679094132d
|
4
|
+
data.tar.gz: b3827bcd928b82839ec1352c65513f28fc651fc38d7e35acdc0ab9d29f604992
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 7d5f180e3886fbd2dd477f85683b41ef031d37887c75119e54b7a52902e8e89b461026d2f0f48efdbe04fb6daed3e2b0649ad166587cfe15872af2b51c007a3f
|
7
|
+
data.tar.gz: 6369ec4525d30cd887812424e64e597b31d1cc51a0d13b57bb81830bfc8fdeab600569d2d2981524955ebcc319f4d18583a2c484849681ff895343f1cceb5742
|
@@ -40,6 +40,11 @@ class Glib::JsonUi::ViewBuilder
|
|
40
40
|
class Hidden < Text
|
41
41
|
end
|
42
42
|
|
43
|
+
class Check < Text
|
44
|
+
end
|
45
|
+
|
46
|
+
# TODO: use camel case (i.e. textArea). We want to use the same naming with html as much as possible but we shouldn't just blindly
|
47
|
+
# use the same capitalization because that will introduce inconsistencies.
|
43
48
|
class Textarea < Text
|
44
49
|
bool :readOnly
|
45
50
|
end
|
@@ -10,13 +10,13 @@ json_ui_page json do |page|
|
|
10
10
|
action.dialogs_alert message: 'This is an alert'
|
11
11
|
end
|
12
12
|
|
13
|
-
row.thumbnail title: 'dialogs/confirm (TODO)', onClick: ->(action) do
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
13
|
+
# row.thumbnail title: 'dialogs/confirm (TODO)', onClick: ->(action) do
|
14
|
+
# action.dialogs_confirm message: 'Confirm?', onConfirm: ->(action) do
|
15
|
+
# action.dialogs_alert message: 'Good'
|
16
|
+
# end, onCancel: ->(action) do
|
17
|
+
# action.dialogs_alert message: 'Bad'
|
18
|
+
# end
|
19
|
+
# end
|
20
20
|
|
21
21
|
row.thumbnail title: 'dialogs/option', onClick: ->(action) do
|
22
22
|
action.dialogs_options message: 'Select one', buttons: ->(menu) do
|
@@ -29,6 +29,11 @@ json_ui_page json do |page|
|
|
29
29
|
menu.button title: 'Cancel'
|
30
30
|
end
|
31
31
|
end
|
32
|
+
|
33
|
+
row.thumbnail title: 'dialogs/open', onClick: ->(action) do
|
34
|
+
action.dialogs_open url: json_ui_garage_url(path: 'forms/basic')
|
35
|
+
end
|
36
|
+
|
32
37
|
end
|
33
38
|
|
34
39
|
end
|
@@ -13,6 +13,16 @@ json_ui_page json do |page|
|
|
13
13
|
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
|
14
14
|
form.fields_email name: 'user[email]', width: 'matchParent', label: 'Email'
|
15
15
|
form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
|
16
|
+
|
17
|
+
form.fields_radioGroup name: 'user[gender]', childViews: ->(group) do
|
18
|
+
group.h3 text: 'Gender'
|
19
|
+
group.br height: 6
|
20
|
+
group.fields_radio value: 'M', label: 'Male'
|
21
|
+
group.fields_radio value: 'F', label: 'Female'
|
22
|
+
end
|
23
|
+
|
24
|
+
form.fields_check name: 'user[employer]', value: 1, label: 'I am an employer'
|
25
|
+
|
16
26
|
form.panels_split width: 'matchParent', rightViews: ->(split) do
|
17
27
|
split.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
18
28
|
end
|
@@ -1,8 +1,8 @@
|
|
1
|
-
name, email, password = params.require(:user).values_at(:name, :email, :password)
|
1
|
+
name, email, password, gender, employer = params.require(:user).values_at(:name, :email, :password, :gender, :employer)
|
2
2
|
json.onResponse do
|
3
3
|
if name.present? && email.present? && password.present?
|
4
4
|
json.action 'dialogs/alert-v1'
|
5
|
-
json.message "Submitted information: #{name}, #{email}, #{password}"
|
5
|
+
json.message "Submitted information: #{name}, #{email}, #{password}, #{gender}, #{employer}"
|
6
6
|
else
|
7
7
|
json.action 'dialogs/alert-v1'
|
8
8
|
json.message 'Please enter all required information'
|
@@ -14,21 +14,21 @@ json_ui_page json do |page|
|
|
14
14
|
json.text 'FIRST'
|
15
15
|
json.onClick do
|
16
16
|
json.action 'windows/open-v1'
|
17
|
-
json.url json_ui_garage_url(path: 'pages/tab_bar', tab:
|
17
|
+
json.url json_ui_garage_url(path: 'pages/tab_bar', tab: 0)
|
18
18
|
end
|
19
19
|
end
|
20
20
|
json.child! do
|
21
21
|
json.text 'SECOND'
|
22
22
|
json.onClick do
|
23
23
|
json.action 'windows/open-v1'
|
24
|
-
json.url json_ui_garage_url(path: 'pages/tab_bar', tab:
|
24
|
+
json.url json_ui_garage_url(path: 'pages/tab_bar', tab: 1)
|
25
25
|
end
|
26
26
|
end
|
27
27
|
json.child! do
|
28
28
|
json.text 'THIRD'
|
29
29
|
json.onClick do
|
30
30
|
json.action 'windows/open-v1'
|
31
|
-
json.url json_ui_garage_url(path: 'pages/tab_bar', tab:
|
31
|
+
json.url json_ui_garage_url(path: 'pages/tab_bar', tab: 2)
|
32
32
|
end
|
33
33
|
end
|
34
34
|
end
|