completely green
This commit is contained in:
@@ -10,5 +10,5 @@ App.User= DS.Model.extend
|
||||
return '' unless facebook_id
|
||||
url = "http://graph.facebook.com/#{facebook_id}/picture?type=square"
|
||||
name = @get('name')
|
||||
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" >"
|
||||
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" class=\"user-facebook-image\">"
|
||||
).property('facebook_id', 'name')
|
||||
|
||||
@@ -13,7 +13,7 @@ if table.active_list
|
||||
/.table-action-row
|
||||
a{action "editTable" table}: span.fa.fa-lg.fa-wrench
|
||||
each user in table.active_list.users
|
||||
span= user.facebook_image_tag
|
||||
= user.facebook_image_tag
|
||||
if editmodedisabled
|
||||
.table-settings
|
||||
select
|
||||
|
||||
@@ -3,6 +3,10 @@ root.Qsupplier=
|
||||
watch_events: ->
|
||||
faye = new Faye.Client(event_host)
|
||||
faye.subscribe "/supplier/#{supplier_object.id}", (e)=>
|
||||
<% if Rails.env.development? %>
|
||||
console.log "Event: #{e.event}"
|
||||
console.log e.data
|
||||
<% end %>
|
||||
if(e.event == 'new_order')
|
||||
if App
|
||||
App.store().pushPayload(e.data)
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
Qstorage = window.localStorage;
|
||||
Qstorage.setItem('auth_token', '#{current_user.authentication_token}');
|
||||
Qstorage.setItem('user_id', '#{current_user.id}');
|
||||
window.location = (Qstorage.getItem('root_url') || '/index.html') + '?user_id=#{current_user.id}&auth_token=#{current_user.authentication_token}';
|
||||
window.location = (Qstorage.getItem('root_url') || '/user/index.html') + '?user_id=#{current_user.id}&auth_token=#{current_user.authentication_token}';
|
||||
// localStorage.setItem('auth_token', '#{current_user.authentication_token}');
|
||||
// localStorage.setItem('user_id', '#{current_user.id}');
|
||||
// window.location = $root_url + '?user_id=#{current_user.id}&auth_token=#{current_user.authentication_token}';
|
||||
|
||||
@@ -6,8 +6,8 @@ Feature: Sign up as user using facebook
|
||||
Given There is no user information stored in the local storage
|
||||
When I visit the user obtain token path
|
||||
Then I should be signed in as a user through facebook
|
||||
And I wait 4 seconds
|
||||
And I should be redirected to the user home
|
||||
When I wait 4 seconds
|
||||
Then I should be redirected to the user home
|
||||
And the newly created user info should be stored in the local storage
|
||||
|
||||
@javascript
|
||||
|
||||
@@ -1,5 +1,7 @@
|
||||
|
||||
step "There is no user information stored in the local storage" do
|
||||
visit '/'
|
||||
page.execute_script %|Qstorage = window.localStorage|
|
||||
page.evaluate_script(%|Qstorage.getItem('user_id')|).should be_blank
|
||||
page.evaluate_script(%|Qstorage.getItem('auth_token')|).should be_blank
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user