glib-web 3.18.0 → 3.19.1
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/controllers/concerns/glib/json/traversal.rb +4 -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/abstract_builder.rb +3 -1
- data/app/helpers/glib/json_ui/action_builder/popovers.rb +12 -0
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/analytics_helper.rb +0 -0
- data/app/helpers/glib/json_ui/builder/mouse_events.rb +14 -4
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/page_helper.rb +5 -1
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +16 -1
- data/app/helpers/glib/json_ui/view_builder.rb +1 -0
- 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/_sheets.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/dialogs_oauth_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/file_upload.json.jbuilder +1 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/pickers.json.jbuilder +13 -0
- data/app/views/json_ui/garage/forms/rich_text_preview.json.jbuilder +1 -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/index.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/layout.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/lifecycle_hooks.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/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/charts.json.jbuilder +4 -4
- data/app/views/json_ui/garage/views/controls.json.jbuilder +60 -24
- data/app/views/json_ui/garage/views/links.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/crypt/utils.rb +0 -0
- data/lib/glib/crypt.rb +0 -0
- data/lib/glib/dynamic_text/config.rb +0 -0
- data/lib/glib/dynamic_text.rb +0 -0
- data/lib/glib/engine.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/dialogs_show.rb +12 -0
- data/lib/glib/json_crawler/action_crawlers/forms_submit.rb +6 -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/json_crawler/router.rb +2 -0
- data/lib/glib/json_crawler.rb +1 -0
- data/lib/glib/mailer_tester.rb +1 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/glib-web.rb +0 -0
- metadata +4 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: b694845415b32c179dd54e831edef944ae82293abefea78edd0e85f7d50f86ee
|
|
4
|
+
data.tar.gz: c67caa45c4f14951018bc6e518080580d0bec5b67a6f0ae1d81dd2d66798a053
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: b4ddf953458f333208e87ae58f476ad23623762336e3b29d65b249528e37be86e378d07da26712e6180b698c98f1bc76ea7314d9a0814c4d2be52e65da0881f3
|
|
7
|
+
data.tar.gz: 84e6307d15fbebcbe60da0540df2a269f239fc7ec0701dd4647e9e27f13103450e82784d8218053b98194ec2a5c6ac720a188d6f664212183b38deb1a374df74
|
|
File without changes
|
|
@@ -94,6 +94,10 @@ module Glib::Json::Traversal
|
|
|
94
94
|
traverse_multiple view['leftButtons'], block
|
|
95
95
|
traverse_multiple view['rightButtons'], block
|
|
96
96
|
|
|
97
|
+
# Select field
|
|
98
|
+
traverse_vertical_content view['header'], block
|
|
99
|
+
traverse_vertical_content view['footer'], block
|
|
100
|
+
|
|
97
101
|
# Table row
|
|
98
102
|
traverse_multiple view['cellViews'], block
|
|
99
103
|
|
|
File without changes
|
|
File without changes
|
|
@@ -269,7 +269,9 @@ module Glib
|
|
|
269
269
|
|
|
270
270
|
def self.action(propName)
|
|
271
271
|
define_method(propName) do |value|
|
|
272
|
-
|
|
272
|
+
if value # Allow nil value
|
|
273
|
+
json.set!(propName) { value.call(page.action_builder) }
|
|
274
|
+
end
|
|
273
275
|
end
|
|
274
276
|
end
|
|
275
277
|
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
class Glib::JsonUi::ActionBuilder
|
|
2
2
|
module Popovers
|
|
3
|
+
# Deprecated. Use popovers_show instead.
|
|
3
4
|
class Open < Action
|
|
4
5
|
string :key
|
|
5
6
|
views :childViews
|
|
@@ -9,6 +10,17 @@ class Glib::JsonUi::ActionBuilder
|
|
|
9
10
|
singleton_array :styleClass, :styleClasses
|
|
10
11
|
end
|
|
11
12
|
|
|
13
|
+
class Show < Action
|
|
14
|
+
panels_builder :content, :body
|
|
15
|
+
|
|
16
|
+
string :key
|
|
17
|
+
# views :childViews
|
|
18
|
+
string :placement
|
|
19
|
+
int :offset
|
|
20
|
+
int :width
|
|
21
|
+
# singleton_array :styleClass, :styleClasses
|
|
22
|
+
end
|
|
23
|
+
|
|
12
24
|
class Close < Action
|
|
13
25
|
string :key
|
|
14
26
|
action :onClose
|
|
File without changes
|
|
File without changes
|
|
@@ -15,12 +15,22 @@ module Glib
|
|
|
15
15
|
key = 'tooltip_test'
|
|
16
16
|
end
|
|
17
17
|
onMouseEnter ->(action) do
|
|
18
|
-
action.popovers_open(
|
|
18
|
+
# action.popovers_open(
|
|
19
|
+
# key: key,
|
|
20
|
+
# placement: options[:placement] || 'top',
|
|
21
|
+
# childViews: ->(view) {
|
|
22
|
+
# view.p styleClass: 'tooltip', text: options[:text]
|
|
23
|
+
# }
|
|
24
|
+
# )
|
|
25
|
+
|
|
26
|
+
action.popovers_show(
|
|
19
27
|
key: key,
|
|
20
28
|
placement: options[:placement] || 'top',
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
29
|
+
content: ->(popover) do
|
|
30
|
+
popover.body childViews: ->(view) {
|
|
31
|
+
view.p styleClass: 'tooltip', text: options[:text]
|
|
32
|
+
}
|
|
33
|
+
end
|
|
24
34
|
)
|
|
25
35
|
end
|
|
26
36
|
|
|
File without changes
|
|
@@ -238,7 +238,11 @@ module Glib
|
|
|
238
238
|
# TODO: try disabling this
|
|
239
239
|
# options = options.reverse_merge(width: 'matchParent')
|
|
240
240
|
|
|
241
|
-
|
|
241
|
+
if (styleClass = options.delete(:styleClass))
|
|
242
|
+
json.styleClasses [styleClass]
|
|
243
|
+
end
|
|
244
|
+
|
|
245
|
+
[:styleClasses, :padding, :backgroundColor, :width, :height].each do |name|
|
|
242
246
|
if (value = options.delete(name))
|
|
243
247
|
json.set! name, value
|
|
244
248
|
end
|
|
File without changes
|
|
@@ -301,7 +301,7 @@ class Glib::JsonUi::ViewBuilder
|
|
|
301
301
|
array :files
|
|
302
302
|
string :directUploadUrl
|
|
303
303
|
string :uploadTitle
|
|
304
|
-
string :uploadFailedText
|
|
304
|
+
string :uploadFailedText # deprecated
|
|
305
305
|
|
|
306
306
|
required :accepts, :directUploadUrl
|
|
307
307
|
|
|
@@ -319,12 +319,27 @@ class Glib::JsonUi::ViewBuilder
|
|
|
319
319
|
@files = values
|
|
320
320
|
end
|
|
321
321
|
|
|
322
|
+
def responseMessages(values)
|
|
323
|
+
@responseMessages = values
|
|
324
|
+
end
|
|
325
|
+
|
|
322
326
|
def created
|
|
323
327
|
super
|
|
324
328
|
|
|
325
329
|
@placeholder ||= I18n.t('common.multi_upload.placeholder', default: nil)
|
|
326
330
|
@hint ||= I18n.t('common.multi_upload.hint', default: nil)
|
|
327
331
|
|
|
332
|
+
['200', '403', '401', 'else'].each do |status|
|
|
333
|
+
key = "common.multi_upload.responseMessages.#{status}"
|
|
334
|
+
@responseMessages[status] = I18n.t(key) if I18n.exists?(key)
|
|
335
|
+
end
|
|
336
|
+
json.responseMessages (@responseMessages || {}).reverse_merge({
|
|
337
|
+
'200' => 'File uploaded',
|
|
338
|
+
'403' => 'Forbidden',
|
|
339
|
+
'401' => 'Session expired',
|
|
340
|
+
'else' => 'Upload failed'
|
|
341
|
+
})
|
|
342
|
+
|
|
328
343
|
json.placeholder @placeholder if @placeholder
|
|
329
344
|
json.hint @hint if @hint
|
|
330
345
|
|
|
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
|
|
File without changes
|
|
@@ -39,6 +39,7 @@ page.form options.merge(childViews: ->(form) do
|
|
|
39
39
|
form.spacer height: 16
|
|
40
40
|
form.fields_multiUpload \
|
|
41
41
|
name: 'user[multi][]',
|
|
42
|
+
width: 360,
|
|
42
43
|
accepts: { fileType: 'image', maxFileSize: 5000 },
|
|
43
44
|
directUploadUrl: rails_direct_uploads_url,
|
|
44
45
|
uploadTitle: 'Files uploaded:',
|
|
File without changes
|
|
@@ -3,8 +3,13 @@ json.title 'Forms'
|
|
|
3
3
|
page = json_ui_page json
|
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
5
5
|
|
|
6
|
+
if Object.const_defined?('User')
|
|
7
|
+
record = User.first
|
|
8
|
+
end
|
|
9
|
+
|
|
6
10
|
page.form \
|
|
7
11
|
url: json_ui_garage_url(path: 'forms/generic_post'),
|
|
12
|
+
model: record,
|
|
8
13
|
method: 'post',
|
|
9
14
|
padding: glib_json_padding_body,
|
|
10
15
|
childViews: ->(form) do
|
|
@@ -65,6 +70,14 @@ page.form \
|
|
|
65
70
|
max: '2021-03-01',
|
|
66
71
|
value: '2021-11'
|
|
67
72
|
|
|
73
|
+
if record.present?
|
|
74
|
+
form.fields_datetime \
|
|
75
|
+
prop: :created_at,
|
|
76
|
+
label: 'User created at',
|
|
77
|
+
placeholder: 'User created at',
|
|
78
|
+
width: 'matchParent'
|
|
79
|
+
end
|
|
80
|
+
|
|
68
81
|
form.spacer height: 20
|
|
69
82
|
form.h2 text: 'Country'
|
|
70
83
|
form.spacer height: 6
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
data = params[:user] || {}
|
|
2
2
|
|
|
3
3
|
json_ui_response_with_view json do |action|
|
|
4
|
+
# Experimental. Continue to use `components_update` instead.
|
|
4
5
|
action.components_replace targetId: 'preview', newView: ->(update) do
|
|
5
6
|
update.panels_vertical childViews: ->(vertical) do
|
|
6
7
|
vertical.label text: "Hello #{data[:name]},"
|
|
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
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -37,7 +37,7 @@ else
|
|
|
37
37
|
'Thu, 15 Nov 2018' => 1,
|
|
38
38
|
'Fri, 16 Nov 2018' => 5,
|
|
39
39
|
}
|
|
40
|
-
json.points points.map { |k, v| { x: k, y: v } }
|
|
40
|
+
json.points points.map { |k, v| { x: k, y: v, label: v > 5 ? 'Greater than five' : v } }
|
|
41
41
|
end,
|
|
42
42
|
-> do
|
|
43
43
|
json.title 'Line 2'
|
|
@@ -51,7 +51,7 @@ else
|
|
|
51
51
|
'Thu, 15 Nov 2018' => 5,
|
|
52
52
|
'Fri, 16 Nov 2018' => 1,
|
|
53
53
|
}
|
|
54
|
-
json.points points.map { |k, v| { x: k, y: v } }
|
|
54
|
+
json.points points.map { |k, v| { x: k, y: v, label: v > 5 ? 'Greater than five' : v } }
|
|
55
55
|
end
|
|
56
56
|
],
|
|
57
57
|
plugins: default_plugins,
|
|
@@ -132,7 +132,7 @@ else
|
|
|
132
132
|
legend: { display: false },
|
|
133
133
|
colors: ['#fc5a8d', '#F5E216'],
|
|
134
134
|
plugins: plugins,
|
|
135
|
-
dataPoints: [{ title: 'Strawberry', value: 25 }, { title: 'Banana', value: 75 }], legend: { display: false }
|
|
135
|
+
dataPoints: [{ title: 'Strawberry', value: 25, label: '❤ Strawberry' }, { title: 'Banana', value: 75, label: '❤ Banana' }], legend: { display: false }
|
|
136
136
|
|
|
137
137
|
scroll.h2 text: 'Donut chart'
|
|
138
138
|
scroll.charts_pie \
|
|
@@ -145,7 +145,7 @@ else
|
|
|
145
145
|
{
|
|
146
146
|
text: 'Fruits',
|
|
147
147
|
font: {
|
|
148
|
-
|
|
148
|
+
weight: 'bold',
|
|
149
149
|
size: 20
|
|
150
150
|
}
|
|
151
151
|
},
|
|
@@ -31,19 +31,38 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
31
31
|
|
|
32
32
|
scroll.spacer height: 10
|
|
33
33
|
scroll.button text: 'Button with dropdown', onClick: ->(action) do
|
|
34
|
-
action.popovers_open \
|
|
34
|
+
# action.popovers_open \
|
|
35
|
+
# key: 'menu',
|
|
36
|
+
# placement: 'left',
|
|
37
|
+
# childViews: ->(view) do
|
|
38
|
+
# view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
|
|
39
|
+
# res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
40
|
+
# saction.popovers_close key: 'menu'
|
|
41
|
+
# end
|
|
42
|
+
# res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
43
|
+
# saction.popovers_close key: 'menu'
|
|
44
|
+
# end
|
|
45
|
+
# res.label text: 'Item 3', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
46
|
+
# saction.popovers_close key: 'menu'
|
|
47
|
+
# end
|
|
48
|
+
# end
|
|
49
|
+
# end
|
|
50
|
+
|
|
51
|
+
action.popovers_show \
|
|
35
52
|
key: 'menu',
|
|
36
53
|
placement: 'left',
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
54
|
+
content: ->(dialog) do
|
|
55
|
+
dialog.body padding: glib_json_padding_body, childViews: ->(view) do
|
|
56
|
+
view.panels_responsive styleClass: 'popover-menu', width: 200, childViews: ->(res) do
|
|
57
|
+
res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
58
|
+
saction.popovers_close key: 'menu'
|
|
59
|
+
end
|
|
60
|
+
res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
61
|
+
saction.popovers_close key: 'menu'
|
|
62
|
+
end
|
|
63
|
+
res.label text: 'Item 3', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
64
|
+
saction.popovers_close key: 'menu'
|
|
65
|
+
end
|
|
47
66
|
end
|
|
48
67
|
end
|
|
49
68
|
end
|
|
@@ -54,20 +73,38 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
54
73
|
text: 'Button with tooltip and dropdown',
|
|
55
74
|
tooltip: { text: 'Tooltip 1' },
|
|
56
75
|
onClick: ->(action) do
|
|
57
|
-
action.popovers_open \
|
|
76
|
+
# action.popovers_open \
|
|
77
|
+
# key: 'menu',
|
|
78
|
+
# placement: 'bottom-start',
|
|
79
|
+
# styleClass: 'popover-menu',
|
|
80
|
+
# width: 200,
|
|
81
|
+
# childViews: ->(res) do
|
|
82
|
+
# res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
83
|
+
# saction.popovers_close key: 'menu'
|
|
84
|
+
# end
|
|
85
|
+
# res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
86
|
+
# saction.popovers_close key: 'menu'
|
|
87
|
+
# end
|
|
88
|
+
# res.label text: 'Item 3 with very very very very very long name', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
89
|
+
# saction.popovers_close key: 'menu'
|
|
90
|
+
# end
|
|
91
|
+
# end
|
|
92
|
+
|
|
93
|
+
action.popovers_show \
|
|
58
94
|
key: 'menu',
|
|
59
95
|
placement: 'bottom-start',
|
|
60
|
-
styleClass: 'popover-menu',
|
|
61
96
|
width: 200,
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
97
|
+
content: ->(dialog) do
|
|
98
|
+
dialog.body styleClass: 'popover-menu', padding: glib_json_padding_body, childViews: ->(res) do
|
|
99
|
+
res.label text: 'Item 1', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
100
|
+
saction.popovers_close key: 'menu'
|
|
101
|
+
end
|
|
102
|
+
res.label text: 'Item 2', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
103
|
+
saction.popovers_close key: 'menu'
|
|
104
|
+
end
|
|
105
|
+
res.label text: 'Item 3 with very very very very very long name', styleClass: 'popover-menu-item', onClick: ->(saction) do
|
|
106
|
+
saction.popovers_close key: 'menu'
|
|
107
|
+
end
|
|
71
108
|
end
|
|
72
109
|
end
|
|
73
110
|
end
|
|
@@ -87,13 +124,12 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
|
87
124
|
action.dialogs_alert message: 'Perform action'
|
|
88
125
|
end
|
|
89
126
|
|
|
90
|
-
|
|
91
|
-
|
|
92
127
|
scroll.spacer height: 20
|
|
93
128
|
scroll.h2 text: 'Chip'
|
|
94
129
|
scroll.spacer height: 10
|
|
95
130
|
scroll.chip \
|
|
96
131
|
styleClass: 'success',
|
|
132
|
+
icon: 'done',
|
|
97
133
|
text: 'Success',
|
|
98
134
|
tooltip: { text: 'Tooltip text' }
|
|
99
135
|
scroll.spacer height: 10
|
|
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/crypt/utils.rb
CHANGED
|
File without changes
|
data/lib/glib/crypt.rb
CHANGED
|
File without changes
|
|
File without changes
|
data/lib/glib/dynamic_text.rb
CHANGED
|
File without changes
|
data/lib/glib/engine.rb
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -51,6 +51,12 @@ module Glib
|
|
|
51
51
|
end
|
|
52
52
|
end
|
|
53
53
|
|
|
54
|
+
if (on_submit = view['onSubmit']) && !on_submit[:__executed_by_crawler]
|
|
55
|
+
on_submit[:__executed_by_crawler] = true
|
|
56
|
+
perform(on_submit)
|
|
57
|
+
return
|
|
58
|
+
end
|
|
59
|
+
|
|
54
60
|
case method
|
|
55
61
|
when :patch, :put
|
|
56
62
|
json = @http.patch url, action, params
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -67,6 +67,8 @@ module Glib
|
|
|
67
67
|
else
|
|
68
68
|
self.log action, params['url']
|
|
69
69
|
end
|
|
70
|
+
when 'dialogs/show-v1', 'dialogs/show', 'popovers/show-v1', 'popovers/show'
|
|
71
|
+
JsonCrawler::DialogsShow.new(http, params, action)
|
|
70
72
|
when 'sheets/select-v1', 'sheets/select'
|
|
71
73
|
JsonCrawler::Menu.new(http, params, action)
|
|
72
74
|
when 'http/post-v1', 'http/post'
|
data/lib/glib/json_crawler.rb
CHANGED
|
@@ -8,5 +8,6 @@ require_relative './json_crawler/action_crawlers/windows_open'
|
|
|
8
8
|
require_relative './json_crawler/action_crawlers/action_http'
|
|
9
9
|
require_relative './json_crawler/action_crawlers/forms_submit'
|
|
10
10
|
require_relative './json_crawler/action_crawlers/dialogs_alert'
|
|
11
|
+
require_relative './json_crawler/action_crawlers/dialogs_show'
|
|
11
12
|
require_relative './json_crawler/action_crawlers/menu'
|
|
12
13
|
require_relative './json_crawler/action_crawlers/run_multiple'
|
data/lib/glib/mailer_tester.rb
CHANGED
|
@@ -15,6 +15,7 @@ module Glib
|
|
|
15
15
|
preview_class.instance_methods(false).each do |mailer_method|
|
|
16
16
|
test "mailer for #{preview_class}##{mailer_method}" do
|
|
17
17
|
preview.send(mailer_method).deliver_now
|
|
18
|
+
Timecop.return # Allows mailer preview to use Timecop.freeze()
|
|
18
19
|
|
|
19
20
|
logfile = File.join(log_dir, "#{preview_class.name.underscore}##{mailer_method}.txt")
|
|
20
21
|
|
data/lib/glib/value.rb
CHANGED
|
File without changes
|
data/lib/glib/version.rb
CHANGED
|
File without changes
|
data/lib/glib-web.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: 3.
|
|
4
|
+
version: 3.19.1
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -297,6 +297,7 @@ files:
|
|
|
297
297
|
- lib/glib/json_crawler/action_crawler.rb
|
|
298
298
|
- lib/glib/json_crawler/action_crawlers/action_http.rb
|
|
299
299
|
- lib/glib/json_crawler/action_crawlers/dialogs_alert.rb
|
|
300
|
+
- lib/glib/json_crawler/action_crawlers/dialogs_show.rb
|
|
300
301
|
- lib/glib/json_crawler/action_crawlers/forms_submit.rb
|
|
301
302
|
- lib/glib/json_crawler/action_crawlers/menu.rb
|
|
302
303
|
- lib/glib/json_crawler/action_crawlers/nav_initiate.rb
|
|
@@ -328,7 +329,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
328
329
|
- !ruby/object:Gem::Version
|
|
329
330
|
version: '0'
|
|
330
331
|
requirements: []
|
|
331
|
-
|
|
332
|
+
rubyforge_project:
|
|
333
|
+
rubygems_version: 2.7.6
|
|
332
334
|
signing_key:
|
|
333
335
|
specification_version: 4
|
|
334
336
|
summary: ''
|