Changeset 1242
- Timestamp:
- 2008-10-24 09:11:45 (3 months ago)
- Files:
-
- trunk/app/helpers/application_helper.rb (modified) (2 diffs)
- trunk/lib/parser/lib/rules/zena.rb (modified) (1 diff)
- trunk/test/helpers/zazen_test.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/app/helpers/application_helper.rb
r1237 r1242 505 505 # if the id starts with '0' or it is not an Image, link to data 506 506 link = zen_path(img, :format => img.c_ext) 507 link_tag = "<a class='popup' href='#{link}' target='_blank'>" 507 508 end 508 509 end … … 534 535 else 535 536 link = "http://#{link}" unless link =~ %r{(^/|.+://.+)} 536 prefix + "<a href='#{link}'>" + image + "</a>" + suffix 537 link_tag ||= "<a href='#{link}'>" 538 prefix + link_tag + image + "</a>" + suffix 537 539 end 538 540 end trunk/lib/parser/lib/rules/zena.rb
r1236 r1242 1652 1652 1653 1653 def r_javascripts 1654 if @params[:list] == 'all' || @params[:list].nil?1654 if @params[:list].nil? 1655 1655 list = %w{ prototype effects tablekit zena } 1656 elsif @params[:list] == 'all' 1657 list = %w{ prototype effects dragdrop tablekit zena } 1656 1658 else 1657 1659 list = @params[:list].split(',').map{|e| e.strip} trunk/test/helpers/zazen_test.rb
r1236 r1242 45 45 assert_equal "<p><img src='/en/projects/cleanWater/image24_std.jpg' width='545' height='400' alt='it's a lake' class='std'/></p>", zazen('!24!') 46 46 # ** [!024!] inline image, default format, link to full image. 47 assert_equal "<p><a href='/oo/projects/cleanWater/image24.jpg'><img src='/en/projects/cleanWater/image24_std.jpg' width='545' height='400' alt='it's a lake' class='std'/></a></p>", zazen('!024!')47 assert_equal "<p><a class='popup' href='/oo/projects/cleanWater/image24.jpg' target='_blank'><img src='/en/projects/cleanWater/image24_std.jpg' width='545' height='400' alt='it's a lake' class='std'/></a></p>", zazen('!024!') 48 48 end 49 49
