<?xml version="1.0" encoding="UTF-8"?>
<commit>
  <added type="array">
    <added>
      <filename>images/tooltip_image.gif</filename>
    </added>
    <added>
      <filename>javascripts/tooltip.js</filename>
    </added>
    <added>
      <filename>lib/widgets/core.rb</filename>
    </added>
    <added>
      <filename>lib/widgets/tooltip.css.erb</filename>
    </added>
    <added>
      <filename>lib/widgets/tooltip_helper.rb</filename>
    </added>
    <added>
      <filename>test/tooltip_helper_test.rb</filename>
    </added>
  </added>
  <modified type="array">
    <modified>
      <diff>@@ -1,11 +1,21 @@
-# Install hook code here
-def copy_image(name)
+def copy(file_name, from_dir, to_dir)
+  from = File.expand_path(File.join(from_dir,file_name))
+  to = File.expand_path(File.join(to_dir, file_name))
+  puts &quot;copy #{from} to #{to}&quot;  
+end
+
+def copy_image(file_name)
   plugin_images = File.join(File.dirname(__FILE__), 'images')
   app_images = File.join(RAILS_ROOT, 'public/images/widgets')
-  from = File.expand_path(File.join(plugin_images,name))
-  to = File.expand_path(File.join(app_images,name))
-  puts &quot;copy #{from} to #{to}&quot;
+  copy file_name, plugin_images, app_images 
 end
 
-copy_image 'tooltip_arrow.gif'
+def copy_javascript(file_name)
+  plugin_javascripts = File.join(File.dirname(__FILE__), 'javascript')
+  app_javascripts = File.join(RAILS_ROOT, 'public/javascript/widgets')
+  copy file_name, plugin_javascripts, app_javascripts 
+end
 
+copy_image 'tooltip_arrow.gif'
+copy_image 'tooltip_image.gif'
+copy_javascript 'tooltip.js'</diff>
      <filename>install.rb</filename>
    </modified>
    <modified>
      <diff>@@ -1,4 +1,5 @@
 # Widgets
+require 'widgets/core'
 require 'widgets/css_template'
 require 'widgets/highlightable'
 
@@ -24,5 +25,10 @@ ActionController::Base.helper Widgets::TableHelper
 # ActionController::Base.helper Widgets::CodeHelper
 
 ##### ShowHide #####
-require 'widgets'
+require 'widgets/showhide_helper'
 ActionController::Base.helper Widgets::ShowhideHelper
+
+##### Tooltip #####
+require 'widgets/tooltip_helper'
+ActionController::Base.helper Widgets::TooltipHelper
+</diff>
      <filename>lib/widgets.rb</filename>
    </modified>
    <modified>
      <diff>@@ -19,19 +19,19 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
   
   def test_should_fail_if_wrong_args
     assert_raise(ArgumentError) do
-      @view.tableize nil, nil
+      @view.tableize nil
     end
     assert_raise(ArgumentError) do
-      @view.tableize nil, []
+      @view.tableize []
     end
     assert_raise(ArgumentError) do
-      @view.tableize 'main', nil
+      @view.tableize nil, :name =&gt; 'main'
     end
     assert_raise(ArgumentError) do
-      @view.tableize 'main', []
+      @view.tableize [], :name =&gt; 'main'
     end
     assert_raise(ArgumentError) do
-      @view.tableize :the_name, [], :cols =&gt; 1 do
+      @view.tableize [], :cols =&gt; 1, :name =&gt; :the_name do
         # nothing
       end
     end
@@ -40,20 +40,20 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
   def test_block_invariance
     _erbout = ''
     assert_nothing_raised do
-      @view.tableize :the_name, ['IS', 'Same!', 'Thing?'] do |i|
+      @view.tableize ['IS', 'Same!', 'Thing?'], :name =&gt; :the_name do |i|
         _erbout.concat i
       end
     end
     expected, _erbout = _erbout, ''
     assert_nothing_raised do
