forked from spen/seminar
Fix xhr bug.
This commit is contained in:
parent
67e1dd153f
commit
a6fde99d96
|
@ -1,7 +1,15 @@
|
|||
<% if request.xhr? %>
|
||||
<div id="index_table">
|
||||
<%= render :partial => "seminar_signup_render_table" %>
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="pagination pagination-centered"><%= (paginate(@seminar_signups) rescue nil) %></div>
|
||||
<% if @can_edit %>
|
||||
<div class="action pull-right">
|
||||
<%= link_to content_tag(:i, nil, :class => 'icon-cog icon-white') + t("seminar.field_display_setting"), seminar_signup_admin_setting_admin_seminar_path(params[:id]) + "?page=table", :class => 'btn btn-primary' %>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
||||
<% else %>
|
||||
<form id="module-search-form">
|
||||
<div class="sc-field">
|
||||
|
@ -15,8 +23,6 @@
|
|||
<h4><%= @seminar.title %></h4>
|
||||
<div id="index_table">
|
||||
<%= render :partial => "seminar_signup_render_table" %>
|
||||
</div>
|
||||
|
||||
<div class="bottomnav clearfix">
|
||||
<div class="pagination pagination-centered"><%= (paginate(@seminar_signups) rescue nil) %></div>
|
||||
<% if @can_edit %>
|
||||
|
@ -27,4 +33,5 @@
|
|||
</div>
|
||||
|
||||
<%= render 'layouts/delete_modal', delete_options: @delete_options %>
|
||||
</div>
|
||||
<% end %>
|
|
@ -1,12 +1,13 @@
|
|||
<script>
|
||||
<% unless request.xhr? %>
|
||||
<script>
|
||||
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
||||
</script>
|
||||
<div id="jquery_form_dialog">
|
||||
</script>
|
||||
<div id="jquery_form_dialog">
|
||||
<div style="clear:both;"></div>
|
||||
<div id="jquery_form_content">
|
||||
</div>
|
||||
</div>
|
||||
<% if @can_edit %>
|
||||
</div>
|
||||
<% if @can_edit %>
|
||||
<% if params[:type].blank?%>
|
||||
<label><input id="copy_mode_on" type="checkbox"><%=t("seminar.copy_mode_on")%></label>
|
||||
<% end %>
|
||||
|
@ -17,6 +18,7 @@
|
|||
<% end %>
|
||||
<li><a href="?type=table" class="btn <%='active' if params[:type] == 'table'%>"><%= t('seminar.table') %></a></li>
|
||||
</ul>
|
||||
<% end %>
|
||||
<% end %>
|
||||
<% if params[:type] == "table" || (!@can_edit) %>
|
||||
<div style="clear: both;"></div>
|
||||
|
@ -26,15 +28,16 @@
|
|||
<% else %>
|
||||
<%= render :partial => 'seminar_signup_dashboard' %>
|
||||
<% end %>
|
||||
<style type="text/css">
|
||||
<% unless request.xhr? %>
|
||||
<style type="text/css">
|
||||
.pull-right li{
|
||||
float: left;
|
||||
}
|
||||
li{
|
||||
list-style: none;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
</style>
|
||||
<script>
|
||||
$(document).on("submit","#jquery_form",function(e) {
|
||||
var form = $(this);
|
||||
var url = form.attr('action');
|
||||
|
@ -76,4 +79,5 @@
|
|||
});
|
||||
})
|
||||
})
|
||||
</script>
|
||||
</script>
|
||||
<% end %>
|
Loading…
Reference in New Issue