scrollytelling-navigation 1.15.2 → 1.15.3

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
  SHA1:
3
- metadata.gz: 22bc619baab5ad33ff767e2fd7b866f1e12f859a
4
- data.tar.gz: 6588dcc162b221be9b86fac91c01712eeb2aa1ea
3
+ metadata.gz: a14fd22b5c8fe8f6bf581204fc784faadb937459
4
+ data.tar.gz: d4ec456e60858083c7da1bf1e4716711aad7a348
5
5
  SHA512:
6
- metadata.gz: 6c7c977c117c012bc3ee2b0668f7d75e1d9114c44b7919ef2cab3794337a8cac67a4c10285fbc753c1cfec88fc113a061517839dedab168f6a9aada25f147046
7
- data.tar.gz: 87a29015ee47842e8d1bd125e35302642a6996855b1b0b8119db27a8a7e58a221240c17d174a987fe93ba7cd1608aae2861acdc255f3e95e0ec4e9926364093a
6
+ metadata.gz: aa80ea2ce71c64640e88ef3d33cf8673fd794d3b867ca223e1d0eabd7e5e863e2bd9d41225e76e3b25d20a0094c47db6ebf28b85ce85034601cba2f78618e34f
7
+ data.tar.gz: 1599a1b032db07e594ac30d508f5bc3e13b4ca635d2816850f9b0fd075c7d901231c5e72ffbdb287762948876944ecf7516b402afbd4b0acd2a95e9325797336
data/README.md CHANGED
@@ -54,6 +54,18 @@ Rails.application.config.assets.version = 'x.x.x'
54
54
 
55
55
  After all that, restart your application server.
56
56
 
57
+ ## Migrate all the things
58
+
59
+ Your published entries and all your accounts will still reference the default Pageflow widget. To update the lot in bulk, run this:
60
+
61
+ ``` ruby
62
+ Pageflow::Widget.
63
+ where(role: 'navigation').
64
+ find_each do |widget|
65
+ widget.update! type_name: 'scrollytelling_navigation'
66
+ end
67
+ ```
68
+
57
69
  ## Development
58
70
 
59
71
  After checking out the repo, run `bin/setup` to install dependencies. Then, run `rake spec` to run the tests. You can also run `bin/console` for an interactive prompt that will allow you to experiment.
@@ -1,18 +1,27 @@
1
1
  $.widget('scrollytelling.audioControl', {
2
+ showState: function() {
3
+ var icon = $('#scrollytelling-audio', this.element);
4
+
5
+ if(pageflow.settings.get('volume') > 0) {
6
+ icon.removeClass('audio-playing').addClass('audio-muted');
7
+ } else {
8
+ icon.removeClass('audio-muted').addClass('audio-playing');
9
+ }
10
+ },
11
+
2
12
  _create: function() {
3
- $('#scrollytelling-audio', this.element).on('click', this.toggleAudio);
13
+ this.showState();
14
+ $('#scrollytelling-audio', this.element).on('click', this.toggleAudio.bind(this));
4
15
  },
5
16
 
6
17
  toggleAudio: function(event) {
7
- event.preventDefault();
8
- var target = $(event.target);
9
-
10
18
  if(pageflow.settings.get('volume') > 0) {
11
19
  pageflow.settings.set('volume', 0);
12
- target.removeClass('audio-playing').addClass('audio-muted');
13
20
  } else {
14
21
  pageflow.settings.set('volume', 1);
15
- target.removeClass('audio-muted').addClass('audio-playing');
16
22
  }
23
+
24
+ event.preventDefault();
25
+ this.showState();
17
26
  }
18
27
  });
@@ -1,7 +1,7 @@
1
1
  $.widget('scrollytelling.scrollytellingNavigationCounter', {
2
2
  setActive: function(page) {
3
- this.element.find('a').removeClass('active');
4
- this.element.find('a[href="#' + page.attr('id') + '"]').addClass('active');
3
+ $('nav a', this.element).removeClass('active');
4
+ $('nav a[href="#' + page.attr('id') + '"]', this.element).addClass('active');
5
5
  },
6
6
 
7
7
  updateActive: function(page) {
@@ -22,7 +22,7 @@
22
22
 
23
23
  <% if entry.home_button.enabled? %>
24
24
  <ul class="scrollytelling-home_button scrolly-nav-box">
25
- <li><%= link_to t('scrollytelling.navigation.home_link'),
25
+ <li><%= link_to t('scrollytelling.navigation.home'),
26
26
  entry.home_button.url,
27
27
  title: t('scrollytelling.navigation.home_title', url: entry.home_button.url) %></li>
28
28
  </ul>
@@ -34,6 +34,6 @@
34
34
  </ul>
35
35
 
36
36
  <ul class="scrollytelling-options scrolly-nav-box">
37
- <li><a href="#" id="scrollytelling-audio" class="audio-playing"></a></li>
37
+ <li><a href="#" id="scrollytelling-audio"></a></li>
38
38
  </ul>
39
39
  </div>
@@ -1,6 +1,8 @@
1
1
  en:
2
2
  pageflow:
3
3
  scrollytelling_navigation:
4
- home_link: ' Home'
5
- home_title: 'That will take you to %{url}'
6
4
  widget_type_name: Scrollytelling dots with tooltips
5
+ scrollytelling:
6
+ navigation:
7
+ home: ' Home'
8
+ home_title: 'You‘re a mouse click away from %{url}'
@@ -1,6 +1,8 @@
1
1
  nl:
2
2
  pageflow:
3
3
  scrollytelling_navigation:
4
- home_link: ' Home'
5
- home_title: 'Je gaat dan naar %{url}'
6
4
  widget_type_name: Scrollytelling stippen met tooltips
5
+ scrollytelling:
6
+ navigation:
7
+ home: ' Home'
8
+ home_title: 'Je bent een muisklik verwijderd van %{url}'
@@ -1,5 +1,5 @@
1
1
  module Scrollytelling
2
2
  module Navigation
3
- VERSION = "1.15.2"
3
+ VERSION = "1.15.3"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: scrollytelling-navigation
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.15.2
4
+ version: 1.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Joost Baaij
8
8
  autorequire:
9
9
  bindir: exe
10
10
  cert_chain: []
11
- date: 2017-08-12 00:00:00.000000000 Z
11
+ date: 2017-08-14 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow