refinerycms-blog 1.8.0 → 2.0.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +54 -0
- data/.rspec +3 -0
- data/.travis.yml +18 -0
- data/Gemfile +68 -5
- data/Guardfile +20 -0
- data/Rakefile +21 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/cog.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/comment.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/comment_cross.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/comment_tick.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/comments.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/down.gif +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/folder.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/folder_add.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/folder_edit.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/page.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/page_add.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/page_copy.png +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/up.gif +0 -0
- data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/rss-feed.png +0 -0
- data/app/assets/images/refinerycms-blog/.gitkeep +0 -0
- data/{public/javascripts/refinery/refinerycms-blog.js → app/assets/javascripts/refinery/blog/backend.js} +66 -1
- data/{public/javascripts/refinerycms-blog.js → app/assets/javascripts/refinery/blog/frontend.js} +0 -0
- data/app/assets/javascripts/refinerycms-blog/.gitkeep +0 -0
- data/app/assets/stylesheets/refinery/blog/backend.css.scss +73 -0
- data/{public/stylesheets/refinerycms-blog.css → app/assets/stylesheets/refinery/blog/frontend.css.scss} +3 -3
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-icons_222222_256x240.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-icons_228ef1_256x240.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-icons_ef8c08_256x240.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-icons_ffd27a_256x240.png +0 -0
- data/{public/stylesheets → app/assets/stylesheets/refinery/blog}/ui-lightness/images/ui-icons_ffffff_256x240.png +0 -0
- data/{public/stylesheets/ui-lightness/jquery-ui-1.8.13.custom.css → app/assets/stylesheets/refinery/blog/ui-lightness/jquery-ui-1.8.13.custom.css.scss} +0 -0
- data/app/assets/stylesheets/refinerycms-blog/.gitkeep +0 -0
- data/app/controllers/.gitkeep +0 -0
- data/app/controllers/refinery/blog/admin/categories_controller.rb +12 -0
- data/app/controllers/refinery/blog/admin/comments_controller.rb +49 -0
- data/app/controllers/refinery/blog/admin/posts_controller.rb +90 -0
- data/app/controllers/refinery/blog/admin/settings_controller.rb +55 -0
- data/app/controllers/refinery/blog/blog_controller.rb +17 -0
- data/app/controllers/refinery/blog/categories_controller.rb +12 -0
- data/app/controllers/refinery/blog/posts_controller.rb +84 -0
- data/app/helpers/.gitkeep +0 -0
- data/app/helpers/refinery/blog/controller_helper.rb +29 -0
- data/app/helpers/refinery/blog/posts_helper.rb +72 -0
- data/app/mailers/refinery/blog/comment_mailer.rb +14 -0
- data/app/models/.gitkeep +0 -0
- data/app/models/refinery/blog/category.rb +23 -0
- data/app/models/refinery/blog/comment.rb +135 -0
- data/app/models/refinery/blog/comment_mailer.rb +1 -0
- data/app/models/refinery/blog/post.rb +115 -0
- data/app/models/refinery/categorization.rb +9 -0
- data/app/sweepers/refinery/blog_sweeper.rb +26 -0
- data/app/views/.gitkeep +0 -0
- data/app/views/{admin/blog → refinery/blog/admin}/_submenu.html.erb +21 -21
- data/app/views/{admin/blog → refinery/blog/admin}/categories/_category.html.erb +3 -3
- data/app/views/{admin/blog → refinery/blog/admin}/categories/_form.html.erb +4 -4
- data/app/views/{admin/blog/comments → refinery/blog/admin/categories}/_sortable_list.html.erb +2 -2
- data/app/views/{admin/blog → refinery/blog/admin}/categories/edit.html.erb +0 -0
- data/app/views/refinery/blog/admin/categories/index.html.erb +27 -0
- data/app/views/{admin/blog → refinery/blog/admin}/categories/new.html.erb +0 -0
- data/app/views/{admin/blog → refinery/blog/admin}/comments/_comment.html.erb +4 -4
- data/app/views/{admin/blog/categories → refinery/blog/admin/comments}/_sortable_list.html.erb +2 -2
- data/app/views/refinery/blog/admin/comments/index.html.erb +30 -0
- data/app/views/refinery/blog/admin/comments/show.html.erb +63 -0
- data/app/views/{admin/blog → refinery/blog/admin}/posts/_form.html.erb +53 -39
- data/app/views/{admin/blog → refinery/blog/admin}/posts/_form_part.html.erb +0 -0
- data/app/views/{admin/blog → refinery/blog/admin}/posts/_post.html.erb +4 -7
- data/app/views/{admin/blog → refinery/blog/admin}/posts/_sortable_list.html.erb +2 -2
- data/app/views/{admin/blog → refinery/blog/admin}/posts/_teaser_part.html.erb +2 -2
- data/app/views/{admin/blog → refinery/blog/admin}/posts/edit.html.erb +0 -0
- data/app/views/refinery/blog/admin/posts/index.html.erb +27 -0
- data/app/views/{admin/blog → refinery/blog/admin}/posts/new.html.erb +0 -0
- data/app/views/refinery/blog/admin/posts/uncategorized.html.erb +27 -0
- data/app/views/{admin/blog → refinery/blog/admin}/settings/notification_recipients.html.erb +3 -3
- data/app/views/refinery/blog/categories/show.html.erb +21 -0
- data/app/views/{blog → refinery/blog}/comment_mailer/notification.html.erb +1 -1
- data/app/views/{blog → refinery/blog}/posts/_comment.html.erb +2 -2
- data/app/views/refinery/blog/posts/_comments.html.erb +40 -0
- data/app/views/refinery/blog/posts/_nav.html.erb +17 -0
- data/app/views/refinery/blog/posts/_post.html.erb +37 -0
- data/app/views/refinery/blog/posts/archive.html.erb +17 -0
- data/app/views/refinery/blog/posts/index.html.erb +20 -0
- data/app/views/refinery/blog/posts/index.rss.builder +17 -0
- data/app/views/refinery/blog/posts/show.html.erb +21 -0
- data/app/views/refinery/blog/posts/tagged.html.erb +19 -0
- data/app/views/refinery/blog/shared/_body_content_right.html.erb +9 -0
- data/app/views/{blog → refinery/blog}/shared/_categories.html.erb +3 -3
- data/app/views/{blog → refinery/blog}/shared/_post.html.erb +11 -11
- data/app/views/refinery/blog/shared/_posts.html.erb +10 -0
- data/app/views/refinery/blog/shared/_rss_feed.html.erb +2 -0
- data/app/views/{blog → refinery/blog}/shared/_tags.html.erb +1 -1
- data/app/views/refinery/blog/widgets/_blog_archive.html.erb +10 -0
- data/app/views/refinery/shared/admin/_autocomplete.html.erb +5 -0
- data/changelog.md +2 -18
- data/config/initializers/url_validator.rb +84 -0
- data/config/locales/bg.yml +139 -139
- data/config/locales/cs.yml +119 -119
- data/config/locales/de.yml +121 -121
- data/config/locales/en.yml +147 -140
- data/config/locales/es.yml +119 -150
- data/config/locales/fr.yml +136 -136
- data/config/locales/it.yml +139 -139
- data/config/locales/ja.yml +2 -3
- data/config/locales/nb.yml +28 -27
- data/config/locales/nl.yml +125 -125
- data/config/locales/pl.yml +125 -125
- data/config/locales/pt-BR.yml +129 -134
- data/config/locales/ru.yml +119 -126
- data/config/locales/sk.yml +119 -119
- data/config/locales/zh-CN.yml +119 -119
- data/config/routes.rb +37 -33
- data/db/migrate/20110803223522_create_blog_structure.rb +52 -0
- data/db/migrate/20110803223523_add_user_id_to_blog_posts.rb +7 -0
- data/db/migrate/{3_acts_as_taggable_on_migration.rb → 20110803223524_acts_as_taggable_on_migration.rb} +2 -2
- data/db/migrate/20110803223526_add_cached_slugs.rb +6 -0
- data/db/migrate/20110803223527_add_custom_url_field_to_blog_posts.rb +5 -0
- data/db/migrate/20110803223528_add_custom_teaser_field_to_blog_posts.rb +6 -0
- data/db/migrate/20110803223529_add_primary_key_to_categorizations.rb +14 -0
- data/db/migrate/20120103055909_add_source_url_to_blog_posts.rb +7 -0
- data/db/migrate/20120223022021_add_access_count_to_posts.rb +8 -0
- data/db/migrate/20120227022021_add_slug_to_posts_and_categories.rb +9 -0
- data/db/{seeds/refinerycms_blog.rb → seeds.rb} +6 -7
- data/lib/generators/refinery/blog/blog_generator.rb +27 -0
- data/lib/generators/refinery/blog/templates/config/initializers/refinery/blog.rb.erb +11 -0
- data/lib/refinery/blog.rb +37 -0
- data/lib/refinery/blog/configuration.rb +14 -0
- data/lib/refinery/blog/engine.rb +25 -0
- data/lib/refinery/blog/tabs.rb +5 -11
- data/lib/refinery/blog/version.rb +3 -3
- data/lib/refinerycms-blog.rb +1 -41
- data/readme.md +24 -15
- data/refinerycms-blog.gemspec +19 -196
- data/script/rails +6 -0
- data/spec/factories/blog_categories.rb +5 -0
- data/spec/factories/blog_comments.rb +19 -0
- data/spec/factories/blog_posts.rb +13 -0
- data/spec/helpers/refinery/blog/posts_helper_spec.rb +71 -0
- data/spec/lib/refinery/blog/engine_spec.rb +26 -0
- data/spec/models/refinery/blog/category_spec.rb +42 -0
- data/spec/models/refinery/blog/comment_spec.rb +19 -0
- data/spec/models/refinery/blog/post_spec.rb +233 -0
- data/spec/requests/refinery/blog/admin/categories_spec.rb +20 -0
- data/spec/requests/refinery/blog/admin/comments_spec.rb +121 -0
- data/spec/requests/refinery/blog/admin/menu_spec.rb +13 -0
- data/spec/requests/refinery/blog/admin/posts_spec.rb +175 -0
- data/spec/requests/refinery/blog/categories_spec.rb +24 -0
- data/spec/requests/refinery/blog/posts_spec.rb +160 -0
- data/spec/spec_helper.rb +56 -0
- data/tasks/rspec.rake +4 -0
- data/tasks/testing.rake +9 -0
- metadata +281 -170
- data/app/controllers/admin/blog/categories_controller.rb +0 -11
- data/app/controllers/admin/blog/comments_controller.rb +0 -40
- data/app/controllers/admin/blog/posts_controller.rb +0 -97
- data/app/controllers/admin/blog/settings_controller.rb +0 -53
- data/app/controllers/blog/categories_controller.rb +0 -13
- data/app/controllers/blog/posts_controller.rb +0 -109
- data/app/controllers/blog_controller.rb +0 -16
- data/app/helpers/blog_posts_helper.rb +0 -56
- data/app/mailers/blog/comment_mailer.rb +0 -13
- data/app/models/blog/comment_mailer.rb +0 -1
- data/app/models/blog_category.rb +0 -19
- data/app/models/blog_comment.rb +0 -137
- data/app/models/blog_post.rb +0 -114
- data/app/models/categorization.rb +0 -7
- data/app/views/admin/blog/categories/index.html.erb +0 -26
- data/app/views/admin/blog/comments/index.html.erb +0 -35
- data/app/views/admin/blog/comments/show.html.erb +0 -63
- data/app/views/admin/blog/posts/_form.css.erb +0 -20
- data/app/views/admin/blog/posts/_form.js.erb +0 -23
- data/app/views/admin/blog/posts/index.html.erb +0 -28
- data/app/views/admin/blog/posts/uncategorized.html.erb +0 -26
- data/app/views/blog/categories/show.html.erb +0 -21
- data/app/views/blog/posts/_nav.html.erb +0 -11
- data/app/views/blog/posts/archive.html.erb +0 -20
- data/app/views/blog/posts/index.html.erb +0 -24
- data/app/views/blog/posts/index.rss.builder +0 -17
- data/app/views/blog/posts/show.html.erb +0 -98
- data/app/views/blog/posts/tagged.html.erb +0 -22
- data/app/views/blog/shared/_archive_list.html.erb +0 -9
- data/app/views/blog/shared/_related_posts.html.erb +0 -10
- data/app/views/blog/shared/_rss_feed.html.erb +0 -2
- data/app/views/shared/admin/_autocomplete.html.erb +0 -55
- data/db/migrate/1_create_blog_structure.rb +0 -54
- data/db/migrate/2_add_user_id_to_blog_posts.rb +0 -11
- data/db/migrate/4_create_seo_meta_for_blog.rb +0 -25
- data/db/migrate/5_add_cached_slugs.rb +0 -11
- data/db/migrate/6_add_custom_url_field_to_blog_posts.rb +0 -9
- data/db/migrate/7_add_custom_teaser_field_to_blog_posts.rb +0 -10
- data/db/migrate/8_add_primary_key_to_categorizations.rb +0 -12
- data/features/authors.feature +0 -15
- data/features/category.feature +0 -23
- data/features/support/factories/blog_categories.rb +0 -5
- data/features/support/factories/blog_comments.rb +0 -8
- data/features/support/factories/blog_posts.rb +0 -9
- data/features/support/paths.rb +0 -24
- data/features/support/step_definitions/authors_steps.rb +0 -7
- data/features/support/step_definitions/category_steps.rb +0 -11
- data/features/support/step_definitions/tags_steps.rb +0 -13
- data/features/tags.feature +0 -26
- data/lib/gemspec.rb +0 -37
- data/lib/generators/refinerycms_blog_generator.rb +0 -8
- data/public/stylesheets/refinery/refinerycms-blog.css +0 -55
- data/spec/models/blog_category_spec.rb +0 -41
- data/spec/models/blog_comment_spec.rb +0 -21
- data/spec/models/blog_post_spec.rb +0 -217
data/.gitignore
ADDED
@@ -0,0 +1,54 @@
|
|
1
|
+
.bundle
|
2
|
+
*.gem
|
3
|
+
*.DS_Store
|
4
|
+
|
5
|
+
# Documentation
|
6
|
+
doc/api
|
7
|
+
doc/app
|
8
|
+
doc/*
|
9
|
+
.yardoc
|
10
|
+
.yardopts
|
11
|
+
|
12
|
+
# Refinery Specific
|
13
|
+
*.tmproj
|
14
|
+
*.autobackupbyrefinery.*
|
15
|
+
/refinerycms-blog*.gem
|
16
|
+
.autotest
|
17
|
+
spec/dummy
|
18
|
+
|
19
|
+
# Mac
|
20
|
+
.DS_Store
|
21
|
+
|
22
|
+
# NetBeans
|
23
|
+
nbproject
|
24
|
+
|
25
|
+
# Eclipse
|
26
|
+
.project
|
27
|
+
|
28
|
+
# Redcar
|
29
|
+
.redcar
|
30
|
+
|
31
|
+
# Rubinius
|
32
|
+
*.rbc
|
33
|
+
|
34
|
+
# Vim
|
35
|
+
*.swp
|
36
|
+
*.swo
|
37
|
+
|
38
|
+
# RubyMine
|
39
|
+
.idea
|
40
|
+
|
41
|
+
# Backup
|
42
|
+
*~
|
43
|
+
|
44
|
+
# Capybara Bug
|
45
|
+
capybara-*html
|
46
|
+
|
47
|
+
# rvm
|
48
|
+
.rvmrc
|
49
|
+
|
50
|
+
#rbenv
|
51
|
+
.rbenv-version
|
52
|
+
|
53
|
+
Gemfile.lock
|
54
|
+
.rbx
|
data/.rspec
ADDED
data/.travis.yml
ADDED
@@ -0,0 +1,18 @@
|
|
1
|
+
before_script:
|
2
|
+
- "bundle exec rake refinery:testing:dummy_app > /dev/null"
|
3
|
+
script: "bundle exec rake spec"
|
4
|
+
notifications:
|
5
|
+
email:
|
6
|
+
- parndt@gmail.com
|
7
|
+
- ugis.ozolss@gmail.com
|
8
|
+
- joe@joesak.com
|
9
|
+
- jamie@enmasse.com
|
10
|
+
env:
|
11
|
+
- DB=postgresql
|
12
|
+
- DB=mysql
|
13
|
+
rvm:
|
14
|
+
- 1.8.7
|
15
|
+
- 1.9.2
|
16
|
+
- 1.9.3
|
17
|
+
- rbx
|
18
|
+
- jruby
|
data/Gemfile
CHANGED
@@ -1,7 +1,70 @@
|
|
1
|
-
source
|
1
|
+
source "http://rubygems.org"
|
2
|
+
|
3
|
+
gemspec
|
4
|
+
|
5
|
+
gem 'refinerycms', '~> 2.0.0'
|
6
|
+
|
7
|
+
group :development, :test do
|
8
|
+
gem 'refinerycms-testing', '~> 2.0.0'
|
9
|
+
end
|
2
10
|
|
3
11
|
group :development, :test do
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
12
|
+
require 'rbconfig'
|
13
|
+
|
14
|
+
platforms :jruby do
|
15
|
+
gem 'activerecord-jdbcsqlite3-adapter'
|
16
|
+
gem 'activerecord-jdbcmysql-adapter'
|
17
|
+
gem 'activerecord-jdbcpostgresql-adapter'
|
18
|
+
gem 'jruby-openssl'
|
19
|
+
end
|
20
|
+
|
21
|
+
unless defined?(JRUBY_VERSION)
|
22
|
+
gem 'sqlite3'
|
23
|
+
gem 'mysql2'
|
24
|
+
gem 'pg'
|
25
|
+
end
|
26
|
+
|
27
|
+
platforms :mswin, :mingw do
|
28
|
+
gem 'win32console'
|
29
|
+
gem 'rb-fchange', '~> 0.0.5'
|
30
|
+
gem 'rb-notifu', '~> 0.0.4'
|
31
|
+
end
|
32
|
+
|
33
|
+
platforms :ruby do
|
34
|
+
gem 'spork', '0.9.0.rc9'
|
35
|
+
gem 'guard-spork'
|
36
|
+
|
37
|
+
unless ENV['TRAVIS']
|
38
|
+
if RbConfig::CONFIG['target_os'] =~ /darwin/i
|
39
|
+
gem 'rb-fsevent', '>= 0.3.9'
|
40
|
+
gem 'growl', '~> 1.0.3'
|
41
|
+
end
|
42
|
+
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
43
|
+
gem 'rb-inotify', '>= 0.5.1'
|
44
|
+
gem 'libnotify', '~> 0.1.3'
|
45
|
+
gem 'therubyracer', '~> 0.9.9'
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
49
|
+
|
50
|
+
platforms :jruby do
|
51
|
+
unless ENV['TRAVIS']
|
52
|
+
if RbConfig::CONFIG['target_os'] =~ /darwin/i
|
53
|
+
gem 'growl', '~> 1.0.3'
|
54
|
+
end
|
55
|
+
if RbConfig::CONFIG['target_os'] =~ /linux/i
|
56
|
+
gem 'rb-inotify', '>= 0.5.1'
|
57
|
+
gem 'libnotify', '~> 0.1.3'
|
58
|
+
end
|
59
|
+
end
|
60
|
+
end
|
61
|
+
end
|
62
|
+
|
63
|
+
# Refinery/rails should pull in the proper versions of these
|
64
|
+
group :assets do
|
65
|
+
gem 'sass-rails'
|
66
|
+
gem 'coffee-rails'
|
67
|
+
gem 'uglifier'
|
68
|
+
end
|
69
|
+
|
70
|
+
gem 'jquery-rails'
|
data/Guardfile
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
guard 'rspec', :version => 2, :cli => "--format Fuubar --color --drb" do
|
2
|
+
watch(%r{^spec/.+_spec\.rb$})
|
3
|
+
watch(%r{^app/(.+)\.rb$}) { |m| "spec/#{m[1]}_spec.rb" }
|
4
|
+
watch(%r{^lib/(.+)\.rb$}) { |m| "spec/lib/#{m[1]}_spec.rb" }
|
5
|
+
watch(%r{^app/controllers/(.+)_(controller)\.rb$}) { |m| ["spec/routing/#{m[1]}_routing_spec.rb", "spec/controllers/#{m[1]}_#{m[2]}_spec.rb", "spec/requests/#{m[1]}_spec.rb"] }
|
6
|
+
watch(%r{^spec/support/(.+)\.rb$}) { "spec" }
|
7
|
+
watch('spec/spec_helper.rb') { "spec" }
|
8
|
+
watch('config/routes.rb') { "spec/routing" }
|
9
|
+
watch('app/controllers/application_controller.rb') { "spec/controllers" }
|
10
|
+
# Capybara request specs
|
11
|
+
watch(%r{^app/views/(.+)/.*\.(erb|haml)$}) { |m| "spec/requests/#{m[1]}_spec.rb" }
|
12
|
+
end
|
13
|
+
|
14
|
+
guard 'spork', :wait => 60, :cucumber => false, :rspec_env => { 'RAILS_ENV' => 'test' } do
|
15
|
+
watch('config/application.rb')
|
16
|
+
watch('config/environment.rb')
|
17
|
+
watch(%r{^config/environments/.+\.rb$})
|
18
|
+
watch(%r{^config/initializers/.+\.rb$})
|
19
|
+
watch('spec/spec_helper.rb')
|
20
|
+
end
|
data/Rakefile
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
#!/usr/bin/env rake
|
2
|
+
begin
|
3
|
+
require 'bundler/setup'
|
4
|
+
rescue LoadError
|
5
|
+
puts 'You must `gem install bundler` and `bundle install` to run rake tasks'
|
6
|
+
end
|
7
|
+
|
8
|
+
ENGINE_PATH = File.dirname(__FILE__)
|
9
|
+
APP_RAKEFILE = File.expand_path("../spec/dummy/Rakefile", __FILE__)
|
10
|
+
|
11
|
+
if File.exists?(APP_RAKEFILE)
|
12
|
+
load 'rails/tasks/engine.rake'
|
13
|
+
end
|
14
|
+
|
15
|
+
require "refinerycms-testing"
|
16
|
+
Refinery::Testing::Railtie.load_tasks
|
17
|
+
Refinery::Testing::Railtie.load_dummy_tasks(ENGINE_PATH)
|
18
|
+
|
19
|
+
load File.expand_path('../tasks/rspec.rake', __FILE__)
|
20
|
+
load File.expand_path('../tasks/testing.rake', __FILE__)
|
21
|
+
|
File without changes
|
File without changes
|
data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/comment_cross.png
RENAMED
File without changes
|
data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/comment_tick.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/folder_add.png
RENAMED
File without changes
|
data/{public/images/refinerycms-blog → app/assets/images/refinery/blog}/icons/folder_edit.png
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
@@ -47,4 +47,69 @@ $(document).ready(function(){
|
|
47
47
|
}, $(this)));
|
48
48
|
e.preventDefault();
|
49
49
|
});
|
50
|
-
|
50
|
+
|
51
|
+
|
52
|
+
$(function() {
|
53
|
+
$('#page-tabs').tabs();
|
54
|
+
$('#copy_body_link').click(function(event) {
|
55
|
+
// Find the WYMEditor that maps to the custom_teaser field
|
56
|
+
var teaserTextArea = $('#blog_post_custom_teaser')[0];
|
57
|
+
var teaserEditor = null;
|
58
|
+
$.each(WYMeditor.INSTANCES, function(index, editor) {
|
59
|
+
if (editor._element[0] == teaserTextArea) {
|
60
|
+
teaserEditor = editor;
|
61
|
+
}
|
62
|
+
});
|
63
|
+
|
64
|
+
if (teaserEditor) {
|
65
|
+
teaserEditor.html($('#blog_post_body').attr('value'));
|
66
|
+
}
|
67
|
+
|
68
|
+
event.preventDefault();
|
69
|
+
});
|
70
|
+
});
|
71
|
+
|
72
|
+
|
73
|
+
function split( val ) {
|
74
|
+
return val.split( /,\s*/ );
|
75
|
+
}
|
76
|
+
function extractLast( term ) {
|
77
|
+
return split( term ).pop();
|
78
|
+
}
|
79
|
+
|
80
|
+
page_options.init(false, '', '')
|
81
|
+
|
82
|
+
$('<%= dom_id %>').bind( "keydown", function( event ) {
|
83
|
+
if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) {
|
84
|
+
event.preventDefault()
|
85
|
+
}
|
86
|
+
}).autocomplete({
|
87
|
+
source: function( request, response ) {
|
88
|
+
$.getJSON( "<%= url %>", {
|
89
|
+
term: extractLast( request.term )
|
90
|
+
}, response );
|
91
|
+
},
|
92
|
+
search: function() {
|
93
|
+
// custom minLength
|
94
|
+
var term = extractLast( this.value );
|
95
|
+
if ( term.length < 2 ) {
|
96
|
+
return false;
|
97
|
+
}
|
98
|
+
},
|
99
|
+
focus: function() {
|
100
|
+
// prevent value inserted on focus
|
101
|
+
return false;
|
102
|
+
},
|
103
|
+
select: function( event, ui ) {
|
104
|
+
var terms = split( this.value );
|
105
|
+
// remove the current input
|
106
|
+
terms.pop();
|
107
|
+
// add the selected item
|
108
|
+
terms.push( ui.item.value );
|
109
|
+
// add placeholder to get the comma-and-space at the end
|
110
|
+
terms.push( "" );
|
111
|
+
this.value = terms.join( ", " );
|
112
|
+
return false;
|
113
|
+
}
|
114
|
+
})
|
115
|
+
});
|
data/{public/javascripts/refinerycms-blog.js → app/assets/javascripts/refinery/blog/frontend.js}
RENAMED
File without changes
|
File without changes
|
@@ -0,0 +1,73 @@
|
|
1
|
+
.comments_icon {
|
2
|
+
background-image: image_url('refinery/blog/icons/comments.png');
|
3
|
+
}
|
4
|
+
.comment_icon {
|
5
|
+
background-image: image_url('refinery/blog/icons/comment.png');
|
6
|
+
}
|
7
|
+
.comment_cross_icon {
|
8
|
+
background-image: image_url('refinery/blog/icons/comment_cross.png');
|
9
|
+
}
|
10
|
+
.comment_tick_icon {
|
11
|
+
background-image: image_url('refinery/blog/icons/comment_tick.png');
|
12
|
+
}
|
13
|
+
.folder_icon {
|
14
|
+
background-image: image_url('refinery/blog/icons/folder.png');
|
15
|
+
}
|
16
|
+
.folder_add_icon {
|
17
|
+
background-image: image_url('refinery/blog/icons/folder_add.png');
|
18
|
+
}
|
19
|
+
.folder_edit_icon {
|
20
|
+
background-image: image_url('refinery/blog/icons/folder_edit.png');
|
21
|
+
}
|
22
|
+
.settings_icon {
|
23
|
+
background-image: image_url('refinery/blog/icons/cog.png');
|
24
|
+
}
|
25
|
+
.page_icon {
|
26
|
+
background-image: image_url('refinery/blog/icons/page.png');
|
27
|
+
}
|
28
|
+
.page_copy_icon {
|
29
|
+
background-image: image_url('refinery/blog/icons/page_copy.png');
|
30
|
+
}
|
31
|
+
.page_add_icon {
|
32
|
+
background-image: image_url('refinery/blog/icons/page_add.png');
|
33
|
+
}
|
34
|
+
ul.collapsible_menu li {
|
35
|
+
position: relative;
|
36
|
+
}
|
37
|
+
ul.collapsible_menu li span.arrow {
|
38
|
+
background-repeat: no-repeat;
|
39
|
+
position: absolute;
|
40
|
+
right: 10px;
|
41
|
+
top: 13px;
|
42
|
+
width: 11px;
|
43
|
+
height: 7px;
|
44
|
+
cursor: pointer;
|
45
|
+
}
|
46
|
+
ul.collapsible_menu li span.arrow {
|
47
|
+
background-image: image_url('refinery/blog/icons/up.gif');
|
48
|
+
}
|
49
|
+
ul.collapsible_menu li.closed span.arrow {
|
50
|
+
background-image: image_url('refinery/blog/icons/down.gif');
|
51
|
+
}
|
52
|
+
ul.collapsible_menu > div {
|
53
|
+
width: 93%;
|
54
|
+
margin: 0px auto;
|
55
|
+
}
|
56
|
+
ul.blog_categories{
|
57
|
+
height:200px;
|
58
|
+
overflow:auto;
|
59
|
+
border:1px solid #ccc;
|
60
|
+
padding:5px;
|
61
|
+
}
|
62
|
+
ul.blog_categories, ul.blog_categories li {
|
63
|
+
list-style: none;
|
64
|
+
margin:5px 0;
|
65
|
+
}
|
66
|
+
a#copy_body_link {
|
67
|
+
background: image_url('refinery/blog/icons/add.png') no-repeat scroll 0 6px transparent;
|
68
|
+
border-bottom: 0 none;
|
69
|
+
display: inline;
|
70
|
+
line-height: 29px;
|
71
|
+
margin-top: 0;
|
72
|
+
padding-left: 20px;
|
73
|
+
}
|
@@ -22,7 +22,7 @@
|
|
22
22
|
#rss_feed_subscribe {
|
23
23
|
display: block;
|
24
24
|
padding-left: 25px;
|
25
|
-
background:
|
25
|
+
background: image_url('refinery/blog/rss-feed.png') no-repeat;
|
26
26
|
}
|
27
27
|
#next_prev_article{
|
28
28
|
overflow:hidden;
|
@@ -58,7 +58,7 @@
|
|
58
58
|
.flash_notice, .flash_message {
|
59
59
|
border: 1px solid #00A017;
|
60
60
|
color: #00A017;
|
61
|
-
background: 7px 7px no-repeat
|
61
|
+
background: 7px 7px no-repeat image_url('refinery/blog/icons/accept.png') #E0F5E0;
|
62
62
|
}
|
63
63
|
.flash_notice, .flash_notice * {
|
64
64
|
color: #00A017;
|
@@ -66,7 +66,7 @@
|
|
66
66
|
.flash_error {
|
67
67
|
border: 1px solid #A00027;
|
68
68
|
color: #A00027;
|
69
|
-
background: 7px 7px no-repeat
|
69
|
+
background: 7px 7px no-repeat image_url('refinery/blog/icons/cancel.png') #FFB1B1;
|
70
70
|
}
|
71
71
|
.flash.flash_notice #flash_close, .flash.flash_error #flash_close {
|
72
72
|
text-transform: lowercase;
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|