Add instagram background implementation and generalize application for other identity providers
This commit is contained in:
@@ -1,14 +1,13 @@
|
||||
attr = DS.attr
|
||||
App.User= DS.Model.extend
|
||||
facebook_id: attr('string')
|
||||
email: attr('string')
|
||||
name: attr('string')
|
||||
uid: attr('string')
|
||||
provider: attr('string')
|
||||
avatar: attr('string')
|
||||
list: DS.belongsTo('list') # in ember scope not many to many (yet)
|
||||
join_requests: DS.hasMany('join_request')
|
||||
facebook_image_tag: (->
|
||||
facebook_id = @get('facebook_id')
|
||||
return '' unless facebook_id
|
||||
url = "http://graph.facebook.com/#{facebook_id}/picture?type=square"
|
||||
avatar_tag: (->
|
||||
return unless avatar = @get('avatar')
|
||||
name = @get('name')
|
||||
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" class=\"user-facebook-image\">"
|
||||
).property('facebook_id', 'name')
|
||||
"<img src='#{avatar}' alt='#{name}' title='#{name}' class='user-avatar-image #{@get('provider')}'>".htmlSafe()
|
||||
).property('avatar', 'name')
|
||||
|
||||
@@ -14,7 +14,7 @@ if list.closed_at
|
||||
.display-field= view "close-list-button" content=list
|
||||
.user-info-container
|
||||
each user in list.users
|
||||
=user.facebook_image_tag
|
||||
=user.avatar_tag
|
||||
if list.sorted_orders
|
||||
.list-orders-container
|
||||
each order in list.sorted_orders
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
td.user-info.show-for-large-up
|
||||
each user in view.content.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
td.status-icons
|
||||
if view.content.needs_help
|
||||
span.icon.needs-help
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
td.user-info.show-for-large-up
|
||||
each user in view.content.list.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
td.status-icons
|
||||
if view.content.active
|
||||
span.active-order.fa.fa-check.fa-lg
|
||||
|
||||
@@ -14,7 +14,7 @@ table.table
|
||||
tr
|
||||
td
|
||||
each user in order.list.users
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
td.status-icons
|
||||
if order.active
|
||||
span.active-order.fa.fa-check.fa-lg
|
||||
|
||||
@@ -18,7 +18,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
|
||||
= user.facebook_image_tag
|
||||
= user.avatar_tag
|
||||
if editmodedisabled
|
||||
.table-settings
|
||||
select
|
||||
|
||||
@@ -1,12 +1,3 @@
|
||||
#FB.init appId: '168928633304849'
|
||||
|
||||
#Ember.Application.initializer
|
||||
#name: 'authentication',
|
||||
#initialize: (container, application)->
|
||||
## register the Facebook authenticator so the session can find it
|
||||
#container.register 'authenticators:facebook', App.FacebookAuthenticator
|
||||
#Ember.SimpleAuth.setup(container, application)
|
||||
|
||||
@App = Ember.Application.create
|
||||
LOG_TRANSITIONS: true
|
||||
rootElement: '#ember-app-container'
|
||||
|
||||
@@ -1,18 +1,13 @@
|
||||
attr = DS.attr
|
||||
App.User = DS.Model.extend
|
||||
facebook_id: attr('string')
|
||||
email: attr('string')
|
||||
name: attr('string')
|
||||
uid: attr('string')
|
||||
provider: attr('string')
|
||||
avatar: attr('string')
|
||||
list: DS.belongsTo('list') # in ember scope not many to many (yet)
|
||||
join_requests: DS.hasMany('join_request')
|
||||
facebook_image_tag: (->
|
||||
facebook_id = @get('facebook_id')
|
||||
return '' unless facebook_id
|
||||
<% if Rails.env.test? %>
|
||||
url = ""
|
||||
<% else %>
|
||||
url = "http://graph.facebook.com/#{facebook_id}/picture?type=square"
|
||||
<% end %>
|
||||
avatar_tag: (->
|
||||
return unless avatar = @get('avatar')
|
||||
name = @get('name')
|
||||
new Handlebars.SafeString "<img src=\"#{url}\" alt=\"#{name}\" title=\"#{name}\" class=\"user-facebook-image\">"
|
||||
).property('facebook_id', 'name')
|
||||
"<img src='#{avatar}' alt='#{name}' title='#{name}' class='user-avatar-image #{@get('provider')}'>".htmlSafe()
|
||||
).property('avatar', 'name')
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
each user in list.users
|
||||
img.facebook-image src="http://graph.facebook.com/#{unbound user.facebook_id}/picture?type=square" alt="f"
|
||||
user.avatar_tag
|
||||
.display-row
|
||||
.display-label=t 'attributes.list.created_at'
|
||||
.display-field=time list.created_at
|
||||
|
||||
@@ -2,8 +2,8 @@
|
||||
h2= t 'join_request.existing_user.title'
|
||||
each join_request in join_requests
|
||||
.join-request-container
|
||||
= join_request.user.facebook_image_tag
|
||||
span.user-email= join_request.user.email
|
||||
= join_request.user.avatar_tag
|
||||
span.user-name= join_request.user.name
|
||||
.right
|
||||
button.join-request-reject{action "rejectRequest" join_request}=t 'join_request.existing_user.reject_request'
|
||||
button.join-request-approve{action "approveRequest" join_request}=t 'join_request.existing_user.approve_request'
|
||||
|
||||
@@ -66,7 +66,8 @@
|
||||
$primary-color: #008349
|
||||
// $secondary-color: #e7e7e7;
|
||||
$secondary-color: #d7d7d7
|
||||
// $alert-color: #f04124;
|
||||
//$alert-color: #f04124;
|
||||
$alert-color: #ee3e41
|
||||
// $success-color: #43AC6A;
|
||||
// $warning-color: #f08a24;
|
||||
// $info-color: #a0d3e8;
|
||||
|
||||
@@ -1,7 +1,5 @@
|
||||
//$qbrown: #634227
|
||||
$qbrown: #853d15
|
||||
$qbrown-active: lighten($qbrown, 20%)
|
||||
$green: #7BB459 //Heineken
|
||||
//$wood: image-url('textures/wood001-vertical.jpg')
|
||||
$wood: image-url('textures/theme1.jpg')
|
||||
$background-brown: #57351f
|
||||
|
||||
@@ -4,7 +4,7 @@ header.top-menu
|
||||
background-repeat: no-repeat, no-repeat
|
||||
background-position: left bottom, right bottom
|
||||
background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png')
|
||||
color: $green
|
||||
color: $primary-color
|
||||
padding-left: 48px
|
||||
padding-right: 52px
|
||||
.menu-content
|
||||
|
||||
@@ -1,10 +1,4 @@
|
||||
//$qbrown: #634227
|
||||
$qbrown: #853d15
|
||||
$qbrown-active: lighten($qbrown, 20%)
|
||||
$green: #7BB459 //Heineken
|
||||
//$wood: image-url('textures/wood001-vertical.jpg')
|
||||
$wood: image-url('theme1/wall-bg.jpg')
|
||||
$background-brown: #57351f
|
||||
$current-color: #fc3
|
||||
$active-color: #f70
|
||||
$top-menu-height: 76px
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
.join-request-container
|
||||
.user-email
|
||||
.user-name
|
||||
padding-left: 12px
|
||||
.join-request-reject
|
||||
+button($bg: $secondary-color)
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
background-image: image-url('theme1/wall-bg.jpg')
|
||||
height: $top-menu-height
|
||||
.top-menu-bar
|
||||
color: $green
|
||||
color: $primary-color
|
||||
height: $top-menu-height
|
||||
background-image: image-url('theme1/button-bar-left.png'), image-url('theme1/button-bar-right.png')
|
||||
background-color: transparent
|
||||
|
||||
@@ -59,9 +59,11 @@
|
||||
|
||||
// We use these as default colors throughout
|
||||
// $primary-color: #008CBA;
|
||||
$primary-color: green
|
||||
// $primary-color: green
|
||||
$primary-color: #008349
|
||||
// $secondary-color: #e7e7e7;
|
||||
$secondary-color: #d7d7d7
|
||||
$alert-color: #ee3e41
|
||||
// $alert-color: #f04124;
|
||||
// $success-color: #43AC6A;
|
||||
// $warning-color: #f08a24;
|
||||
|
||||
Reference in New Issue
Block a user