Replace JQuery slide with transition
Conflicts: app/assets/javascripts/inbox.js app/assets/stylesheets/conversations.css.scss
This commit is contained in:
parent
2328f64d56
commit
e2a591249a
3 changed files with 25 additions and 12 deletions
|
|
@ -5,8 +5,6 @@ app.views.Conversations = Backbone.View.extend({
|
||||||
el: "#conversations_container",
|
el: "#conversations_container",
|
||||||
|
|
||||||
events: {
|
events: {
|
||||||
"mouseenter .stream_element.conversation" : "showParticipants",
|
|
||||||
"mouseleave .stream_element.conversation" : "hideParticipants",
|
|
||||||
"conversation:loaded" : "setupConversation"
|
"conversation:loaded" : "setupConversation"
|
||||||
},
|
},
|
||||||
|
|
||||||
|
|
@ -45,14 +43,6 @@ app.views.Conversations = Backbone.View.extend({
|
||||||
} else {
|
} else {
|
||||||
$("html").animate({scrollTop:0});
|
$("html").animate({scrollTop:0});
|
||||||
}
|
}
|
||||||
},
|
|
||||||
|
|
||||||
hideParticipants: function(e){
|
|
||||||
$(e.currentTarget).find('.participants').slideUp('300');
|
|
||||||
},
|
|
||||||
|
|
||||||
showParticipants: function(e){
|
|
||||||
$(e.currentTarget).find('.participants').slideDown('300');
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
// @license-end
|
// @license-end
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,24 @@
|
||||||
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
// @license magnet:?xt=urn:btih:0b31508aeb0634b347b8270c7bee4d411b5d4109&dn=agpl-3.0.txt AGPL-v3-or-Later
|
||||||
$(document).ready(function(){
|
$(document).ready(function(){
|
||||||
|
|
||||||
|
if ($('#first_unread').length > 0) {
|
||||||
|
$("html").scrollTop($('#first_unread').offset().top-45);
|
||||||
|
}
|
||||||
|
|
||||||
|
$('time.timeago').each(function(i,e) {
|
||||||
|
var jqe = $(e);
|
||||||
|
jqe.attr('data-original-title', new Date(jqe.attr('datetime')).toLocaleString());
|
||||||
|
jqe.attr('title', '');
|
||||||
|
});
|
||||||
|
|
||||||
|
$('.timeago').tooltip();
|
||||||
|
$('.timeago').timeago();
|
||||||
|
|
||||||
|
$('time.timeago').each(function(i,e) {
|
||||||
|
var jqe = $(e);
|
||||||
|
jqe.attr('title', '');
|
||||||
|
});
|
||||||
|
|
||||||
$(document).on('click', '.conversation-wrapper', function(){
|
$(document).on('click', '.conversation-wrapper', function(){
|
||||||
var conversation_path = $(this).data('conversation-path');
|
var conversation_path = $(this).data('conversation-path');
|
||||||
$.getScript(conversation_path, function() {
|
$.getScript(conversation_path, function() {
|
||||||
|
|
|
||||||
|
|
@ -81,20 +81,24 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
.participants {
|
.participants {
|
||||||
display: none;
|
|
||||||
float: left;
|
float: left;
|
||||||
clear: both;
|
clear: both;
|
||||||
margin-top: 5px;
|
margin-top: 5px;
|
||||||
padding-top: 5px;
|
padding-top: 5px;
|
||||||
height: 25px;
|
height: 0;
|
||||||
width: 100%;
|
width: 100%;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
border-top: 1px dotted $border-grey;
|
border-top: 1px dotted $border-grey;
|
||||||
|
transition: height ease 300ms;
|
||||||
.avatar {
|
.avatar {
|
||||||
margin: 0 5px 0 0;
|
margin: 0 5px 0 0;
|
||||||
height: 25px;
|
height: 25px;
|
||||||
width: 25px;
|
width: 25px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.conversation & {
|
||||||
|
height: 25px;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
.img { line-height: 15px; }
|
.img { line-height: 15px; }
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue