jquery-iframe_auto_resize 0.0.2 → 0.0.3

Sign up to get free protection for your applications and to get access to all the features.
data/README.rdoc CHANGED
@@ -22,6 +22,8 @@ JQuery Plugin to auto-resize iFrames from same domain.
22
22
  minHeight: 200, // px
23
23
  maxHeight: 800, // px
24
24
  heightOffset: 5, // px
25
+ animationSpeed: 500, // in px / s
26
+ maxAnimationTime: 1000, // in ms
25
27
  callback: function(){/*...*/},
26
28
  debug: false
27
29
  });
@@ -11,6 +11,7 @@ $.fn.iframeAutoResize = (spec) ->
11
11
  alert(message)
12
12
 
13
13
  oldHeight = 0
14
+ interval_id = 0
14
15
 
15
16
  options = $.extend({
16
17
  interval: 0,
@@ -76,7 +77,12 @@ $.fn.iframeAutoResize = (spec) ->
76
77
 
77
78
 
78
79
  resizeHeight = (iframe) ->
79
- $body = $(iframe).contents().find('body')
80
+ try
81
+ $body = $(iframe).contents().find('body')
82
+ catch error
83
+ clearInterval(interval_id)
84
+ return
85
+
80
86
  newHeight = computeHeight($body)
81
87
 
82
88
  if newHeight != oldHeight
@@ -99,7 +105,7 @@ $.fn.iframeAutoResize = (spec) ->
99
105
  $(this).attr('src', source)
100
106
 
101
107
  if options.interval != 0
102
- setInterval(delayedResize, options.interval)
108
+ interval_id = setInterval(delayedResize, options.interval)
103
109
 
104
110
  init()
105
111
 
@@ -1,4 +1,4 @@
1
1
  module JqueryIframeAutoResize
2
- VERSION = "0.0.2"
2
+ VERSION = "0.0.3"
3
3
  end
4
4
 
@@ -19742,3 +19742,9 @@ Served asset /static.js - 304 Not Modified (0ms)
19742
19742
 
19743
19743
  Started GET "/assets/application.js?body=1" for 127.0.0.1 at Thu Sep 08 19:10:47 +0200 2011
19744
19744
  Served asset /application.js - 304 Not Modified (2ms)
19745
+
19746
+
19747
+ Started GET "/" for 127.0.0.1 at Thu Sep 08 19:15:02 +0200 2011
19748
+ Processing by StaticController#container as */*
19749
+ Rendered static/container.html.haml within layouts/application (4.7ms)
19750
+ Completed 200 OK in 20ms (Views: 19.4ms | ActiveRecord: 0.0ms)
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jquery-iframe_auto_resize
3
3
  version: !ruby/object:Gem::Version
4
- hash: 27
4
+ hash: 25
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 0
9
- - 2
10
- version: 0.0.2
9
+ - 3
10
+ version: 0.0.3
11
11
  platform: ruby
12
12
  authors:
13
13
  - Patrick Helm
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2011-09-08 00:00:00 Z
18
+ date: 2011-09-13 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  type: :runtime
@@ -134,7 +134,6 @@ files:
134
134
  - test/dummy/public/422.html
135
135
  - test/dummy/public/favicon.ico
136
136
  - test/dummy/public/500.html
137
- - test/dummy/tmp/pids/server.pid
138
137
  - test/dummy/tmp/cache/assets/D02/1D0/sprockets%2F56536bb3e46ab1f153ba27f0640e57b5
139
138
  - test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4
140
139
  - test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384
@@ -226,7 +225,6 @@ test_files:
226
225
  - test/dummy/public/422.html
227
226
  - test/dummy/public/favicon.ico
228
227
  - test/dummy/public/500.html
229
- - test/dummy/tmp/pids/server.pid
230
228
  - test/dummy/tmp/cache/assets/D02/1D0/sprockets%2F56536bb3e46ab1f153ba27f0640e57b5
231
229
  - test/dummy/tmp/cache/assets/D54/ED0/sprockets%2F71c9fa01091d432b131da3bb73faf3d4
232
230
  - test/dummy/tmp/cache/assets/D84/210/sprockets%2Fabd0103ccec2b428ac62c94e4c40b384
@@ -1 +0,0 @@
1
- 12256