glib-web 0.0.14 → 0.0.15

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: fc06c04993bc790fd9234381201fd24ce3ed1b8520aefee43633bed714b51ec5
4
- data.tar.gz: 45a7e73f8a23d33da64bc9ab5936db68be9f1bd1b507205d54e97d1bf5abb1e1
3
+ metadata.gz: 072ca1b048f02b75678a253c6c5547ad5278b2c30f572a626c2ced679094132d
4
+ data.tar.gz: b3827bcd928b82839ec1352c65513f28fc651fc38d7e35acdc0ab9d29f604992
5
5
  SHA512:
6
- metadata.gz: cf337b7c9aa21d9a4e6b4a4dd2f7380ff5b88cfa3666d5fdf5d402d70c9d72d75211ed4725f31f61a064b2cae4aa158a75b7dd799c8f189c683c12a42cff3fb1
7
- data.tar.gz: 7929fd151cce9c6a68666be64307ea9f5fd7936280134be466b54a306248cde897a8643807f655eaf8ad8dce014d9ea2ed44e66cae5f4887bb594225bcbca918
6
+ metadata.gz: 7d5f180e3886fbd2dd477f85683b41ef031d37887c75119e54b7a52902e8e89b461026d2f0f48efdbe04fb6daed3e2b0649ad166587cfe15872af2b51c007a3f
7
+ data.tar.gz: 6369ec4525d30cd887812424e64e597b31d1cc51a0d13b57bb81830bfc8fdeab600569d2d2981524955ebcc319f4d18583a2c484849681ff895343f1cceb5742
@@ -31,6 +31,10 @@ module Glib
31
31
  end
32
32
  end
33
33
  end
34
+
35
+ class Open < Action
36
+ string :url
37
+ end
34
38
  end
35
39
 
36
40
  module Forms
@@ -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
- 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
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: :first)
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: :second)
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: :third)
31
+ json.url json_ui_garage_url(path: 'pages/tab_bar', tab: 2)
32
32
  end
33
33
  end
34
34
  end
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.0.14
4
+ version: 0.0.15
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''