glib-web 0.6.12 → 0.6.15
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/analytics/funnel.rb +20 -8
- data/app/helpers/glib/json_ui/view_builder/fields.rb +2 -0
- data/app/helpers/glib/json_ui/view_builder.rb +13 -0
- data/app/views/json_ui/garage/lists/templating.json.jbuilder +1 -1
- data/app/views/json_ui/garage/tables/layout.json.jbuilder +7 -2
- data/app/views/json_ui/garage/views/index.json.jbuilder +1 -1
- data/app/views/json_ui/garage/views/socialSharing.json.jbuilder +102 -0
- metadata +2 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2c4ff8cc0d06eb6c81fb0a0a96374b9747e4f437fb3d2d0a8bc7a53132d49011
|
4
|
+
data.tar.gz: 48212d3c11fb41cf147d7b2ab01d7ecc01d332a111bd77c05066c86da82ab242
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bbf2cf1722acd92649e2d71f0048ea16fc246cac6f03e9a5da61aa5bc137de2f9748e0357c20d5c43290c86a5356f40b61a6314d348cd7996dbff130230a3673
|
7
|
+
data.tar.gz: cd0ff0f239eb2468b81327dd76c5e476dd4a1b6eb4b9daaf8432e9fbdba7201ddda67c6217103b923d67a86aa0bf994ddabc33a59cee6a75e581020c05a56089
|
@@ -35,14 +35,26 @@ module Glib::Analytics
|
|
35
35
|
action = request.headers['GApp-Analytics-Referer-Action']
|
36
36
|
segment = request.headers['GApp-Analytics-Referer-Segment']
|
37
37
|
placement = request.headers['GApp-Analytics-Referer-Placement']
|
38
|
-
|
39
|
-
if group.nil? && action.nil? && !
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
38
|
+
referrer_url = request.headers['referer'] # Notice that the HTTP header uses one "r"
|
39
|
+
if group.nil? && action.nil? && !referrer_url.nil?
|
40
|
+
current_host = request.host
|
41
|
+
referrer_host = URI.parse(referrer_url).host
|
42
|
+
|
43
|
+
# Replace the subdomain portion with regex so it will only match the non-subdomain part.
|
44
|
+
# This will allow cross-subdomain referral, but it will not work if the host is a bare domain,
|
45
|
+
# which is something that we should avoid doing anyway.
|
46
|
+
regex = '^([^\.]*)\.'
|
47
|
+
if current_host == referrer_host || !/#{current_host.sub(/#{regex}/, regex)}/.match(referrer_host).nil?
|
48
|
+
referrer_url = referrer_url.delete_suffix('/')
|
49
|
+
|
50
|
+
begin
|
51
|
+
route = Rails.application.routes.recognize_path(referrer_url)
|
52
|
+
group = route[:controller]
|
53
|
+
action = route[:action]
|
54
|
+
rescue ActionController::RoutingError
|
55
|
+
# Do nothing. This may happen when the referrer is from the same domain,
|
56
|
+
# but not from the same Rails app.
|
57
|
+
end
|
46
58
|
end
|
47
59
|
end
|
48
60
|
|
@@ -35,6 +35,8 @@ module Glib
|
|
35
35
|
hash :analytics
|
36
36
|
hash :tooltip
|
37
37
|
hash :tour
|
38
|
+
array :extensions
|
39
|
+
|
38
40
|
|
39
41
|
# def initialize(json, page)
|
40
42
|
# super(json, page)
|
@@ -259,6 +261,17 @@ module Glib
|
|
259
261
|
color :backgroundColor
|
260
262
|
bool :reversed
|
261
263
|
end
|
264
|
+
|
265
|
+
class SocialSharing < View
|
266
|
+
string :network, required: true
|
267
|
+
string :url, required: true
|
268
|
+
string :title
|
269
|
+
string :description
|
270
|
+
string :quote
|
271
|
+
string :hashtags
|
272
|
+
string :twitter_user
|
273
|
+
string :text
|
274
|
+
end
|
262
275
|
end
|
263
276
|
end
|
264
277
|
end
|
@@ -12,7 +12,7 @@ json_ui_page json do |page|
|
|
12
12
|
template.thumbnail title: 'Click me', onClick: ->(action) do
|
13
13
|
action.windows_open url: json_ui_garage_url(path: 'home/blank')
|
14
14
|
end
|
15
|
-
template.thumbnail title: 'Item with subtitle', subtitle: 'Item subtitle'
|
15
|
+
template.thumbnail title: 'Item with icon and subtitle', subtitle: 'Item subtitle', icon: 'facebook'
|
16
16
|
template.thumbnail title: 'Item with chips', chips: ->(menu) do
|
17
17
|
menu.button text: 'Finished', styleClass: 'info'
|
18
18
|
menu.button props: { text: 'Succeeded', styleClass: 'success' }
|
@@ -24,6 +24,8 @@ page.table sections: [
|
|
24
24
|
action.windows_reload url: json_ui_garage_url(path: 'tables/layout', orders: reversed_order_params(order_key))
|
25
25
|
end
|
26
26
|
end
|
27
|
+
|
28
|
+
header.label text: "Markdown"
|
27
29
|
end
|
28
30
|
|
29
31
|
items = [1, 2, 3]
|
@@ -32,8 +34,11 @@ page.table sections: [
|
|
32
34
|
column_indexes.each do |i|
|
33
35
|
cell.label text: "Data #{item}"
|
34
36
|
end
|
35
|
-
|
36
|
-
|
37
|
+
|
38
|
+
markdown = "* [Item 1](#{json_ui_garage_url(path: 'home/blank')})\n"\
|
39
|
+
"* Item 2\n"\
|
40
|
+
'* Item 3'
|
41
|
+
cell.markdown text: markdown
|
37
42
|
end
|
38
43
|
end
|
39
44
|
end
|
@@ -10,7 +10,7 @@ json_ui_page json do |page|
|
|
10
10
|
end
|
11
11
|
|
12
12
|
section.rows builder: ->(template) do
|
13
|
-
['texts', 'controls', 'images', 'multimedia', 'charts', 'banners', 'maps', 'misc', 'icons', 'progress'].each do |component|
|
13
|
+
['texts', 'controls', 'images', 'multimedia', 'charts', 'banners', 'maps', 'misc', 'icons', 'progress', 'socialSharing'].each do |component|
|
14
14
|
template.thumbnail title: component.humanize, onClick: ->(action) do
|
15
15
|
action.windows_open url: json_ui_garage_url(path: "views/#{component}")
|
16
16
|
end
|
@@ -0,0 +1,102 @@
|
|
1
|
+
json.title 'Views'
|
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: 'Social sharing'
|
8
|
+
scroll.spacer height: 6
|
9
|
+
scroll.panels_column width: 'matchParent', childViews: ->(col) do
|
10
|
+
col.panels_flow innerPadding: { top: 0, right: 0, bottom: 0, left: 0 }, childViews: ->(f) do
|
11
|
+
f.socialSharing \
|
12
|
+
network: 'facebook',
|
13
|
+
url: 'https://www.talentbasket.com/jobs',
|
14
|
+
title: 'TalentBasket internship',
|
15
|
+
description: 'Internship opportunities at talentbasket',
|
16
|
+
text: 'Facebook'
|
17
|
+
|
18
|
+
f.socialSharing \
|
19
|
+
network: 'linkedin',
|
20
|
+
url: 'https://www.talentbasket.com/jobs',
|
21
|
+
title: 'TalentBasket internship',
|
22
|
+
description: 'Internship opportunities at talentbasket',
|
23
|
+
text: 'LinkedIn'
|
24
|
+
|
25
|
+
f.socialSharing \
|
26
|
+
network: 'whatsapp',
|
27
|
+
url: 'https://www.talentbasket.com/jobs',
|
28
|
+
title: 'TalentBasket internship',
|
29
|
+
description: 'Internship opportunities at talentbasket',
|
30
|
+
text: 'WhatsApp'
|
31
|
+
|
32
|
+
f.socialSharing \
|
33
|
+
network: 'telegram',
|
34
|
+
url: 'https://www.talentbasket.com/jobs',
|
35
|
+
title: 'TalentBasket internship',
|
36
|
+
description: 'Internship opportunities at talentbasket',
|
37
|
+
text: 'Telegram'
|
38
|
+
end
|
39
|
+
end
|
40
|
+
scroll.spacer height: 20
|
41
|
+
scroll.panels_column width: 'matchParent', childViews: ->(col) do
|
42
|
+
col.panels_flow innerPadding: { top: 0, right: 0, bottom: 0, left: 0 }, childViews: ->(f) do
|
43
|
+
f.socialSharing \
|
44
|
+
network: 'facebook',
|
45
|
+
url: 'https://www.talentbasket.com/jobs',
|
46
|
+
title: 'TalentBasket internship',
|
47
|
+
description: 'Internship opportunities at talentbasket'
|
48
|
+
|
49
|
+
f.socialSharing \
|
50
|
+
network: 'linkedin',
|
51
|
+
url: 'https://www.talentbasket.com/jobs',
|
52
|
+
title: 'TalentBasket internship',
|
53
|
+
description: 'Internship opportunities at talentbasket'
|
54
|
+
|
55
|
+
f.socialSharing \
|
56
|
+
network: 'whatsapp',
|
57
|
+
url: 'https://www.talentbasket.com/jobs',
|
58
|
+
title: 'TalentBasket internship',
|
59
|
+
description: 'Internship opportunities at talentbasket'
|
60
|
+
|
61
|
+
f.socialSharing \
|
62
|
+
network: 'telegram',
|
63
|
+
url: 'https://www.talentbasket.com/jobs',
|
64
|
+
title: 'TalentBasket internship',
|
65
|
+
description: 'Internship opportunities at talentbasket'
|
66
|
+
end
|
67
|
+
end
|
68
|
+
scroll.spacer height: 20
|
69
|
+
|
70
|
+
scroll.panels_column width: 'matchParent', childViews: ->(col) do
|
71
|
+
col.panels_vertical childViews: ->(v) do
|
72
|
+
v.socialSharing \
|
73
|
+
network: 'facebook',
|
74
|
+
url: 'https://www.talentbasket.com/jobs',
|
75
|
+
title: 'TalentBasket internship',
|
76
|
+
description: 'Internship opportunities at talentbasket',
|
77
|
+
text: 'Facebook'
|
78
|
+
|
79
|
+
v.socialSharing \
|
80
|
+
network: 'linkedin',
|
81
|
+
url: 'https://www.talentbasket.com/jobs',
|
82
|
+
title: 'TalentBasket internship',
|
83
|
+
description: 'Internship opportunities at talentbasket',
|
84
|
+
text: 'LinkedIn'
|
85
|
+
|
86
|
+
v.socialSharing \
|
87
|
+
network: 'whatsapp',
|
88
|
+
url: 'https://www.talentbasket.com/jobs',
|
89
|
+
title: 'TalentBasket internship',
|
90
|
+
description: 'Internship opportunities at talentbasket',
|
91
|
+
text: 'WhatsApp'
|
92
|
+
|
93
|
+
v.socialSharing \
|
94
|
+
network: 'telegram',
|
95
|
+
url: 'https://www.talentbasket.com/jobs',
|
96
|
+
title: 'TalentBasket internship',
|
97
|
+
description: 'Internship opportunities at talentbasket',
|
98
|
+
text: 'Telegram'
|
99
|
+
end
|
100
|
+
end
|
101
|
+
scroll.spacer height: 20
|
102
|
+
end
|
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.6.
|
4
|
+
version: 0.6.15
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- ''
|
@@ -236,6 +236,7 @@ files:
|
|
236
236
|
- app/views/json_ui/garage/views/misc.json.jbuilder
|
237
237
|
- app/views/json_ui/garage/views/multimedia.json.jbuilder
|
238
238
|
- app/views/json_ui/garage/views/progress.json.jbuilder
|
239
|
+
- app/views/json_ui/garage/views/socialSharing.json.jbuilder
|
239
240
|
- app/views/json_ui/garage/views/texts.json.jbuilder
|
240
241
|
- app/views/layouts/json_ui/renderer.html.erb
|
241
242
|
- config/routes.rb
|