contentment 0.7.1 → 0.8.3
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/.gitignore +17 -0
- data/.rvmrc +1 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +22 -0
- data/Rakefile +1 -0
- data/contentment.gemspec +24 -0
- data/lib/contentment.rb +3 -6
- data/lib/contentment/engine.rb +2 -0
- data/lib/contentment/version.rb +3 -0
- data/lib/generators/contentment/contentment_views_templates/contents/edit.html.erb +32 -28
- metadata +16 -6
data/.gitignore
ADDED
data/.rvmrc
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
rvm use 1.9.3@contentment --create
|
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
Copyright (c) 2012 Bob Larrick
|
|
2
|
+
|
|
3
|
+
MIT License
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
|
6
|
+
a copy of this software and associated documentation files (the
|
|
7
|
+
"Software"), to deal in the Software without restriction, including
|
|
8
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
|
9
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
|
10
|
+
permit persons to whom the Software is furnished to do so, subject to
|
|
11
|
+
the following conditions:
|
|
12
|
+
|
|
13
|
+
The above copyright notice and this permission notice shall be
|
|
14
|
+
included in all copies or substantial portions of the Software.
|
|
15
|
+
|
|
16
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
17
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
18
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
19
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
20
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
21
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
22
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/Rakefile
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
require "bundler/gem_tasks"
|
data/contentment.gemspec
ADDED
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
|
4
|
+
require 'contentment/version'
|
|
5
|
+
|
|
6
|
+
Gem::Specification.new do |gem|
|
|
7
|
+
gem.name = "contentment"
|
|
8
|
+
gem.version = Contentment::VERSION
|
|
9
|
+
gem.authors = ["Bob Larrick"]
|
|
10
|
+
gem.email = ["larrick@gmail.com"]
|
|
11
|
+
gem.description = "Rails Engine for simple content management. See readme on github for details."
|
|
12
|
+
gem.extra_rdoc_files = ["README.rdoc"]
|
|
13
|
+
|
|
14
|
+
gem.summary = "Rails Engine for simple content management."
|
|
15
|
+
gem.homepage = "https://github.com/deathbob/Contentment"
|
|
16
|
+
gem.rubyforge_project = "contentment"
|
|
17
|
+
|
|
18
|
+
gem.files = `git ls-files`.split($/)
|
|
19
|
+
gem.executables = gem.files.grep(%r{^bin/}).map{ |f| File.basename(f) }
|
|
20
|
+
gem.test_files = gem.files.grep(%r{^(test|spec|features)/})
|
|
21
|
+
gem.require_paths = ["lib"]
|
|
22
|
+
|
|
23
|
+
gem.add_runtime_dependency 'tinymce-rails'
|
|
24
|
+
end
|
data/lib/contentment.rb
CHANGED
|
@@ -1,8 +1,5 @@
|
|
|
1
|
+
require "contentment/version"
|
|
2
|
+
|
|
1
3
|
module Contentment
|
|
2
|
-
|
|
3
|
-
# if you are using rails and your rails version is 3.x..
|
|
4
|
-
require 'contentment/engine' if defined?(Rails) && Rails::VERSION::MAJOR == 3
|
|
4
|
+
require 'contentment/engine'
|
|
5
5
|
end
|
|
6
|
-
# Adding a couple of extra files here and you can view all of the source
|
|
7
|
-
# to see what they have in them.
|
|
8
|
-
require 'extensions/action_controller/base'
|
data/lib/contentment/engine.rb
CHANGED
|
@@ -1,36 +1,40 @@
|
|
|
1
|
-
<%=
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
theme_advanced_buttons2 : "",
|
|
14
|
-
theme_advanced_buttons3 : "",
|
|
15
|
-
theme_advanced_toolbar_align : "left",
|
|
16
|
-
theme_advanced_toolbar_location : "top",
|
|
17
|
-
valid_elements : "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big",
|
|
18
|
-
setup : function(ed) { ed.onKeyUp.add(function(ed, evt) { var iframe = document.getElementById('content_body_ifr'); var paul = iframe.contentWindow.document.body.innerHTML; $('.content_preview_body').html(paul); }); } };
|
|
19
|
-
init.mode = 'specific_textareas';
|
|
20
|
-
init.editor_selector = 'tinymce';
|
|
21
|
-
init.plugins = 'paste';
|
|
22
|
-
init.language = 'en';
|
|
23
|
-
|
|
24
|
-
tinyMCE.init(init);
|
|
25
|
-
},
|
|
1
|
+
<%= tinymce_assets %>
|
|
2
|
+
|
|
3
|
+
<%= content_for :javascript do %>
|
|
4
|
+
<script type="text/javascript">
|
|
5
|
+
$(document).ready(function(){$('.edit_content').keyup(function(){$('.content_preview_title').html($('#content_title').val());});})
|
|
6
|
+
</script>
|
|
7
|
+
|
|
8
|
+
<script type="text/javascript">
|
|
9
|
+
tinyMCE.init({
|
|
10
|
+
mode: 'specific_textareas',
|
|
11
|
+
plugins: 'paste',
|
|
12
|
+
language: 'en',
|
|
26
13
|
addEditor : function(dom_id) {
|
|
27
14
|
tinyMCE.execCommand('mceAddControl', true, dom_id);
|
|
28
|
-
}
|
|
29
|
-
|
|
30
|
-
|
|
15
|
+
},
|
|
16
|
+
setup : function(ed) {
|
|
17
|
+
ed.onKeyUp.add(function(ed, evt) {
|
|
18
|
+
var iframe = document.getElementById('content_body_ifr'); var paul = iframe.contentWindow.document.body.innerHTML; $('.content_preview_body').html(paul);
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
paste_convert_headers_to_strong : true,
|
|
22
|
+
paste_convert_middot_lists : true,
|
|
23
|
+
paste_remove_spans : true,
|
|
24
|
+
paste_remove_styles : true,
|
|
25
|
+
paste_strip_class_attributes : true,
|
|
26
|
+
theme : "advanced",
|
|
27
|
+
theme_advanced_buttons1 : "undo,redo,cut,copy,paste,|,bold,italic,strikethrough,blockquote,charmap,bullist,numlist,removeformat,|,link,unlink,|,cleanup,code",
|
|
28
|
+
theme_advanced_buttons2 : "",
|
|
29
|
+
theme_advanced_buttons3 : "",
|
|
30
|
+
theme_advanced_toolbar_align : "left",
|
|
31
|
+
theme_advanced_toolbar_location : "top",
|
|
32
|
+
valid_elements : "@[id|class|style|title|dir<ltr?rtl|lang|xml::lang|onclick|ondblclick|onmousedown|onmouseup|onmouseover|onmousemove|onmouseout|onkeypress|onkeydown|onkeyup],a[rel|rev|charset|hreflang|tabindex|accesskey|type|name|href|target|title|class|onfocus|onblur],strong/b,em/i,strike,u,#p,-ol[type|compact],-ul[type|compact],-li,br,img[longdesc|usemap|src|border|alt=|title|hspace|vspace|width|height|align],-sub,-sup,-blockquote,-table[border=0|cellspacing|cellpadding|width|frame|rules|height|align|summary|bgcolor|background|bordercolor],-tr[rowspan|width|height|align|valign|bgcolor|background|bordercolor],tbody,thead,tfoot,#td[colspan|rowspan|width|height|align|valign|bgcolor|background|bordercolor|scope],#th[colspan|rowspan|width|height|align|valign|scope],caption,-div,-span,-code,-pre,address,-h1,-h2,-h3,-h4,-h5,-h6,hr[size|noshade],-font[face|size|color],dd,dl,dt,cite,abbr,acronym,del[datetime|cite],ins[datetime|cite],object[classid|width|height|codebase|*],param[name|value|_value],embed[type|width|height|src|*],script[src|type],map[name],area[shape|coords|href|alt|target],bdo,button,col[align|char|charoff|span|valign|width],colgroup[align|char|charoff|span|valign|width],dfn,fieldset,form[action|accept|accept-charset|enctype|method],input[accept|alt|checked|disabled|maxlength|name|readonly|size|src|type|value],kbd,label[for],legend,noscript,optgroup[label|disabled],option[disabled|label|selected|value],q[cite],samp,select[disabled|multiple|name|size],small,textarea[cols|rows|disabled|name|readonly],tt,var,big"
|
|
33
|
+
});
|
|
31
34
|
</script>
|
|
32
35
|
<% end %>
|
|
33
36
|
|
|
37
|
+
|
|
34
38
|
<%= link_to 'New content', new_content_path, :class => 'button', :id => "add-content" %>
|
|
35
39
|
<%= link_to "Back to Content List", contents_path, :class => 'button', :id => 'back-to-contents' %>
|
|
36
40
|
<div>
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: contentment
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.
|
|
4
|
+
version: 0.8.3
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,17 +9,17 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-09-
|
|
12
|
+
date: 2012-09-18 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
|
-
name:
|
|
15
|
+
name: tinymce-rails
|
|
16
16
|
requirement: !ruby/object:Gem::Requirement
|
|
17
17
|
none: false
|
|
18
18
|
requirements:
|
|
19
19
|
- - ! '>='
|
|
20
20
|
- !ruby/object:Gem::Version
|
|
21
21
|
version: '0'
|
|
22
|
-
type: :
|
|
22
|
+
type: :runtime
|
|
23
23
|
prerelease: false
|
|
24
24
|
version_requirements: !ruby/object:Gem::Requirement
|
|
25
25
|
none: false
|
|
@@ -29,15 +29,25 @@ dependencies:
|
|
|
29
29
|
version: '0'
|
|
30
30
|
description: Rails Engine for simple content management. See readme on github for
|
|
31
31
|
details.
|
|
32
|
-
email:
|
|
32
|
+
email:
|
|
33
|
+
- larrick@gmail.com
|
|
33
34
|
executables: []
|
|
34
35
|
extensions: []
|
|
35
36
|
extra_rdoc_files:
|
|
36
37
|
- README.rdoc
|
|
37
38
|
files:
|
|
39
|
+
- .gitignore
|
|
40
|
+
- .rvmrc
|
|
41
|
+
- Gemfile
|
|
42
|
+
- Gemfile.lock
|
|
43
|
+
- LICENSE.txt
|
|
44
|
+
- README.rdoc
|
|
45
|
+
- Rakefile
|
|
38
46
|
- config/routes.rb
|
|
47
|
+
- contentment.gemspec
|
|
39
48
|
- lib/contentment.rb
|
|
40
49
|
- lib/contentment/engine.rb
|
|
50
|
+
- lib/contentment/version.rb
|
|
41
51
|
- lib/extensions/action_controller/base.rb
|
|
42
52
|
- lib/generators/contentment/contentment_views_templates/contents/_form.html.erb
|
|
43
53
|
- lib/generators/contentment/contentment_views_templates/contents/_preview.html.erb
|
|
@@ -52,7 +62,7 @@ files:
|
|
|
52
62
|
- lib/generators/contentment/templates/migration.rb
|
|
53
63
|
- lib/generators/contentment_generator.rb
|
|
54
64
|
- lib/generators/contentment_views_generator.rb
|
|
55
|
-
-
|
|
65
|
+
- pkg/contentment-0.7.1.gem
|
|
56
66
|
homepage: https://github.com/deathbob/Contentment
|
|
57
67
|
licenses: []
|
|
58
68
|
post_install_message:
|