facebox-rails 0.1.2 → 0.1.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,5 +1,5 @@
1
1
  module Facebox
2
2
  module Rails
3
- VERSION = "0.1.2"
3
+ VERSION = "0.1.3"
4
4
  end
5
5
  end
@@ -67,7 +67,7 @@
67
67
  */
68
68
  (function($) {
69
69
  $.facebox = function(data, klass) {
70
- $.facebox.loading()
70
+ $.facebox.loading(data.settings || [])
71
71
 
72
72
  if (data.ajax) fillFaceboxFromAjax(data.ajax, klass)
73
73
  else if (data.image) fillFaceboxFromImage(data.image, klass)
@@ -107,7 +107,7 @@
107
107
 
108
108
  $('#facebox').show().css({
109
109
  top: getPageScroll()[1] + (getPageHeight() / 10),
110
- left: $(window).width() / 2 - ($('#facebox .popup').outerWidth() / 2)
110
+ left: $(window).width() / 2 - ($('#facebox .popup').outerWidth(true) / 2)
111
111
  })
112
112
 
113
113
  $(document).bind('keydown.facebox', function(e) {
@@ -260,7 +260,7 @@
260
260
  }
261
261
 
262
262
  function fillFaceboxFromAjax(href, klass) {
263
- $.get(href, function(data) { $.facebox.reveal(data, klass) })
263
+ $.facebox.jqxhr = $.get(href, function(data) { $.facebox.reveal(data, klass) })
264
264
  }
265
265
 
266
266
  function skipOverlay() {
@@ -297,6 +297,10 @@
297
297
  */
298
298
 
299
299
  $(document).bind('close.facebox', function() {
300
+ if ($.facebox.jqxhr) {
301
+ $.facebox.jqxhr.abort()
302
+ $.facebox.jqxhr = null
303
+ }
300
304
  $(document).unbind('keydown.facebox')
301
305
  $('#facebox').fadeOut(function() {
302
306
  $('#facebox .content').removeClass().addClass('content')
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: facebox-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.2
4
+ version: 0.1.3
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2012-05-30 00:00:00.000000000 Z
12
+ date: 2013-01-02 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -96,7 +96,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
96
96
  version: 1.3.6
97
97
  requirements: []
98
98
  rubyforge_project: ! '[none]'
99
- rubygems_version: 1.8.24
99
+ rubygems_version: 1.8.23
100
100
  signing_key:
101
101
  specification_version: 3
102
102
  summary: Use Facebox with Rails 3