pageflow-linkmap-page 2.6.1 → 2.8.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
2
  SHA256:
3
- metadata.gz: f4c43af6b804159bf2faa198090f1e1f538d1c9f3d53c44047a9e220e072b874
4
- data.tar.gz: 3ec34a027a778e1a8dfccdd8f81d9a332e4e4eaf663eea9c6c97f8f440188fd9
3
+ metadata.gz: ff9d97c1c2bc7397353d18b2d6847c92686e3ea194360f9e1967445cbfc3af3a
4
+ data.tar.gz: 5b54773f19f77814878c5e5d71e889d63c323937a0b916a827d716a5dd7c86b8
5
5
  SHA512:
6
- metadata.gz: b38107bbe3d0ed938eac8082aa06e800c887cb0d4ef07f6e8b495100fe167fd41dcb8e362473fb285d13bff5519d3f98aa39a881aa494a417f37104f76c9f775
7
- data.tar.gz: 4fa0f7f3985f396dea8b9d46fb197b07d0532932f695337d1dc73f1f2c7a1eaf5142132eb0227be30f1f5211b494c46ae55b3d846ef1487e8f96eace2d528cd1
6
+ metadata.gz: 532fe3853b0f551305f60bb52bf9fdb6916fbf134387d5964f98b9d37678fb76797232cfb2fdf2e056ac94a26b7eda464e49c88eb598a8a8827b4561e2b6441c
7
+ data.tar.gz: a27739cff366df42b8604352be352c33224757beeefeeae8e81a50b6d8ab8b3d88a622b5c9308e2cd768e22b06be584a9ddd25a3fc8765e92fef849099034ff2
data/CHANGELOG.md CHANGED
@@ -1,29 +1,20 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 2.6.1
3
+ ### Version 2.8.0
4
4
 
5
- 2019-11-21
5
+ 2022-07-18
6
6
 
