Skip to content
Extraits de code Groupes Projets
Valider 100d705c rédigé par MrZYX's avatar MrZYX
Parcourir les fichiers

fixed #992

parent b776bb52
Aucune branche associée trouvée
Aucune étiquette associée trouvée
Aucune requête de fusion associée trouvée
......@@ -2,7 +2,7 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
%a.conversation{:href => conversations_path(:conversation_id => conversation.id)}
%a.conversation{:href => conversation_path(conversation)}
.stream_element.conversation{:data=>{:guid=>conversation.id}, :class => ('unread' if unread_counts[conversation.id].to_i > 0)}
= person_image_tag(conversation.author)
......
......@@ -2,4 +2,5 @@
-# licensed under the Affero General Public License version 3 or later. See
-# the COPYRIGHT file.
= render 'show', :conversation => @conversation
Fichier déplacé
......@@ -8,12 +8,30 @@ $(document).ready(function(){
$('a.conversation').live('click', function(){
$.getScript(this.href);
history.pushState(null, "", this.href);
var conv = $(this).children('.stream_element'),
cBadge = $("#message_inbox_badge").children(".badge_count");
if(conv.hasClass('unread') ){
conv.removeClass('unread');
}
if(cBadge.html() != null) {
cBadge.html().replace(/\d+/, function(num){
num = parseInt(num);
cBadge.html(parseInt(num)-1);
if(num == 1) {
cBadge.addClass("hidden");
}
});
}
return false;
});
$(window).bind("popstate", function(){
$.getScript(location.href);
return false;
if (location.href.match(/conversations\/\d+/) != null) {
$.getScript(location.href);
return false;
}
});
resize();
......
0% Chargement en cours ou .
You are about to add 0 people to the discussion. Proceed with caution.
Terminez d'abord l'édition de ce message.
Veuillez vous inscrire ou vous pour commenter