Skip to content

Commit

Permalink
Adds the media back into the editor.
Browse files Browse the repository at this point in the history
  • Loading branch information
Frédéric de Villamil committed Feb 8, 2012
1 parent a3e71a1 commit e2ac79c
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 7 deletions.
1 change: 0 additions & 1 deletion TODO.todo
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@

neuro for 6.0.10:
Editor:
- Add the media back into the editor.
- Fix pagination display

Typogarden:
Expand Down
7 changes: 4 additions & 3 deletions app/helpers/admin/base_helper.rb
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,10 @@ def show_thumbnail_for_editor(image)
# If something went wrong with thumbnail generation, we just display a place holder
thumbnail = (File.exists? thumb) ? "#{this_blog.base_url}/files/thumb_#{image.filename}" : "#{this_blog.base_url}/images/thumb_blank.jpg"

picture = "<img class='tumb' src='#{thumbnail}' "
picture << "alt='#{this_blog.base_url}/files/#{image.filename}' "
picture << " onclick=\"edInsertImageFromCarousel('article_body_and_extended', '#{this_blog.base_url}/files/#{image.filename}');\" />"
picture = "<a onclick=\"edInsertImageFromCarousel('article_body_and_extended', '#{this_blog.base_url}/files/#{image.filename}');\" />"
picture << "<img class='tumb' src='#{thumbnail}' "
picture << "alt='#{this_blog.base_url}/files/#{image.filename}' />"
picture << "</a>"
return picture
end

Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/content/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,7 @@
<%= text_field 'article', 'title', :class => 'span1', :style => ' width: 99%', :placeholder => _('Title') %>
</div>

<%#= render('images', { :images => @images}) unless @images.empty? %>
<%= render('images', { :images => @images}) unless @images.empty? %>

<div id='editor-menu'>
<ul class="tabs">
Expand Down
2 changes: 1 addition & 1 deletion app/views/admin/pages/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
<%= text_field 'page', 'title', :class => 'span1', :style => ' width: 99%', :placeholder => _('Title') %>
</p>

<%#= render('images', { :images => @images}) unless @images.empty? %>
<%= render('images', { :images => @images}) unless @images.empty? %>

<div id='editor-menu'>
<ul class="pills">
Expand Down
25 changes: 24 additions & 1 deletion public/stylesheets/administration_structure.css
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,29 @@ footer {
margin-right: 340px;
}

#carousel-wrapper {
width: 100%;
overflow: hidden;
margin-top: 18px;
}

#carousel-content {
width: 3000px;
overflow: hidden;
}

#carousel-wrapper a {
border: 1px solid #ddd;
border-radius: 4px;
-moz-border-radius: 4px;
-webkit-border-radius: 4px;
box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075);
float: left;
padding: 4px;
margin-right: 20px;
cursor: pointer;
}

.editor-right {
float: right;
width: 280px;
Expand Down Expand Up @@ -175,4 +198,4 @@ margin-left: 0; padding-left:0;

#active .span4 {
width: 255px;
}
}

0 comments on commit e2ac79c

Please sign in to comment.