diff --git a/app/views/cms/_text_editor_sidebar.rhtml b/app/views/cms/_text_editor_sidebar.rhtml index 0d17c6a..964491e 100644 --- a/app/views/cms/_text_editor_sidebar.rhtml +++ b/app/views/cms/_text_editor_sidebar.rhtml @@ -1,6 +1,7 @@
'/> '/> + '/> <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>
<%= _('Media upload') %>
diff --git a/public/javascripts/article.js b/public/javascripts/article.js index 653f152..db1a9d4 100644 --- a/public/javascripts/article.js +++ b/public/javascripts/article.js @@ -26,6 +26,7 @@ jQuery(function($) { var button_add = $('.text-editor-sidebar meta[name=button.add]').attr('value'); var button_zoom = $('.text-editor-sidebar meta[name=button.zoom]').attr('value'); + var button_close = $('.text-editor-sidebar meta[name=button.close]').attr('value'); function add_to_text_button() { return '' + button_add + ''; @@ -35,6 +36,10 @@ jQuery(function($) { return '' + button_add + ''; } + function close_link() { + return '' + button_close + ''; + } + function zoom_button() { return '' + button_zoom + ''; } @@ -88,9 +93,13 @@ jQuery(function($) { var $item = $(this).closest('.item'); var html_selector = $item.attr('data-item'); var img = $item.find(html_selector).find('img').attr('src'); - $.colorbox({ html: '
' + '
' + add_to_text_link() + '
', maxWidth: '640px', maxHeight: '670px', scrolling: false }); + $.colorbox({ html: '
' + '
' + add_to_text_link() + '   ' + close_link() + '
', maxWidth: '640px', maxHeight: '670px', scrolling: false }); return false; }); + $('.controls a.close').live('click', function() { + $.colorbox.close(); + return false; + }) // FIXME the user may also want to add the item to the abstract textarea! var text_field = 'article_body'; -- libgit2 0.21.2