diff --git a/app/views/cms/_text_editor_sidebar.html.erb b/app/views/cms/_text_editor_sidebar.html.erb index 2cba8f3..71abc0d 100644 --- a/app/views/cms/_text_editor_sidebar.html.erb +++ b/app/views/cms/_text_editor_sidebar.html.erb @@ -3,9 +3,10 @@ '> '> +
<%= _('Insert media') %><%= button('vertical-toggle', _('Show/Hide'), '#') %>
+ <%= render(:partial => 'textile_quick_reference') if @article.is_a?(TextileArticle) %>
-
<%= _('Insert media') %>
<%= form_tag({ :action => 'media_upload' }, :multipart => true) do %>
@@ -27,7 +28,6 @@
'published_media_items', :profile => profile.identifier}) %>'> -
<%= _('Published media') %>
<%= select_profile_folder(nil, :parent_id, profile, 'recent-media', {}, {}, "type='Folder' or type='Gallery'", {:root_label => _('Recent media')}) %> <%= labelled_form_field _('Search'), text_field_tag('q') %> diff --git a/app/views/shared/_lead_and_body.html.erb b/app/views/shared/_lead_and_body.html.erb index 8f23651..9b13299 100644 --- a/app/views/shared/_lead_and_body.html.erb +++ b/app/views/shared/_lead_and_body.html.erb @@ -20,16 +20,16 @@
<% if f %> - <%= labelled_form_field(_(abstract_label), f.text_area(abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %> + <%= labelled_form_field(_(abstract_label), f.text_area(abstract_method, :style => 'width: 100%; height: 200px;', :class => editor_type)) %> <% else %> - <%= labelled_form_field(_(abstract_label), text_area(object, abstract_method, :style => 'width: 98%; height: 200px;', :class => editor_type)) %> + <%= labelled_form_field(_(abstract_label), text_area(object, abstract_method, :style => 'width: 100%; height: 200px;', :class => editor_type)) %> <% end %>
<% if f %> - <%= labelled_form_field(_(body_label), f.text_area(body_method, :style => 'width: 98%; height: 400px;', :class => editor_type)) %> + <%= labelled_form_field(_(body_label), f.text_area(body_method, :style => 'width: 100%; height: 400px;', :class => editor_type)) %> <% else %> - <%= labelled_form_field(_(body_label), text_area(object, body_method, :style => 'width: 98%; height: 400px;', :class => editor_type)) %> + <%= labelled_form_field(_(body_label), text_area(object, body_method, :style => 'width: 100%; height: 400px;', :class => editor_type)) %> <% end %>
diff --git a/public/designs/icons/tango/style.css b/public/designs/icons/tango/style.css index 968f2df..ec8bf50 100644 --- a/public/designs/icons/tango/style.css +++ b/public/designs/icons/tango/style.css @@ -72,6 +72,7 @@ .icon-newupload-file { background-image: url(Tango/16x16/actions/filesave.png) } .icon-slideshow { background-image: url(Tango/16x16/mimetypes/x-office-presentation.png) } .icon-photos { background-image: url(Tango/16x16/devices/camera-photo.png) } +.icon-vertical-toggle { background-image: url(Tango/16x16/actions/mail-send-receive.png) } .icon-text-html { background-image: url(Tango/16x16/mimetypes/text-html.png) } .icon-text-plain { background-image: url(Tango/16x16/mimetypes/text-x-generic.png) } diff --git a/public/javascripts/media-panel.js b/public/javascripts/media-panel.js index 4ff0f84..4de1d3a 100644 --- a/public/javascripts/media-panel.js +++ b/public/javascripts/media-panel.js @@ -116,4 +116,9 @@ jQuery("#new_folder").keypress(function( event ) { } }); } -}) +}); + +jQuery('.text-editor-sidebar .header .icon-vertical-toggle').click(function(){ + jQuery('#content').toggleClass('show-media-panel'); + return false; +}); diff --git a/public/stylesheets/application.css b/public/stylesheets/application.css index c5f554a..7454ddf 100644 --- a/public/stylesheets/application.css +++ b/public/stylesheets/application.css @@ -3443,11 +3443,18 @@ table.cms-articles .icon:hover { /* Text editors sidebar */ -.controller-cms div.with_media_panel { +.controller-cms .with_media_panel { float: left; + width: 900px; + transition: 1s 0.5s; +} + +.controller-cms .show-media-panel .with_media_panel { width: 600px; + transition: 1s; } -div.with_media_panel .formfield input[type="checkbox"] { + +.with_media_panel .formfield input[type="checkbox"] { width: auto; } @@ -3512,6 +3519,14 @@ div.with_media_panel .formfield input[type="checkbox"] { width: 280px; right: 20px; top: 70px; + max-height: 45px; + overflow: hidden; + transition: 1s; +} + +.show-media-panel .text-editor-sidebar { + max-height: 800px; + transition: 1s 0.5s; } .text-editor-sidebar-box { @@ -3521,12 +3536,23 @@ div.with_media_panel .formfield input[type="checkbox"] { margin-bottom: 10px; } -.text-editor-sidebar-box .header { - margin: -10px -10px 0px -10px; - padding: 10px; - font-weight: bold; - border-bottom: 1px solid #d3d7cf; - background-color: #eeeeec; +.text-editor-sidebar .header { + margin: 0 0 10px 0; + padding: 10px; + font-weight: bold; + border: 1px solid #d3d7cf; + background-color: #eeeeec; + background-repeat: no-repeat; + background-position: 98% 10px; + position: relative; +} + +.text-editor-sidebar .header .icon-vertical-toggle { + position: absolute; + right: 6px; + top: 6px; + padding-top: 0px; + padding-bottom: 0px; } .text-editor-sidebar code, @@ -3639,10 +3665,6 @@ div.with_media_panel .formfield input[type="checkbox"] { margin-top: 4px; } -.text-editor-sidebar .header { - background-repeat: no-repeat; - background-position: 98% 10px; -} .text-editor-sidebar .media-upload-error { color: red; } -- libgit2 0.21.2