diff options
author | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-08-03 13:17:16 +0300 |
---|---|---|
committer | Uģis Ozols <ugis.ozolss@gmail.com> | 2011-08-03 13:17:16 +0300 |
commit | 476ad3f15810455fd40cc8374af1a253471b296c (patch) | |
tree | c3cc8e7993364f7d0fb9362cf6c0bc6e99873e44 | |
parent | 806aef18583a4fcdc5a88a6e2acfe6b779abea4c (diff) | |
download | refinerycms-blog-476ad3f15810455fd40cc8374af1a253471b296c.tar.gz refinerycms-blog-476ad3f15810455fd40cc8374af1a253471b296c.tar.bz2 refinerycms-blog-476ad3f15810455fd40cc8374af1a253471b296c.zip |
WIP - use asset pipeline.
-rw-r--r-- | app/assets/images/refinery/blog/icons/cog.png (renamed from public/images/refinerycms-blog/icons/cog.png) | bin | 512 -> 512 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/comment.png (renamed from public/images/refinerycms-blog/icons/comment.png) | bin | 413 -> 413 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/comment_cross.png (renamed from public/images/refinerycms-blog/icons/comment_cross.png) | bin | 1507 -> 1507 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/comment_tick.png (renamed from public/images/refinerycms-blog/icons/comment_tick.png) | bin | 1524 -> 1524 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/comments.png (renamed from public/images/refinerycms-blog/icons/comments.png) | bin | 557 -> 557 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/down.gif (renamed from public/images/refinerycms-blog/icons/down.gif) | bin | 110 -> 110 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/folder.png (renamed from public/images/refinerycms-blog/icons/folder.png) | bin | 537 -> 537 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/folder_add.png (renamed from public/images/refinerycms-blog/icons/folder_add.png) | bin | 668 -> 668 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/folder_edit.png (renamed from public/images/refinerycms-blog/icons/folder_edit.png) | bin | 733 -> 733 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/page.png (renamed from public/images/refinerycms-blog/icons/page.png) | bin | 635 -> 635 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/page_add.png (renamed from public/images/refinerycms-blog/icons/page_add.png) | bin | 739 -> 739 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/page_copy.png (renamed from public/images/refinerycms-blog/icons/page_copy.png) | bin | 663 -> 663 bytes | |||
-rw-r--r-- | app/assets/images/refinery/blog/icons/up.gif (renamed from public/images/refinerycms-blog/icons/up.gif) | bin | 111 -> 111 bytes | |||
-rwxr-xr-x | app/assets/images/refinery/blog/rss-feed.png (renamed from public/images/refinerycms-blog/rss-feed.png) | bin | 689 -> 689 bytes | |||
-rw-r--r-- | app/assets/javascripts/refinery/blog/backend.js (renamed from public/javascripts/refinery/refinerycms-blog.js) | 67 | ||||
-rw-r--r-- | app/assets/javascripts/refinery/blog/frontend.js (renamed from public/javascripts/refinerycms-blog.js) | 0 | ||||
-rw-r--r-- | app/assets/stylesheets/refinery/blog/backend.css.scss | 73 | ||||
-rw-r--r-- | app/assets/stylesheets/refinery/blog/frontend.css.scss (renamed from public/stylesheets/refinerycms-blog.css) | 6 | ||||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png) | bin | 260 -> 260 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png) | bin | 251 -> 251 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_flat_10_000000_40x100.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png) | bin | 178 -> 178 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png) | bin | 104 -> 104 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png) | bin | 125 -> 125 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png) | bin | 105 -> 105 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png) | bin | 3762 -> 3762 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png) | bin | 90 -> 90 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png (renamed from public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png) | bin | 129 -> 129 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_222222_256x240.png (renamed from public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png) | bin | 4369 -> 4369 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_228ef1_256x240.png (renamed from public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png) | bin | 4369 -> 4369 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ef8c08_256x240.png (renamed from public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png) | bin | 4369 -> 4369 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffd27a_256x240.png (renamed from public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png) | bin | 4369 -> 4369 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffffff_256x240.png (renamed from public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png) | bin | 4369 -> 4369 bytes | |||
-rwxr-xr-x | app/assets/stylesheets/refinery/blog/ui-lightness/jquery-ui-1.8.13.custom.css.scss (renamed from public/stylesheets/ui-lightness/jquery-ui-1.8.13.custom.css) | 0 | ||||
-rw-r--r-- | app/views/refinery/admin/blog/_submenu.html.erb | 2 | ||||
-rw-r--r-- | app/views/refinery/admin/blog/comments/show.html.erb | 2 | ||||
-rw-r--r-- | app/views/refinery/admin/blog/posts/_form.css.erb | 20 | ||||
-rw-r--r-- | app/views/refinery/admin/blog/posts/_form.html.erb | 4 | ||||
-rw-r--r-- | app/views/refinery/admin/blog/posts/_form.js.erb | 23 | ||||
-rw-r--r-- | app/views/refinery/blog/categories/show.html.erb | 2 | ||||
-rw-r--r-- | app/views/refinery/blog/posts/archive.html.erb | 2 | ||||
-rw-r--r-- | app/views/refinery/blog/posts/index.html.erb | 2 | ||||
-rw-r--r-- | app/views/refinery/blog/posts/show.html.erb | 4 | ||||
-rw-r--r-- | app/views/refinery/blog/posts/tagged.html.erb | 2 | ||||
-rw-r--r-- | app/views/refinery/shared/admin/_autocomplete.html.erb | 52 | ||||
-rw-r--r-- | lib/refinerycms-blog.rb | 4 | ||||
-rw-r--r-- | public/stylesheets/refinery/refinerycms-blog.css | 55 | ||||
-rw-r--r-- | refinerycms-blog.gemspec | 98 |
47 files changed, 206 insertions, 212 deletions
diff --git a/public/images/refinerycms-blog/icons/cog.png b/app/assets/images/refinery/blog/icons/cog.png Binary files differindex 67de2c6..67de2c6 100644 --- a/public/images/refinerycms-blog/icons/cog.png +++ b/app/assets/images/refinery/blog/icons/cog.png diff --git a/public/images/refinerycms-blog/icons/comment.png b/app/assets/images/refinery/blog/icons/comment.png Binary files differindex 7bc9233..7bc9233 100644 --- a/public/images/refinerycms-blog/icons/comment.png +++ b/app/assets/images/refinery/blog/icons/comment.png diff --git a/public/images/refinerycms-blog/icons/comment_cross.png b/app/assets/images/refinery/blog/icons/comment_cross.png Binary files differindex 6f8102d..6f8102d 100644 --- a/public/images/refinerycms-blog/icons/comment_cross.png +++ b/app/assets/images/refinery/blog/icons/comment_cross.png diff --git a/public/images/refinerycms-blog/icons/comment_tick.png b/app/assets/images/refinery/blog/icons/comment_tick.png Binary files differindex bcb3ae4..bcb3ae4 100644 --- a/public/images/refinerycms-blog/icons/comment_tick.png +++ b/app/assets/images/refinery/blog/icons/comment_tick.png diff --git a/public/images/refinerycms-blog/icons/comments.png b/app/assets/images/refinery/blog/icons/comments.png Binary files differindex 39433cf..39433cf 100644 --- a/public/images/refinerycms-blog/icons/comments.png +++ b/app/assets/images/refinery/blog/icons/comments.png diff --git a/public/images/refinerycms-blog/icons/down.gif b/app/assets/images/refinery/blog/icons/down.gif Binary files differindex 990bd87..990bd87 100644 --- a/public/images/refinerycms-blog/icons/down.gif +++ b/app/assets/images/refinery/blog/icons/down.gif diff --git a/public/images/refinerycms-blog/icons/folder.png b/app/assets/images/refinery/blog/icons/folder.png Binary files differindex 784e8fa..784e8fa 100644 --- a/public/images/refinerycms-blog/icons/folder.png +++ b/app/assets/images/refinery/blog/icons/folder.png diff --git a/public/images/refinerycms-blog/icons/folder_add.png b/app/assets/images/refinery/blog/icons/folder_add.png Binary files differindex 529fe8f..529fe8f 100644 --- a/public/images/refinerycms-blog/icons/folder_add.png +++ b/app/assets/images/refinery/blog/icons/folder_add.png diff --git a/public/images/refinerycms-blog/icons/folder_edit.png b/app/assets/images/refinery/blog/icons/folder_edit.png Binary files differindex ad669cc..ad669cc 100644 --- a/public/images/refinerycms-blog/icons/folder_edit.png +++ b/app/assets/images/refinery/blog/icons/folder_edit.png diff --git a/public/images/refinerycms-blog/icons/page.png b/app/assets/images/refinery/blog/icons/page.png Binary files differindex 03ddd79..03ddd79 100644 --- a/public/images/refinerycms-blog/icons/page.png +++ b/app/assets/images/refinery/blog/icons/page.png diff --git a/public/images/refinerycms-blog/icons/page_add.png b/app/assets/images/refinery/blog/icons/page_add.png Binary files differindex d5bfa07..d5bfa07 100644 --- a/public/images/refinerycms-blog/icons/page_add.png +++ b/app/assets/images/refinery/blog/icons/page_add.png diff --git a/public/images/refinerycms-blog/icons/page_copy.png b/app/assets/images/refinery/blog/icons/page_copy.png Binary files differindex 195dc6d..195dc6d 100644 --- a/public/images/refinerycms-blog/icons/page_copy.png +++ b/app/assets/images/refinery/blog/icons/page_copy.png diff --git a/public/images/refinerycms-blog/icons/up.gif b/app/assets/images/refinery/blog/icons/up.gif Binary files differindex 1edf617..1edf617 100644 --- a/public/images/refinerycms-blog/icons/up.gif +++ b/app/assets/images/refinery/blog/icons/up.gif diff --git a/public/images/refinerycms-blog/rss-feed.png b/app/assets/images/refinery/blog/rss-feed.png Binary files differindex b3c949d..b3c949d 100755 --- a/public/images/refinerycms-blog/rss-feed.png +++ b/app/assets/images/refinery/blog/rss-feed.png diff --git a/public/javascripts/refinery/refinerycms-blog.js b/app/assets/javascripts/refinery/blog/backend.js index e730c6f..695cdb7 100644 --- a/public/javascripts/refinery/refinerycms-blog.js +++ b/app/assets/javascripts/refinery/blog/backend.js @@ -47,4 +47,69 @@ $(document).ready(function(){ }, $(this))); e.preventDefault(); }); -});
\ No newline at end of file + + + $(function() { + $('#page-tabs').tabs(); + $('#copy_body_link').click(function(event) { + // Find the WYMEditor that maps to the custom_teaser field + var teaserTextArea = $('#blog_post_custom_teaser')[0]; + var teaserEditor = null; + $.each(WYMeditor.INSTANCES, function(index, editor) { + if (editor._element[0] == teaserTextArea) { + teaserEditor = editor; + } + }); + + if (teaserEditor) { + teaserEditor.html($('#blog_post_body').attr('value')); + } + + event.preventDefault(); + }); + }); + + + function split( val ) { + return val.split( /,\s*/ ); + } + function extractLast( term ) { + return split( term ).pop(); + } + + page_options.init(false, '', '') + + $('<%= dom_id %>').bind( "keydown", function( event ) { + if ( event.keyCode === $.ui.keyCode.TAB && $( this ).data( "autocomplete" ).menu.active ) { + event.preventDefault() + } + }).autocomplete({ + source: function( request, response ) { + $.getJSON( "<%= url %>", { + term: extractLast( request.term ) + }, response ); + }, + search: function() { + // custom minLength + var term = extractLast( this.value ); + if ( term.length < 2 ) { + return false; + } + }, + focus: function() { + // prevent value inserted on focus + return false; + }, + select: function( event, ui ) { + var terms = split( this.value ); + // remove the current input + terms.pop(); + // add the selected item + terms.push( ui.item.value ); + // add placeholder to get the comma-and-space at the end + terms.push( "" ); + this.value = terms.join( ", " ); + return false; + } + }) +}); diff --git a/public/javascripts/refinerycms-blog.js b/app/assets/javascripts/refinery/blog/frontend.js index 269f70f..269f70f 100644 --- a/public/javascripts/refinerycms-blog.js +++ b/app/assets/javascripts/refinery/blog/frontend.js diff --git a/app/assets/stylesheets/refinery/blog/backend.css.scss b/app/assets/stylesheets/refinery/blog/backend.css.scss new file mode 100644 index 0000000..7e2a841 --- /dev/null +++ b/app/assets/stylesheets/refinery/blog/backend.css.scss @@ -0,0 +1,73 @@ +.comments_icon { + background-image: image_url('refinery/blog/icons/comments.png'); +} +.comment_icon { + background-image: image_url('refinery/blog/icons/comment.png'); +} +.comment_cross_icon { + background-image: image_url('refinery/blog/icons/comment_cross.png'); +} +.comment_tick_icon { + background-image: image_url('refinery/blog/icons/comment_tick.png'); +} +.folder_icon { + background-image: image_url('refinery/blog/icons/folder.png'); +} +.folder_add_icon { + background-image: image_url('refinery/blog/icons/folder_add.png'); +} +.folder_edit_icon { + background-image: image_url('refinery/blog/icons/folder_edit.png'); +} +.settings_icon { + background-image: image_url('refinery/blog/icons/cog.png'); +} +.page_icon { + background-image: image_url('refinery/blog/icons/page.png'); +} +.page_copy_icon { + background-image: image_url('refinery/blog/icons/page_copy.png'); +} +.page_add_icon { + background-image: image_url('refinery/blog/icons/page_add.png'); +} +ul.collapsible_menu li { + position: relative; +} +ul.collapsible_menu li span.arrow { + background-repeat: no-repeat; + position: absolute; + right: 10px; + top: 13px; + width: 11px; + height: 7px; + cursor: pointer; +} +ul.collapsible_menu li span.arrow { + background-image: image_url('refinery/blog/icons/up.gif'); +} +ul.collapsible_menu li.closed span.arrow { + background-image: image_url('refinery/blog/icons/down.gif'); +} +ul.collapsible_menu > div { + width: 93%; + margin: 0px auto; +} +ul.blog_categories{ + height:200px; + overflow:auto; + border:1px solid #ccc; + padding:5px; +} +ul.blog_categories, ul.blog_categories li { + list-style: none; + margin:5px 0; +} +a#copy_body_link { + background: image_url('refinery/blog/icons/add.png') no-repeat scroll 0 6px transparent; + border-bottom: 0 none; + display: inline; + line-height: 29px; + margin-top: 0; + padding-left: 20px; +} diff --git a/public/stylesheets/refinerycms-blog.css b/app/assets/stylesheets/refinery/blog/frontend.css.scss index ef6f224..65cecd0 100644 --- a/public/stylesheets/refinerycms-blog.css +++ b/app/assets/stylesheets/refinery/blog/frontend.css.scss @@ -22,7 +22,7 @@ #rss_feed_subscribe { display: block; padding-left: 25px; - background: url('/images/refinerycms-blog/rss-feed.png') no-repeat; + background: image_url('refinery/blog/rss-feed.png') no-repeat; } #next_prev_article{ overflow:hidden; @@ -58,7 +58,7 @@ .flash_notice, .flash_message { border: 1px solid #00A017; color: #00A017; - background: 7px 7px no-repeat url('/images/refinery/icons/accept.png') #E0F5E0; + background: 7px 7px no-repeat image_url('refinery/blog/icons/accept.png') #E0F5E0; } .flash_notice, .flash_notice * { color: #00A017; @@ -66,7 +66,7 @@ .flash_error { border: 1px solid #A00027; color: #A00027; - background: 7px 7px no-repeat url('/images/refinery/icons/cancel.png') #FFB1B1; + background: 7px 7px no-repeat image_url('refinery/blog/icons/cancel.png') #FFB1B1; } .flash.flash_notice #flash_close, .flash.flash_error #flash_close { text-transform: lowercase; diff --git a/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png Binary files differindex 954e22d..954e22d 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png Binary files differindex 64ece57..64ece57 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_flat_10_000000_40x100.png Binary files differindex abdc010..abdc010 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_flat_10_000000_40x100.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png Binary files differindex 9b383f4..9b383f4 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png Binary files differindex a23baad..a23baad 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png Binary files differindex 42ccba2..42ccba2 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png Binary files differindex 39d5824..39d5824 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png Binary files differindex f127367..f127367 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png diff --git a/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png Binary files differindex 359397a..359397a 100755 --- a/public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png diff --git a/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_222222_256x240.png Binary files differindex b273ff1..b273ff1 100755 --- a/public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_222222_256x240.png diff --git a/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_228ef1_256x240.png Binary files differindex a641a37..a641a37 100755 --- a/public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_228ef1_256x240.png diff --git a/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ef8c08_256x240.png Binary files differindex 85e63e9..85e63e9 100755 --- a/public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ef8c08_256x240.png diff --git a/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffd27a_256x240.png Binary files differindex e117eff..e117eff 100755 --- a/public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffd27a_256x240.png diff --git a/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffffff_256x240.png Binary files differindex 42f8f99..42f8f99 100755 --- a/public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffffff_256x240.png diff --git a/public/stylesheets/ui-lightness/jquery-ui-1.8.13.custom.css b/app/assets/stylesheets/refinery/blog/ui-lightness/jquery-ui-1.8.13.custom.css.scss index 5854273..5854273 100755 --- a/public/stylesheets/ui-lightness/jquery-ui-1.8.13.custom.css +++ b/app/assets/stylesheets/refinery/blog/ui-lightness/jquery-ui-1.8.13.custom.css.scss diff --git a/app/views/refinery/admin/blog/_submenu.html.erb b/app/views/refinery/admin/blog/_submenu.html.erb index 442ab47..799c101 100644 --- a/app/views/refinery/admin/blog/_submenu.html.erb +++ b/app/views/refinery/admin/blog/_submenu.html.erb @@ -93,4 +93,4 @@ </nav> -<% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog')%> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %> diff --git a/app/views/refinery/admin/blog/comments/show.html.erb b/app/views/refinery/admin/blog/comments/show.html.erb index d4c2186..2e72eb0 100644 --- a/app/views/refinery/admin/blog/comments/show.html.erb +++ b/app/views/refinery/admin/blog/comments/show.html.erb @@ -60,4 +60,4 @@ </table> </div> -<% content_for :stylesheets, stylesheet_link_tag('refinery/refinerycms-blog') %> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %> diff --git a/app/views/refinery/admin/blog/posts/_form.css.erb b/app/views/refinery/admin/blog/posts/_form.css.erb deleted file mode 100644 index 869ab9b..0000000 --- a/app/views/refinery/admin/blog/posts/_form.css.erb +++ /dev/null @@ -1,20 +0,0 @@ -<style type='text/css'> - ul.blog_categories{ - height:200px; - overflow:auto; - border:1px solid #ccc; - padding:5px; - } - ul.blog_categories, ul.blog_categories li { - list-style: none; - margin:5px 0; - } - a#copy_body_link { - background: url("/images/refinery/icons/add.png") no-repeat scroll 0 6px transparent; - border-bottom: 0 none; - display: inline; - line-height: 29px; - margin-top: 0; - padding-left: 20px; - } -</style> diff --git a/app/views/refinery/admin/blog/posts/_form.html.erb b/app/views/refinery/admin/blog/posts/_form.html.erb index f8c6ba3..8a3b091 100644 --- a/app/views/refinery/admin/blog/posts/_form.html.erb +++ b/app/views/refinery/admin/blog/posts/_form.html.erb @@ -103,6 +103,6 @@ } %> <% end -%> -<% content_for :stylesheets, render(:partial => 'form.css') -%> -<% content_for :javascripts, render(:partial => 'form.js') -%> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/backend') %> +<% content_for :javascripts, javascript_include_tag('refinery/blog/backend') %> <%= render 'refinery/shared/admin/autocomplete', :dom_id => '#blog_post_tag_list', :url => main_app.tags_refinery_admin_blog_posts_url %> diff --git a/app/views/refinery/admin/blog/posts/_form.js.erb b/app/views/refinery/admin/blog/posts/_form.js.erb deleted file mode 100644 index 87ad23f..0000000 --- a/app/views/refinery/admin/blog/posts/_form.js.erb +++ /dev/null @@ -1,23 +0,0 @@ -<script> - (function($) { - $(function() { - $('#page-tabs').tabs(); - $('#copy_body_link').click(function(event) { - // Find the WYMEditor that maps to the custom_teaser field - var teaserTextArea = $('#blog_post_custom_teaser')[0]; - var teaserEditor = null; - $.each(WYMeditor.INSTANCES, function(index, editor) { - if (editor._element[0] == teaserTextArea) { - teaserEditor = editor; - } - }); - - if (teaserEditor) { - teaserEditor.html($('#blog_post_body').attr('value')); - } - - event.preventDefault(); - }); - }); - })(jQuery); -</script> diff --git a/app/views/refinery/blog/categories/show.html.erb b/app/views/refinery/blog/categories/show.html.erb index a31c85b..1ae938f 100644 --- a/app/views/refinery/blog/categories/show.html.erb +++ b/app/views/refinery/blog/categories/show.html.erb @@ -18,4 +18,4 @@ <% end %> <%= render :partial => "/refinery/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %> diff --git a/app/views/refinery/blog/posts/archive.html.erb b/app/views/refinery/blog/posts/archive.html.erb index ca12383..c7a2c92 100644 --- a/app/views/refinery/blog/posts/archive.html.erb +++ b/app/views/refinery/blog/posts/archive.html.erb @@ -12,4 +12,4 @@ <%= render :partial => '/refinery/blog/shared/body_content_right' %> <%= render :partial => "/refinery/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %> diff --git a/app/views/refinery/blog/posts/index.html.erb b/app/views/refinery/blog/posts/index.html.erb index c6ca75a..f347af1 100644 --- a/app/views/refinery/blog/posts/index.html.erb +++ b/app/views/refinery/blog/posts/index.html.erb @@ -17,4 +17,4 @@ <%= render :partial => '/refinery/blog/shared/body_content_right' %> <%= render :partial => "/refinery/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %> diff --git a/app/views/refinery/blog/posts/show.html.erb b/app/views/refinery/blog/posts/show.html.erb index 3670bf1..3f5cf07 100644 --- a/app/views/refinery/blog/posts/show.html.erb +++ b/app/views/refinery/blog/posts/show.html.erb @@ -12,11 +12,11 @@ <%= render :partial => "/refinery/content_page", :locals => { :remove_automatic_sections => true } %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %> <% content_for :before_javascript_libraries, jquery_include_tags(:jquery_ui => false) %> <% content_for :javascripts do %> <%# enable AJAX'd post nav at your own risk until html5 history API implemented. %> - <%#= javascript_include_tag('refinerycms-blog') %> + <%#= javascript_include_tag('refinery/blog/frontend') %> <script src="http://w.sharethis.com/button/buttons.js"></script> <script>stLight.options({publisher:'<%= BlogPost::ShareThis.key %>'});</script> <% end if Refinery::BlogPost::ShareThis.enabled? %> diff --git a/app/views/refinery/blog/posts/tagged.html.erb b/app/views/refinery/blog/posts/tagged.html.erb index f116732..860bd72 100644 --- a/app/views/refinery/blog/posts/tagged.html.erb +++ b/app/views/refinery/blog/posts/tagged.html.erb @@ -14,4 +14,4 @@ <%= render :partial => '/refinery/blog/shared/body_content_right' %> <%= render :partial => "/refinery/content_page" %> -<% content_for :stylesheets, stylesheet_link_tag('refinerycms-blog') %> +<% content_for :stylesheets, stylesheet_link_tag('refinery/blog/frontend') %> diff --git a/app/views/refinery/shared/admin/_autocomplete.html.erb b/app/views/refinery/shared/admin/_autocomplete.html.erb index b4898cc..bf495e0 100644 --- a/app/views/refinery/shared/admin/_autocomplete.html.erb +++ b/app/views/refinery/shared/admin/_autocomplete.html.erb @@ -1,55 +1,5 @@ -<% content_for :stylesheets, stylesheet_link_tag("ui-lightness/jquery-ui-1.8.13.custom.css") -%> +<% content_for :stylesheets, stylesheet_link_tag("refinery/blog/ui-lightness/jquery-ui-1.8.13.custom") %> <% content_for :javascripts do %> <%= javascript_include_tag "https://ajax.googleapis.com/ajax/libs/jqueryui/1.8.13/jquery-ui.min.js" %> - <script> - function split( val ) { - return val.split( /,\s*/ ); - } - function extractLast( term ) { - return split( term ).pop(); - } - - - $(document).ready(function(){ - page_options.init(false, '', '') - - $('<%= dom_id %>') - .bind( "keydown", function( event ) { - if ( event.keyCode === $.ui.keyCode.TAB && - $( this ).data( "autocomplete" ).menu.active ) { - event.preventDefault() - } - }) - .autocomplete({ - source: function( request, response ) { - $.getJSON( "<%= url %>", { - term: extractLast( request.term ) - }, response ); - }, - search: function() { - // custom minLength - var term = extractLast( this.value ); - if ( term.length < 2 ) { - return false; - } - }, - focus: function() { - // prevent value inserted on focus - return false; - }, - select: function( event, ui ) { - var terms = split( this.value ); - // remove the current input - terms.pop(); - // add the selected item - terms.push( ui.item.value ); - // add placeholder to get the comma-and-space at the end - terms.push( "" ); - this.value = terms.join( ", " ); - return false; - } - }) - }); - </script> <% end %>
\ No newline at end of file diff --git a/lib/refinerycms-blog.rb b/lib/refinerycms-blog.rb index 10be99d..334380e 100644 --- a/lib/refinerycms-blog.rb +++ b/lib/refinerycms-blog.rb @@ -18,10 +18,6 @@ module Refinery end class Engine < Rails::Engine - initializer 'blog serves assets' do |app| - app.middleware.insert_after ::ActionDispatch::Static, ::ActionDispatch::Static, "#{root}/public" - end - config.to_prepare do require File.expand_path('../refinery/blog/tabs', __FILE__) end diff --git a/public/stylesheets/refinery/refinerycms-blog.css b/public/stylesheets/refinery/refinerycms-blog.css deleted file mode 100644 index 3df86f0..0000000 --- a/public/stylesheets/refinery/refinerycms-blog.css +++ /dev/null @@ -1,55 +0,0 @@ -.comments_icon { - background-image: url('/images/refinerycms-blog/icons/comments.png'); -} -.comment_icon { - background-image: url('/images/refinerycms-blog/icons/comment.png'); -} -.comment_cross_icon { - background-image: url('/images/refinerycms-blog/icons/comment_cross.png'); -} -.comment_tick_icon { - background-image: url('/images/refinerycms-blog/icons/comment_tick.png'); -} -.folder_icon { - background-image: url('/images/refinerycms-blog/icons/folder.png'); -} -.folder_add_icon { - background-image: url('/images/refinerycms-blog/icons/folder_add.png'); -} -.folder_edit_icon { - background-image: url('/images/refinerycms-blog/icons/folder_edit.png'); -} -.settings_icon { - background-image: url('/images/refinerycms-blog/icons/cog.png'); -} -.page_icon { - background-image: url('/images/refinerycms-blog/icons/page.png'); -} -.page_copy_icon { - background-image: url('/images/refinerycms-blog/icons/page_copy.png'); -} -.page_add_icon { - background-image: url('/images/refinerycms-blog/icons/page_add.png'); -} -ul.collapsible_menu li { - position: relative; -} -ul.collapsible_menu li span.arrow { - background-repeat: no-repeat; - position: absolute; - right: 10px; - top: 13px; - width: 11px; - height: 7px; - cursor: pointer; -} -ul.collapsible_menu li span.arrow { - background-image: url('/images/refinerycms-blog/icons/up.gif'); -} -ul.collapsible_menu li.closed span.arrow { - background-image: url('/images/refinerycms-blog/icons/down.gif'); -} -ul.collapsible_menu > div { - width: 93%; - margin: 0px auto; -} diff --git a/refinerycms-blog.gemspec b/refinerycms-blog.gemspec index 9a55c33..dca15fb 100644 --- a/refinerycms-blog.gemspec +++ b/refinerycms-blog.gemspec @@ -2,7 +2,7 @@ Gem::Specification.new do |s| s.name = %q{refinerycms-blog} s.version = %q{2.0.0} s.description = %q{A really straightforward open source Ruby on Rails blog engine designed for integration with RefineryCMS.} - s.date = %q{2011-07-27} + s.date = %q{2011-08-03} s.summary = %q{Ruby on Rails blogging engine for RefineryCMS.} s.email = %q{info@refinerycms.com} s.homepage = %q{http://refinerycms.com/blog} @@ -20,6 +20,52 @@ Gem::Specification.new do |s| s.files = %w( app + app/assets + app/assets/images + app/assets/images/refinery + app/assets/images/refinery/blog + app/assets/images/refinery/blog/icons + app/assets/images/refinery/blog/icons/cog.png + app/assets/images/refinery/blog/icons/comment.png + app/assets/images/refinery/blog/icons/comment_cross.png + app/assets/images/refinery/blog/icons/comment_tick.png + app/assets/images/refinery/blog/icons/comments.png + app/assets/images/refinery/blog/icons/down.gif + app/assets/images/refinery/blog/icons/folder.png + app/assets/images/refinery/blog/icons/folder_add.png + app/assets/images/refinery/blog/icons/folder_edit.png + app/assets/images/refinery/blog/icons/page.png + app/assets/images/refinery/blog/icons/page_add.png + app/assets/images/refinery/blog/icons/page_copy.png + app/assets/images/refinery/blog/icons/up.gif + app/assets/images/refinery/blog/rss-feed.png + app/assets/javascripts + app/assets/javascripts/refinery + app/assets/javascripts/refinery/blog + app/assets/javascripts/refinery/blog/backend.js + app/assets/javascripts/refinery/blog/frontend.js + app/assets/stylesheets + app/assets/stylesheets/refinery + app/assets/stylesheets/refinery/blog + app/assets/stylesheets/refinery/blog/backend.css.scss + app/assets/stylesheets/refinery/blog/frontend.css.scss + app/assets/stylesheets/refinery/blog/ui-lightness + app/assets/stylesheets/refinery/blog/ui-lightness/images + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_flat_10_000000_40x100.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_222222_256x240.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_228ef1_256x240.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ef8c08_256x240.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffd27a_256x240.png + app/assets/stylesheets/refinery/blog/ui-lightness/images/ui-icons_ffffff_256x240.png + app/assets/stylesheets/refinery/blog/ui-lightness/jquery-ui-1.8.13.custom.css.scss app/controllers app/controllers/refinery app/controllers/refinery/admin @@ -65,9 +111,7 @@ Gem::Specification.new do |s| app/views/refinery/admin/blog/comments/index.html.erb app/views/refinery/admin/blog/comments/show.html.erb app/views/refinery/admin/blog/posts - app/views/refinery/admin/blog/posts/_form.css.erb app/views/refinery/admin/blog/posts/_form.html.erb - app/views/refinery/admin/blog/posts/_form.js.erb app/views/refinery/admin/blog/posts/_form_part.html.erb app/views/refinery/admin/blog/posts/_post.html.erb app/views/refinery/admin/blog/posts/_sortable_list.html.erb @@ -100,6 +144,8 @@ Gem::Specification.new do |s| app/views/refinery/blog/shared/_posts.html.erb app/views/refinery/blog/shared/_rss_feed.html.erb app/views/refinery/blog/shared/_tags.html.erb + app/views/refinery/blog/widgets + app/views/refinery/blog/widgets/_blog_archive.html.erb app/views/refinery/shared app/views/refinery/shared/admin app/views/refinery/shared/admin/_autocomplete.html.erb @@ -158,48 +204,6 @@ Gem::Specification.new do |s| lib/refinery/blog/version.rb lib/refinerycms-blog.rb public - public/images - public/images/refinerycms-blog - public/images/refinerycms-blog/icons - public/images/refinerycms-blog/icons/cog.png - public/images/refinerycms-blog/icons/comment.png - public/images/refinerycms-blog/icons/comment_cross.png - public/images/refinerycms-blog/icons/comment_tick.png - public/images/refinerycms-blog/icons/comments.png - public/images/refinerycms-blog/icons/down.gif - public/images/refinerycms-blog/icons/folder.png - public/images/refinerycms-blog/icons/folder_add.png - public/images/refinerycms-blog/icons/folder_edit.png - public/images/refinerycms-blog/icons/page.png - public/images/refinerycms-blog/icons/page_add.png - public/images/refinerycms-blog/icons/page_copy.png - public/images/refinerycms-blog/icons/up.gif - public/images/refinerycms-blog/rss-feed.png - public/javascripts - public/javascripts/refinery - public/javascripts/refinery/refinerycms-blog.js - public/javascripts/refinerycms-blog.js - public/stylesheets - public/stylesheets/refinery - public/stylesheets/refinery/refinerycms-blog.css - public/stylesheets/refinerycms-blog.css - public/stylesheets/ui-lightness - public/stylesheets/ui-lightness/images - public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png - public/stylesheets/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png - public/stylesheets/ui-lightness/images/ui-bg_flat_10_000000_40x100.png - public/stylesheets/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png - public/stylesheets/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png - public/stylesheets/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png - public/stylesheets/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png - public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png - public/stylesheets/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png - public/stylesheets/ui-lightness/images/ui-icons_222222_256x240.png - public/stylesheets/ui-lightness/images/ui-icons_228ef1_256x240.png - public/stylesheets/ui-lightness/images/ui-icons_ef8c08_256x240.png - public/stylesheets/ui-lightness/images/ui-icons_ffd27a_256x240.png - public/stylesheets/ui-lightness/images/ui-icons_ffffff_256x240.png - public/stylesheets/ui-lightness/jquery-ui-1.8.13.custom.css readme.md refinerycms-blog.gemspec spec @@ -208,6 +212,10 @@ Gem::Specification.new do |s| spec/models/refinery/blog_category_spec.rb spec/models/refinery/blog_comment_spec.rb spec/models/refinery/blog_post_spec.rb + spec/requests + spec/requests/blog_categories_spec.rb + spec/requests/blog_posts_spec.rb + spec/requests/manage_blog_posts_spec.rb todo.md ) |