glib-web 0.4.41 → 0.4.42

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
  SHA1:
3
- metadata.gz: b5e3c30b02e6f8f6a325e4b6e4629b4eb9ecd7de
4
- data.tar.gz: 97ba4424710d6af68995b1b3e8ccd0483eb9554b
3
+ metadata.gz: 565a150703d22eb99c4b12100953d15ba500e95b
4
+ data.tar.gz: 16657dfad9b14d071f8c880e5210058bd3c35bcf
5
5
  SHA512:
6
- metadata.gz: 96fadbbe94cb50c33662aa4ef5fa820692bb1099bed289fc1d719c122093087f3143befd394da4f89966736d818a07ecbb7762951f16f93705495b77a8b5aaf3
7
- data.tar.gz: 6fca6c1d9b07efa17a8c5078da7160b0b46a23cd6328e52ce498944e91ecc968f240935b35b6a8a507dc472f5dab8becc3abb4f1d0255b6926ed8220b36fd21d
6
+ metadata.gz: 39185ec5f3512823bd8a9580ed16f37a626e81ab527bad01c7e5158ddac86490758ad1eedd8f281b2b23c933057d391bb355c57584c35bba095e0f43aa169f8b
7
+ data.tar.gz: 9e96ac43996db1be6c6613be6cf5d9c72150433b6fd3e49c2f8a156e0fc55b24c31338cedf0f960f5977d4ec3896f4eeaa0e2d4c467760b587e5957dcf961e76
@@ -28,6 +28,7 @@ module Glib
28
28
  string :subsubtitle
29
29
  string :imageUrl
30
30
  action :onClick
31
+ icon :icon
31
32
 
32
33
  # # NOTE: Experimental. Still deciding whether this needs to be a full blown panel or
33
34
  # # an array of badges (with relevant properties, e.g. text, color, etc)
@@ -107,7 +107,6 @@ class Glib::JsonUi::ViewBuilder
107
107
 
108
108
  # This doesn't use camel case because some terms have become single words (e.g. snackbar)
109
109
  class Textarea < Text
110
- bool :readOnly
111
110
  end
112
111
 
113
112
  class RichText < Text
@@ -4,38 +4,85 @@ page = json_ui_page json
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.h1 text: 'Initially Off'
8
- form.fields_check name: 'switch_a', value: 'on', label: 'Switch A'
7
+ form.h1 text: 'Text'
8
+ form.fields_password name: 'user[text1]', width: 'matchParent', label: 'Type "show"'
9
+ form.label text: 'Typed', showIf: {
10
+ "==": [
11
+ {
12
+ "var": 'user[text1]'
13
+ },
14
+ 'show'
15
+ ]
16
+ }
17
+
18
+ form.spacer height: 20
19
+ form.h1 text: 'Textarea'
20
+ form.fields_textarea name: 'user[textarea1]', width: 'matchParent', label: 'Type "show"'
21
+ form.label text: 'Typed', showIf: {
22
+ "==": [
23
+ {
24
+ "var": 'user[textarea1]'
25
+ },
26
+ 'show'
27
+ ]
28
+ }
29
+
30
+ form.spacer height: 20
31
+ form.h1 text: 'Check'
32
+ form.fields_check name: 'user[check1]', value: 'on', label: 'Show text'
9
33
  form.spacer height: 10
10
- form.label text: 'Visible If', showIf: {
34
+ form.label text: 'Checked', showIf: {
11
35
  "==": [
12
36
  {
13
- "var": "switch_a"
37
+ "var": 'user[check1]'
14
38
  },
15
- "on"
39
+ 'on'
16
40
  ]
17
41
  }
18
42
 
19
- # form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
20
- # form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
21
-
22
- # # form.panels_split width: 'matchParent', leftViews: ->(split) do
23
- # # if params[:mode] == 'dialog'
24
- # # split.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
25
- # # end
26
- # # end, rightViews: ->(split) do
27
- # # split.button text: 'Submit', onClick: ->(action) { action.forms_submit }
28
- # # end
29
-
30
- # form.panels_split width: 'matchParent', content: ->(split) do
31
- # split.left childViews: ->(left) do
32
- # if params[:mode] == 'dialog'
33
- # left.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
34
- # end
35
- # end
36
- # split.right childViews: ->(right) do
37
- # right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
38
- # end
39
- # end
43
+ form.spacer height: 20
44
+ form.h1 text: 'Radio Group'
45
+ form.fields_radioGroup name: 'user[radio1]', value: 'F', childViews: ->(group) do
46
+ group.fields_radio value: 'show', label: 'Show'
47
+ group.fields_radio value: 'hide', label: 'Hide'
48
+ end
49
+ form.spacer height: 10
50
+ form.label text: 'Chosen', showIf: {
51
+ "==": [
52
+ {
53
+ "var": 'user[radio1]'
54
+ },
55
+ 'show'
56
+ ]
57
+ }
58
+
59
+ form.spacer height: 20
60
+ form.h1 text: 'Select'
61
+ options = ['show', 'hide']
62
+ form.fields_select name: 'user[select1]', width: 'matchParent', label: 'Select "show"', options: options
63
+ form.label text: 'Selected', showIf: {
64
+ "==": [
65
+ {
66
+ "var": 'user[select1]'
67
+ },
68
+ 'show'
69
+ ]
70
+ }
71
+
72
+ form.spacer height: 20
73
+ form.h1 text: 'Combo1'
74
+ form.label text: 'Select the same option on both the radio and select fields above'
75
+ form.spacer height: 10
76
+ form.h3 text: 'Same!', showIf: {
77
+ "==": [
78
+ {
79
+ "var": 'user[radio1]'
80
+ },
81
+ {
82
+ "var": 'user[select1]'
83
+ },
84
+ ]
85
+ }
40
86
 
87
+ form.spacer height: 40
41
88
  end
@@ -2,10 +2,10 @@ json.title 'Lists'
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
-
5
+
6
6
  page.list firstSection: ->(section) do
7
7
  section.rows builder: ->(template) do
8
- template.thumbnail title: 'Templating', onClick: ->(action) do
8
+ template.thumbnail icon: 'list', title: 'Templating', onClick: ->(action) do
9
9
  action.windows_open url: json_ui_garage_url(path: 'lists/templating')
10
10
  end
11
11
  template.thumbnail title: 'Edit Actions', onClick: ->(action) do
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.4.41
4
+ version: 0.4.42
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''