glib-web 0.13.0 → 0.14.2
Sign up to get free protection for your applications and to get access to all the features.
- 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/forms_helper.rb +0 -0
- data/app/helpers/glib/json_ui/abstract_builder.rb +31 -8
- data/app/helpers/glib/json_ui/action_builder/sheets.rb +0 -0
- data/app/helpers/glib/json_ui/action_builder/snackbars.rb +0 -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/menu_builder.rb +2 -2
- data/app/helpers/glib/json_ui/response_helper.rb +1 -1
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder.rb +10 -3
- data/app/helpers/glib/urls_helper.rb +0 -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/_nav_menu.json.jbuilder +2 -4
- data/app/views/json_ui/garage/actions/_dialogs.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_dialogs_show.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_panels.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_reload.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_sheets.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_snackbars.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_group.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/floating_submit.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/full_window_form.json.jbuilder +19 -0
- data/app/views/json_ui/garage/forms/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/index.json.jbuilder +5 -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/forms/submit_on_change.json.jbuilder +13 -1
- 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/flat_centered.json.jbuilder +0 -0
- data/app/views/json_ui/garage/pages/full_width.json.jbuilder +18 -18
- 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/tab_bar.json.jbuilder +15 -2
- 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/banners.json.jbuilder +2 -2
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/controls.json.jbuilder +12 -5
- data/app/views/json_ui/garage/views/icons.json.jbuilder +4 -0
- data/app/views/json_ui/garage/views/images.json.jbuilder +7 -6
- data/app/views/json_ui/garage/views/links.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/map_cluster_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/config/routes.rb +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/forms_submit.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/menu.rb +0 -0
- data/lib/glib/json_crawler/action_crawlers/nav_initiate.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.rb +0 -0
- data/lib/glib/mailer_tester.rb +0 -0
- data/lib/glib/value.rb +0 -0
- data/lib/glib/version.rb +0 -0
- data/lib/glib-web.rb +0 -0
- data/lib/tasks/db.rake +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: 0baa732034691c909ee78b5633077586e67f5b55f8618338c5da6d057c573223
|
4
|
+
data.tar.gz: 0e64bbf1a81a5a2a65616e9c49603b2f15cf3b02fa10c407d595e0ad533aa151
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 8a013f8cb0b04c3a25cbe5d24040ff1b3a15e8037c81b6ef5d10f1aec864860739a9e864482d937f12142e9917f0aea036cb3e6c4175d2367b1180736126534a
|
7
|
+
data.tar.gz: ac9da570bc331ff64d35ac2ce511f29ead17cdf1beab0b67b4cadbfc15c7c7b98e0429431ba2c4992a1b9d856bc98b575a727a3cd524bf2e4836fe04fd18e6dd
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -129,13 +129,7 @@ module Glib
|
|
129
129
|
|
130
130
|
def self.color(propName)
|
131
131
|
define_method(propName) do |value|
|
132
|
-
if (value = value
|
133
|
-
if !Rails.env.production?
|
134
|
-
if !value.match /^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i
|
135
|
-
raise "Invalid color: #{value}"
|
136
|
-
end
|
137
|
-
end
|
138
|
-
|
132
|
+
if (value = to_color(value))
|
139
133
|
json.set! propName, value
|
140
134
|
end
|
141
135
|
end
|
@@ -162,7 +156,7 @@ module Glib
|
|
162
156
|
|
163
157
|
def self.string(propName, options = {})
|
164
158
|
define_method(propName) do |value|
|
165
|
-
str = value
|
159
|
+
str = to_string(value)
|
166
160
|
instance_variable_set("@#{propName}", str) if options[:cache]
|
167
161
|
json.set! propName, str
|
168
162
|
end
|
@@ -264,6 +258,15 @@ module Glib
|
|
264
258
|
end
|
265
259
|
end
|
266
260
|
|
261
|
+
def self.badgeable
|
262
|
+
define_method(:badge) do |value|
|
263
|
+
json.badge do
|
264
|
+
json.text to_string(value[:text])
|
265
|
+
json.backgroundColor to_color(value[:backgroundColor])
|
266
|
+
end
|
267
|
+
end
|
268
|
+
end
|
269
|
+
|
267
270
|
def self.action(propName)
|
268
271
|
define_method(propName) do |value|
|
269
272
|
json.set!(propName) { value.call(page.action_builder) }
|
@@ -318,6 +321,26 @@ module Glib
|
|
318
321
|
# To be overridden
|
319
322
|
end
|
320
323
|
|
324
|
+
### Reusable value converters
|
325
|
+
|
326
|
+
def to_string(value)
|
327
|
+
value&.to_s
|
328
|
+
end
|
329
|
+
|
330
|
+
def to_color(value)
|
331
|
+
value = value&.to_s
|
332
|
+
|
333
|
+
if value
|
334
|
+
if !Rails.env.production?
|
335
|
+
if !value.match /^#([A-Fa-f0-9]{8}|[A-Fa-f0-9]{6}|[A-Fa-f0-9]{3})$/i
|
336
|
+
raise "Invalid color: #{value}"
|
337
|
+
end
|
338
|
+
end
|
339
|
+
end
|
340
|
+
|
341
|
+
value
|
342
|
+
end
|
343
|
+
|
321
344
|
end
|
322
345
|
end
|
323
346
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -39,12 +39,12 @@ module Glib
|
|
39
39
|
end
|
40
40
|
|
41
41
|
class Button < MenuItem
|
42
|
+
badgeable
|
43
|
+
|
42
44
|
string :text
|
43
45
|
icon :icon
|
44
46
|
action :onClick
|
45
47
|
bool :disabled
|
46
|
-
color :badgeColor
|
47
|
-
string :badgeContent
|
48
48
|
singleton_array :styleClass, :styleClasses
|
49
49
|
|
50
50
|
def childButtons(block)
|
@@ -22,7 +22,7 @@ module Glib
|
|
22
22
|
end
|
23
23
|
|
24
24
|
class Response
|
25
|
-
attr_reader :action_builder, :view_builder, :list_section_builder, :table_section_builder
|
25
|
+
attr_reader :action_builder, :view_builder, :list_section_builder, :table_section_builder, :current_form
|
26
26
|
|
27
27
|
def initialize(json, context, with_view_builder = false)
|
28
28
|
@json = json
|
File without changes
|
@@ -127,6 +127,8 @@ module Glib
|
|
127
127
|
end
|
128
128
|
|
129
129
|
class Image < View
|
130
|
+
badgeable
|
131
|
+
|
130
132
|
string :url
|
131
133
|
string :base64Data
|
132
134
|
action :onClick
|
@@ -134,12 +136,16 @@ module Glib
|
|
134
136
|
end
|
135
137
|
|
136
138
|
class Avatar < View
|
139
|
+
badgeable
|
140
|
+
|
137
141
|
int :size
|
138
142
|
string :url
|
139
143
|
action :onClick
|
140
144
|
end
|
141
145
|
|
142
146
|
class Icon < View
|
147
|
+
badgeable
|
148
|
+
|
143
149
|
# TODO: Remove later. Deprecated.
|
144
150
|
icon :spec
|
145
151
|
|
@@ -171,6 +177,8 @@ module Glib
|
|
171
177
|
# end
|
172
178
|
|
173
179
|
class Button < View
|
180
|
+
badgeable
|
181
|
+
|
174
182
|
icon :icon, cache: true
|
175
183
|
string :text, cache: true
|
176
184
|
action :onClick
|
@@ -207,11 +215,10 @@ module Glib
|
|
207
215
|
end
|
208
216
|
|
209
217
|
class Chip < View
|
218
|
+
badgeable
|
219
|
+
|
210
220
|
string :text
|
211
221
|
action :onClick
|
212
|
-
|
213
|
-
string :badgeContent
|
214
|
-
color :badgeColor
|
215
222
|
end
|
216
223
|
|
217
224
|
class Calendar < View
|
File without changes
|
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
|
@@ -52,13 +52,11 @@ if local_assigns[:top_nav] || json_ui_app_is_web?
|
|
52
52
|
action.windows_open url: json_ui_garage_url
|
53
53
|
end
|
54
54
|
|
55
|
-
menu.button icon: 'refresh', text: 'Reload', onClick: ->(action) do
|
55
|
+
menu.button icon: 'refresh', text: 'Reload', badge: { text: '!' }, onClick: ->(action) do
|
56
56
|
action.windows_reload
|
57
57
|
end
|
58
58
|
|
59
|
-
#
|
60
|
-
# menu.button icon: { name: 'zoom_in', badge: '!' }, text: 'Diagnostics', onClick: ->(action) do
|
61
|
-
menu.button icon: 'zoom_in', text: 'Diagnostics', badgeContent: '!', onClick: ->(action) do
|
59
|
+
menu.button icon: { name: 'zoom_in', badge: { text: '?', backgroundColor: '#00ffff' } }, text: 'Diagnostics', onClick: ->(action) do
|
62
60
|
action.dialogs_alert message: %{
|
63
61
|
Bundle ID: #{json_ui_app_bundle_id || '<unknown>'}
|
64
62
|
App Version: #{json_ui_app_build_version || '<unknown>'}
|
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
|
@@ -0,0 +1,19 @@
|
|
1
|
+
json.title 'Forms'
|
2
|
+
|
3
|
+
page = json_ui_page json
|
4
|
+
|
5
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
6
|
+
|
7
|
+
# The form will be automatically injected into the window.
|
8
|
+
#page.template 'full_window_form'
|
9
|
+
|
10
|
+
# TODO: This needs to produce page-level form attributes
|
11
|
+
page.form url: json_ui_garage_url(path: 'forms/basic_post'), method: 'post', padding: glib_json_padding_body, childViews: ->(form) do
|
12
|
+
# page.scroll padding: glib_json_padding_body, childViews: ->(form) do
|
13
|
+
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
|
14
|
+
form.fields_password name: 'user[password]', width: 'matchParent', label: 'Password'
|
15
|
+
end
|
16
|
+
|
17
|
+
page.footer padding: glib_json_padding_body, backgroundColor: '#b3bac2', childViews: ->(footer) do
|
18
|
+
footer.fields_submit text: 'Submit'
|
19
|
+
end
|
File without changes
|
@@ -91,6 +91,11 @@ page.list sections: [
|
|
91
91
|
action.windows_open url: json_ui_garage_url(path: 'forms/styled_boxes')
|
92
92
|
end
|
93
93
|
end
|
94
|
+
# section.rows builder: ->(template) do
|
95
|
+
# template.thumbnail title: 'Full Window', onClick: ->(action) do
|
96
|
+
# action.windows_open url: json_ui_garage_url(path: 'forms/full_window_form')
|
97
|
+
# end
|
98
|
+
# end
|
94
99
|
end, ->(section) do
|
95
100
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
96
101
|
header.h2 text: 'Web Only'
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -49,7 +49,7 @@ page.scroll childViews: ->(scroll) do
|
|
49
49
|
end
|
50
50
|
|
51
51
|
form.spacer height: 20
|
52
|
-
form.
|
52
|
+
form.h2 text: 'Radio Group'
|
53
53
|
form.fields_radioGroup \
|
54
54
|
name: 'user[seniority]',
|
55
55
|
value: 'show',
|
@@ -65,6 +65,18 @@ page.scroll childViews: ->(scroll) do
|
|
65
65
|
end
|
66
66
|
end
|
67
67
|
|
68
|
+
form.spacer height: 20
|
69
|
+
form.h2 text: 'Text'
|
70
|
+
form.fields_text \
|
71
|
+
name: 'user[video_url]',
|
72
|
+
width: 'matchParent',
|
73
|
+
onChange: ->(action) do
|
74
|
+
action.sheets_select message: 'Submit data?', buttons: ->(menu) do
|
75
|
+
menu.button text: 'Yes, submit', onClick: ->(subaction) do
|
76
|
+
action.forms_submit
|
77
|
+
end
|
78
|
+
end
|
79
|
+
end
|
68
80
|
end
|
69
81
|
|
70
82
|
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
|
@@ -1,29 +1,29 @@
|
|
1
1
|
json.title 'Pages'
|
2
2
|
|
3
|
-
json_ui_page json
|
4
|
-
render "#{@path_prefix}/nav_menu", json: json, page: page
|
3
|
+
page = json_ui_page json
|
5
4
|
|
6
|
-
|
5
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page
|
7
6
|
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
7
|
+
page.template 'fullWidth'
|
8
|
+
|
9
|
+
page.header childViews: ->(header) do
|
10
|
+
header.panels_vertical width: 'matchParent', styleClass: 'card', padding: glib_json_padding_body, childViews: ->(vertical) do
|
11
|
+
vertical.h1 text: 'Header'
|
13
12
|
end
|
13
|
+
header.spacer height: 10
|
14
|
+
end
|
14
15
|
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
end
|
16
|
+
page.footer childViews: ->(footer) do
|
17
|
+
footer.spacer height: 10
|
18
|
+
footer.panels_vertical width: 'matchParent', styleClass: 'card', padding: glib_json_padding_body, childViews: ->(vertical) do
|
19
|
+
vertical.h1 text: 'Footer'
|
20
20
|
end
|
21
|
+
end
|
21
22
|
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
end
|
23
|
+
page.body childViews: ->(scroll) do
|
24
|
+
scroll.panels_vertical width: 'matchParent', styleClass: 'card', padding: glib_json_padding_body, childViews: ->(vertical) do
|
25
|
+
(1..100).each do |index|
|
26
|
+
vertical.label text: 'Content'
|
27
27
|
end
|
28
28
|
end
|
29
29
|
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -7,6 +7,20 @@ json_ui_page json do |page|
|
|
7
7
|
scroll.panels_column lg: { cols: 8 }, childViews: ->(column) do
|
8
8
|
column.h2 text: 'Tab Bar with Badge'
|
9
9
|
column.tabBar buttons: ->(menu) do
|
10
|
+
badges = [
|
11
|
+
{
|
12
|
+
text: nil,
|
13
|
+
backgroundColor: nil
|
14
|
+
},
|
15
|
+
{
|
16
|
+
text: 8,
|
17
|
+
backgroundColor: '#272551'
|
18
|
+
},
|
19
|
+
{
|
20
|
+
text: '⭐⭐⭐',
|
21
|
+
backgroundColor: '#008000'
|
22
|
+
}
|
23
|
+
]
|
10
24
|
{
|
11
25
|
'FIRST' => 'home',
|
12
26
|
'SECOND' => 'schedule',
|
@@ -15,8 +29,7 @@ json_ui_page json do |page|
|
|
15
29
|
menu.button \
|
16
30
|
icon: icon,
|
17
31
|
text: text,
|
18
|
-
|
19
|
-
badgeColor: [nil, '#272551', '#008000'][index],
|
32
|
+
badge: badges[index],
|
20
33
|
disabled: params[:tab].to_i == index,
|
21
34
|
onClick: ->(action) do
|
22
35
|
action.windows_reload \
|
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
|
@@ -19,7 +19,7 @@ json_ui_page json do |page|
|
|
19
19
|
scroll.h2 text: 'With select options'
|
20
20
|
scroll.spacer height: 6
|
21
21
|
scroll.banners_select width: 'matchParent', icon: 'info', message: 'This is a select banner', buttons: ->(menu) do
|
22
|
-
menu.button icon: 'add', text: 'Add',
|
22
|
+
menu.button icon: 'add', text: 'Add', badge: { text: 80 }, onClick: ->(action) do
|
23
23
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
24
24
|
end
|
25
25
|
menu.button icon: 'edit', text: 'Edit', onClick: ->(action) do
|
@@ -33,7 +33,7 @@ json_ui_page json do |page|
|
|
33
33
|
submenu.button \
|
34
34
|
icon: 'add',
|
35
35
|
text: 'Option1',
|
36
|
-
|
36
|
+
badge: { text: 3 },
|
37
37
|
onClick: ->(action) do
|
38
38
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
39
39
|
end
|
File without changes
|
@@ -11,13 +11,20 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
11
11
|
action.dialogs_alert message: 'Perform action'
|
12
12
|
end
|
13
13
|
|
14
|
-
scroll.
|
14
|
+
scroll.spacer height: 10
|
15
|
+
scroll.button text: 'Button with built-in classes', styleClasses: ['rounded', 'outlined', 'tile', 'depressed'], onClick: ->(action) do
|
15
16
|
action.dialogs_alert message: 'Perform action'
|
16
17
|
end
|
17
18
|
|
18
|
-
scroll.
|
19
|
-
|
20
|
-
|
19
|
+
scroll.spacer height: 10
|
20
|
+
scroll.button \
|
21
|
+
icon: 'info',
|
22
|
+
text: 'Button with Icon and Tooltip',
|
23
|
+
tooltip: { text: 'Tooltip text' },
|
24
|
+
badge: { text: '3' },
|
25
|
+
onClick: ->(action) do
|
26
|
+
action.dialogs_alert message: 'Perform action'
|
27
|
+
end
|
21
28
|
scroll.spacer height: 20
|
22
29
|
|
23
30
|
scroll.button \
|
@@ -38,7 +45,7 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
38
45
|
action.dialogs_alert message: 'Perform action'
|
39
46
|
end
|
40
47
|
scroll.spacer height: 10
|
41
|
-
scroll.chip text: 'With Badge',
|
48
|
+
scroll.chip text: 'With Badge', badge: { text: '99' }
|
42
49
|
|
43
50
|
scroll.spacer height: 20
|
44
51
|
scroll.h2 text: 'Switch'
|
@@ -12,4 +12,8 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
12
12
|
scroll.h2 text: 'Icon with color'
|
13
13
|
scroll.icon name: 'home', color: '#9370DB'
|
14
14
|
scroll.icon name: 'home', color: '#9370DB80'
|
15
|
+
|
16
|
+
scroll.spacer height: 20
|
17
|
+
scroll.h2 text: 'Icon with badge'
|
18
|
+
scroll.icon name: 'home', badge: { text: '22', backgroundColor: '#00ff00' }
|
15
19
|
end
|
@@ -13,10 +13,11 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
13
13
|
url: glib_json_image_avatar_url,
|
14
14
|
tooltip: { text: 'This is a tooltip' }
|
15
15
|
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
16
|
+
scroll.h2 text: 'Avatar with badge'
|
17
|
+
scroll.spacer height: 6
|
18
|
+
scroll.avatar \
|
19
|
+
url: glib_json_image_avatar_url,
|
20
|
+
badge: { text: '1', backgroundColor: '#0000ff' }
|
20
21
|
|
21
22
|
scroll.spacer height: 20
|
22
23
|
scroll.h2 text: 'Image with base64 data'
|
@@ -46,9 +47,9 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
46
47
|
scroll.image url: glib_json_image_standard_url
|
47
48
|
|
48
49
|
scroll.spacer height: 20
|
49
|
-
scroll.h2 text: 'Original size'
|
50
|
+
scroll.h2 text: 'Original size with badge'
|
50
51
|
scroll.spacer height: 6
|
51
|
-
scroll.image url: small_image_url
|
52
|
+
scroll.image url: small_image_url, badge: { text: '1', backgroundColor: '#0000ff' }
|
52
53
|
|
53
54
|
# Reference: https://docs.imgix.com/apis/url/size/fit#clip
|
54
55
|
scroll.spacer height: 20
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/config/routes.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/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
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/lib/glib/json_crawler.rb
CHANGED
File without changes
|
data/lib/glib/mailer_tester.rb
CHANGED
File without changes
|
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
|
data/lib/tasks/db.rake
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: 0.
|
4
|
+
version: 0.14.2
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -153,6 +153,7 @@ files:
|
|
153
153
|
- app/views/json_ui/garage/forms/dynamic_select_data.json.jbuilder
|
154
154
|
- app/views/json_ui/garage/forms/file_upload.json.jbuilder
|
155
155
|
- app/views/json_ui/garage/forms/floating_submit.json.jbuilder
|
156
|
+
- app/views/json_ui/garage/forms/full_window_form.json.jbuilder
|
156
157
|
- app/views/json_ui/garage/forms/generic_post.json.jbuilder
|
157
158
|
- app/views/json_ui/garage/forms/index.json.jbuilder
|
158
159
|
- app/views/json_ui/garage/forms/local_request.json.jbuilder
|
@@ -300,7 +301,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
300
301
|
- !ruby/object:Gem::Version
|
301
302
|
version: '0'
|
302
303
|
requirements: []
|
303
|
-
|
304
|
+
rubyforge_project:
|
305
|
+
rubygems_version: 2.7.6
|
304
306
|
signing_key:
|
305
307
|
specification_version: 4
|
306
308
|
summary: ''
|