glib-web 4.36.2 → 4.36.4
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/helpers/glib/json_ui/action_builder/popovers.rb +23 -8
- data/app/views/json_ui/garage/actions/_windows.json.jbuilder +8 -0
- data/app/views/json_ui/garage/home/print.json.jbuilder +14 -0
- data/app/views/json_ui/garage/views/controls.json.jbuilder +10 -0
- data/app/views/json_ui/garage/views/popovers_open.json.jbuilder +10 -0
- metadata +8 -6
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9263cfb74f958fdf57439259ab5c8bc58662845bb7ea05fb1be8d5c4cd1a8c89
|
4
|
+
data.tar.gz: 87718fc39abc6797fe0b333cc54df6a082b198809fc2d1dd01dbf633081eaac5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 3dc998e34afa4e0c88cad3a2b53a4a08933c93538fd163612bf857a3f527d6a5d04007703e54dca432398e3c9781c0e9bbd090362ca3b6892f679dd443f7a932
|
7
|
+
data.tar.gz: 6d69e9ffe8566cfff01f612f495601a9da09ae70d244b8560a06aeebf2e0a987567f8afdc30dfc944110e591a492c9463b2d331b591b92903b8c460ba71323e2
|
@@ -1,17 +1,32 @@
|
|
1
1
|
class Glib::JsonUi::ActionBuilder
|
2
2
|
module Popovers
|
3
3
|
|
4
|
+
module PopoverAttributes
|
5
|
+
extend ActiveSupport::Concern
|
6
|
+
|
7
|
+
included do
|
8
|
+
string :key
|
9
|
+
# views :childViews
|
10
|
+
string :placement
|
11
|
+
int :offset
|
12
|
+
int :width
|
13
|
+
bool :persistent
|
14
|
+
hash :overlay, required: [:closeOnFocus]
|
15
|
+
singleton_array :styleClass, :styleClasses
|
16
|
+
end
|
17
|
+
end
|
18
|
+
|
4
19
|
class Show < Action
|
20
|
+
include PopoverAttributes
|
21
|
+
|
5
22
|
panels_builder :content, :body
|
23
|
+
end
|
6
24
|
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
bool :persistent
|
13
|
-
hash :overlay, required: [:closeOnFocus]
|
14
|
-
singleton_array :styleClass, :styleClasses
|
25
|
+
class Open < Action
|
26
|
+
include PopoverAttributes
|
27
|
+
|
28
|
+
string :url
|
29
|
+
bool :updateExisting
|
15
30
|
end
|
16
31
|
|
17
32
|
class Close < Action
|
@@ -27,6 +27,14 @@ section.rows builder: ->(template) do
|
|
27
27
|
end
|
28
28
|
end
|
29
29
|
|
30
|
+
template.thumbnail title: 'windows/closeWithOpen1', onClick: ->(action) do
|
31
|
+
action.windows_closeWithOpen url: json_ui_garage_url(path: 'home/print', encoded_key: 'Hello+World')
|
32
|
+
end
|
33
|
+
|
34
|
+
template.thumbnail title: 'windows/closeWithOpen2', onClick: ->(action) do
|
35
|
+
action.windows_closeWithOpen url: json_ui_garage_url(path: 'home/print', encoded_key: 'Hello%2BWorld')
|
36
|
+
end
|
37
|
+
|
30
38
|
template.thumbnail title: 'windows/closeAllWithOpen', onClick: ->(action) do
|
31
39
|
action.windows_closeAllWithOpen url: json_ui_garage_url(path: 'home/index', sleep: true), loaderViews: ->(view) do
|
32
40
|
view.panels_responsive padding: { all: 16 }, childViews: ->(res) do
|
@@ -0,0 +1,14 @@
|
|
1
|
+
if params[:sleep].present?
|
2
|
+
sleep 1
|
3
|
+
end
|
4
|
+
|
5
|
+
json.title 'Menu'
|
6
|
+
|
7
|
+
page = json_ui_page json
|
8
|
+
render "#{@path_prefix}/nav_menu", json: json, page: page, top_nav: false
|
9
|
+
|
10
|
+
page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
11
|
+
params.each do |key, value|
|
12
|
+
scroll.label text: "#{key}: #{value}"
|
13
|
+
end
|
14
|
+
end
|
@@ -87,6 +87,16 @@ page.scroll padding: glib_json_padding_body, childViews: ->(scroll) do
|
|
87
87
|
onClick: ->(action) do
|
88
88
|
action.windows_reload
|
89
89
|
end
|
90
|
+
scroll.spacer height: 10
|
91
|
+
scroll.button \
|
92
|
+
text: 'Button with popover from server',
|
93
|
+
onClick: ->(action) do
|
94
|
+
key = SecureRandom.hex(3)
|
95
|
+
action.popovers_open \
|
96
|
+
url: json_ui_garage_url(path: 'views/popovers_open', key: key),
|
97
|
+
styleClass: 'popover-container',
|
98
|
+
key: key
|
99
|
+
end
|
90
100
|
|
91
101
|
scroll.spacer height: 10
|
92
102
|
scroll.button \
|
@@ -0,0 +1,10 @@
|
|
1
|
+
page = json_ui_page json
|
2
|
+
|
3
|
+
page.body childViews: ->(body) do
|
4
|
+
body.panels_responsive styleClass: 'popover-menu', childViews: ->(sres) do
|
5
|
+
sres.p text: "Current time: #{DateTime.current}", styleClass: 'pb-2'
|
6
|
+
sres.button text: 'Update', onClick: ->(action) do
|
7
|
+
action.popovers_open url: json_ui_garage_url(path: 'views/popovers_open', key: params[:key]), key: params[:key], updateExisting: true
|
8
|
+
end
|
9
|
+
end
|
10
|
+
end
|
metadata
CHANGED
@@ -1,11 +1,11 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: glib-web
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 4.36.
|
4
|
+
version: 4.36.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
8
|
-
autorequire:
|
8
|
+
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
11
|
date: 2019-10-04 00:00:00.000000000 Z
|
@@ -136,7 +136,7 @@ dependencies:
|
|
136
136
|
- - ">="
|
137
137
|
- !ruby/object:Gem::Version
|
138
138
|
version: '0'
|
139
|
-
description:
|
139
|
+
description:
|
140
140
|
email: ''
|
141
141
|
executables: []
|
142
142
|
extensions: []
|
@@ -300,6 +300,7 @@ files:
|
|
300
300
|
- app/views/json_ui/garage/forms/update_options.json.jbuilder
|
301
301
|
- app/views/json_ui/garage/home/blank.json.jbuilder
|
302
302
|
- app/views/json_ui/garage/home/index.json.jbuilder
|
303
|
+
- app/views/json_ui/garage/home/print.json.jbuilder
|
303
304
|
- app/views/json_ui/garage/home/slow.json.jbuilder
|
304
305
|
- app/views/json_ui/garage/lists/_autoload_section.json.jbuilder
|
305
306
|
- app/views/json_ui/garage/lists/autoload_all.json.jbuilder
|
@@ -396,6 +397,7 @@ files:
|
|
396
397
|
- app/views/json_ui/garage/views/markdowns.json.jbuilder
|
397
398
|
- app/views/json_ui/garage/views/misc.json.jbuilder
|
398
399
|
- app/views/json_ui/garage/views/multimedia.json.jbuilder
|
400
|
+
- app/views/json_ui/garage/views/popovers_open.json.jbuilder
|
399
401
|
- app/views/json_ui/garage/views/progress.json.jbuilder
|
400
402
|
- app/views/json_ui/garage/views/shareButton.json.jbuilder
|
401
403
|
- app/views/json_ui/garage/views/steppers.json.jbuilder
|
@@ -443,10 +445,10 @@ files:
|
|
443
445
|
- lib/glib/value.rb
|
444
446
|
- lib/glib/version.rb
|
445
447
|
- lib/tasks/db.rake
|
446
|
-
homepage:
|
448
|
+
homepage:
|
447
449
|
licenses: []
|
448
450
|
metadata: {}
|
449
|
-
post_install_message:
|
451
|
+
post_install_message:
|
450
452
|
rdoc_options: []
|
451
453
|
require_paths:
|
452
454
|
- lib
|
@@ -462,7 +464,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
462
464
|
version: '0'
|
463
465
|
requirements: []
|
464
466
|
rubygems_version: 3.4.6
|
465
|
-
signing_key:
|
467
|
+
signing_key:
|
466
468
|
specification_version: 4
|
467
469
|
summary: ''
|
468
470
|
test_files: []
|