so long whitespace
This commit is contained in:
parent
e4ec8939c2
commit
d0459974cd
|
@ -251,7 +251,7 @@ $(document).ready(function() {
|
|||
|
||||
var box = $(this).parents("li.comment").first().find("div.comment_reply").
|
||||
first();
|
||||
|
||||
|
||||
box.html($("#comment_form").clone());
|
||||
box.find("ol").remove();
|
||||
|
||||
|
@ -277,7 +277,7 @@ $(document).ready(function() {
|
|||
li.load("/comments/" + $(li).attr("data-shortid") + "/edit",
|
||||
{ "edit": 1 });
|
||||
});
|
||||
|
||||
|
||||
$("a.comment_deletor").live("click", function() {
|
||||
if (confirm("Are you sure you want to delete this comment?")) {
|
||||
var li = $(this).parents("li.comment").first();
|
||||
|
@ -287,7 +287,7 @@ $(document).ready(function() {
|
|||
});
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
$("a.comment_undeletor").live("click", function() {
|
||||
if (confirm("Are you sure you want to undelete this comment?")) {
|
||||
var li = $(this).parents("li.comment").first();
|
||||
|
|
|
@ -3,7 +3,7 @@ class CommentsController < ApplicationController
|
|||
|
||||
before_filter :require_logged_in_user_or_400,
|
||||
:only => [ :create, :preview, :preview_new, :upvote, :downvote, :unvote ]
|
||||
|
||||
|
||||
# for rss feeds, load the user's tag filters if a token is passed
|
||||
before_filter :find_user_from_rss_token, :only => [ :index ]
|
||||
|
||||
|
@ -57,7 +57,7 @@ class CommentsController < ApplicationController
|
|||
:content_type => "text/html", :locals => { :story => story,
|
||||
:comment => Comment.new, :show_comment => comment }
|
||||
end
|
||||
|
||||
|
||||
Countinual.count!("lobsters.comments.submitted", "+1")
|
||||
else
|
||||
comment.previewing = true
|
||||
|
@ -69,7 +69,7 @@ class CommentsController < ApplicationController
|
|||
:comment => comment, :show_comment => comment }
|
||||
end
|
||||
end
|
||||
|
||||
|
||||
def preview_new
|
||||
params[:preview] = true
|
||||
return create
|
||||
|
@ -178,7 +178,7 @@ class CommentsController < ApplicationController
|
|||
if !(comment = Comment.find_by_short_id(params[:comment_id]))
|
||||
return render :text => "can't find comment", :status => 400
|
||||
end
|
||||
|
||||
|
||||
if !Vote::COMMENT_REASONS[params[:reason]]
|
||||
return render :text => "invalid reason", :status => 400
|
||||
end
|
||||
|
@ -270,7 +270,7 @@ if false
|
|||
th
|
||||
}
|
||||
end
|
||||
|
||||
|
||||
@comments = @threads.flatten
|
||||
end
|
||||
end
|
||||
|
|
|
@ -59,7 +59,7 @@ class HomeController < ApplicationController
|
|||
|
||||
@stories = find_stories_for_user_and_tag_and_newest_and_by_user(@user,
|
||||
nil, false, for_user.id)
|
||||
|
||||
|
||||
@heading = @title = "Newest Stories by #{for_user.username}"
|
||||
@cur_url = "/newest/#{for_user.username}"
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ class MessagesController < ApplicationController
|
|||
if @message.author_user_id == @user.id
|
||||
@message.deleted_by_author = true
|
||||
end
|
||||
|
||||
|
||||
if @message.recipient_user_id == @user.id
|
||||
@message.deleted_by_recipient = true
|
||||
end
|
||||
|
|
|
@ -56,13 +56,13 @@ class StoriesController < ApplicationController
|
|||
|
||||
redirect_to @story.comments_url
|
||||
end
|
||||
|
||||
|
||||
def edit
|
||||
if !@story.is_editable_by_user?(@user)
|
||||
flash[:error] = "You cannot edit that story."
|
||||
return redirect_to "/"
|
||||
end
|
||||
|
||||
|
||||
@title = "Edit Story"
|
||||
end
|
||||
|
||||
|
@ -158,7 +158,7 @@ class StoriesController < ApplicationController
|
|||
end
|
||||
|
||||
@comment = Comment.new
|
||||
|
||||
|
||||
load_user_votes
|
||||
|
||||
render :action => "show"
|
||||
|
@ -254,7 +254,7 @@ private
|
|||
@story.id, nil)
|
||||
@story.vote = v.vote
|
||||
end
|
||||
|
||||
|
||||
@votes = Vote.comment_votes_by_user_for_story_hash(@user.id, @story.id)
|
||||
@comments.each do |c|
|
||||
if @votes[c.id]
|
||||
|
|
|
@ -2,7 +2,7 @@ class EmailReply < ActionMailer::Base
|
|||
default :from => "nobody@lobste.rs"
|
||||
|
||||
def reply(comment, user)
|
||||
@comment = comment
|
||||
@comment = comment
|
||||
@user = user
|
||||
|
||||
mail(:to => user.email, :from => "Lobsters <nobody@lobste.rs>",
|
||||
|
@ -11,7 +11,7 @@ class EmailReply < ActionMailer::Base
|
|||
end
|
||||
|
||||
def mention(comment, user)
|
||||
@comment = comment
|
||||
@comment = comment
|
||||
@user = user
|
||||
|
||||
mail(:to => user.email, :from => "Lobsters <nobody@lobste.rs>",
|
||||
|
|
|
@ -46,7 +46,7 @@ class Keystore < ActiveRecord::Base
|
|||
|
||||
return new_value
|
||||
end
|
||||
|
||||
|
||||
def self.decrement_value_for(key, amount = -1)
|
||||
self.increment_value_for(key, amount)
|
||||
end
|
||||
|
|
|
@ -183,8 +183,9 @@ class Story < ActiveRecord::Base
|
|||
|
||||
if !self.taggings.reject{|t| t.marked_for_destruction? || t.tag.is_media?
|
||||
}.any?
|
||||
errors.add(:base, "Must have at least one non-media (PDF, video) tag. " <<
|
||||
"If no tags apply to your content, it probably doesn't belong here.")
|
||||
errors.add(:base, "Must have at least one non-media (PDF, video) " <<
|
||||
"tag. If no tags apply to your content, it probably doesn't " <<
|
||||
"belong here.")
|
||||
end
|
||||
end
|
||||
|
||||
|
|
|
@ -95,7 +95,7 @@ class User < ActiveRecord::Base
|
|||
def stories_submitted_count
|
||||
Keystore.value_for("user:#{self.id}:stories_submitted").to_i
|
||||
end
|
||||
|
||||
|
||||
def comments_posted_count
|
||||
Keystore.value_for("user:#{self.id}:comments_posted").to_i
|
||||
end
|
||||
|
@ -103,7 +103,7 @@ class User < ActiveRecord::Base
|
|||
def undeleted_received_messages
|
||||
received_messages.where(:deleted_by_recipient => false)
|
||||
end
|
||||
|
||||
|
||||
def undeleted_sent_messages
|
||||
sent_messages.where(:deleted_by_author => 0)
|
||||
end
|
||||
|
|
|
@ -43,7 +43,7 @@ class Vote < ActiveRecord::Base
|
|||
|
||||
votes
|
||||
end
|
||||
|
||||
|
||||
def self.story_votes_by_user_for_story_ids_hash(user_id, story_ids)
|
||||
if !story_ids.any?
|
||||
return {}
|
||||
|
|
|
@ -93,7 +93,7 @@
|
|||
|
||||
<div class="clear"></div>
|
||||
</div>
|
||||
|
||||
|
||||
<div id="inside">
|
||||
<% if flash[:error] %>
|
||||
<div class="flash-error"><%= flash[:error] %></div>
|
||||
|
|
|
@ -56,7 +56,7 @@
|
|||
<%= f.text_field :recipient_username, :size => 20,
|
||||
:autocomplete => "off" %>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="boxline">
|
||||
<%= f.label :subject, "Subject:", :class => "required" %>
|
||||
<%= f.text_field :subject, :style => "width: 500px;",
|
||||
|
|
|
@ -32,7 +32,7 @@
|
|||
<%= submit_tag "Delete Message" %>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
|
||||
<div style="float: left; padding-left: 1em;">
|
||||
<%= form_tag message_url(@message.short_id) + "/keep_as_new",
|
||||
:method => :post do %>
|
||||
|
@ -42,7 +42,7 @@
|
|||
</div>
|
||||
|
||||
<div style="clear: both;"></div>
|
||||
|
||||
|
||||
<br>
|
||||
|
||||
<div class="legend">
|
||||
|
|
|
@ -20,7 +20,7 @@
|
|||
|
||||
<%= radio_button_tag "what", "stories", @search.what == "stories" %>
|
||||
<label for="search_what_stories" class="normal">Stories</label>
|
||||
|
||||
|
||||
|
||||
|
||||
<%= radio_button_tag "what", "comments", @search.what == "comments" %>
|
||||
|
|
|
@ -19,7 +19,7 @@
|
|||
<% end %>
|
||||
|
||||
<p></p>
|
||||
|
||||
|
||||
<div class="box">
|
||||
<div class="boxline markdown_help_toggler">
|
||||
<div class="markdown_help_label">
|
||||
|
|
|
@ -24,7 +24,7 @@
|
|||
Lobsters</a>
|
||||
</div>
|
||||
<ul>
|
||||
|
||||
|
||||
<li>
|
||||
<p>
|
||||
To be able to easily submit a page you're viewing in your browser
|
||||
|
@ -52,7 +52,7 @@
|
|||
are it does not belong here. Do not overreach with tags if they
|
||||
are not the primary focus of the story.
|
||||
</p></li>
|
||||
|
||||
|
||||
<li><p>
|
||||
When the story being submitted is more than a year or so old,
|
||||
please add the year the story was written to the post title in
|
||||
|
|
|
@ -29,7 +29,7 @@
|
|||
<% end %>
|
||||
</span>
|
||||
<br>
|
||||
|
||||
|
||||
<label class="required">Karma:</label>
|
||||
<span class="d">
|
||||
<%= @showing_user.karma %>
|
||||
|
@ -44,7 +44,7 @@
|
|||
@showing_user.stories_submitted_count %></a>
|
||||
</span>
|
||||
<br>
|
||||
|
||||
|
||||
<label class="required">Comments Posted:</label>
|
||||
<span class="d">
|
||||
<a href="/threads/<%= @showing_user.username %>"><%=
|
||||
|
|
|
@ -195,7 +195,7 @@ class Sponge
|
|||
newuri.scheme = uri.scheme
|
||||
newuri.port = uri.port
|
||||
newuri.path = "/#{newuri.path}"
|
||||
|
||||
|
||||
dputs "following relative redirection to " + newuri.to_s
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in a new issue