fooltip 0.0.9 → 0.0.10

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: b0a5bec6d4d5894b07a0fa0a27a0486c63da2ede
4
- data.tar.gz: ce3ca6e789e8bfe0405219a7278b64c9aff0bf3d
3
+ metadata.gz: c143b9494e56cfdbf898380cc910e8b7dd9b95e6
4
+ data.tar.gz: dec31ebe31532af51fd91a37f189a8bddb093784
5
5
  SHA512:
6
- metadata.gz: 43210e5105b96bde2d345358d4cc8d423c3757fcde4ad7f27027fab2a1862566bb18729cd2b232264df393b5f06ccf840dbca3f879c265ff0a3c72dd574c9f71
7
- data.tar.gz: 6b6fbfe64698d8bcdf741b10edb09d2787931d2cbe595bfff7d98778ec6ab2fe6a50575548ca1b6dd172769e45496bc725f6bc2bc21e5a92b21f564d86461973
6
+ metadata.gz: 4318d52cf8bc8177e2921593acecc627421ce3d3d044f94819f2bc3c0b214dd114c80710e28f22dc2ea5b7eb63e5cbe17969eb68defd022060070758fa84d6f6
7
+ data.tar.gz: 0f7e979a60edf64f4627b0fa596a5daca466a83548bffd2232929fcdef4ece8c49ba8b54b49172e73a34f6692e3a7680d96753d7e9fa3254a3c8472895a92020
@@ -1,15 +1,62 @@
1
+ (function($, sr) {
2
+
3
+ // debouncing function from John Hann
4
+ // http://unscriptable.com/index.php/2009/03/20/debouncing-javascript-methods/
5
+ var debounce = function (func, threshold, execAsap) {
6
+ var timeout;
7
+
8
+ return function debounced () {
9
+ var obj = this, args = arguments;
10
+ function delayed () {
11
+ if (!execAsap)
12
+ func.apply(obj, args);
13
+ timeout = null;
14
+ };
15
+
16
+ if (timeout)
17
+ clearTimeout(timeout);
18
+ else if (execAsap)
19
+ func.apply(obj, args);
20
+
21
+ timeout = setTimeout(delayed, threshold || 100);
22
+ };
23
+ }
24
+ // smartresize
25
+ jQuery.fn[sr] = function(fn){ return fn ? this.bind('resize', debounce(fn)) : this.trigger(sr); };
26
+
27
+ })(jQuery, 'smartresize');
28
+
29
+
1
30
  $(document).ready(function() {
2
31
 
3
- $('.fooltip-link-container').each(function() {
4
- $(this).children('a').attr('data-content', $(this).children('.content').html());
5
- $(this).children('a').attr('data-original-title', $(this).children('.title').html());
6
- });
32
+ $('.fooltip-link-container').each(function() {
33
+ $(this).children('a').attr('data-content', $(this).children('.content').html());
34
+ $(this).children('a').attr('data-original-title', $(this).children('.title').html());
35
+ });
36
+
37
+ $('.fooltip-link').popover();
38
+
39
+ $('.popover .close').live('click', function() {
40
+ id = $(this).closest('.popover').find('.fooltip-popup').attr('data-fooltip-link-id');
41
+ $('#' + id).popover('hide');
42
+ });
43
+
7
44
 
8
- $('.fooltip-link').popover();
45
+ $(window).smartresize(function() {
46
+ $('.fooltip').resize();
47
+ });
9
48
 
10
- $('.popover .close').live('click', function() {
11
- id = $(this).closest('.popover').find('.fooltip-popup').attr('data-fooltip-link-id');
12
- $('#' + id).popover('hide');
13
- });
49
+ $('.fooltip').resize(function() {
50
+ $container = $(this).find('.fooltip-container');
51
+ width = $container.width();
52
+ height = $container.height();
53
+ $container.find('.fooltip-link').each(function() {
54
+ new_left = width * $(this).attr('data-left') / 100;
55
+ new_top = height * $(this).attr('data-top') / 100;
56
+ $(this).css('left', new_left);
57
+ $(this).css('top', new_top);
58
+ });
59
+ });
60
+ $('.fooltip').resize();
14
61
 
15
62
  });
@@ -9,7 +9,7 @@
9
9
  .fooltip-container
10
10
  - container.links.each do |link|
11
11
  %span{ id: "fooltip-link-#{link.id}", class: "fooltip-link-container" }
12
- = link_to '', 'javascript:void(0);', class: "fooltip-link", id: "link-#{link.id}", data: { content: "", placement: link.placement_string, toggle: "popover", :"original-title" => "", html: true, trigger: link.trigger_string }, style: "top: #{link.y}px; left: #{link.x}px;"
12
+ = link_to '', 'javascript:void(0);', class: "fooltip-link", id: "link-#{link.id}", data: { content: "", placement: link.placement_string, toggle: "popover", :"original-title" => "", html: true, trigger: link.trigger_string, top: link.y, left: link.x }
13
13
  .title{ style: "display: none;" }
14
14
  %a{ href: "javascript:void(0)", class: "close" } ×
15
15
  = link.popup.title
@@ -1,3 +1,3 @@
1
1
  module Fooltip
2
- VERSION = "0.0.9"
2
+ VERSION = "0.0.10"
3
3
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: fooltip
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.9
4
+ version: 0.0.10
5
5
  platform: ruby
6
6
  authors:
7
7
  - Intesys S.r.l.
@@ -9,120 +9,126 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-05-22 00:00:00.000000000 Z
12
+ date: 2014-11-06 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
16
16
  requirement: !ruby/object:Gem::Requirement
17
17
  requirements:
18
- - - '>='
18
+ - - ">="
19
19
  - !ruby/object:Gem::Version
20
20
  version: 3.1.0
21
21
  type: :runtime
22
22
  prerelease: false
23
23
  version_requirements: !ruby/object:Gem::Requirement
24
24
  requirements:
25
- - - '>='
25
+ - - ">="
26
26
  - !ruby/object:Gem::Version
27
27
  version: 3.1.0
28
28
  - !ruby/object:Gem::Dependency
29
29
  name: globalize3
30
30
  requirement: !ruby/object:Gem::Requirement
31
31
  requirements:
32
- - - '>='
32
+ - - ">="
33
33
  - !ruby/object:Gem::Version
34
34
  version: 0.3.0
35
35
  type: :runtime
36
36
  prerelease: false
37
37
  version_requirements: !ruby/object:Gem::Requirement
38
38
  requirements:
39
- - - '>='
39
+ - - ">="
40
40
  - !ruby/object:Gem::Version
41
41
  version: 0.3.0
42
42
  - !ruby/object:Gem::Dependency
43
43
  name: carrierwave
44
44
  requirement: !ruby/object:Gem::Requirement
45
45
  requirements:
46
- - - '>='
46
+ - - ">="
47
47
  - !ruby/object:Gem::Version
48
48
  version: 0.8.0
49
49
  type: :runtime
50
50
  prerelease: false
51
51
  version_requirements: !ruby/object:Gem::Requirement
52
52
  requirements:
53
- - - '>='
53
+ - - ">="
54
54
  - !ruby/object:Gem::Version
55
55
  version: 0.8.0
56
56
  - !ruby/object:Gem::Dependency
57
57
  name: mini_magick
58
58
  requirement: !ruby/object:Gem::Requirement
59
59
  requirements:
60
- - - '>='
60
+ - - ">="
61
61
  - !ruby/object:Gem::Version
62
62
  version: '3.4'
63
63
  type: :runtime
64
64
  prerelease: false
65
65
  version_requirements: !ruby/object:Gem::Requirement
66
66
  requirements:
67
- - - '>='
67
+ - - ">="
68
68
  - !ruby/object:Gem::Version
69
69
  version: '3.4'
70
70
  - !ruby/object:Gem::Dependency
71
71
  name: haml
72
72
  requirement: !ruby/object:Gem::Requirement
73
73
  requirements:
74
- - - '>='
74
+ - - ">="
75
75
  - !ruby/object:Gem::Version
76
76
  version: '0'
77
77
  type: :runtime
78
78
  prerelease: false
79
79
  version_requirements: !ruby/object:Gem::Requirement
80
80
  requirements:
81
- - - '>='
81
+ - - ">="
82
82
  - !ruby/object:Gem::Version
83
83
  version: '0'
84
84
  - !ruby/object:Gem::Dependency
85
85
  name: sass-rails
86
86
  requirement: !ruby/object:Gem::Requirement
87
87
  requirements:
88
- - - '>='
88
+ - - ">="
89
89
  - !ruby/object:Gem::Version
90
90
  version: '3.1'
91
91
  type: :runtime
92
92
  prerelease: false
93
93
  version_requirements: !ruby/object:Gem::Requirement
94
94
  requirements:
95
- - - '>='
95
+ - - ">="
96
96
  - !ruby/object:Gem::Version
97
97
  version: '3.1'
98
98
  - !ruby/object:Gem::Dependency
99
99
  name: jquery-rails
100
100
  requirement: !ruby/object:Gem::Requirement
101
101
  requirements:
102
- - - '>='
102
+ - - ">="
103
103
  - !ruby/object:Gem::Version
104
104
  version: 1.0.0
105
105
  type: :runtime
106
106
  prerelease: false
107
107
  version_requirements: !ruby/object:Gem::Requirement
