|
|
@ -32,7 +32,7 @@ function openModal( modalClass ) |
|
|
|
function closeModal($this) |
|
|
|
function closeModal($this) |
|
|
|
{ |
|
|
|
{ |
|
|
|
closeModalHandler($this); |
|
|
|
closeModalHandler($this); |
|
|
|
window.location.hash = ''; |
|
|
|
window.location.hash = '#'; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function closeModalHandler($this) |
|
|
|
function closeModalHandler($this) |
|
|
@ -50,6 +50,45 @@ function closeModalHandler($this) |
|
|
|
}); |
|
|
|
}); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openPrompt( modalClass ) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var $oldModal = $("body").children(".prompt-wrapper"); |
|
|
|
|
|
|
|
var $template = $( "#templates" ); |
|
|
|
|
|
|
|
var $templateModal = $template.find( ".prompt-wrapper" ).clone(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$templateModal.addClass( modalClass ); |
|
|
|
|
|
|
|
if( $oldModal.length ) { |
|
|
|
|
|
|
|
$templateModal.show(); |
|
|
|
|
|
|
|
$oldModal.replaceWith($templateModal); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
$templateModal.prependTo( "body" ).fadeIn( "fast" ); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
//escondo o overflow da tela
|
|
|
|
|
|
|
|
var $body = $( "body" ); |
|
|
|
|
|
|
|
$body.css({ |
|
|
|
|
|
|
|
"overflow": "hidden" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function closePrompt() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
var $body = $( "body" ); |
|
|
|
|
|
|
|
var $modalWindows = $( "body" ).children( ".prompt-wrapper" ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$modalWindows.fadeOut( "fast", function() |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$modalWindows.detach(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
$body.css({ |
|
|
|
|
|
|
|
"overflow": "auto", |
|
|
|
|
|
|
|
"margin-right": "0" |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { |
|
|
|
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { |
|
|
|
networkUpdate(function(args) { |
|
|
|
networkUpdate(function(args) { |
|
|
|
if( !twisterdConnectedAndUptodate ) { |
|
|
|
if( !twisterdConnectedAndUptodate ) { |
|
|
@ -102,26 +141,6 @@ function newProfileModal(username) { |
|
|
|
return profileModalContent; |
|
|
|
return profileModalContent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function openProfileModal(e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $this = $( this ); |
|
|
|
|
|
|
|
var username = $.MAL.urlToUser( $this.attr("href") ); |
|
|
|
|
|
|
|
openProfileModalWithUsername(username); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openProfileModalWithUsername(username) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
if(!username) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
alert(polyglot.t("You don't have any profile because you are not logged in.")); |
|
|
|
|
|
|
|
return; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
window.location.hash = '#profile?user=' + username; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openProfileModalWithUsernameHandler(username) |
|
|
|
function openProfileModalWithUsernameHandler(username) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var profileModalClass = "profile-modal"; |
|
|
|
var profileModalClass = "profile-modal"; |
|
|
@ -137,9 +156,7 @@ function openProfileModalWithUsernameHandler(username) |
|
|
|
if(followingUsers.indexOf(username) != -1){ |
|
|
|
if(followingUsers.indexOf(username) != -1){ |
|
|
|
$('.profile-card button.dinamicFollowButton').first().addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){ |
|
|
|
$('.profile-card button.dinamicFollowButton').first().addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){ |
|
|
|
unfollow(username); |
|
|
|
unfollow(username); |
|
|
|
closeModal($(this)); |
|
|
|
window.setTimeout("loadModalFromHash();",500); |
|
|
|
// delay reload so dhtput may do it's job
|
|
|
|
|
|
|
|
window.setTimeout("location.reload();",500); |
|
|
|
|
|
|
|
}); |
|
|
|
}); |
|
|
|
} else { |
|
|
|
} else { |
|
|
|
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow ); |
|
|
|
$('.profile-card button.dinamicFollowButton').first().addClass('follow').text(polyglot.t('Follow')).on('click', userClickFollow ); |
|
|
@ -162,21 +179,6 @@ function newHashtagModal(hashtag) { |
|
|
|
return hashtagModalContent; |
|
|
|
return hashtagModalContent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function openHashtagModal(e) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $this = $( this ); |
|
|
|
|
|
|
|
var hashtag = $this.text().substring(1).toLowerCase(); |
|
|
|
|
|
|
|
openHashtagModalFromSearch(hashtag); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openHashtagModalFromSearch(hashtag) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
window.location.hash = '#hashtag?hashtag=' + encodeURIComponent(hashtag); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function openHashtagModalFromSearchHandler(hashtag) |
|
|
|
function openHashtagModalFromSearchHandler(hashtag) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var hashtagModalClass = "hashtag-modal"; |
|
|
|
var hashtagModalClass = "hashtag-modal"; |
|
|
@ -253,13 +255,8 @@ function newFollowingModal(username) { |
|
|
|
return followingModalContent; |
|
|
|
return followingModalContent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function openFollowingModal(e) |
|
|
|
function openFollowingModal(username) |
|
|
|
{ |
|
|
|
{ |
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var $this = $( this ); |
|
|
|
|
|
|
|
var username = $.MAL.followingUrlToUser( $this.attr("href") ); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var followingModalClass = "following-modal"; |
|
|
|
var followingModalClass = "following-modal"; |
|
|
|
openModal( followingModalClass ); |
|
|
|
openModal( followingModalClass ); |
|
|
@ -325,9 +322,7 @@ function fillWhoToFollowModal(list, hlist, start) { |
|
|
|
return true; |
|
|
|
return true; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function openWhoToFollowModal(e) { |
|
|
|
function openWhoToFollowModal() { |
|
|
|
e.stopPropagation(); |
|
|
|
|
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var whoToFollowModalClass = "who-to-follow-modal"; |
|
|
|
var whoToFollowModalClass = "who-to-follow-modal"; |
|
|
|
openModal( whoToFollowModalClass ); |
|
|
|
openModal( whoToFollowModalClass ); |
|
|
@ -349,62 +344,113 @@ function openWhoToFollowModal(e) { |
|
|
|
$( "." + whoToFollowModalClass + " h3" ).text( polyglot.t("Who to Follow") ); |
|
|
|
$( "." + whoToFollowModalClass + " h3" ).text( polyglot.t("Who to Follow") ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function newConversationModal(postLi) { |
|
|
|
function newConversationModal(username,resource) { |
|
|
|
|
|
|
|
|
|
|
|
var hashtagModalContent = $( "#hashtag-modal-template" ).children().clone(true); |
|
|
|
var hashtagModalContent = $( "#hashtag-modal-template" ).children().clone(true); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
requestPost(hashtagModalContent.find(".postboard-posts"),username,resource, |
|
|
|
|
|
|
|
function(args){ |
|
|
|
|
|
|
|
postLi=args.hashtagModalContent.find(".postboard-posts").children().first(); |
|
|
|
|
|
|
|
postLi.css('display','none'); |
|
|
|
|
|
|
|
getTopPostOfConversation(postLi,null,args.hashtagModalContent.find(".postboard-posts")); |
|
|
|
|
|
|
|
},{ hashtagModalContent:hashtagModalContent } |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
hashtagModalContent.find( ".postboard-news").click(function (){ |
|
|
|
hashtagModalContent.find( ".postboard-news").click(function (){ |
|
|
|
$(this).hide(); |
|
|
|
$(this).hide(); |
|
|
|
displayHashtagPending($(".conversation-modal .postboard-posts")); |
|
|
|
displayHashtagPending($(".conversation-modal .postboard-posts")); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
getTopPostOfConversation(postLi, null, hashtagModalContent.find(".postboard-posts")); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return hashtagModalContent; |
|
|
|
return hashtagModalContent; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function openConversationModal(e) |
|
|
|
function openConversationClick(e){ |
|
|
|
{ |
|
|
|
|
|
|
|
e.stopPropagation(); |
|
|
|
e.stopPropagation(); |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
|
|
|
|
|
|
|
|
var $this = $( this ); |
|
|
|
var $this = $( this ); |
|
|
|
var postLi = $this.parents(".module.post.original.open").find('.module.post.original'); |
|
|
|
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) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
var conversationModalClass = "conversation-modal"; |
|
|
|
var conversationModalClass = "conversation-modal"; |
|
|
|
openModal( conversationModalClass ); |
|
|
|
openModal( conversationModalClass ); |
|
|
|
//$( "." + threadingModalClass ).attr("data-resource","hashtag");
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var hashtagModalContent = newConversationModal( postLi ); |
|
|
|
var conversationModalContent = newConversationModal(username,resource); |
|
|
|
hashtagModalContent.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} ) ); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function watchHashChange(e) |
|
|
|
function watchHashChange(e) |
|
|
|
{ |
|
|
|
{ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(e!=null){ |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var prevurlsplit = e.oldURL.split('#'); |
|
|
|
|
|
|
|
var prevhashstring=prevurlsplit[1]; |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
var notFirstModalView=(prevhashstring!=undefined && prevhashstring.length>0 ); |
|
|
|
|
|
|
|
var notNavigatedBackToFirstModalView=(window.history.state==null || ( window.history.state!=null && window.history.state.showCloseButton!=false ) ) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if(notFirstModalView && notNavigatedBackToFirstModalView ) ){ |
|
|
|
|
|
|
|
$('.modal-back').css('display','inline'); |
|
|
|
|
|
|
|
} else { |
|
|
|
|
|
|
|
window.history.pushState({showCloseButton:false},null,null); |
|
|
|
|
|
|
|
$('.modal-back').css('display','none'); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
loadModalFromHash(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
function loadModalFromHash(){ |
|
|
|
|
|
|
|
|
|
|
|
var hashstring = window.location.hash |
|
|
|
var hashstring = window.location.hash |
|
|
|
hashstring = decodeURIComponent(hashstring); |
|
|
|
hashstring = decodeURIComponent(hashstring); |
|
|
|
|
|
|
|
|
|
|
|
var hashdata = hashstring.split(':'); |
|
|
|
var hashdata = hashstring.split(':'); |
|
|
|
if (hashdata[0] != '#web+twister') { |
|
|
|
if (hashdata[0] != '#web+twister') { |
|
|
|
hashdata = hashstring.match(/(hashtag|profile|mentions)\?(?:user|hashtag)=(.+)/); |
|
|
|
hashdata = hashstring.match(/(hashtag|profile|mentions|directmessages|following|conversation)\?(?:user|hashtag|post)=(.+)/); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (hashdata && hashdata[1] != undefined && hashdata[2] != undefined) |
|
|
|
if (hashdata && hashdata[1] != undefined && hashdata[2] != undefined) { |
|
|
|
{ |
|
|
|
|
|
|
|
if(hashdata[1] == 'profile') { |
|
|
|
if(hashdata[1] == 'profile') { |
|
|
|
openProfileModalWithUsernameHandler(hashdata[2]); |
|
|
|
openProfileModalWithUsernameHandler(hashdata[2]); |
|
|
|
}else if (hashdata[1] == 'hashtag') { |
|
|
|
}else if (hashdata[1] == 'hashtag') { |
|
|
|
openHashtagModalFromSearchHandler(hashdata[2]); |
|
|
|
openHashtagModalFromSearchHandler(hashdata[2]); |
|
|
|
}else if (hashdata[1] == 'mentions') { |
|
|
|
}else if (hashdata[1] == 'mentions') { |
|
|
|
openMentionsModalHandler(hashdata[2]); |
|
|
|
openMentionsModalHandler(hashdata[2]); |
|
|
|
|
|
|
|
}else if (hashdata[1] == 'directmessages') { |
|
|
|
|
|
|
|
openDmWithUserModal(hashdata[2]); |
|
|
|
|
|
|
|
}else if (hashdata[1] == 'following') { |
|
|
|
|
|
|
|
openFollowingModal(hashdata[2]); |
|
|
|
|
|
|
|
}else if (hashdata[1] == 'conversation') { |
|
|
|
|
|
|
|
splithashdata2=hashdata[2].split(':') |
|
|
|
|
|
|
|
//console.log('username='+splithashdata2[0]+' resource='+splithashdata2[1]);
|
|
|
|
|
|
|
|
openConversationModal(splithashdata2[0],splithashdata2[1]); |
|
|
|
} |
|
|
|
} |
|
|
|
} else { |
|
|
|
} else if (hashstring == '#directmessages') { |
|
|
|
|
|
|
|
directMessagesPopup(); |
|
|
|
|
|
|
|
} else if (hashstring == '#whotofollow'){ |
|
|
|
|
|
|
|
openWhoToFollowModal(); |
|
|
|
|
|
|
|
} else{ |
|
|
|
closeModalHandler(); |
|
|
|
closeModalHandler(); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function initHashWatching() |
|
|
|
function initHashWatching() |
|
|
|
{ |
|
|
|
{ |
|
|
@ -419,7 +465,8 @@ function initHashWatching() |
|
|
|
|
|
|
|
|
|
|
|
// Register hash spy and launch it once
|
|
|
|
// Register hash spy and launch it once
|
|
|
|
window.addEventListener('hashchange', watchHashChange, false); |
|
|
|
window.addEventListener('hashchange', watchHashChange, false); |
|
|
|
watchHashChange(null); |
|
|
|
//watchHashChange(null);
|
|
|
|
|
|
|
|
window.location.hash="#"; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@ -437,7 +484,7 @@ var reTwistPopup = function( e ) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
var reTwistClass = "reTwist"; |
|
|
|
var reTwistClass = "reTwist"; |
|
|
|
openModal( reTwistClass ); |
|
|
|
openPrompt( reTwistClass ); |
|
|
|
|
|
|
|
|
|
|
|
//título do modal
|
|
|
|
//título do modal
|
|
|
|
$( ".reTwist h3" ).text( polyglot.t("retransmit_this") ); |
|
|
|
$( ".reTwist h3" ).text( polyglot.t("retransmit_this") ); |
|
|
@ -453,7 +500,7 @@ var reTwistPopup = function( e ) |
|
|
|
var replyInitPopup = function(e, post) |
|
|
|
var replyInitPopup = function(e, post) |
|
|
|
{ |
|
|
|
{ |
|
|
|
var replyClass = "reply"; |
|
|
|
var replyClass = "reply"; |
|
|
|
openModal( replyClass ); |
|
|
|
openPrompt( replyClass ); |
|
|
|
|
|
|
|
|
|
|
|
//título do modal
|
|
|
|
//título do modal
|
|
|
|
var fullname = post.find(".post-info-name").text(); |
|
|
|
var fullname = post.find(".post-info-name").text(); |
|
|
@ -1253,7 +1300,13 @@ var postSubmit = function(e, oldLastPostId) |
|
|
|
var remainingCount = tweetForm.find(".post-area-remaining"); |
|
|
|
var remainingCount = tweetForm.find(".post-area-remaining"); |
|
|
|
remainingCount.text(140); |
|
|
|
remainingCount.text(140); |
|
|
|
$replyText.attr("placeholder", "Your message was sent!"); |
|
|
|
$replyText.attr("placeholder", "Your message was sent!"); |
|
|
|
closeModal($this); |
|
|
|
|
|
|
|
|
|
|
|
if ($this.parents('.modal-wrapper').length) { |
|
|
|
|
|
|
|
closeModal($this); |
|
|
|
|
|
|
|
} else if ($this.parents('.prompt-wrapper').length) { |
|
|
|
|
|
|
|
closePrompt(); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if($this.closest('.post-area,.post-reply-content')){ |
|
|
|
if($this.closest('.post-area,.post-reply-content')){ |
|
|
|
$('.post-area-new').removeClass('open').find('textarea').blur(); |
|
|
|
$('.post-area-new').removeClass('open').find('textarea').blur(); |
|
|
|
}; |
|
|
|
}; |
|
|
@ -1269,11 +1322,11 @@ var retweetSubmit = function(e) |
|
|
|
e.preventDefault(); |
|
|
|
e.preventDefault(); |
|
|
|
var $this = $( this ); |
|
|
|
var $this = $( this ); |
|
|
|
|
|
|
|
|
|
|
|
var $postOrig = $this.closest(".modal-wrapper").find(".post-data"); |
|
|
|
var $postOrig = $this.closest(".prompt-wrapper").find(".post-data"); |
|
|
|
|
|
|
|
|
|
|
|
newRtMsg($postOrig); |
|
|
|
newRtMsg($postOrig); |
|
|
|
|
|
|
|
|
|
|
|
closeModal($this); |
|
|
|
closePrompt(); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function changeStyle() { |
|
|
|
function changeStyle() { |
|
|
@ -1349,24 +1402,33 @@ function replaceDashboards() { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
$( ".who-to-follow .refresh-users" ).bind( "click", refreshWhoToFollow ); |
|
|
|
$( ".who-to-follow .refresh-users" ).bind( "click", refreshWhoToFollow ); |
|
|
|
$( ".who-to-follow .view-all-users" ).bind( "click", openWhoToFollowModal ); |
|
|
|
//$( ".who-to-follow .view-all-users" ).bind( "click", function(){window.location.hash = "#whotofollow"} );
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
function initInterfaceCommon() { |
|
|
|
function initInterfaceCommon() { |
|
|
|
$( "body" ).on( "click", function(event) { |
|
|
|
$( "body" ).on( "click", function(event) { |
|
|
|
if($(event.target).hasClass('cancel')) closeModal($(this)); |
|
|
|
if($(event.target).hasClass('cancel')) closeModal($(this)); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
$(".cancel").on('click', function(event){ |
|
|
|
$(".cancel").on('click', function(event){ |
|
|
|
if(!$(event.target).hasClass("cancel")) return; |
|
|
|
if(!$(event.target).hasClass("cancel")) return; |
|
|
|
if($(".modal-content").attr("style") != undefined){$(".modal-content").removeAttr("style")}; |
|
|
|
if($(".modal-content").attr("style") != undefined){$(".modal-content").removeAttr("style")}; |
|
|
|
$('.modal-back').css('display', 'none'); |
|
|
|
$('.modal-back').css('display', 'none'); |
|
|
|
$('.mark-all-as-read').css('display', 'none'); |
|
|
|
$('.mark-all-as-read').css('display', 'none'); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
$(".prompt-close").on('click', function(event){ |
|
|
|
|
|
|
|
closePrompt(); |
|
|
|
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/* |
|
|
|
$('.modal-back').on('click', function(){ |
|
|
|
$('.modal-back').on('click', function(){ |
|
|
|
if($('.modal-content .direct-messages-list')[0]) return; |
|
|
|
if($('.modal-content .direct-messages-list')[0]) return; |
|
|
|
directMessagesPopup(); |
|
|
|
directMessagesPopup(); |
|
|
|
$(".modal-content").removeAttr("style"); |
|
|
|
$(".modal-content").removeAttr("style"); |
|
|
|
}); |
|
|
|
}); |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
|
|
|
|
$('.dropdown-menu').on('keydown', function(e){ |
|
|
|
$('.dropdown-menu').on('keydown', function(e){ |
|
|
|
e = event || window.event; |
|
|
|
e = event || window.event; |
|
|
|
e.stopPropagation(); |
|
|
|
e.stopPropagation(); |
|
|
@ -1385,7 +1447,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"); |
|
|
@ -1395,9 +1457,9 @@ function initInterfaceCommon() { |
|
|
|
var $replyText = $( ".post-area-new textarea" ); |
|
|
|
var $replyText = $( ".post-area-new textarea" ); |
|
|
|
$replyText.on("keyup", replyTextKeypress ); |
|
|
|
$replyText.on("keyup", replyTextKeypress ); |
|
|
|
|
|
|
|
|
|
|
|
$( ".open-profile-modal").bind( "click", openProfileModal ); |
|
|
|
$( ".open-profile-modal").bind( "click", function(e){ e.stopPropagation(); } ); |
|
|
|
$( ".open-hashtag-modal").bind( "click", openHashtagModal ); |
|
|
|
//$( ".open-hashtag-modal").bind( "click", openHashtagModal );
|
|
|
|
$( ".open-following-modal").bind( "click", openFollowingModal ); |
|
|
|
//$( ".open-following-modal").bind( "click", openFollowingModal );
|
|
|
|
$( ".userMenu-connections a").bind( "click", openMentionsModal ); |
|
|
|
$( ".userMenu-connections a").bind( "click", openMentionsModal ); |
|
|
|
$( ".mentions-from-user").bind( "click", openMentionsModal ); |
|
|
|
$( ".mentions-from-user").bind( "click", openMentionsModal ); |
|
|
|
|
|
|
|
|
|
|
|