Commit 463d81500c8aa56b5267938abd1c0642f524b86e

Authored by AurelioAHeckert
1 parent b53de0ff

ActionItem242: Bt del ok! esse comit inclui melhoria na anotimacao da caixinha da notificacao

git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1586 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/application_helper.rb
@@ -248,12 +248,17 @@ module ApplicationHelper @@ -248,12 +248,17 @@ module ApplicationHelper
248 end 248 end
249 249
250 def button(type, label, url, html_options = {}) 250 def button(type, label, url, html_options = {})
251 - the_class = "button with-text icon-#{type}" 251 + button_without_text type, label, url, html_options.merge(:class=>'with-text')
  252 + end
  253 +
  254 + def button_without_text(type, label, url, html_options = {})
  255 + the_class = "button icon-#{type}"
252 if html_options.has_key?(:class) 256 if html_options.has_key?(:class)
253 the_class << ' ' << html_options[:class] 257 the_class << ' ' << html_options[:class]
254 end 258 end
255 link_to(content_tag('span', label), url, html_options.merge(:class => the_class )) 259 link_to(content_tag('span', label), url, html_options.merge(:class => the_class ))
256 end 260 end
  261 + alias icon_button button_without_text
257 262
258 def submit_button(type, label, html_options = {}) 263 def submit_button(type, label, html_options = {})
259 bt_cancel = html_options[:cancel] ? button(:cancel, _('Cancel'), html_options[:cancel]) : '' 264 bt_cancel = html_options[:cancel] ? button(:cancel, _('Cancel'), html_options[:cancel]) : ''
app/views/content_viewer/_comment.rhtml
1 <div class="article-comment<%= ' comment-from-owner' if ( comment.author && (@page.profile.name == comment.author.name) ) %> comment-logged-<%= comment.author ? 'in' : 'out' %>"> 1 <div class="article-comment<%= ' comment-from-owner' if ( comment.author && (@page.profile.name == comment.author.name) ) %> comment-logged-<%= comment.author ? 'in' : 'out' %>">
2 - <% if user == @page.profile || user == comment.author %> 2 + <% if logged_in? && (user == @page.profile || user == comment.author) %>
3 <% button_bar(:style => 'float: right; margin-top: 0;') do %> 3 <% button_bar(:style => 'float: right; margin-top: 0;') do %>
4 - <%= button(:delete, 'Delete', { :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %> 4 + <%= icon_button(:delete, 'Delete', { :remove_comment => comment.id }, :method => :post, :confirm => _('Are you sure you want to remove this comment?')) %>
5 <% end %> 5 <% end %>
6 <% end %> 6 <% end %>
7 7
app/views/layouts/application.rhtml
@@ -56,9 +56,13 @@ @@ -56,9 +56,13 @@
56 </script> 56 </script>
57 57
58 <% unless flash[:notice].nil? %> 58 <% unless flash[:notice].nil? %>
59 - <div id='notice' onclick="Element.hide('notice');"> 59 + <div id="notice" onclick="Element.hide('notice');" style="display:none">
60 <%= flash[:notice] %> 60 <%= flash[:notice] %>
61 - <%= javascript_tag(visual_effect(:fade, "notice", :duration => 15)) %> 61 + <%= javascript_tag(
  62 + visual_effect( :appear, 'notice', :duration => 2, :queue => :end ) +
  63 + visual_effect( :highlight, 'notice', :duration => 3, :queue => :end ) +
  64 + visual_effect( :fade, 'notice', :duration => 2, :queue => :end )
  65 + ) %>
62 </div> 66 </div>
63 <% end %> 67 <% end %>
64 68