app/helpers/skyline/dialog_helper.rb in skylinecms-3.1.0 vs app/helpers/skyline/dialog_helper.rb in skylinecms-3.2.0
- old
+ new
@@ -12,20 +12,21 @@
content = render(options_for_render)
end
options.each do |k,v|
options[k] = case v
- when String,Symbol : "'" + escape_javascript(v.to_s) + "'"
- when Hash : options_for_javascript(v)
+ when String,Symbol then "'" + escape_javascript(v.to_s) + "'"
+ when Hash then options_for_javascript(v)
else v
end
end
p = "(function(){"
p << "var sd = new Skyline.Dialog(#{options_for_javascript(options)});"
p << "sd.setTitle('#{escape_javascript(title)}');"
p << "sd.setContent('#{escape_javascript(content)}');"
p << "sd.setup(); sd.show();"
p << "})()"
+ p.html_safe
end
end
\ No newline at end of file