glib-web 0.11.1 → 0.11.8
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_images_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/action_builder/http.rb +0 -0
- 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/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -6
- data/app/helpers/glib/json_ui/view_builder/panels.rb +0 -10
- 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/actions/_dialogs.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_http.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/basic.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/basic_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/generic_post.json.jbuilder +0 -0
- data/app/views/json_ui/garage/forms/get_request.json.jbuilder +1 -1
- 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 +44 -2
- 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 +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/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/index.json.jbuilder +0 -3
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/responsive.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/vertical.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/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 +3 -4
- data/app/views/json_ui/garage/panels/_timeline_content.json.jbuilder +0 -24
- data/app/views/json_ui/garage/panels/timeline.json.jbuilder +0 -70
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA256:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: 7cd15bf3fd097051be173b2902213156338df3950b115ff0aa99849d88359aa2
|
|
4
|
+
data.tar.gz: 3a6cf180833d226aa5f06e0fb7fa7672b6b89b4d6baa2936a180a1f8b5d260af
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: a04352865668b8bfa4a84365f553a8c4ecc19bfb148511072d2c3cb722c6db10eed605dcd0318c20e2a52bb1c180a5322c42a7ba97d4b069b4e2b2d8a1816ca8
|
|
7
|
+
data.tar.gz: 100274a1840bd282bec052edc043d1b57c70237b0ebc16c1c4bbb74aef9b175cb1f87162e8cbe6b493eb275b71258af74a8ab2ff7320bac99110a255ef9bf189
|
|
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
|
|
@@ -4,8 +4,9 @@ class Glib::JsonUi::ViewBuilder
|
|
|
4
4
|
class AbstractField < View
|
|
5
5
|
bool :readOnly
|
|
6
6
|
hash :validation
|
|
7
|
-
bool :submitOnChange
|
|
7
|
+
# bool :submitOnChange
|
|
8
8
|
bool :disableDirtyCheck
|
|
9
|
+
action :onChange
|
|
9
10
|
|
|
10
11
|
def label(label)
|
|
11
12
|
@label = label
|
|
@@ -127,7 +128,6 @@ class Glib::JsonUi::ViewBuilder
|
|
|
127
128
|
string :offIcon
|
|
128
129
|
string :onLabel
|
|
129
130
|
|
|
130
|
-
|
|
131
131
|
def value(value)
|
|
132
132
|
@value = value if value != Glib::Value::DEFAULT
|
|
133
133
|
end
|
|
@@ -200,7 +200,6 @@ class Glib::JsonUi::ViewBuilder
|
|
|
200
200
|
# string :name
|
|
201
201
|
# string :value
|
|
202
202
|
views :childViews
|
|
203
|
-
bool :row
|
|
204
203
|
|
|
205
204
|
# Override
|
|
206
205
|
def value(value)
|
|
@@ -216,9 +215,6 @@ class Glib::JsonUi::ViewBuilder
|
|
|
216
215
|
class Radio < View
|
|
217
216
|
string :label
|
|
218
217
|
string :value
|
|
219
|
-
action :onClick
|
|
220
|
-
string :offIcon
|
|
221
|
-
string :onIcon
|
|
222
218
|
end
|
|
223
219
|
|
|
224
220
|
class File < Text
|
|
@@ -144,16 +144,6 @@ class Glib::JsonUi::ViewBuilder
|
|
|
144
144
|
end
|
|
145
145
|
end
|
|
146
146
|
|
|
147
|
-
class Timeline < View
|
|
148
|
-
color :completedColor
|
|
149
|
-
color :uncompletedColor
|
|
150
|
-
singleton_array :styleClass, :styleClasses
|
|
151
|
-
string :uncompletedIcon
|
|
152
|
-
string :completedIcon
|
|
153
|
-
array :items
|
|
154
|
-
views :childViews
|
|
155
|
-
end
|
|
156
|
-
|
|
157
147
|
class Table < View
|
|
158
148
|
hash :nextPage
|
|
159
149
|
hash :export
|
|
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
|
|
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
|
|
@@ -13,7 +13,7 @@ page.form url: json_ui_garage_url(path: 'forms/get_request'), method: 'get', pad
|
|
|
13
13
|
form.spacer height: 6
|
|
14
14
|
form.label text: 'On the web, upon submit, URL needs to change on the browser'
|
|
15
15
|
form.spacer height: 10
|
|
16
|
-
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name'
|
|
16
|
+
form.fields_text name: 'user[name]', width: 'matchParent', label: 'Name', disableDirtyCheck: true
|
|
17
17
|
|
|
18
18
|
# form.panels_split width: 'matchParent', rightViews: ->(split) do
|
|
19
19
|
# split.button text: 'Submit', onClick: ->(action) { action.forms_submit }
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
@@ -17,12 +17,54 @@ page.scroll childViews: ->(scroll) do
|
|
|
17
17
|
checkValue: '16+',
|
|
18
18
|
uncheckValue: '0-16',
|
|
19
19
|
label: 'I am over 16 (has default value)',
|
|
20
|
-
|
|
20
|
+
onChange: ->(action) do
|
|
21
|
+
action.forms_submit
|
|
22
|
+
end
|
|
23
|
+
|
|
21
24
|
form.fields_check \
|
|
22
25
|
name: 'user[employer]',
|
|
23
26
|
checkValue: 1,
|
|
24
27
|
label: 'I am an employer (no default value)',
|
|
25
|
-
|
|
28
|
+
onChange: ->(action) do
|
|
29
|
+
action.dialogs_alert message: 'The form will be submitted when the dialog is closed', onClose: ->(subaction) do
|
|
30
|
+
action.forms_submit
|
|
31
|
+
end
|
|
32
|
+
end
|
|
33
|
+
|
|
34
|
+
form.spacer height: 20
|
|
35
|
+
form.h2 text: 'Select Field'
|
|
36
|
+
options = ['male', 'female'].map { |i| { text: i.humanize, value: i } }
|
|
37
|
+
form.fields_select \
|
|
38
|
+
name: 'user[gender]',
|
|
39
|
+
width: 'matchParent',
|
|
40
|
+
label: 'Gender',
|
|
41
|
+
validation: { required: { message: 'Required' } },
|
|
42
|
+
options: options,
|
|
43
|
+
onChange: ->(action) do
|
|
44
|
+
action.snackbars_select message: 'Submit data?', buttons: ->(menu) do
|
|
45
|
+
menu.button text: 'Yes, submit', onClick: ->(subaction) do
|
|
46
|
+
action.forms_submit
|
|
47
|
+
end
|
|
48
|
+
end
|
|
49
|
+
end
|
|
50
|
+
|
|
51
|
+
form.spacer height: 20
|
|
52
|
+
form.h1 text: 'Radio Group'
|
|
53
|
+
form.fields_radioGroup \
|
|
54
|
+
name: 'user[seniority]',
|
|
55
|
+
value: 'show',
|
|
56
|
+
childViews: ->(group) do
|
|
57
|
+
group.fields_radio value: 'senior', label: 'Senior'
|
|
58
|
+
group.fields_radio value: 'junior', label: 'Junior'
|
|
59
|
+
end,
|
|
60
|
+
onChange: ->(action) do
|
|
61
|
+
action.sheets_select message: 'Submit data?', buttons: ->(menu) do
|
|
62
|
+
menu.button text: 'Yes, submit', onClick: ->(subaction) do
|
|
63
|
+
action.forms_submit
|
|
64
|
+
end
|
|
65
|
+
end
|
|
66
|
+
end
|
|
67
|
+
|
|
26
68
|
end
|
|
27
69
|
|
|
28
70
|
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
|
|
@@ -30,9 +30,6 @@ json_ui_page json do |page|
|
|
|
30
30
|
template.thumbnail title: 'Unordered List', subtitle: 'Bullet points similar to HTML\'s <ul> tag', onClick: ->(action) do
|
|
31
31
|
action.windows_open url: json_ui_garage_url(path: 'panels/ul')
|
|
32
32
|
end
|
|
33
|
-
template.thumbnail title: 'Timeline', subtitle: 'Timeline component with responsive panel as the childviews', onClick: ->(action) do
|
|
34
|
-
action.windows_open url: json_ui_garage_url(path: 'panels/timeline')
|
|
35
|
-
end
|
|
36
33
|
end
|
|
37
34
|
end, ->(section) do
|
|
38
35
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
|
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
|
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.11.
|
|
4
|
+
version: 0.11.8
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- ''
|
|
@@ -201,7 +201,6 @@ files:
|
|
|
201
201
|
- app/views/json_ui/garage/pages/tab_bar.json.jbuilder
|
|
202
202
|
- app/views/json_ui/garage/panels/_hover_views_content.json.jbuilder
|
|
203
203
|
- app/views/json_ui/garage/panels/_styled.json.jbuilder
|
|
204
|
-
- app/views/json_ui/garage/panels/_timeline_content.json.jbuilder
|
|
205
204
|
- app/views/json_ui/garage/panels/card.json.jbuilder
|
|
206
205
|
- app/views/json_ui/garage/panels/carousel.json.jbuilder
|
|
207
206
|
- app/views/json_ui/garage/panels/custom.json.jbuilder
|
|
@@ -213,7 +212,6 @@ files:
|
|
|
213
212
|
- app/views/json_ui/garage/panels/outlined.json.jbuilder
|
|
214
213
|
- app/views/json_ui/garage/panels/responsive.json.jbuilder
|
|
215
214
|
- app/views/json_ui/garage/panels/split.json.jbuilder
|
|
216
|
-
- app/views/json_ui/garage/panels/timeline.json.jbuilder
|
|
217
215
|
- app/views/json_ui/garage/panels/ul.json.jbuilder
|
|
218
216
|
- app/views/json_ui/garage/panels/vertical.json.jbuilder
|
|
219
217
|
- app/views/json_ui/garage/panels/web.json.jbuilder
|
|
@@ -296,7 +294,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
296
294
|
- !ruby/object:Gem::Version
|
|
297
295
|
version: '0'
|
|
298
296
|
requirements: []
|
|
299
|
-
|
|
297
|
+
rubyforge_project:
|
|
298
|
+
rubygems_version: 2.7.6
|
|
300
299
|
signing_key:
|
|
301
300
|
specification_version: 4
|
|
302
301
|
summary: ''
|
|
@@ -1,24 +0,0 @@
|
|
|
1
|
-
progress = params[:progress]&.to_i&.between?(0, 5) ? params[:progress].to_i : 0
|
|
2
|
-
|
|
3
|
-
tview.panels_responsive \
|
|
4
|
-
width: 400,
|
|
5
|
-
childViews: ->(res) do
|
|
6
|
-
res.panels_column sm: { cols: 11 }, childViews: ->(subcolumn) do
|
|
7
|
-
subcolumn.panels_column sm: { cols: 2, padding: { right: 10 } }, childViews: ->(inner_column) do
|
|
8
|
-
inner_column.spacer height: 10
|
|
9
|
-
inner_column.progressBar value: progress/5.to_f, height: 5, styleClass: 'no-text'
|
|
10
|
-
inner_column.spacer height: 10
|
|
11
|
-
end
|
|
12
|
-
subcolumn.panels_column sm: { cols: 9 }, childViews: ->(inner_column) do
|
|
13
|
-
inner_column.h4 \
|
|
14
|
-
text: "Progress #{progress}/5"
|
|
15
|
-
end
|
|
16
|
-
subcolumn.p text: 'Lorem ipsum dolor sit amet, consectetur adipiscing elit.'
|
|
17
|
-
end
|
|
18
|
-
res.panels_column sm: { cols: 1 }, childViews: ->(subcolumn) do
|
|
19
|
-
subcolumn.icon name: 'add', size: 50
|
|
20
|
-
end
|
|
21
|
-
end, onClick: ->(action) do
|
|
22
|
-
action.windows_reload url: json_ui_garage_url(path: 'panels/timeline', progress: progress + 1)
|
|
23
|
-
end
|
|
24
|
-
tview.spacer height: 12
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
json.title 'Timeline Panels'
|
|
2
|
-
|
|
3
|
-
page = json_ui_page json
|
|
4
|
-
render "#{@path_prefix}/nav_menu", json: json, page: page
|
|
5
|
-
|
|
6
|
-
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
7
|
-
scroll.h2 text: 'Basic timeline'
|
|
8
|
-
scroll.spacer height: 8
|
|
9
|
-
|
|
10
|
-
timeline_items = [
|
|
11
|
-
{ name: :submitted, label: 'Order submitted' },
|
|
12
|
-
{ name: :finding, label: 'Finding you a driver' },
|
|
13
|
-
{ name: :driver_assigned, label: 'Driver found, picking you up..' },
|
|
14
|
-
{ name: :otw, label: 'On the way' },
|
|
15
|
-
{ name: :arrived, label: 'Arrived' }
|
|
16
|
-
]
|
|
17
|
-
|
|
18
|
-
# Defining active or completed item
|
|
19
|
-
active_name = :driver_assigned
|
|
20
|
-
timeline_items.each_with_index do |h, i|
|
|
21
|
-
if h[:name] == active_name
|
|
22
|
-
h[:active] = true
|
|
23
|
-
break
|
|
24
|
-
else
|
|
25
|
-
h[:completed] = true
|
|
26
|
-
end
|
|
27
|
-
end
|
|
28
|
-
|
|
29
|
-
scroll.panels_timeline items: timeline_items
|
|
30
|
-
scroll.spacer height: 32
|
|
31
|
-
|
|
32
|
-
custom_completed_item = {
|
|
33
|
-
name: :custom,
|
|
34
|
-
label: 'Completed item with a custom icon',
|
|
35
|
-
completed: true,
|
|
36
|
-
uncompletedIcon: 'place',
|
|
37
|
-
completedIcon: 'place'
|
|
38
|
-
}
|
|
39
|
-
custom_uncompleted_item = {
|
|
40
|
-
name: :custom,
|
|
41
|
-
label: 'Uncompleted item with a custom icon',
|
|
42
|
-
uncompletedIcon: 'flag',
|
|
43
|
-
completedIcon: 'flag'
|
|
44
|
-
}
|
|
45
|
-
scroll.h2 text: 'Timeline with outlined dots, custom icons and custom colors'
|
|
46
|
-
scroll.spacer height: 8
|
|
47
|
-
scroll.panels_timeline \
|
|
48
|
-
items: [custom_completed_item] + timeline_items + [custom_uncompleted_item],
|
|
49
|
-
completedColor: '#4BB543',
|
|
50
|
-
uncompletedColor: '#FFA500',
|
|
51
|
-
styleClasses: ['outlined'],
|
|
52
|
-
completedIcon: 'check',
|
|
53
|
-
uncompletedIcon: 'hourglass_empty'
|
|
54
|
-
scroll.spacer height: 32
|
|
55
|
-
|
|
56
|
-
scroll.h2 text: 'Timeline with childViews'
|
|
57
|
-
scroll.panels_timeline \
|
|
58
|
-
items: timeline_items,
|
|
59
|
-
childViews: ->(tview) do
|
|
60
|
-
tview.spacer height: 16
|
|
61
|
-
render 'json_ui/garage/panels/timeline_content', tview: tview
|
|
62
|
-
tview.spacer height: 16
|
|
63
|
-
|
|
64
|
-
tview.button text: 'Reset', onClick: ->(action) do
|
|
65
|
-
action.windows_reload url: json_ui_garage_url(path: 'panels/timeline')
|
|
66
|
-
end
|
|
67
|
-
tview.spacer height: 16
|
|
68
|
-
end
|
|
69
|
-
scroll.spacer height: 32
|
|
70
|
-
end
|