preview for update

This commit is contained in:
Matthew K. Fu JuYuan 2012-09-10 11:53:59 +08:00
parent 6044857fea
commit a20db344f1
5 changed files with 5 additions and 2 deletions

View File

@ -33,6 +33,7 @@ $(document).ready(function() {
$("#main-wrap").after("<span id='show_preview'></span>");
o.dataType = 'script';
o.url = clicked_what.attr("url");
o.type = 'post';
}
});
})

View File

@ -4,7 +4,7 @@
<li class="text-blue"><%= t('announcement.editing_announcement') %></li>
</ul>
<div id="poststuff">
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear'} do |f| %>
<%= form_for @bulletin, :url => panel_announcement_back_end_bulletin_path(@bulletin), :html => {:class => 'clear nccu_ajax_form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
</div>

View File

@ -16,6 +16,7 @@ Rails.application.routes.draw do
end
collection do
post "preview"
put "preview"
get 'delete'
end
match "file_quick_add/:bulletin_id" => "bulletins#file_quick_add" ,:as => :file_quick_add

View File

@ -4,7 +4,7 @@
<li class="text-blue"><%= t('news.editing_news') %></li>
</ul>
<div id="poststuff">
<%= form_for @news_bulletin, :url => panel_news_back_end_news_bulletin_path(@news_bulletin), :html => {:class => 'clear'} do |f| %>
<%= form_for @news_bulletin, :url => panel_news_back_end_news_bulletin_path(@news_bulletin), :html => {:class => 'clear nccu_ajax_form'} do |f| %>
<%= render :partial => 'form', :locals => {:f => f} %>
<% end %>
</div>

View File

@ -17,6 +17,7 @@ Rails.application.routes.draw do
end
collection do
post "preview"
put "preview"
get 'delete'
end
match "file_quick_add/:news_bulletin_id" => "news_bulletins#file_quick_add" ,:as => :file_quick_add