fix 新聞與公告QA
1.優先處理-快速編輯中的檔案上傳無法新增,但可刪除 2.優先處理-編輯中的檔案列表,無法刪除 3.優先處理-刪除時應彈出警告視窗,請user確認一次,再將檔案刪除
This commit is contained in:
parent
4c4929c20a
commit
55449efb35
|
@ -9,8 +9,10 @@ $('.bulletin_files_block a.delete').live('click', function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.action a.remove_existing_record', function(){
|
$(document).on('click', '.action a.remove_existing_record', function(){
|
||||||
|
if(confirm("<%= I18n.t('announcement.sure?')%>")){
|
||||||
$(this).next('.should_destroy').attr('value', 1);
|
$(this).next('.should_destroy').attr('value', 1);
|
||||||
$("tr#" + $(this).prev().attr('value')).hide();
|
$("tr#" + $(this).prev().attr('value')).hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.quick_edit_cancel', function(){
|
$(document).on('click', '.quick_edit_cancel', function(){
|
||||||
|
|
|
@ -10,8 +10,10 @@ $('.news_bulletin_files_block a.delete').live('click', function(){
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.action a.remove_existing_record', function(){
|
$(document).on('click', '.action a.remove_existing_record', function(){
|
||||||
|
if(confirm("<%= I18n.t('news.sure?')%>")){
|
||||||
$(this).next('.should_destroy').attr('value', 1);
|
$(this).next('.should_destroy').attr('value', 1);
|
||||||
$("tr#" + $(this).prev().attr('value')).hide();
|
$("tr#" + $(this).prev().attr('value')).hide();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
$(document).on('click', '.quick_edit_cancel', function(){
|
$(document).on('click', '.quick_edit_cancel', function(){
|
|
@ -63,6 +63,7 @@
|
||||||
<a class="delete"><i class="icon-remove"></i></a>
|
<a class="delete"><i class="icon-remove"></i></a>
|
||||||
<% else %>
|
<% else %>
|
||||||
<%= f.hidden_field :id %>
|
<%= f.hidden_field :id %>
|
||||||
|
<%= hidden_field_tag :tr, (dom_id form_bulletin_file) %>
|
||||||
<a class="remove_existing_record"><i class="icon-remove"></i></a>
|
<a class="remove_existing_record"><i class="icon-remove"></i></a>
|
||||||
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
|
<%= f.hidden_field :should_destroy, :value => nil, :class => 'should_destroy' %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
|
|
@ -18,6 +18,12 @@
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div id="news_bulletin_file_qe">
|
||||||
|
<div id="modal-file" class="modal fade">
|
||||||
|
<%= render :partial => "bulletin_file_qe" %>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
<% content_for :page_specific_javascript do %>
|
<% content_for :page_specific_javascript do %>
|
||||||
<%= javascript_include_tag "bulletin_form" %>
|
<%= javascript_include_tag "bulletin_form" %>
|
||||||
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
|
<%= javascript_include_tag "/static/jquery.cycle.all.latest.js" %>
|
||||||
|
|
Loading…
Reference in New Issue