pageflow-outline-navigation-bar 0.1.0 → 1.0.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
  SHA1:
3
- metadata.gz: 34971d1ce801fcf8566778955f172316df9899ae
4
- data.tar.gz: d487ee87e01aab90e59fcac2eee601d975b1f2fc
3
+ metadata.gz: b75c2003339a4af5a28a655b224d76fca49480d2
4
+ data.tar.gz: b34f7881c7e16c314e13abde2d1901531ed58658
5
5
  SHA512:
6
- metadata.gz: cb9f11ec071a0057b904f7d0fb6f8da9cc856e15e57a441a65d27ff1ac72db4832bc7dfe0b8cc77b7cb821a511e6b3c80878923630b1a64ec4d70596b56c01c6
7
- data.tar.gz: d635d5d16d04c42382b728ee2f5fa5ddb1115a3f6bd0d5cbf69bfaae76196bdbd8e9cdc6fe9c953b25b9764621fb8ca0f653227b9956f2a807229142fcfe26c0
6
+ metadata.gz: 0afc5d067765082de55db51a24f2eb92c5ac9e027124a5f90aad3c62696066e27d5c7d8cf36d6dae9c7d8a4139f6a16ac3dd6946ad6c21eed75764ab24f2f487
7
+ data.tar.gz: 421d443a3cd65c1ec118361d3013a94a36bb379bf7986bc75337ec88f2cd709d45d171bf64122378cb8351c1403b39a486036d1468d919a521e0b83c75e4084f
data/CHANGELOG.md CHANGED
@@ -1,7 +1,16 @@
1
1
  # CHANGELOG
2
2
 
3
- ### Version 0.1.0
3
+ ### Version 1.0.0
4
4
 
5
- 2016-09-09
5
+ 2017-08-11
6
6
 
