add POST button to landing pages for comments, add like_count back to session model
This commit is contained in:
parent
f388f1c7e2
commit
c95a650cdc
|
|
@ -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|
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -6,6 +6,9 @@
|
|||
<div class="left w80 p10">
|
||||
<textarea id="<%= id %>" class="w100 p5 f15" rows="2" placeholder="Enter a comment..."></textarea>
|
||||
</div>
|
||||
<div class="right mr20">
|
||||
<a href="#" id="btnPostComment" class="button-orange">POST</a>
|
||||
</div>
|
||||
<br clear="all" />
|
||||
|
||||
<div class="landing-comment-scroller">
|
||||
|
|
|
|||
Loading…
Reference in New Issue