jquery-mousewheel-rails 0.0.1 → 0.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.gitignore +7 -0
- data/Gemfile +17 -0
- data/Gemfile.lock +67 -0
- data/jquery-mousewheel-rails.gemspec +21 -0
- data/lib/jquery-mousewheel-rails/version.rb +1 -1
- data/test/dummy/app/mailers/.gitkeep +0 -0
- data/test/dummy/app/models/.gitkeep +0 -0
- data/test/dummy/lib/assets/.gitkeep +0 -0
- data/test/dummy/log/.gitkeep +0 -0
- data/vendor/assets/javascripts/jquery.mousewheel.js +84 -0
- metadata +58 -45
data/.gitignore
ADDED
data/Gemfile
ADDED
@@ -0,0 +1,17 @@
|
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
# Declare your gem's dependencies in jquery-mousewheel-rails.gemspec.
|
4
|
+
# Bundler will treat runtime dependencies like base dependencies, and
|
5
|
+
# development dependencies will be added by default to the :development group.
|
6
|
+
gemspec
|
7
|
+
|
8
|
+
# jquery-rails is used by the dummy application
|
9
|
+
gem "jquery-rails"
|
10
|
+
|
11
|
+
# Declare any dependencies that are still in development here instead of in
|
12
|
+
# your gemspec. These might include edge Rails or gems from your path or
|
13
|
+
# Git. Remember to move these dependencies to your gemspec before releasing
|
14
|
+
# your gem to rubygems.org.
|
15
|
+
|
16
|
+
# To use debugger
|
17
|
+
# gem 'debugger'
|
data/Gemfile.lock
ADDED
@@ -0,0 +1,67 @@
|
|
1
|
+
PATH
|
2
|
+
remote: .
|
3
|
+
specs:
|
4
|
+
jquery-mousewheel-rails (0.0.2)
|
5
|
+
railties (>= 3.1)
|
6
|
+
|
7
|
+
GEM
|
8
|
+
remote: http://rubygems.org/
|
9
|
+
specs:
|
10
|
+
actionpack (3.2.8)
|
11
|
+
activemodel (= 3.2.8)
|
12
|
+
activesupport (= 3.2.8)
|
13
|
+
builder (~> 3.0.0)
|
14
|
+
erubis (~> 2.7.0)
|
15
|
+
journey (~> 1.0.4)
|
16
|
+
rack (~> 1.4.0)
|
17
|
+
rack-cache (~> 1.2)
|
18
|
+
rack-test (~> 0.6.1)
|
19
|
+
sprockets (~> 2.1.3)
|
20
|
+
activemodel (3.2.8)
|
21
|
+
activesupport (= 3.2.8)
|
22
|
+
builder (~> 3.0.0)
|
23
|
+
activesupport (3.2.8)
|
24
|
+
i18n (~> 0.6)
|
25
|
+
multi_json (~> 1.0)
|
26
|
+
builder (3.0.3)
|
27
|
+
erubis (2.7.0)
|
28
|
+
hike (1.2.1)
|
29
|
+
i18n (0.6.1)
|
30
|
+
journey (1.0.4)
|
31
|
+
jquery-rails (2.1.3)
|
32
|
+
railties (>= 3.1.0, < 5.0)
|
33
|
+
thor (~> 0.14)
|
34
|
+
json (1.7.5)
|
35
|
+
multi_json (1.3.6)
|
36
|
+
rack (1.4.1)
|
37
|
+
rack-cache (1.2)
|
38
|
+
rack (>= 0.4)
|
39
|
+
rack-ssl (1.3.2)
|
40
|
+
rack
|
41
|
+
rack-test (0.6.2)
|
42
|
+
rack (>= 1.0)
|
43
|
+
railties (3.2.8)
|
44
|
+
actionpack (= 3.2.8)
|
45
|
+
activesupport (= 3.2.8)
|
46
|
+
rack-ssl (~> 1.3.2)
|
47
|
+
rake (>= 0.8.7)
|
48
|
+
rdoc (~> 3.4)
|
49
|
+
thor (>= 0.14.6, < 2.0)
|
50
|
+
rake (0.9.2.2)
|
51
|
+
rdoc (3.12)
|
52
|
+
json (~> 1.4)
|
53
|
+
sprockets (2.1.3)
|
54
|
+
hike (~> 1.2)
|
55
|
+
rack (~> 1.0)
|
56
|
+
tilt (~> 1.1, != 1.3.0)
|
57
|
+
sqlite3 (1.3.6)
|
58
|
+
thor (0.16.0)
|
59
|
+
tilt (1.3.3)
|
60
|
+
|
61
|
+
PLATFORMS
|
62
|
+
ruby
|
63
|
+
|
64
|
+
DEPENDENCIES
|
65
|
+
jquery-mousewheel-rails!
|
66
|
+
jquery-rails
|
67
|
+
sqlite3
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# Maintain your gem's version:
|
2
|
+
require File.expand_path("../lib/jquery-mousewheel-rails/version", __FILE__)
|
3
|
+
|
4
|
+
# Describe your gem and declare its dependencies:
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "jquery-mousewheel-rails"
|
7
|
+
s.version = JqueryMousewheelRails::VERSION
|
8
|
+
s.authors = ["Mike MacDonald"]
|
9
|
+
s.email = ["crazymykl@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/crazymykl/jquery-mousewheel-rails"
|
11
|
+
s.summary = "Integrates jquery-mousewheel with rails."
|
12
|
+
s.description = ""
|
13
|
+
|
14
|
+
s.files = `git ls-files`.split($/)
|
15
|
+
s.executables = s.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
16
|
+
s.test_files = s.files.grep(%r{^(test|spec|features)/})
|
17
|
+
s.require_paths = ["lib"]
|
18
|
+
|
19
|
+
s.add_runtime_dependency 'railties', '>= 3.1'
|
20
|
+
s.add_development_dependency "sqlite3"
|
21
|
+
end
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -0,0 +1,84 @@
|
|
1
|
+
/*! Copyright (c) 2011 Brandon Aaron (http://brandonaaron.net)
|
2
|
+
* Licensed under the MIT License (LICENSE.txt).
|
3
|
+
*
|
4
|
+
* Thanks to: http://adomas.org/javascript-mouse-wheel/ for some pointers.
|
5
|
+
* Thanks to: Mathias Bank(http://www.mathias-bank.de) for a scope bug fix.
|
6
|
+
* Thanks to: Seamus Leahy for adding deltaX and deltaY
|
7
|
+
*
|
8
|
+
* Version: 3.0.6
|
9
|
+
*
|
10
|
+
* Requires: 1.2.2+
|
11
|
+
*/
|
12
|
+
|
13
|
+
(function($) {
|
14
|
+
|
15
|
+
var types = ['DOMMouseScroll', 'mousewheel'];
|
16
|
+
|
17
|
+
if ($.event.fixHooks) {
|
18
|
+
for ( var i=types.length; i; ) {
|
19
|
+
$.event.fixHooks[ types[--i] ] = $.event.mouseHooks;
|
20
|
+
}
|
21
|
+
}
|
22
|
+
|
23
|
+
$.event.special.mousewheel = {
|
24
|
+
setup: function() {
|
25
|
+
if ( this.addEventListener ) {
|
26
|
+
for ( var i=types.length; i; ) {
|
27
|
+
this.addEventListener( types[--i], handler, false );
|
28
|
+
}
|
29
|
+
} else {
|
30
|
+
this.onmousewheel = handler;
|
31
|
+
}
|
32
|
+
},
|
33
|
+
|
34
|
+
teardown: function() {
|
35
|
+
if ( this.removeEventListener ) {
|
36
|
+
for ( var i=types.length; i; ) {
|
37
|
+
this.removeEventListener( types[--i], handler, false );
|
38
|
+
}
|
39
|
+
} else {
|
40
|
+
this.onmousewheel = null;
|
41
|
+
}
|
42
|
+
}
|
43
|
+
};
|
44
|
+
|
45
|
+
$.fn.extend({
|
46
|
+
mousewheel: function(fn) {
|
47
|
+
return fn ? this.bind("mousewheel", fn) : this.trigger("mousewheel");
|
48
|
+
},
|
49
|
+
|
50
|
+
unmousewheel: function(fn) {
|
51
|
+
return this.unbind("mousewheel", fn);
|
52
|
+
}
|
53
|
+
});
|
54
|
+
|
55
|
+
|
56
|
+
function handler(event) {
|
57
|
+
var orgEvent = event || window.event, args = [].slice.call( arguments, 1 ), delta = 0, returnValue = true, deltaX = 0, deltaY = 0;
|
58
|
+
event = $.event.fix(orgEvent);
|
59
|
+
event.type = "mousewheel";
|
60
|
+
|
61
|
+
// Old school scrollwheel delta
|
62
|
+
if ( orgEvent.wheelDelta ) { delta = orgEvent.wheelDelta/120; }
|
63
|
+
if ( orgEvent.detail ) { delta = -orgEvent.detail/3; }
|
64
|
+
|
65
|
+
// New school multidimensional scroll (touchpads) deltas
|
66
|
+
deltaY = delta;
|
67
|
+
|
68
|
+
// Gecko
|
69
|
+
if ( orgEvent.axis !== undefined && orgEvent.axis === orgEvent.HORIZONTAL_AXIS ) {
|
70
|
+
deltaY = 0;
|
71
|
+
deltaX = -1*delta;
|
72
|
+
}
|
73
|
+
|
74
|
+
// Webkit
|
75
|
+
if ( orgEvent.wheelDeltaY !== undefined ) { deltaY = orgEvent.wheelDeltaY/120; }
|
76
|
+
if ( orgEvent.wheelDeltaX !== undefined ) { deltaX = -1*orgEvent.wheelDeltaX/120; }
|
77
|
+
|
78
|
+
// Add event and delta to the front of the arguments
|
79
|
+
args.unshift(event, delta, deltaX, deltaY);
|
80
|
+
|
81
|
+
return ($.event.dispatch || $.event.handle).apply(this, args);
|
82
|
+
}
|
83
|
+
|
84
|
+
})(jQuery);
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: jquery-mousewheel-rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.0.
|
4
|
+
version: 0.0.2
|
5
5
|
prerelease:
|
6
6
|
platform: ruby
|
7
7
|
authors:
|
@@ -9,14 +9,14 @@ authors:
|
|
9
9
|
autorequire:
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
|
-
date: 2012-10-
|
12
|
+
date: 2012-10-16 00:00:00.000000000 Z
|
13
13
|
dependencies:
|
14
14
|
- !ruby/object:Gem::Dependency
|
15
|
-
name:
|
15
|
+
name: railties
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
17
17
|
none: false
|
18
18
|
requirements:
|
19
|
-
- -
|
19
|
+
- - ! '>='
|
20
20
|
- !ruby/object:Gem::Version
|
21
21
|
version: '3.1'
|
22
22
|
type: :runtime
|
@@ -24,7 +24,7 @@ dependencies:
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
25
25
|
none: false
|
26
26
|
requirements:
|
27
|
-
- -
|
27
|
+
- - ! '>='
|
28
28
|
- !ruby/object:Gem::Version
|
29
29
|
version: '3.1'
|
30
30
|
- !ruby/object:Gem::Dependency
|
@@ -50,42 +50,51 @@ executables: []
|
|
50
50
|
extensions: []
|
51
51
|
extra_rdoc_files: []
|
52
52
|
files:
|
53
|
-
-
|
54
|
-
-
|
55
|
-
-
|
53
|
+
- .gitignore
|
54
|
+
- Gemfile
|
55
|
+
- Gemfile.lock
|
56
56
|
- MIT-LICENSE
|
57
|
-
- Rakefile
|
58
57
|
- README.rdoc
|
59
|
-
-
|
60
|
-
-
|
58
|
+
- Rakefile
|
59
|
+
- jquery-mousewheel-rails.gemspec
|
60
|
+
- lib/jquery-mousewheel-rails.rb
|
61
|
+
- lib/jquery-mousewheel-rails/version.rb
|
62
|
+
- lib/tasks/jquery-mousewheel-rails_tasks.rake
|
61
63
|
- test/dummy/README.rdoc
|
64
|
+
- test/dummy/Rakefile
|
65
|
+
- test/dummy/app/assets/javascripts/application.js
|
66
|
+
- test/dummy/app/assets/stylesheets/application.css
|
67
|
+
- test/dummy/app/controllers/application_controller.rb
|
68
|
+
- test/dummy/app/helpers/application_helper.rb
|
69
|
+
- test/dummy/app/mailers/.gitkeep
|
70
|
+
- test/dummy/app/models/.gitkeep
|
71
|
+
- test/dummy/app/views/layouts/application.html.erb
|
72
|
+
- test/dummy/config.ru
|
73
|
+
- test/dummy/config/application.rb
|
62
74
|
- test/dummy/config/boot.rb
|
63
75
|
- test/dummy/config/database.yml
|
64
76
|
- test/dummy/config/environment.rb
|
65
77
|
- test/dummy/config/environments/development.rb
|
66
78
|
- test/dummy/config/environments/production.rb
|
67
79
|
- test/dummy/config/environments/test.rb
|
68
|
-
- test/dummy/config/application.rb
|
69
|
-
- test/dummy/config/locales/en.yml
|
70
|
-
- test/dummy/config/initializers/secret_token.rb
|
71
80
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
72
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
73
|
-
- test/dummy/config/initializers/session_store.rb
|
74
|
-
- test/dummy/config/initializers/mime_types.rb
|
75
81
|
- test/dummy/config/initializers/inflections.rb
|
82
|
+
- test/dummy/config/initializers/mime_types.rb
|
83
|
+
- test/dummy/config/initializers/secret_token.rb
|
84
|
+
- test/dummy/config/initializers/session_store.rb
|
85
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
86
|
+
- test/dummy/config/locales/en.yml
|
76
87
|
- test/dummy/config/routes.rb
|
77
|
-
- test/dummy/
|
78
|
-
- test/dummy/
|
88
|
+
- test/dummy/lib/assets/.gitkeep
|
89
|
+
- test/dummy/log/.gitkeep
|
90
|
+
- test/dummy/public/404.html
|
91
|
+
- test/dummy/public/422.html
|
79
92
|
- test/dummy/public/500.html
|
80
93
|
- test/dummy/public/favicon.ico
|
81
|
-
- test/dummy/public/422.html
|
82
|
-
- test/dummy/public/404.html
|
83
|
-
- test/dummy/app/views/layouts/application.html.erb
|
84
|
-
- test/dummy/app/controllers/application_controller.rb
|
85
|
-
- test/dummy/app/helpers/application_helper.rb
|
86
|
-
- test/dummy/app/assets/stylesheets/application.css
|
87
|
-
- test/dummy/app/assets/javascripts/application.js
|
88
94
|
- test/dummy/script/rails
|
95
|
+
- test/jquery-mousewheel-rails_test.rb
|
96
|
+
- test/test_helper.rb
|
97
|
+
- vendor/assets/javascripts/jquery.mousewheel.js
|
89
98
|
homepage: https://github.com/crazymykl/jquery-mousewheel-rails
|
90
99
|
licenses: []
|
91
100
|
post_install_message:
|
@@ -100,7 +109,7 @@ required_ruby_version: !ruby/object:Gem::Requirement
|
|
100
109
|
version: '0'
|
101
110
|
segments:
|
102
111
|
- 0
|
103
|
-
hash:
|
112
|
+
hash: -1167816390643979616
|
104
113
|
required_rubygems_version: !ruby/object:Gem::Requirement
|
105
114
|
none: false
|
106
115
|
requirements:
|
@@ -109,7 +118,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
109
118
|
version: '0'
|
110
119
|
segments:
|
111
120
|
- 0
|
112
|
-
hash:
|
121
|
+
hash: -1167816390643979616
|
113
122
|
requirements: []
|
114
123
|
rubyforge_project:
|
115
124
|
rubygems_version: 1.8.24
|
@@ -117,33 +126,37 @@ signing_key:
|
|
117
126
|
specification_version: 3
|
118
127
|
summary: Integrates jquery-mousewheel with rails.
|
119
128
|
test_files:
|
120
|
-
- test/jquery-mousewheel-rails_test.rb
|
121
|
-
- test/test_helper.rb
|
122
129
|
- test/dummy/README.rdoc
|
130
|
+
- test/dummy/Rakefile
|
131
|
+
- test/dummy/app/assets/javascripts/application.js
|
132
|
+
- test/dummy/app/assets/stylesheets/application.css
|
133
|
+
- test/dummy/app/controllers/application_controller.rb
|
134
|
+
- test/dummy/app/helpers/application_helper.rb
|
135
|
+
- test/dummy/app/mailers/.gitkeep
|
136
|
+
- test/dummy/app/models/.gitkeep
|
137
|
+
- test/dummy/app/views/layouts/application.html.erb
|
138
|
+
- test/dummy/config.ru
|
139
|
+
- test/dummy/config/application.rb
|
123
140
|
- test/dummy/config/boot.rb
|
124
141
|
- test/dummy/config/database.yml
|
125
142
|
- test/dummy/config/environment.rb
|
126
143
|
- test/dummy/config/environments/development.rb
|
127
144
|
- test/dummy/config/environments/production.rb
|
128
145
|
- test/dummy/config/environments/test.rb
|
129
|
-
- test/dummy/config/application.rb
|
130
|
-
- test/dummy/config/locales/en.yml
|
131
|
-
- test/dummy/config/initializers/secret_token.rb
|
132
146
|
- test/dummy/config/initializers/backtrace_silencers.rb
|
133
|
-
- test/dummy/config/initializers/wrap_parameters.rb
|
134
|
-
- test/dummy/config/initializers/session_store.rb
|
135
|
-
- test/dummy/config/initializers/mime_types.rb
|
136
147
|
- test/dummy/config/initializers/inflections.rb
|
148
|
+
- test/dummy/config/initializers/mime_types.rb
|
149
|
+
- test/dummy/config/initializers/secret_token.rb
|
150
|
+
- test/dummy/config/initializers/session_store.rb
|
151
|
+
- test/dummy/config/initializers/wrap_parameters.rb
|
152
|
+
- test/dummy/config/locales/en.yml
|
137
153
|
- test/dummy/config/routes.rb
|
138
|
-
- test/dummy/
|
139
|
-
- test/dummy/
|
154
|
+
- test/dummy/lib/assets/.gitkeep
|
155
|
+
- test/dummy/log/.gitkeep
|
156
|
+
- test/dummy/public/404.html
|
157
|
+
- test/dummy/public/422.html
|
140
158
|
- test/dummy/public/500.html
|
141
159
|
- test/dummy/public/favicon.ico
|
142
|
-
- test/dummy/public/422.html
|
143
|
-
- test/dummy/public/404.html
|
144
|
-
- test/dummy/app/views/layouts/application.html.erb
|
145
|
-
- test/dummy/app/controllers/application_controller.rb
|
146
|
-
- test/dummy/app/helpers/application_helper.rb
|
147
|
-
- test/dummy/app/assets/stylesheets/application.css
|
148
|
-
- test/dummy/app/assets/javascripts/application.js
|
149
160
|
- test/dummy/script/rails
|
161
|
+
- test/jquery-mousewheel-rails_test.rb
|
162
|
+
- test/test_helper.rb
|