so long whitespace

This commit is contained in:
joshua stein 2013-02-13 18:50:51 -06:00
parent e4ec8939c2
commit d0459974cd
18 changed files with 34 additions and 33 deletions

View file

@ -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();

View file

@ -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

View file

@ -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}"

View file

@ -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

View file

@ -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]

View file

@ -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>",

View file

@ -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

View file

@ -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

View file

@ -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

View file

@ -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 {}

View file

@ -93,7 +93,7 @@
<div class="clear"></div>
</div>
<div id="inside">
<% if flash[:error] %>
<div class="flash-error"><%= flash[:error] %></div>

View file

@ -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;",

View file

@ -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">

View file

@ -20,7 +20,7 @@
<%= radio_button_tag "what", "stories", @search.what == "stories" %>
<label for="search_what_stories" class="normal">Stories</label>
&nbsp;
<%= radio_button_tag "what", "comments", @search.what == "comments" %>

View file

@ -19,7 +19,7 @@
<% end %>
<p></p>
<div class="box">
<div class="boxline markdown_help_toggler">
<div class="markdown_help_label">

View file

@ -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

View file

@ -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 %>"><%=

View file

@ -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