Skip to content

Commit

Permalink
Fixes #12005 - align host selector for template preview
Browse files Browse the repository at this point in the history
  • Loading branch information
ares authored and dLobatog committed Sep 30, 2015
1 parent efd68ba commit 551bd73
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 deletions.
7 changes: 6 additions & 1 deletion app/assets/stylesheets/editor.scss
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,9 @@

.fullscreen .editor {
height: 100%;
}
}

span#preview_host_selector a.select2-choice {
height: 30px;
line-height: 1.2;
}
8 changes: 8 additions & 0 deletions app/views/editor/_toolbar.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,14 @@
</label>
<% end %>
</div>

<% if show_preview %>
<span id="preview_host_selector" style="display:none">
<%= select_tag :preview_host_id, options_from_collection_for_select(@template.preview_host_collection, :id, :name),
:onchange => 'get_rendered_template()' %>
</span>
<% end %>

<a class="btn btn-default btn-sm btn-fullscreen" href="#" onclick="set_fullscreen_editor('.editor-container');">
<i class="glyphicon glyphicon-resize-full"></i>
</a>
Expand Down
5 changes: 0 additions & 5 deletions app/views/templates/_form.html.erb
Original file line number Diff line number Diff line change
Expand Up @@ -51,11 +51,6 @@
<div class="editor-container">
<%= render :partial => 'editor/toolbar', :locals => {:show_preview => true} %>
<span id="preview_host_selector" style="display:none">
<%= select_tag :preview_host_id, options_from_collection_for_select(@template.preview_host_collection, :id, :name),
:onchange => 'get_rendered_template()' %>
</span>

<%= alert :class => 'alert-danger hide', :id => 'preview_error', :close => false %>
<%= textarea_f f, :template, :class => "editor_source", :label =>:none, :disabled => @template.locked?, :size => "max",
:'data-file-name' => @template.name, :'data-render-path' => url_for(template_hash_for_member(@template, 'preview')) %>
Expand Down

0 comments on commit 551bd73

Please sign in to comment.