fix markdown help display on story submission
This commit is contained in:
parent
d85b7d8db9
commit
bbaa8f554f
|
@ -519,6 +519,24 @@ div.markdown_help_label {
|
|||
line-height: 2em;
|
||||
}
|
||||
|
||||
|
||||
div#story_box input#story_url {
|
||||
width: 506px;
|
||||
}
|
||||
div#story_box input#story_title {
|
||||
width: 600px;
|
||||
}
|
||||
div#story_box #story_tags_a {
|
||||
width: 624px;
|
||||
}
|
||||
div#story_box textarea {
|
||||
width: 600px;
|
||||
}
|
||||
div#story_box div.markdown_help_toggler {
|
||||
margin-left: 7em;
|
||||
width: 610px;
|
||||
}
|
||||
|
||||
/* data tables */
|
||||
|
||||
table.data caption {
|
||||
|
|
|
@ -80,7 +80,7 @@ class Story < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def comments_url
|
||||
"http://lobste.rs/p/#{self.short_id}/#{self.title_as_url}"
|
||||
"/p/#{self.short_id}/#{self.title_as_url}"
|
||||
end
|
||||
|
||||
@_comment_count = nil
|
||||
|
|
|
@ -9,7 +9,7 @@
|
|||
</div>
|
||||
<% elsif !f.object.id %>
|
||||
<%= f.label :url, "URL:", :class => "required" %>
|
||||
<%= f.text_field :url, :style => "width: 475px;" %>
|
||||
<%= f.text_field :url %>
|
||||
<%= button_to_function "Fetch Title",
|
||||
"Lobsters.fetchURLTitle($(this), $('#story_url'), $('#story_title'));" %>
|
||||
<% end %>
|
||||
|
@ -17,7 +17,7 @@
|
|||
|
||||
<div class="boxline">
|
||||
<%= f.label :title, "Title:", :class => "required" %>
|
||||
<%= f.text_field :title, :maxlength => 100, :style => "width: 475px;" %>
|
||||
<%= f.text_field :title, :maxlength => 100 %>
|
||||
</div>
|
||||
|
||||
<div class="boxline" style="margin-bottom: 2px;">
|
||||
|
@ -25,14 +25,12 @@
|
|||
:style => "line-height: 2.3em;" %>
|
||||
<%= f.select "tags_a", Tag.order(:tag).map{|t|
|
||||
[ "#{t.tag} - #{t.description}", t.tag ] }, {},
|
||||
{ :multiple => true, :style => "width: 487px;" } %>
|
||||
{ :multiple => true } %>
|
||||
</div>
|
||||
|
||||
<div class="boxline">
|
||||
<%= f.label :description, "Text:", :class => "required" %>
|
||||
<%= f.text_area :description, :size => "100x10",
|
||||
:placeholder => "optional, not recommended when submitting a link" %>
|
||||
<%= f.text_area :description, :rows => 15,
|
||||
:placeholder => "optional when submitting a link" %>
|
||||
</div>
|
||||
|
||||
<%= render :partial => "global/markdownhelp" %>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="box">
|
||||
<div class="box" id="story_box">
|
||||
<div class="legend">
|
||||
Edit Story
|
||||
</div>
|
||||
|
@ -9,9 +9,20 @@
|
|||
:f => f } %>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="box">
|
||||
<%= submit_tag "Save" %>
|
||||
or <a href="<%= story_url(@story.short_id) %>">cancel editing</a>
|
||||
<div class="boxline markdown_help_toggler">
|
||||
<div class="markdown_help_label">
|
||||
<span class="fakea">Limited Markdown formatting available</span>
|
||||
</div>
|
||||
|
||||
<%= submit_tag "Save" %>
|
||||
or <a href="<%= story_url(@story.short_id) %>">cancel editing</a>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<%= render :partial => "global/markdownhelp" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
<div class="box">
|
||||
<div class="box" id="story_box">
|
||||
<div class="legend">
|
||||
Submit a Story
|
||||
</div>
|
||||
|
@ -8,8 +8,19 @@
|
|||
:f => f } %>
|
||||
|
||||
<p></p>
|
||||
|
||||
<div class="box">
|
||||
<%= submit_tag "Submit" %>
|
||||
<div class="boxline markdown_help_toggler">
|
||||
<div class="markdown_help_label">
|
||||
<span class="fakea">Limited Markdown formatting available</span>
|
||||
</div>
|
||||
|
||||
<%= submit_tag "Submit" %>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
<%= render :partial => "global/markdownhelp" %>
|
||||
</div>
|
||||
</div>
|
||||
<% end %>
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue