Commit 6ffc03a4 authored by Dorian's avatar Dorian Committed by Stephen Caudill

Big clean up: delete trailing whitespace

parent fd69f020
...@@ -16,8 +16,8 @@ including the two. ...@@ -16,8 +16,8 @@ including the two.
You must obey the GNU Affero General Public License V3 or later in all respects You must obey the GNU Affero General Public License V3 or later in all respects
for all of the code used other than OpenSSL or the components mentioned for all of the code used other than OpenSSL or the components mentioned
above. If you modify file(s) with this exception, you may extend this above. If you modify file(s) with this exception, you may extend this
exception to your version of the file(s), but you are not obligated to exception to your version of the file(s), but you are not obligated to
do so. If you do not wish to do so, delete this exception statement from your do so. If you do not wish to do so, delete this exception statement from your
version. If you delete this exception statement from all source files in the version. If you delete this exception statement from all source files in the
program, then also delete it here. program, then also delete it here.
...@@ -33,7 +33,7 @@ class AspectsController < ApplicationController ...@@ -33,7 +33,7 @@ class AspectsController < ApplicationController
begin begin
current_user.drop_aspect @aspect current_user.drop_aspect @aspect
flash[:notice] = i18n.t 'aspects.destroy.success',:name => @aspect.name flash[:notice] = i18n.t 'aspects.destroy.success',:name => @aspect.name
rescue RuntimeError => e rescue RuntimeError => e
flash[:error] = e.message flash[:error] = e.message
end end
......
...@@ -78,7 +78,7 @@ class Person ...@@ -78,7 +78,7 @@ class Person
def self.by_webfinger( identifier, opts = {}) def self.by_webfinger( identifier, opts = {})
#need to check if this is a valid email structure, maybe should do in JS #need to check if this is a valid email structure, maybe should do in JS
local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '').to_s.downcase) local_person = Person.first(:diaspora_handle => identifier.gsub('acct:', '').to_s.downcase)
if local_person if local_person
Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}") Rails.logger.info("Do not need to webfinger, found a local person #{local_person.real_name}")
local_person local_person
...@@ -100,9 +100,9 @@ class Person ...@@ -100,9 +100,9 @@ class Person
new_person = Person.new new_person = Person.new
public_key_entry = profile.links.select{|x| x.rel == 'diaspora-public-key'} public_key_entry = profile.links.select{|x| x.rel == 'diaspora-public-key'}
return nil unless public_key_entry return nil unless public_key_entry
pubkey = public_key_entry.first.href pubkey = public_key_entry.first.href
new_person.exported_key = Base64.decode64 pubkey new_person.exported_key = Base64.decode64 pubkey
......
...@@ -66,7 +66,7 @@ class User ...@@ -66,7 +66,7 @@ class User
def drop_aspect( aspect ) def drop_aspect( aspect )
if aspect.people.size == 0 if aspect.people.size == 0
aspect.destroy aspect.destroy
else else
raise "Aspect not empty" raise "Aspect not empty"
end end
end end
...@@ -106,11 +106,11 @@ class User ...@@ -106,11 +106,11 @@ class User
intitial_post(class_name, aspect_ids, options) intitial_post(class_name, aspect_ids, options)
end end
def intitial_post(class_name, aspect_ids, options = {}) def intitial_post(class_name, aspect_ids, options = {})
post = build_post(class_name, options) post = build_post(class_name, options)
post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid) post.socket_to_uid(id, :aspect_ids => aspect_ids) if post.respond_to?(:socket_to_uid)
push_to_aspects(post, aspect_ids) push_to_aspects(post, aspect_ids)
post post
end end
def repost( post, options = {} ) def repost( post, options = {} )
...@@ -137,9 +137,9 @@ class User ...@@ -137,9 +137,9 @@ class User
end end
aspect_ids.each do |aspect_id| aspect_ids.each do |aspect_id|
unless self.aspects.find(aspect_id) unless self.aspects.find(aspect_id)
raise ArgumentError.new("Cannot post to an aspect you do not own.") raise ArgumentError.new("Cannot post to an aspect you do not own.")
end end
end end
aspect_ids aspect_ids
......
...@@ -15,4 +15,4 @@ ...@@ -15,4 +15,4 @@
%div.image_cycle %div.image_cycle
- for photo in post.photos[0..3] - for photo in post.photos[0..3]
= link_to (image_tag photo.url(:thumb_large)), album_path(post, :aspect => @aspect) = link_to (image_tag photo.url(:thumb_large)), album_path(post, :aspect => @aspect)
...@@ -5,7 +5,7 @@ ...@@ -5,7 +5,7 @@
- content_for :page_title do - content_for :page_title do
= link_to t('.photos'), albums_path(:aspect => @aspect) = link_to t('.photos'), albums_path(:aspect => @aspect)
- content_for :left_pane do - content_for :left_pane do
= render "shared/aspect_friends" = render "shared/aspect_friends"
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
- content_for :head do - content_for :head do
= javascript_include_tag 'jquery-ui-1.8.4.custom.min.js' = javascript_include_tag 'jquery-ui-1.8.4.custom.min.js'
= javascript_include_tag 'aspect-edit.js' = javascript_include_tag 'aspect-edit.js'
...@@ -34,7 +34,7 @@ ...@@ -34,7 +34,7 @@
%ul#aspect_list %ul#aspect_list
- for aspect in @aspects - for aspect in @aspects
%li.aspect %li.aspect
.aspect_name .aspect_name
%span.edit_name_field %span.edit_name_field
%h1{:contenteditable => true}= aspect.name %h1{:contenteditable => true}= aspect.name
...@@ -44,9 +44,9 @@ ...@@ -44,9 +44,9 @@
%li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button' %li= link_to t('.add_a_new_friend'), "#add_request_pane_#{aspect.id}", :class => 'add_request_button'
%li= link_to t('.show'), aspect_path(aspect) %li= link_to t('.show'), aspect_path(aspect)
%li!= remove_link(aspect) %li!= remove_link(aspect)
%ul.dropzone{:id => aspect.id} %ul.dropzone{:id => aspect.id}
-if aspect.people.size < 1 -if aspect.people.size < 1
%li.grey Drag to add people %li.grey Drag to add people
......
...@@ -3,7 +3,7 @@ ...@@ -3,7 +3,7 @@
-# the COPYRIGHT file. -# the COPYRIGHT file.
%li.comment{:id => post.id} %li.comment{:id => post.id}
= person_image_tag(post.person) = person_image_tag(post.person)
%span.from %span.from
= link_to post.person.real_name, post.person = link_to post.person.real_name, post.person
......
...@@ -9,4 +9,4 @@ ...@@ -9,4 +9,4 @@
= render 'comments/comment', :post => comment = render 'comments/comment', :post => comment
%li.comment.show %li.comment.show
= render 'comments/new_comment', :post => post = render 'comments/new_comment', :post => post
%h1 %h1
This is a technology preview, do not provide any private information. This is a technology preview, do not provide any private information.
%h3 %h3
your account may be deleted until we move into a more stable development period. your account may be deleted until we move into a more stable development period.
%h3 %h3
USE AT YOUR OWN RISK!! USE AT YOUR OWN RISK!!
= form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f| = form_for(resource, :as => resource_name, :url => session_path(resource_name)) do |f|
......
...@@ -19,18 +19,18 @@ ...@@ -19,18 +19,18 @@
if (obj['class']=="retractions"){ if (obj['class']=="retractions"){
processRetraction(obj['post_id']); processRetraction(obj['post_id']);
}else if (obj['class']=="comments"){ }else if (obj['class']=="comments"){
processComment(obj['post_id'], obj['html']) processComment(obj['post_id'], obj['html'])
}else if (obj['class']=='photos' && onPageForClass('albums')){ }else if (obj['class']=='photos' && onPageForClass('albums')){
processPhotoInAlbum(obj['photo_hash']) processPhotoInAlbum(obj['photo_hash'])
}else{ }else{
processPost(obj['class'], obj['html'], obj['aspect_ids']) processPost(obj['class'], obj['html'], obj['aspect_ids'])
} }
}; };
ws.onclose = function() { debug("socket closed"); }; ws.onclose = function() { debug("socket closed"); };
ws.onopen = function() { ws.onopen = function() {
ws.send(location.pathname); ws.send(location.pathname);
...@@ -66,7 +66,7 @@ ...@@ -66,7 +66,7 @@
$(html).fadeIn("fast", function(){ $(html).fadeIn("fast", function(){
$("#stream label:first").inFieldLabels(); $("#stream label:first").inFieldLabels();
}) })
); );
} }
} }
...@@ -77,13 +77,13 @@ ...@@ -77,13 +77,13 @@
html = "<div class=\'image_thumb\' id=\'"+photoHash['id']+"\' style=\'padding-right:3px;\'> \ html = "<div class=\'image_thumb\' id=\'"+photoHash['id']+"\' style=\'padding-right:3px;\'> \
<a href=\"/photos/"+ photoHash['id'] +"\"> \ <a href=\"/photos/"+ photoHash['id'] +"\"> \
<img alt=\"New thumbnail\" src=\""+ photoHash['thumb_url'] +"\" /> \ <img alt=\"New thumbnail\" src=\""+ photoHash['thumb_url'] +"\" /> \
</a> </div>" </a> </div>"
$("#thumbnails").append( $(html) ) $("#thumbnails").append( $(html) )
$("#"+ photoHash['id'] + " img").load( function() { $("#"+ photoHash['id'] + " img").load( function() {
$(this).fadeIn("slow"); $(this).fadeIn("slow");
}); });
} }
function onPageForClass(className){ function onPageForClass(className){
return (location.href.indexOf(className) != -1 ); return (location.href.indexOf(className) != -1 );
} }
...@@ -100,9 +100,9 @@ ...@@ -100,9 +100,9 @@
} }
function onPageForAspect(aspectId){ function onPageForAspect(aspectId){
return (location.href.indexOf(aspectId) != -1 ) return (location.href.indexOf(aspectId) != -1 )
} }
function onPageOne() { function onPageOne() {
var c = document.location.search.charAt(document.location.search.length-1); var c = document.location.search.charAt(document.location.search.length-1);
return ((c =='') || (c== '1')); return ((c =='') || (c== '1'));
......
...@@ -10,24 +10,24 @@ ...@@ -10,24 +10,24 @@
= "#{current_user.real_name} | diaspora" if current_user = "#{current_user.real_name} | diaspora" if current_user
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
= stylesheet_link_tag "blueprint/screen", :media => 'screen' = stylesheet_link_tag "blueprint/screen", :media => 'screen'
= stylesheet_link_tag "application", "ui" = stylesheet_link_tag "application", "ui"
= stylesheet_link_tag "/../javascripts/fancybox/jquery.fancybox-1.3.1" = stylesheet_link_tag "/../javascripts/fancybox/jquery.fancybox-1.3.1"
= stylesheet_link_tag "fileuploader" = stylesheet_link_tag "fileuploader"
/= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" /= javascript_include_tag "http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
= javascript_include_tag 'jquery-1.4.2.min', 'rails' = javascript_include_tag 'jquery-1.4.2.min', 'rails'
= javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js' = javascript_include_tag 'jquery.infieldlabel', 'jquery.cycle/jquery.cycle.min.js'
= javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack' = javascript_include_tag 'fancybox/jquery.fancybox-1.3.1.pack'
= javascript_include_tag 'fileuploader' = javascript_include_tag 'fileuploader'
= javascript_include_tag 'view', 'image_picker', 'stream' = javascript_include_tag 'view', 'image_picker', 'stream'
= render 'js/websocket_js' = render 'js/websocket_js'
= csrf_meta_tag = csrf_meta_tag
= yield(:head) = yield(:head)
......
...@@ -10,7 +10,7 @@ ...@@ -10,7 +10,7 @@
DIASPORA | login DIASPORA | login
%meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/ %meta{"http-equiv"=>"Content-Type", :content=>"text/html; charset=utf-8"}/
%meta{"http-equiv"=> "X-UA-Compatible", :content =>"chrome=1" } %meta{"http-equiv"=> "X-UA-Compatible", :content =>"chrome=1" }
= stylesheet_link_tag "sessions" = stylesheet_link_tag "sessions"
/= javascript_include_tag"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" /= javascript_include_tag"http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"
= javascript_include_tag 'jquery142' = javascript_include_tag 'jquery142'
...@@ -18,10 +18,10 @@ ...@@ -18,10 +18,10 @@
:javascript :javascript
$(document).ready(function(){ $(document).ready(function(){
$("#user_username").focus(); $("#user_username").focus();
$("label").inFieldLabels(); $("label").inFieldLabels();
}); });
= csrf_meta_tag = csrf_meta_tag
= yield(:head) = yield(:head)
...@@ -44,11 +44,11 @@ ...@@ -44,11 +44,11 @@
</div> </div>
</div> </div>
<![endif]--> <![endif]-->
- flash.each do |name, msg| - flash.each do |name, msg|
= content_tag :div, msg, :id => "flash_#{name}" = content_tag :div, msg, :id => "flash_#{name}"
%div#huge_text %div#huge_text
DIASPORA* DIASPORA*
= yield = yield
/= link_to "signup", "/signup" /= link_to "signup", "/signup"
...@@ -21,5 +21,5 @@ ...@@ -21,5 +21,5 @@
%ul#stream %ul#stream
- for person in @people - for person in @people
= render 'people/person', :person => person = render 'people/person', :person => person
= will_paginate @people = will_paginate @people
...@@ -15,13 +15,13 @@ ...@@ -15,13 +15,13 @@
= f.label :url = f.label :url
%br %br
= f.text_field :url = f.text_field :url
=f.fields_for :profile do |p| =f.fields_for :profile do |p|
%p %p
= p.label :first_name = p.label :first_name
%br %br
= p.text_field :first_name = p.text_field :first_name
%p %p
= p.label :last_name = p.label :last_name
%br %br
......
...@@ -28,7 +28,7 @@ ...@@ -28,7 +28,7 @@
= link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button" = link_to t('.remove_friend'), @person, :confirm => t('.are_you_sure'), :method => :delete, :class => "button"
.span-20.last .span-20.last
.span-19.last .span-19.last
- if @posts - if @posts
%ul#stream %ul#stream
......
...@@ -4,14 +4,14 @@ ...@@ -4,14 +4,14 @@
:javascript :javascript
function createUploader(){ function createUploader(){
var uploader = new qq.FileUploader({ var uploader = new qq.FileUploader({
element: document.getElementById('file-upload'), element: document.getElementById('file-upload'),
params: {'album_id' : "#{@album.id}"}, params: {'album_id' : "#{@album.id}"},
allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'], allowedExtensions: ['jpg', 'jpeg', 'png', 'gif'],
action: "#{photos_path}" action: "#{photos_path}"
}); });
} }
window.onload = createUploader; window.onload = createUploader;
#file-upload #file-upload
...@@ -17,9 +17,9 @@ ...@@ -17,9 +17,9 @@
%br %br
= render "albums/album", :post => post.album, :current_user => current_user = render "albums/album", :post => post.album, :current_user => current_user
= link_to (image_tag post.url(:thumb_medium)), object_path(post) = link_to (image_tag post.url(:thumb_medium)), object_path(post)
.info .info
= link_to(how_long_ago(post), photo_path(post)) = link_to(how_long_ago(post), photo_path(post))
\-- \--
= link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments" = link_to "#{t('.show_comments')} (#{post.comments.count})", '#', :class => "show_post_comments"
= render "comments/comments", :post => post = render "comments/comments", :post => post
...@@ -53,4 +53,4 @@ ...@@ -53,4 +53,4 @@
%h4{:class => "show_post_comments"} %h4{:class => "show_post_comments"}
= "#{t('.comments')} (#{@photo.comments.count})" = "#{t('.comments')} (#{@photo.comments.count})"
= render "comments/comments", :post => @photo = render "comments/comments", :post => @photo
...@@ -4,6 +4,6 @@ ...@@ -4,6 +4,6 @@
%ul %ul
%h3= link_to post.class, object_path(post) %h3= link_to post.class, object_path(post)
- for field in object_fields(post) - for field in object_fields(post)
%li= "#{field}: #{post.attributes[field]}" %li= "#{field}: #{post.attributes[field]}"
<div id="content"> <div id="content">
<h1><%=@person.real_name%></h1> <h1><%=@person.real_name%></h1>
<div id="content_inner"> <div id="content_inner">
<div id="i" class="entity_profile vcard author"> <div id="i" class="entity_profile vcard author">
<h2>User profile</h2> <h2>User profile</h2>
<dl class="entity_nickname"> <dl class="entity_nickname">
<dt>Nickname</dt> <dt>Nickname</dt>
<dd> <dd>
<a href="<%=@person.url%>" rel="me" class="nickname url uid"><%= @person.real_name%></a> <a href="<%=@person.url%>" rel="me" class="nickname url uid"><%= @person.real_name%></a>
</dd> </dd>
</dl> </dl>
<dl class="entity_given_name"> <dl class="entity_given_name">
<dt>Full name</dt> <dt>Full name</dt>
<dd> <dd>
<span class="given_name" ><%= @person.profile.first_name %></span> <span class="given_name" ><%= @person.profile.first_name %></span>
</dd> </dd>
</dl> </dl>
<dl class="entity_family_name"> <dl class="entity_family_name">
<dt>Full name</dt> <dt>Full name</dt>
<dd> <dd>
<span class="family_name" ><%= @person.profile.last_name %></span> <span class="family_name" ><%= @person.profile.last_name %></span>
</dd> </dd>
</dl> </dl>
<dl class="entity_fn"> <dl class="entity_fn">
<dt>Full name</dt> <dt>Full name</dt>
<dd> <dd>
<span class="fn" ><%= @person.real_name %></span> <span class="fn" ><%= @person.real_name %></span>
</dd> </dd>
</dl> </dl>
<dl class="entity_url"> <dl class="entity_url">
<dt>URL</dt> <dt>URL</dt>
<dd> <dd>
<a href="<%= @person.url%>" rel="me" id="pod_location" class="url"><%= @person.url%></a> <a href="<%= @person.url%>" rel="me" id="pod_location" class="url"><%= @person.url%></a>