hallo_rails 0.2.3 → 0.2.5

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,3 +1,3 @@
1
1
  module HalloRails
2
- VERSION = "0.2.3"
2
+ VERSION = "0.2.5"
3
3
  end
@@ -13,15 +13,7 @@ default_plugins =
13
13
 
14
14
  init = ->
15
15
  context = this
16
- $('.editable, .form_editable').each ->
17
- $el = $(this)
18
- plugins = $el.data('editable-plugins') || context.default_plugins
19
- options = $el.data('editable-options') || context.default_options
20
- $.extend options, { plugins: plugins }
21
- $el.hallo options
22
- $el.data('original-content', $el.html())
23
- $el.click ->
24
- $(this).focus() # required for firefox as otherwise when clicking on edit overlay element doesn't focus
16
+ attach_editor()
25
17
 
26
18
  $('body').on "hallodeactivated", '.editable', ->
27
19
  $el = $(this)
@@ -57,7 +49,19 @@ init = ->
57
49
  $hidden_textarea = $el.next("textarea[name='#{hidden_textarea_name}']")
58
50
  $hidden_textarea.html $el.html()
59
51
 
60
- @HalloRails = { default_options, default_plugins, init }
52
+ attach_editors = ->
53
+ $('.editable, .form_editable').each ->
54
+ $el = $(this)
55
+ plugins = $el.data('editable-plugins') || context.default_plugins
56
+ options = $el.data('editable-options') || context.default_options
57
+ $.extend options, { plugins: plugins }
58
+ $el.hallo options
59
+ $el.data('original-content', $el.html())
60
+ $el.click ->
61
+ $(this).focus() # required for firefox as otherwise when clicking on edit overlay element doesn't focus
62
+
63
+
64
+ @HalloRails = { default_options, default_plugins, init, attach_editor }
61
65
 
62
66
 
63
67
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: hallo_rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.2.3
4
+ version: 0.2.5
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors:
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2013-01-09 00:00:00.000000000 Z
12
+ date: 2013-03-01 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: rails
@@ -58,17 +58,22 @@ required_ruby_version: !ruby/object:Gem::Requirement
58
58
  - - ! '>='
59
59
  - !ruby/object:Gem::Version
60
60
  version: '0'
61
+ segments:
62
+ - 0
63
+ hash: 767064533102952603
61
64
  required_rubygems_version: !ruby/object:Gem::Requirement
62
65
  none: false
63
66
  requirements:
64
67
  - - ! '>='
65
68
  - !ruby/object:Gem::Version
66
69
  version: '0'
70
+ segments:
71
+ - 0
72
+ hash: 767064533102952603
67
73
  requirements: []
68
74
  rubyforge_project:
69
- rubygems_version: 1.8.24
75
+ rubygems_version: 1.8.25
70
76
  signing_key:
71
77
  specification_version: 3
72
78
  summary: Use the Hallo editor to edit content in a Rails app.
73
79
  test_files: []
74
- has_rdoc: