muck-contents 0.2.26 → 0.2.27
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/VERSION +1 -1
- data/app/helpers/tinymce_helper.rb +4 -0
- data/app/views/contents/_form.html.erb +1 -1
- data/app/views/tiny_mce/_tiny_mce_scripts.erb +3 -0
- data/muck-contents.gemspec +2 -2
- metadata +4 -4
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.27
|
@@ -57,6 +57,10 @@ module TinymceHelper
|
|
57
57
|
# message_container_id: id of a container for returned messages
|
58
58
|
# message_id: id of the container for the actual message
|
59
59
|
# include_save_page: This script is used include or omit the 'save_page' javascript. Set to true if the editor includes a save button.
|
60
|
+
# save_button_id: There are two save buttons on the default content form. One is in the TinyMCE editor the other is at the bottom of the page under
|
61
|
+
# all the other controls. If the user presses the save button in the TinyMCE editor and then presses the Save button at the bottom of
|
62
|
+
# the page they will end up with two different content objects. Pass the id of the 'Save' button at the bottom to make it disappear if the user
|
63
|
+
# clicks the TinyMCE Save button.
|
60
64
|
def tiny_mce_scripts(options = {})
|
61
65
|
options[:include_save_page] = true unless options.has_key?(:include_save_page)
|
62
66
|
render :partial => 'tiny_mce/tiny_mce_scripts', :locals => options
|
@@ -28,4 +28,4 @@ message_id = "#{content.dom_id}_message"
|
|
28
28
|
<% end %>
|
29
29
|
</div>
|
30
30
|
|
31
|
-
<%= tiny_mce_scripts(:form_id => form_id, :mce_id => mce_id, :message_container_id => message_container_id, :message_id => message_id) -%>
|
31
|
+
<%= tiny_mce_scripts(:form_id => form_id, :mce_id => mce_id, :message_container_id => message_container_id, :message_id => message_id, :save_button_id => "content_submit_#{content.dom_id}") -%>
|
@@ -4,6 +4,9 @@
|
|
4
4
|
function save_page() {
|
5
5
|
tinyMCE.triggerSave(true,true);
|
6
6
|
var form = jQuery('#<%= form_id %>');
|
7
|
+
<% if defined?(save_button_id) -%>
|
8
|
+
jQuery('#<%= save_button_id %>').hide();
|
9
|
+
<% end -%>
|
7
10
|
jQuery('#errorExplanation').fadeOut();
|
8
11
|
jQuery.post(form.attr('action') + '.json', form.serialize(),
|
9
12
|
function(data){
|
data/muck-contents.gemspec
CHANGED
@@ -5,11 +5,11 @@
|
|
5
5
|
|
6
6
|
Gem::Specification.new do |s|
|
7
7
|
s.name = %q{muck-contents}
|
8
|
-
s.version = "0.2.
|
8
|
+
s.version = "0.2.27"
|
9
9
|
|
10
10
|
s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
|
11
11
|
s.authors = ["Justin Ball", "Joel Duffin"]
|
12
|
-
s.date = %q{2010-07-
|
12
|
+
s.date = %q{2010-07-15}
|
13
13
|
s.email = %q{justin@tatemae.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.rdoc"
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-contents
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 33
|
5
5
|
prerelease: false
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 27
|
10
|
+
version: 0.2.27
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Justin Ball
|
@@ -16,7 +16,7 @@ autorequire:
|
|
16
16
|
bindir: bin
|
17
17
|
cert_chain: []
|
18
18
|
|
19
|
-
date: 2010-07-
|
19
|
+
date: 2010-07-15 00:00:00 -06:00
|
20
20
|
default_executable:
|
21
21
|
dependencies:
|
22
22
|
- !ruby/object:Gem::Dependency
|