7
- Initial release.
7
+ [Compare changes](https://github.com/codevise/pageflow-outline-navigation-bar/compare/0-1-stable...v1.0.0)
8
+
9
+ - Improve mobile variant
10
+ ([#3](https://github.com/codevise/pageflow-outline-navigation-bar/pull/3))
11
+ - Support pageflow 12
12
+ ([#2](https://github.com/codevise/pageflow-outline-navigation-bar/pull/2))
13
+
14
+ See
15
+ [0-1-stable branch](https://github.com/codevise/pageflow-outline-navigation-bar/blob/0-1-stable/CHANGELOG.md)
16
+ for previous changes.
data/README.md CHANGED
@@ -21,7 +21,7 @@ Include javascripts and stylesheets:
21
21
  # app/assets/javascripts/pageflow/application.js
22
22
  //= require pageflow/outline_navigation_bar
23
23
 
24
- # app/assets/stylesheets/pageflow/themes/default.css.scss
24
+ # app/assets/stylesheets/pageflow/themes/default.scss
25
25
  @import "pageflow/outline_navigation_bar/themes/default";
26
26
 
27
27
  Execute `bundle install` and restart the application server. Now the
@@ -1,30 +1,34 @@
1
- pageflow.outlineNavigationBar.events = {
2
- pointerUp: 'touchend mouseup MSPointerUp pointerup',
3
- pointerDown: 'touchstart mousedown MSPointerDown pointerdown',
1
+ pageflow.outlineNavigationBar.events = (function() {
2
+ var hasPointerEvents = window.PointerEvent || window.MSPointerEvent;
4
3
 
5
- onPointerDown: function(element, selectorOrHandler, handler) {
6
- var selector = handler ? selectorOrHandler : null;
7
- handler = handler || selectorOrHandler;
4
+ return {
5
+ pointerUp: hasPointerEvents ? 'MSPointerUp pointerup mouseup' : 'touchend mouseup',
6
+ pointerDown: hasPointerEvents ? 'MSPointerDown pointerdown mousedown' : 'touchstart mousedown',
8
7
 
9
- this._onPointerDown(handler, function(event, fn) {
10
- element.on(event, selector, fn);
11
- });
12
- },
8
+ onPointerDown: function(element, selectorOrHandler, handler) {
9
+ var selector = handler ? selectorOrHandler : null;
10
+ handler = handler || selectorOrHandler;
13
11
 
14
- _onPointerDown: function(handler, on) {
15
- on(this.pointerDown, function(event) {
16
- event.preventDefault();
17
- handler.call(this);
18
- });
12
+ this._onPointerDown(handler, function(event, fn) {
13
+ element.on(event, selector, fn);
14
+ });
15
+ },
19
16
 
20
- on('click', function(event) {
21
- event.preventDefault();
22
- });
23
-
24
- on('keypress', function(event) {
25
- if (event.which == 13) {
17
+ _onPointerDown: function(handler, on) {
18
+ on(this.pointerDown, function(event) {
19
+ event.preventDefault();
26
20
  handler.call(this);
27
- }
28
- });
29
- },
30
- };
21
+ });
22
+
23
+ on('click', function(event) {
24
+ event.preventDefault();
25
+ });
26
+
27
+ on('keypress', function(event) {
28
+ if (event.which == 13) {
29
+ handler.call(this);
30
+ }
31
+ });
32
+ },
33
+ };
34
+ }());
@@ -38,7 +38,7 @@
38
38
  widget.resizer.expand();
39
39
  widget.scroller.expand();
40
40
 
41
- if (mobileLayout()) {
41
+ if (phoneLayout()) {
42
42
  hidePageContent();
43
43
  }
44
44
  },
@@ -212,7 +212,11 @@
212
212
  });
213
213
 
214
214
  function mobileLayout() {
215
- return ($('body').width() <= 900);
215
+ return ($('body').width() <= 900) || pageflow.browser.has('mobile platform');
216
+ }
217
+
218
+ function phoneLayout() {
219
+ return ($('body').width() <= 700);
216
220
  }
217
221
 
218
222
  function hidePageContent() {
@@ -4,7 +4,7 @@
4
4
  cursor: pointer;
5
5
  pointer-events: all;
6
6
  position: absolute;
7
- top: 0;
7
+ top: 15px;
8
8
  left: -105px;
9
9
  width: 45px;
10
10
  height: 45px;
@@ -2,6 +2,10 @@
2
2
  height: 45px;
3
3
  position: absolute;
4
4
 
5
+ &.chapters {
6
+ top: 15px;
7
+ }
8
+
5
9
  &.share,
6
10
  &.credits {
7
11
  opacity: 0;
@@ -1,5 +1,5 @@
1
1
  module Pageflow
2
2
  module OutlineNavigationBar
3
- VERSION = '0.1.0'.freeze
3
+ VERSION = '1.0.0'.freeze
4
4
  end
5
5
  end
@@ -16,11 +16,14 @@ Gem::Specification.new do |spec|
16
16
  spec.test_files = spec.files.grep(%r{^spec/})
17
17
  spec.require_paths = ['lib']
18
18
 
19
- spec.add_runtime_dependency 'pageflow', '~> 0.11'
19
+ spec.required_ruby_version = '~> 2.1'
20
20
 
21
- spec.add_development_dependency 'bundler'
22
- spec.add_development_dependency 'rake'
21
+ spec.add_runtime_dependency 'pageflow', ['>= 0.11', '< 13']
22
+ spec.add_runtime_dependency 'pageflow-public-i18n', '~> 1.0'
23
+
24
+ spec.add_development_dependency 'bundler', '~> 1.0'
25
+ spec.add_development_dependency 'rake', '~> 12.0'
23
26
 
24
27
  # Semantic versioning rake tasks
25
- spec.add_development_dependency 'semmy', '~> 0.3.0'
28
+ spec.add_development_dependency 'semmy', '~> 1.0'
26
29
  end
metadata CHANGED
@@ -1,71 +1,91 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: pageflow-outline-navigation-bar
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 1.0.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: 2016-09-09 00:00:00.000000000 Z
11
+ date: 2017-08-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: pageflow
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - "~>"
17
+ - - ">="
18
18
  - !ruby/object:Gem::Version
19
19
  version: '0.11'
20
+ - - "<"
21
+ - !ruby/object:Gem::Version
22
+ version: '13'
20
23
  type: :runtime
21
24
  prerelease: false
22
25
  version_requirements: !ruby/object:Gem::Requirement
23
26
  requirements:
24
- - - "~>"
27
+ - - ">="
25
28
  - !ruby/object:Gem::Version
26
29
  version: '0.11'
30
+ - - "<"
31
+ - !ruby/object:Gem::Version
32
+ version: '13'
33
+ - !ruby/object:Gem::Dependency
34
+ name: pageflow-public-i18n
35
+ requirement: !ruby/object:Gem::Requirement
36
+ requirements:
37
+ - - "~>"
38
+ - !ruby/object:Gem::Version
39
+ version: '1.0'
40
+ type: :runtime
41
+ prerelease: false
42
+ version_requirements: !ruby/object:Gem::Requirement
43
+ requirements:
44
+ - - "~>"
45
+ - !ruby/object:Gem::Version
46
+ version: '1.0'
27
47
  - !ruby/object:Gem::Dependency
28
48
  name: bundler
29
49
  requirement: !ruby/object:Gem::Requirement
30
50
  requirements:
31
- - - ">="
51
+ - - "~>"
32
52
  - !ruby/object:Gem::Version
33
- version: '0'
53
+ version: '1.0'
34
54
  type: :development
35
55
  prerelease: false
36
56
  version_requirements: !ruby/object:Gem::Requirement
37
57
  requirements:
38
- - - ">="
58
+ - - "~>"
39
59
  - !ruby/object:Gem::Version
40
- version: '0'
60
+ version: '1.0'
41
61
  - !ruby/object:Gem::Dependency
42
62
  name: rake
43
63
  requirement: !ruby/object:Gem::Requirement
44
64
  requirements:
45
- - - ">="
65
+ - - "~>"
46
66
  - !ruby/object:Gem::Version
47
- version: '0'
67
+ version: '12.0'
48
68
  type: :development
49
69
  prerelease: false
50
70
  version_requirements: !ruby/object:Gem::Requirement
51
71
  requirements:
52
- - - ">="
72
+ - - "~>"
53
73
  - !ruby/object:Gem::Version
54
- version: '0'
74
+ version: '12.0'
55
75
  - !ruby/object:Gem::Dependency
56
76
  name: semmy
57
77
  requirement: !ruby/object:Gem::Requirement
58
78
  requirements:
59
79
  - - "~>"
60
80
  - !ruby/object:Gem::Version
61
- version: 0.3.0
81
+ version: '1.0'
62
82
  type: :development
63
83
  prerelease: false
64
84
  version_requirements: !ruby/object:Gem::Requirement
65
85
  requirements:
66
86
  - - "~>"
67
87
  - !ruby/object:Gem::Version
68
- version: 0.3.0
88
+ version: '1.0'
69
89
  description:
70
90
  email:
71
91
  - info@codevise.de
@@ -97,7 +117,7 @@ files:
97
117
  - app/assets/javascript/pageflow/outline_navigation_bar/widget.js
98
118
  - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default.scss
99
119
  - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/credits_box.scss
100
- - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/cross_dependant_styles.css.scss
120
+ - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/cross_dependant_styles.scss
101
121
  - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/icons/icon_font.scss
102
122
  - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/icons/sprite.scss
103
123
  - app/assets/stylesheets/pageflow/outline_navigation_bar/themes/default/menu_item.scss
@@ -143,9 +163,9 @@ require_paths:
143
163
  - lib
144
164
  required_ruby_version: !ruby/object:Gem::Requirement
145
165
  requirements:
146
- - - ">="
166
+ - - "~>"
147
167
  - !ruby/object:Gem::Version
148
- version: '0'
168
+ version: '2.1'
149
169
  required_rubygems_version: !ruby/object:Gem::Requirement
150
170
  requirements:
151
171
  - - ">="
@@ -153,7 +173,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
153
173
  version: '0'
154
174
  requirements: []
155
175
  rubyforge_project:
156
- rubygems_version: 2.5.1
176
+ rubygems_version: 2.6.8
157
177
  signing_key:
158
178
  specification_version: 4
159
179
  summary: Pageflow navigation widget.