bootstrap-modal-rails 2.1 → 2.1.1

Sign up to get free protection for your applications and to get access to all the features.
data/README.md CHANGED
@@ -29,18 +29,24 @@ $ gem install bootstrap-modal-rails
29
29
  ### Stylesheets
30
30
 
31
31
  ```sass
32
- @import bootstrap-modal
32
+ //=require bootstrap-modal
33
33
  ```
34
34
 
35
35
  ### Javascripts
36
+
36
37
  ```coffeescript
37
38
  #= require bootstrap-modal
38
39
  #= require bootstrap-modalmanager
39
40
  ```
40
41
 
42
+ ```javascript
43
+ //= require bootstrap-modal
44
+ //= require bootstrap-modalmanager
45
+ ```
46
+
41
47
  ## Versioning
42
48
 
43
- This gem will directly track the semantic versioning releases of the [https://github.com/jschr/bootstrap-modal](Bootstrap Modal) project.
49
+ This gem will directly track the semantic versioning releases of the [Bootstrap Modal](https://github.com/jschr/bootstrap-modal) project.
44
50
  If it should be necessary a build number will be added to the version to mark releases specific to this gem.
45
51
 
46
52
  ## Note on Patches / Pull Requests
@@ -1,7 +1,7 @@
1
1
  module Bootstrap
2
2
  module Modal
3
3
  module Rails
4
- VERSION = "2.1"
4
+ VERSION = "2.1.1"
5
5
  end
6
6
  end
7
7
  end
@@ -58,7 +58,7 @@
58
58
 
59
59
  if (this.isShown) return;
60
60
 
61
- this.$element.triggerHandler(e);
61
+ this.$element.trigger(e);
62
62
 
63
63
  if (e.isDefaultPrevented()) return;
64
64
 
@@ -74,7 +74,7 @@
74
74
 
75
75
  e = $.Event('hide');
76
76
 
77
- this.$element.triggerHandler(e);
77
+ this.$element.trigger(e);
78
78
 
79
79
  if (!this.isShown || e.isDefaultPrevented()) return (this.isShown = false);
80
80
 
@@ -124,14 +124,14 @@
124
124
  .css('overflow', '')
125
125
  .css(prop, '');
126
126
 
127
- var modalOverflow = $(window).height() - 10 < this.$element.height();
128
-
129
127
  if (value){
130
128
  this.$element.find('.modal-body')
131
129
  .css('overflow', 'auto')
132
130
  .css(prop, value);
133
131
  }
134
132
 
133
+ var modalOverflow = $(window).height() - 10 < this.$element.height();
134
+
135
135
  if (modalOverflow || this.options.modalOverflow) {
136
136
  this.$element
137
137
  .css('margin-top', 0)
@@ -204,7 +204,7 @@
204
204
  hideModal: function () {
205
205
  this.$element
206
206
  .hide()
207
- .triggerHandler('hidden');
207
+ .trigger('hidden');
208
208
 
209
209
  var prop = this.options.height ? 'height' : 'max-height';
210
210
  var value = this.options.height || this.options.maxHeight;
@@ -290,7 +290,7 @@
290
290
 
291
291
  destroy: function () {
292
292
  var e = $.Event('destroy');
293
- this.$element.triggerHandler(e);
293
+ this.$element.trigger(e);
294
294
  if (e.isDefaultPrevented()) return;
295
295
 
296
296
  this.teardown();
@@ -356,7 +356,7 @@
356
356
  * ============== */
357
357
 
358
358
  $(function () {
359
- $(document).off('.modal').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
359
+ $(document).off('click.modal').on('click.modal.data-api', '[data-toggle="modal"]', function ( e ) {
360
360
  var $this = $(this),
361
361
  href = $this.attr('href'),
362
362
  $target = $($this.attr('data-target') || (href && href.replace(/.*(?=#[^\s]+$)/, ''))), //strip for ie7
@@ -82,6 +82,12 @@
82
82
 
83
83
  modal.$element.show();
84
84
 
85
+ if (transition) {
86
+ //modal.$element[0].style.display = 'run-in';
87
+ modal.$element[0].offsetWidth;
88
+ //modal.$element.one($.support.transition.end, function () { modal.$element[0].style.display = 'block' });
89
+ }
90
+
85
91
  modal.layout();
86
92
 
87
93
  modal.$element
@@ -90,7 +96,7 @@
90
96
 
91
97
  var complete = function () {
92
98
  that.setFocus();
93
- modal.$element.triggerHandler('shown');
99
+ modal.$element.trigger('shown');
94
100
  };
95
101
 
96
102
  transition ?
@@ -164,7 +170,7 @@
164
170
 
165
171
  removeModal: function (modal) {
166
172
  modal.$element.off('.modalmanager');
167
- if (modal.$backdrop) this.removeBackdrop.call(modal);
173
+ if (modal.$backdrop) this.removeBackdrop(modal);
168
174
  this.stack.splice(this.getIndexOfModal(modal), 1);
169
175
  },
170
176
 
@@ -216,7 +222,7 @@
216
222
  this.isLoading && this.removeSpinner();
217
223
  }
218
224
 
219
- return $backdrop
225
+ return $backdrop;
220
226
  },
221
227
 
222
228
  removeContainer: function (modal) {
@@ -390,7 +396,7 @@
390
396
  var $this = $(this),
391
397
  data = $this.data('modalmanager');
392
398
 
393
- if (!data) $this.data('modalmanager', (data = new ModalManager(this, option)))
399
+ if (!data) $this.data('modalmanager', (data = new ModalManager(this, option)));
394
400
  if (typeof option === 'string') data[option].apply(data, [].concat(args))
395
401
  })
396
402
  };
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap-modal-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: '2.1'
4
+ version: 2.1.1
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: 2013-01-18 00:00:00.000000000 Z
12
+ date: 2013-05-08 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: railties
@@ -53,15 +53,21 @@ required_ruby_version: !ruby/object:Gem::Requirement
53
53
  - - ! '>='
54
54
  - !ruby/object:Gem::Version
55
55
  version: '0'
56
+ segments:
57
+ - 0
58
+ hash: 731218777553422648
56
59
  required_rubygems_version: !ruby/object:Gem::Requirement
57
60
  none: false
58
61
  requirements:
59
62
  - - ! '>='
60
63
  - !ruby/object:Gem::Version
61
64
  version: '0'
65
+ segments:
66
+ - 0
67
+ hash: 731218777553422648
62
68
  requirements: []
63
69
  rubyforge_project:
64
- rubygems_version: 1.8.24
70
+ rubygems_version: 1.8.25
65
71
  signing_key:
66
72
  specification_version: 3
67
73
  summary: Rails gemified bootstrap-modal extension by Jordan Schroter.