glib-web 4.16.0 → 4.18.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/app/controllers/concerns/glib/json/new_dynamic_text.rb +0 -0
  3. data/app/controllers/glib/home_controller.rb +2 -0
  4. data/app/helpers/glib/app_feature_support_helper.rb +0 -0
  5. data/app/helpers/glib/dynamic_texts_helper.rb +0 -0
  6. data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
  7. data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
  8. data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -2
  9. data/app/helpers/glib/json_ui/view_builder.rb +10 -0
  10. data/app/models/glib/active_storage/attachment.rb +0 -0
  11. data/app/models/glib/active_storage/blob.rb +0 -0
  12. data/app/models/glib/dynamic_text_record.rb +0 -0
  13. data/app/models/glib/text.rb +0 -0
  14. data/app/validators/email_typo_validator.rb +0 -0
  15. data/app/validators/email_validator.rb +0 -0
  16. data/app/validators/url_validator.rb +0 -0
  17. data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +4 -0
  18. data/app/views/json_ui/garage/actions/_dialogs_show.json.jbuilder +23 -9
  19. data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +1 -1
  20. data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
  21. data/app/views/json_ui/garage/forms/_basic_content.json.jbuilder +47 -0
  22. data/app/views/json_ui/garage/forms/basic.json.jbuilder +2 -23
  23. data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
  24. data/app/views/json_ui/garage/forms/conditional_value.json.jbuilder +11 -0
  25. data/app/views/json_ui/garage/forms/dirty_prompt.json.jbuilder +0 -3
  26. data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
  27. data/app/views/json_ui/garage/forms/pickers.json.jbuilder +18 -0
  28. data/app/views/json_ui/garage/forms/submission_flow.json.jbuilder +0 -0
  29. data/app/views/json_ui/garage/forms/submission_flow_post.json.jbuilder +0 -0
  30. data/app/views/json_ui/garage/forms/submission_indicator.json.jbuilder +0 -0
  31. data/app/views/json_ui/garage/forms/submission_indicator_post.json.jbuilder +0 -0
  32. data/app/views/json_ui/garage/home/blank.json.jbuilder +0 -0
  33. data/app/views/json_ui/garage/home/slow.json.jbuilder +0 -0
  34. data/app/views/json_ui/garage/lists/autoload_all.json.jbuilder +0 -0
  35. data/app/views/json_ui/garage/lists/autoload_as_needed.json.jbuilder +0 -0
  36. data/app/views/json_ui/garage/lists/chat_ui.json.jbuilder +0 -0
  37. data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
  38. data/app/views/json_ui/garage/notifications/web_socket.json.jbuilder +0 -0
  39. data/app/views/json_ui/garage/pages/custom_style_class.json.jbuilder +0 -0
  40. data/app/views/json_ui/garage/pages/full_width.json.jbuilder +0 -0
  41. data/app/views/json_ui/garage/pages/full_width_height.json.jbuilder +0 -0
  42. data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
  43. data/app/views/json_ui/garage/pages/loading_indicator.json.jbuilder +0 -0
  44. data/app/views/json_ui/garage/pages/nested_scroll.json.jbuilder +0 -0
  45. data/app/views/json_ui/garage/pages/redirect_onload.json.jbuilder +0 -0
  46. data/app/views/json_ui/garage/panels/_styled.json.jbuilder +0 -0
  47. data/app/views/json_ui/garage/panels/card.json.jbuilder +0 -0
  48. data/app/views/json_ui/garage/panels/custom.json.jbuilder +0 -0
  49. data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
  50. data/app/views/json_ui/garage/services/dynamic_text.json.jbuilder +0 -0
  51. data/app/views/json_ui/garage/services/image.json.jbuilder +0 -0
  52. data/app/views/json_ui/garage/services/index.json.jbuilder +0 -0
  53. data/app/views/json_ui/garage/tables/_autoload_section.json.jbuilder +0 -0
  54. data/app/views/json_ui/garage/tables/autoload_all.json.jbuilder +0 -0
  55. data/app/views/json_ui/garage/tables/autoload_as_needed.json.jbuilder +0 -0
  56. data/app/views/json_ui/garage/tables/export_import.json.jbuilder +0 -0
  57. data/app/views/json_ui/garage/tables/index.json.jbuilder +3 -0
  58. data/app/views/json_ui/garage/tables/nested_table.json.jbuilder +60 -0
  59. data/app/views/json_ui/garage/test_page/_header.json.jbuilder +1 -1
  60. data/app/views/json_ui/garage/test_page/dirty_state.json.jbuilder +46 -0
  61. data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
  62. data/app/views/json_ui/garage/views/controls.json.jbuilder +3 -3
  63. data/app/views/json_ui/garage/views/map_data.json.jbuilder +0 -0
  64. data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
  65. data/app/views/layouts/json_ui/no_custom.html.erb +0 -0
  66. data/lib/generators/glib/install_generator.rb +0 -0
  67. data/lib/generators/templates/20191017062519_create_texts.rb +0 -0
  68. data/lib/generators/templates/20191024063257_add_scope_to_texts.rb +0 -0
  69. data/lib/generators/templates/20191112095018_add_lang_to_texts.rb +0 -0
  70. data/lib/generators/templates/20191126071051_create_active_storage_tables.active_storage.rb +0 -0
  71. data/lib/generators/templates/database.yml +0 -0
  72. data/lib/generators/templates/dynamic_text.rb +0 -0
  73. data/lib/glib/dynamic_text/config.rb +0 -0
  74. data/lib/glib/dynamic_text.rb +0 -0
  75. data/lib/glib/json_crawler/action_crawler.rb +0 -0
  76. data/lib/glib/json_crawler/action_crawlers/action_http.rb +0 -0
  77. data/lib/glib/json_crawler/action_crawlers/dialogs_alert.rb +0 -0
  78. data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
  79. data/lib/glib/json_crawler/action_crawlers/run_multiple.rb +0 -0
  80. data/lib/glib/json_crawler/action_crawlers/windows_open.rb +0 -0
  81. data/lib/glib/json_crawler/coverage.rb +0 -0
  82. data/lib/glib/value.rb +0 -0
  83. data/lib/glib/version.rb +0 -0
  84. metadata +5 -4
  85. data/app/views/json_ui/garage/forms/blank_get.json.jbuilder +0 -8
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: abe3d2a42c86dbcd3164813a7a7361eaccf0c415e97469769192686076e850ec
4
- data.tar.gz: f910eab20e9e61d5de1fd3f11308e8d0c2ff78af09fcb7752e671cff1be34f7a
3
+ metadata.gz: 82f79da54bb6dc84ffc68665e5b67b17a333a7f30d080d38daa10149dfa5e151
4
+ data.tar.gz: 4285bb6b341dd126a71b5a78d7e15b62101878bbb4c3652c769369f62dddd5b9
5
5
  SHA512:
6
- metadata.gz: 63f350f57eb8087f134c5c2eace7ceca9d92f0ddee46723425fac5899d6fcefb193620c99e69da7f82cfd55d46709aab493e67556bb3d9f24ce01c34858f6980
7
- data.tar.gz: 468f401cede2d610b6275a7a91bebe93d59d515369f0d1e18060991b1e1f9ba8b253eb54781a1f36ecb2ce884d734cc4e673d1933e36bb51924d989f63c97c62
6
+ metadata.gz: 248c2b369209b8162ed63d9235cb2251bb3075d18fa87581844b55af0f0a117256b863af78e7734a0b1c3fb7f3c21ebd7eebfd09fb758efc05c7b608934638f4
7
+ data.tar.gz: 6353a2fde95a69aa82ff4039b998f84d260a8bc9a8bb7ad321d8335da33c9fe5e7297d9b23b100d1c9f29dd8c5be3758956e162bab6c2432b45ba95dc0367cfb
@@ -15,6 +15,8 @@ module Glib
15
15
  @path_prefix = 'json_ui/garage'
16
16
 
17
17
  @__glib_head_code =<<-eos
18
+ <script type="text/javascript" src="https://js.stripe.com/v3/"></script>
19
+
18
20
  <style>
19
21
  .custom-container .pages-body > div > .panels-responsive {
20
22
  max-width: 800px;
File without changes
File without changes
File without changes
File without changes
@@ -202,8 +202,6 @@ class Glib::JsonUi::ViewBuilder
202
202
  bool :multiple, cache: true
203
203
  # bool :manualEntry
204
204
  icon :leftIcon
205
-
206
- # TODO: Change to appendIcon
207
205
  hash :append, optional: [:icon]
208
206
 
209
207
  panels_builder :accessory, :header, :footer
@@ -438,6 +436,7 @@ class Glib::JsonUi::ViewBuilder
438
436
  date :max
439
437
  string :type
440
438
  bool :clearable
439
+ bool :buttonTemplate
441
440
 
442
441
  # Override
443
442
  def value(value)
@@ -451,6 +450,7 @@ class Glib::JsonUi::ViewBuilder
451
450
  date_time :min
452
451
  date_time :max
453
452
  bool :clearable
453
+ bool :buttonTemplate
454
454
  end
455
455
 
456
456
  class Location < AbstractField
@@ -312,6 +312,16 @@ module Glib
312
312
  color :color
313
313
  color :backgroundColor
314
314
  bool :reversed
315
+
316
+ def rounded(value)
317
+ @rounded = value
318
+ end
319
+
320
+ def create
321
+ @rounded = true if @rounded.nil?
322
+
323
+ json.rounded @rounded
324
+ end
315
325
  end
316
326
 
317
327
  class ProgressCircle < View
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -44,6 +44,10 @@ section.rows builder: ->(template) do
44
44
  render 'json_ui/garage/actions/dialogs_show', json: json, action: action, dialog_mode: :show
45
45
  end
46
46
 
47
+ template.thumbnail title: 'dialogs/show (with form)', onClick: ->(action) do
48
+ render 'json_ui/garage/actions/dialogs_show', json: json, action: action, dialog_mode: :show, include_form: true
49
+ end
50
+
47
51
  template.thumbnail title: 'dialogs/open', onClick: ->(action) do
48
52
  action.dialogs_open width: 950, url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog'), disableCloseButton: true
49
53
  end
@@ -10,22 +10,36 @@ if (update_existing = local_assigns[:update_existing])
10
10
  options[:updateExisting] = update_existing
11
11
  end
12
12
 
13
+ include_form = local_assigns[:include_form]
14
+
13
15
  action.send "dialogs_#{dialog_mode}", **options, content: ->(dialog) do
14
16
  dialog.body padding: glib_json_padding_body, childViews: ->(body) do
15
17
  body.markdown text: markdown
16
18
 
17
- body.panels_split width: 'matchParent', content: ->(split) do
18
- split.left childViews: ->(left) do
19
- left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
20
- horizontal.label text: 'Open current', onClick: ->(subaction) do
21
- subaction.dialogs_open width: 900, fullscreen: 'mobile', url: json_ui_garage_url(path: 'forms/basic')
19
+ if include_form
20
+ render \
21
+ 'json_ui/garage/forms/basic_content',
22
+ json: json,
23
+ panel: body,
24
+ mode: 'dialog',
25
+ disable_dirty_check: true
26
+ else
27
+ body.panels_split width: 'matchParent', content: ->(split) do
28
+ split.left childViews: ->(left) do
29
+ left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
30
+ horizontal.label text: 'Open current', onClick: ->(subaction) do
31
+ subaction.dialogs_open \
32
+ width: 900,
33
+ fullscreen: 'mobile',
34
+ url: json_ui_garage_url(path: 'forms/basic')
35
+ end
22
36
  end
23
37
  end
24
- end
25
38
 
26
- split.right childViews: ->(right) do
27
- right.button text: 'Open New', onClick: ->(subaction) do
28
- subaction.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
39
+ split.right childViews: ->(right) do
40
+ right.button text: 'Open New', onClick: ->(subaction) do
41
+ subaction.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
42
+ end
29
43
  end
30
44
  end
31
45
  end
@@ -6,7 +6,7 @@ end
6
6
  section.rows builder: ->(template) do
7
7
  template.thumbnail title: 'sheets/select', onClick: ->(action) do
8
8
  action.sheets_select message: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed rutrum vel nisi in pharetra. Aenean mollis feugiat elementum. Donec tempor arcu fringilla risus finibus cursus. Donec eleifend ex sit amet odio rutrum, vitae ornare nunc congue. In hac habitasse platea dictumst. Curabitur at velit et odio ornare vestibulum sit amet vitae ex. Proin tincidunt rutrum libero vitae tempus.', buttons: ->(menu) do
9
- menu.button text: 'Option1', onClick: ->(subaction) do
9
+ menu.button text: 'Option1 Aenean mollis feugiat elementum. Donec tempor arcu fringilla risus finibus cursus.', onClick: ->(subaction) do
10
10
  subaction.dialogs_alert message: 'Option 1'
11
11
  end
12
12
  menu.button text: 'Option2', onClick: ->(subaction) do
@@ -0,0 +1,47 @@
1
+ disable_dirty_check = local_assigns[:disable_dirty_check]
2
+
3
+ panel.panels_form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
4
+ form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name', disableDirtyCheck: disable_dirty_check
5
+ form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password', disableDirtyCheck: disable_dirty_check
6
+ form.fields_text name: 'user[title]', width: 'matchParent', label: 'Title', disableDirtyCheck: disable_dirty_check
7
+
8
+ form.fields_select width: 'matchParent', name: 'user[types]', options: [
9
+ { value: 1, text: 'One' },
10
+ { value: 2, text: 'Two' }
11
+ ], disableDirtyCheck: disable_dirty_check
12
+
13
+ form.fields_checkGroup disableDirtyCheck: disable_dirty_check, width: 'matchParent', name: 'user[multichoices]', childViews: ->(group) do
14
+ group.fields_check label: 'Choice 1', checkValue: 'choice1'
15
+ group.fields_check label: 'Choice 2', checkValue: 'choice2'
16
+ end
17
+
18
+ form.panels_split width: 'matchParent', content: ->(split) do
19
+ split.left childViews: ->(left) do
20
+ left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
21
+ mode = local_assigns[:mode]
22
+ case mode || params[:mode]
23
+ when 'dialog'
24
+ horizontal.fields_hidden name: 'mode', value: 'dialog'
25
+ horizontal.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
26
+ when 'dialog_reload'
27
+ horizontal.button styleClass: 'link', text: 'back', onClick: ->(action) do
28
+ render 'json_ui/garage/actions/dialogs_show', json: json, action: action, dialog_mode: :reload
29
+ end
30
+ when 'dialog_show'
31
+ horizontal.button styleClass: 'link', text: 'show', onClick: ->(action) do
32
+ render \
33
+ 'json_ui/garage/actions/dialogs_show',
34
+ json: json,
35
+ action: action,
36
+ dialog_mode: :show,
37
+ include_form: true
38
+ end
39
+ end
40
+ end
41
+ end
42
+ split.right childViews: ->(right) do
43
+ # right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
44
+ right.fields_submit text: 'Submit'
45
+ end
46
+ end
47
+ end
@@ -3,27 +3,6 @@ json.title 'Forms'
3
3
  page = json_ui_page json
4
4
  render "#{@path_prefix}/nav_menu", json: json, page: page
5
5
 
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: 'Name'
8
- form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
9
-
10
- form.panels_split width: 'matchParent', content: ->(split) do
11
- split.left childViews: ->(left) do
12
- left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
13
- case params[:mode]
14
- when 'dialog'
15
- horizontal.fields_hidden name: 'mode', value: 'dialog'
16
- horizontal.button styleClass: 'link', text: 'cancel', onClick: ->(action) { action.dialogs_close }
17
- when 'dialog_reload'
18
- horizontal.button styleClass: 'link', text: 'back', onClick: ->(action) do
19
- render 'json_ui/garage/actions/dialogs_show', json: json, action: action, dialog_mode: :reload
20
- end
21
- end
22
- end
23
- end
24
- split.right childViews: ->(right) do
25
- # right.button text: 'Submit', onClick: ->(action) { action.forms_submit }
26
- right.fields_submit text: 'Submit'
27
- end
28
- end
6
+ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
7
+ render 'json_ui/garage/forms/basic_content', panel: scroll
29
8
  end
@@ -26,6 +26,17 @@ page.form \
26
26
  end
27
27
  form.fields_datetime id: 'date2', name: 'user[datetime_end]', width: 'matchParent', label: 'End Date', min: '2010-01-01', max: '2012-01-01'
28
28
 
29
+ form.spacer height: 20
30
+ form.h2 text: 'Button Date'
31
+ form.label text: 'Plus 30 days'
32
+ form.spacer height: 6
33
+ form.fields_date name: 'user[date_start1]', label: 'Add start date', value: '2024-12-12', buttonTemplate: true, onChange: ->(action) do
34
+ action.logics_set targetId: 'date3', conditionalData: { value: { "sum_date": [{ "var": 'user[date_start1]' }, { value: 86400 * 30, format: 'date' }] } }
35
+ end
36
+ form.spacer height: 6
37
+ form.fields_date id: 'date3', name: 'user[date_end1]', label: 'End date', buttonTemplate: true
38
+
39
+
29
40
  form.spacer height: 20
30
41
  form.h2 text: 'Divided by 3 (with precision set)'
31
42
  form.spacer height: 6
@@ -11,9 +11,6 @@ page.form \
11
11
  method: 'post',
12
12
  padding: glib_json_padding_body,
13
13
  childViews: ->(form) do
14
- form.spacer height: 14
15
- form.label text: 'This page will not show a dirty prompt even when the form field content has changed'
16
- form.spacer height: 14
17
14
  form.h3 text: "Hello #{ data[:name] }"
18
15
  form.spacer height: 4
19
16
  form.fields_text name: 'user[dirty_check_enabled]', width: 'matchParent', label: 'Dirty check enabled'
@@ -70,6 +70,8 @@ page.form \
70
70
  max: '2021-03-01',
71
71
  value: '2021-11'
72
72
 
73
+
74
+
73
75
  if record.present?
74
76
  form.fields_datetime \
75
77
  prop: :created_at,
@@ -78,6 +80,22 @@ page.form \
78
80
  width: 'matchParent'
79
81
  end
80
82
 
83
+ form.spacer height: 8
84
+ form.fields_date \
85
+ name: 'user[due_date]',
86
+ label: 'Add due date',
87
+ buttonTemplate: true,
88
+ min: '2024-11-01',
89
+ max: '2024-12-31'
90
+ form.spacer height: 8
91
+
92
+ form.spacer height: 8
93
+ form.fields_datetime \
94
+ name: 'user[due_date1]',
95
+ label: 'Add due datetime',
96
+ buttonTemplate: true
97
+ form.spacer height: 8
98
+
81
99
  form.spacer height: 20
82
100
  form.h2 text: 'Country'
83
101
  form.spacer height: 6
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
@@ -8,6 +8,9 @@ page.list firstSection: ->(section) do
8
8
  template.thumbnail title: 'Layout', onClick: ->(action) do
9
9
  action.windows_open url: json_ui_garage_url(path: 'tables/layout')
10
10
  end
11
+ template.thumbnail title: 'Nested table', onClick: ->(action) do
12
+ action.windows_open url: json_ui_garage_url(path: 'tables/nested_table')
13
+ end
11
14
  template.thumbnail title: 'Horizontal Scroll', onClick: ->(action) do
12
15
  action.windows_open url: json_ui_garage_url(path: 'tables/horizontal_scroll')
13
16
  end
@@ -0,0 +1,60 @@
1
+ json.title 'Tables'
2
+
3
+ page = json_ui_page json
4
+ render "#{@path_prefix}/nav_menu", json: json, page: page
5
+
6
+ page.form width: 'matchParent', childViews: ->(view) do
7
+ view.panels_table styleClass: 'table--plain', sections: [
8
+ ->(section) do
9
+ section.header cellViews: ->(header) do
10
+ header.label text: ''
11
+ header.label text: 'Month'
12
+ header.label text: 'Electicity'
13
+ header.label text: 'Sanitation Facility'
14
+ header.label text: 'Ground Irrigation'
15
+ end
16
+
17
+ items = [
18
+ { month: 'Jan', electricity: 1200, sanitation_facility: 500, ground_irrigation: 450 },
19
+ { month: 'Feb', electricity: 1150, sanitation_facility: 800, ground_irrigation: 440 },
20
+ { month: 'Mar', electricity: 1100, sanitation_facility: 700, ground_irrigation: 430 },
21
+ { month: 'Apr', electricity: 1000, sanitation_facility: 450, ground_irrigation: 420 }
22
+ ]
23
+ section.rows objects: items, builder: ->(row, item, index) do
24
+ row.default cellViews: ->(cell) do
25
+ cell.fields_check name: "row-#{index}", onIcon: 'keyboard_arrow_up', offIcon: 'keyboard_arrow_down', checkValue: true, onChange: ->(action) do
26
+ action.logics_set targetId: "nested-#{index}", conditionalData: {
27
+ displayed: { "var": "row-#{index}" }
28
+ }
29
+ end
30
+ cell.label text: item[:month]
31
+ cell.label text: item[:electricity]
32
+ cell.label text: item[:sanitation_facility]
33
+ cell.label text: item[:ground_irrigation]
34
+ end
35
+ row.default colSpans: [5], cellViews: ->(cell) do
36
+ cell.panels_table id: "nested-#{index}", displayed: false, width: 'matchParent', sections: [
37
+ ->(ssection) do
38
+ ssection.header cellViews: ->(header) do
39
+ header.label text: 'Filename'
40
+ header.label text: 'Uploaded At'
41
+ header.label text: ''
42
+ end
43
+
44
+ sitems = [
45
+ { filename: 'electricity-bill.png', uploaded_at: '2024-05-11' },
46
+ { filename: 'irrigation-bill.png', uploaded_at: '2024-05-11' }
47
+ ]
48
+ ssection.rows objects: sitems, builder: ->(srow, sitem, sindex) do
49
+ srow.default cellViews: ->(scell) do
50
+ scell.label text: sitem[:filename]
51
+ scell.label text: sitem[:uploaded_at]
52
+ end
53
+ end
54
+ end
55
+ ]
56
+ end
57
+ end
58
+ end
59
+ ]
60
+ end
@@ -1,4 +1,4 @@
1
- navs = ['form', 'dialog', 'form_dynamic', 'auto_validate', 'multiupload']
1
+ navs = ['form', 'dialog', 'form_dynamic', 'auto_validate', 'multiupload', 'dirty_state']
2
2
 
3
3
  view.panels_flow innerPadding: { bottom: 0 }, styleClass: 'align-right', width: 'matchParent', childViews: ->(res) do
4
4
  navs.each_with_index do |nav, index|
@@ -0,0 +1,46 @@
1
+
2
+
3
+ json.title 'Test Page (Dirty state)'
4
+
5
+ page = json_ui_page json
6
+
7
+ page.body childViews: ->(body) do
8
+ render 'json_ui/garage/test_page/header', view: body
9
+
10
+ body.panels_form padding: glib_json_padding_body, childViews: ->(form) do
11
+ form.h2 text: 'Dirty state'
12
+ form.spacer height: 8
13
+
14
+ form.fields_text name: 'user[dirty_check_disabled]', width: 'matchParent', label: 'Dirty check disabled', disableDirtyCheck: true
15
+ form.spacer height: 14
16
+
17
+ form.h3 text: 'Radio'
18
+ form.spacer height: 14
19
+ form.fields_radioGroup name: 'user[gender]', value: 'F', childViews: ->(group) do
20
+ group.fields_radio value: '', label: 'Unknown'
21
+ group.fields_radio value: 'M', label: 'Male'
22
+ group.fields_radio value: 'F', label: 'Female'
23
+ end
24
+
25
+ form.h3 text: 'Check group'
26
+ form.spacer height: 14
27
+ form.fields_check name: 'user[check][]', checkValue: 'choice1', label: 'choice1', value: 'choice2'
28
+ form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice2'
29
+ form.fields_check name: 'user[check][]', checkValue: 'choice2', label: 'choice3', value: 'choice2'
30
+
31
+ form.spacer height: 24
32
+ form.panels_split width: 'matchParent', content: ->(split) do
33
+ split.left childViews: ->(left) do
34
+ left.panels_horizontal height: 'matchParent', align: 'middle', childViews: ->(horizontal) do
35
+ horizontal.label text: 'Dialog Form', onClick: ->(action) do
36
+ action.dialogs_open url: json_ui_garage_url(path: 'forms/basic', mode: 'dialog')
37
+ end
38
+ end
39
+ end
40
+
41
+ split.right childViews: ->(right) do
42
+ right.fields_submit text: 'Submit'
43
+ end
44
+ end
45
+ end
46
+ end
@@ -42,11 +42,11 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
42
42
  content: ->(dialog) do
43
43
  dialog.body childViews: ->(view) do
44
44
  view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
45
- res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
45
+ res.label text: 'GOTO pages/index', styleClass: 'popover-menu-item', onClick: ->(saction) do
46
46
  saction.windows_open url: json_ui_garage_url(path: 'pages/index')
47
47
  end
48
- res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
49
- saction.windows_open url: json_ui_garage_url(path: 'home/blank')
48
+ res.label text: 'closeAllWithOpen', styleClass: 'popover-menu-item', onClick: ->(saction) do
49
+ saction.windows_closeAllWithOpen url: json_ui_garage_url(path: 'home/blank')
50
50
  end
51
51
  res.label text: 'close', styleClass: 'popover-menu-item', onClick: ->(saction) do
52
52
  saction.popovers_close key: 'menu'
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
data/lib/glib/value.rb CHANGED
File without changes
data/lib/glib/version.rb 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: 4.16.0
4
+ version: 4.18.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - ''
@@ -198,12 +198,12 @@ files:
198
198
  - app/views/json_ui/garage/empty.json.jbuilder
199
199
  - app/views/json_ui/garage/forms/_alert_post_all_data.json.jbuilder
200
200
  - app/views/json_ui/garage/forms/_alert_post_data.json.jbuilder
201
+ - app/views/json_ui/garage/forms/_basic_content.json.jbuilder
201
202
  - app/views/json_ui/garage/forms/_conditional_banner.json.jbuilder
202
203
  - app/views/json_ui/garage/forms/_partial_update_execute.json.jbuilder
203
204
  - app/views/json_ui/garage/forms/_read_more_text.json.jbuilder
204
205
  - app/views/json_ui/garage/forms/basic.json.jbuilder
205
206
  - app/views/json_ui/garage/forms/basic_post.json.jbuilder
206
- - app/views/json_ui/garage/forms/blank_get.json.jbuilder
207
207
  - app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder
208
208
  - app/views/json_ui/garage/forms/bulk_edit_post2.json.jbuilder
209
209
  - app/views/json_ui/garage/forms/checkboxes.json.jbuilder
@@ -314,11 +314,13 @@ files:
314
314
  - app/views/json_ui/garage/tables/horizontal_scroll.json.jbuilder
315
315
  - app/views/json_ui/garage/tables/index.json.jbuilder
316
316
  - app/views/json_ui/garage/tables/layout.json.jbuilder
317
+ - app/views/json_ui/garage/tables/nested_table.json.jbuilder
317
318
  - app/views/json_ui/garage/tables/panel_content.json.jbuilder
318
319
  - app/views/json_ui/garage/test_page/_header.json.jbuilder
319
320
  - app/views/json_ui/garage/test_page/auto_validate.json.jbuilder
320
321
  - app/views/json_ui/garage/test_page/dialog.json.jbuilder
321
322
  - app/views/json_ui/garage/test_page/dialog_open.json.jbuilder
323
+ - app/views/json_ui/garage/test_page/dirty_state.json.jbuilder
322
324
  - app/views/json_ui/garage/test_page/form.json.jbuilder
323
325
  - app/views/json_ui/garage/test_page/form_dynamic.json.jbuilder
324
326
  - app/views/json_ui/garage/test_page/multiupload.json.jbuilder
@@ -404,8 +406,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
404
406
  - !ruby/object:Gem::Version
405
407
  version: '0'
406
408
  requirements: []
407
- rubyforge_project:
408
- rubygems_version: 2.7.6
409
+ rubygems_version: 3.4.6
409
410
  signing_key:
410
411
  specification_version: 4
411
412
  summary: ''
@@ -1,8 +0,0 @@
1
- json_ui_response json do |action|
2
- action.logics_set targetId: 'heading', data: {
3
- text: "Dynamic Group #{DateTime.current.to_i}"
4
- }
5
- end
6
- # json_ui_response_with_view json do |action|
7
- # render 'form_response', action: action
8
- # end