Commit 463d81500c8aa56b5267938abd1c0642f524b86e
1 parent
b53de0ff
Exists in
master
and in
29 other branches
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
Showing
3 changed files
with
14 additions
and
5 deletions
Show diff stats
app/helpers/application_helper.rb
... | ... | @@ -248,12 +248,17 @@ module ApplicationHelper |
248 | 248 | end |
249 | 249 | |
250 | 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 | 256 | if html_options.has_key?(:class) |
253 | 257 | the_class << ' ' << html_options[:class] |
254 | 258 | end |
255 | 259 | link_to(content_tag('span', label), url, html_options.merge(:class => the_class )) |
256 | 260 | end |
261 | + alias icon_button button_without_text | |
257 | 262 | |
258 | 263 | def submit_button(type, label, html_options = {}) |
259 | 264 | bt_cancel = html_options[:cancel] ? button(:cancel, _('Cancel'), html_options[:cancel]) : '' | ... | ... |
app/views/content_viewer/_comment.rhtml
1 | 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 | 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 | 5 | <% end %> |
6 | 6 | <% end %> |
7 | 7 | ... | ... |
app/views/layouts/application.rhtml
... | ... | @@ -56,9 +56,13 @@ |
56 | 56 | </script> |
57 | 57 | |
58 | 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 | 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 | 66 | </div> |
63 | 67 | <% end %> |
64 | 68 | ... | ... |