muck-contents 0.2.13 → 0.2.14
Sign up to get free protection for your applications and to get access to all the features.
data/VERSION
CHANGED
@@ -1 +1 @@
|
|
1
|
-
0.2.
|
1
|
+
0.2.14
|
@@ -56,7 +56,9 @@ module TinymceHelper
|
|
56
56
|
# mce_id: id of tiny mce editor
|
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
|
+
# include_save_page: This script is used include or omit the 'save_page' javascript. Set to true if the editor includes a save button.
|
59
60
|
def tiny_mce_scripts(options = {})
|
61
|
+
options[:include_save_page] = true unless options.has_key?(:include_save_page)
|
60
62
|
render :partial => 'tiny_mce/tiny_mce_scripts', :locals => options
|
61
63
|
end
|
62
64
|
|
@@ -75,5 +77,11 @@ module TinymceHelper
|
|
75
77
|
:message_id => message_id }
|
76
78
|
end
|
77
79
|
|
78
|
-
|
80
|
+
# Adds tiny mce intialization code if it hasn't already been added.
|
81
|
+
def init_tiny_mce
|
82
|
+
return if defined?(@@init_tiny_mce_completed)
|
83
|
+
@@init_tiny_mce_completed = true
|
84
|
+
render :partial => 'tiny_mce/init_tiny_mce'
|
85
|
+
end
|
86
|
+
|
79
87
|
end
|
@@ -1,8 +1,6 @@
|
|
1
|
-
<%
|
2
|
-
<%= include_tiny_mce_if_needed %>
|
3
|
-
<% end -%>
|
4
|
-
|
1
|
+
<% init_tiny_mce %>
|
5
2
|
<script language="javascript" type="text/javascript">
|
3
|
+
<% if include_save_page -%>
|
6
4
|
function save_page() {
|
7
5
|
tinyMCE.triggerSave(true,true);
|
8
6
|
var form = jQuery('#<%= form_id %>');
|
@@ -24,6 +22,12 @@ function save_page() {
|
|
24
22
|
});
|
25
23
|
return false;
|
26
24
|
}
|
25
|
+
function undirty(){
|
26
|
+
var ed = tinyMCE.get('<%=mce_id%>');
|
27
|
+
ed.isNotDirty = 1;
|
28
|
+
}
|
29
|
+
<% end -%>
|
30
|
+
|
27
31
|
function show_message(message){
|
28
32
|
<% if GlobalConfig.growl_enabled -%>
|
29
33
|
jQuery.jGrowl.info(message);
|
@@ -32,8 +36,4 @@ function show_message(message){
|
|
32
36
|
jQuery('#<%=message_id%>').fadeIn();
|
33
37
|
<% end -%>
|
34
38
|
}
|
35
|
-
function undirty(){
|
36
|
-
var ed = tinyMCE.get('<%=mce_id%>');
|
37
|
-
ed.isNotDirty = 1;
|
38
|
-
}
|
39
39
|
</script>
|
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.14"
|
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{
|
12
|
+
s.date = %q{2010-01-13}
|
13
13
|
s.email = %q{justin@tatemae.com}
|
14
14
|
s.extra_rdoc_files = [
|
15
15
|
"README.rdoc"
|
@@ -34,6 +34,7 @@ Gem::Specification.new do |s|
|
|
34
34
|
"app/views/contents/show.html.erb",
|
35
35
|
"app/views/layouts/tiny_mce.html.erb",
|
36
36
|
"app/views/tiny_mce/_flickr_photo.html.erb",
|
37
|
+
"app/views/tiny_mce/_init_tiny_mce.html.erb",
|
37
38
|
"app/views/tiny_mce/_tiny_mce_messages_and_scripts_for.html.erb",
|
38
39
|
"app/views/tiny_mce/_tiny_mce_scripts.html.erb",
|
39
40
|
"app/views/tiny_mce/files.html.erb",
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: muck-contents
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.2.
|
4
|
+
version: 0.2.14
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Justin Ball
|
@@ -10,7 +10,7 @@ autorequire:
|
|
10
10
|
bindir: bin
|
11
11
|
cert_chain: []
|
12
12
|
|
13
|
-
date:
|
13
|
+
date: 2010-01-13 00:00:00 -07:00
|
14
14
|
default_executable:
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
@@ -141,6 +141,7 @@ files:
|
|
141
141
|
- app/views/contents/show.html.erb
|
142
142
|
- app/views/layouts/tiny_mce.html.erb
|
143
143
|
- app/views/tiny_mce/_flickr_photo.html.erb
|
144
|
+
- app/views/tiny_mce/_init_tiny_mce.html.erb
|
144
145
|
- app/views/tiny_mce/_tiny_mce_messages_and_scripts_for.html.erb
|
145
146
|
- app/views/tiny_mce/_tiny_mce_scripts.html.erb
|
146
147
|
- app/views/tiny_mce/files.html.erb
|