7
- [Compare changes](https://github.com/codevise/pageflow-linkmap-page/compare/v2.6.0...v2.6.1)
7
+ [Compare changes](https://github.com/codevise/pageflow-linkmap-page/compare/2-7-stable...v2.8.0)
8
8
 
9
- - Delete cleanup migration
10
- ([#69](https://github.com/codevise/pageflow-linkmap-page/pull/69))
11
-
12
- ### Version 2.6.0
13
-
14
- 2019-11-04
15
-
16
- [Compare changes](https://github.com/codevise/pageflow-linkmap-page/compare/2-5-stable...v2.6.0)
17
-
18
- - Specify mysql service for Travis build
19
- ([#66](https://github.com/codevise/pageflow-linkmap-page/pull/66))
20
- - Use perma id for color map file and components
21
- ([#65](https://github.com/codevise/pageflow-linkmap-page/pull/65))
22
- - Wait for color map file to be persisted
23
- ([#64](https://github.com/codevise/pageflow-linkmap-page/pull/64))
24
- - Add import and export
25
- ([#63](https://github.com/codevise/pageflow-linkmap-page/pull/63))
9
+ - Use rebrushed button styles for editor
10
+ ([#75](https://github.com/codevise/pageflow-linkmap-page/pull/75))
11
+ - Trigger media events for audio hotspots
12
+ ([#74](https://github.com/codevise/pageflow-linkmap-page/pull/74))
13
+ - Prevent slideshow container from scrolling out of view
14
+ ([#73](https://github.com/codevise/pageflow-linkmap-page/pull/73))
15
+ - Use perma id for audio hotspot files
16
+ ([#71](https://github.com/codevise/pageflow-linkmap-page/pull/71))
26
17
 
27
18
  See
28
- [2-5-stable branch](https://github.com/codevise/pageflow-linkmap-page/blob/2-5-stable/CHANGELOG.md)
19
+ [2-7-stable branch](https://github.com/codevise/pageflow-linkmap-page/blob/2-7-stable/CHANGELOG.md)
29
20
  for previous changes.
data/Gemfile CHANGED
@@ -6,4 +6,4 @@ gemspec
6
6
  gem 'spring-commands-rspec', group: :development
7
7
  gem 'spring-commands-teaspoon', group: :development
8
8
 
9
- gem 'pageflow-external-links', git: 'https://github.com/codevise/pageflow-external-links', branch: 'master'
9
+ gem 'rails', '5.2.6'
@@ -11,7 +11,7 @@ pageflow.linkmapPage.Area = Backbone.Model.extend({
11
11
  // pageflow.xxx.getPolymorphic(this.get('target_type'), this.get('target_id'));
12
12
  //
13
13
  if (this.get('target_type') === 'audio_file') {
14
- return pageflow.audioFiles.get(this.get('target_id'));
14
+ return pageflow.audioFiles.getByPermaId(this.get('target_id'));
15
15
  }
16
16
  else if (this.get('target_type') === 'page') {
17
17
  return pageflow.pages.getByPermaId(this.get('target_id'));
@@ -2,7 +2,7 @@ pageflow.linkmapPage.NewAreaFileSelectionHandler = function(options) {
2
2
  var page = pageflow.pages.get(options.id);
3
3
 
4
4
  this.call = function(file) {
5
- page.configuration.linkmapAreas().addAudioFile(file.id);
5
+ page.configuration.linkmapAreas().addAudioFile(file.get('perma_id'));
6
6
  return false;
7
7
  };
8
8
 
@@ -188,13 +188,19 @@ pageflow.pageType.register('linkmap_page', _.extend({
188
188
  .attr('data-width', template.data('videoWidth'))
189
189
  .attr('data-height', template.data('videoHeight'));
190
190
 
191
- var videoPlayer = this.videoPlayer = new pageflow.VideoPlayer.Lazy(template, {
191
+ var options = {
192
192
  volumeFading: true,
193
193
  fallbackToMutedAutoplay: true,
194
-
195
194
  width: '100%',
196
195
  height: '100%'
197
- });
196
+ }
197
+ if (pageflow.browser.has('mobile platform')) {
198
+ // to enable autoplay videos on mobile, 'muted' and 'playsinline' needs to be set
199
+ // video can be unmuted on user interaction
200
+ options.muted = true;
201
+ options.playsinline = true;
202
+ }
203
+ var videoPlayer = this.videoPlayer = new pageflow.VideoPlayer.Lazy(template, options);
198
204
 
199
205
  videoPlayer.ready(function() {
200
206
  videoPlayer.on('playmuted', function() {
@@ -238,7 +244,11 @@ pageflow.pageType.register('linkmap_page', _.extend({
238
244
  this.multiPlayer = pageflow.audio.createMultiPlayer({
239
245
  playFromBeginning: true,
240
246
  fadeDuration: 1000,
241
- hooks: pageflow.atmo.createMediaPlayerHooks(configuration)
247
+ hooks: pageflow.atmo.createMediaPlayerHooks(configuration),
248
+ mediaEvents: true,
249
+ context: {
250
+ page: pageElement.page('instance')
251
+ }
242
252
  });
243
253
 
244
254
  this.multiPlayer.on('play', function(options) {
@@ -431,18 +441,25 @@ pageflow.pageType.register('linkmap_page', _.extend({
431
441
  },
432
442
 
433
443
  isVideoEnabled: function(configuration) {
434
- return !pageflow.browser.has('mobile platform') &&
435
- (configuration.background_type === 'video' || configuration.background_type === 'hover_video');
444
+ return this.isBackgroundVideoEnabled(configuration) || this.isHoverVideoEnabled(configuration)
436
445
  },
437
446
 
438
447
  isBackgroundVideoEnabled: function(configuration) {
439
- return !pageflow.browser.has('mobile platform') &&
440
- configuration.background_type === 'video';
448
+ if (pageflow.browser.has('mobile platform')) {
449
+ return configuration.background_type === 'video' && configuration.panorama_image_id == undefined
450
+ }
451
+ else{
452
+ return configuration.background_type === 'video'
453
+ }
441
454
  },
442
455
 
443
456
  isHoverVideoEnabled: function(configuration) {
444
- return !pageflow.browser.has('mobile platform') &&
445
- configuration.background_type === 'hover_video';
457
+ if (pageflow.browser.has('mobile platform')) {
458
+ return configuration.background_type === 'hover_video' && configuration.hover_image_id == undefined
459
+ }
460
+ else{
461
+ return configuration.background_type === 'hover_video'
462
+ }
446
463
  },
447
464
 
448
465
  updateNavigationMode: function(configuration) {
@@ -75,6 +75,11 @@
75
75
  }, 300);
76
76
 
77
77
  this.element.removeClass('playing');
78
+ },
79
+
80
+ unmute: function () {
81
+ var videoPlayer = this.options.video.data('videoPlayer');
82
+ videoPlayer.muted(false);
78
83
  }
79
84
  });
80
85
  }(jQuery));
@@ -33,6 +33,10 @@
33
33
  'click': function(event) {
34
34
  var area = this.areaAt(this.positionFromEvent(event));
35
35
 
36
+ if (area.length && area.hasClass('hover_area')){
37
+ this.options.hoverVideo.unmute();
38
+ }
39
+
36
40
  if (area.length && area.hasClass('enabled')) {
37
41
  area.first().trigger($.Event('linkmapareaclick', {originalEvent: event}));
38
42
  }
@@ -81,7 +81,7 @@
81
81
  this._ensureScrollerCanNotScroll();
82
82
  this._resizePanorama();
83
83
  this._transformPanoramaWrapper();
84
- this._markAllButCurrentAreaAsDisabled();
84
+ this._disableAreas();
85
85
  },
86
86
 
87
87
  goToAreaByIndex: function(index) {
@@ -161,13 +161,10 @@
161
161
  this.panorama.height(this.panoramaSize.height);
162
162
  },
163
163
 
164
- _markAllButCurrentAreaAsDisabled: function() {
165
- var currentArea = this.currentArea;
166
-
167
- this.options.areas().each(function() {
168
- var area = $(this);
169
- area.toggleClass('enabled', area.is(currentArea));
170
- });
164
+ _disableAreas: function() {
165
+ // linkmapareaclick event for current area is dispatched above
166
+ // when user clicks anywhere in the page.
167
+ this.options.areas().removeClass('enabled');
171
168
  },
172
169
 
173
170
  _transformPanoramaWrapper: function() {
@@ -1,9 +1,8 @@
1
1
  .select_area_position_hint {
2
- background-color: #fff;
3
2
  padding: 10px;
4
3
 
5
4
  button {
6
5
  margin-top: 10px;
7
- @include button;
6
+ @include simple-button;
8
7
  }
9
8
  }
@@ -101,9 +101,7 @@ de:
101
101
  so viele Hotspots angelegt werden wie gewünscht.
102
102
 
103
103
  Der Panorama Typ entscheidet darüber, ob die Seite ein
104
- Hintergrund-Bild oder Hintergrund-Video zeigt. (Beachte, dass
105
- Hintergrund-Videos auf mobilen Geräten nicht abgespielt werden,
106
- deshalb wähle ein zusätzliches Panorama-Bild für die mobile Version)
104
+ Hintergrund-Bild oder Hintergrund-Video zeigt. (Ein zusätzliches Fallback-Image für die mobile Version kann bereitgestellt werden, wenn das Video nicht passt)
107
105
 
108
106
  Die Hotspot-Seite ermöglicht auch die Nutzung von Panorama-Bildern,
109
107
  die größer sind, als der sichtbare Bildschirmbereich. So können Nutzer
@@ -98,7 +98,7 @@ en:
98
98
 
99
99
  Hotspots can play audio files, link to other pages in a Pageflow or to external websites. You can define as many hotspots as you want.
100
100
 
101
- Decide if you want to show a background image or a background video. (Keep in mind, that background videos will not be played on mobile devices, therefore use an additional fallback image for the mobile version)
101
+ Decide if you want to show a background image or a background video. (An additional fallback image for the mobile version can be provided if video does not fit)
102
102
 
103
103
  The hotspot page type allows to use panoramic images that are wider and taller than the screen-size. It enables users to explore these images by horizontal or vertical scrolling.
104
104
 
@@ -1,5 +1,5 @@
1
1
  module Pageflow
2
2
  module LinkmapPage
3
- VERSION = '2.6.1'.freeze
3
+ VERSION = '2.8.0'.freeze
4
4
  end
5
5
  end
@@ -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', '~> 15.x'
21
+ spec.add_runtime_dependency 'pageflow', '~> 15.7.x'
22
22
  spec.add_runtime_dependency 'pageflow-external-links', '~> 2.x'
23
23
 
24
24
  spec.add_development_dependency 'bundler', ['>= 1.0', '< 3']
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-linkmap-page
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.6.1
4
+ version: 2.8.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: 2019-11-21 00:00:00.000000000 Z
11
+ date: 2022-07-18 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: 15.x
19
+ version: 15.7.x
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: 15.x
26
+ version: 15.7.x
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: pageflow-external-links
29
29
  requirement: !ruby/object:Gem::Requirement
@@ -288,7 +288,6 @@ files:
288
288
  - app/assets/stylesheets/pageflow/linkmap_page/editor/action_buttons.scss
289
289
  - app/assets/stylesheets/pageflow/linkmap_page/editor/area_outlines.scss
290
290
  - app/assets/stylesheets/pageflow/linkmap_page/editor/areas_list.scss
291
- - app/assets/stylesheets/pageflow/linkmap_page/editor/file_areas.scss
292
291
  - app/assets/stylesheets/pageflow/linkmap_page/editor/inputs/area_mask.scss
293
292
  - app/assets/stylesheets/pageflow/linkmap_page/editor/masks_preview.scss
294
293
  - app/assets/stylesheets/pageflow/linkmap_page/editor/resizable.scss
@@ -371,8 +370,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
371
370
  - !ruby/object:Gem::Version
372
371
  version: '0'
373
372
  requirements: []
374
- rubyforge_project:
375
- rubygems_version: 2.7.10
373
+ rubygems_version: 3.0.8
376
374
  signing_key:
377
375
  specification_version: 4
378
376
  summary: Pageflow page type for a page that contains customizable link areas
@@ -1,70 +0,0 @@
1
- div.linkmap_page_file_areas {
2
- .add_area {
3
- @include plus-circled-icon;
4
- @include icon-button;
5
- }
6
-
7
- ul.areas {
8
- margin-bottom: 10px;
9
- }
10
-
11
- a.edit {
12
- @include icon-only-button(#aaa);
13
- @include pencil-icon;
14
- position: absolute;
15
- right: 4px;
16
- top: 4px;
17
- }
18
-
19
- li {
20
- margin-bottom: 2px;
21
-
22
- > div:first-child {
23
- padding-left: 45px;
24
- }
25
-
26
- .title {
27
- cursor: default;
28
- padding-right: 30px;
29
- }
30
-
31
- .label {
32
- margin-top: 10px;
33
- color: #666;
34
- }
35
-
36
- .file_thumbnail,
37
- .missing_file_thumbnail {
38
- position: absolute;
39
- top: 0;
40
- left: 0;
41
- height: 100%;
42
- width: 35px;
43
- background-size: cover;
44
- background-color: #444;
45
- }
46
-
47
- .file_thumbnail {
48
- .pictogram:before {
49
- font-size: 20px;
50
- }
51
- }
52
-
53
- .missing_file_thumbnail {
54
- @include background-icon-center($color: #fff);
55
- @include attention-icon;
56
- display: none;
57
- position: absolute;
58
- }
59
-
60
- &.dangling {
61
- .file_thumbnail {
62
- display: none;
63
- }
64
-
65
- .missing_file_thumbnail {
66
- display: block;
67
- }
68
- }
69
- }
70
- }