Integration of pop-up and generic js.erb

This commit is contained in:
chris2tof committed 2011-12-28 20:49:53 +08:00
1 parent 62aaf79491
commit 245def9cb6
14 files changed
+1613 -54

No files matched your search

+8
View File
@@ -0,0 +1,8 @@
var to_render = '';
<% if value %>
to_render = "<%= escape_javascript(render(:partial => partial, :object => value, :locals => locals)) %>"
<% elsif values %>
to_render = "<%= escape_javascript(render(:partial => partial, :collection => values, :locals => locals)) %>"
<% end %>
$("#<%= id %>").<%= function %>(to_render);
+1
View File
@@ -0,0 +1 @@
$("#<%= id %>").remove()
@@ -0,0 +1,2 @@
rcom.modalWindowClose();
<%= render :template => 'js/reload_content', :locals => {:function => function, :id => id, :value => value, :values => values, :partial => partial, :locals => locals} %>
+1
View File
@@ -0,0 +1 @@
rcom.modalWindow({loadHtml:"<%= escape_javascript(render(:partial => partial, :locals => {:is_html => false})) %>"});