Browse Source

working hashscheme for conversation modal

master
Julian Steinwachs 10 years ago
parent
commit
a688dc5958
  1. 36
      js/interface_common.js

36
js/interface_common.js

@ -376,10 +376,9 @@ function newConversationModal(username,resource) {
requestPost(hashtagModalContent.find(".postboard-posts"),username,resource, requestPost(hashtagModalContent.find(".postboard-posts"),username,resource,
function(args){ function(args){
getTopPostOfConversation(args.hashtagModalContent.find(".postboard-posts").first(), postLi=args.hashtagModalContent.find(".postboard-posts").children().first();
null, postLi.css('display','none');
args.hashtagModalContent.find(".postboard-posts") getTopPostOfConversation(postLi,null,args.hashtagModalContent.find(".postboard-posts"));
);
},{ hashtagModalContent:hashtagModalContent } },{ hashtagModalContent:hashtagModalContent }
); );
@ -391,25 +390,32 @@ function newConversationModal(username,resource) {
return hashtagModalContent; return hashtagModalContent;
} }
function openConversationClick(e){
e.stopPropagation();
e.preventDefault();
var $this = $( this );
var postLi = $this.parents(".module.post.original.open").find('.module.post.original');
var username=postLi.find('.post-data').attr('data-screen-name');
var resource='post'+postLi.find('.post-data').attr('data-id');
window.location.hash="#conversation?post="+username+':'+resource;
}
function openConversationModal(username,resource) function openConversationModal(username,resource)
{ {
//e.stopPropagation();
//e.preventDefault();
//var $this = $( this );
//var postLi = $this.parents(".module.post.original.open").find('.module.post.original');
var conversationModalClass = "conversation-modal"; var conversationModalClass = "conversation-modal";
openModal( conversationModalClass ); openModal( conversationModalClass );
//$( "." + threadingModalClass ).attr("data-resource","hashtag");
var conversationModalContent = newConversationModal(username,resource); var conversationModalContent = newConversationModal(username,resource);
conversationModalContent.appendTo("." + conversationModalClass + " .modal-content"); conversationModalContent.appendTo("." + conversationModalClass + " .modal-content");
//título do modal //título do modal
//$( "." + conversationModalClass + " h3" ).text( polyglot.t('conversation_title', {'username': postLi.find('.post-data').attr('data-screen-name')}) ); $( "." + conversationModalClass + " h3" ).text( polyglot.t('conversation_title', {'username': username} ) );
} }
@ -1470,7 +1476,7 @@ function initInterfaceCommon() {
$( ".post-area-new" ).clickoutside( unfocusThis ); $( ".post-area-new" ).clickoutside( unfocusThis );
$( ".post-submit").click( postSubmit ); $( ".post-submit").click( postSubmit );
$( ".modal-propagate").click( retweetSubmit ); $( ".modal-propagate").click( retweetSubmit );
$( ".expanded-content .show-more").bind('click', openConversationModal); $( ".expanded-content .show-more").bind('click', openConversationClick);
if ($.Options.getUnicodeConversionOpt() === "disable") if ($.Options.getUnicodeConversionOpt() === "disable")
$( ".undo-unicode" ).click( undoLastUnicode ).css("display", "none"); $( ".undo-unicode" ).click( undoLastUnicode ).css("display", "none");

Loading…
Cancel
Save