diff --git a/ruby/lib/jam_ruby/models/music_session_history.rb b/ruby/lib/jam_ruby/models/music_session_history.rb index 29be1f4e1..b98d1d106 100644 --- a/ruby/lib/jam_ruby/models/music_session_history.rb +++ b/ruby/lib/jam_ruby/models/music_session_history.rb @@ -39,11 +39,14 @@ module JamRuby feed.music_session_history = self end + def like_count + self.likes.size + end + def comment_count self.comments.size end - def tracks tracks = [] self.music_session_user_histories.each do |msuh| diff --git a/web/app/assets/javascripts/web/recordings.js b/web/app/assets/javascripts/web/recordings.js index e942bcd5f..4644d5beb 100644 --- a/web/app/assets/javascripts/web/recordings.js +++ b/web/app/assets/javascripts/web/recordings.js @@ -53,12 +53,12 @@ shareDialog.showDialog(); }); - $("#txtRecordingComment", $scope).keypress(function(e) { - if (e.which === 13) { - addComment(); - $(this).val(''); - $(this).blur(); - } + $("#btnPostComment").click(function(e) { + if ($.trim($("#txtRecordingComment").val()).length > 0) { + addComment(); + $("#txtRecordingComment").val(''); + $("#txtRecordingComment").blur(); + } }); } else { diff --git a/web/app/assets/javascripts/web/sessions.js b/web/app/assets/javascripts/web/sessions.js index 05e79e7db..19f01c8d7 100644 --- a/web/app/assets/javascripts/web/sessions.js +++ b/web/app/assets/javascripts/web/sessions.js @@ -36,20 +36,18 @@ sessionId = musicSessionId; if (JK.currentUserId) { - var shareDialog = new JK.ShareDialog(context.JK.app, sessionId, "session"); - shareDialog.initialize(JK.FacebookHelperInstance); + var shareDialog = new JK.ShareDialog(context.JK.app, sessionId, "session"); + shareDialog.initialize(JK.FacebookHelperInstance); - $("#btnShare").click(function(e) { - shareDialog.showDialog(); - }); + $("#btnShare").click(function(e) { + shareDialog.showDialog(); + }); - $("#txtSessionComment").keypress(function(e) { - if (e.which === 13) { - addComment(); - $(this).val(''); - $(this).blur(); - } - }); + $("#btnPostComment").click(function(e) { + addComment(); + $(this).val(''); + $(this).blur(); + }); } else { $("#txtSessionComment").attr("disabled", "disabled"); diff --git a/web/app/assets/stylesheets/web/main.css.scss b/web/app/assets/stylesheets/web/main.css.scss index 7942f386d..c2ba9e1be 100644 --- a/web/app/assets/stylesheets/web/main.css.scss +++ b/web/app/assets/stylesheets/web/main.css.scss @@ -159,6 +159,19 @@ body.web { font-weight:bold; color:#ED3618; } + + .button-orange { + margin: 0px 8px 0px 8px; + background-color: #ED3618; + border: solid 1px #F27861; + outline: solid 2px #ED3618; + padding: 3px 10px; + font-size: 12px; + font-weight: 300; + cursor: pointer; + color: #FC9; + text-decoration: none; + } } .landing-comment-scroller { diff --git a/web/app/views/shared/_comments.html.erb b/web/app/views/shared/_comments.html.erb index 116c6bf51..c13f3559a 100644 --- a/web/app/views/shared/_comments.html.erb +++ b/web/app/views/shared/_comments.html.erb @@ -6,6 +6,9 @@
+
+ POST +