-      @view.tableize(:the_name, ['IS', 'Same!', 'Thing?']) { |i| _erbout.concat i }
+      @view.tableize(['IS', 'Same!', 'Thing?'], :name =&gt; :the_name) { |i| _erbout.concat i }
     end
     assert_dom_equal expected, _erbout, 'Block vs Proc generation differs'
   end   
   
   def test_empty_layout
     _erbout = ''
-    @view.tableize :empty_layout, [], :cols =&gt; 2 do |i|
+    @view.tableize [], :cols =&gt; 2, :name =&gt; :empty_layout do |i|
       _erbout.concat 'nowhere'
     end
     root = HTML::Document.new(_erbout).root
@@ -67,7 +67,7 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
   
   def test_1_item_layout
     _erbout = ''
-    @view.tableize '1_item_layout', [1] do |i|
+    @view.tableize [1], :name =&gt; '1_item_layout' do |i|
       _erbout.concat i.to_s
     end
     root = HTML::Document.new(_erbout).root
@@ -85,7 +85,7 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
   
   def test_row_less_1_item_layout
     _erbout = ''
-    @view.tableize 'row_less_1_item_layout', %w{1 2 3 4 5}, :cols =&gt; 6 do |i| 
+    @view.tableize %w{1 2 3 4 5}, :cols =&gt; 6, :name =&gt; 'row_less_1_item_layout' do |i| 
       _erbout.concat i.to_s
     end
     root = HTML::Document.new(_erbout).root
@@ -100,12 +100,13 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
           assert_select 'td:nth-of-type(5)', '5'
           assert_select 'td.blank:last-of-type', '&amp;nbsp;'
         end
-      end     end
+      end   
+  end
   end  
   
   def test_full_row_layout
     _erbout = ''
-    @view.tableize :full_row_layout, %w{1 2 3 4 5}, :cols =&gt; 5 do |i| 
+    @view.tableize %w{1 2 3 4 5}, :cols =&gt; 5, :name =&gt; :full_row_layout  do |i| 
       _erbout.concat i.to_s
     end
     root = HTML::Document.new(_erbout).root
@@ -125,7 +126,7 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
   
   def test_row_plus_1_item_layout
     _erbout = ''
-    @view.tableize 'row_plus_1_item_layout', %w{1 2 3 4 5}, :cols =&gt; 4 do |i| 
+    @view.tableize %w{1 2 3 4 5}, :cols =&gt; 4, :name=&gt; 'row_plus_1_item_layout' do |i| 
       _erbout.concat i.to_s
     end
     root = HTML::Document.new(_erbout).root
@@ -150,7 +151,7 @@ class TableizeHelperTest &lt; Test::Unit::TestCase
   
   def test_options
     _erbout = ''
-    @view.tableize nil, nil,
+    @view.tableize nil,
     :name =&gt; :options, 
     :collection =&gt; %w{1 2 3 4 5}, 
     :generate_css =&gt; true,</diff>
      <filename>test/table_helper_test.rb</filename>
    </modified>
  </modified>
  <removed type="array"/>
  <parents type="array">
    <parent>
      <id>9df0d54819e9e534b85eb2626ee45c2b18adb709</id>
    </parent>
  </parents>
  <author>
    <name>paolo</name>
    <email>paolo@dbc01b36-f746-0410-8b88-c76c4e1ff24b</email>
  </author>
  <url>http://github.com/paolodona/rails-widgets/commit/5cd9931fb3426d93cf3414c23bd3719300bed9a4</url>
  <id>5cd9931fb3426d93cf3414c23bd3719300bed9a4</id>
  <committed-date>2007-10-13T01:20:41-07:00</committed-date>
  <authored-date>2007-10-13T01:20:41-07:00</authored-date>
  <message>- added first version of the tooltip widget
- added system to copy default images and javascripts on plugin installation 

git-svn-id: https://rails-widgets.googlecode.com/svn/trunk@30 dbc01b36-f746-0410-8b88-c76c4e1ff24b</message>
  <tree>15157f8efd19e2022d65171a4b30cd40d46181a2</tree>
  <committer>
    <name>paolo</name>
    <email>paolo@dbc01b36-f746-0410-8b88-c76c4e1ff24b</email>
  </committer>
</commit>
