Fix bug.
This commit is contained in:
parent
5c65442fc9
commit
b20cacc50e
|
@ -565,7 +565,7 @@ class AnnouncementsController < ApplicationController
|
|||
} } rescue []
|
||||
files = announcement.bulletin_files.map do |file|
|
||||
{ "file_url" => "/xhr/announcements/file/#{file.id}/#{file['file']}" + "\" title=\"#{file.file_title}",
|
||||
"file_title" => (file.title.blank? ? URI.unescape(File.basename(file.file.path)) : file.title rescue '') } if file.enabled_for?(locale)
|
||||
"file_title" => (file.title.blank? ? URI.unescape(File.basename(file.file.path)) : file.title rescue '') } rescue nil if file.enabled_for?(locale)
|
||||
end rescue []
|
||||
files.delete(nil)
|
||||
files.each do |file|
|
||||
|
|
|
@ -509,6 +509,14 @@
|
|||
})
|
||||
</script>
|
||||
<% end %>
|
||||
<style type="text/css">
|
||||
[aria-describedby] ul.dropdown-menu {
|
||||
display: block;
|
||||
}
|
||||
[aria-describedby] .checkbox input{
|
||||
margin-left: 0;
|
||||
}
|
||||
</style>
|
||||
<script>
|
||||
function Appendzero(obj)
|
||||
{
|
||||
|
@ -517,6 +525,7 @@
|
|||
}
|
||||
function add_click_for_privacy()
|
||||
{
|
||||
$('.add-on.btn-group').off('show.bs.tooltip').on('show.bs.tooltip',function(){$(this).find('ul').toggleClass('show')});
|
||||
$(".privacy-changer-btn").off('click')
|
||||
$(".privacy-changer-btn").click(function(){
|
||||
var val = $(this).attr('for')
|
||||
|
|
|
@ -65,7 +65,7 @@
|
|||
<%= f.hidden_field :_destroy, :value => nil, :class => 'should_destroy' %>
|
||||
</span>
|
||||
<% end %>
|
||||
<span class="add-on btn-group btn" style="background: white;border: 0;margin-left: 1em;">
|
||||
<span class="add-on btn-group btn" style="background: white;border: 0;margin-left: 1em;" title="<%=t('site.edit_members.privacy_setting')%>">
|
||||
<% case form_file.privacy_type
|
||||
when "public"
|
||||
icon = "icons-earth"
|
||||
|
|
Loading…
Reference in New Issue