Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Merge pull request #25 from MichaelEvans/master
Adds different style for user's own messages
  • Loading branch information
sgrove committed Jun 2, 2012
2 parents ee1359c + be27340 commit e84c1c2
Show file tree
Hide file tree
Showing 5 changed files with 25 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Gemfile
Expand Up @@ -3,6 +3,9 @@ source 'https://rubygems.org'
# Core gems
gem 'rails', '3.2.2'

group :development do
gem 'sqlite3'
end
# Database adapters
gem 'pg', '0.12.2'
# Uncomment this is you want to use sqlite locally
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Expand Up @@ -158,6 +158,7 @@ GEM
hike (~> 1.2)
rack (~> 1.0)
tilt (~> 1.1, != 1.3.0)
sqlite3 (1.3.6)
thin (1.3.1)
daemons (>= 1.0.9)
eventmachine (>= 0.12.6)
Expand Down Expand Up @@ -197,5 +198,6 @@ DEPENDENCIES
rails (= 3.2.2)
remotipart
sass-rails (~> 3.2.3)
sqlite3
thin
uglifier (>= 1.0.3)
4 changes: 4 additions & 0 deletions app/assets/javascripts/backbone/views/show_activity.js.coffee
Expand Up @@ -16,6 +16,10 @@ class Kandan.Views.ShowActivity extends Backbone.View
@compiledTemplate = Kandan.Helpers.Activities.buildFromMessageTemplate activity

$(@el).data("activity-id", activity.id)
if activity.action == "message" && activity.user.id == Kandan.Helpers.Users.currentUser().id
$(@el).addClass("current_user")


if activity.id == undefined
$(@el).attr("id", "activity-c#{activity.cid}")
else
Expand Down
2 changes: 2 additions & 0 deletions app/assets/stylesheets/_activity.sass
Expand Up @@ -56,3 +56,5 @@
height: 30px


.current_user
background-color: #F0F0F0
14 changes: 14 additions & 0 deletions config/database.yml
@@ -0,0 +1,14 @@
# Postgres settings
# #################
# development:
# adapter: postgresql
# host: localhost
# database: kandan_development
# pool: 5
# timeout: 5000

development:
adapter: sqlite3
database: db/development.sqlite3
pool: 5
timeout: 5000

0 comments on commit e84c1c2

Please sign in to comment.