jqr-helpers 1.0.33 → 1.0.34

Sign up to get free protection for your applications and to get access to all the features.
@@ -21,6 +21,7 @@
21
21
  }
22
22
 
23
23
  var ujsDialogElement = null; // the element that opened the dialog
24
+ var ujsLastDialog = null; // last opened dialog
24
25
  var ujsSubmitElement = null; // the element that submitted a form
25
26
 
26
27
  // called from dialog button value
@@ -30,17 +31,17 @@
30
31
 
31
32
  // called from dialog button value
32
33
  function ujsDialogClose() {
33
- $('.ui-dialog-content:visible').each(function() {
34
- if ($(this).data('remote-dialog')) {
35
- $(this).dialog('destroy').remove();
36
- }
37
- else {
38
- $(this).dialog('destroy').addClass('ujs-dialog-hidden');
39
- }
40
- });
34
+ if (!ujsLastDialog) return;
35
+ if (ujsLastDialog.data('remote-dialog')) {
36
+ ujsLastDialog.dialog('destroy').remove();
37
+ }
38
+ else {
39
+ ujsLastDialog.dialog('destroy').addClass('ujs-dialog-hidden');
40
+ }
41
41
  }
42
42
 
43
43
  function ujsDialogOpen() {
44
+ ujsLastDialog = $(this);
44
45
  $(this).css('maxHeight', ($(window).height() * 0.8) + 'px');
45
46
  if ($(this).parent().height() > $(window).height()) {
46
47
  $(this).height($(window).height() * 0.8);
data/jqr-helpers.gemspec CHANGED
@@ -1,8 +1,8 @@
1
1
  Gem::Specification.new do |s|
2
2
  s.name = 'jqr-helpers'
3
3
  s.require_paths = %w(. lib lib/jqr-helpers)
4
- s.version = '1.0.33'
5
- s.date = '2014-03-02'
4
+ s.version = '1.0.34'
5
+ s.date = '2014-03-04'
6
6
  s.summary = 'Helpers to print unobtrusive jQuery-UI tags.'
7
7
  s.description = <<-EOF
8
8
  This gem adds helper methods to create unobtrusive jQuery code. It outputs
@@ -1,6 +1,6 @@
1
1
  module JqrHelpers
2
2
  # @private
3
3
  module Rails
4
- VERSION = '1.0.33'
4
+ VERSION = '1.0.34'
5
5
  end
6
6
  end
metadata CHANGED
@@ -2,14 +2,14 @@
2
2
  name: jqr-helpers
3
3
  version: !ruby/object:Gem::Version
4
4
  prerelease:
5
- version: 1.0.33
5
+ version: 1.0.34
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Orner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2014-03-02 00:00:00.000000000 Z
12
+ date: 2014-03-04 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails