From 73b82bc177e3ac798638c9d828335a3d2cc61c7d Mon Sep 17 00:00:00 2001 From: Harry Bomrah Date: Tue, 26 Nov 2013 01:00:51 +0800 Subject: [PATCH] second commit for harry.tp --- app/assets/stylesheets/sign_up.css | 9 +++++-- app/controllers/basic_infos_controller.rb | 1 - app/controllers/facebook_controller.rb | 4 +++ app/views/basic_infos/index.html.erb | 26 ++++++++++++++++++- .../desktop/settings/connections.html.erb | 2 +- config/routes.rb | 2 +- 6 files changed, 38 insertions(+), 6 deletions(-) diff --git a/app/assets/stylesheets/sign_up.css b/app/assets/stylesheets/sign_up.css index b0b27c89..3e76f594 100644 --- a/app/assets/stylesheets/sign_up.css +++ b/app/assets/stylesheets/sign_up.css @@ -32,14 +32,19 @@ .sign-up .or .left{ margin-top: 10px; - width: 220px; + margin-left: 60px; + width: 160px; float: left; } .sign-up .or .right{ margin-top: 10px; - width: 220px; + margin-right: 60px; + width: 160px; float: right; } +.sign-up .facebook:hover{ + opacity: 0.8; +} .line{ border-bottom: 1px solid #EDEDED; diff --git a/app/controllers/basic_infos_controller.rb b/app/controllers/basic_infos_controller.rb index 665fe60c..3439721b 100644 --- a/app/controllers/basic_infos_controller.rb +++ b/app/controllers/basic_infos_controller.rb @@ -1,7 +1,6 @@ class BasicInfosController < ApplicationController layout "devise" def index - @url = "http://fb.tp.rulingcom.com/login?callback=http://harry.tp.rulingcom.com/facebook/register_fb?user="+current_user.id.to_s rescue nil end def form_page diff --git a/app/controllers/facebook_controller.rb b/app/controllers/facebook_controller.rb index b0f67b2a..247b16cd 100644 --- a/app/controllers/facebook_controller.rb +++ b/app/controllers/facebook_controller.rb @@ -43,4 +43,8 @@ class FacebookController< ApplicationController render :json=>{"success"=>true}.to_json end + def server_redirect + # "http://fb.tp.rulingcom.com/login?callback=http://harry.tp.rulingcom.com/facebook/register_fb?user="+current_user.id.to_s rescue nil + redirect_to "http://new.tp.rulingcom.com" + end end \ No newline at end of file diff --git a/app/views/basic_infos/index.html.erb b/app/views/basic_infos/index.html.erb index 9ea22331..bd6333f8 100644 --- a/app/views/basic_infos/index.html.erb +++ b/app/views/basic_infos/index.html.erb @@ -10,9 +10,33 @@ OR
- + +
+ + diff --git a/app/views/desktop/settings/connections.html.erb b/app/views/desktop/settings/connections.html.erb index 1539718b..57b186d1 100644 --- a/app/views/desktop/settings/connections.html.erb +++ b/app/views/desktop/settings/connections.html.erb @@ -1,6 +1,6 @@
- Connect FaceBook + Connect FaceBook Get Friends Disconnect from facebook diff --git a/config/routes.rb b/config/routes.rb index 1d277493..617f09b9 100644 --- a/config/routes.rb +++ b/config/routes.rb @@ -320,7 +320,7 @@ Orbit::Application.routes.draw do match "/facebook/register_fb" => "facebook#register_fb" match "/facebook/get_friends" => "facebook#get_friends" match "/facebook/disconnect" => "facebook#disconnect" - + match "/facebook/server" => "facebook#server_redirect" match "/desktop/wallpaper_upload" => "desktop#wallpaper_upload" #match '/desktop_orbit/eventajaxload' => 'desktop_publications#create_journal'