bootstrap-modal-rails 2.2.4 → 2.2.5

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,15 +1,15 @@
1
1
  ---
2
2
  !binary "U0hBMQ==":
3
3
  metadata.gz: !binary |-
4
- ODc3NDI2N2Q4YWFhOGFmN2QzM2E4NmI2MWNjODRlMzYzZTIyYTYwMQ==
4
+ NWYwNGVjMDcxMzFmMDBlMGUxZDlkYjM0YTFlYjQ5ZGNkZTJlNjdiMA==
5
5
  data.tar.gz: !binary |-
6
- MGZiZjc2ZjI3MjdjZDQ1ZjQ3OTQ0MjFjNzczMTZjMzFmOGU1ZjdkNw==
6
+ YWM0M2Q5OGM3YmFhNGRkNDY2ZTEwMzBmMGUwNzI2M2VkNDUwMTcwNw==
7
7
  SHA512:
8
8
  metadata.gz: !binary |-
9
- OTY3YTY4NGQxODBiNzdkYjE4ODA1YTM4ODU0ZjA0YjMwMGMwMDdkYWQ0MWU2
10
- N2FlZTM2ODU0MjVmN2IxODYwZGFiMjliZjk5ODkzZTgyZTBlYzg0NjNhOWZk
11
- NTYwMzQ5NmYxOTIwYzNjNmY5YWE4ODhjMDIyMzg0MjkzZWEzZDQ=
9
+ MjA3ZDIxYTBiYjVmN2M5NzYzNzljMDg5YzY0M2YyZDMwMjNjZTlkYzFkYWNh
10
+ YmQ1Nzk4NTgxNmEwMTdhMDVhZDQ5MTg1YWIyMTczYTNjMzgyNmJmMjMxNjU5
11
+ NTA1MTg2MWJmN2Y0M2Q3NWVkYzQyMzZjNjUxNTQ1YWYwYjlhM2I=
12
12
  data.tar.gz: !binary |-
13
- ZTFlODNkNmE4MjNlNWE1MzhjN2JkNzVmNTQ5ZTQ3YmQxZTEwNGVmN2QyNWE0
14
- NmI1ZTg5YmJlNzBjZGRmZmVkOWNkNDA2MjQ4ZTRkNDUxN2FlMGE5Y2UxYjg3
15
- NTBjMGU1MTM5NGMxZWU1ZDY4NGIwYTliYjdmNWY1MDRmNWQzNWM=
13
+ YmYyNWRmMTVmNjI1MGY3ZWZlZTUxYTU0OGNjOThkZTEzNDQzNTFjMWRlNzc5
14
+ ODIzYjUxMTFiMTQ2OTIwNzc3MjU0ZTk5ODA3OGQxMTlhOGNmNjhlOTIzNzQx
15
+ NTliMDkyZmQ0NjFhNzNiZDFkMDU2MGM5OTdkZjE4NzQ0NGFjZDU=
@@ -1,7 +1,7 @@
1
1
  module Bootstrap
2
2
  module Modal
3
3
  module Rails
4
- VERSION = "2.2.4"
4
+ VERSION = "2.2.5"
5
5
  end
6
6
  end
7
7
  end
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-modal.js v2.2.4
2
+ * bootstrap-modal.js v2.2.5
3
3
  * ===========================================================
4
4
  * Copyright 2012 Jordan Schroter
5
5
  *
@@ -81,7 +81,7 @@
81
81
 
82
82
  this.$element.trigger(e);
83
83
 
84
- if (!this.isShown || e.isDefaultPrevented()) return (this.isShown = false);
84
+ if (!this.isShown || e.isDefaultPrevented()) return;
85
85
 
86
86
  this.isShown = false;
87
87
 
@@ -294,29 +294,26 @@
294
294
 
295
295
  destroy: function () {
296
296
  var e = $.Event('destroy');
297
+
297
298
  this.$element.trigger(e);
298
- if (e.isDefaultPrevented()) return;
299
299
 
300
- this.teardown();
301
- },
300
+ if (e.isDefaultPrevented()) return;
302
301
 
303
- teardown: function () {
304
- if (!this.$parent.length){
302
+ this.$element
303
+ .off('.modal')
304
+ .removeData('modal')
305
+ .removeClass('in')
306
+ .attr('aria-hidden', true);
307
+
308
+ if (this.$parent !== this.$element.parent()) {
309
+ this.$element.appendTo(this.$parent);
310
+ } else if (!this.$parent.length) {
311
+ // modal is not part of the DOM so remove it.
305
312
  this.$element.remove();
306
313
  this.$element = null;
307
- return;
308
- }
309
-
310
- if (this.$parent !== this.$element.parent()){
311
- this.$element.appendTo(this.$parent);
312
314
  }
313
315
 
314
- this.$element.off('.modal');
315
- this.$element.removeData('modal');
316
- this.$element
317
- .removeClass('in')
318
- .attr('aria-hidden', true)
319
- .trigger('destroyed');
316
+ this.$element.trigger('destroyed');
320
317
  }
321
318
  };
322
319
 
@@ -1,5 +1,5 @@
1
1
  /* ===========================================================
2
- * bootstrap-modalmanager.js v2.2.4
2
+ * bootstrap-modalmanager.js v2.2.5
3
3
  * ===========================================================
4
4
  * Copyright 2012 Jordan Schroter.
5
5
  *
@@ -385,7 +385,7 @@
385
385
  // if Boostsrap namespaced events, this would not be needed.
386
386
  function targetIsSelf(callback){
387
387
  return function (e) {
388
- if (this === e.target){
388
+ if (e && this === e.target){
389
389
  return callback.apply(this, arguments);
390
390
  }
391
391
  }
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-modal-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.2.4
4
+ version: 2.2.5
5
5
  platform: ruby
6
6
  authors:
7
7
  - Vicente Reig
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-03-21 00:00:00.000000000 Z
11
+ date: 2014-04-29 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: railties