glib-web 3.0.1 → 3.0.3
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/action_builder/dialogs.rb +1 -0
- data/app/helpers/glib/json_ui/action_builder/popovers.rb +3 -1
- 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 +29 -0
- data/app/helpers/glib/json_ui/generic_builders.rb +0 -0
- data/app/helpers/glib/json_ui/list_builders.rb +3 -1
- data/app/helpers/glib/json_ui/menu_builder.rb +3 -30
- data/app/helpers/glib/json_ui/table_builders.rb +0 -0
- data/app/helpers/glib/json_ui/view_builder/banners.rb +2 -0
- data/app/helpers/glib/json_ui/view_builder/charts.rb +21 -21
- data/app/helpers/glib/json_ui/view_builder/panels.rb +1 -0
- data/app/helpers/glib/json_ui/view_builder.rb +3 -4
- 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/_list.json.jbuilder +23 -0
- data/app/views/json_ui/garage/actions/_panels.json.jbuilder +0 -0
- data/app/views/json_ui/garage/actions/_reload.json.jbuilder +5 -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/actions/index.json.jbuilder +3 -23
- data/app/views/json_ui/garage/actions/partial_update.json.jbuilder +5 -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/styled_boxes.json.jbuilder +40 -27
- 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_section.json.jbuilder +1 -1
- 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/edit_actions.json.jbuilder +19 -12
- data/app/views/json_ui/garage/lists/fab.json.jbuilder +0 -0
- data/app/views/json_ui/garage/lists/reordering.json.jbuilder +1 -1
- 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/horizontal.json.jbuilder +15 -10
- data/app/views/json_ui/garage/panels/index.json.jbuilder +3 -3
- data/app/views/json_ui/garage/panels/outlined.json.jbuilder +0 -0
- data/app/views/json_ui/garage/panels/timeline.json.jbuilder +2 -2
- 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 +42 -22
- data/app/views/json_ui/garage/views/calendar_data.json.jbuilder +0 -0
- data/app/views/json_ui/garage/views/charts.json.jbuilder +25 -15
- data/app/views/json_ui/garage/views/controls.json.jbuilder +36 -27
- data/app/views/json_ui/garage/views/index.json.jbuilder +2 -1
- 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/json_ui/garage/views/shareButton.json.jbuilder +10 -0
- data/app/views/json_ui/garage/views/steppers.json.jbuilder +40 -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/dialogs_alert.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/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 +7 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 7420379e631fafe18169bae65ecf81be22f06c856ac916e2c2ca41c55a4bfa08
|
4
|
+
data.tar.gz: '011939313dda8a3ab48b13e952dc54d5b21dd5e219e0325acde5fc2fc584e271'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1c4af7e316304a28f56dcf0b027a7028df029bd70c022523d4ab58c80472532616ff9c931a1c018502786b4940e2065d3f6b5922927f069fdbc46c43e09b9c26
|
7
|
+
data.tar.gz: 8e8df0ebbd89629378fcf9b051a47f718bb4beb8cd3a5c1fcce5603af4f0d284c7ad95ce8e7ab0884241d9531536f6699814c12636cd4ce7ec4128c24d59c63b
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,29 @@
|
|
1
|
+
module Glib
|
2
|
+
module JsonUi
|
3
|
+
module Builder::MouseEvents
|
4
|
+
extend ActiveSupport::Concern
|
5
|
+
|
6
|
+
included do
|
7
|
+
action :onMouseEnter
|
8
|
+
action :onMouseLeave
|
9
|
+
end
|
10
|
+
|
11
|
+
def tooltip(options)
|
12
|
+
key = "tooltip_#{SecureRandom.uuid}"
|
13
|
+
onMouseEnter ->(action) do
|
14
|
+
action.popovers_open(
|
15
|
+
key: key,
|
16
|
+
placement: options[:placement] || 'top',
|
17
|
+
childViews: ->(view) {
|
18
|
+
view.p styleClass: 'tooltip', text: options[:text]
|
19
|
+
}
|
20
|
+
)
|
21
|
+
end
|
22
|
+
|
23
|
+
onMouseLeave ->(action) do
|
24
|
+
action.popovers_close key: key
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
28
|
+
end
|
29
|
+
end
|
File without changes
|
@@ -6,36 +6,9 @@ module Glib
|
|
6
6
|
end
|
7
7
|
|
8
8
|
class MenuItem < JsonUiElement
|
9
|
-
|
10
|
-
|
11
|
-
# def initialize(json, page)
|
12
|
-
# super(json, page)
|
13
|
-
|
14
|
-
# # Can be improved by making it configurable site-wide.
|
15
|
-
# @analyticsEnabled = true
|
16
|
-
# end
|
9
|
+
include Builder::MouseEvents
|
17
10
|
|
18
|
-
|
19
|
-
# if value.is_a?(Hash)
|
20
|
-
# @analyticsEnabled = true
|
21
|
-
# @analyticsId = value
|
22
|
-
# else
|
23
|
-
# @analyticsEnabled = value == true
|
24
|
-
# end
|
25
|
-
# end
|
26
|
-
|
27
|
-
# # Override
|
28
|
-
# def created
|
29
|
-
# json.analytics do
|
30
|
-
# if @analyticsEnabled
|
31
|
-
# if @analyticsId
|
32
|
-
# json.placement @analyticsId
|
33
|
-
# end
|
34
|
-
# else
|
35
|
-
# json.disabled true
|
36
|
-
# end
|
37
|
-
# end
|
38
|
-
# end
|
11
|
+
hash :analytics
|
39
12
|
end
|
40
13
|
|
41
14
|
class Button < MenuItem
|
@@ -45,7 +18,7 @@ module Glib
|
|
45
18
|
icon :icon
|
46
19
|
action :onClick
|
47
20
|
bool :disabled
|
48
|
-
hash :tooltip
|
21
|
+
# hash :tooltip
|
49
22
|
singleton_array :styleClass, :styleClasses
|
50
23
|
|
51
24
|
def childButtons(block)
|
File without changes
|
@@ -3,6 +3,7 @@ class Glib::JsonUi::ViewBuilder
|
|
3
3
|
|
4
4
|
class Alert < View
|
5
5
|
icon :icon
|
6
|
+
string :title
|
6
7
|
string :message
|
7
8
|
# string :message_format
|
8
9
|
singleton_array :styleClass, :styleClasses
|
@@ -11,6 +12,7 @@ class Glib::JsonUi::ViewBuilder
|
|
11
12
|
class Select < View
|
12
13
|
string :id
|
13
14
|
icon :icon
|
15
|
+
string :title
|
14
16
|
string :message
|
15
17
|
singleton_array :styleClass, :styleClasses
|
16
18
|
color :color
|
@@ -12,11 +12,7 @@ class Glib::JsonUi::ViewBuilder
|
|
12
12
|
end
|
13
13
|
end
|
14
14
|
|
15
|
-
|
16
|
-
include ReleaseDateIndicator
|
17
|
-
|
18
|
-
hash :nextPage
|
19
|
-
|
15
|
+
module Series
|
20
16
|
def dataSeries(blocks)
|
21
17
|
json.dataSeries do
|
22
18
|
blocks.each do |block|
|
@@ -27,13 +23,6 @@ class Glib::JsonUi::ViewBuilder
|
|
27
23
|
end
|
28
24
|
end
|
29
25
|
|
30
|
-
end
|
31
|
-
|
32
|
-
class Column < View
|
33
|
-
include ReleaseDateIndicator
|
34
|
-
|
35
|
-
bool :stacked
|
36
|
-
|
37
26
|
def dataGroups(blocks)
|
38
27
|
json.dataGroups do
|
39
28
|
blocks.each do |block|
|
@@ -45,16 +34,27 @@ class Glib::JsonUi::ViewBuilder
|
|
45
34
|
end
|
46
35
|
end
|
47
36
|
|
37
|
+
class Line < View
|
38
|
+
include Series
|
39
|
+
|
40
|
+
# idea for the future
|
41
|
+
# hash :nextPage
|
42
|
+
end
|
43
|
+
|
44
|
+
class Column < View
|
45
|
+
include Series
|
46
|
+
|
47
|
+
bool :stacked
|
48
|
+
end
|
49
|
+
|
48
50
|
class Pie < View
|
49
|
-
|
50
|
-
|
51
|
-
blocks.each do |block|
|
52
|
-
json.child! do
|
53
|
-
block.call
|
54
|
-
end
|
55
|
-
end
|
56
|
-
end
|
57
|
-
end
|
51
|
+
include Series
|
52
|
+
|
58
53
|
end
|
54
|
+
|
55
|
+
class Area < View
|
56
|
+
include Series
|
57
|
+
end
|
58
|
+
|
59
59
|
end
|
60
60
|
end
|
@@ -32,6 +32,8 @@ module Glib
|
|
32
32
|
end
|
33
33
|
|
34
34
|
class View < JsonUiElement
|
35
|
+
include Builder::MouseEvents
|
36
|
+
|
35
37
|
string :id
|
36
38
|
length :width
|
37
39
|
length :height
|
@@ -41,12 +43,9 @@ module Glib
|
|
41
43
|
hash :showIf
|
42
44
|
hash :valueIf
|
43
45
|
hash :analytics
|
44
|
-
hash :tooltip
|
46
|
+
# hash :tooltip
|
45
47
|
array :extensions
|
46
48
|
|
47
|
-
action :onMouseEnter
|
48
|
-
action :onMouseLeave
|
49
|
-
|
50
49
|
|
51
50
|
# def initialize(json, page)
|
52
51
|
# super(json, page)
|
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
|
@@ -0,0 +1,23 @@
|
|
1
|
+
panel.panels_list id: 'action_list', sections: [
|
2
|
+
->(section) do
|
3
|
+
render "#{@path_prefix}/actions/reload", section: section
|
4
|
+
end, ->(section) do
|
5
|
+
render "#{@path_prefix}/actions/panels", section: section
|
6
|
+
end, ->(section) do
|
7
|
+
render "#{@path_prefix}/actions/dialogs", section: section
|
8
|
+
end, ->(section) do
|
9
|
+
render "#{@path_prefix}/actions/snackbars", section: section
|
10
|
+
end, ->(section) do
|
11
|
+
render "#{@path_prefix}/actions/sheets", section: section
|
12
|
+
end, ->(section) do
|
13
|
+
render "#{@path_prefix}/actions/windows", section: section
|
14
|
+
end, ->(section) do
|
15
|
+
render "#{@path_prefix}/actions/timeouts", section: section
|
16
|
+
end, ->(section) do
|
17
|
+
render "#{@path_prefix}/actions/http", section: section
|
18
|
+
end, ->(section) do
|
19
|
+
render "#{@path_prefix}/actions/commands", section: section
|
20
|
+
end, ->(section) do
|
21
|
+
render "#{@path_prefix}/actions/tours", section: section
|
22
|
+
end
|
23
|
+
]
|
File without changes
|
@@ -11,7 +11,12 @@ section.rows builder: ->(template) do
|
|
11
11
|
|
12
12
|
reload_counter = params[:reload_counter].to_i
|
13
13
|
reload_counter = 0 if reload_counter > 5
|
14
|
+
|
14
15
|
template.thumbnail title: "windows/reload with URL (counter: #{reload_counter})", onClick: ->(action) do
|
15
16
|
action.windows_reload url: json_ui_garage_url(path: 'actions/index', reload_counter: reload_counter + 1)
|
16
17
|
end
|
18
|
+
|
19
|
+
template.thumbnail title: "components/update (counter: #{reload_counter})", onClick: ->(action) do
|
20
|
+
action.http_get url: json_ui_garage_url(path: 'actions/partial_update', reload_counter: reload_counter + 1)
|
21
|
+
end
|
17
22
|
end
|
File without changes
|
File without changes
|
@@ -3,26 +3,6 @@ json.title 'Actions'
|
|
3
3
|
page = json_ui_page json
|
4
4
|
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: true
|
5
5
|
|
6
|
-
page.
|
7
|
-
|
8
|
-
|
9
|
-
end, ->(section) do
|
10
|
-
render "#{@path_prefix}/actions/panels", section: section
|
11
|
-
end, ->(section) do
|
12
|
-
render "#{@path_prefix}/actions/dialogs", section: section
|
13
|
-
end, ->(section) do
|
14
|
-
render "#{@path_prefix}/actions/snackbars", section: section
|
15
|
-
end, ->(section) do
|
16
|
-
render "#{@path_prefix}/actions/sheets", section: section
|
17
|
-
end, ->(section) do
|
18
|
-
render "#{@path_prefix}/actions/windows", section: section
|
19
|
-
end, ->(section) do
|
20
|
-
render "#{@path_prefix}/actions/timeouts", section: section
|
21
|
-
end, ->(section) do
|
22
|
-
render "#{@path_prefix}/actions/http", section: section
|
23
|
-
end, ->(section) do
|
24
|
-
render "#{@path_prefix}/actions/commands", section: section
|
25
|
-
end, ->(section) do
|
26
|
-
render "#{@path_prefix}/actions/tours", section: section
|
27
|
-
end
|
28
|
-
]
|
6
|
+
page.scroll childViews: ->(scroll) do
|
7
|
+
render "#{@path_prefix}/actions/list", panel: scroll
|
8
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -4,32 +4,45 @@ page = json_ui_page json
|
|
4
4
|
|
5
5
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
6
6
|
|
7
|
-
page.form
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
7
|
+
page.form \
|
8
|
+
url: json_ui_garage_url(path: 'forms/basic_post'),
|
9
|
+
method: 'post',
|
10
|
+
padding: glib_json_padding_body,
|
11
|
+
childViews: ->(form) do
|
12
|
+
form.fields_text \
|
13
|
+
name: 'user[name]',
|
14
|
+
width: 'matchParent',
|
15
|
+
label: 'Search',
|
16
|
+
placeholder: 'Enter a keyword',
|
17
|
+
styleClasses: ['outlined', 'rounded']
|
18
|
+
|
19
|
+
form.spacer height: 14
|
20
|
+
form.fields_password \
|
21
|
+
name: 'user[password]',
|
22
|
+
width: 'matchParent',
|
23
|
+
label: 'Password',
|
24
|
+
placeholder: 'Type your password',
|
25
|
+
styleClasses: ['outlined', 'compact']
|
26
|
+
|
27
|
+
form.spacer height: 14
|
28
|
+
form.fields_textarea name: 'user[bio]', width: 'matchParent', label: 'Bio', placeholder: 'Enter your bio', styleClasses: ['outlined']
|
29
|
+
|
30
|
+
# form.spacer height: 14
|
31
|
+
# form.fields_stripeToken name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
|
32
|
+
|
33
|
+
# form.spacer height: 14
|
34
|
+
# form.fields_stripeToken name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
|
35
|
+
|
36
|
+
form.spacer height: 14
|
37
|
+
form.fields_creditCard name: 'user[stripe_token_outlined]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'outlined'
|
38
|
+
|
39
|
+
form.spacer height: 14
|
40
|
+
form.fields_creditCard name: 'user[stripe_token_individual]', width: 'matchParent', publicKey: 'pk_test_TYooMQauvdEDq54NiTphI7jx', styleClass: 'individual'
|
41
|
+
|
42
|
+
form.spacer height: 14
|
43
|
+
form.panels_split width: 'matchParent', content: ->(split) do
|
44
|
+
split.right childViews: ->(right) do
|
45
|
+
right.fields_submit text: 'Submit'
|
46
|
+
end
|
32
47
|
end
|
33
48
|
end
|
34
|
-
|
35
|
-
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -11,7 +11,7 @@ section.rows builder: ->(row) do
|
|
11
11
|
array.each do |i|
|
12
12
|
index = page_index * batch_count + i
|
13
13
|
if local_assigns[:reorder]
|
14
|
-
row.thumbnail title: "Item #{index}"
|
14
|
+
row.thumbnail title: "Item #{index}", id: "item_#{index}"
|
15
15
|
else
|
16
16
|
row.thumbnail title: "Item #{index}", subtitle: "Sub Item #{index}", subsubtitle: "Sub Sub Item #{index}"
|
17
17
|
end
|
File without changes
|
File without changes
|
File without changes
|
@@ -2,7 +2,7 @@ json.title 'Lists'
|
|
2
2
|
|
3
3
|
page_index = params[:page].to_i
|
4
4
|
if page_index > 2
|
5
|
-
page_index =
|
5
|
+
page_index = 0
|
6
6
|
end
|
7
7
|
page = json_ui_page json
|
8
8
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
@@ -13,26 +13,33 @@ page.list firstSection: ->(section) do
|
|
13
13
|
title: 'Click menu (web) or swipe left (Android/iOS)',
|
14
14
|
subtitle: "Page index: #{page_index}",
|
15
15
|
leftButtons: ->(menu) do
|
16
|
-
menu.button
|
17
|
-
|
18
|
-
|
16
|
+
menu.button \
|
17
|
+
styleClasses: ['icon', 'text', 'x-small'],
|
18
|
+
icon: 'check_box',
|
19
|
+
onClick: ->(subaction) do
|
20
|
+
subaction.dialogs_alert message: 'Tick/untick'
|
21
|
+
end
|
19
22
|
end, rightButtons: ->(menu) do
|
20
23
|
menu.button \
|
21
|
-
|
24
|
+
styleClasses: ['icon', 'text', 'x-small'],
|
22
25
|
icon: 'share',
|
23
|
-
tooltip: { text: 'Share' }
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
26
|
+
tooltip: { text: 'Share', location: 'left' }
|
27
|
+
|
28
|
+
# TODO: Use popoever
|
29
|
+
# childButtons: ->(submenu) do
|
30
|
+
# submenu.button text: 'Dropdown item 1'
|
31
|
+
# submenu.button text: 'Dropdown item 2'
|
32
|
+
# submenu.button text: 'Dropdown item 3'
|
33
|
+
# end
|
34
|
+
|
29
35
|
menu.button \
|
30
|
-
|
36
|
+
styleClasses: ['icon', 'text', 'x-small'],
|
31
37
|
icon: 'open_in_new',
|
32
38
|
tooltip: { text: 'Open in new window' },
|
33
39
|
onClick: ->(subaction) do
|
34
40
|
subaction.dialogs_alert message: 'Open'
|
35
41
|
end
|
42
|
+
|
36
43
|
end, editButtons: ->(menu) do
|
37
44
|
menu.button text: "Edit (ID: #{page_index})", onClick: ->(action) do
|
38
45
|
action.dialogs_alert message: 'Perform Edit action'
|
File without changes
|
@@ -18,7 +18,7 @@ else
|
|
18
18
|
|
19
19
|
render "#{@path_prefix}/nav_menu", json: json, page: page
|
20
20
|
|
21
|
-
page.list nextPage: next_page, sections: [
|
21
|
+
page.list id: 'orderable_list', nextPage: next_page, sections: [
|
22
22
|
->(section) do
|
23
23
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
24
24
|
header.h3 text: 'Section One'
|
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
|
@@ -133,16 +133,21 @@ json_ui_page json do |page|
|
|
133
133
|
|
134
134
|
scroll.spacer height: 20
|
135
135
|
scroll.h1 text: 'Drag-and-drop support'
|
136
|
-
scroll.panels_horizontal
|
137
|
-
|
138
|
-
|
139
|
-
|
140
|
-
|
141
|
-
|
142
|
-
|
143
|
-
|
144
|
-
|
145
|
-
|
136
|
+
scroll.panels_horizontal \
|
137
|
+
backgroundColor: '#b3bac2',
|
138
|
+
id: 'orderable_panel',
|
139
|
+
width: 300,
|
140
|
+
distribution: 'spaceEqually',
|
141
|
+
childViews: ->(panel) do
|
142
|
+
panel.button id: 'button1', text: '1'
|
143
|
+
panel.button id: 'button2', text: '2'
|
144
|
+
panel.button id: 'button3', text: '3'
|
145
|
+
end, dragSupport: {
|
146
|
+
onDrop: {
|
147
|
+
action: 'dialogs/alert',
|
148
|
+
},
|
149
|
+
paramNameForFormData: 'message'
|
150
|
+
}
|
146
151
|
|
147
152
|
scroll.label text: "\n"
|
148
153
|
end
|
@@ -30,9 +30,9 @@ 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
|
-
|
34
|
-
|
35
|
-
|
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
36
|
end
|
37
37
|
end, ->(section) do
|
38
38
|
section.header padding: glib_json_padding_list, childViews: ->(header) do
|
File without changes
|