servel 0.27.0 → 0.28.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: d22cac43dd4ee9dca7038c1151afbc0dae141be026bfb8d6286b870f2e8bc989
4
- data.tar.gz: ac371123d5b054b040b146ed11e454bb46c434391aa0803814cc6ac0298459e3
3
+ metadata.gz: 8f15c64ad7143343fa43beea82a7c09813ffda5d38c64cf3933fe5033bb78270
4
+ data.tar.gz: 4a37029622423e52a260f26b3dd71a2ac0943e605370364a85e206fd644f6951
5
5
  SHA512:
6
- metadata.gz: 0c758e45f6ae02ea188e33fd98002d39cd8f7ae4699c06b829c76370bfeb5d070c1254fb6722fdf640baaf986e050009f8a7abae52ad33db17926f1cc18958bc
7
- data.tar.gz: 0f8ebbbd2a3b10879425a536bd208fdb215ba2af3902864babac144e7cbe08937f9ce4a765182d924b52da501423d996e5cc1de8817afbba37606eecda38d61e
6
+ metadata.gz: bea3930d3199941d249401dfae0f25a27dc03cf43dd39af5914d2ae7ef9af64ce49c73b47099758611e076f96396f30564404451b9f8f58a78fbfaf34b2f2622
7
+ data.tar.gz: 0d3f892f937a3046e75a8a61fad8678252a88e7f657ef84da82ee7f46d852492368cc42aa17cda7ac869236a4ae3ae12200f6b48dd8a35c8648afd9460b02b52
@@ -4,6 +4,8 @@ var Gallery = (function() {
4
4
  var LAYOUT_MODES = ["fit-both", "fit-width", "clamp-width"];
5
5
 
6
6
  var $gallery;
7
+ var $video;
8
+ var $audio;
7
9
  var currentIndex;
8
10
  var layoutModeIndex = 0;
9
11
 
@@ -20,9 +22,10 @@ var Gallery = (function() {
20
22
 
21
23
  function clearContent() {
22
24
  $gallery.classList.remove("image", "video", "audio", "text");
23
- $("#image").removeAttribute('src');
24
- $("#video").removeAttribute('src');
25
- $("#audio").removeAttribute('src');
25
+ $video.removeAttribute('src');
26
+ $video.pause();
27
+ $audio.removeAttribute('src');
28
+ $audio.pause();
26
29
  $("#text-content").innerHTML = "";
27
30
  }
28
31
 
@@ -98,7 +101,6 @@ var Gallery = (function() {
98
101
  }
99
102
 
100
103
  function playPauseVideo() {
101
- var $video = $("#video");
102
104
  if ($video.paused || $video.ended) $video.play();
103
105
  else $video.pause();
104
106
  }
@@ -162,10 +164,10 @@ var Gallery = (function() {
162
164
 
163
165
  $("#image").style.maxWidth = maxWidth;
164
166
  $("#image").style.maxHeight = maxHeight;
165
- $("#video").style.maxWidth = maxWidth;
166
- $("#video").style.maxHeight = maxHeight;
167
- $("#audio").style.maxWidth = maxWidth;
168
- $("#audio").style.maxHeight = maxHeight;
167
+ $video.style.maxWidth = maxWidth;
168
+ $video.style.maxHeight = maxHeight;
169
+ $audio.style.maxWidth = maxWidth;
170
+ $audio.style.maxHeight = maxHeight;
169
171
  }
170
172
 
171
173
  function initLayout() {
@@ -180,6 +182,8 @@ var Gallery = (function() {
180
182
 
181
183
  function init() {
182
184
  $gallery = $("#gallery");
185
+ $video = $("#video");
186
+ $audio = $("#audio");
183
187
 
184
188
  onEntriesUpdate();
185
189
 
@@ -1,3 +1,3 @@
1
1
  module Servel
2
- VERSION = "0.27.0"
2
+ VERSION = "0.28.0"
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: servel
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.27.0
4
+ version: 0.28.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Brenton "B-Train" Fletcher
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-09-17 00:00:00.000000000 Z
11
+ date: 2018-09-24 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: bundler