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;
|
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 */
|
/* data tables */
|
||||||
|
|
||||||
table.data caption {
|
table.data caption {
|
||||||
|
|
|
@ -80,7 +80,7 @@ class Story < ActiveRecord::Base
|
||||||
end
|
end
|
||||||
|
|
||||||
def comments_url
|
def comments_url
|
||||||
"http://lobste.rs/p/#{self.short_id}/#{self.title_as_url}"
|
"/p/#{self.short_id}/#{self.title_as_url}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@_comment_count = nil
|
@_comment_count = nil
|
||||||
|
|
|
@ -9,7 +9,7 @@
|
||||||
</div>
|
</div>
|
||||||
<% elsif !f.object.id %>
|
<% elsif !f.object.id %>
|
||||||
<%= f.label :url, "URL:", :class => "required" %>
|
<%= f.label :url, "URL:", :class => "required" %>
|
||||||
<%= f.text_field :url, :style => "width: 475px;" %>
|
<%= f.text_field :url %>
|
||||||
<%= button_to_function "Fetch Title",
|
<%= button_to_function "Fetch Title",
|
||||||
"Lobsters.fetchURLTitle($(this), $('#story_url'), $('#story_title'));" %>
|
"Lobsters.fetchURLTitle($(this), $('#story_url'), $('#story_title'));" %>
|
||||||
<% end %>
|
<% end %>
|
||||||
|
@ -17,7 +17,7 @@
|
||||||
|
|
||||||
<div class="boxline">
|
<div class="boxline">
|
||||||
<%= f.label :title, "Title:", :class => "required" %>
|
<%= f.label :title, "Title:", :class => "required" %>
|
||||||
<%= f.text_field :title, :maxlength => 100, :style => "width: 475px;" %>
|
<%= f.text_field :title, :maxlength => 100 %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="boxline" style="margin-bottom: 2px;">
|
<div class="boxline" style="margin-bottom: 2px;">
|
||||||
|
@ -25,14 +25,12 @@
|
||||||
:style => "line-height: 2.3em;" %>
|
:style => "line-height: 2.3em;" %>
|
||||||
<%= f.select "tags_a", Tag.order(:tag).map{|t|
|
<%= f.select "tags_a", Tag.order(:tag).map{|t|
|
||||||
[ "#{t.tag} - #{t.description}", t.tag ] }, {},
|
[ "#{t.tag} - #{t.description}", t.tag ] }, {},
|
||||||
{ :multiple => true, :style => "width: 487px;" } %>
|
{ :multiple => true } %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div class="boxline">
|
<div class="boxline">
|
||||||
<%= f.label :description, "Text:", :class => "required" %>
|
<%= f.label :description, "Text:", :class => "required" %>
|
||||||
<%= f.text_area :description, :size => "100x10",
|
<%= f.text_area :description, :rows => 15,
|
||||||
:placeholder => "optional, not recommended when submitting a link" %>
|
:placeholder => "optional when submitting a link" %>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<%= render :partial => "global/markdownhelp" %>
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="box">
|
<div class="box" id="story_box">
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
Edit Story
|
Edit Story
|
||||||
</div>
|
</div>
|
||||||
|
@ -9,9 +9,20 @@
|
||||||
:f => f } %>
|
:f => f } %>
|
||||||
|
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
<div class="box">
|
<div class="box">
|
||||||
<%= submit_tag "Save" %>
|
<div class="boxline markdown_help_toggler">
|
||||||
or <a href="<%= story_url(@story.short_id) %>">cancel editing</a>
|
<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>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
@ -1,4 +1,4 @@
|
||||||
<div class="box">
|
<div class="box" id="story_box">
|
||||||
<div class="legend">
|
<div class="legend">
|
||||||
Submit a Story
|
Submit a Story
|
||||||
</div>
|
</div>
|
||||||
|
@ -8,8 +8,19 @@
|
||||||
:f => f } %>
|
:f => f } %>
|
||||||
|
|
||||||
<p></p>
|
<p></p>
|
||||||
|
|
||||||
<div class="box">
|
<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>
|
</div>
|
||||||
<% end %>
|
<% end %>
|
||||||
</div>
|
</div>
|
||||||
|
|
Loading…
Reference in a new issue