Merge branch 'master' of github.com:diaspora/diaspora_rails
This commit is contained in:
commit
a6c33b3e7b
9 changed files with 25 additions and 23 deletions
|
|
@ -2,6 +2,7 @@ class BookmarksController < ApplicationController
|
|||
before_filter :authenticate_user!
|
||||
|
||||
def index
|
||||
@bookmark = Bookmark.new
|
||||
@bookmarks = Bookmark.sort(:created_at.desc).all
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -9,7 +9,7 @@ class DashboardController < ApplicationController
|
|||
|
||||
|
||||
def receive
|
||||
store_posts_from_xml (params[:xml])
|
||||
store_posts_from_xml CGI::unescape(params[:xml])
|
||||
render :nothing => true
|
||||
end
|
||||
|
||||
|
|
|
|||
|
|
@ -1,12 +0,0 @@
|
|||
= form_for @bookmark do |f|
|
||||
= f.error_messages
|
||||
%p
|
||||
= f.label :title
|
||||
%br
|
||||
= f.text_field :title
|
||||
%p
|
||||
= f.label :link
|
||||
%br
|
||||
= f.text_field :link
|
||||
%p
|
||||
= f.submit
|
||||
6
app/views/bookmarks/_new_bookmark.haml
Normal file
6
app/views/bookmarks/_new_bookmark.haml
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
= form_for @bookmark, :remote => true do |f|
|
||||
= f.error_messages
|
||||
= f.text_field :title, :value => "Title"
|
||||
= f.text_field :link, :value => "URL"
|
||||
%p
|
||||
= f.submit
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
%h1= link_to "new bookmark", new_bookmark_path
|
||||
|
||||
%h1.big_text bookmarks
|
||||
= render "bookmarks/new_bookmark", :bookmark => @bookmark
|
||||
%ul#stream
|
||||
- for bookmark in @bookmarks
|
||||
= render "bookmark", :post => bookmark
|
||||
|
|
|
|||
|
|
@ -71,8 +71,6 @@
|
|||
%ul.nav
|
||||
%a{ :href => root_path, :title => "Your network stream."}
|
||||
%li home
|
||||
%a{ :href => users_path, :title => "Registered users on your seed."}
|
||||
%li users
|
||||
%a{ :href => status_messages_path, :title => "Recent status messages."}
|
||||
%li status messages
|
||||
%a{ :href => bookmarks_path, :title => "Recently shared links."}
|
||||
|
|
@ -88,4 +86,4 @@
|
|||
= yield
|
||||
= render "posts/debug"
|
||||
#friends_list
|
||||
= render 'friends/sidebar'
|
||||
= render 'friends/sidebar' if user_signed_in?
|
||||
|
|
|
|||
|
|
@ -8,7 +8,7 @@ module Diaspora
|
|||
def notify_friends
|
||||
if self.person_id == User.first.id
|
||||
xml = Post.build_xml_for(self)
|
||||
@@queue.add_post_request( friends_with_permissions, xml )
|
||||
@@queue.add_post_request( friends_with_permissions, CGI::escape(xml) )
|
||||
@@queue.process
|
||||
end
|
||||
end
|
||||
|
|
|
|||
|
|
@ -25,10 +25,16 @@ $(document).ready(function(){
|
|||
$(this).fadeTo(80, 1);
|
||||
});
|
||||
|
||||
$('#status_message_message').click(function() {
|
||||
$(this).val("")
|
||||
});
|
||||
$('#status_message_message').click(clearForm);
|
||||
|
||||
$('#bookmark_title').click(clearForm);
|
||||
|
||||
$('#bookmark_link').click(clearForm);
|
||||
|
||||
function clearForm(){
|
||||
$(this).val("");
|
||||
}
|
||||
|
||||
$('#debug_info').click(function() {
|
||||
$('#debug_more').toggle('fast', function() {
|
||||
|
||||
|
|
@ -39,4 +45,4 @@ $(document).ready(function(){
|
|||
|
||||
$('#flash_notice, #flash_error, #flash_alert').delay(1500).slideUp(130);
|
||||
|
||||
});//end document ready
|
||||
});//end document ready
|
||||
|
|
|
|||
|
|
@ -34,6 +34,9 @@ describe Bookmark do
|
|||
|
||||
bookmark.link = "http://www.google.com"
|
||||
bookmark.valid?.should == true
|
||||
|
||||
#bookmark.link = "http://babycakes.sofaer.net:3000"
|
||||
#bookmark.valid?.should == true
|
||||
|
||||
#invalid links
|
||||
bookmark.link = "zsdvzxdg"
|
||||
|
|
|
|||
Loading…
Reference in a new issue