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/ruby/lib/jam_ruby/models/recording.rb b/ruby/lib/jam_ruby/models/recording.rb index 8fc666e0f..7e8ea3ac9 100644 --- a/ruby/lib/jam_ruby/models/recording.rb +++ b/ruby/lib/jam_ruby/models/recording.rb @@ -40,6 +40,14 @@ module JamRuby self.band_id = nil if self.band_id == '' end + def like_count + self.likes.size + end + + def play_count + self.plays.size + end + def comment_count self.comments.size end diff --git a/web/app/assets/images/content/icon_instrument_piano24.png b/web/app/assets/images/content/icon_instrument_piano24.png new file mode 100644 index 000000000..6f5761df9 Binary files /dev/null and b/web/app/assets/images/content/icon_instrument_piano24.png differ diff --git a/web/app/assets/images/content/icon_instrument_piano45.png b/web/app/assets/images/content/icon_instrument_piano45.png new file mode 100644 index 000000000..5d44d4420 Binary files /dev/null and b/web/app/assets/images/content/icon_instrument_piano45.png differ diff --git a/web/app/assets/images/content/icon_instrument_upright_bass24.png b/web/app/assets/images/content/icon_instrument_upright_bass24.png new file mode 100644 index 000000000..c054f32ad Binary files /dev/null and b/web/app/assets/images/content/icon_instrument_upright_bass24.png differ diff --git a/web/app/assets/images/content/icon_instrument_upright_bass45.png b/web/app/assets/images/content/icon_instrument_upright_bass45.png new file mode 100644 index 000000000..7c2b8e1d1 Binary files /dev/null and b/web/app/assets/images/content/icon_instrument_upright_bass45.png differ diff --git a/web/app/assets/images/shared/icon_piano_256.png b/web/app/assets/images/shared/icon_piano_256.png new file mode 100644 index 000000000..b2f63670f Binary files /dev/null and b/web/app/assets/images/shared/icon_piano_256.png differ diff --git a/web/app/assets/images/shared/icon_upright_bass_256.png b/web/app/assets/images/shared/icon_upright_bass_256.png new file mode 100644 index 000000000..c5373a215 Binary files /dev/null and b/web/app/assets/images/shared/icon_upright_bass_256.png differ diff --git a/web/app/assets/javascripts/utils.js b/web/app/assets/javascripts/utils.js index 1d77bca84..b3e27859e 100644 --- a/web/app/assets/javascripts/utils.js +++ b/web/app/assets/javascripts/utils.js @@ -59,13 +59,13 @@ "mandolin":"mandolin", "oboe":"oboe", "other":"other", - "piano":"keyboard", + "piano":"piano", "saxophone":"saxophone", "trombone":"trombone", "trumpet":"trumpet", "tuba":"tuba", "ukulele":"ukelele", - "upright bass":"cello", + "upright bass":"upright_bass", "viola":"viola", "violin":"violin", "voice":"voice" 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..7a95a05e8 100644 --- a/web/app/assets/javascripts/web/sessions.js +++ b/web/app/assets/javascripts/web/sessions.js @@ -43,12 +43,12 @@ shareDialog.showDialog(); }); - $("#txtSessionComment").keypress(function(e) { - if (e.which === 13) { - addComment(); - $(this).val(''); - $(this).blur(); - } + $("#btnPostComment").click(function(e) { + if ($.trim($("#txtSessionComment").val()).length > 0) { + addComment(); + $("#txtSessionComment").val(''); + $("#txtSessionComment").blur(); + } }); } else { 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 +

diff --git a/web/app/views/shared/_landing_sidebar.html.erb b/web/app/views/shared/_landing_sidebar.html.erb index c7ddd78d4..ab14d09fc 100644 --- a/web/app/views/shared/_landing_sidebar.html.erb +++ b/web/app/views/shared/_landing_sidebar.html.erb @@ -10,7 +10,7 @@
RECORDING: - Test + Test
<% elsif history_record.instance_of? MusicSessionHistory %>