jqr-helpers 1.0.15 → 1.0.16

Sign up to get free protection for your applications and to get access to all the features.
@@ -27,7 +27,7 @@
27
27
  if ($(this).parent().height() > $(window).height()) {
28
28
  $(this).height($(window).height() * 0.8);
29
29
  $(this).parent().css('top',
30
- ($(window).height() - $(this).parent().height()) / 2
30
+ Math.max(($(window).height() - $(this).parent().height()) / 2, 1)
31
31
  );
32
32
  $(this).css('overflow-y', 'auto');
33
33
  }
@@ -84,6 +84,9 @@
84
84
  else if (element.click == 'close') {
85
85
  dialogOptions.buttons[index].click = ujsDialogClose;
86
86
  }
87
+ else {
88
+ dialogOptions.buttons[index] = eval(element);
89
+ }
87
90
  });
88
91
  }
89
92
  if (url) {
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.15'
5
- s.date = '2013-12-18'
4
+ s.version = '1.0.16'
5
+ s.date = '2013-12-20'
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
@@ -71,11 +71,12 @@ module JqrHelpers
71
71
  tag_name = html_options.delete(:tag_name) || :a
72
72
  html_options[:href] = '#' if tag_name == :a
73
73
 
74
+ dialog_options[:dialogClass] ||= ''
74
75
  if dialog_options[:title] == false # not nil or blank
75
- dialog_options[:dialogClass] ||= ''
76
76
  dialog_options[:dialogClass] << ' ujs-dialog-modal no-title'
77
77
  else
78
78
  dialog_options[:title] ||= 'Dialog'
79
+ dialog_options[:dialogClass] << ' ujs-dialog-modal'
79
80
  end
80
81
  dialog_options[:modal] = true
81
82
  dialog_options[:width] ||= 'auto'
@@ -1,5 +1,5 @@
1
1
  module JqrHelpers
2
2
  module Rails
3
- VERSION = '1.0.15'
3
+ VERSION = '1.0.16'
4
4
  end
5
5
  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.15
5
+ version: 1.0.16
6
6
  platform: ruby
7
7
  authors:
8
8
  - Daniel Orner
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-12-18 00:00:00.000000000 Z
12
+ date: 2013-12-20 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails