pageflow-embedded-video 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
|
-
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
2
|
+
SHA256:
|
3
|
+
metadata.gz: 58172568a795561cfa5c9b15beb1cf146bbed9185df06fd7a8778aabd290e145
|
4
|
+
data.tar.gz: 1bff248bfe9bcbf1559a18cfea8a667f8a272f198aa44e3157c1dfa8bc114a0f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 2a83250311ebce3c4f9984d0b6269cf513d539dfd49ac50534de021aca627f644fa25121a6389975a44ea456a358f3e066c93735df10bbe7b543ec9fd5d06e53
|
7
|
+
data.tar.gz: cf04b9da398197d01c2a40dc2ccac71932af70022a7e6aac2ea8c015edf64bc5427e47b1c5a65325108f6e1e7b2b3bb00347f031b4ecd297c55307aea1d69605
|
data/CHANGELOG.md
CHANGED
@@ -1,18 +1,16 @@
|
|
1
1
|
# CHANGELOG
|
2
2
|
|
3
|
-
### Version 1.
|
3
|
+
### Version 1.1.0
|
4
4
|
|
5
|
-
2017-08
|
5
|
+
2017-11-08
|
6
6
|
|
7
|
-
[Compare changes](https://github.com/codevise/pageflow-embedded-video/compare/0-
|
7
|
+
[Compare changes](https://github.com/codevise/pageflow-embedded-video/compare/1-0-stable...v1.1.0)
|
8
8
|
|
9
|
-
-
|
10
|
-
|
11
|
-
-
|
12
|
-
|
13
|
-
- Rename .css.scss to just .scss
|
14
|
-
([#15](https://github.com/codevise/pageflow-embedded-video/pull/15))
|
9
|
+
- Require Pageflow 12.1 and make split layout compatible with
|
10
|
+
adjustable title max-widths
|
11
|
+
([#20](https://github.com/codevise/pageflow-embedded-video/pull/20),
|
12
|
+
[#21](https://github.com/codevise/pageflow-embedded-video/pull/21))
|
15
13
|
|
16
14
|
See
|
17
|
-
[0-
|
15
|
+
[1-0-stable branch](https://github.com/codevise/pageflow-embedded-video/blob/1-0-stable/CHANGELOG.md)
|
18
16
|
for previous changes.
|
@@ -26,24 +26,25 @@ pageflow.react.registerPageTypeWithDefaultBackground('embedded_video', {
|
|
26
26
|
},
|
27
27
|
|
28
28
|
resize: function(pageElement, configuration) {
|
29
|
-
var iframeWrapper = pageElement.find('.iframe_wrapper')
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
}
|
29
|
+
var iframeWrapper = pageElement.find('.iframe_wrapper');
|
30
|
+
var pageHeader = pageElement.find('.page_header');
|
31
|
+
var pageTitle = pageHeader.find('.title');
|
32
|
+
var scroller = pageElement.find('.scroller');
|
33
|
+
var container = pageElement.find('.iframe_container');
|
34
|
+
var iframeOverlay = pageElement.find('.iframe_overlay');
|
35
|
+
var videoCaption = pageElement.find('.video_caption');
|
36
|
+
|
37
|
+
var mobile = pageflow.features.has('mobile platform');
|
38
|
+
var allowSplitLayout = !configuration.full_width || this.fullscreen;
|
39
|
+
|
40
|
+
pageElement.toggleClass('page-with_split_layout', allowSplitLayout);
|
42
41
|
|
43
|
-
|
42
|
+
var splitLayout = this.wideEnoughForSplitLayout(pageElement) && allowSplitLayout;
|
43
|
+
|
44
|
+
iframeWrapper.add(scroller).toggleClass('widescreened', splitLayout);
|
44
45
|
|
45
46
|
if (!this.fullscreen) {
|
46
|
-
if (
|
47
|
+
if (splitLayout || mobile) {
|
47
48
|
if (!container.find('iframe').length) {
|
48
49
|
container.append(iframeWrapper);
|
49
50
|
}
|
@@ -55,7 +56,7 @@ pageflow.react.registerPageTypeWithDefaultBackground('embedded_video', {
|
|
55
56
|
}
|
56
57
|
}
|
57
58
|
|
58
|
-
if (
|
59
|
+
if (splitLayout) {
|
59
60
|
iframeWrapper.append(videoCaption);
|
60
61
|
}
|
61
62
|
else if (mobile) {
|
@@ -68,6 +69,21 @@ pageflow.react.registerPageTypeWithDefaultBackground('embedded_video', {
|
|
68
69
|
scroller.scroller('refresh');
|
69
70
|
},
|
70
71
|
|
72
|
+
wideEnoughForSplitLayout: function(pageElement) {
|
73
|
+
var pageTitle = pageElement.find('.page_header .title');
|
74
|
+
|
75
|
+
var pageTitleClientRect = pageTitle[0].getBoundingClientRect();
|
76
|
+
var pageClientRect = pageElement[0].getBoundingClientRect();
|
77
|
+
|
78
|
+
var spaceRightFromTitle = pageClientRect.right - pageTitleClientRect.right;
|
79
|
+
var spaceLeftFromTitle = pageTitleClientRect.left - pageClientRect.left;
|
80
|
+
var leftPositionedEmbedWidth = pageClientRect.width * 0.51;
|
81
|
+
var rightPositionedEmbedWidth = pageClientRect.width * 0.55;
|
82
|
+
|
83
|
+
return (spaceLeftFromTitle >= leftPositionedEmbedWidth ||
|
84
|
+
spaceRightFromTitle >= rightPositionedEmbedWidth);
|
85
|
+
},
|
86
|
+
|
71
87
|
prepare: function(pageElement, configuration) {},
|
72
88
|
|
73
89
|
activating: function(pageElement, configuration) {
|
@@ -18,7 +18,7 @@ Gem::Specification.new do |spec|
|
|
18
18
|
|
19
19
|
spec.required_ruby_version = '~> 2.1'
|
20
20
|
|
21
|
-
spec.add_runtime_dependency 'pageflow', '~> 12.
|
21
|
+
spec.add_runtime_dependency 'pageflow', '~> 12.1'
|
22
22
|
spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.0'
|
23
23
|
|
24
24
|
spec.add_development_dependency 'bundler', '~> 1.0'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: pageflow-embedded-video
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Codevise Solutions Ltd
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2017-08
|
11
|
+
date: 2017-11-08 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: pageflow
|
@@ -16,14 +16,14 @@ dependencies:
|
|
16
16
|
requirements:
|
17
17
|
- - "~>"
|
18
18
|
- !ruby/object:Gem::Version
|
19
|
-
version: 12.
|
19
|
+
version: '12.1'
|
20
20
|
type: :runtime
|
21
21
|
prerelease: false
|
22
22
|
version_requirements: !ruby/object:Gem::Requirement
|
23
23
|
requirements:
|
24
24
|
- - "~>"
|
25
25
|
- !ruby/object:Gem::Version
|
26
|
-
version: 12.
|
26
|
+
version: '12.1'
|
27
27
|
- !ruby/object:Gem::Dependency
|
28
28
|
name: pageflow-public-i18n
|
29
29
|
requirement: !ruby/object:Gem::Requirement
|
@@ -148,7 +148,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
148
148
|
version: '0'
|
149
149
|
requirements: []
|
150
150
|
rubyforge_project:
|
151
|
-
rubygems_version: 2.
|
151
|
+
rubygems_version: 2.7.0
|
152
152
|
signing_key:
|
153
153
|
specification_version: 4
|
154
154
|
summary: Pagetype for embedded youtube/vimeo videos
|