From 7e810809ac62ed7c9572a9c47ae4a4c6ce0e82b0 Mon Sep 17 00:00:00 2001 From: Seth Call Date: Mon, 28 Jul 2014 23:15:39 -0500 Subject: [PATCH 01/55] * fixing up end time format in csv export --- admin/app/admin/score_export.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/admin/app/admin/score_export.rb b/admin/app/admin/score_export.rb index ddfcfaec5..2b223a531 100644 --- a/admin/app/admin/score_export.rb +++ b/admin/app/admin/score_export.rb @@ -13,7 +13,7 @@ ActiveAdmin.register_page "Download CSV" do end start_time = "#{start_time}" if end_time.blank? - end_time = Time.now + 1.days + end_time = (Time.now + 1.days).strftime('%F') else end_time = "#{end_time}" end From 95dcea9ca7eee5cd6f2b8719bb20695c169ab295 Mon Sep 17 00:00:00 2001 From: root Date: Tue, 29 Jul 2014 18:15:23 +0200 Subject: [PATCH 02/55] fixed issue #1632 #1954 --- pb/src/client_container.proto | 1 + ruby/lib/jam_ruby/message_factory.rb | 3 ++- ruby/lib/jam_ruby/models/notification.rb | 1 + web/app/assets/javascripts/notificationPanel.js | 6 ++++-- web/app/views/clients/_sidebar.html.erb | 4 ++-- 5 files changed, 10 insertions(+), 5 deletions(-) diff --git a/pb/src/client_container.proto b/pb/src/client_container.proto index 88bd060c2..a85e9e597 100644 --- a/pb/src/client_container.proto +++ b/pb/src/client_container.proto @@ -320,6 +320,7 @@ message SessionJoin { optional string photo_url = 2; optional string msg = 3; optional int32 track_changes_counter = 4; + optional string source_user_id = 5; } message SessionDepart { diff --git a/ruby/lib/jam_ruby/message_factory.rb b/ruby/lib/jam_ruby/message_factory.rb index 5ade15055..89c4670ff 100644 --- a/ruby/lib/jam_ruby/message_factory.rb +++ b/ruby/lib/jam_ruby/message_factory.rb @@ -395,10 +395,11 @@ module JamRuby ) end - def session_join(session_id, photo_url, msg, track_changes_counter) + def session_join(session_id, photo_url, source_user_id, msg, track_changes_counter) join = Jampb::SessionJoin.new( :session_id => session_id, :photo_url => photo_url, + :source_user_id => source_user_id, :msg => msg, :track_changes_counter => track_changes_counter ) diff --git a/ruby/lib/jam_ruby/models/notification.rb b/ruby/lib/jam_ruby/models/notification.rb index f8f59807d..e21e358c8 100644 --- a/ruby/lib/jam_ruby/models/notification.rb +++ b/ruby/lib/jam_ruby/models/notification.rb @@ -492,6 +492,7 @@ module JamRuby msg = @@message_factory.session_join( music_session.id, user.photo_url, + user.id, notification_msg, music_session.track_changes_counter ) diff --git a/web/app/assets/javascripts/notificationPanel.js b/web/app/assets/javascripts/notificationPanel.js index 6c43937f1..d16b674b0 100644 --- a/web/app/assets/javascripts/notificationPanel.js +++ b/web/app/assets/javascripts/notificationPanel.js @@ -218,9 +218,11 @@ hoveraction: val.session_id ? "session" : "", avatar_url: context.JK.resolveAvatarUrl(val.photo_url), text: val.formatted_msg, - date: $.timeago(val.created_at) + date: $.timeago(val.created_at), + userId: val.source_user_id }); - + + console.log(val); $list.append(notificationHtml); // val.description contains the notification record's description value from the DB (i.e., type) diff --git a/web/app/views/clients/_sidebar.html.erb b/web/app/views/clients/_sidebar.html.erb index fe6d75fe4..22e525d56 100644 --- a/web/app/views/clients/_sidebar.html.erb +++ b/web/app/views/clients/_sidebar.html.erb @@ -208,8 +208,8 @@ + + \ No newline at end of file diff --git a/web/app/views/clients/_musicians.html.erb b/web/app/views/clients/_musicians.html.erb index bbb81888e..df1b044b4 100644 --- a/web/app/views/clients/_musicians.html.erb +++ b/web/app/views/clients/_musicians.html.erb @@ -23,7 +23,7 @@ <% end -%> -