Commit 849a99dd808605ac24aff32ea9fce52ad092fc1b

Authored by AntonioTerceiro
1 parent bc17e077

ActionItem152: renaming lightbox_close to lightbox_close_button


git-svn-id: https://svn.colivre.coop.br/svn/noosfero/trunk@1208 3f533792-8f58-4932-b0fe-aaf55b0a4547
app/helpers/lightbox_helper.rb
... ... @@ -8,7 +8,7 @@ module LightboxHelper
8 8 link_to(text, url, lightbox_options(options))
9 9 end
10 10  
11   - def lightbox_close(text, options = {})
  11 + def lightbox_close_button(text, options = {})
12 12 button(:close, text, '#', lightbox_options(options, 'lbAction').merge(:rel => 'deactivate'))
13 13 end
14 14  
... ...
app/views/search/popup.rhtml
... ... @@ -11,7 +11,7 @@
11 11  
12 12 <div>
13 13 <%= submit_tag(_('Search')) %>
14   - <%= lightbox_close(_('Close')) %>
  14 + <%= lightbox_close_button(_('Close')) %>
15 15 </div>
16 16  
17 17 <% end %>
... ...
test/unit/lightbox_helper_text.rb
... ... @@ -29,13 +29,13 @@ class LightboxHelperTest &lt; Test::Unit::TestCase
29 29 should 'provide link to close lightbox' do
30 30 expects(:button).with(:close, 'text', '#', { :class => 'lbAction', :rel => 'deactivate', :id => 'my-id' }).returns('[close-lightbox]')
31 31  
32   - assert_equal '[close-lightbox]', lightbox_close('text', :id => 'my-id')
  32 + assert_equal '[close-lightbox]', lightbox_close_button('text', :id => 'my-id')
33 33 end
34 34  
35   - should 'merge existing :class option in lightbox_close' do
  35 + should 'merge existing :class option in lightbox_close_button' do
36 36 expects(:button).with(:close, 'text', '#', { :class => 'lbAction my-class', :rel => 'deactivate', :id => 'my-id' }).returns('[close-lightbox]')
37 37  
38   - assert_equal '[close-lightbox]', lightbox_close('text', :class => 'my-class', :id => 'my-id' )
  38 + assert_equal '[close-lightbox]', lightbox_close_button('text', :class => 'my-class', :id => 'my-id' )
39 39 end
40 40  
41 41 should 'provide lightbox_button' do
... ...