mirror of
https://github.com/twisterarmy/twister-html.git
synced 2025-01-27 23:24:26 +00:00
commit
6e30563abb
@ -748,17 +748,18 @@ textarea.splited-post {
|
|||||||
.twister-user-remove:hover{
|
.twister-user-remove:hover{
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
.follow
|
|
||||||
{
|
.follow, .unfollow {
|
||||||
background: none;
|
background: none;
|
||||||
border: solid 1px rgba( 0, 0, 0 ,.2 );
|
border: solid 1px rgba( 0, 0, 0 ,.2 );
|
||||||
padding: 3px 15px;
|
padding: 3px 15px;
|
||||||
color: rgba( 0, 0, 0 ,.4 );
|
color: rgba( 0, 0, 0 ,.4 );
|
||||||
}
|
}
|
||||||
.follow:hover
|
|
||||||
{
|
.follow:hover, .unfollow:hover {
|
||||||
color: rgba( 0, 0, 0 ,.7 );
|
color: rgba( 0, 0, 0 ,.7 );
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-users,
|
.refresh-users,
|
||||||
.view-all-users
|
.view-all-users
|
||||||
{
|
{
|
||||||
@ -1559,7 +1560,7 @@ ol.toptrends-list {
|
|||||||
}
|
}
|
||||||
|
|
||||||
.prompt-wrapper .modal-header h3{
|
.prompt-wrapper .modal-header h3{
|
||||||
background: #45474D;
|
background: #E34F42;
|
||||||
}
|
}
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
|
@ -314,6 +314,20 @@
|
|||||||
</div>
|
</div>
|
||||||
<!-- TEMPLATE DO MODAL GENÉRICO END -->
|
<!-- TEMPLATE DO MODAL GENÉRICO END -->
|
||||||
|
|
||||||
|
<!-- TEMPLATE GENERAL PROMPT -->
|
||||||
|
<div class="prompt-wrapper">
|
||||||
|
<div class="modal-header">
|
||||||
|
<h3></h3>
|
||||||
|
<span class="modal-close prompt-close">×</span>
|
||||||
|
</div>
|
||||||
|
<div class="modal-content"></div>
|
||||||
|
<div class="modal-buttons">
|
||||||
|
<button class="modal-cancel prompt-close">Cancel</button>
|
||||||
|
<button class="modal-propagate">Retransmit</button>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
<!-- TEMPLATE GENERAL PROMPT END-->
|
||||||
|
|
||||||
<!-- MODAL DE RETWEET INIT -->
|
<!-- MODAL DE RETWEET INIT -->
|
||||||
<!-- MODAL DE RETWEET END -->
|
<!-- MODAL DE RETWEET END -->
|
||||||
|
|
||||||
|
@ -5,8 +5,11 @@
|
|||||||
// Profile, mentions and hashtag modal
|
// Profile, mentions and hashtag modal
|
||||||
// Post actions: submit, count characters
|
// Post actions: submit, count characters
|
||||||
|
|
||||||
|
var window_scrollY = 0;
|
||||||
|
|
||||||
//dispara o modal genérico
|
//dispara o modal genérico
|
||||||
//o modalClass me permite fazer tratamentos específicos de CSS para cada modal
|
//o modalClass me permite fazer tratamentos específicos de CSS para cada modal
|
||||||
|
|
||||||
function openModal( modalClass )
|
function openModal( modalClass )
|
||||||
{
|
{
|
||||||
var $oldModal = $("body").children(".modal-blackout");
|
var $oldModal = $("body").children(".modal-blackout");
|
||||||
@ -26,6 +29,8 @@ function openModal( modalClass )
|
|||||||
$body.css({
|
$body.css({
|
||||||
"overflow": "hidden"
|
"overflow": "hidden"
|
||||||
});
|
});
|
||||||
|
|
||||||
|
window_scrollY = window.pageYOffset;
|
||||||
}
|
}
|
||||||
|
|
||||||
//fecha o modal removendo o conteúdo por detach
|
//fecha o modal removendo o conteúdo por detach
|
||||||
@ -33,6 +38,7 @@ function closeModal($this)
|
|||||||
{
|
{
|
||||||
closeModalHandler($this);
|
closeModalHandler($this);
|
||||||
window.location.hash = '#';
|
window.location.hash = '#';
|
||||||
|
window.scroll(window.pageXOffset, window_scrollY);
|
||||||
}
|
}
|
||||||
|
|
||||||
function closeModalHandler($this)
|
function closeModalHandler($this)
|
||||||
@ -479,8 +485,7 @@ 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);
|
setTimeout(function(){ watchHashChange() }, 1000);
|
||||||
window.location.hash="#";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -544,18 +549,41 @@ var replyInitPopup = function(e, post)
|
|||||||
}
|
}
|
||||||
|
|
||||||
//abre o menu dropdown de configurações
|
//abre o menu dropdown de configurações
|
||||||
var dropDownMenu = function( e )
|
function dropDownMenu() {
|
||||||
{
|
$( ".config-menu" ).slideToggle( "fast" );
|
||||||
var $configMenu = $( ".config-menu" );
|
|
||||||
$configMenu.slideToggle( "fast" );
|
|
||||||
e.stopPropagation();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//fecha o config menu ao clicar em qualquer lugar da tela
|
//fecha o config menu ao clicar em qualquer lugar da tela
|
||||||
var closeThis = function()
|
function closeThis() {
|
||||||
{
|
|
||||||
$( this ).slideUp( "fast" );
|
$( this ).slideUp( "fast" );
|
||||||
};
|
}
|
||||||
|
|
||||||
|
function toggleFollowButton(button, followingUser) {
|
||||||
|
if (!button || !followingUser)
|
||||||
|
return;
|
||||||
|
|
||||||
|
button
|
||||||
|
.removeClass("follow")
|
||||||
|
.addClass("unfollow")
|
||||||
|
.unbind("click")
|
||||||
|
.bind("click",
|
||||||
|
(function(e) {
|
||||||
|
unfollow(this.toString(),
|
||||||
|
(function() {
|
||||||
|
this
|
||||||
|
.removeClass("unfollow")
|
||||||
|
.addClass("follow")
|
||||||
|
.unbind("click")
|
||||||
|
.bind("click", userClickFollow)
|
||||||
|
.text(polyglot.t('Follow'))
|
||||||
|
.trigger("toggleFollow");
|
||||||
|
}).bind($(e.target))
|
||||||
|
);
|
||||||
|
}).bind(followingUser)
|
||||||
|
)
|
||||||
|
.text(polyglot.t('Unfollow'))
|
||||||
|
.trigger("toggleUnfollow");
|
||||||
|
}
|
||||||
|
|
||||||
var postExpandFunction = function( e, postLi )
|
var postExpandFunction = function( e, postLi )
|
||||||
{
|
{
|
||||||
@ -1430,7 +1458,8 @@ function initInterfaceCommon() {
|
|||||||
$('.mark-all-as-read').css('display', 'none');
|
$('.mark-all-as-read').css('display', 'none');
|
||||||
});
|
});
|
||||||
|
|
||||||
$(".prompt-close").on('click', function(event){
|
$(".prompt-close").on('click', function(e){
|
||||||
|
e.stopPropagation();
|
||||||
closePrompt();
|
closePrompt();
|
||||||
});
|
});
|
||||||
|
|
||||||
@ -1451,10 +1480,11 @@ function initInterfaceCommon() {
|
|||||||
});
|
});
|
||||||
$( ".post-reply" ).bind( "click", postReplyClick );
|
$( ".post-reply" ).bind( "click", postReplyClick );
|
||||||
$( ".post-propagate" ).bind( "click", reTwistPopup );
|
$( ".post-propagate" ).bind( "click", reTwistPopup );
|
||||||
$( ".userMenu-config-dropdown" ).bind( "click", dropDownMenu );
|
$( ".userMenu-config" ).clickoutside( closeThis.bind($( ".config-menu" )) );
|
||||||
$( ".config-menu" ).clickoutside( closeThis );
|
$( ".userMenu-config-dropdown" ).click( dropDownMenu );
|
||||||
$( ".module.post" ).bind( "click", function(e) {
|
$( ".module.post" ).bind( "click", function(e) {
|
||||||
if(window.getSelection() == 0)postExpandFunction(e,$(this)); });
|
if(e.button === 0 && window.getSelection() == 0) postExpandFunction(e,$(this));
|
||||||
|
});
|
||||||
$( ".post-area-new" ).bind( "click", function(e) {
|
$( ".post-area-new" ).bind( "click", function(e) {
|
||||||
composeNewPost(e,$(this));} );
|
composeNewPost(e,$(this));} );
|
||||||
$( ".post-area-new" ).clickoutside( unfocusThis );
|
$( ".post-area-new" ).clickoutside( unfocusThis );
|
||||||
|
@ -132,9 +132,14 @@ var InterfaceFunctions = function()
|
|||||||
args.cbFunc(args.cbArg);
|
args.cbFunc(args.cbArg);
|
||||||
}, {cbFunc:cbFunc, cbArg:cbArg});
|
}, {cbFunc:cbFunc, cbArg:cbArg});
|
||||||
|
|
||||||
|
$(window)
|
||||||
|
.on("eventFollow", function(e, user) {
|
||||||
|
$(".following-count").text(followingUsers.length-1);
|
||||||
|
setTimeout('requestTimelineUpdate("latest",postsPerRefresh,["'+user+'"],promotedPostsOnly)', 1000);
|
||||||
|
})
|
||||||
|
.on("eventUnfollow", function(e, user) {
|
||||||
|
$(".following-count").text(followingUsers.length-1);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -314,6 +314,8 @@ if(preferredLanguage == "es"){
|
|||||||
"Favorite": "Favorito",
|
"Favorite": "Favorito",
|
||||||
"File APIs not supported in this browser.": "Los archivos API no compatibles con este navegador",
|
"File APIs not supported in this browser.": "Los archivos API no compatibles con este navegador",
|
||||||
"Follow": "Seguir",
|
"Follow": "Seguir",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Seguido por",
|
"Followed by": "Seguido por",
|
||||||
"followed_by": "Seguido por %{username}",
|
"followed_by": "Seguido por %{username}",
|
||||||
"Followers": "Seguidores",
|
"Followers": "Seguidores",
|
||||||
@ -556,6 +558,8 @@ if(preferredLanguage == "uk"){
|
|||||||
"Favorite": "Улюблені",
|
"Favorite": "Улюблені",
|
||||||
"File APIs not supported in this browser.": "File APIs не підтримуєтся цим браузером.",
|
"File APIs not supported in this browser.": "File APIs не підтримуєтся цим браузером.",
|
||||||
"Follow": "Підписатись",
|
"Follow": "Підписатись",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Підписаний на",
|
"Followed by": "Підписаний на",
|
||||||
"followed_by": "%{username} підписан",
|
"followed_by": "%{username} підписан",
|
||||||
"Followers": "Читачі",
|
"Followers": "Читачі",
|
||||||
@ -796,6 +800,8 @@ if(preferredLanguage == "zh"){
|
|||||||
"Favorite": "收藏",
|
"Favorite": "收藏",
|
||||||
"File APIs not supported in this browser.": "这个浏览器不支持文件APIs",
|
"File APIs not supported in this browser.": "这个浏览器不支持文件APIs",
|
||||||
"Follow": "关注",
|
"Follow": "关注",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "被关注",
|
"Followed by": "被关注",
|
||||||
"followed_by": "被 %{username} 关注",
|
"followed_by": "被 %{username} 关注",
|
||||||
"Followers": "粉丝",
|
"Followers": "粉丝",
|
||||||
@ -1036,6 +1042,8 @@ if(preferredLanguage == "nl"){
|
|||||||
"Favorite": "Favoriet",
|
"Favorite": "Favoriet",
|
||||||
"File APIs not supported in this browser.": "File APIs worden nie ondersteund in deze browser.",
|
"File APIs not supported in this browser.": "File APIs worden nie ondersteund in deze browser.",
|
||||||
"Follow": "Volgen",
|
"Follow": "Volgen",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Gevolgd door",
|
"Followed by": "Gevolgd door",
|
||||||
"followed_by": "Gevolgd door %{username}",
|
"followed_by": "Gevolgd door %{username}",
|
||||||
"Followers": "Volgers",
|
"Followers": "Volgers",
|
||||||
@ -1277,6 +1285,8 @@ if(preferredLanguage == "it"){
|
|||||||
"Favorite": "Preferito",
|
"Favorite": "Preferito",
|
||||||
"File APIs not supported in this browser.": "File APIs non supportati in questo browser.",
|
"File APIs not supported in this browser.": "File APIs non supportati in questo browser.",
|
||||||
"Follow": "Segui",
|
"Follow": "Segui",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Seguito da",
|
"Followed by": "Seguito da",
|
||||||
"followed_by": "Seguiti da %{username}",
|
"followed_by": "Seguiti da %{username}",
|
||||||
"Followers": "Lettori",
|
"Followers": "Lettori",
|
||||||
@ -1516,6 +1526,8 @@ if(preferredLanguage == "fr"){
|
|||||||
"Favorite": "Favori",
|
"Favorite": "Favori",
|
||||||
"File APIs not supported in this browser.": "L'API de fichiers n'est pas pris en charge dans votre navigateur.",
|
"File APIs not supported in this browser.": "L'API de fichiers n'est pas pris en charge dans votre navigateur.",
|
||||||
"Follow": "Suivre",
|
"Follow": "Suivre",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Suivi par",
|
"Followed by": "Suivi par",
|
||||||
"followed_by": "Suivi par %{username}",
|
"followed_by": "Suivi par %{username}",
|
||||||
"Followers": "Abonnés",
|
"Followers": "Abonnés",
|
||||||
@ -2007,6 +2019,8 @@ if(preferredLanguage == "de"){
|
|||||||
"Favorite": "Favorisieren",
|
"Favorite": "Favorisieren",
|
||||||
"File APIs not supported in this browser.": "File APIs werden von diesem Browser nicht unterstützt.",
|
"File APIs not supported in this browser.": "File APIs werden von diesem Browser nicht unterstützt.",
|
||||||
"Follow": "Folgen",
|
"Follow": "Folgen",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Gefolgt von",
|
"Followed by": "Gefolgt von",
|
||||||
"followed_by": "Gefolgt von %{username}",
|
"followed_by": "Gefolgt von %{username}",
|
||||||
"Followers": "Followers",
|
"Followers": "Followers",
|
||||||
@ -2249,6 +2263,8 @@ if(preferredLanguage == "ja"){
|
|||||||
"Favorite": "お気に入り",
|
"Favorite": "お気に入り",
|
||||||
"File APIs not supported in this browser.": "利用しているブラウザはファイルAPIをサポートしていません。",
|
"File APIs not supported in this browser.": "利用しているブラウザはファイルAPIをサポートしていません。",
|
||||||
"Follow": "フォロー",
|
"Follow": "フォロー",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "フォローされている",
|
"Followed by": "フォローされている",
|
||||||
"followed_by": "%{username}にフォローされている",
|
"followed_by": "%{username}にフォローされている",
|
||||||
"Followers": "フォロワー",
|
"Followers": "フォロワー",
|
||||||
@ -2488,6 +2504,8 @@ if(preferredLanguage == "pt-BR"){
|
|||||||
"Favorite": "Favorito",
|
"Favorite": "Favorito",
|
||||||
"File APIs not supported in this browser.": "O gerenciamento de arquivos não é suportado neste navegador.",
|
"File APIs not supported in this browser.": "O gerenciamento de arquivos não é suportado neste navegador.",
|
||||||
"Follow": "Seguir",
|
"Follow": "Seguir",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Seguido por",
|
"Followed by": "Seguido por",
|
||||||
"followed_by": "Seguido por %{username}",
|
"followed_by": "Seguido por %{username}",
|
||||||
"Followers": "Seguidores",
|
"Followers": "Seguidores",
|
||||||
@ -2731,6 +2749,8 @@ if(preferredLanguage == "tr"){
|
|||||||
"Favorite": "Favori",
|
"Favorite": "Favori",
|
||||||
"File APIs not supported in this browser.": "Tarayıcınızda dosya API'si desteklenmiyor.",
|
"File APIs not supported in this browser.": "Tarayıcınızda dosya API'si desteklenmiyor.",
|
||||||
"Follow": "Takip et",
|
"Follow": "Takip et",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "Takip edenler",
|
"Followed by": "Takip edenler",
|
||||||
"followed_by": "%{username} tarafından takip edilenler",
|
"followed_by": "%{username} tarafından takip edilenler",
|
||||||
"Followers": "Takipçiler",
|
"Followers": "Takipçiler",
|
||||||
@ -2971,6 +2991,8 @@ if(preferredLanguage == "cs"){
|
|||||||
"Favorite": "Přidat k oblíbeným",
|
"Favorite": "Přidat k oblíbeným",
|
||||||
"File APIs not supported in this browser.": "Upozornění: váš webový prohlížeč nepodporuje File API.",
|
"File APIs not supported in this browser.": "Upozornění: váš webový prohlížeč nepodporuje File API.",
|
||||||
"Follow": "Sledovat",
|
"Follow": "Sledovat",
|
||||||
|
"Following config": "Following config",
|
||||||
|
"Which way do you want to follow": "Which way do you want to follow",
|
||||||
"Followed by": "tohoto uživatele sleduje",
|
"Followed by": "tohoto uživatele sleduje",
|
||||||
"followed_by": "Uživatelé, které sleduje %{username}",
|
"followed_by": "Uživatelé, které sleduje %{username}",
|
||||||
"Followers": "Sledující",
|
"Followers": "Sledující",
|
||||||
|
@ -188,7 +188,7 @@ var MAL = function()
|
|||||||
if( $.hasOwnProperty("mobile") ) {
|
if( $.hasOwnProperty("mobile") ) {
|
||||||
return "#dmchat?user=" + username;
|
return "#dmchat?user=" + username;
|
||||||
} else {
|
} else {
|
||||||
return "#dmchat?user=" + username;
|
return "#directmessages?user=" + username;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -315,6 +315,42 @@ var MAL = function()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
this.showMentions = function(username) {
|
||||||
|
if( $.hasOwnProperty("mobile") ) {
|
||||||
|
$.mobile.navigate( this.mentionsUrl(username) );
|
||||||
|
} else {
|
||||||
|
if ($(".postboard").length) {
|
||||||
|
openMentionsModal();
|
||||||
|
} else {
|
||||||
|
window.location.href = 'home.html'+this.mentionsUrl(username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
this.showDMchat = function(username) {
|
||||||
|
if (username) {
|
||||||
|
if( $.hasOwnProperty("mobile") ) {
|
||||||
|
$.mobile.navigate( this.dmchatUrl(username) );
|
||||||
|
} else {
|
||||||
|
if ($(".postboard").length) {
|
||||||
|
window.location.hash = this.dmchatUrl(username);
|
||||||
|
} else {
|
||||||
|
window.location.href = 'home.html'+this.dmchatUrl(username);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if( $.hasOwnProperty("mobile") ) {
|
||||||
|
$.mobile.navigate( '#directmsg' );
|
||||||
|
} else {
|
||||||
|
if ($(".postboard").length) {
|
||||||
|
window.location.hash = '#directmessages';
|
||||||
|
} else {
|
||||||
|
window.location.href = 'home.html#directmessages';
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
this.setNetworkStatusMsg = function(msg, statusGood) {
|
this.setNetworkStatusMsg = function(msg, statusGood) {
|
||||||
if( $.hasOwnProperty("mobile") ) {
|
if( $.hasOwnProperty("mobile") ) {
|
||||||
$(".network-status").text(msg);
|
$(".network-status").text(msg);
|
||||||
|
@ -353,6 +353,8 @@ function updateFollowing(cbFunc, cbArg) {
|
|||||||
function follow(user, publicFollow, cbFunc, cbArg) {
|
function follow(user, publicFollow, cbFunc, cbArg) {
|
||||||
if( followingUsers.indexOf(user) < 0 ) {
|
if( followingUsers.indexOf(user) < 0 ) {
|
||||||
followingUsers.push(user);
|
followingUsers.push(user);
|
||||||
|
twisterFollowingO.update(user);
|
||||||
|
$(window).trigger("eventFollow", user)
|
||||||
}
|
}
|
||||||
if( publicFollow == undefined || publicFollow )
|
if( publicFollow == undefined || publicFollow )
|
||||||
_isFollowPublic[user] = true;
|
_isFollowPublic[user] = true;
|
||||||
@ -367,6 +369,7 @@ function unfollow(user, cbFunc, cbArg) {
|
|||||||
if( i >= 0 ) {
|
if( i >= 0 ) {
|
||||||
followingUsers.splice(i,1);
|
followingUsers.splice(i,1);
|
||||||
twisterFollowingO.update(user);
|
twisterFollowingO.update(user);
|
||||||
|
$(window).trigger("eventUnfollow", user)
|
||||||
}
|
}
|
||||||
delete _isFollowPublic[user];
|
delete _isFollowPublic[user];
|
||||||
saveFollowing();
|
saveFollowing();
|
||||||
@ -570,8 +573,7 @@ function processSuggestion(arg, suggestion, followedBy) {
|
|||||||
|
|
||||||
function closeSearchDialog()
|
function closeSearchDialog()
|
||||||
{
|
{
|
||||||
var $this = $(".userMenu-search-field");//$( this );
|
$(".userMenu-search-field").siblings().slideUp( "fast" );
|
||||||
$( this ).siblings().slideUp( "fast" );
|
|
||||||
removeUsersFromDhtgetQueue( _lastSearchUsersResults );
|
removeUsersFromDhtgetQueue( _lastSearchUsersResults );
|
||||||
_lastSearchUsersResults = [];
|
_lastSearchUsersResults = [];
|
||||||
}
|
}
|
||||||
@ -654,6 +656,8 @@ function processDropdownUserResults(partialName, results){
|
|||||||
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(results[i]));
|
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(results[i]));
|
||||||
getAvatar(results[i],resItem.find(".mini-profile-photo"));
|
getAvatar(results[i],resItem.find(".mini-profile-photo"));
|
||||||
getFullname(results[i],resItem.find(".mini-profile-name"));
|
getFullname(results[i],resItem.find(".mini-profile-name"));
|
||||||
|
if (followingUsers.indexOf(results[i]) >= 0)
|
||||||
|
toggleFollowButton(resItem.find(".follow"), results[i]);
|
||||||
resItem.appendTo(typeaheadAccounts);
|
resItem.appendTo(typeaheadAccounts);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,6 +682,11 @@ function userClickFollow(e) {
|
|||||||
e.stopPropagation();
|
e.stopPropagation();
|
||||||
e.preventDefault();
|
e.preventDefault();
|
||||||
|
|
||||||
|
var followingInitiator = $(".followingInitiator");
|
||||||
|
if (followingInitiator)
|
||||||
|
followingInitiator.removeClass("followingInitiator");
|
||||||
|
$(e.target).addClass("followingInitiator");
|
||||||
|
|
||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var $userInfo = $this.closest("[data-screen-name]");
|
var $userInfo = $this.closest("[data-screen-name]");
|
||||||
var username = $userInfo.attr("data-screen-name");
|
var username = $userInfo.attr("data-screen-name");
|
||||||
@ -702,7 +711,7 @@ function initUserSearch() {
|
|||||||
var $userSearchField = $( ".userMenu-search-field" );
|
var $userSearchField = $( ".userMenu-search-field" );
|
||||||
$userSearchField.keyup( userSearchKeypress );
|
$userSearchField.keyup( userSearchKeypress );
|
||||||
$userSearchField.bind( "click", userSearchKeypress );
|
$userSearchField.bind( "click", userSearchKeypress );
|
||||||
$userSearchField.clickoutside( closeSearchDialog );
|
$(".userMenu-search").clickoutside( closeSearchDialog );
|
||||||
|
|
||||||
$("button.follow").bind( "click", userClickFollow );
|
$("button.follow").bind( "click", userClickFollow );
|
||||||
|
|
||||||
@ -710,7 +719,7 @@ function initUserSearch() {
|
|||||||
$(".following-config-method-buttons .public-following").click( function() {
|
$(".following-config-method-buttons .public-following").click( function() {
|
||||||
closePrompt();
|
closePrompt();
|
||||||
// delay reload so dhtput may do it's job
|
// delay reload so dhtput may do it's job
|
||||||
window.setTimeout("loadModalFromHash();",500);
|
window.setTimeout("loadModalFromHash();",500);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -721,9 +730,7 @@ function followingListUnfollow(e) {
|
|||||||
var $this = $(this);
|
var $this = $(this);
|
||||||
var username = $this.closest(".mini-profile-info").attr("data-screen-name");
|
var username = $this.closest(".mini-profile-info").attr("data-screen-name");
|
||||||
|
|
||||||
unfollow(username, function() {
|
unfollow(username);
|
||||||
showFollowingUsers();
|
|
||||||
});
|
|
||||||
}
|
}
|
||||||
|
|
||||||
function followingListPublicCheckbox(e) {
|
function followingListPublicCheckbox(e) {
|
||||||
@ -754,9 +761,14 @@ function setFollowingMethod(e) {
|
|||||||
if( !$this.hasClass("private") ) {
|
if( !$this.hasClass("private") ) {
|
||||||
publicFollow = true;
|
publicFollow = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
//console.log("start following @" +username +" by method "+publicFollow);
|
//console.log("start following @" +username +" by method "+publicFollow);
|
||||||
follow(username, publicFollow);
|
follow(username, publicFollow,
|
||||||
|
(function() {
|
||||||
|
var followingInitiator = $(".followingInitiator");
|
||||||
|
if (followingInitiator)
|
||||||
|
toggleFollowButton(followingInitiator, this);
|
||||||
|
}).bind(username)
|
||||||
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@ -829,6 +841,16 @@ function initInterfaceFollowing() {
|
|||||||
initMentionsCount();
|
initMentionsCount();
|
||||||
initDMsCount();
|
initDMsCount();
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(window)
|
||||||
|
.on("eventFollow", function(e, user) {
|
||||||
|
$(".following-count").text(followingUsers.length-1);
|
||||||
|
showFollowingUsers();
|
||||||
|
})
|
||||||
|
.on("eventUnfollow", function(e, user) {
|
||||||
|
$(".following-count").text(followingUsers.length-1);
|
||||||
|
showFollowingUsers();
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -101,7 +101,7 @@ function requestMentionsCount() {
|
|||||||
$.MAL.soundNotifyMentions();
|
$.MAL.soundNotifyMentions();
|
||||||
|
|
||||||
if ($.Options.getShowDesktopNotifMentionsOpt() === 'enable') {
|
if ($.Options.getShowDesktopNotifMentionsOpt() === 'enable') {
|
||||||
$.MAL.showDesktopNotif(false, polyglot.t('You got')+' '+polyglot.t('new_mentions', _newMentions)+'.', false,'twister_notification_new_mentions', $.Options.getShowDesktopNotifMentionsTimerOpt(), openMentionsModal, false)
|
$.MAL.showDesktopNotif(false, polyglot.t('You got')+' '+polyglot.t('new_mentions', _newMentions)+'.', false,'twister_notification_new_mentions', $.Options.getShowDesktopNotifMentionsTimerOpt(), function(){$.MAL.showMentions(defaultScreenName)}, false)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -115,9 +115,7 @@ function requestMentionsCount() {
|
|||||||
$.MAL.soundNotifyDM();
|
$.MAL.soundNotifyDM();
|
||||||
|
|
||||||
if ($.Options.getShowDesktopNotifDMsOpt() === 'enable') {
|
if ($.Options.getShowDesktopNotifDMsOpt() === 'enable') {
|
||||||
$.MAL.showDesktopNotif(false, polyglot.t('You got')+' '+polyglot.t('new_direct_messages', newDMs)+'.', false, 'twister_notification_new_DMs', $.Options.getShowDesktopNotifDMsTimerOpt(), function() {
|
$.MAL.showDesktopNotif(false, polyglot.t('You got')+' '+polyglot.t('new_direct_messages', newDMs)+'.', false, 'twister_notification_new_DMs', $.Options.getShowDesktopNotifDMsTimerOpt(), function(){$.MAL.showDMchat()}, false)
|
||||||
window.location.hash = '#directmessages';
|
|
||||||
}, false)
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -920,17 +920,18 @@ textarea.splited-post {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
text-decoration: none;
|
text-decoration: none;
|
||||||
}
|
}
|
||||||
.follow
|
|
||||||
{
|
.follow, .unfollow {
|
||||||
background: none;
|
background: none;
|
||||||
border: solid 1px rgba( 0, 0, 0 ,.2 );
|
border: solid 1px rgba( 0, 0, 0 ,.2 );
|
||||||
padding: 3px 15px;
|
padding: 3px 15px;
|
||||||
color: rgba( 0, 0, 0 ,.4 );
|
color: rgba( 0, 0, 0 ,.4 );
|
||||||
}
|
}
|
||||||
.follow:hover
|
|
||||||
{
|
.follow:hover, .unfollow:hover {
|
||||||
color: rgba( 0, 0, 0 ,.7 );
|
color: rgba( 0, 0, 0 ,.7 );
|
||||||
}
|
}
|
||||||
|
|
||||||
.refresh-users,
|
.refresh-users,
|
||||||
.view-all-users
|
.view-all-users
|
||||||
{
|
{
|
||||||
@ -1648,7 +1649,7 @@ textarea.splited-post {
|
|||||||
|
|
||||||
.prompt-wrapper
|
.prompt-wrapper
|
||||||
{
|
{
|
||||||
position: absolute;
|
position: fixed;
|
||||||
top: 50%;
|
top: 50%;
|
||||||
left: 50%;
|
left: 50%;
|
||||||
background: rgba( 255, 255,255, 1.0 );
|
background: rgba( 255, 255,255, 1.0 );
|
||||||
@ -1658,8 +1659,9 @@ textarea.splited-post {
|
|||||||
margin-left:-300px;
|
margin-left:-300px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.prompt-wrapper .modal-header h3{
|
||||||
|
background: #7691CE;
|
||||||
|
}
|
||||||
|
|
||||||
/*************************************
|
/*************************************
|
||||||
**************************** POPUP MODAL
|
**************************** POPUP MODAL
|
||||||
@ -1698,7 +1700,7 @@ textarea.splited-post {
|
|||||||
{
|
{
|
||||||
padding: 5px;
|
padding: 5px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
background: #43464d;
|
background: #7691CE;
|
||||||
color: #fff;
|
color: #fff;
|
||||||
}
|
}
|
||||||
.modal-close
|
.modal-close
|
||||||
|
@ -121,13 +121,13 @@
|
|||||||
|
|
||||||
/* '' */
|
/* '' */
|
||||||
/* line 120, ../sass/_fonts.sass */
|
/* line 120, ../sass/_fonts.sass */
|
||||||
.icon-plus:before, .mini-profile-actions span:before, ul.userMenu-search-profiles button:before {
|
.icon-plus:before, .mini-profile-actions span:before, ul.userMenu-search-profiles button.follow:before {
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
/* '' */
|
/* '' */
|
||||||
/* line 125, ../sass/_fonts.sass */
|
/* line 125, ../sass/_fonts.sass */
|
||||||
.icon-minus:before {
|
.icon-minus:before, ul.userMenu-search-profiles button.unfollow:before {
|
||||||
content: "";
|
content: "";
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1855,10 +1855,13 @@ ul.userMenu-search-profiles .mini-profile-info {
|
|||||||
float: none;
|
float: none;
|
||||||
}
|
}
|
||||||
/* line 119, ../sass/style.sass */
|
/* line 119, ../sass/style.sass */
|
||||||
ul.userMenu-search-profiles button, ul.userMenu-search-profiles .mini-profile-actions span, .mini-profile-actions ul.userMenu-search-profiles span {
|
ul.userMenu-search-profiles button.unfollow, ul.userMenu-search-profiles .mini-profile-actions span, .mini-profile-actions ul.userMenu-search-profiles span {
|
||||||
background-color: #66686B;
|
background-color: #66686B;
|
||||||
padding: 3px;
|
padding: 3px;
|
||||||
}
|
}
|
||||||
|
ul.userMenu-search-profiles button {
|
||||||
|
padding: 3px;
|
||||||
|
}
|
||||||
/* line 124, ../sass/style.sass */
|
/* line 124, ../sass/style.sass */
|
||||||
ul.userMenu-search-profiles button:after, ul.userMenu-search-profiles .mini-profile-actions span:after, .mini-profile-actions ul.userMenu-search-profiles span:after {
|
ul.userMenu-search-profiles button:after, ul.userMenu-search-profiles .mini-profile-actions span:after, .mini-profile-actions ul.userMenu-search-profiles span:after {
|
||||||
content: "";
|
content: "";
|
||||||
@ -2315,15 +2318,23 @@ textarea.splited-post {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* line 491, ../sass/style.sass */
|
/* line 127, ../sass/style.sass */
|
||||||
button.follow, .mini-profile-actions span.follow {
|
ul.userMenu-search-profiles .follow, ul.userMenu-search-profiles .unfollow, .follow-suggestions .follow, .follow-suggestions .unfollow {
|
||||||
position: absolute;
|
position: absolute;
|
||||||
bottom: 10px;
|
bottom: 10px;
|
||||||
right: 10px;
|
right: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
ul.userMenu-search-profiles .follow, .follow-suggestions .follow {
|
||||||
background: #B4C669;
|
background: #B4C669;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ul.userMenu-search-profiles .unfollow, .follow-suggestions .unfollow {
|
||||||
|
background-color: #66686B;
|
||||||
|
}
|
||||||
|
|
||||||
/* line 496, ../sass/style.sass */
|
/* line 496, ../sass/style.sass */
|
||||||
button.follow:hover, .mini-profile-actions span.follow:hover {
|
button.follow:hover, .mini-profile-actions span.follow:hover, button.unfollow, .mini-profile-actions span.unfollow {
|
||||||
background: #aaa;
|
background: #aaa;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,6 +38,13 @@ $(function(){
|
|||||||
$('.left .post-area-new').slideUp(150);
|
$('.left .post-area-new').slideUp(150);
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$(".userMenu-search-profiles .follow")
|
||||||
|
.on("toggleFollow", function() {
|
||||||
|
$(this).text('').attr('title', polyglot.t('Follow'));
|
||||||
|
})
|
||||||
|
.on("toggleUnfollow", function() {
|
||||||
|
$(this).text('').attr('title', polyglot.t('Unfollow'));
|
||||||
|
});
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
@ -117,13 +117,23 @@ ul.userMenu-search-profiles
|
|||||||
float: none
|
float: none
|
||||||
|
|
||||||
button
|
button
|
||||||
background-color: $main-color-dark
|
|
||||||
padding: 3px
|
padding: 3px
|
||||||
@extend .extend-icon
|
@extend .extend-icon
|
||||||
@extend .icon-plus
|
|
||||||
&:after
|
&:after
|
||||||
content: ''
|
content: ''
|
||||||
font-family: $symbol-font-family
|
font-family: $symbol-font-family
|
||||||
|
.follow .unfollow
|
||||||
|
position: absolute
|
||||||
|
bottom: 10px
|
||||||
|
right: 10px
|
||||||
|
&:hover
|
||||||
|
background-color: $main-color-light
|
||||||
|
.follow
|
||||||
|
background-color: $main-color-color
|
||||||
|
@extend .icon-plus
|
||||||
|
.unfollow
|
||||||
|
background-color: $main-color-dark
|
||||||
|
@extend .icon-minus
|
||||||
|
|
||||||
|
|
||||||
.userMenu-search input[type="text"]
|
.userMenu-search input[type="text"]
|
||||||
@ -141,6 +151,19 @@ ul.userMenu-search-profiles
|
|||||||
clear: both
|
clear: both
|
||||||
|
|
||||||
|
|
||||||
|
.follow-suggestions
|
||||||
|
button
|
||||||
|
.follow .unfollow
|
||||||
|
position: absolute
|
||||||
|
bottom: 10px
|
||||||
|
right: 10px
|
||||||
|
&:hover
|
||||||
|
background-color: $main-color-light
|
||||||
|
.follow
|
||||||
|
background-color: $main-color-color
|
||||||
|
.unfollow
|
||||||
|
background-color: $main-color-dark
|
||||||
|
|
||||||
|
|
||||||
/***************** MINI PROFILE *******************************/
|
/***************** MINI PROFILE *******************************/
|
||||||
|
|
||||||
@ -488,14 +511,6 @@ textarea.splited-post
|
|||||||
.twister-user-remove:hover
|
.twister-user-remove:hover
|
||||||
opacity: 1
|
opacity: 1
|
||||||
|
|
||||||
button.follow
|
|
||||||
position: absolute
|
|
||||||
bottom: 10px
|
|
||||||
right: 10px
|
|
||||||
background: $main-color-color
|
|
||||||
&:hover
|
|
||||||
background: $main-color-light
|
|
||||||
|
|
||||||
.refresh-users
|
.refresh-users
|
||||||
@extend .icon-arrows
|
@extend .icon-arrows
|
||||||
@extend .extend-icon
|
@extend .extend-icon
|
||||||
|
@ -28,6 +28,7 @@
|
|||||||
<script src="js/jquery.jsonrpcclient.js"></script>
|
<script src="js/jquery.jsonrpcclient.js"></script>
|
||||||
<script src="js/jquery.storageapi.js"></script>
|
<script src="js/jquery.storageapi.js"></script>
|
||||||
<script src="js/options.js?vr=10"></script>
|
<script src="js/options.js?vr=10"></script>
|
||||||
|
<script src="js/notify.js"></script>
|
||||||
<script src="js/mobile_abstract.js?vr=10"></script>
|
<script src="js/mobile_abstract.js?vr=10"></script>
|
||||||
<script src="js/twister_io.js?vr=10"></script>
|
<script src="js/twister_io.js?vr=10"></script>
|
||||||
<script src="js/polyglot.min.js?vr=10"></script>
|
<script src="js/polyglot.min.js?vr=10"></script>
|
||||||
|
Loading…
x
Reference in New Issue
Block a user