108
108
  requirements:
109
- - - '>='
109
+ - - ">="
110
110
  - !ruby/object:Gem::Version
111
111
  version: 1.0.0
112
112
  - !ruby/object:Gem::Dependency
113
113
  name: bootstrap-sass
114
114
  requirement: !ruby/object:Gem::Requirement
115
115
  requirements:
116
- - - '>='
116
+ - - ">="
117
117
  - !ruby/object:Gem::Version
118
118
  version: '2.0'
119
+ - - "<"
120
+ - !ruby/object:Gem::Version
121
+ version: '3'
119
122
  type: :runtime
120
123
  prerelease: false
121
124
  version_requirements: !ruby/object:Gem::Requirement
122
125
  requirements:
123
- - - '>='
126
+ - - ">="
124
127
  - !ruby/object:Gem::Version
125
128
  version: '2.0'
129
+ - - "<"
130
+ - !ruby/object:Gem::Version
131
+ version: '3'
126
132
  description: Fooltip - when a tooltip just isn't enough.
127
133
  email:
128
134
  - daniel.jonasson@intesys.it
@@ -130,83 +136,83 @@ executables: []
130
136
  extensions: []
131
137
  extra_rdoc_files: []
132
138
  files:
139
+ - MIT-LICENSE
140
+ - README.rdoc
141
+ - Rakefile
142
+ - app/assets/images/fooltip/link.png
143
+ - app/assets/javascripts/fooltip/application.js
144
+ - app/assets/javascripts/fooltip/containers.js
145
+ - app/assets/stylesheets/fooltip/application.css.sass
146
+ - app/assets/stylesheets/fooltip/containers.css.sass
133
147
  - app/controllers/fooltip/application_controller.rb
134
148
  - app/controllers/fooltip/containers_controller.rb
135
- - app/uploaders/fooltip/image_uploader.rb
136
- - app/views/fooltip/containers/show.html.haml
137
- - app/views/fooltip/containers/_container.html.haml
138
- - app/views/layouts/fooltip/application.html.haml
139
- - app/models/fooltip/popup.rb
149
+ - app/helpers/fooltip/application_helper.rb
150
+ - app/helpers/fooltip/containers_helper.rb
140
151
  - app/models/fooltip/association.rb
141
152
  - app/models/fooltip/container.rb
142
153
  - app/models/fooltip/link.rb
143
- - app/helpers/fooltip/containers_helper.rb
144
- - app/helpers/fooltip/application_helper.rb
145
- - app/assets/javascripts/fooltip/containers.js
146
- - app/assets/javascripts/fooltip/application.js
147
- - app/assets/stylesheets/fooltip/application.css.sass
148
- - app/assets/stylesheets/fooltip/containers.css.sass
149
- - app/assets/images/fooltip/link.png
154
+ - app/models/fooltip/popup.rb
155
+ - app/uploaders/fooltip/image_uploader.rb
156
+ - app/views/fooltip/containers/_container.html.haml
157
+ - app/views/fooltip/containers/show.html.haml
158
+ - app/views/layouts/fooltip/application.html.haml
150
159
  - config/routes.rb
151
160
  - db/migrate/20130402091259_create_fooltip_tables.rb
152
- - lib/tasks/fooltip_tasks.rake
153
- - lib/tasks/testing_tasks.rake
161
+ - lib/fooltip.rb
162
+ - lib/fooltip/active_record.rb
154
163
  - lib/fooltip/engine.rb
155
164
  - lib/fooltip/version.rb
156
- - lib/fooltip/active_record.rb
157
- - lib/fooltip.rb
158
- - MIT-LICENSE
159
- - Rakefile
160
- - README.rdoc
165
+ - lib/tasks/fooltip_tasks.rake
166
+ - lib/tasks/testing_tasks.rake
161
167
  - spec/controllers/fooltip/containers_controller_spec.rb
162
- - spec/uploaders/image_uploader_spec.rb
163
- - spec/models/fooltip/link_spec.rb
164
- - spec/models/fooltip/association_spec.rb
165
- - spec/models/fooltip/container_spec.rb
166
- - spec/models/fooltip/popup_spec.rb
167
168
  - spec/data/logo.gif
168
- - spec/data/schema.rb
169
169
  - spec/data/models.rb
170
- - spec/spec_helper.rb
171
- - spec/helpers/fooltip/containers_helper_spec.rb
172
- - spec/fooltip_spec.rb
173
- - spec/factories/fooltip/links.rb
174
- - spec/factories/fooltip/containers.rb
175
- - spec/factories/fooltip/popups.rb
176
- - spec/factories_spec.rb
170
+ - spec/data/schema.rb
177
171
  - spec/dummy/README.rdoc
