Skip to content

Commit

Permalink
fix for post image choose button
Browse files Browse the repository at this point in the history
  • Loading branch information
jywarren committed Mar 7, 2016
1 parent cc3cf38 commit 39b9ad5
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/views/editor/_main_image.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,15 @@
<h3 class="hidden-sm">Main image <i id="main-image-spinner" class="hidden icon-spinner icon-spin"></i></h3>

<img style="width:100%;" class="img-rounded" id="leadImage" <% unless (@node && @node.main_image) || params[:main_image] || params[:i] %>style="display:none;" <% end %>src="<% if @node && @node.main_image %><%= @node.main_image.path(:default) %><% elsif params[:main_image] && Image.find_by_id(params[:main_image]) %><%= Image.find_by_id(params[:main_image]).path %><% elsif @image %><%= @image.path(:default) %><% end %>" />

<div class="side-dropzone" id="side-dropzone">
<p class="prompt">
<span class="hidden-sm">
Drag &amp; drop to add an image, or
</span>

<!-- http://stackoverflow.com/questions/11235206/twitter-bootstrap-form-file-element-upload-button -->
<label class="" for="fileinput">
<label class="" for="side-fileinput">
<input id="side-fileinput" type="file" name="image[photo]" style="display:none;" />
<a class="hidden-xs">choose one</a>
<span class="visible-xs">
Expand Down

0 comments on commit 39b9ad5

Please sign in to comment.