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,3 +1,4 @@
|
|||
<% unless request.xhr? %>
|
||||
<script>
|
||||
if(document.querySelectorAll("#orbit-bar").length==0) location.reload();
|
||||
</script>
|
||||
|
@ -18,6 +19,7 @@
|
|||
<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>
|
||||
<%= render :partial => 'seminar_signup_table' %>
|
||||
|
@ -26,6 +28,7 @@
|
|||
<% else %>
|
||||
<%= render :partial => 'seminar_signup_dashboard' %>
|
||||
<% end %>
|
||||
<% unless request.xhr? %>
|
||||
<style type="text/css">
|
||||
.pull-right li{
|
||||
float: left;
|
||||
|
@ -77,3 +80,4 @@
|
|||
})
|
||||
})
|
||||
</script>
|
||||
<% end %>
|
Loading…
Reference in New Issue