178
- - spec/dummy/db/test.sqlite3
179
- - spec/dummy/db/schema.rb
180
- - spec/dummy/db/development.sqlite3
181
- - spec/dummy/config.ru
182
- - spec/dummy/public/500.html
183
- - spec/dummy/public/uploads/fooltip/container/image/2/test_small.png
184
- - spec/dummy/public/uploads/fooltip/container/image/1/test_small.png
185
- - spec/dummy/public/favicon.ico
186
- - spec/dummy/public/422.html
187
- - spec/dummy/public/404.html
188
172
  - spec/dummy/Rakefile
189
- - spec/dummy/app/controllers/application_controller.rb
190
- - spec/dummy/app/views/layouts/application.html.haml
191
- - spec/dummy/app/helpers/application_helper.rb
192
173
  - spec/dummy/app/assets/javascripts/application.js
193
174
  - spec/dummy/app/assets/stylesheets/application.css
194
- - spec/dummy/script/rails
195
- - spec/dummy/config/environments/test.rb
175
+ - spec/dummy/app/controllers/application_controller.rb
176
+ - spec/dummy/app/helpers/application_helper.rb
177
+ - spec/dummy/app/views/layouts/application.html.haml
178
+ - spec/dummy/config.ru
179
+ - spec/dummy/config/application.rb
180
+ - spec/dummy/config/boot.rb
181
+ - spec/dummy/config/database.yml
182
+ - spec/dummy/config/environment.rb
196
183
  - spec/dummy/config/environments/development.rb
197
184
  - spec/dummy/config/environments/production.rb
198
- - spec/dummy/config/environment.rb
199
- - spec/dummy/config/routes.rb
200
- - spec/dummy/config/locales/en.yml
201
- - spec/dummy/config/database.yml
202
- - spec/dummy/config/boot.rb
203
- - spec/dummy/config/application.rb
204
- - spec/dummy/config/initializers/wrap_parameters.rb
185
+ - spec/dummy/config/environments/test.rb
186
+ - spec/dummy/config/initializers/backtrace_silencers.rb
205
187
  - spec/dummy/config/initializers/inflections.rb
206
188
  - spec/dummy/config/initializers/mime_types.rb
207
189
  - spec/dummy/config/initializers/secret_token.rb
208
- - spec/dummy/config/initializers/backtrace_silencers.rb
209
190
  - spec/dummy/config/initializers/session_store.rb
191
+ - spec/dummy/config/initializers/wrap_parameters.rb
192
+ - spec/dummy/config/locales/en.yml
193
+ - spec/dummy/config/routes.rb
194
+ - spec/dummy/db/development.sqlite3
195
+ - spec/dummy/db/schema.rb
196
+ - spec/dummy/db/test.sqlite3
197
+ - spec/dummy/public/404.html
198
+ - spec/dummy/public/422.html
199
+ - spec/dummy/public/500.html
200
+ - spec/dummy/public/favicon.ico
201
+ - spec/dummy/public/uploads/fooltip/container/image/1/test_small.png
202
+ - spec/dummy/public/uploads/fooltip/container/image/2/test_small.png
203
+ - spec/dummy/script/rails
204
+ - spec/factories/fooltip/containers.rb
205
+ - spec/factories/fooltip/links.rb
206
+ - spec/factories/fooltip/popups.rb
207
+ - spec/factories_spec.rb
208
+ - spec/fooltip_spec.rb
209
+ - spec/helpers/fooltip/containers_helper_spec.rb
210
+ - spec/models/fooltip/association_spec.rb
211
+ - spec/models/fooltip/container_spec.rb
212
+ - spec/models/fooltip/link_spec.rb
213
+ - spec/models/fooltip/popup_spec.rb
214
+ - spec/spec_helper.rb
215
+ - spec/uploaders/image_uploader_spec.rb
210
216
  homepage: https://github.com/intesys/fooltip
211
217
  licenses: []
212
218
  metadata: {}
@@ -216,17 +222,17 @@ require_paths:
216
222
  - lib
217
223
  required_ruby_version: !ruby/object:Gem::Requirement
218
224
  requirements:
219
- - - '>='
225
+ - - ">="
220
226
  - !ruby/object:Gem::Version
221
227
  version: '0'
222
228
  required_rubygems_version: !ruby/object:Gem::Requirement
223
229
  requirements:
224
- - - '>='
230
+ - - ">="
225
231
  - !ruby/object:Gem::Version
226
232
  version: '0'
227
233
  requirements: []
228
234
  rubyforge_project:
229
- rubygems_version: 2.0.2
235
+ rubygems_version: 2.2.0
230
236
  signing_key:
231
237
  specification_version: 4
232
238
  summary: Fooltip - when a tooltip just isn't enough.