window_rails 0.2.4 → 0.2.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/CHANGELOG.rdoc +3 -0
- data/lib/window_rails/version.rb +1 -1
- data/lib/window_rails/window_rails_generators.rb +4 -3
- metadata +4 -4
data/CHANGELOG.rdoc
CHANGED
data/lib/window_rails/version.rb
CHANGED
@@ -162,7 +162,7 @@ module WindowRailsGenerators
|
|
162
162
|
|
163
163
|
# win:: Name of window
|
164
164
|
# padding:: Extra padding to add to calculated height and width
|
165
|
-
def resize_to_fit(win, padding=
|
165
|
+
def resize_to_fit(win, padding=20)
|
166
166
|
if(padding.is_a?(Hash))
|
167
167
|
w_pad = padding[:width_pad]
|
168
168
|
h_pad = padding[:height_pad]
|
@@ -187,8 +187,9 @@ module WindowRailsGenerators
|
|
187
187
|
win = win.start_with?('#') ? win : "##{win}"
|
188
188
|
args.each do |item|
|
189
189
|
self << "
|
190
|
-
|
191
|
-
|
190
|
+
var _wr_max = Math.max.apply(Math, jQuery('#{win}_wr_content *').map(function(){ return jQuery(this).#{item}(); }).get());
|
191
|
+
if(jQuery('#{win}').#{item}() < _wr_max || jQuery('#{win}').#{item}() > _wr_max){"
|
192
|
+
window(win) << ".dialog('option', '#{item}', _wr_max + #{extra_padding.to_i});"
|
192
193
|
self << "
|
193
194
|
}"
|
194
195
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: window_rails
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 29
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 5
|
10
|
+
version: 0.2.5
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Chris Roberts
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2011-10-
|
18
|
+
date: 2011-10-26 00:00:00 -07:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|