glib-web 4.10.6 → 4.11.0
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/json_ui/action_builder/components.rb +2 -2
- data/app/helpers/glib/json_ui/action_builder/logics.rb +0 -1
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder.rb +6 -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/view_builder/fields.rb +1 -0
- data/app/helpers/glib/json_ui/view_builder/panels.rb +7 -5
- 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_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/bulk_edit_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/bulk_edit_post2.json.jbuilder +9 -5
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- 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/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/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/custom_style_class.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/layout.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/pages/redirect_onload.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/bulk_edit.json.jbuilder +86 -11
- 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/map_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/multimedia.json.jbuilder +0 -0
- data/app/views/layouts/json_ui/no_custom.html.erb +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/dynamic_text/config.rb +0 -0
- data/lib/glib/dynamic_text.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/dialogs_alert.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/menu.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/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- metadata +3 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 3ebaad0db46b2de735aeab4b86abcbd6d436b2c9350d4a4da402f54f7fe6c8ec
|
|
4
|
+
data.tar.gz: 29433f78f6f0fb2b3a21ef52108feb97fdac0bf9af7693b37dde9b17f3b9070c
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: f31a55f1ac2485426a381b933ece050fb967571b9de2255cce345be1a3f0136e45f432132c79118c45f376792aa32cb7b677d4d1594db014515348b0fcafeda5
|
|
7
|
+
data.tar.gz: 3f4f47a8b1566f503d8073f6817c73dde15ef2f70861ba89330781b2f62676da9fdd829e61e9de0fb2f64586b6581032cd4d958d4dd61c204b7c6eb1bc0fd26c
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -17,6 +17,12 @@ module Glib
|
|
|
17
17
|
|
|
18
18
|
class Action < JsonUiElement
|
|
19
19
|
string :targetId
|
|
20
|
+
string :paramName
|
|
21
|
+
|
|
22
|
+
# TODO: Rename to fromFieldName or previousFieldName or valueFromFieldName or fieldValueFromName
|
|
23
|
+
string :fieldName
|
|
24
|
+
bool :debug
|
|
25
|
+
|
|
20
26
|
# def analytics(value)
|
|
21
27
|
# if value.is_a?(String)
|
|
22
28
|
# @analyticsEnabled = true
|
|
File without changes
|
|
File without changes
|
|
@@ -370,18 +370,20 @@ class Glib::JsonUi::ViewBuilder
|
|
|
370
370
|
class BulkEdit2 < View
|
|
371
371
|
hash :import, required: [:submitUrl, :paramName]
|
|
372
372
|
|
|
373
|
-
string :statusViewIdPrefix
|
|
373
|
+
# string :statusViewIdPrefix
|
|
374
374
|
array :viewHeaders
|
|
375
375
|
|
|
376
|
-
|
|
376
|
+
# string :paramNameForFormData
|
|
377
|
+
string :paramNameForRowId
|
|
377
378
|
action :onCellChange
|
|
378
|
-
|
|
379
|
-
action :
|
|
379
|
+
action :onRowsLoad
|
|
380
|
+
action :onRowsSelect
|
|
381
|
+
action :onRowsSucceed
|
|
380
382
|
action :onSubmitStart
|
|
381
383
|
action :onSubmitEnd
|
|
382
384
|
|
|
383
385
|
# Experimental
|
|
384
|
-
panels_builder :accessory, :header, :footer
|
|
386
|
+
# panels_builder :accessory, :header, :footer
|
|
385
387
|
|
|
386
388
|
def viewCells(values)
|
|
387
389
|
json.set! 'viewCells' do
|
|
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
|
|
@@ -1,8 +1,12 @@
|
|
|
1
|
-
sleep
|
|
2
|
-
row_id = params[:user]['
|
|
3
|
-
|
|
4
|
-
status = :
|
|
1
|
+
sleep 1
|
|
2
|
+
row_id = params[:user]['row_id']
|
|
3
|
+
status = [:succeeded, :failed][rand(0..1)]
|
|
4
|
+
# status = :succeeded
|
|
5
|
+
#status = :failed
|
|
5
6
|
|
|
6
7
|
json_ui_response json do |action|
|
|
7
|
-
action.
|
|
8
|
+
action.components_invoke \
|
|
9
|
+
targetId: 'import_table',
|
|
10
|
+
name: 'updateRow',
|
|
11
|
+
arguments: { rowId: row_id, status: status, message: 'Response from server' }
|
|
8
12
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -32,19 +32,46 @@ page.scroll childViews: ->(scroll) do
|
|
|
32
32
|
# end
|
|
33
33
|
|
|
34
34
|
options = [{ text: 'yes', value: 'yes' }, { text: 'no', value: 'no' }]
|
|
35
|
+
source_options = ['Generators', 'Power Station', 'Solar Panels'].map do |o|
|
|
36
|
+
{ text: o, value: o }
|
|
37
|
+
end
|
|
38
|
+
|
|
39
|
+
# { text: 'Solar Panels', value: 'solar_panels' },
|
|
40
|
+
# { text: 'Generators', value: 'generators' },
|
|
41
|
+
# { text: 'Power Station', value: 'power_station' }
|
|
42
|
+
|
|
35
43
|
scroll.button displayed: false, id: 'submit_top', text: 'submit', onClick: ->(action) do
|
|
36
44
|
action.forms_submit targetId: 'bulkEdit'
|
|
37
45
|
end
|
|
38
46
|
scroll.panels_responsive styleClass: 'overflow-y-auto', width: 'matchParent', height: 500, childViews: ->(wres) do
|
|
47
|
+
wres.panels_horizontal align: 'middle', childViews: ->(horizontal) do
|
|
48
|
+
horizontal.label text: 'Total: '
|
|
49
|
+
horizontal.label id: 'loaded_count', text: '0'
|
|
50
|
+
|
|
51
|
+
horizontal.label text: " #{symbol_horizontal_separator} "
|
|
52
|
+
|
|
53
|
+
horizontal.label text: 'Selected: '
|
|
54
|
+
horizontal.label id: 'selected_count', text: '0'
|
|
55
|
+
|
|
56
|
+
horizontal.label text: " #{symbol_horizontal_separator} "
|
|
57
|
+
horizontal.chip \
|
|
58
|
+
id: 'succeeded_count',
|
|
59
|
+
styleClass: 'success',
|
|
60
|
+
text: 'Uploaded: ',
|
|
61
|
+
displayed: false
|
|
62
|
+
end
|
|
63
|
+
|
|
39
64
|
scroll.panels_bulkEdit2 \
|
|
40
|
-
id: '
|
|
65
|
+
id: 'import_table',
|
|
41
66
|
width: 'matchParent',
|
|
42
67
|
backgroundColor: '#e2e2e2',
|
|
68
|
+
paramNameForRowId: 'row_id',
|
|
43
69
|
import: { submitUrl: json_ui_garage_url(path: 'forms/bulk_edit_post2'), paramName: 'user' },
|
|
44
70
|
viewHeaders: [
|
|
45
71
|
{ text: 'Month', id: 'month', importable: true },
|
|
46
72
|
{ text: 'Electricity usage', id: 'electricity_usage', importable: true },
|
|
47
73
|
{ text: 'Gas usage', id: 'gas_usage', importable: true },
|
|
74
|
+
{ text: 'Sources', id: 'sources', importable: true },
|
|
48
75
|
{ text: 'Compliant', id: 'compliant', importable: true }
|
|
49
76
|
],
|
|
50
77
|
viewCells: [
|
|
@@ -57,35 +84,83 @@ page.scroll childViews: ->(scroll) do
|
|
|
57
84
|
->(view) do
|
|
58
85
|
view.fields_number width: 'matchParent'
|
|
59
86
|
end,
|
|
87
|
+
->(view) do
|
|
88
|
+
view.fields_select width: 'matchParent', options: source_options, multiple: true
|
|
89
|
+
end,
|
|
60
90
|
->(view) do
|
|
61
91
|
view.fields_select width: 'matchParent', options: options
|
|
62
92
|
end
|
|
63
93
|
],
|
|
64
|
-
paramNameForFormData: 'message',
|
|
94
|
+
# paramNameForFormData: 'message',
|
|
65
95
|
onCellChange: ->(action) do
|
|
66
|
-
action.snackbars_alert
|
|
67
|
-
end,
|
|
68
|
-
onLoadRows: ->(action) do
|
|
69
|
-
action.runMultiple childActions: ->(multiple) do
|
|
70
|
-
multiple.snackbars_alert message: 'rows loaded'
|
|
71
|
-
multiple.components_set targetId: 'submit_top', data: { displayed: true }
|
|
72
|
-
multiple.components_set targetId: 'submit_bottom', data: { displayed: true }
|
|
73
|
-
end
|
|
96
|
+
action.snackbars_alert debug: true, paramName: 'message', fieldName: 'row'
|
|
74
97
|
end,
|
|
75
98
|
onSubmitStart: ->(action) do
|
|
76
99
|
action.runMultiple childActions: ->(multiple) do
|
|
77
100
|
multiple.components_set targetId: 'submit_top', data: { disabled: true }
|
|
78
101
|
multiple.components_set targetId: 'submit_bottom', data: { disabled: true }
|
|
102
|
+
multiple.components_set targetId: 'cancel_button', data: { displayed: true }
|
|
79
103
|
end
|
|
80
104
|
end,
|
|
81
105
|
onSubmitEnd: ->(action) do
|
|
82
106
|
action.runMultiple childActions: ->(multiple) do
|
|
83
107
|
multiple.components_set targetId: 'submit_top', data: { disabled: false }
|
|
84
108
|
multiple.components_set targetId: 'submit_bottom', data: { disabled: false }
|
|
109
|
+
multiple.components_set targetId: 'cancel_button', data: { displayed: false }
|
|
110
|
+
end
|
|
111
|
+
end,
|
|
112
|
+
onRowsLoad: ->(action) do
|
|
113
|
+
action.runMultiple debug: true, fieldName: 'data', childActions: ->(multiple) do
|
|
114
|
+
multiple.logics_set \
|
|
115
|
+
targetId: 'loaded_count',
|
|
116
|
+
debug: true,
|
|
117
|
+
paramName: 'variables',
|
|
118
|
+
fieldName: 'data',
|
|
119
|
+
conditionalData: {
|
|
120
|
+
text: { "count": [{ "var": 'data.loadedRows' }] }
|
|
121
|
+
}
|
|
122
|
+
multiple.components_set targetId: 'submit_top', data: { displayed: true }
|
|
123
|
+
multiple.components_set targetId: 'submit_bottom', data: { displayed: true }
|
|
85
124
|
end
|
|
125
|
+
end,
|
|
126
|
+
onRowsSelect: ->(action) do
|
|
127
|
+
action.logics_set \
|
|
128
|
+
targetId: 'selected_count',
|
|
129
|
+
debug: true,
|
|
130
|
+
paramName: 'variables',
|
|
131
|
+
fieldName: 'data',
|
|
132
|
+
conditionalData: {
|
|
133
|
+
text: { "count": [{ "var": 'data.selectedRows' }] }
|
|
134
|
+
}
|
|
135
|
+
end,
|
|
136
|
+
onRowsSucceed: ->(action) do
|
|
137
|
+
action.logics_set \
|
|
138
|
+
targetId: 'succeeded_count',
|
|
139
|
+
debug: true,
|
|
140
|
+
paramName: 'variables',
|
|
141
|
+
fieldName: 'data',
|
|
142
|
+
conditionalData: {
|
|
143
|
+
text: {
|
|
144
|
+
"printf": [
|
|
145
|
+
"Uploaded: {0}",
|
|
146
|
+
{ "count": [{ "var": 'data.succeededRows' }] }
|
|
147
|
+
]
|
|
148
|
+
},
|
|
149
|
+
displayed: true
|
|
150
|
+
}
|
|
86
151
|
end
|
|
87
152
|
end
|
|
88
153
|
scroll.button displayed: false, id: 'submit_bottom', text: 'submit', onClick: ->(action) do
|
|
89
|
-
action.forms_submit targetId: '
|
|
154
|
+
action.forms_submit targetId: 'import_table'
|
|
155
|
+
end
|
|
156
|
+
|
|
157
|
+
scroll.button displayed: false, id: 'cancel_button', text: 'Cancel', onClick: ->(action) do
|
|
158
|
+
action.sheets_select message: 'Are you sure?', buttons: ->(menu) do
|
|
159
|
+
menu.button text: 'Yes, cancel the import', onClick: ->(subaction) do
|
|
160
|
+
action.components_invoke \
|
|
161
|
+
targetId: 'import_table',
|
|
162
|
+
name: 'cancelImport'
|
|
163
|
+
end
|
|
164
|
+
end
|
|
90
165
|
end
|
|
91
166
|
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
|
data/lib/glib/dynamic_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
|
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.
|
|
4
|
+
version: 4.11.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -403,7 +403,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
403
403
|
- !ruby/object:Gem::Version
|
|
404
404
|
version: '0'
|
|
405
405
|
requirements: []
|
|
406
|
-
|
|
406
|
+
rubyforge_project:
|
|
407
|
+
rubygems_version: 2.7.6
|
|
407
408
|
signing_key:
|
|
408
409
|
specification_version: 4
|
|
409
410
|
summary: ''
|