textile_toolbar 0.5.1 → 0.5.4

Sign up to get free protection for your applications and to get access to all the features.
data/CHANGELOG CHANGED
@@ -1,4 +1,4 @@
1
- 10/22/08 - Automated asset copying into Rails project [Matthew Bass]
2
- Updated documentation [Matthew Bass]
3
-
4
- 8/21/08 - Initial version [Matthew Bass]
1
+ 12/14/09 - fixed gem support [MJB]
2
+ 12/14/09 - removed asset copying [MJB]
3
+ 10/22/08 - added automatic asset copying [MJB]
4
+ 08/21/08 - initial version [MJB]
data/TODO CHANGED
@@ -1,4 +1,5 @@
1
1
  - Add specs for existing functionality
2
2
  - Incorporate live preview? See http://jrm.cc/extras/live-textile-preview.php
3
3
  - More buttons (check PHP bulletin board)
4
- - Create Radiant extension for admin text areas
4
+ - Create Radiant extension for admin text areas
5
+ - Convert textile_toolbar.js to jQuery
@@ -4,25 +4,25 @@ module TextileToolbar
4
4
  def textile_area(object_name, method, options={})
5
5
  disable = options.delete(:disable) || {}
6
6
  toolbar = textile_toolbar(options[:id] || "#{object_name}_#{method}", disable)
7
- "<div class=\"textile_toolbar\">#{toolbar}</div>" <<
8
- "<div class=\"textile_area\">#{text_area(object_name, method, options)}</div>"
7
+ raw("<div class=\"textile_toolbar\">#{toolbar}</div><div class=\"textile_area\">#{text_area(object_name, method, options)}</div>").html_safe
9
8
  end
10
9
 
11
10
  def textile_toolbar(id, disable)
12
11
  html = javascript_include_tag("textile_toolbar")
13
12
  html << link_to_function(image_tag("textile_toolbar/bold.png", :size => "23x22", :alt => "Make selection bold"), "surround_selection('#{id}', '*', '*')")
14
- html << "&nbsp;"
13
+ html << raw("&nbsp;")
15
14
  html << link_to_function(image_tag("textile_toolbar/italic.png", :size => "23x22", :alt => "Make selection italic"), "surround_selection('#{id}', '_', '_')")
16
- html << "&nbsp;"
15
+ html << raw("&nbsp;")
17
16
  html << link_to_function(image_tag("textile_toolbar/underline.png", :size => "23x22", :alt => "Make selection underlined"), "surround_selection('#{id}', '+', '+')")
18
- html << "&nbsp;"
17
+ html << raw("&nbsp;")
19
18
  html << link_to_function(image_tag("textile_toolbar/hyperlink.png", :size => "23x22", :alt => "Make hyperlink"), "insert_hyperlink('#{id}')")
20
- html << "&nbsp;"
19
+ html << raw("&nbsp;")
21
20
  unless disable == :image
22
21
  html << link_to_function(image_tag("textile_toolbar/image.png", :size => "23x22", :alt => "Insert image"), "insert_image('#{id}')")
23
- html << "&nbsp;&nbsp;"
22
+ html << raw("&nbsp;")
24
23
  end
25
- html << "<small>" << link_to("Textile", "http://hobix.com/textile/", :target => "_blank") << "&nbsp;enabled</small>"
24
+ html << raw("<small>") << link_to("Textile", "http://hobix.com/textile/", :target => "_blank") << raw(" enabled</small>")
25
+ html.html_safe
26
26
  end
27
27
 
28
28
  module FormBuilder
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{textile_toolbar}
8
- s.version = "0.5.1"
8
+ s.version = "0.5.4"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Matthew Bass"]
12
- s.date = %q{2009-12-14}
12
+ s.date = %q{2013-02-08}
13
13
  s.description = %q{Adds a handy Textile toolbar to any text area.}
14
14
  s.email = %q{pelargir@gmail.com}
15
15
  s.extra_rdoc_files = [
metadata CHANGED
@@ -1,28 +1,24 @@
1
- --- !ruby/object:Gem::Specification
1
+ --- !ruby/object:Gem::Specification
2
2
  name: textile_toolbar
3
- version: !ruby/object:Gem::Version
4
- version: 0.5.1
3
+ version: !ruby/object:Gem::Version
4
+ version: 0.5.4
5
+ prerelease:
5
6
  platform: ruby
6
- authors:
7
+ authors:
7
8
  - Matthew Bass
8
9
  autorequire:
9
10
  bindir: bin
10
11
  cert_chain: []
11
-
12
- date: 2009-12-14 00:00:00 -05:00
13
- default_executable:
12
+ date: 2013-02-08 00:00:00.000000000 Z
14
13
  dependencies: []
15
-
16
14
  description: Adds a handy Textile toolbar to any text area.
17
15
  email: pelargir@gmail.com
18
16
  executables: []
19
-
20
17
  extensions: []
21
-
22
- extra_rdoc_files:
18
+ extra_rdoc_files:
23
19
  - README
24
20
  - TODO
25
- files:
21
+ files:
26
22
  - .gitignore
27
23
  - CHANGELOG
28
24
  - MIT-LICENSE
@@ -42,34 +38,31 @@ files:
42
38
  - test/test_helper.rb
43
39
  - test/textile_toolbar_test.rb
44
40
  - textile_toolbar.gemspec
45
- has_rdoc: true
46
41
  homepage: http://github.com/pelargir/textile_toolbar
47
42
  licenses: []
48
-
49
43
  post_install_message:
50
- rdoc_options:
44
+ rdoc_options:
51
45
  - --charset=UTF-8
52
- require_paths:
46
+ require_paths:
53
47
  - lib
54
- required_ruby_version: !ruby/object:Gem::Requirement
55
- requirements:
56
- - - ">="
57
- - !ruby/object:Gem::Version
58
- version: "0"
59
- version:
60
- required_rubygems_version: !ruby/object:Gem::Requirement
61
- requirements:
62
- - - ">="
63
- - !ruby/object:Gem::Version
64
- version: "0"
65
- version:
48
+ required_ruby_version: !ruby/object:Gem::Requirement
49
+ none: false
50
+ requirements:
51
+ - - ! '>='
52
+ - !ruby/object:Gem::Version
53
+ version: '0'
54
+ required_rubygems_version: !ruby/object:Gem::Requirement
55
+ none: false
56
+ requirements:
57
+ - - ! '>='
58
+ - !ruby/object:Gem::Version
59
+ version: '0'
66
60
  requirements: []
67
-
68
61
  rubyforge_project:
69
- rubygems_version: 1.3.5
62
+ rubygems_version: 1.8.24
70
63
  signing_key:
71
64
  specification_version: 3
72
65
  summary: Adds a handy Textile toolbar to any text area.
73
- test_files:
66
+ test_files:
74
67
  - test/test_helper.rb
75
68
  - test/textile_toolbar_test.rb