Browse Source

The Natural Born Twister. Mess-O-Rama Music Vol. 2: Songs About Templates, Followings, Confirms, Alerts, Blank Windows And Clicks

readme-update
Simon Grim 9 years ago
parent
commit
8c9c5f9293
  1. 129
      css/style.css
  2. 638
      following.html
  3. 54
      home.html
  4. 669
      js/interface_common.js
  5. 16
      js/interface_home.js
  6. 108
      js/interface_localization.js
  7. 25
      js/mobile_abstract.js
  8. 5
      js/tmobile.js
  9. 24
      js/twister_directmsg.js
  10. 195
      js/twister_following.js
  11. 13
      js/twister_formatpost.js
  12. 2
      js/twister_network.js
  13. 24
      js/twister_user.js
  14. 1
      network.html
  15. 1
      options.html
  16. 1
      profile-edit.html
  17. 151
      theme_calm/css/style.css
  18. 431
      theme_nin/css/style.css
  19. 4
      theme_nin/js/theme_option.js
  20. 239
      theme_nin/sass/_following.sass
  21. 62
      tmobile.html

129
css/style.css

@ -123,7 +123,7 @@ button:disabled:hover, button.disabled:hover {
color: rgba(255, 255, 255, .8); color: rgba(255, 255, 255, .8);
} }
button.follow, button.unfollow, .following-list button.private { button.follow, button.unfollow, .following-own-modal .following-list button.private {
color: rgba( 0, 0, 0, .4 ); color: rgba( 0, 0, 0, .4 );
background: none; background: none;
border: solid 1px rgba( 0, 0, 0, .2 ); border: solid 1px rgba( 0, 0, 0, .2 );
@ -131,19 +131,19 @@ button.follow, button.unfollow, .following-list button.private {
font-size: 12px; font-size: 12px;
} }
.following-list .public-following { .following-own-modal .following-list .public-following {
padding: 4px 16px; padding: 4px 16px;
font-size: 12px; font-size: 12px;
} }
.following-list .public-following:hover { .following-own-modal .following-list .public-following:hover {
color: rgba( 0, 0, 0, .4 ); color: rgba( 0, 0, 0, .4 );
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;
} }
button.follow:hover, button.unfollow:hover, .following-list button.private:hover { button.follow:hover, button.unfollow:hover, .following-own-modal .following-list button.private:hover {
color: #fff; color: #fff;
background: #45474d; background: #45474d;
} }
@ -545,10 +545,7 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
.following-list .mini-profile-name
{
padding: 5px 5px 5px 5px;
}
.profile-data .profile-data
{ {
@ -584,58 +581,51 @@ button.follow:hover, button.unfollow:hover, .following-list button.private:hover
display: block; display: block;
font-size: 16px; font-size: 16px;
} }
.mini-profile-actions
{ .mini-profile-actions {
position: relative; position: absolute;
width: auto; top: 0;
display: inline-block; right: 8px;
} }
.mini-profile-actions span
{ .mini-profile-actions span {
color: #e34f42; color: #e34f42;
cursor: pointer; cursor: pointer;
font-size: 12px; font-size: 12px;
display: inline-block; display: inline-block;
transition: all .2s linear; position: relative;
z-index: 10;
} }
.mini-profile-actions ul
{ .mini-profile-actions ul {
height: 0; height: 0;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
z-index: 20;
right: 0;
transition: height .2s linear; transition: height .2s linear;
background: #fff; background: #fff;
z-index: 3;
}
.mini-profile-actions:hover span
{
}
.mini-profile-actions:hover span:after
{
} }
.mini-profile-actions:hover ul
{ .mini-profile-actions:hover ul {
height: 118px; /*height: ;*/
box-shadow: 0 2px 5px #65686f; border: solid 1px rgba(69, 71, 77, .1);
border-right: solid 4px rgba(227, 79, 66, .82);
box-shadow: 8px 10px 10px 0px rgba(0, 0, 0, .2);
} }
.mini-profile-actions ul li
{ .mini-profile-actions ul > li {
white-space: nowrap; white-space: nowrap;
color: rgba(0, 0, 0, .7); color: rgba(0, 0, 0, .7);
font-size: 13px; font-size: 12px;
cursor: pointer; cursor: pointer;
padding: 5px; padding: 4px 16px 4px 8px;
margin: 2px;
}
.mini-profile-actions ul li + li
{
margin: 0 2px;
} }
.mini-profile-actions:hover ul li:hover
{ .mini-profile-actions ul > li:hover {
background: rgba( 0, 0, 0, .7 ); background-color: #FEFEDF;
color: #fff;
} }
.mini-profile-info a:hover .mini-profile-info a:hover
{ {
text-decoration: none; text-decoration: none;
@ -2199,68 +2189,55 @@ ol.toptrends-list {
*********** FOLLOWING PAGE *********** *********** FOLLOWING PAGE ***********
**************************************/ **************************************/
.following .header-bold { .following-own-modal.modal-wrapper {
display: block; width: 662px;
width: 100%; margin-left: -331px;
margin: 0px auto 12px auto;
}
.following-list
{
overflow-y: auto;
} }
.following ol.following-list > li{ .following-own-modal .following-list > li {
width: 425px; width: 320px;
height: 160px; height: 120px;
margin: 5px; margin: 2px;
padding: 8px; padding: 2px;
float: left; float: left;
border: solid 1px rgba(69, 71, 77, .1); border: solid 1px rgba(69, 71, 77, .1);
background: #fff; background: #fff;
} }
.w1200 .following ol.following-list > li{ .following-own-modal .following-list > li:hover {
width: 385px; border: solid 1px rgba(227, 79, 66, .5);
} }
.following ol.following-list > li:hover{ .following-own-modal .following-list .mini-profile-name {
border: solid 1px rgba( 227, 79, 66, .5 ); padding: 4px;
} }
.following-list .mini-screen-name { .following-own-modal .following-list .mini-screen-name {
position: absolute; position: absolute;
top: 32px; top: 32px;
} }
.following-list .following-config .following-own-modal .following-list .following-config {
{
width: 100%; width: 100%;
position: absolute; position: absolute;
top: 64px; top: 62px;
text-align: center; text-align: center;
} }
.following-list .following-config button .following-own-modal .following-list .following-config button {
{
display: inline-block; display: inline-block;
} }
.following-list .mini-profile-actions .following-own-modal .following-list .mini-profile-actions:hover ul {
{ height: 50px;
position: absolute;
top: 0;
right: 8px;
z-index: 10;
} }
.following-list .swarm-status .following-own-modal .following-list .swarm-status {
{
font: 12px "Open Sans", sans-serif; font: 12px "Open Sans", sans-serif;
display: block; display: block;
position: absolute; position: absolute;
top: 120px; top: 94px;
right: 8px; right: 32px;
} }
/************************************* /*************************************

638
following.html

@ -1,638 +0,0 @@
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8"/>
<title>Following</title>
<link id="stylecss" rel="stylesheet" href="css/style.css" type="text/css"/>
<link id="profilecss" rel="stylesheet" href="css/profile.css" type="text/css"/>
<script src="js/jquery.min.js"></script>
<script src="js/jQueryPlugins.js"></script>
<script src="js/jquery.json-2.4.js"></script>
<script src="js/jquery.jsonrpcclient.js"></script>
<script src="js/jquery.storageapi.js"></script>
<script src="js/options.js"></script>
<script src="js/franc.js"></script>
<script src="js/notify.js"></script>
<script src="js/mobile_abstract.js"></script>
<script src="js/twister_io.js"></script>
<script src="js/polyglot.min.js"></script>
<script src="js/interface_localization.js"></script>
<script src="js/twister_network.js"></script>
<script src="js/twister_user.js"></script>
<script src="js/twister_formatpost.js"></script>
<script src="js/twister_newmsgs.js"></script>
<script src="js/twister_following.js"></script>
<script src="js/twister_timeline.js"></script>
<script src="js/twister_directmsg.js"></script>
<script src="js/twister_actions.js"></script>
<script src="js/interface_common.js"></script>
<script src="js/jquery.textcomplete.min.js"></script>
<link rel="shortcut icon" type="image/png" href="img/twister_mini.png" />
</head>
<body>
<!-- MENU SUPERIOR INIT -->
<nav class="userMenu">
<ul>
<li class="userMenu-home"><a href="home.html"><span class="selectable_theme theme_original label">Home</span></a></li>
<li class="userMenu-network selectable_theme theme_original theme_nin"><a class="label" href="network.html">Network</a></li>
<li class="userMenu-profile selectable_theme theme_original theme_nin"><a class="label" href="profile-edit.html">Profile</a></li>
<li class="userMenu-config">
<a class="userMenu-config-dropdown" href="#">
<div class="config-menu dialog-modal">
<div class="mini-profile-info selectable_theme theme_original">
<div class="mini-profile-photo"><img src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/></div>
<a href="#" class="mini-profile-name">Fulano da Silva</a>
<span class="mini-profile-view">View</span>
</div>
<a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="following.html">Following users</a>
<a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="login.html">Change user</a>
<a class="dropdown-menu-item direct-messages selectable_theme theme_original theme_calm" href="#">Direct Messages</a>
<a class="dropdown-menu-item groupmessages selectable_theme theme_original theme_calm" href="#">Group Messages</a>
</div>
</a>
</li>
<li class="userMenu-connections">
<a href="#">
<span class="messages-qtd" style="display:none;">0</span>
</a>
</li>
<li class="userMenu-messages">
<a href="#">
<span class="messages-qtd" style="display:none;">0</span>
</a>
</li>
<li class="userMenu-groupmessages">
<a href="#">
<span class="messages-qtd" style="display:none;">0</span>
</a>
</li>
<li class="userMenu-dhtindicator selectable_theme theme_calm"><a href="network.html"></a></li>
<!-- BUSCA -->
<li class="userMenu-search">
<input type="text" class="userMenu-search-field" placeholder="search"/>
<div class="search-results dialog-modal">
<ul class="userMenu-search-sugestions" style="display: none;">
<li><a href="#">Fulano</a></li>
<li><a href="#">Outro Fulano</a></li>
<li><a href="#">Mais outro</a></li>
</ul>
<ul class="userMenu-search-profiles"></ul>
</div>
</li>
</ul>
</nav>
<!-- MENU SUPERIOR END -->
<div class="wrapper">
<!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="dashboard left">
<!-- THEME NIN added sub-menu (mentions, messages and edit profile) -->
<ul class="mini-profile-indicators selectable_theme theme_nin">
<li class="userMenu-connections">
<a href="#" title="Mentions"><span class="messages-qtd" style="display:none;">0</span><span>Mentions</span></a>
</li>
<li class="userMenu-groupmessages">
<a href="#" title="Group Messages"><span class="messages-qtd" style="display:none;">0</span><span>Group Messages</span></a>
</li>
<li class="userMenu-messages">
<a href="#" title="Direct Messages"><span class="messages-qtd" style="display:none;">0</span><span>Messages</span></a>
</li>
</ul>
<!-- PROFILE MODULE INIT -->
<div class="module mini-profile selectable_theme theme_nin">
<div class="mini-profile-info">
<div class="mini-profile-photo"><img src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/></div>
<a href="#" class="mini-profile-name open-profile-modal"></a>
<span class="mini-profile-view">View</span>
</div>
<ul class="module profile-data">
<li><a href="#" class="open-profile-modal"><span class="posts-count">&nbsp;</span><span class="label">Posts</span></a></li>
<li class="current"><a href="following.html" class="open-following-page"><span class="following-count">&nbsp;</span><span class="label">Following</span></a></li>
<li><a href="#" class="open-followers"><span class="followers-count">&nbsp;</span><span class="label">Followers</span> *</a></li>
</ul>
</div>
<!-- PROFILE MODULE INIT -->
</div>
<!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="following">
<h2 class="header-bold"> Following </h2>
<div class="postboard-loading" style="display: none;">
<div></div>
</div>
<ol class="following-list">
<li id="following-user-template" style="display: none;">
<div class="mini-profile-info" data-screen-name="">
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-profile-name">Fulano da Silva</span>
<span class="mini-screen-name">@
<b class="following-screen-name"></b>
</span>
</a>
<div>
<div class="mini-profile-actions">
<span>Actions ▼</span>
<ul>
<li class="direct-messages-with-user">Sent Direct Message</li>
<li>Sent Post to @
<b class="following-screen-name"></b>
</li>
<li class="mentions-from-user">Display mentions to @
<b class="following-screen-name"></b>
</li>
<li>Display retransmissions</li>
</ul>
</div>
<div class="following-config">
<button class="follow">Follow</button>
<button class="public-following">Public</button>
</div>
</div>
<div>
<span class="swarm-status" style="display: none;"></span>
</div>
</div>
</li>
</ol>
<div class="not-following-any" style="display:none;">
<div> Not following any users! </div>
<div> Search some users in the right-upper search box and follow them. </div>
</div>
</div>
<!-- LADO ESQUERDO DE MÓDULOS END -->
</div>
<ul id="modals-minimized"></ul>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<div id="search-profile-template">
<li>
<div class="mini-profile-info">
<a class="open-profile-modal">
<img class="mini-profile-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo" />
<span class="mini-screen-name">@<b></b></span>
<span class="mini-profile-name"></span>
</a>
<button class="follow">Follow</button>
</div>
</li>
</div>
<!-- TEMPLATE DE WHO-TO-FOLLOW SUGGESTION -->
<li id="follow-suggestion-template" class="twister-user">
<div class="">
<a href="#" class="twister-user-name open-profile-modal">
<img class="twister-user-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
</a>
</div>
<div class="twister-user-info" data-screen-name="">
<a href="#" class="twister-user-name open-profile-modal">
<span class="twister-user-tag"></span>
</a>
<div class="followers">
<span class="label">Followed by</span>
<span class="followed-by"></span>
</div>
<a class="twister-user-remove">&times;</a>
<button class="follow">Follow</button>
</div>
</li>
<!-- TEMPLATE DA OL INVÓLUCRO DAS LIST ELEMENTS DO POST EXPANDIDO INIT -->
<ol class="expanded-post">
</ol>
<!-- TEMPLATE DA OL INVÓLUCRO DAS LIST ELEMENTS DO POST EXPANDIDO END -->
<!-- TEMPLATE DOS 3 TIPOS DE LI DO POST EXPANDIDO INIT -->
<li class="ancestor module post">
</li>
<div id="post-preview-template">
<div id="post-preview" class="post-text">
</div>
</div>
<li id="post-template" class="module post" data-time="">
<div class="post-data" data-userpost="" data-content_to_rt="" data-content_to_sigrt=""
data-screen-name="" data-id="" data-text="" data-text-mentions="">
<div class="post-photo"><img class="avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/></div>
<div class="post-info">
<a href="#" class="post-info-name open-profile-modal"></a>
<span class="post-info-tag"></span>
<a class="post-info-time"><span class="post-info-sent"></span> <span></span></a>
</div>
<p class="post-text"></p>
<div class="post-context" style="display: none;"></div>
<span class="post-expand">Expand</span>
<!-- elementos de interação com o post que são exibidos no hover -->
<div class="post-interactions">
<span class="post-reply">Reply</span>
<span class="post-propagate">Retransmit</span>
<!--span class="post-favorite">Favorite</span-->
</div>
<div class="expanded-content" style="display: none;">
<ul class="post-stats" style="display: none;">
<li class="stat-count">
<span class="stat-count-value"></span>
<span>Retransmits</span>
</li>
<li class="avatar-row">
<!-- use "avatar-row-template" here -->
</li>
</ul>
<div class="preview-container">
</div>
<div class="post-reply-content" style="display: block;">
<form class="post-area-new">
<textarea placeholder="Reply..."></textarea>
<div class="post-area-extras">
<span class="post-area-remaining">140</span>
<button class="undo-unicode disabled" disabled="disabled">undo</button>
<button class="post-submit disabled" disabled="disabled">post</button>
</div>
</form>
</div>
<span class="show-more label">Show more in this conversation...</span>
</div> <!-- expanded-content -->
</div> <!-- post-data -->
</li> <!-- post-template -->
<div id="post-rt-reference-template">
<div class="post-rt-reference">
<div class="post-photo"><img class="avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo" /></div>
<div class="post-info">
<a href="#" class="post-info-name open-profile-modal"></a>
<span class="post-info-tag"></span>
<a class="post-info-time"><span></span></a>
</div>
<p class="post-text"></p>
</div>
</div>
<div id="post-rt-by-template">
<i class="post-rt-icon"></i>
<div class="post-rt-sign">
<span class="prep">twisted again by</span><a class="open-profile-modal"></a>
</div>
<div class="post-rt-time">
<span class="prep">at</span><span class="time"></span>
</div>
</div>
<!-- template for user links in message (open profile modal) -->
<a id="msg-user-link-template" class="open-profile-modal"></a>
<!-- template for user links in message (open profile modal) -->
<a id="external-page-link-template" rel="nofollow" target="_blank"></a>
<!-- template for user links in message (open profile modal) -->
<a id="hashtag-link-template" class="open-hashtag-modal"></a>
<!-- template para ir dentro de avatar-row -->
<a id="avatar-row-template" class="open-profile-modal" href="">
<img class="size24" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="user-name-tooltip"></span>
</a>
<li class="descendant module post">
</li>
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
<span class="minimize-modal"><b>_</b></span>
<span id="closeModal" class="modal-close">&times;</span>
<span class="modal-back">&lt;</span>
<span class="mark-all-as-read"></span>
</div>
<div class="modal-content"></div>
<div class="modal-blackout"></div>
</div>
<div class="prompt-wrapper">
<div class="modal-header">
<h3></h3>
<span class="modal-close prompt-close">&times;</span>
</div>
<div class="modal-content"></div>
</div>
<div id="confirm-popup-template">
<div class="message"></div>
<div class="modal-buttons">
<button class="confirm"></button>
<button class="cancel"></button>
</div>
</div>
<div id="reTwist-modal-template">
<div class="post-area">
<form class="post-area-new open">
<textarea placeholder="New Post..."></textarea>
<div class="post-area-extras">
<span class="post-area-remaining">140</span>
<button class="undo-unicode disabled" disabled="disabled">undo</button>
<button class="post-submit disabled" disabled="disabled">post</button>
</div>
<div class="modal-buttons">
<span class="switch-mode">Switch to Reply</span>
<button class="modal-propagate">Retransmit</button>
</div>
</form>
</div>
</div>
<div id="reply-modal-template">
<div class="post-area">
<form class="post-area-new open">
<textarea placeholder="New Post..."></textarea>
<div class="post-area-extras">
<span class="switch-mode">Switch to Retransmit</span>
<span class="post-area-remaining">140</span>
<button class="undo-unicode disabled" disabled="disabled">undo</button>
<button class="post-submit disabled" disabled="disabled">post</button>
</div>
</form>
</div>
</div>
<!-- MODAL DE DIRECT MESSAGES INIT -->
<!-- Este modal possui dois templates, o primeiro da lista de pessoas que enviaram mensagens e o segundo
com a thread de mensagens individual -->
<div class="direct-messages-template">
<ol class="direct-messages-list">
<!-- use "dm-snippet-template here -->
</ol>
</div>
<li id="dm-snippet-template" class="module post message">
<div class="post-photo"><img src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/></div>
<div class="post-info">
<a href="#" class="post-info-name open-profile-modal"></a>
<span class="post-info-tag">@</span>
<a href="#" class="post-info-time" title=""><span></span></a>
</div>
<!-- o texto do post (restrição de caracteres?) -->
<p class="post-text"></p>
<div class="messages-qtd">0</div>
</li>
<div class="messages-thread-template">
<ol class="direct-messages-thread">
<!-- use "dm-chat-template" here -->
</ol>
</div>
<!-- cada li é uma mensagem -->
<li id="dm-chat-template" class="module post message">
<div class="post-photo"><img src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/></div>
<div class="post-info">
<a class="post-info-name open-profile-modal"></a>
<a class="post-info-time"><span class="post-info-sent"></span> <span></span></a>
</div>
<p class="post-text"></p>
</li>
<div class="dm-form-template">
<form class="post-area-new open">
<textarea placeholder="New direct message..."></textarea>
<div class="post-area-extras">
<span class="post-area-remaining">140</span>
<button class="undo-unicode disabled" disabled="disabled">undo</button>
<button title="Direct messages are encrypted, only you and receiver can read them" style="margin-right:7.5%;" class="dm-submit disabled" disabled="disabled">send</button>
</div>
</form>
</div>
<!-- MODAL DE DIRECT MESSAGES INIT -->
<div id="group-messages-profile-modal-control-template">
<div class="group-messages-control b-buttons">
<button class="new">New group</button>
<button class="join">Join group</button>
</div>
</div>
<div id="group-messages-messages-modal-control-template">
<div class="group-messages-control b-buttons">
<button class="profile">Profile</button>
<button class="invite">Invite peers</button>
<button class="leave">Leave group</button>
<div class="invite-form">
<textarea placeholder="@peer1 @peer2 …"></textarea><button disabled="disabled">Invite</button>
</div>
</div>
</div>
<div id="group-profile-modal-template">
<div class="profile-card" data-screen-name="">
<div class="profile-card-main">
<div class="profile-bio">
<input class="group-description"></input>
<button class="save a-button" disabled="disabled">Save</button>
<button class="cancel a-button">Cancel</button>
</div>
</div>
<div class="profile-card-buttons group-messages-control b-buttons">
<button class="direct-messages-with-user" disabled="disabled">Messages</button>
<button class="invite" disabled="disabled">Invite peers</button>
<button class="show-secret-key" disabled="disabled">Secret Key</button>
<button class="leave" disabled="disabled">Leave group</button>
<div class="invite-form">
<textarea placeholder="@peer1 @peer2 …"></textarea><button disabled="disabled">Invite</button>
</div>
<div class="secret-key"></div>
</div>
</div>
<div class="members"></div>
</div>
<div id="group-profile-member-template">
<div class="twister-user">
<div>
<a class="twister-user-name open-profile-modal">
<img class="twister-user-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
</a>
</div>
<div class="twister-user-info" data-screen-name="">
<a class="twister-user-name open-profile-modal">
<span class="twister-user-full"></span>
<span class="twister-user-tag"></span>
</a>
<div class="bio"></div>
</div>
</div>
</div>
<div id="group-messages-new-group-template">
<div class="module">
<div>
<p class="label">Group description</p>
<textarea class="description" placeholder="Describe group"></textarea>
</div>
<div>
<p class="label">Peers to invite</p>
<textarea class="invite" placeholder="Invite somebody"></textarea>
</div>
<div>
<button class="create" disabled="disabled">Create</button>
</div>
</div>
</div>
<div id="group-messages-join-group-template">
<div class="module">
<div>
<p class="label">Select group(s)</p>
<ul class="groups-list"></ul>
</div>
<div>
<button class="join" disabled="disabled">Join</button>
</div>
</div>
<div class="module">
<div>
<p class="label">Import secret key</p>
<input class="secret-key-import" type="textbox" placeholder="52-characters secret" size="52" rows="1"></input>
</div>
<div>
<p class="label">With group alias</p>
<input class="username-import" type="textbox" placeholder="Type group alias here" size="16" rows="1"></input>
</div>
<div>
<button class="import-secret-key" disabled="disabled">Import key</button>
</div>
</div>
</div>
<div id="groups-list-item-template">
<li>
<input type="checkbox" /> <a class="twister-user-name open-profile-modal"></a> // <span class="description"></span>
</li>
</div>
<!-- MODAL DE PROFILE -->
<div id="profile-modal-template">
<!-- ÁREA DE PROFILE PHOTO INIT -->
<div class="profile-card" data-screen-name="">
<!-- Coloquei a imagem de fundo do card do usuário como background da div
abaixo inline na tag para poder ser alterada dinamicamente
style="background: url(img/imgBack.png) no-repeat center center;"-->
<div class="profile-card-main">
<img class="profile-card-photo" src="img/grayed_avatar_placeholder_24.png"/>
<h1 class="profile-name"></h1>
<h2 class="profile-screen-name">@<b></b></h2>
<div>
<span class="profile-location"></span>
<a class="profile-url" rel="nofollow" target="_blank"></a>
</div>
<div class="profile-bio"></div>
<div id="msngrswr">
<div id="toxbtnwr" class="profile-extra-contact">
<a class="profile-tox"><span class="selectable_theme theme_nin">TOX</span></a><a class="tox-ctc"></a>
</div>
<div id="bmbtnwr" class="profile-extra-contact">
<a class="profile-bitmessage"><span class="selectable_theme theme_nin">BM</span></a><a class="bitmessage-ctc"></a>
</div>
</div>
</div>
<div class="twister-user-info">
<div class="clearfix">
<ul class="module profile-data">
<li><a href="#"><span class="posts-count">&nbsp;</span><span class="label">Posts</span></a></li>
<li><a href="#" class="open-following-modal"><span class="following-count">&nbsp;</span><span class="label">Following</span></a></li>
<li><a href="#"><span class="followers-count">&nbsp;</span><span class="label">Followers</span></a></li>
</ul>
</div>
<div class="profile-card-buttons b-buttons">
<button class="follow" href="#">Follow</button>
<button class="direct-messages-with-user" href="#">Direct Messages</button>
<button class="mentions-from-user" href="#">Mentions</button>
</div>
</div>
<div class="who-follow"></div>
</div>
<!-- ÁREA DE POSTS END -->
<!-- ÁREA DE POSTS INIT -->
<div class="postboard">
<h2>
<span>Posts</span>
<!-- o botão de novas postagens deve ser ocultado quando o usuário clicá-lo via javascript -->
<button class="postboard-news" style="display:none;"></button>
</h2>
<ol id="profile-posts" class="postboard-posts">
</ol>
</div>
<!-- ÁREA DE POSTS END -->
</div>
<!-- MODAL DE PROFILE END -->
<!-- MODAL DE HASHTAGS -->
<div id="hashtag-modal-template">
<!-- ÁREA DE POSTS INIT -->
<div class="postboard">
<h2>
Posts
<!-- o botão de novas postagens deve ser ocultado quando o usuário clicá-lo via javascript -->
<button class="postboard-news" style="display:none;"></button>
</h2>
<ol id="profile-posts" class="postboard-posts">
</ol>
</div>
<!-- ÁREA DE POSTS END -->
</div>
<!-- MODAL DE HASHTAGS END -->
<!-- MODAL DE FOLLOWING -->
<div id="following-modal-template">
<!-- ÁREA DE PROFILE PHOTO INIT -->
<h2>All users publicly followed by <span class="following-screen-name">@<b></b></span></h2>
<!-- ÁREA DE PROFILE END -->
<!-- ÁREA DE FOLLOWING INIT -->
<ol class="">
<li id="following-by-user-template" style="display: none;">
<div class="mini-following-info" data-screen-name="">
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-following-name">Fulano da Silva</span>
<span class="mini-screen-name">@
<b class="following-screen-name"></b>
</span>
</a>
</div>
</li>
</ol>
<!-- ÁREA DE FOLLOWERS END -->
</div>
<!-- MODAL DE FOLLOWING END -->
<!-- MODAL OF FOLLOWING CONFIG -->
<div id="following-config-modal-template">
<!-- ÁREA OF FOLLOWING METHOD -->
<div class="following-config-modal-content" data-screen-name="">
<h2><span class="following-config-method-message">Which way do you want to follow</span> <span class="following-screen-name">@<b></b></span>:</h2>
<div class="following-config-method-buttons">
<button class="public-following">Public</button>
<button class="public-following private">Private</button>
</div>
</div>
<!-- ÁREA OF FOLLOWING METHOD END -->
</div>
<!-- MODAL OF FOLLOWING CONFIG END -->
</div>
<!-- TEMPLATES END -->
<audio id="player"></audio>
<audio id="playerSec"></audio>
</body>
</html>

54
home.html

@ -52,7 +52,7 @@
<a class="dropdown-menu-item" href="options.html">Options</a> <a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="network.html">Network config</a> <a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a> <a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item dropdown-menu-following" href="following.html">Following users</a> <a class="dropdown-menu-item dropdown-menu-following" href="#following">Following users</a>
<a class="dropdown-menu-item" href="login.html">Change user</a> <a class="dropdown-menu-item" href="login.html">Change user</a>
<a class="dropdown-menu-item promoted-posts-only selectable_theme theme_original theme_calm" href="#">Switch to Promoted posts</a> <a class="dropdown-menu-item promoted-posts-only selectable_theme theme_original theme_calm" href="#">Switch to Promoted posts</a>
<a class="dropdown-menu-item direct-messages selectable_theme theme_original theme_calm" href="#">Direct Messages</a> <a class="dropdown-menu-item direct-messages selectable_theme theme_original theme_calm" href="#">Direct Messages</a>
@ -117,7 +117,7 @@
</div> </div>
<ul class="module profile-data"> <ul class="module profile-data">
<li><a href="#" class="open-profile-modal"><span class="posts-count">&nbsp;</span><span class="label">Posts</span></a></li> <li><a href="#" class="open-profile-modal"><span class="posts-count">&nbsp;</span><span class="label">Posts</span></a></li>
<li><a href="following.html" class="open-following-page"><span class="following-count">&nbsp;</span><span class="label">Following</span></a></li> <li><a href="#following" class="open-following-page"><span class="following-count">&nbsp;</span><span class="label">Following</span></a></li>
<li><a href="#" class="open-followers"><span class="followers-count">&nbsp;</span><span class="label">Followers</span> *</a></li> <li><a href="#" class="open-followers"><span class="followers-count">&nbsp;</span><span class="label">Followers</span> *</a></li>
</ul> </ul>
@ -357,7 +357,7 @@
</div> <!-- post-data --> </div> <!-- post-data -->
</li> <!-- post-template --> </li> <!-- post-template -->
<div id="post-rt-reference-template"> <div id="template-post-rt-reference">
<div class="post-rt-reference"> <div class="post-rt-reference">
<div class="post-photo"><img class="avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo" /></div> <div class="post-photo"><img class="avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo" /></div>
<div class="post-info"> <div class="post-info">
@ -369,7 +369,7 @@
</div> </div>
</div> </div>
<div id="post-rt-by-template"> <div id="template-post-rt-by">
<i class="post-rt-icon"></i> <i class="post-rt-icon"></i>
<div class="post-rt-sign"> <div class="post-rt-sign">
<span class="prep">twisted again by</span><a class="open-profile-modal"></a> <span class="prep">twisted again by</span><a class="open-profile-modal"></a>
@ -684,6 +684,44 @@
</div> </div>
<!-- MODAL DE HASHTAGS END --> <!-- MODAL DE HASHTAGS END -->
<div id="template-following-list">
<ol class="following-list">
<div class="loading-roller">
<div></div>
</div>
</ol>
</div>
<div id="template-following-user">
<li>
<div class="mini-profile-info">
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-profile-name">Fulano da Silva</span>
<span class="mini-screen-name">@<b class="following-screen-name"></b></span>
</a>
<div>
<div class="mini-profile-actions">
<span>Actions ▼</span>
<ul>
<li class="direct-messages-with-user">Send direct message</li>
<!-- TODO <li>Send post</li>-->
<li class="mentions-from-user">Display mentions</li>
<!-- WTF <li>Display retransmissions</li> -->
</ul>
</div>
<div class="following-config">
<button class="follow">Follow</button>
<button class="public-following">Public</button>
</div>
</div>
<div>
<span class="swarm-status" style="display: none;"></span>
</div>
</div>
</li>
</div>
<!-- MODAL DE FOLLOWING --> <!-- MODAL DE FOLLOWING -->
<div id="following-modal-template"> <div id="following-modal-template">
<!-- ÁREA DE PROFILE PHOTO INIT --> <!-- ÁREA DE PROFILE PHOTO INIT -->
@ -708,19 +746,15 @@
</div> </div>
<!-- MODAL DE FOLLOWING END --> <!-- MODAL DE FOLLOWING END -->
<!-- MODAL OF FOLLOWING CONFIG -->
<div id="following-config-modal-template"> <div id="following-config-modal-template">
<!-- ÁREA OF FOLLOWING METHOD --> <div class="following-config-modal-content">
<div class="following-config-modal-content" data-screen-name=""> <span class="following-config-method-message">Which way do you want to follow @</span>
<h2><span class="following-config-method-message">Which way do you want to follow</span> <span class="following-screen-name">@<b></b></span>:</h2>
<div class="following-config-method-buttons"> <div class="following-config-method-buttons">
<button class="public-following">Public</button> <button class="public-following">Public</button>
<button class="public-following private">Private</button> <button class="public-following private">Private</button>
</div> </div>
</div> </div>
<!-- ÁREA OF FOLLOWING METHOD END -->
</div> </div>
<!-- MODAL OF FOLLOWING CONFIG END -->
</div> </div>
<!-- TEMPLATES END --> <!-- TEMPLATES END -->

669
js/interface_common.js

@ -5,9 +5,30 @@
// Profile, mentions and hashtag modal // Profile, mentions and hashtag modal
// Post actions: submit, count characters // Post actions: submit, count characters
var twister = {
html: {
detached: $('<div>'), // here elements go to detach themself
blanka: $('<a target="_blank">') // to open stuff in new tab, see routeOnClick()
},
tmpl: {}, // templates should be detached and stored here
modal: {}
};
var window_scrollY = 0; var window_scrollY = 0;
var _watchHashChangeRelaxDontDoIt = window.location.hash === '' ? true : false; var _watchHashChangeRelaxDontDoIt = window.location.hash === '' ? true : false;
var _minimizedModals = {};
// FIXME so looks like it's wrapper over $; it's here to select and manipulate detached elements too
// and actually I'm talking about 'so called \'detached\'' elements which appended to twister.html.detached
// we may just append twister.html.detached to document instead and remove this weird shit (or I need to
// improve my google skills to find native jQuery way to dig through all detached elemets with one query)
function getElem(req) {
var elem = $(req);
var h = twister.html.detached.find(req);
for (var i = 0; i < h.length; i++)
elem[elem.length++] = h[i];
return elem;
}
function openModal(modal) { function openModal(modal) {
if (!modal.classBase) { if (!modal.classBase) {
@ -17,7 +38,8 @@ function openModal(modal) {
$('body').css('overflow', 'hidden'); $('body').css('overflow', 'hidden');
} }
$(modal.classBase + ':not(#templates *)').remove(); if (modal.classBase !== '.prompt-wrapper')
closeModal($(modal.classBase + ':not(#templates *)'), true);
modal.self = $('#templates ' + modal.classBase).clone(true) modal.self = $('#templates ' + modal.classBase).clone(true)
.addClass(modal.classAdd); .addClass(modal.classAdd);
@ -30,9 +52,14 @@ function openModal(modal) {
else else
modal.content = modal.self.find('.modal-content'); modal.content = modal.self.find('.modal-content');
modal.self.prependTo('body').fadeIn('fast'); modal.self.appendTo('body').fadeIn('fast'); // FIXME maybe it's better to append it to some container inside body
if (modal.classBase === '.modal-wrapper') { if (modal.classBase === '.modal-wrapper') {
twister.modal[window.location.hash] = modal;
modal.self.attr('data-modal-id', window.location.hash);
modal.drapper = $('<div>').appendTo(twister.html.detached); // here modal goes instead detaching
modal.content.outerHeight(modal.self.height() - modal.self.find('.modal-header').outerHeight()); modal.content.outerHeight(modal.self.height() - modal.self.find('.modal-header').outerHeight());
var windowHeight = $(window).height(); var windowHeight = $(window).height();
@ -46,9 +73,35 @@ function openModal(modal) {
return modal; return modal;
} }
function closeModal() { function closeModal(req, switchMode) {
closeModalHandler('.modal-wrapper'); if (typeof req === 'undefined')
var elem = $('.modal-wrapper:not(#templates *)'); // select active modal(s)
else if (req.jquery)
var elem = req;
else if (req.target)
var elem = getElem(req.target); // getElem() to search in minimized too
else if (typeof req === 'string' || req.outerHTML)
var elem = getElem(req);
if (!elem || !elem.length)
return;
// we close all modals which are containing element(s)
elem.closest('.modal-wrapper:not(.closed)').addClass('closed')
.fadeOut(switchMode ? 10 : 'fast', function () {
var i = this.getAttribute('data-modal-id');
if (twister.modal[i].minimized)
twister.modal[i].btnResume.fadeOut('fast', function () {this.remove();});
else
this.remove(); // if it's minimized it will be removed with twister.modal[i].drapper
twister.modal[i].drapper.remove();
twister.modal[i] = undefined;
}
);
if (!switchMode) {
if (window.location.hash !== '') { if (window.location.hash !== '') {
_watchHashChangeRelaxDontDoIt = true; _watchHashChangeRelaxDontDoIt = true;
window.location.hash = '#'; window.location.hash = '#';
@ -59,36 +112,56 @@ function closeModal() {
'margin-right': '0' 'margin-right': '0'
}); });
} }
}
function closePrompt(req) {
if (typeof req === 'undefined')
var elem = $('.prompt-wrapper:not(#templates *)');
else if (req.jquery)
var elem = req;
else if (req.target)
var elem = $(req.target);
else if (typeof req === 'string' || req.outerHTML)
var elem = $(req);
if (!elem || !elem.length)
return;
function closePrompt() { if (typeof req.stopPropagation === 'function') {
closeModalHandler('.prompt-wrapper'); req.preventDefault();
req.stopPropagation();
req = req.data;
} }
function closeModalHandler(classBase) { // we close all prompts which are containing element(s)
var modalWindows = $(classBase+':not(#templates *)'); elem.closest('.prompt-wrapper:not(.closed)').addClass('closed')
.fadeOut('fast', function() {this.remove();});
modalWindows.fadeOut('fast', function() {modalWindows.remove();}); if (req && typeof req.cbFunc === 'function') // FIXME maybe bind to ^ prompt fadeout function
req.cbFunc(req.cbReq);
} }
function minimizeModal(modal, switchMode) { function minimizeModal(modal, switchMode) {
function minimize(modal, scroll) { function minimize(modal, scroll) {
modal.detach(); var i = modal.attr('data-modal-id');
modal.appendTo(twister.modal[i].drapper);
btnResume = $('<li>' + modal.find('.modal-header h3').text() + '</li>') twister.modal[i].minimized = true;
twister.modal[i].scroll = scroll;
twister.modal[i].btnResume = $('<li>' + modal.find('.modal-header h3').text() + '</li>')
.on('click', {hashString: window.location.hash}, resumeModal) .on('click', {hashString: window.location.hash}, resumeModal)
.on('mouseup', {route: window.location.hash, blankOnly: true}, routeOnClick)
.appendTo($('#modals-minimized')) .appendTo($('#modals-minimized'))
; ;
_minimizedModals[window.location.hash] = {
self: modal,
scroll: scroll,
btnResume: btnResume
};
} }
if (modal.is('.closed')) return;
var scroll; // MUST be setted before modal.detach(), modal.fadeOut() and so on var scroll; // MUST be setted before modal.detach(), modal.fadeOut() and so on
if (modal.is('.directMessages') || modal.is('.group-messages-new-group') if (modal.is('.directMessages') || modal.is('.group-messages-new-group')
|| modal.is('.group-messages-join-group')) { || modal.is('.group-messages-join-group') || modal.is('.following-own-modal')) {
scroll = { scroll = {
targetSelector: '.modal-content', targetSelector: '.modal-content',
top: modal.find('.modal-content').scrollTop() top: modal.find('.modal-content').scrollTop()
@ -123,10 +196,9 @@ function minimizeModal(modal, switchMode) {
} }
function resumeModal(event) { function resumeModal(event) {
var elemEvent = $(event.target); $(event.target).fadeOut('fast', function () {this.remove();});
elemEvent.fadeOut('fast', function () {elemEvent.remove();});
var modalActive = $('.modal-wrapper:not(#templates *)'); var modalActive = $('.modal-wrapper:not(#templates *)').not('.closed');
if (modalActive.length) if (modalActive.length)
minimizeModal(modalActive, true); minimizeModal(modalActive, true);
else { else {
@ -134,9 +206,10 @@ function resumeModal(event) {
$('body').css('overflow', 'hidden'); $('body').css('overflow', 'hidden');
} }
var modal = _minimizedModals[event.data.hashString]; var modal = twister.modal[event.data.hashString];
if (modal) { if (modal.self.not('.closed') && modal.minimized) {
_minimizedModals[event.data.hashString] = undefined; modal.minimized = false;
modal.btnResume = undefined;
if (window.location.hash !== event.data.hashString) { if (window.location.hash !== event.data.hashString) {
_watchHashChangeRelaxDontDoIt = true; _watchHashChangeRelaxDontDoIt = true;
window.location.hash = event.data.hashString; window.location.hash = event.data.hashString;
@ -146,35 +219,39 @@ function resumeModal(event) {
if (modal.scroll) if (modal.scroll)
modal.self.find($(modal.scroll.targetSelector).scrollTop(modal.scroll.top)); modal.self.find($(modal.scroll.targetSelector).scrollTop(modal.scroll.top));
if (modal.resume && typeof modal.resume.cbFunc === 'function') if (typeof modal.onResume === 'function')
modal.resume.cbFunc(modal.resume.cbArg); modal.onResume(modal.onResumeReq);
}); });
} }
} }
function focusModalWithElement(elem, cbFunc, cbArg) { function focusModalWithElement(elem, cbFunc, cbReq) {
if (elem.jquery ? elem.is('html *') : $(elem).is('html *')) { if (elem.jquery ? elem.is('html *') : $(elem).is('html *')) {
if (typeof cbFunc === 'function') if (typeof cbFunc === 'function')
cbFunc(cbArg); cbFunc(cbReq);
return true; return true;
} }
var hash = getHashOfMinimizedModalWithElem(elem); var i = getHashOfMinimizedModalWithElem(elem);
if (hash) { if (i) {
_minimizedModals[hash].resume = {cbFunc: cbFunc, cbArg: cbArg}; if (typeof i === 'object') i = i[0]; // several modals, but only one may be active currently
_minimizedModals[hash].btnResume.click(); twister.modal[i].onResume = cbFunc;
twister.modal[i].onResumeReq = cbReq;
twister.modal[i].btnResume.click();
return true; return true;
} }
return false; return false;
} }
function getHashOfMinimizedModalWithElem(elem) { function getHashOfMinimizedModalWithElem(req) {
for (var i in _minimizedModals) var hashes = [];
if (_minimizedModals[i] && _minimizedModals[i].self.find(elem).length)
return i;
return ''; for (var i in twister.modal)
if (twister.modal[i] && twister.modal[i].minimized && twister.modal[i].drapper.find(req).length)
hashes[hashes.length++] = i;
return hashes.length > 1 ? hashes : hashes[0];
} }
function isModalWithElemExists(elem) { function isModalWithElemExists(elem) {
@ -184,90 +261,97 @@ function isModalWithElemExists(elem) {
return getHashOfMinimizedModalWithElem(elem) ? true : false; return getHashOfMinimizedModalWithElem(elem) ? true : false;
} }
function confirmPopup(event, req) { function confirmPopup(req) {
if (event && event.stopPropagation) { if (!req) return;
event.stopPropagation();
if (!req && event.data) if (typeof req.stopPropagation === 'function') {
req = event.data; req.preventDefault();
req.stopPropagation();
if (req.data)
req = req.data;
else
return;
} }
var modal = openModal({ var modal = openModal({
classBase: '.prompt-wrapper', classBase: '.prompt-wrapper',
classAdd: 'confirm-popup', classAdd: 'confirm-popup',
content: $('#confirm-popup-template').children().clone(true), content: $('#confirm-popup-template').children().clone(true),
title: req.titleTxt title: req.txtTitle
}); });
if (req.messageTxt) if (req.txtMessage)
modal.content.find('.message').html(htmlFormatMsg(req.messageTxt, {markout: 'apply'}).html); modal.content.find('.message').html(htmlFormatMsg(req.txtMessage, {markout: 'apply'}).html);
var btn = modal.content.find('.confirm'); var btn = modal.content.find('.confirm');
if (req.removeConfirm) if (req.removeConfirm)
btn.remove(); btn.remove();
else { else {
if (req.confirmTxt) if (req.txtConfirm)
btn.text(req.confirmTxt); btn.text(req.txtConfirm);
else else
btn.text(polyglot.t('Confirm')); btn.text(polyglot.t('Confirm'));
if (req.confirmFunc) {
btn.on('click', function () { if (req.cbConfirm)
closePrompt(); btn.on('click', {cbFunc: req.cbConfirm, cbReq: req.cbConfirmReq}, closePrompt);
req.confirmFunc(req.confirmFuncArgs); else
});
} else
btn.on('click', closePrompt); btn.on('click', closePrompt);
} }
var btn = modal.content.find('.cancel'); var btn = modal.content.find('.cancel');
if (req.removeCancel) if (req.removeCancel)
btn.remove(); btn.remove();
else { else {
if (req.cancelTxt) if (req.txtCancel)
btn.text(req.cancelTxt); btn.text(req.txtCancel);
else else
btn.text(polyglot.t('Cancel')); btn.text(polyglot.t('Cancel'));
if (req.cancelFunc) {
btn.on('click', function () { if (req.cbCancel)
closePrompt(); btn.on('click', {cbFunc: req.cbCancel, cbReq: req.cbCancelReq}, closePrompt);
req.cancelFunc(req.cancelFuncArgs); else
});
} else
btn.on('click', closePrompt); btn.on('click', closePrompt);
} }
var btn = modal.self.find('.prompt-close'); var btn = modal.self.find('.prompt-close');
if (req.removeClose) if (req.removeClose)
btn.remove(); btn.remove();
else { else {
if (req.closeFunc) { if (req.cbClose) {
if (typeof req.closeFunc === 'string') { if (typeof req.cbClose === 'string')
if (req.closeFunc === 'confirmFunc') { if (req.cbClose === 'cbConfirm') {
req.closeFunc = req.confirmFunc; req.cbClose = req.cbConfirm;
req.closeFuncArgs = req.confirmFuncArgs; req.cbCloseReq = req.cbConfirmReq;
} else if (req.closeFunc === 'cancelFunc') { } else if (req.cbClose === 'cbCancel') {
req.closeFunc = req.cancelFunc; req.cbClose = req.cbCancel;
req.closeFuncArgs = req.cancelFuncArgs; req.cbCloseReq = req.cbCancelReq;
} }
}
btn.on('click', function () { btn.on('click', {cbFunc: req.cbClose, cbReq: req.cbCloseReq}, closePrompt);
closePrompt(); }
req.closeFunc(req.closeFuncArgs);
});
} }
} }
function alertPopup(req) {
if (!req) return;
if (!req.txtConfirm)
req.txtConfirm = polyglot.t('btn_ok');
req.removeCancel = true;
confirmPopup(req);
} }
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) { function checkNetworkStatusAndAskRedirect(cbFunc, cbReq) {
networkUpdate(function(args) { networkUpdate(function(req) {
if (!twisterdConnectedAndUptodate) { if (!twisterdConnectedAndUptodate) {
confirmPopup(null, { confirmPopup({
messageTxt: polyglot.t('confirm_switch_to_network', {page: '/network.html'}), txtMessage: polyglot.t('confirm_switch_to_network', {page: '/network.html'}),
confirmFunc: $.MAL.goNetwork cbConfirm: $.MAL.goNetwork
}); });
} else { } else {
if (args.cbFunc) if (req.cbFunc)
args.cbFunc(args.cbArg); req.cbFunc(req.cbReq);
} }
}, {cbFunc:cbFunc,cbArg:cbArg}); }, {cbFunc: cbFunc, cbReq: cbReq});
} }
function timeGmtToText(t) { function timeGmtToText(t) {
@ -335,10 +419,10 @@ function openGroupProfileModalWithNameHandler(groupAlias) {
elemFitNextIntoParentHeight(modal.content.find('.profile-card')); elemFitNextIntoParentHeight(modal.content.find('.profile-card'));
} }
function openUserProfileModalWithNameHandler(username) { function openUserProfileModalWithNameHandler(peerAlias) {
var content = $('#profile-modal-template').children().clone(true); var content = $('#profile-modal-template').children().clone(true);
updateProfileData(content, username); updateProfileData(content, peerAlias);
// FIXME following ctc could be part of updateProfileData() when mobile will be ready for this // FIXME following ctc could be part of updateProfileData() when mobile will be ready for this
content.find('.tox-ctc').attr('title', polyglot.t('Copy to clipboard')); content.find('.tox-ctc').attr('title', polyglot.t('Copy to clipboard'));
content.find('.bitmessage-ctc').attr('title', polyglot.t('Copy to clipboard')); content.find('.bitmessage-ctc').attr('title', polyglot.t('Copy to clipboard'));
@ -346,17 +430,14 @@ function openUserProfileModalWithNameHandler(username) {
var modal = openModal({ var modal = openModal({
classAdd: 'profile-modal', classAdd: 'profile-modal',
content: content, content: content,
title: polyglot.t('users_profile', {username: username}) title: polyglot.t('users_profile', {username: peerAlias})
}); });
// setup follow button in profile modal window toggleFollowButton({
var button = modal.content.find('.profile-card-buttons .follow'); button: modal.content.find('.profile-card-buttons .follow'),
if (button) { peerAlias: peerAlias,
if (followingUsers.indexOf(username) !== -1) toggleUnfollow: followingUsers.indexOf(peerAlias) !== -1 ? true : false
toggleFollowButton(username, true, function() {setTimeout(loadModalFromHash, 500);}); });
else
button.on('click', userClickFollow);
}
elemFitNextIntoParentHeight(modal.content.find('.profile-card')); elemFitNextIntoParentHeight(modal.content.find('.profile-card'));
@ -405,35 +486,38 @@ function updateQueryModal(req) {
requestQuery(req); requestQuery(req);
} }
function openMentionsModal(e) { function openMentionsModal(event) {
if (e && e.stopPropagation) { if (event && typeof event.stopPropagation === 'function') {
e.stopPropagation(); event.preventDefault();
e.preventDefault(); event.stopPropagation();
} }
var userInfo = $(this).closest('[data-screen-name]'); var userInfo = $(this).closest('[data-screen-name]');
if (userInfo.length) if (userInfo.length)
var username = userInfo.attr('data-screen-name'); var peerAlias = userInfo.attr('data-screen-name');
else if (defaultScreenName) else if (defaultScreenName)
var username = defaultScreenName; var peerAlias = defaultScreenName;
else { else {
alert(polyglot.t('No one can mention you because you are not logged in.')); alertPopup({
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
txtMessage: polyglot.t('No one can mention you because you are not logged in.')
});
return; return;
} }
window.location.hash = '#mentions?user=' + username; window.location.hash = '#mentions?user=' + peerAlias;
} }
function openMentionsModalHandler(username) { function openMentionsModalHandler(peerAlias) {
var modal = openModal({ var modal = openModal({
classAdd: 'hashtag-modal', classAdd: 'hashtag-modal',
content: $('#hashtag-modal-template').children().clone(true), content: $('#hashtag-modal-template').children().clone(true),
title: polyglot.t('users_mentions', {username: username}) title: polyglot.t('users_mentions', {username: peerAlias})
}); });
setupQueryModalUpdating(modal.content.find('.postboard-posts'), username, 'mention'); setupQueryModalUpdating(modal.content.find('.postboard-posts'), peerAlias, 'mention');
if (username === defaultScreenName) { if (peerAlias === defaultScreenName) {
// obtain already cached mention posts from twister_newmsgs.js // obtain already cached mention posts from twister_newmsgs.js
processQuery({ processQuery({
postboard: modal.content.find('.postboard-posts'), postboard: modal.content.find('.postboard-posts'),
@ -445,17 +529,73 @@ function openMentionsModalHandler(username) {
} }
} }
function openFollowingModal(username) { function openFollowingModal(peerAlias) {
var content = $('#following-modal-template').children().clone(true); if (!peerAlias || peerAlias === defaultScreenName) {
if (!defaultScreenName) {
content.find('.following-screen-name b').text(username); alertPopup({
loadFollowingIntoList(username, content.closest('ol')); //txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
txtMessage: polyglot.t('You are not following anyone because you are not logged in.')
});
history.back();
return;
}
openModal({ var modal = openModal({
classAdd: 'following-own-modal',
content: twister.tmpl.followingList.clone(true),
title: polyglot.t('Following')
});
showFollowingUsers(modal.content.find('.following-list'));
requestSwarmProgress();
} else {
var modal = openModal({
classAdd: 'following-modal', classAdd: 'following-modal',
content: content, content: $('#following-modal-template').children().clone(true),
title: polyglot.t('followed_by', {username: username}) title: polyglot.t('followed_by', {username: peerAlias})
}); });
modal.content.find('.following-screen-name b').text(peerAlias);
loadFollowingIntoList(peerAlias, modal.content.find('ol'));
}
}
function showFollowingUsers(followingList) {
if (followingEmptyOrMyself())
$.MAL.warnFollowingNotAny(closeModal, followingList);
else
for (var i = 0; i < followingUsers.length; i++)
addToFollowingList(followingList, followingUsers[i]);
$.MAL.followingListLoaded(followingList);
}
function addToFollowingList(followingList, peerAlias) {
var item = twister.tmpl.followingUser.clone(true).attr('data-peer-alias', peerAlias);
item.find('.mini-profile-info').attr('data-screen-name', peerAlias)
item.find('.following-screen-name').text(peerAlias);
item.find('a.open-profile-modal').attr('href', $.MAL.userUrl(peerAlias));
item.find('.direct-messages-with-user').text(polyglot.t('send_DM'))
.on('mouseup', {route: $.MAL.dmchatUrl(peerAlias)}, routeOnClick);
item.find('.mentions-from-user').text(polyglot.t('display_mentions'))
.on('mouseup', {route: $.MAL.mentionsUrl(peerAlias)}, routeOnClick);
getAvatar(peerAlias, item.find('.mini-profile-photo'));
getFullname(peerAlias, item.find('.mini-profile-name'));
if (peerAlias === defaultScreenName)
item.find('following-config').hide();
toggleFollowButton({
button: item.find('.follow'),
peerAlias: peerAlias,
toggleUnfollow: true
});
var elem = item.find('.public-following').on('click', followingListPublicCheckbox);
if (isPublicFollowing(peerAlias))
elem.text(polyglot.t('Public'));
else
elem.text(polyglot.t('Private')).addClass('private');
item.prependTo(followingList);
} }
function fillWhoToFollowModal(list, hlist, start) { function fillWhoToFollowModal(list, hlist, start) {
@ -517,10 +657,10 @@ function openWhoToFollowModal() {
fillWhoToFollowModal(tmplist, hlist, 0); fillWhoToFollowModal(tmplist, hlist, 0);
} }
function newConversationModal(username, resource) { function newConversationModal(peerAlias, resource) {
var content = $('#hashtag-modal-template').children().clone(true); var content = $('#hashtag-modal-template').children().clone(true);
requestPost(content.find('.postboard-posts'), username, resource, requestPost(content.find('.postboard-posts'), peerAlias, resource,
function(args) { function(args) {
var postboard = args.content.find('.postboard-posts'); var postboard = args.content.find('.postboard-posts');
var postLi = postboard.children().first() var postLi = postboard.children().first()
@ -532,27 +672,42 @@ function newConversationModal(username, resource) {
return content; return content;
} }
function openConversationClick(e) { function openConversationClick(event) {
e.stopPropagation(); event.preventDefault();
e.preventDefault(); event.stopPropagation();
var postData = $(this).closest(e.data.feeder); var elem = $(event.target);
var postData = elem.closest(event.data.feeder);
window.location.hash = '#conversation?post=' + postData.attr('data-screen-name') + event.data.route = '#conversation?post=' + postData.attr('data-screen-name')
':post' + postData.attr('data-id'); + ':post' + postData.attr('data-id');
routeOnClick(event);
} }
function openConversationModal(username, resource) { function openConversationModal(peerAlias, resource) {
openModal({ openModal({
classAdd: 'conversation-modal', classAdd: 'conversation-modal',
content: newConversationModal(username, resource), content: newConversationModal(peerAlias, resource),
title: polyglot.t('conversation_title', {username: username}) title: polyglot.t('conversation_title', {username: peerAlias})
}); });
} }
function watchHashChange(e) { function routeOnClick(event) {
if (e != null) { if (!event || !event.data || !event.data.route)
var prevurlsplit = e.oldURL.split('#'); return;
event.stopPropagation();
event.preventDefault();
if (event.button === 0 && !event.data.blankOnly) // left mouse button
window.location = event.data.route;
else if (event.button === 1) // middle mouse button
twister.html.blanka.attr('href', event.data.route)[0].click();
}
function watchHashChange(event) {
if (typeof event !== 'undefined') {
var prevurlsplit = event.oldURL.split('#');
var prevhashstring = prevurlsplit[1]; var prevhashstring = prevurlsplit[1];
// FIXME need to move back button handling to special function and call it in openModal() and resumeModal() // FIXME need to move back button handling to special function and call it in openModal() and resumeModal()
@ -575,17 +730,18 @@ function watchHashChange(e) {
} }
function loadModalFromHash() { function loadModalFromHash() {
if (_minimizedModals[window.location.hash]) { var i = window.location.hash;
if (twister.modal[i] && twister.modal[i].minimized) {
// need to remove active modal before btnResume.click() or it will be minimized in resumeModal() // need to remove active modal before btnResume.click() or it will be minimized in resumeModal()
// e.g. for case when you click on profile link in some modal having this profile's modal minimized already // e.g. for case when you click on profile link in some modal having this profile's modal minimized already
$('.modal-wrapper:not(#templates *)').remove(); $('.modal-wrapper:not(#templates *)').remove();
_minimizedModals[window.location.hash].btnResume.click(); twister.modal[i].btnResume.click();
return; return;
} }
var hashstring = decodeURIComponent(window.location.hash); var hashstring = decodeURIComponent(window.location.hash);
if (hashstring === '') { if (hashstring === '') {
closeModal(); closeModal(); // close active modal(s)
return; return;
} }
var hashdata = hashstring.split(':'); var hashdata = hashstring.split(':');
@ -618,6 +774,8 @@ function loadModalFromHash() {
} }
} else if (hashstring === '#directmessages') } else if (hashstring === '#directmessages')
directMessagesPopup(); directMessagesPopup();
else if (hashstring === '#following')
openFollowingModal();
else if (hashstring === '#groupmessages') else if (hashstring === '#groupmessages')
openGroupMessagesModal(); openGroupMessagesModal();
else if (hashstring === '#groupmessages+newgroup') else if (hashstring === '#groupmessages+newgroup')
@ -649,7 +807,10 @@ function reTwistPopup(event, post, textArea) {
event.stopPropagation(); event.stopPropagation();
if (!defaultScreenName) { if (!defaultScreenName) {
alert(polyglot.t('You have to log in to retransmit messages.')); alertPopup({
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
txtMessage: polyglot.t('You have to log in to retransmit messages.')
});
return; return;
} }
@ -669,8 +830,13 @@ function reTwistPopup(event, post, textArea) {
modal.content.find('.switch-mode') modal.content.find('.switch-mode')
.text(polyglot.t('Switch to Reply')) .text(polyglot.t('Switch to Reply'))
.on('click', (function(event) {replyInitPopup(event, post, .on('click', {post: post},
$(event.target).closest('form').find('textarea').detach());}).bind(post)) function(event) {
var textArea = $(event.target).closest('form').find('textarea').detach();
closePrompt(event.target);
replyInitPopup(event, event.data.post, textArea);
}
)
; ;
var replyArea = modal.content.find('.post-area .post-area-new'); var replyArea = modal.content.find('.post-area .post-area-new');
@ -707,8 +873,13 @@ function replyInitPopup(e, post, textArea) {
modal.content.find('.switch-mode') modal.content.find('.switch-mode')
.text(polyglot.t('Switch to Retransmit')) .text(polyglot.t('Switch to Retransmit'))
.on('click', (function(event) {reTwistPopup(event, post, .on('click', {post: post},
$(event.target).closest('form').find('textarea').detach())}).bind(post)) function(event) {
var textArea = $(event.target).closest('form').find('textarea').detach();
closePrompt(event.target);
reTwistPopup(event, event.data.post, textArea);
}
)
; ;
var replyArea = modal.content.find('.post-area .post-area-new').addClass('open'); var replyArea = modal.content.find('.post-area .post-area-new').addClass('open');
@ -734,46 +905,142 @@ function closeThis() {
$(this).slideUp('fast'); $(this).slideUp('fast');
} }
function toggleFollowButton(username, toggleUnfollow, bindFunc) { function toggleFollowButton(req) {
if (!username) if (!req || !req.peerAlias)
return; return;
if (toggleUnfollow) { if (req.toggleUnfollow) {
$('[data-screen-name="'+username+'"]').find('.follow') if (!req.button || !req.button.jquery)
req.button = getElem('[data-screen-name="' + req.peerAlias + '"]').find('.follow');
req.button
.text(polyglot.t('Unfollow'))
.removeClass('follow') .removeClass('follow')
.addClass('unfollow') .addClass('unfollow')
.off('click') .off('click')
.on('click', .on('click', {peerAlias: req.peerAlias}, clickUnfollow)
(function(e) {
e.stopPropagation();
unfollow(this.username.toString(),
(function() {
toggleFollowButton(this.username);
if (this.bindFunc)
this.bindFunc;
}).bind({username: this.username, bindFunc: this.bindFunc})
);
}).bind({username: username, bindFunc: bindFunc})
)
.text(polyglot.t('Unfollow'))
.trigger('eventToggleUnfollow')
; ;
} else { } else {
$('[data-screen-name="'+username+'"]').find('.unfollow') if (!req.button || !req.button.jquery)
req.button = getElem('[data-screen-name="' + req.peerAlias + '"]').find('.unfollow');
req.button
.text(polyglot.t('Follow'))
.removeClass('unfollow') .removeClass('unfollow')
.addClass('follow') .addClass('follow')
.off('click') .off('click')
.on('click', .on('click', {peerAlias: req.peerAlias}, clickFollow)
(function(e) { ;
userClickFollow(e); }
if (this.bindFunc) }
this.bindFunc;
}).bind({bindFunc: bindFunc}) function clickFollow(event) {
) event.preventDefault();
.text(polyglot.t('Follow')) event.stopPropagation();
.trigger('eventToggleFollow');
if (!defaultScreenName) {
alertPopup({
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
txtMessage: polyglot.t('You have to log in to follow users.')
});
return;
} }
var peerAlias = (event.data && event.data.peerAlias) ? event.data.peerAlias
: $(event.target).closest('[data-screen-name]').attr('data-screen-name');
var content = $('#following-config-modal-template').children().clone(true);
content.closest('.following-config-modal-content').attr('data-screen-name', peerAlias);
content.find('.following-config-method-message')
.html(htmlFormatMsg(polyglot.t('select_way_to_follow_@', {alias: peerAlias}), {markout: 'apply'}).html);
content.find('.following-screen-name b').text(peerAlias);
openModal({
classBase: '.prompt-wrapper', // FIXME it will be modal with advanced following set up in future
classAdd: 'following-config-modal',
content: content,
title: polyglot.t('Following config')
});
}
function clickUnfollow(event) {
event.preventDefault();
event.stopPropagation();
var peerAlias = (event.data && event.data.peerAlias) ? event.data.peerAlias
: $(event.target).closest('[data-screen-name]').attr('data-screen-name');
confirmPopup({
txtMessage: polyglot.t('confirm_unfollow_@', {alias: peerAlias}),
cbConfirm: function (peerAlias) {
unfollow(peerAlias,
function(req) {
$('.mini-profile .following-count').text(followingUsers.length - 1);
$('.wrapper .postboard .post').each(function() {
var elem = $(this);
if ((elem.find('[data-screen-name="' + req.peerAlias + '"]').length
&& !elem.find(".post-rt-by .open-profile-modal").text())
|| elem.find(".post-rt-by .open-profile-modal").text() === '@' + req.peerAlias)
elem.remove();
}); // FIXME also need to check list of pending posts to remove from there
toggleFollowButton({peerAlias: req.peerAlias});
var followingList = getElem('.following-own-modal .following-list');
if (followingList.length)
followingList.find('li[data-peer-alias="' + req.peerAlias + '"]').remove();
}, {peerAlias: peerAlias}
);
},
cbConfirmReq: peerAlias
});
}
function setFollowingMethod(event) {
event.preventDefault();
event.stopPropagation();
var button = $(event.target);
var peerAlias = button.closest('.following-config-modal-content').attr('data-screen-name');
follow(peerAlias, button.hasClass('private') ? false : true,
function(req) {
$('.mini-profile .following-count').text(followingUsers.length - 1);
setTimeout(requestTimelineUpdate, 1000, 'latest', postsPerRefresh, [req.peerAlias], promotedPostsOnly);
toggleFollowButton({peerAlias: req.peerAlias, toggleUnfollow: req.toggleUnfollow});
var followingList = getElem('.following-own-modal .following-list');
if (followingList.length)
addToFollowingList(followingList, req.peerAlias);
}, {peerAlias: peerAlias, toggleUnfollow: true}
);
}
function followingListPublicCheckbox(event) {
event.preventDefault();
event.stopPropagation();
var tickSelection = function (req) {
if (req.isPublic === req.wasPublic) return;
var elem = $('.mini-profile-info[data-screen-name="' + req.peerAlias + '"] .public-following');
elem.toggleClass('private');
if (!req.isPublic)
elem.text(polyglot.t('Private'));
else
elem.text(polyglot.t('Public'));
//console.log('set following method of @' + peerAlias + ' for ' + isPublic);
follow(req.peerAlias, req.isPublic);
};
var elem = $(event.target);
var peerAlias = elem.closest('.mini-profile-info').attr('data-screen-name');
var wasPublic = !elem.hasClass('private');
confirmPopup({
txtMessage: polyglot.t('select_way_to_follow_@', {alias: peerAlias}),
txtConfirm: polyglot.t('Public'),
cbConfirm: tickSelection,
cbConfirmReq: {isPublic: true, wasPublic: wasPublic, peerAlias: peerAlias},
txtCancel: polyglot.t('Private'),
cbCancel: tickSelection,
cbCancelReq: {isPublic: false, wasPublic: wasPublic, peerAlias: peerAlias}
});
} }
function postExpandFunction(e, postLi) { function postExpandFunction(e, postLi) {
@ -825,23 +1092,26 @@ function postExpandFunction(e, postLi) {
e.stopPropagation(); e.stopPropagation();
} }
function postReplyClick(e) { function postReplyClick(event) {
if (!defaultScreenName) { if (!defaultScreenName) {
e.stopPropagation(); event.stopPropagation();
alert(polyglot.t('You have to log in to post replies.')); alertPopup({
//txtTitle: polyglot.t(''), add some title (not 'error', please) or just KISS
txtMessage: polyglot.t('You have to log in to post replies.')
});
return; return;
} }
var post = $(this).closest('.post'); var post = $(this).closest('.post');
if (!post.hasClass('original')) if (!post.hasClass('original'))
replyInitPopup(e, $.evalJSON(post.find('.post-data').attr('data-userpost'))); replyInitPopup(event, $.evalJSON(post.find('.post-data').attr('data-userpost')));
else { else {
if (!post.closest('.post.open').length) if (!post.closest('.post.open').length)
postExpandFunction(e, post); postExpandFunction(event, post);
composeNewPost(e, post.find('.post-area-new')); composeNewPost(event, post.find('.post-area-new'));
} }
e.stopPropagation(); event.stopPropagation();
} }
// Expande Área do Novo post // Expande Área do Novo post
@ -1588,7 +1858,7 @@ function postSubmit(e, oldLastPostId) {
} }
if (btnPostSubmit.closest('.prompt-wrapper').length) if (btnPostSubmit.closest('.prompt-wrapper').length)
closePrompt(); closePrompt(btnPostSubmit);
else { else {
textArea.val('').attr('placeholder', polyglot.t('Your message was sent!')); textArea.val('').attr('placeholder', polyglot.t('Your message was sent!'));
btnPostSubmit.closest('form').find('.post-area-remaining').text('140'); btnPostSubmit.closest('form').find('.post-area-remaining').text('140');
@ -1601,13 +1871,14 @@ function postSubmit(e, oldLastPostId) {
} }
} }
function retweetSubmit(e) { function retweetSubmit(event) {
e.stopPropagation(); event.preventDefault();
e.preventDefault(); event.stopPropagation();
newRtMsg($(this).closest('.prompt-wrapper').find('.post-data')); var prompt = $(event.target).closest('.prompt-wrapper');
closePrompt(); newRtMsg(prompt.find('.post-data'));
closePrompt(prompt);
} }
function changeStyle() { function changeStyle() {
@ -1680,13 +1951,7 @@ function replaceDashboards() {
} }
function initInterfaceCommon() { function initInterfaceCommon() {
$('.modal-close, .modal-blackout').not('.prompt-close').on('click', function() { $('.modal-close, .modal-blackout').not('.prompt-close').on('click', closeModal);
if ($('.modal-content').attr('style') != undefined)
$('.modal-content').removeAttr('style');
$('.modal-back').css('display', 'none');
$('.mark-all-as-read').css('display', 'none');
closeModal();
});
$('.minimize-modal').on('click', function (event) { $('.minimize-modal').on('click', function (event) {
minimizeModal($(event.target).closest('.modal-wrapper')); minimizeModal($(event.target).closest('.modal-wrapper'));
@ -1696,13 +1961,12 @@ function initInterfaceCommon() {
$('.prompt-close').on('click', closePrompt); $('.prompt-close').on('click', closePrompt);
/* $('button.follow').on('click', clickFollow);
$('.modal-back').on('click', function() {
if ($('.modal-content .direct-messages-list')[0]) return; $('.following-config-method-buttons .public-following').on('click', function(event) {
directMessagesPopup(); setFollowingMethod(event);
$('.modal-content').removeAttr('style'); closePrompt(event);
}); });
*/
$('.post-text').on('click', 'a', function(e) {e.stopPropagation();}); $('.post-text').on('click', 'a', function(e) {e.stopPropagation();});
$('.post-reply').on('click', postReplyClick); $('.post-reply').on('click', postReplyClick);
@ -1726,7 +1990,7 @@ function initInterfaceCommon() {
; ;
$('.post-submit').on('click', postSubmit); $('.post-submit').on('click', postSubmit);
$('.modal-propagate').on('click', retweetSubmit); $('.modal-propagate').on('click', retweetSubmit);
$('.expanded-content .show-more').on('click', $('.expanded-content .show-more').on('mouseup',
{feeder: '.module.post.original.open .module.post.original .post-data'}, openConversationClick); {feeder: '.module.post.original.open .module.post.original .post-data'}, openConversationClick);
if ($.Options.unicodeConversion.val === 'disable') if ($.Options.unicodeConversion.val === 'disable')
@ -1792,6 +2056,10 @@ function initInterfaceCommon() {
} }
} }
function extractTemplate(selector) {
return $(selector).appendTo(twister.html.detached).children();
}
function promptCopyAttrData(event) { function promptCopyAttrData(event) {
window.prompt(polyglot.t('copy_to_clipboard'), $(event.target).attr('data')); window.prompt(polyglot.t('copy_to_clipboard'), $(event.target).attr('data'));
} }
@ -1855,14 +2123,17 @@ function setTextcompleteDropdownListPos(position) {
return this; return this;
} }
$(document).ready(function() $(document).ready(function () {
{ twister.html.blanka.appendTo('body').hide();
twister.tmpl.followingList = extractTemplate('#template-following-list');
twister.tmpl.followingUser = extractTemplate('#template-following-user');
twister.tmpl.postRtReference = extractTemplate('#template-post-rt-reference')
.on('mouseup', {feeder: '.post-rt-reference'}, openConversationClick);
twister.tmpl.postRtBy = extractTemplate('#template-post-rt-by');
var path = window.location.pathname; var path = window.location.pathname;
var page = path.split("/").pop(); var page = path.split("/").pop();
if (page.indexOf("following.html") === 0) { if (page.indexOf("login.html") === 0) {
initInterfaceFollowing();
initHashWatching();
} else if (page.indexOf("login.html") === 0) {
initInterfaceLogin(); initInterfaceLogin();
} else if (page.indexOf("network.html") === 0) { } else if (page.indexOf("network.html") === 0) {
initInterfaceNetwork(); initInterfaceNetwork();

16
js/interface_home.js

@ -100,22 +100,6 @@ 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) {
$('.mini-profile .following-count').text(followingUsers.length - 1);
setTimeout(requestTimelineUpdate, 1000, 'latest', postsPerRefresh, [user], promotedPostsOnly);
})
.on('eventUnfollow', function(e, user) {
$('.mini-profile .following-count').text(followingUsers.length - 1);
$('.wrapper .postboard .post').each( function() {
var elem = $(this);
if ((elem.find('[data-screen-name="' + user + '"]').length
&& !elem.find(".post-rt-by .open-profile-modal").text())
|| elem.find(".post-rt-by .open-profile-modal").text() === '@' + user)
elem.remove();
});
});
if ($.Options.WhoToFollow.val === 'enable') if ($.Options.WhoToFollow.val === 'enable')
initWhoToFollow(); initWhoToFollow();
else else

108
js/interface_localization.js

@ -53,6 +53,7 @@ if(preferredLanguage == "en"){
"If you stay in this page your actions may not work.\n" + "If you stay in this page your actions may not work.\n" +
"Do you want to check [Network Status page](%{page}) instead?", "Do you want to check [Network Status page](%{page}) instead?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Change user", "Change user": "Change user",
"Checking...": "Checking...", // checking if username is available "Checking...": "Checking...", // checking if username is available
"Collapse": "Collapse", // smaller view of a post "Collapse": "Collapse", // smaller view of a post
@ -68,7 +69,7 @@ if(preferredLanguage == "en"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Direct messages with %{username}", "direct_messages_with": "Direct messages with %{username}",
"Disable": "Disable", "Disable": "Disable",
"Display mentions to @": "Display mentions to @", "display_mentions": "Display mentions",
"Display retransmissions": "Display retransmissions", "Display retransmissions": "Display retransmissions",
"DNS to obtain list of peers:": "DNS to obtain list of peers:", "DNS to obtain list of peers:": "DNS to obtain list of peers:",
"downloading_block_chain": "Downloading block chain, please wait before continuing (block chain is %{days} days old).", "downloading_block_chain": "Downloading block chain, please wait before continuing (block chain is %{days} days old).",
@ -84,7 +85,7 @@ if(preferredLanguage == "en"){
"File APIs not supported in this browser.": "File APIs not supported in this browser.", "File APIs not supported in this browser.": "File APIs not supported in this browser.",
"Follow": "Follow", "Follow": "Follow",
"Following config": "Following config", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Followed by", "Followed by": "Followed by",
"followed_by": "Followed by %{username}", "followed_by": "Followed by %{username}",
"Followers": "Followers", "Followers": "Followers",
@ -126,6 +127,7 @@ if(preferredLanguage == "en"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "nobody", // used to promote a post without attaching the user "nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Not available", // username is not available "Not available": "Not available", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.", "notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.", "notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.", "notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
@ -159,7 +161,7 @@ if(preferredLanguage == "en"){
"seconds": "%{smart_count} second |||| %{smart_count} seconds", "seconds": "%{smart_count} second |||| %{smart_count} seconds",
"send": "send", "send": "send",
"Send post with username": "Send post with username ", "Send post with username": "Send post with username ",
"Sent Direct Message": "Sent Direct Message", "send_DM": "Send direct message",
"Sent Post to @": "Sent Post to @", "Sent Post to @": "Sent Post to @",
"Setup account": "Setup account", "Setup account": "Setup account",
"The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.", "The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.",
@ -374,6 +376,7 @@ if(preferredLanguage == "es"){
"Si te quedas en esta página tus acciones pueden no funcionar.\n" + "Si te quedas en esta página tus acciones pueden no funcionar.\n" +
"¿Quieres comprobar la [página de estado de la red](%{page}) en su lugar?", "¿Quieres comprobar la [página de estado de la red](%{page}) en su lugar?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Cambiar de usuario", "Change user": "Cambiar de usuario",
"Checking...": "Comprobando ...", // checking if username is available "Checking...": "Comprobando ...", // checking if username is available
"Collapse": "Colapsar", // smaller view of a post "Collapse": "Colapsar", // smaller view of a post
@ -389,7 +392,7 @@ if(preferredLanguage == "es"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Mensajes directos con %{username}", "direct_messages_with": "Mensajes directos con %{username}",
"Disable": "Inhabilitar", "Disable": "Inhabilitar",
"Display mentions to @": "Visualización de menciones a @", "display_mentions": "Visualización de menciones",
"Display retransmissions": "Visualización de retransmisiones", "Display retransmissions": "Visualización de retransmisiones",
"DNS to obtain list of peers:": "DNS para obtener la lista de los pares:", "DNS to obtain list of peers:": "DNS para obtener la lista de los pares:",
"downloading_block_chain": "Descarga de la cadena de bloques, por favor espere antes de continuar (la cadena de bloques esta %{days} días).", "downloading_block_chain": "Descarga de la cadena de bloques, por favor espere antes de continuar (la cadena de bloques esta %{days} días).",
@ -405,7 +408,7 @@ if(preferredLanguage == "es"){
"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", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Seguido por", "Followed by": "Seguido por",
"followed_by": "Seguido por %{username}", "followed_by": "Seguido por %{username}",
"Followers": "Seguidores", "Followers": "Seguidores",
@ -447,6 +450,7 @@ if(preferredLanguage == "es"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "Nadie", // used to promote a post without attaching the user "nobody": "Nadie", // used to promote a post without attaching the user
"Not available": "No disponible", // username is not available "Not available": "No disponible", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.", "notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.", "notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.", "notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
@ -480,7 +484,7 @@ if(preferredLanguage == "es"){
"seconds": "%{smart_count} segundo |||| %{smart_count} segundos", "seconds": "%{smart_count} segundo |||| %{smart_count} segundos",
"send": "send", "send": "send",
"Send post with username": "Enviar post con nombre de usuario ", "Send post with username": "Enviar post con nombre de usuario ",
"Sent Direct Message": "Mensaje directo", "send_DM": "Mensaje directo",
"Sent Post to @": "El Post enviado a @", "Sent Post to @": "El Post enviado a @",
"Setup account": "Configuración de la cuenta", "Setup account": "Configuración de la cuenta",
"The File APIs are not fully supported in this browser.": "Las API de archivos no son totalmente compatibles con este navegador.", "The File APIs are not fully supported in this browser.": "Las API de archivos no son totalmente compatibles con este navegador.",
@ -679,6 +683,7 @@ if(preferredLanguage == "uk"){
"Якщо ви залишитесь на цій сторінці ваші дії можуть не спрацювати.\n" + "Якщо ви залишитесь на цій сторінці ваші дії можуть не спрацювати.\n" +
"Чи бажаєте ви перевірити [сторінку зі статусом мережі](%{page})?", "Чи бажаєте ви перевірити [сторінку зі статусом мережі](%{page})?",
"confirm_terminate_daemon": "Ви впевнені, що бажаєте завершити роботу?\nКлієнт Twister буде зупинено допоки ви не запустите його знову.", "confirm_terminate_daemon": "Ви впевнені, що бажаєте завершити роботу?\nКлієнт Twister буде зупинено допоки ви не запустите його знову.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Змінити користувача", "Change user": "Змінити користувача",
"Checking...": "Перевірка...", // checking if username is available "Checking...": "Перевірка...", // checking if username is available
"Collapse": "Згорнути", // smaller view of a post "Collapse": "Згорнути", // smaller view of a post
@ -694,7 +699,7 @@ if(preferredLanguage == "uk"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Direct messages with %{username}", "direct_messages_with": "Direct messages with %{username}",
"Disable": "Вимкнено", "Disable": "Вимкнено",
"Display mentions to @": "Показати сповіщення @", "display_mentions": "Показати сповіщення",
"Display retransmissions": "Показати пересилання", "Display retransmissions": "Показати пересилання",
"DNS to obtain list of peers:": "DNS для отримання пірів:", "DNS to obtain list of peers:": "DNS для отримання пірів:",
"dns address": "адреса DNS", "dns address": "адреса DNS",
@ -711,7 +716,7 @@ if(preferredLanguage == "uk"){
"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": "У який спосіб ви бажаєте читати", "select_way_to_follow_@": "У який спосіб ви бажаєте читати @%{alias}",
"Followed by": "читає", "Followed by": "читає",
"followed_by": "%{username} читає", "followed_by": "%{username} читає",
"Followers": "Читачі", "Followers": "Читачі",
@ -753,6 +758,7 @@ if(preferredLanguage == "uk"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "анонім", // used to promote a post without attaching the user "nobody": "анонім", // used to promote a post without attaching the user
"Not available": "Не доступне", // username is not available "Not available": "Не доступне", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister не може створити сповіщення: невідома помилка.", "notify_desktop_error": "Twister не може створити сповіщення: невідома помилка.",
"notify_desktop_perm_denied": "Twister не може створити сповіщення на робочому столі: доступ обмежено.\n\nЯкщо ви бажаєте отримувати сповіщення, дозвольте їх виконання в налаштуваннях браузера для %{this_domain}.", "notify_desktop_perm_denied": "Twister не може створити сповіщення на робочому столі: доступ обмежено.\n\nЯкщо ви бажаєте отримувати сповіщення, дозвольте їх виконання в налаштуваннях браузера для %{this_domain}.",
"notify_desktop_test": "Є дещо новеньке у стрічці.", "notify_desktop_test": "Є дещо новеньке у стрічці.",
@ -786,7 +792,7 @@ if(preferredLanguage == "uk"){
"seconds": "%{smart_count} секунда |||| %{smart_count} секунд", "seconds": "%{smart_count} секунда |||| %{smart_count} секунд",
"send": "відіслати", "send": "відіслати",
"Send post with username": "Надіслати повідомлення від", "Send post with username": "Надіслати повідомлення від",
"Sent Direct Message": "Надіслати особисте повідомлення", "send_DM": "Надіслати особисте повідомлення",
"Sent Post to @": "Надіслати твіст @", "Sent Post to @": "Надіслати твіст @",
"Setup account": "Обліковий запис", "Setup account": "Обліковий запис",
"The File APIs are not fully supported in this browser.": "File APIs не повністю підтримується браузером.", "The File APIs are not fully supported in this browser.": "File APIs не повністю підтримується браузером.",
@ -983,6 +989,7 @@ if(preferredLanguage == "zh-CN"){
"如果你留在此页面你的操作将不会生效。\n" + "如果你留在此页面你的操作将不会生效。\n" +
"你要跳转到[网络状态页](%{page})吗?", "你要跳转到[网络状态页](%{page})吗?",
"confirm_terminate_daemon": "你确定要退出后台进程?\nTwister 客户端将停止工作。", "confirm_terminate_daemon": "你确定要退出后台进程?\nTwister 客户端将停止工作。",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "切换用户", "Change user": "切换用户",
"Checking...": "检查中...", // checking if username is available "Checking...": "检查中...", // checking if username is available
"Collapse": "折叠", // smaller view of a post "Collapse": "折叠", // smaller view of a post
@ -998,7 +1005,7 @@ if(preferredLanguage == "zh-CN"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Direct messages with %{username}", "direct_messages_with": "Direct messages with %{username}",
"Disable": "关闭", "Disable": "关闭",
"Display mentions to @": "显示@", "display_mentions": "显示",
"Display retransmissions": "显示转发", "Display retransmissions": "显示转发",
"DNS to obtain list of peers:": "用DNS获取节点列表:", "DNS to obtain list of peers:": "用DNS获取节点列表:",
"downloading_block_chain": "区块链下载中,请等待下载完成(区块链仍落后 %{days} 天)。", "downloading_block_chain": "区块链下载中,请等待下载完成(区块链仍落后 %{days} 天)。",
@ -1014,7 +1021,7 @@ if(preferredLanguage == "zh-CN"){
"File APIs not supported in this browser.": "这个浏览器不支持 File API。", "File APIs not supported in this browser.": "这个浏览器不支持 File API。",
"Follow": "关注", "Follow": "关注",
"Following config": "关注配置", "Following config": "关注配置",
"Which way do you want to follow": "你想以哪种方式关注", "select_way_to_follow_@": "你想以哪种方式关注 @%{alias}",
"Followed by": "关注者", "Followed by": "关注者",
"followed_by": "被 %{username} 关注", "followed_by": "被 %{username} 关注",
"Followers": "粉丝", "Followers": "粉丝",
@ -1056,6 +1063,7 @@ if(preferredLanguage == "zh-CN"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "无名", // used to promote a post without attaching the user "nobody": "无名", // used to promote a post without attaching the user
"Not available": "用户名不可用", // username is not available "Not available": "用户名不可用", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister 无法发出桌面提醒:发生未知错误。", "notify_desktop_error": "Twister 无法发出桌面提醒:发生未知错误。",
"notify_desktop_perm_denied": "Twister 无法发出桌面提醒:权限被拒绝。\n\n如果你想收到提醒,请在你的浏览器设置中允许 %{this_domain} 发出提醒。", "notify_desktop_perm_denied": "Twister 无法发出桌面提醒:权限被拒绝。\n\n如果你想收到提醒,请在你的浏览器设置中允许 %{this_domain} 发出提醒。",
"notify_desktop_test": "我们都在用 Twister。\n欢迎你的加入。", "notify_desktop_test": "我们都在用 Twister。\n欢迎你的加入。",
@ -1089,7 +1097,7 @@ if(preferredLanguage == "zh-CN"){
"seconds": "%{smart_count} 秒", "seconds": "%{smart_count} 秒",
"send": "发送", "send": "发送",
"Send post with username": "发送推文的用户名", "Send post with username": "发送推文的用户名",
"Sent Direct Message": "发送私信", "send_DM": "发送私信",
"Sent Post to @": "发送推文 @", "Sent Post to @": "发送推文 @",
"Setup account": "设置账号", "Setup account": "设置账号",
"The File APIs are not fully supported in this browser.": "这个浏览器不能完全支持 File API。", "The File APIs are not fully supported in this browser.": "这个浏览器不能完全支持 File API。",
@ -1304,6 +1312,7 @@ if(preferredLanguage == "nl"){
"If you stay in this page your actions may not work.\n" + "If you stay in this page your actions may not work.\n" +
"Do you want to check [Network Status page](%{page}) instead?", "Do you want to check [Network Status page](%{page}) instead?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Gebruiker wijzigen", "Change user": "Gebruiker wijzigen",
"Checking...": "Controleren...", // checking if username is available "Checking...": "Controleren...", // checking if username is available
"Collapse": "Uitklappen", // smaller view of a post "Collapse": "Uitklappen", // smaller view of a post
@ -1319,7 +1328,7 @@ if(preferredLanguage == "nl"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Direct messages with %{username}", "direct_messages_with": "Direct messages with %{username}",
"Disable": "Uitschakelen", "Disable": "Uitschakelen",
"Display mentions to @": "Toon vermeldingen voor @", "display_mentions": "Toon vermeldingen",
"Display retransmissions": "Toon retransmissions", "Display retransmissions": "Toon retransmissions",
"DNS to obtain list of peers:": "DNS om peers lijst op te halen:", "DNS to obtain list of peers:": "DNS om peers lijst op te halen:",
"downloading_block_chain": "Bezig met downloaden block chain, wacht a.u.b. voordat je doorgaat (block chain is %{days} dagen oud).", "downloading_block_chain": "Bezig met downloaden block chain, wacht a.u.b. voordat je doorgaat (block chain is %{days} dagen oud).",
@ -1335,7 +1344,7 @@ if(preferredLanguage == "nl"){
"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", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Gevolgd door", "Followed by": "Gevolgd door",
"followed_by": "Gevolgd door %{username}", "followed_by": "Gevolgd door %{username}",
"Followers": "Volgers", "Followers": "Volgers",
@ -1377,6 +1386,7 @@ if(preferredLanguage == "nl"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "nobody", // used to promote a post without attaching the user "nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Niet beschikbaar", // username is not available "Not available": "Niet beschikbaar", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.", "notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.", "notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.", "notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
@ -1410,7 +1420,7 @@ if(preferredLanguage == "nl"){
"seconds": "%{smart_count} seconde |||| %{smart_count} seconden", "seconds": "%{smart_count} seconde |||| %{smart_count} seconden",
"send": "Verstuur", "send": "Verstuur",
"Send post with username": "Verstuur bericht met gebruikersnaam ", "Send post with username": "Verstuur bericht met gebruikersnaam ",
"Sent Direct Message": "Verstuur privébericht", "send_DM": "Verstuur privébericht",
"Sent Post to @": "Verstuur bericht naar @", "Sent Post to @": "Verstuur bericht naar @",
"Setup account": "Account instellingen", "Setup account": "Account instellingen",
"The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.", "The File APIs are not fully supported in this browser.": "The File APIs are not fully supported in this browser.",
@ -1609,6 +1619,7 @@ if(preferredLanguage == "it"){
"Se rimani su questa pagina, Twister potrebbe non funzionare.\n" + "Se rimani su questa pagina, Twister potrebbe non funzionare.\n" +
"Vuoi controllare lo [stato della rete Twister](%{page}), invece?", "Vuoi controllare lo [stato della rete Twister](%{page}), invece?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Cambia utente", "Change user": "Cambia utente",
"Checking...": "Controllo in corso...", // checking if username is available "Checking...": "Controllo in corso...", // checking if username is available
"Collapse": "Chiudi", // smaller view of a post "Collapse": "Chiudi", // smaller view of a post
@ -1624,7 +1635,7 @@ if(preferredLanguage == "it"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Messaggi Diretti come %{username}", "direct_messages_with": "Messaggi Diretti come %{username}",
"Disable": "Disabilitato", "Disable": "Disabilitato",
"Display mentions to @": "Mostra le menzioni di @", "display_mentions": "Mostra le menzioni",
"Display retransmissions": "Mostra Ripubblicazioni", "Display retransmissions": "Mostra Ripubblicazioni",
"DNS to obtain list of peers:": "DNS per la lista dei nodi:", "DNS to obtain list of peers:": "DNS per la lista dei nodi:",
"downloading_block_chain": "Scaricamento della catena di blocchi in corso, attendere prego (la catena risale a %{days} giorni fa).", "downloading_block_chain": "Scaricamento della catena di blocchi in corso, attendere prego (la catena risale a %{days} giorni fa).",
@ -1640,7 +1651,7 @@ if(preferredLanguage == "it"){
"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", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Seguito da", "Followed by": "Seguito da",
"followed_by": "Seguiti da %{username}", "followed_by": "Seguiti da %{username}",
"Followers": "Lettori", "Followers": "Lettori",
@ -1682,6 +1693,7 @@ if(preferredLanguage == "it"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "nessuno", // used to promote a post without attaching the user "nobody": "nessuno", // used to promote a post without attaching the user
"Not available": "Non disponibile", // username is not available "Not available": "Non disponibile", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.", "notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.", "notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.", "notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
@ -1715,7 +1727,7 @@ if(preferredLanguage == "it"){
"seconds": "%{smart_count} secondo |||| %{smart_count} secondi", "seconds": "%{smart_count} secondo |||| %{smart_count} secondi",
"send": "Invia", "send": "Invia",
"Send post with username": "Pubblica come utente ", "Send post with username": "Pubblica come utente ",
"Sent Direct Message": "Messaggi Diretti inviati", "send_DM": "Messaggi Diretti inviati",
"Sent Post to @": "Messaggi inviati a @", "Sent Post to @": "Messaggi inviati a @",
"Setup account": "Configurazione Utente", "Setup account": "Configurazione Utente",
"The File APIs are not fully supported in this browser.": "Le API File non sono interamente supportate da questo browser.", "The File APIs are not fully supported in this browser.": "Le API File non sono interamente supportate da questo browser.",
@ -1912,6 +1924,7 @@ if(preferredLanguage == "fr"){
"Si vous restez dans cette page vos actions peuvent ne pas être prises en compte.\n" + "Si vous restez dans cette page vos actions peuvent ne pas être prises en compte.\n" +
"Voulez-vous consulter la [page d'état du réseau](%{page}) à la place?", "Voulez-vous consulter la [page d'état du réseau](%{page}) à la place?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Changer d'utilisateur", "Change user": "Changer d'utilisateur",
"Checking...": "Vérification...", // checking if username is available "Checking...": "Vérification...", // checking if username is available
"Collapse": "Fermer", // smaller view of a post "Collapse": "Fermer", // smaller view of a post
@ -1927,7 +1940,7 @@ if(preferredLanguage == "fr"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Messages privés avec %{username}", "direct_messages_with": "Messages privés avec %{username}",
"Disable": "Désactiver", "Disable": "Désactiver",
"Display mentions to @": "Afficher les mentions pour @", "display_mentions": "Afficher les mentions",
"Display retransmissions": "Afficher les retransmissions", "Display retransmissions": "Afficher les retransmissions",
"DNS to obtain list of peers:": "DNS où obtenir une liste des pairs:", "DNS to obtain list of peers:": "DNS où obtenir une liste des pairs:",
"downloading_block_chain": "Téléchargement de la chaîne de blocs, veuillez patienter avant de continuer (la chaîne de blocs a %{days} jours de retard).", "downloading_block_chain": "Téléchargement de la chaîne de blocs, veuillez patienter avant de continuer (la chaîne de blocs a %{days} jours de retard).",
@ -1943,7 +1956,7 @@ if(preferredLanguage == "fr"){
"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", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Suivi par", "Followed by": "Suivi par",
"followed_by": "Suivi par %{username}", "followed_by": "Suivi par %{username}",
"Followers": "Abonnés", "Followers": "Abonnés",
@ -1985,6 +1998,7 @@ if(preferredLanguage == "fr"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "nobody", // used to promote a post without attaching the user "nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Non disponible", // username is not available "Not available": "Non disponible", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Impossible d'afficher les notifications: une erreur inconnue est survenue.", "notify_desktop_error": "Impossible d'afficher les notifications: une erreur inconnue est survenue.",
"notify_desktop_perm_denied": "Impossible d'afficher les notifications: autorisation refusée.\n\nSi tu souhaites afficher les notifications, autorise le %{this_domain} dans les paramêtres de ton navigateur.", "notify_desktop_perm_denied": "Impossible d'afficher les notifications: autorisation refusée.\n\nSi tu souhaites afficher les notifications, autorise le %{this_domain} dans les paramêtres de ton navigateur.",
"notify_desktop_test": "All the twisters gonna twist.\nBienvenue à toi!", "notify_desktop_test": "All the twisters gonna twist.\nBienvenue à toi!",
@ -2018,7 +2032,7 @@ if(preferredLanguage == "fr"){
"seconds": "%{smart_count} seconde |||| %{smart_count} secondes", "seconds": "%{smart_count} seconde |||| %{smart_count} secondes",
"send": "envoyer", "send": "envoyer",
"Send post with username": "Envoyer le billet avec le pseudo", "Send post with username": "Envoyer le billet avec le pseudo",
"Sent Direct Message": "Message privé envoyé", "send_DM": "Message privé envoyé",
"Sent Post to @": "Envoyer un billet à @", "Sent Post to @": "Envoyer un billet à @",
"Setup account": "Configuration du compte", "Setup account": "Configuration du compte",
"The File APIs are not fully supported in this browser.": "L'API de fichier n'est pas entièrement pris en charge dans votre navigateur.", "The File APIs are not fully supported in this browser.": "L'API de fichier n'est pas entièrement pris en charge dans votre navigateur.",
@ -2219,6 +2233,7 @@ if(preferredLanguage == "ru"){
"Если вы останетесь на этой странице ваши действия могут быть не выполнены.\n" + "Если вы останетесь на этой странице ваши действия могут быть не выполнены.\n" +
"Не хотите перейти на [страницу настройки сети](%{page})?", "Не хотите перейти на [страницу настройки сети](%{page})?",
"confirm_terminate_daemon": "Вы уверены, что хотите выключить демон?\nTwister клиент перестанет работать.", "confirm_terminate_daemon": "Вы уверены, что хотите выключить демон?\nTwister клиент перестанет работать.",
"confirm_unfollow_@": "Действительно отписаться от @%{alias}?",
"Change user": "Сменить пользователя", "Change user": "Сменить пользователя",
"Checking...": "Проверка...", "Checking...": "Проверка...",
"Collapse": "Свернуть", "Collapse": "Свернуть",
@ -2234,7 +2249,7 @@ if(preferredLanguage == "ru"){
"Group Messages — Join Group": "Групповые сообщения — Присоединиться к группе", "Group Messages — Join Group": "Групповые сообщения — Присоединиться к группе",
"direct_messages_with": "Личная переписка с %{username}", "direct_messages_with": "Личная переписка с %{username}",
"Disable": "Отключено", "Disable": "Отключено",
"Display mentions to @": "Показать ответы для @", "display_mentions": "Показать упоминания",
"Display retransmissions": "Показать репосты", "Display retransmissions": "Показать репосты",
"DNS to obtain list of peers:": "DNS адрес для получения пиров:", "DNS to obtain list of peers:": "DNS адрес для получения пиров:",
"downloading_block_chain": "Загрузка цепочки блоков, пожалуйста подождите, (Цепочка блоков устарела на %{days} дней).", "downloading_block_chain": "Загрузка цепочки блоков, пожалуйста подождите, (Цепочка блоков устарела на %{days} дней).",
@ -2250,11 +2265,11 @@ if(preferredLanguage == "ru"){
"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": "Выберите тип подписки на", "select_way_to_follow_@": "Выбери же тип подписки на @%{alias}",
"Followed by": "Подписчик у", "Followed by": "Подписчик у",
"followed_by": "%{username} подписан", "followed_by": "%{username} подписан",
"Followers": "Читателей", "Followers": "Читатели",
"Following": "Читаемых", "Following": "Читаемые",
"Following users": "Подписанные пользователи", "Following users": "Подписанные пользователи",
"Force connection to peer:": "Принудительно подключиться к пиру:", "Force connection to peer:": "Принудительно подключиться к пиру:",
"General information": "Основное", "General information": "Основное",
@ -2292,6 +2307,7 @@ if(preferredLanguage == "ru"){
"new_group_messages": "%{smart_count} новое сообщение в группе |||| %{smart_count} новых групповых сообщений", "new_group_messages": "%{smart_count} новое сообщение в группе |||| %{smart_count} новых групповых сообщений",
"nobody": "Анонимно", // used to promote a post without attaching the user "nobody": "Анонимно", // used to promote a post without attaching the user
"Not available": "Недоступно", "Not available": "Недоступно",
"warn_following_not_any": "Пока что таки нет читаемых!\nПоди ж найди кого-нибудь да и подпишись.",
"notify_desktop_error": "Твистер не может выполнить уведомление: произошла неизвестная ошибка.", "notify_desktop_error": "Твистер не может выполнить уведомление: произошла неизвестная ошибка.",
"notify_desktop_perm_denied": "Твистер не может выполнить уведомление: разрешение не получено.\n\nЧтобы получать уведомления, разрешите их для %{this_domain} в настройках вашего браузера.", "notify_desktop_perm_denied": "Твистер не может выполнить уведомление: разрешение не получено.\n\nЧтобы получать уведомления, разрешите их для %{this_domain} в настройках вашего браузера.",
"notify_desktop_test": "Одна лягушка сказала:\n'если не буду квакать — лопну'.\nВы нужны нам, берегите себя.", "notify_desktop_test": "Одна лягушка сказала:\n'если не буду квакать — лопну'.\nВы нужны нам, берегите себя.",
@ -2325,7 +2341,7 @@ if(preferredLanguage == "ru"){
"seconds": "%{smart_count} секунда |||| %{smart_count} секунд", "seconds": "%{smart_count} секунда |||| %{smart_count} секунд",
"send": "отправить", "send": "отправить",
"Send post with username": "Отправить сообщение от имени", "Send post with username": "Отправить сообщение от имени",
"Sent Direct Message": "Отправить личное сообщение", "send_DM": "Отправить личное сообщение",
"Sent Post to @": "Отправить сообщение для @", "Sent Post to @": "Отправить сообщение для @",
"Setup account": "Настроить аккаунт", "Setup account": "Настроить аккаунт",
"The File APIs are not fully supported in this browser.": "File APIs не полностью поддерживается этим браузером.", "The File APIs are not fully supported in this browser.": "File APIs не полностью поддерживается этим браузером.",
@ -2528,6 +2544,7 @@ if(preferredLanguage == "de"){
"Wenn du auf dieser Seite bleibst können deine Handlungen nicht funktionieren.\n" + "Wenn du auf dieser Seite bleibst können deine Handlungen nicht funktionieren.\n" +
"Möchtest du stattdessen den [Netzwerkstatus](%{page}) überprüfen?", "Möchtest du stattdessen den [Netzwerkstatus](%{page}) überprüfen?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Benutzer wechseln", "Change user": "Benutzer wechseln",
"Checking...": "Überprüfe...", // checking if username is available "Checking...": "Überprüfe...", // checking if username is available
"Collapse": "Einklappen", // smaller view of a post "Collapse": "Einklappen", // smaller view of a post
@ -2543,7 +2560,7 @@ if(preferredLanguage == "de"){
"Group Messages — Join Group": "Gruppennachrichten — Gruppe beitreten", "Group Messages — Join Group": "Gruppennachrichten — Gruppe beitreten",
"direct_messages_with": "Direktnachrichten mit %{username}", "direct_messages_with": "Direktnachrichten mit %{username}",
"Disable": "Deaktivieren", "Disable": "Deaktivieren",
"Display mentions to @": "Zeige Erwähnungen von @", //Ist das richtig? Ich weiß nicht, in welchem Zusammenhang das benutzt wird. "display_mentions": "Zeige Erwähnungen", // Ist das richtig? Ich weiß nicht, in welchem Zusammenhang das benutzt wird.
"Display retransmissions": "Weiterleitungen anzeigen", "Display retransmissions": "Weiterleitungen anzeigen",
"DNS to obtain list of peers:": "DNS um Peer-Liste abzurufen:", "DNS to obtain list of peers:": "DNS um Peer-Liste abzurufen:",
"dns address": "DNS-Adresse", "dns address": "DNS-Adresse",
@ -2560,7 +2577,7 @@ if(preferredLanguage == "de"){
"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", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Gefolgt von", "Followed by": "Gefolgt von",
"followed_by": "Gefolgt von %{username}", "followed_by": "Gefolgt von %{username}",
"Followers": "Followers", "Followers": "Followers",
@ -2602,6 +2619,7 @@ if(preferredLanguage == "de"){
"new_group_messages": "%{smart_count} neue Gruppen-Nachricht |||| %{smart_count} neue Gruppen-Nachrichten", "new_group_messages": "%{smart_count} neue Gruppen-Nachricht |||| %{smart_count} neue Gruppen-Nachrichten",
"nobody": "nobody", // used to promote a post without attaching the user "nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Nicht verfügbar", // username is not available "Not available": "Nicht verfügbar", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister kann keine Desktop-Meldungen anzeigen: ein unbekannter Fehler trat auf.", "notify_desktop_error": "Twister kann keine Desktop-Meldungen anzeigen: ein unbekannter Fehler trat auf.",
"notify_desktop_perm_denied": "Twister kann keine Desktop-Meldungen anzeigen: Keine Berechtigung.\n\nWenn Du Meldungen angezeigt haben möchtest, erlaube sie für %{this_domain} in den Einstellungen Deines Browsers.", "notify_desktop_perm_denied": "Twister kann keine Desktop-Meldungen anzeigen: Keine Berechtigung.\n\nWenn Du Meldungen angezeigt haben möchtest, erlaube sie für %{this_domain} in den Einstellungen Deines Browsers.",
"notify_desktop_test": "All die Twisterer werden twisten..\nDu bist nun auch willkommen!", "notify_desktop_test": "All die Twisterer werden twisten..\nDu bist nun auch willkommen!",
@ -2635,7 +2653,7 @@ if(preferredLanguage == "de"){
"seconds": "%{smart_count} Sekunde |||| %{smart_count} Sekunden", "seconds": "%{smart_count} Sekunde |||| %{smart_count} Sekunden",
"send": "senden", "send": "senden",
"Send post with username": "Sende Post mit Benutzernamen ", "Send post with username": "Sende Post mit Benutzernamen ",
"Sent Direct Message": "Direktnachricht senden", "send_DM": "Direktnachricht senden",
"Sent Post to @": "Sende Post an @", "Sent Post to @": "Sende Post an @",
"Setup account": "Accounteinstellungen", "Setup account": "Accounteinstellungen",
"The File APIs are not fully supported in this browser.": "Die File-API's werden von diesem Browser nicht vollständig unterstützt.", "The File APIs are not fully supported in this browser.": "Die File-API's werden von diesem Browser nicht vollständig unterstützt.",
@ -2835,6 +2853,7 @@ if(preferredLanguage == "ja"){
"このページを使用しつづければ、あなたの変更が適用されないおそれがあります。\n" + "このページを使用しつづければ、あなたの変更が適用されないおそれがあります。\n" +
"[ネットワーク状態ペー](%{page})ジへ移動して確認しますか?", "[ネットワーク状態ペー](%{page})ジへ移動して確認しますか?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "ユーザーを変更", "Change user": "ユーザーを変更",
"Checking...": "チェック...", // checking if username is available "Checking...": "チェック...", // checking if username is available
"Collapse": "閉じる", // smaller view of a post "Collapse": "閉じる", // smaller view of a post
@ -2850,7 +2869,7 @@ if(preferredLanguage == "ja"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Direct messages with %{username}", "direct_messages_with": "Direct messages with %{username}",
"Disable": "停止", "Disable": "停止",
"Display mentions to @": "メンションを表示する", "display_mentions": "メンションを表示する",
"Display retransmissions": "リトランスミットを表示する", "Display retransmissions": "リトランスミットを表示する",
"DNS to obtain list of peers:": "ピア取得用のDNS:", "DNS to obtain list of peers:": "ピア取得用のDNS:",
"downloading_block_chain": "ブロックチェインをダウンロードしています。しばらくお待ちください。(ブロックチェーンは%{days}日送れています)", "downloading_block_chain": "ブロックチェインをダウンロードしています。しばらくお待ちください。(ブロックチェーンは%{days}日送れています)",
@ -2866,7 +2885,7 @@ if(preferredLanguage == "ja"){
"File APIs not supported in this browser.": "利用しているブラウザはファイルAPIをサポートしていません。", "File APIs not supported in this browser.": "利用しているブラウザはファイルAPIをサポートしていません。",
"Follow": "フォロー", "Follow": "フォロー",
"Following config": "Following config", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "フォローされている", "Followed by": "フォローされている",
"followed_by": "%{username}にフォローされている", "followed_by": "%{username}にフォローされている",
"Followers": "フォロワー", "Followers": "フォロワー",
@ -2908,6 +2927,7 @@ if(preferredLanguage == "ja"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "ナナシ", // used to promote a post without attaching the user "nobody": "ナナシ", // used to promote a post without attaching the user
"Not available": "使用中", // username is not available "Not available": "使用中", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.", "notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.", "notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.", "notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
@ -2941,7 +2961,7 @@ if(preferredLanguage == "ja"){
"seconds": "%{smart_count} 秒 |||| %{smart_count} 秒", "seconds": "%{smart_count} 秒 |||| %{smart_count} 秒",
"send": "送信", "send": "送信",
"Send post with username": "プロモートメッセージの送信元", "Send post with username": "プロモートメッセージの送信元",
"Sent Direct Message": "ダイレクトメッセージを送る", "send_DM": "ダイレクトメッセージを送る",
"Sent Post to @": "メンションを投稿する", "Sent Post to @": "メンションを投稿する",
"Setup account": "アカウント設定", "Setup account": "アカウント設定",
"The File APIs are not fully supported in this browser.": "ご使用のブラウザーは完全にファイルAPIに対応していません。", "The File APIs are not fully supported in this browser.": "ご使用のブラウザーは完全にファイルAPIに対応していません。",
@ -3138,6 +3158,7 @@ if(preferredLanguage == "pt-BR"){
"Se permanecer nesta página suas ações podem não ter efeito.\n" + "Se permanecer nesta página suas ações podem não ter efeito.\n" +
"Gostaria de verificar o [Estado da Rede](%{page}) ao invés disso?", "Gostaria de verificar o [Estado da Rede](%{page}) ao invés disso?",
"confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.", "confirm_terminate_daemon": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Trocar usuário", "Change user": "Trocar usuário",
"Checking...": "Verificando...", // checking if username is available "Checking...": "Verificando...", // checking if username is available
"Collapse": "Recolher", // smaller view of a post "Collapse": "Recolher", // smaller view of a post
@ -3153,7 +3174,7 @@ if(preferredLanguage == "pt-BR"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Mensagens Diretas com %{username}", "direct_messages_with": "Mensagens Diretas com %{username}",
"Disable": "Desabilitado", "Disable": "Desabilitado",
"Display mentions to @": "Exibir menções a @", "display_mentions": "Exibir menções",
"Display retransmissions": "Exibir retransmissões", "Display retransmissions": "Exibir retransmissões",
"DNS to obtain list of peers:": "DNS para obter a lista de nós:", "DNS to obtain list of peers:": "DNS para obter a lista de nós:",
"downloading_block_chain": "Baixando a Cadeia de Blocos, por favor aguarde (A Cadeia de Blocos está %{days} dias desatualizada).", "downloading_block_chain": "Baixando a Cadeia de Blocos, por favor aguarde (A Cadeia de Blocos está %{days} dias desatualizada).",
@ -3169,7 +3190,7 @@ if(preferredLanguage == "pt-BR"){
"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", "Following config": "Following config",
"Which way do you want to follow": "Which way do you want to follow", "select_way_to_follow_@": "Which way do you want to follow @%{alias}",
"Followed by": "Seguido por", "Followed by": "Seguido por",
"followed_by": "Seguido por %{username}", "followed_by": "Seguido por %{username}",
"Followers": "Seguidores", "Followers": "Seguidores",
@ -3211,6 +3232,7 @@ if(preferredLanguage == "pt-BR"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "nobody", // used to promote a post without attaching the user "nobody": "nobody", // used to promote a post without attaching the user
"Not available": "Indisponível", // username is not available "Not available": "Indisponível", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.", "notify_desktop_error": "Twister cannot perform desktop notification: unknown error occured.",
"notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.", "notify_desktop_perm_denied": "Twister cannot perform desktop notification: permission denied.\n\nIf you want to get notifications, allow them for %{this_domain} in settings of your browser.",
"notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.", "notify_desktop_test": "All the twisters gonna twist.\nNow you are welcome too.",
@ -3245,7 +3267,7 @@ if(preferredLanguage == "pt-BR"){
"seconds": "%{smart_count} segundo |||| %{smart_count} segundos", "seconds": "%{smart_count} segundo |||| %{smart_count} segundos",
"send": "enviar", "send": "enviar",
"Send post with username": "Promover esta mensagem como usuário", "Send post with username": "Promover esta mensagem como usuário",
"Sent Direct Message": "Mensagens Diretas trocadas", "send_DM": "Mensagens Diretas trocadas",
"Sent Post to @": "Postagens enviadas para @", "Sent Post to @": "Postagens enviadas para @",
"Setup account": "Configurar conta", "Setup account": "Configurar conta",
"The File APIs are not fully supported in this browser.": "O gerenciamento de arquivos não é completamente suportado neste navegador.", "The File APIs are not fully supported in this browser.": "O gerenciamento de arquivos não é completamente suportado neste navegador.",
@ -3445,6 +3467,7 @@ if(preferredLanguage == "tr"){
"Eğer bu sayfada kalırsanız eylemlerinizi işlemeyebilir.\n" + "Eğer bu sayfada kalırsanız eylemlerinizi işlemeyebilir.\n" +
"Bunun yerine [Ağ Durumu sayfasını](%{page}) kontrol etmek ister misiniz?", "Bunun yerine [Ağ Durumu sayfasını](%{page}) kontrol etmek ister misiniz?",
"confirm_terminate_daemon": "Hizmeti sonlandırmak istiyor musun?\nTwister istemcisi çalışmayacak.", "confirm_terminate_daemon": "Hizmeti sonlandırmak istiyor musun?\nTwister istemcisi çalışmayacak.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Kullanıcı değiştir", "Change user": "Kullanıcı değiştir",
"Checking...": "Denetleniyor...", // checking if username is available "Checking...": "Denetleniyor...", // checking if username is available
"Collapse": "Kapat", // smaller view of a post "Collapse": "Kapat", // smaller view of a post
@ -3460,7 +3483,7 @@ if(preferredLanguage == "tr"){
"Group Messages — Join Group": "Grup Mesajları — Gruba katıl", "Group Messages — Join Group": "Grup Mesajları — Gruba katıl",
"direct_messages_with": "%{username} ile Direk Mesajlar", "direct_messages_with": "%{username} ile Direk Mesajlar",
"Disable": "Kullanılmaz", "Disable": "Kullanılmaz",
"Display mentions to @": "@ adının geçtiği gönderiler", "display_mentions": "@ adının geçtiği gönderiler", // FIXME
"Display retransmissions": "Tekrar iletimleri göster", "Display retransmissions": "Tekrar iletimleri göster",
"DNS to obtain list of peers:": "Eş listesini almak için DNS:", "DNS to obtain list of peers:": "Eş listesini almak için DNS:",
"downloading_block_chain": "Blok zinciri indiriliyor, devam edebilmek için lütfen bekleyiniz (blok zinciri %{days} günlük).", "downloading_block_chain": "Blok zinciri indiriliyor, devam edebilmek için lütfen bekleyiniz (blok zinciri %{days} günlük).",
@ -3476,7 +3499,7 @@ if(preferredLanguage == "tr"){
"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": "Takip ayarları", "Following config": "Takip ayarları",
"Which way do you want to follow": "Nasıl takip etmek istiyorsun", "select_way_to_follow_@": "Nasıl takip etmek istiyorsun @%{alias}",
"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",
@ -3518,6 +3541,7 @@ if(preferredLanguage == "tr"){
"new_group_messages": "%{smart_count} yeni grup mesajı |||| %{smart_count} yeni grup mesajı", "new_group_messages": "%{smart_count} yeni grup mesajı |||| %{smart_count} yeni grup mesajı",
"nobody": "hiçkimse", // used to promote a post without attaching the user "nobody": "hiçkimse", // used to promote a post without attaching the user
"Not available": "Kullanılamaz", // username is not available "Not available": "Kullanılamaz", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twister masaüstü uyarısını gösterimiyor: bilimeyen bir hata oluştu.", "notify_desktop_error": "Twister masaüstü uyarısını gösterimiyor: bilimeyen bir hata oluştu.",
"notify_desktop_perm_denied": "Twister masaüstü uyarısını gösteremiyor: yetkilendirme hatası.\n\nUyarıları almak istiyorsanız, tarayıcı ayarlarında %{this_domain} alan adı için izin veriniz.", "notify_desktop_perm_denied": "Twister masaüstü uyarısını gösteremiyor: yetkilendirme hatası.\n\nUyarıları almak istiyorsanız, tarayıcı ayarlarında %{this_domain} alan adı için izin veriniz.",
"notify_desktop_test": "Kasırga her yanı saracak\nBu karnavala hoşgeldin!", "notify_desktop_test": "Kasırga her yanı saracak\nBu karnavala hoşgeldin!",
@ -3551,7 +3575,7 @@ if(preferredLanguage == "tr"){
"seconds": "%{smart_count} saniye |||| %{smart_count} saniye", "seconds": "%{smart_count} saniye |||| %{smart_count} saniye",
"send": "gönder", "send": "gönder",
"Send post with username": "İletiyi kullanıcı adıyla gönder ", "Send post with username": "İletiyi kullanıcı adıyla gönder ",
"Sent Direct Message": "Direk Mesaj Gönder", "send_DM": "Direk Mesaj Gönder",
"Sent Post to @": "@ Kullanıcıya Gönder", "Sent Post to @": "@ Kullanıcıya Gönder",
"Setup account": "Hesap ayarları", "Setup account": "Hesap ayarları",
"The File APIs are not fully supported in this browser.": "Dosya API'si tarayıcınızda tam olarak desteklenmiyor.", "The File APIs are not fully supported in this browser.": "Dosya API'si tarayıcınızda tam olarak desteklenmiyor.",
@ -3749,6 +3773,7 @@ if(preferredLanguage == "cs"){
"Pokud zůstanete na této stránce, vaše akce možná nebudou fungovat.\n" + "Pokud zůstanete na této stránce, vaše akce možná nebudou fungovat.\n" +
"Chcete se místo toho podívat na [stav sítě](%{page})?", "Chcete se místo toho podívat na [stav sítě](%{page})?",
"confirm_terminate_daemon": "Skutečně chcete ukončit server?\nTwister tím vypnete.", "confirm_terminate_daemon": "Skutečně chcete ukončit server?\nTwister tím vypnete.",
"confirm_unfollow_@": "Are you sure you want to unfollow @%{alias}?",
"Change user": "Změnit uživatele", "Change user": "Změnit uživatele",
"Checking...": "Ověřuji...", // checking if username is available "Checking...": "Ověřuji...", // checking if username is available
"Collapse": "Složit", // smaller view of a post "Collapse": "Složit", // smaller view of a post
@ -3764,7 +3789,7 @@ if(preferredLanguage == "cs"){
"Group Messages — Join Group": "Group Messages — Join Group", "Group Messages — Join Group": "Group Messages — Join Group",
"direct_messages_with": "Direct messages with %{username}", "direct_messages_with": "Direct messages with %{username}",
"Disable": "Vypnuto", "Disable": "Vypnuto",
"Display mentions to @": "Zobrazit zmínky o @", "display_mentions": "Zobrazit zmínky",
"Display retransmissions": "Zobrazit přeposlané", "Display retransmissions": "Zobrazit přeposlané",
"DNS to obtain list of peers:": "DNS pro načtení seznamu uzlů:", "DNS to obtain list of peers:": "DNS pro načtení seznamu uzlů:",
"downloading_block_chain": "Stahuji blockchain, prosím počkejte (blockchain je %{days} dnů starý).", "downloading_block_chain": "Stahuji blockchain, prosím počkejte (blockchain je %{days} dnů starý).",
@ -3780,7 +3805,7 @@ if(preferredLanguage == "cs"){
"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": "Nastavení sledování", "Following config": "Nastavení sledování",
"Which way do you want to follow": "Zvolte způsob sledování", "select_way_to_follow_@": "Zvolte způsob sledování @%{alias}",
"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í",
@ -3822,6 +3847,7 @@ if(preferredLanguage == "cs"){
"new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages", "new_group_messages": "%{smart_count} new group message |||| %{smart_count} new group messages",
"nobody": "nikdo", // used to promote a post without attaching the user "nobody": "nikdo", // used to promote a post without attaching the user
"Not available": "Tuto přezdívku již někdo používá", // username is not available "Not available": "Tuto přezdívku již někdo používá", // username is not available
"warn_following_not_any": "Not following any twisters!\nSearch and follow someone.",
"notify_desktop_error": "Twisteru se nepodařilo zobrazit upozornění na ploše: došlo k neznámé chybě.", "notify_desktop_error": "Twisteru se nepodařilo zobrazit upozornění na ploše: došlo k neznámé chybě.",
"notify_desktop_perm_denied": "Twisteru se nepodařilo zobrazit upozornění na ploše: přístup byl odepřen.\n\nPokud chcete používat upozornění na ploše, povolte je pro %{this_domain} v nastavení vašeho prohlížeče.", "notify_desktop_perm_denied": "Twisteru se nepodařilo zobrazit upozornění na ploše: přístup byl odepřen.\n\nPokud chcete používat upozornění na ploše, povolte je pro %{this_domain} v nastavení vašeho prohlížeče.",
"notify_desktop_test": "Twister to umí pořádně roztočit.\nKaždý je tu vítán.", "notify_desktop_test": "Twister to umí pořádně roztočit.\nKaždý je tu vítán.",
@ -3856,7 +3882,7 @@ if(preferredLanguage == "cs"){
"seconds": "%{smart_count} vteřinou |||| %{smart_count} vteřinami |||| %{smart_count} vteřinami", "seconds": "%{smart_count} vteřinou |||| %{smart_count} vteřinami |||| %{smart_count} vteřinami",
"send": "odeslat", "send": "odeslat",
"Send post with username": "Příspěvek vložit pod přezdívkou ", "Send post with username": "Příspěvek vložit pod přezdívkou ",
"Sent Direct Message": "Poslat přímou zprávu", "send_DM": "Poslat přímou zprávu",
"Sent Post to @": "Poslat veřejný příspěvek pro @", "Sent Post to @": "Poslat veřejný příspěvek pro @",
"Setup account": "Upravit profil", "Setup account": "Upravit profil",
"The File APIs are not fully supported in this browser.": "Upozornění: váš webový prohlížeč nepodporuje File API.", "The File APIs are not fully supported in this browser.": "Upozornění: váš webový prohlížeč nepodporuje File API.",

25
js/mobile_abstract.js

@ -63,15 +63,26 @@ var MAL = function()
} }
} }
this.warnFollowingNotAny = function(cbFunc, cbReq) {
if ($.hasOwnProperty('mobile'))
alert(polyglot.t('warn_following_not_any'));
else
alertPopup({
//txtTitle: polyglot.t(''), add some title (not 'error', please) or KISS
txtMessage: polyglot.t('warn_following_not_any'),
cbConfirm: cbFunc,
cbConfirmReq: cbReq,
cbClose: 'cbConfirm'
});
};
this.followingListLoaded = function() { this.followingListLoaded = function(followingList) {
if( $.hasOwnProperty("mobile") ) { if ($.hasOwnProperty('mobile')) {
$.mobile.hidePageLoadingMsg(); $.mobile.hidePageLoadingMsg();
$(".following-list").listview('refresh'); followingList.listview('refresh');
} else { } else
$(".postboard-loading").hide(); followingList.find('.loading-roller').hide();
} };
}
this.searchUserListLoaded = function() { this.searchUserListLoaded = function() {
if( $.hasOwnProperty("mobile") ) { if( $.hasOwnProperty("mobile") ) {

5
js/tmobile.js

@ -161,7 +161,10 @@ var router=new $.mobile.Router(
} }
$.mobile.showPageLoadingMsg(); $.mobile.showPageLoadingMsg();
$("#following a.ui-btn").removeClass("ui-btn-active"); $("#following a.ui-btn").removeClass("ui-btn-active");
showFollowingUsers(); var followingList = twister.tmpl.followingList.clone(true).appendTo($("#following .content"))
.closest('.following-list').listview();
showFollowingUsers(followingList);
followingList.find('[data-role="button"]').button();
}); });
}, },
post: function(type,match,ui) { post: function(type,match,ui) {

24
js/twister_directmsg.js

@ -324,7 +324,7 @@ function openGroupMessagesNewGroupModal() {
groupMsgCreateGroup(elemForm.find('.description').val(), peersToInvite); groupMsgCreateGroup(elemForm.find('.description').val(), peersToInvite);
closeModal(); closeModal(event);
}); });
} }
@ -375,7 +375,7 @@ function openGroupMessagesJoinGroupModal() {
for (var i = 0; i < groups.length; i++) for (var i = 0; i < groups.length; i++)
groupMsgInviteToGroup(groups[i].getAttribute('data-screen-name'), [defaultScreenName]); groupMsgInviteToGroup(groups[i].getAttribute('data-screen-name'), [defaultScreenName]);
closeModal(); closeModal(event);
}); });
modal.content.find('.secret-key-import, .username-import').on('input', importSecretKeypress); modal.content.find('.secret-key-import, .username-import').on('input', importSecretKeypress);
@ -388,8 +388,8 @@ function openGroupMessagesJoinGroupModal() {
twisterRpc('importprivkey', [secretKey, groupAlias], twisterRpc('importprivkey', [secretKey, groupAlias],
function(req, ret) { function(req, ret) {
groupMsgInviteToGroup(req.groupAlias, [defaultScreenName]); groupMsgInviteToGroup(req.groupAlias, [defaultScreenName]);
closeModal(); closeModal(req.elem);
}, {groupAlias: groupAlias}, }, {groupAlias: groupAlias, elem: elemModule},
function(req, ret) { function(req, ret) {
alert(polyglot.t('Error in \'importprivkey\'', {rpc: ret.message})); alert(polyglot.t('Error in \'importprivkey\'', {rpc: ret.message}));
} }
@ -544,16 +544,16 @@ function initInterfaceDirectMsg() {
}); });
$('.group-messages-control .leave').on('click', function (event) { $('.group-messages-control .leave').on('click', function (event) {
var elemEvent = $(event.target); var groupAlias = $(event.target).closest('[data-screen-name]').attr('data-screen-name');
var groupAlias = elemEvent.closest('[data-screen-name]').attr('data-screen-name'); event.data = {
confirmPopup(event, { txtTitle: polyglot.t('сonfirm_group_leaving_header'),
titleTxt: polyglot.t('сonfirm_group_leaving_header'), txtMessage: polyglot.t('сonfirm_group_leaving_body', {alias: groupAlias}),
messageTxt: polyglot.t('сonfirm_group_leaving_body', {alias: groupAlias}), cbConfirm: function (groupAlias) {
confirmFunc: function (groupAlias) {
groupMsgLeaveGroup(groupAlias, function () {history.back();}); groupMsgLeaveGroup(groupAlias, function () {history.back();});
}, },
confirmFuncArgs: groupAlias cbConfirmReq: groupAlias
}); };
confirmPopup(event);
}); });
$('.group-messages-control .new').on('click', function () { $('.group-messages-control .new').on('click', function () {

195
js/twister_following.js

@ -373,7 +373,6 @@ 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); twisterFollowingO.update(user);
$(window).trigger("eventFollow", user)
} }
if( publicFollow == undefined || publicFollow ) if( publicFollow == undefined || publicFollow )
_isFollowPublic[user] = true; _isFollowPublic[user] = true;
@ -389,8 +388,6 @@ 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);
// FIXME also need to check list of pending posts to remove from there
$(window).trigger('eventUnfollow', user);
} }
delete _isFollowPublic[user]; delete _isFollowPublic[user];
saveFollowing(); saveFollowing();
@ -512,46 +509,6 @@ function getWhoFollows(username, item) {
} }
} }
// adds following users to the interface (following.html)
function showFollowingUsers(){
var $notFollowing = $(".not-following-any");
if( followingEmptyOrMyself() ) {
$notFollowing.show();
} else {
$notFollowing.hide();
}
var $followingList = $(".following-list");
var $template = $("#following-user-template").detach();
$followingList.empty();
$followingList.append($template);
for( var i = 0; i < followingUsers.length; i++ ) {
var resItem = $template.clone(true);
resItem.removeAttr('id');
resItem.show();
resItem.find(".mini-profile-info").attr("data-screen-name", followingUsers[i]);
resItem.find(".following-screen-name").text(followingUsers[i]);
resItem.find("a.open-profile-modal").attr("href",$.MAL.userUrl(followingUsers[i]));
resItem.find("a.direct-messages-with-user").attr("href", $.MAL.dmchatUrl(followingUsers[i]));
if (isPublicFollowing(followingUsers[i])) {
resItem.find(".public-following").text(polyglot.t("Public"));
} else {
resItem.find(".public-following").text(polyglot.t("Private")).addClass( "private" );
}
getAvatar(followingUsers[i],resItem.find(".mini-profile-photo"));
getFullname(followingUsers[i],resItem.find(".mini-profile-name"));
if( followingUsers[i] == defaultScreenName ) {
resItem.find("button").hide();
}
resItem.prependTo($followingList);
toggleFollowButton(followingUsers[i], true)
}
$.MAL.followingListLoaded();
}
function processWhoToFollowSuggestion(suggestion, followedBy) { function processWhoToFollowSuggestion(suggestion, followedBy) {
if (suggestion) { if (suggestion) {
var module = $('.module.who-to-follow'); var module = $('.module.who-to-follow');
@ -664,37 +621,16 @@ function processDropdownUserResults(event, results) {
getFullname(results[i], item.find('.mini-profile-name')); getFullname(results[i], item.find('.mini-profile-name'));
item.appendTo(container); item.appendTo(container);
if (followingUsers.indexOf(results[i]) !== -1) toggleFollowButton({
toggleFollowButton(results[i], true); button: item.find('.follow'),
peerAlias: results[i],
toggleUnfollow: followingUsers.indexOf(results[i]) !== -1 ? true : false
});
} }
$.MAL.searchUserListLoaded(); $.MAL.searchUserListLoaded();
} }
function userClickFollow(e) {
e.stopPropagation();
e.preventDefault();
if (!defaultScreenName) {
alert(polyglot.t('You have to log in to follow users.'));
return;
}
var username = $(e.target).closest('[data-screen-name]').attr('data-screen-name');
var content = $('#following-config-modal-template').children().clone(true);
content.closest('.following-config-modal-content').attr('data-screen-name', username);
content.find('.following-config-method-message').text(polyglot.t('Which way do you want to follow'));
content.find('.following-screen-name b').text(username);
openModal({
classBase: '.prompt-wrapper',
classAdd: 'following-config-modal',
content: content,
title: polyglot.t('Following config')
});
}
function initUserSearch() { function initUserSearch() {
var elem = $('.userMenu-search-field') var elem = $('.userMenu-search-field')
.on('click input', .on('click input',
@ -703,16 +639,6 @@ function initUserSearch() {
.on('keyup', userSearchEnter) .on('keyup', userSearchEnter)
; ;
$('.userMenu-search').clickoutside(closeSearchDialog.bind(elem)); $('.userMenu-search').clickoutside(closeSearchDialog.bind(elem));
// following stuff should be moved to special function
$('button.follow').on('click', userClickFollow);
$('.following-config-method-buttons .public-following')
.on('click', function(e) {
setFollowingMethod(e);
closePrompt();
window.setTimeout(loadModalFromHash, 500); // delay reload so dhtput may do it's job
})
;
} }
function userSearchEnter(event) { function userSearchEnter(event) {
@ -723,37 +649,6 @@ function userSearchEnter(event) {
} }
} }
function followingListPublicCheckbox(e) {
e.stopPropagation();
var $this = $(this);
var username = $this.closest(".mini-profile-info").attr("data-screen-name");
var publicFollow = false;
$this.toggleClass( "private" );
if( $this.hasClass( "private" ) ) {
$this.text( polyglot.t("Private") );
} else {
$this.text( polyglot.t("Public") );
publicFollow = true;
}
//console.log("set following method of @" +username +" for "+publicFollow);
follow(username, publicFollow);
}
function setFollowingMethod(event) {
var button = $(event.target);
var username = button.closest('.following-config-modal-content').attr('data-screen-name');
follow(username,
(button.hasClass('private')) ? false : true, // is folowing public
toggleFollowButton, username, true // last two are args for toggleFollowButton()
);
event.stopPropagation();
}
function requestSwarmProgress() { function requestSwarmProgress() {
twisterRpc("getlasthave", [defaultScreenName], twisterRpc("getlasthave", [defaultScreenName],
function(args, ret) {processSwarmProgressPartial(ret);}, null, function(args, ret) {processSwarmProgressPartial(ret);}, null,
@ -794,83 +689,3 @@ function followingChangedUser() {
_followSuggestions = []; _followSuggestions = [];
_lastLoadFromDhtTime = 0; _lastLoadFromDhtTime = 0;
} }
function initInterfaceFollowing() {
initInterfaceCommon();
initUserSearch();
initInterfaceDirectMsg();
$(".mini-profile-info .public-following").bind( "click", followingListPublicCheckbox );
$(".mentions-from-user").bind( "click", openMentionsModal );
initUser( function() {
if( !defaultScreenName ) {
alert(polyglot.t("username_undefined"));
$.MAL.goLogin();
return;
}
checkNetworkStatusAndAskRedirect();
$(".postboard-loading").fadeIn();
loadFollowing( function(args) {
twisterFollowingO = TwisterFollowing(defaultScreenName);
showFollowingUsers();
requestSwarmProgress();
});
initMentionsCount();
initDMsCount();
});
$(window)
.on('eventFollow', function(e, user) {
$('.mini-profile .following-count').text(followingUsers.length - 1);
showFollowingUsers();
})
.on('eventUnfollow', function(e, user) {
$('.mini-profile .following-count').text(followingUsers.length - 1);
showFollowingUsers();
});
}
var InterfaceFunctions = function () {
this.init = function () {
initUser(initFollowing_);
};
function initFollowing_(cbFunc, cbArg) {
var $miniProfile = $(".left .mini-profile");
if(!defaultScreenName)
{
}
else
{
$miniProfile.find("a.mini-profile-name").attr("href",$.MAL.userUrl(defaultScreenName));
$miniProfile.find("a.open-profile-modal").attr("href",$.MAL.userUrl(defaultScreenName));
$miniProfile.find(".mini-profile-name").text(defaultScreenName);
getFullname( defaultScreenName, $miniProfile.find(".mini-profile-name") );
getAvatar( defaultScreenName, $miniProfile.find(".mini-profile-photo").find("img") );
getPostsCount( defaultScreenName, $miniProfile.find(".posts-count") );
getFollowers( defaultScreenName, $miniProfile.find(".followers-count") );
loadFollowing( function(args) {
$(".left .following-count").text(followingUsers.length-1);
initMentionsCount();
initDMsCount();
}, {cbFunc:cbFunc, cbArg:cbArg});
}
}
};
//***********************************************
//******************* INIT **************
//***********************************************
if (!/\/home.html$/i.test(document.location)) { // FIXME we're doing it wrong, interfaceFunctions declaration should be inside interface common
var interfaceFunctions = new InterfaceFunctions;
$(document).ready(interfaceFunctions.init);
}

13
js/twister_formatpost.js

@ -3,18 +3,13 @@
// //
// Format JSON posts and DMs to HTML. // Format JSON posts and DMs to HTML.
var _templatePostRtReference;
var _templatePostRtBy;
var _htmlFormatMsgLinkTemplateExternal; var _htmlFormatMsgLinkTemplateExternal;
var _htmlFormatMsgLinkTemplateUser; var _htmlFormatMsgLinkTemplateUser;
var _htmlFormatMsgLinkTemplateHashtag; var _htmlFormatMsgLinkTemplateHashtag;
$(document).ready(function() { $(document).ready(function() {
// we're setting it here for perfomance improvement purpose // to not search and prepare it for for every post every time // we're setting it here for perfomance improvement purpose
_templatePostRtReference = $('#post-rt-reference-template').children().clone(true); // to not search and prepare it for for every post every time
_templatePostRtReference.find('.post-text')
.on('click', {feeder: '.post-rt-reference'}, openConversationClick);
_templatePostRtBy = $('#post-rt-by-template').children().clone(true);
_htmlFormatMsgLinkTemplateExternal = $('#external-page-link-template') _htmlFormatMsgLinkTemplateExternal = $('#external-page-link-template')
if (_htmlFormatMsgLinkTemplateExternal.length) { if (_htmlFormatMsgLinkTemplateExternal.length) {
_htmlFormatMsgLinkTemplateExternal = _htmlFormatMsgLinkTemplateExternal[0].cloneNode(); _htmlFormatMsgLinkTemplateExternal = _htmlFormatMsgLinkTemplateExternal[0].cloneNode();
@ -156,7 +151,7 @@ function postToElem(post, kind, promoted) {
if (userpost.msg) { if (userpost.msg) {
setPostReference(postContext, rt, userpost.sig_rt); setPostReference(postContext, rt, userpost.sig_rt);
} else { } else {
postContext.append(_templatePostRtBy.clone(true)).addClass('post-rt-by') postContext.append(twister.tmpl.postRtBy.clone(true)).addClass('post-rt-by')
.find('.post-rt-sign .prep').text(polyglot.t('post_rt_sign_prep')) .find('.post-rt-sign .prep').text(polyglot.t('post_rt_sign_prep'))
.siblings('.open-profile-modal') .siblings('.open-profile-modal')
.attr('href', $.MAL.userUrl(retweeted_by)).text('@' + retweeted_by) .attr('href', $.MAL.userUrl(retweeted_by)).text('@' + retweeted_by)
@ -232,7 +227,7 @@ function setPostCommon(elem, username, time) {
} }
function setPostReference(elem, rt, sig_rt) { function setPostReference(elem, rt, sig_rt) {
elem.append(_templatePostRtReference.clone(true)) elem.append(twister.tmpl.postRtReference.clone(true))
.find('.post-rt-reference') .find('.post-rt-reference')
.attr('data-screen-name', rt.n) .attr('data-screen-name', rt.n)
.attr('data-id', rt.k) .attr('data-id', rt.k)

2
js/twister_network.js

@ -304,7 +304,7 @@ function interfaceNetworkHandlers() {
function (e) {e.stopPropagation(); $(this).addClass('open'); usePostSpliting = false;}); function (e) {e.stopPropagation(); $(this).addClass('open'); usePostSpliting = false;});
$('.post-submit.update-spam-msg').off('click').on('click', setSpamMsg); $('.post-submit.update-spam-msg').off('click').on('click', setSpamMsg);
$('.terminate-daemon').on('click', $('.terminate-daemon').on('click',
{messageTxt: polyglot.t('confirm_terminate_daemon'), confirmFunc: exitDaemon}, confirmPopup); {txtMessage: polyglot.t('confirm_terminate_daemon'), cbConfirm: exitDaemon}, confirmPopup);
} }

24
js/twister_user.js

@ -273,20 +273,18 @@ function saveProfile(e) {
function completeProfileSaving(req, isAvatarDataSaved) { function completeProfileSaving(req, isAvatarDataSaved) {
if (req.isProfileDataSaved && isAvatarDataSaved) { if (req.isProfileDataSaved && isAvatarDataSaved) {
clearAvatarAndProfileCache(defaultScreenName); clearAvatarAndProfileCache(defaultScreenName);
var titleTxt = ''; var txtTitle = '';
var messageTxt = polyglot.t('profile_saved'); var txtMessage = polyglot.t('profile_saved');
} else { } else {
var titleTxt = polyglot.t('error', {error: ''}); var txtTitle = polyglot.t('error', {error: ''});
var messageTxt = polyglot.t('profile_not_saved'); var txtMessage = polyglot.t('profile_not_saved');
} }
confirmPopup(null, { alertPopup({
titleTxt: titleTxt, txtTitle: txtTitle,
messageTxt: messageTxt, txtMessage: messageTxt,
confirmTxt: polyglot.t('btn_ok'), cbConfirm: $.MAL.enableButton,
confirmFunc: $.MAL.enableButton, cbConfirmReq: $('.submit-changes'),
confirmFuncArgs: $('.submit-changes'), cbClose: 'cbConfirm'
closeFunc: 'confirmFunc',
removeCancel: true
}); });
} }

1
network.html

@ -44,7 +44,6 @@
</div> </div>
<a class="dropdown-menu-item" href="options.html">Options</a> <a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a> <a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="following.html">Following users</a>
<a class="dropdown-menu-item" href="network.html">Network config</a> <a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="login.html">Change user</a> <a class="dropdown-menu-item" href="login.html">Change user</a>
</div> </div>

1
options.html

@ -38,7 +38,6 @@
<a class="dropdown-menu-item" href="options.html">Options</a> <a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="network.html">Network config</a> <a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a> <a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="following.html">Following users</a>
<a class="dropdown-menu-item" href="login.html">Change user</a> <a class="dropdown-menu-item" href="login.html">Change user</a>
</div> </div>
</a> </a>

1
profile-edit.html

@ -47,7 +47,6 @@
</div> </div>
<a class="dropdown-menu-item" href="options.html">Options</a> <a class="dropdown-menu-item" href="options.html">Options</a>
<a class="dropdown-menu-item" href="profile-edit.html">Setup account</a> <a class="dropdown-menu-item" href="profile-edit.html">Setup account</a>
<a class="dropdown-menu-item" href="following.html">Following users</a>
<a class="dropdown-menu-item" href="network.html">Network config</a> <a class="dropdown-menu-item" href="network.html">Network config</a>
<a class="dropdown-menu-item" href="login.html">Change user</a> <a class="dropdown-menu-item" href="login.html">Change user</a>
</div> </div>

151
theme_calm/css/style.css

@ -134,7 +134,7 @@ button:disabled:hover, button.disabled:hover {
color: rgba(255, 255, 255, .8); color: rgba(255, 255, 255, .8);
} }
button.follow, button.unfollow, .following-list button.private { button.follow, button.unfollow, .following-own-modal .following-list button.private {
color: rgba( 0, 0, 0, .4 ); color: rgba( 0, 0, 0, .4 );
background: none; background: none;
border: solid 1px rgba( 0, 0, 0, .2 ); border: solid 1px rgba( 0, 0, 0, .2 );
@ -142,19 +142,19 @@ button.follow, button.unfollow, .following-list button.private {
font-size: 12px; font-size: 12px;
} }
.following-list .public-following { .following-own-modal .following-list .public-following {
padding: 4px 16px; padding: 4px 16px;
font-size: 12px; font-size: 12px;
} }
.following-list .public-following:hover { .following-own-modal .following-list .public-following:hover {
color: rgba( 0, 0, 0, .4 ); color: rgba( 0, 0, 0, .4 );
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;
} }
.following-list button.private:hover { .following-own-modal .following-list button.private:hover {
color: #fff; color: #fff;
background: #45474d; background: #45474d;
} }
@ -668,10 +668,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
position: relative; position: relative;
z-index: 2; z-index: 2;
} }
.following-list .mini-profile-name
{
padding: 5px 5px 5px 5px;
}
.profile-data .profile-data
{ {
border-left: none; border-left: none;
@ -704,59 +701,55 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
display: block; display: block;
font-size: 16px; font-size: 16px;
} }
.mini-profile-actions
{ .mini-profile-actions {
position: relative; position: absolute;
width: auto; top: 0;
display: inline-block; right: 8px;
} }
.mini-profile-actions span
{ .mini-profile-actions span {
color: #e18881; color: rgba(0, 0, 0, .5);
cursor: pointer; cursor: pointer;
font-size: 14px; font-size: 12px;
display: inline-block; display: inline-block;
width: 85px; position: relative;
transition: all .2s linear; z-index: 10;
} }
.mini-profile-actions ul
{ .mini-profile-actions span:hover {
color: #768fce;
}
.mini-profile-actions ul {
height: 0; height: 0;
overflow: hidden; overflow: hidden;
position: absolute; position: absolute;
z-index: 20;
right: 0;
transition: height .2s linear; transition: height .2s linear;
background: #fff; background: #fff;
z-index: 3;
}
.mini-profile-actions:hover span
{
} }
.mini-profile-actions:hover span:after
{ .mini-profile-actions:hover ul {
} /*height: ;*/
.mini-profile-actions:hover ul border: solid 1px rgba(69, 71, 77, .1);
{ border-right: solid 4px #B2D67B;
height: 90px; box-shadow: 8px 10px 10px 0px rgba(0, 0, 0, .2);
box-shadow: 0 2px 5px #65686f;
} }
.mini-profile-actions ul li
{ .mini-profile-actions ul li {
white-space: nowrap; white-space: nowrap;
color: rgba(0, 0, 0, .7); color: rgba(0, 0, 0, .7);
font-size: 13px; font-size: 12px;
cursor: pointer; cursor: pointer;
padding: 5px; padding: 4px 16px 4px 8px;
margin: 2px;
} }
.mini-profile-actions ul li + li
{ .mini-profile-actions ul li:hover {
margin: 0 2px; background: #FCFDFF;
}
.mini-profile-actions:hover ul li:hover
{
background: rgba( 0, 0, 0, .7 );
color: #fff;
} }
.mini-profile-info a:hover .mini-profile-info a:hover
{ {
text-decoration: none; text-decoration: none;
@ -2634,63 +2627,65 @@ textarea.splited-post {
*********** FOLLOWING PAGE *********** *********** FOLLOWING PAGE ***********
**************************************/ **************************************/
.following .header-bold { .following-own-modal.modal-wrapper {
display: block; width: 662px;
width: 100%; margin-left: -331px;
margin: 0px auto 12px auto;
} }
.following ol.following-list > li{ .following-own-modal .following-list > li {
display: inline-block; width: 320px;
width: 280px;
height: 120px; height: 120px;
margin: 5px; margin: 2px;
padding: 2px;
float: left; float: left;
border: 3px dashed #e0e6f5; border: solid 1px rgba(69, 71, 77, .1);
background: #fff; background: #fff;
border-radius: 10px; border-radius: 10px;
} }
.following ol.following-list li .swarm-status {
font: 11px "Open Sans", sans-serif; .following-own-modal .following-list .mini-profile-name {
color: #343434; padding: 4px;
display: block;
position: absolute;
top: 94px;
right: 8px;
} }
.following ol.following-list li span.mini-profile-name:hover {
.following-own-modal .following-list .mini-profile-name:hover {
color: #5e8da4; color: #5e8da4;
} }
.following ol.following-list li span.mini-screen-name {
.following-own-modal .following-list .mini-screen-name {
color: #5e8da4; color: #5e8da4;
position: absolute; position: absolute;
top: 32px; top: 32px;
} }
.following ol.following-list li span.mini-screen-name:hover {
.following-own-modal .following-list .mini-screen-name:hover {
color: #76b2ce; color: #76b2ce;
} }
.following ol.following-list .mini-profile-info .mini-profile-actions {
.following-own-modal .following-list .following-config {
width: 100%;
position: absolute; position: absolute;
top: 8px; top: 62px;
right: 2px; text-align: center;
z-index: 10;
} }
.following ol.following-list .mini-profile-info button {
margin-top: 5px; .following-own-modal .following-list .mini-profile-actions:hover ul {
height: 50px;
}
.following-own-modal .following-list .swarm-status {
font: 11px "Open Sans", sans-serif;
color: #343434;
display: block;
position: absolute;
top: 94px;
right: 32px;
} }
.gifCheckBox { .gifCheckBox {
float: right; float: right;
vertical-align: middle; vertical-align: middle;
} }
.following-list .following-config
{
width: 100%;
position: absolute;
top: 60px;
text-align: center;
}
/************************************* /*************************************
*********** AUTOCOMPLETING *********** *********** AUTOCOMPLETING ***********
**************************************/ **************************************/

431
theme_nin/css/style.css

@ -1136,309 +1136,6 @@ samp {
height: 100%; height: 100%;
} }
/* line 1, ../sass/_following.sass */
.following {
width: 100% !important;
}
/* line 4, ../sass/_following.sass */
.following-list li {
text-align: center;
float: left;
width: 30%;
padding: 13px;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
float: left;
margin: 0 2% 2% 0;
}
/* line 15, ../sass/_following.sass */
.following .mini-profile {
margin-bottom: 10px;
}
/* line 18, ../sass/_following.sass */
.following .mini-profile-info {
position: relative;
}
/* line 21, ../sass/_following.sass */
.following .mini-profile-photo {
margin: 0 auto 10px auto;
display: block;
width: 64px;
height: 64px;
overflow: hidden;
background: #E2E1DE;
}
/* line 29, ../sass/_following.sass */
.following .mini-profile-view {
display: inline;
color: rgba(0, 0, 0, 0.5);
font-size: 12px;
position: absolute;
top: 32px;
left: 65px;
z-index: 1;
}
/* line 38, ../sass/_following.sass */
.following .mini-profile-name {
font-weight: 900;
font-size: 1em;
line-height: 1em;
padding: 0;
text-decoration: none;
display: block;
color: inherit;
display: inline;
}
/* line 47, ../sass/_following.sass */
.following .mini-screen-name {
color: inherit;
display: block;
margin-bottom: 10px;
}
/* line 52, ../sass/_following.sass */
.following button, .following .mini-profile-actions span, .mini-profile-actions .following span {
display: inline-block;
margin: 5px 0;
}
/* line 55, ../sass/_following.sass */
.following button.unfollow, .following .mini-profile-actions span.unfollow, .mini-profile-actions .following span.unfollow {
background-color: #aaa;
}
/* line 57, ../sass/_following.sass */
.following button.public-following, .following .mini-profile-actions span.public-following, .mini-profile-actions .following span.public-following {
background-color: #B4C669;
}
/* line 62, ../sass/_following.sass */
.mini-profile-actions {
position: absolute;
width: auto;
top: 0;
right: -16px;
display: inline-block;
}
/* line 69, ../sass/_following.sass */
.mini-profile-actions span {
cursor: pointer !important;
border-top-right-radius: 0 !important;
border-bottom-right-radius: 0 !important;
}
/* line 76, ../sass/_following.sass */
.mini-profile-actions span:before {
margin: 0;
padding: 0;
line-height: 1em;
font-size: 10px;
}
/* line 81, ../sass/_following.sass */
.mini-profile-actions ul {
height: 0;
overflow: hidden;
position: absolute;
top: 2em;
right: -2em;
transition: height 0.4s linear;
transition: padding-top 0.1s linear;
background: #66686B;
z-index: 3;
}
/* line 96, ../sass/_following.sass */
.mini-profile-actions:hover ul {
padding: 8px;
height: 112px;
}
/* line 101, ../sass/_following.sass */
.mini-profile-actions ul li {
text-align: left;
margin: 0;
background: #66686B;
white-space: nowrap;
color: #aaa;
font-size: 12px;
line-height: 12px;
cursor: pointer;
display: block;
float: none;
width: auto;
padding: 8px;
}
/* line 117, ../sass/_following.sass */
.mini-profile-actions:hover ul li:hover {
color: #B4C669;
}
/* line 123, ../sass/_following.sass */
.following .who-follow {
height: auto;
background-color: rgba(69, 71, 77, 0.1);
overflow: hidden;
font-size: 12px;
}
/* line 129, ../sass/_following.sass */
.following .show-more-followers {
color: #f11;
font-weight: bold;
cursor: pointer;
float: right;
}
/* line 135, ../sass/_following.sass */
.following .mini-follower-link {
display: inline-block;
margin-right: 10px;
}
/* line 138, ../sass/_following.sass */
.following .mini-follower-link:before {
content: " ‧";
}
/* line 141, ../sass/_following.sass */
.following a.open-profile-modal {
display: inline;
text-align: center;
color: #66686B;
}
/* line 145, ../sass/_following.sass */
.following a.open-profile-modal:hover {
color: #aaa;
}
/* line 151, ../sass/_following.sass */
.following .post-area-new {
padding-bottom: 4px;
}
/* line 153, ../sass/_following.sass */
.following .post-area-new textarea {
resize: none;
width: 445px;
display: block;
transition: all 0.3s linear;
-webkit-transition: height 0.3s linear;
-moz-transition: height 0.3s linear;
-o-transition: height 0.3s linear;
-ms-transition: height 0.3s linear;
height: 28px;
border-radius: 3px;
border: solid 1px rgba(0, 0, 0, 0.3);
margin-left: 55px;
margin-bottom: 10px;
padding: 4px;
font-size: 13px;
}
/* line 170, ../sass/_following.sass */
.following .mini-profile .post-area-new {
padding: 9px;
}
/* line 172, ../sass/_following.sass */
.following .mini-profile .post-area-new textarea {
margin-left: 0;
width: 100%;
}
/* line 176, ../sass/_following.sass */
.following .post-area-new.open textarea, .following .mini-profile .post-area-new textarea, .mini-profile .following .post-area-new textarea, .following #postboard-top .post-area .post-area-new textarea, #postboard-top .post-area .following .post-area-new textarea {
height: 80px;
border: solid 1px rgba(227, 79, 66, 0.5);
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3);
}
/* line 181, ../sass/_following.sass */
.following textarea.splited-post {
box-shadow: none !important;
height: 28px;
}
/* line 185, ../sass/_following.sass */
.following .splited-post-counter {
color: rgba(0, 0, 0, 0.3);
font-weight: bold;
}
/* line 188, ../sass/_following.sass */
.following .splited-post-counter:before {
content: "…";
}
/* line 191, ../sass/_following.sass */
.following .post-area-extras {
overflow: hidden;
height: 0;
text-align: right;
}
/* line 196, ../sass/_following.sass */
.following .post-submit {
background: #45474d;
color: rgba(255, 255, 255, 0.8);
border: none;
padding: 5px 10px;
cursor: pointer;
display: inline-block;
margin-top: 4px;
}
/* line 205, ../sass/_following.sass */
.following .post-area-new.open > .post-area-extras, .following .mini-profile .post-area-new > .post-area-extras, .mini-profile .following .post-area-new > .post-area-extras, .following #postboard-top .post-area .post-area-new > .post-area-extras, #postboard-top .post-area .following .post-area-new > .post-area-extras {
height: 35px;
transition: all 0.6s linear;
}
/* line 209, ../sass/_following.sass */
.following .post-area-remaining {
font-size: 13px;
}
/* line 211, ../sass/_following.sass */
.following .post-area-remaining.warn {
color: #ff0000;
}
/* line 214, ../sass/_following.sass */
.following .post .show-more {
font-size: 13px;
font-weight: bold;
margin-left: 60px;
color: rgba(0, 0, 0, 0.5);
}
/* line 219, ../sass/_following.sass */
.following .post .show-more:before {
content: "💭";
}
/* line 222, ../sass/_following.sass */
.swarm-status {
display: none !important;
}
/* line 232, ../sass/_following.sass */
.mini-following-info {
width: 45px;
height: 45px;
text-align: center;
background: white;
margin: 1%;
float: left;
}
/* line 241, ../sass/_following.sass */
.mini-following-info .mini-screen-name, .mini-following-info .mini-following-name {
display: none;
}
/* line 243, ../sass/_following.sass */
.mini-following-info .mini-profile-photo {
height: 45px;
width: 45px;
border-radius: 0;
}
/********** LOGIN AND NETWORK PAGES ****** */ /********** LOGIN AND NETWORK PAGES ****** */
/* line 4, ../sass/_network.sass */ /* line 4, ../sass/_network.sass */
.network.singleBlock ul { .network.singleBlock ul {
@ -2817,6 +2514,18 @@ ol.toptrends-list a:hover {
margin: 4px; margin: 4px;
} }
/*************************************
*********** CONFIRM POPUP ************
**************************************/
.confirm-popup.prompt-wrapper {
top: 30%;
}
.confirm-popup .message {
margin: 8px 12px 20px;
}
/****** FOLLOWING-CONFIG PROMPT ******/ /****** FOLLOWING-CONFIG PROMPT ******/
.following-config-modal.prompt-wrapper { .following-config-modal.prompt-wrapper {
@ -3468,6 +3177,122 @@ ol.toptrends-list a:hover {
font-style: normal; font-style: normal;
} }
/*************************************
*********** FOLLOWING PAGE ***********
**************************************/
.modal-wrapper.following-own-modal {
width: 674px;
height: 600px;
margin: -300px 0 0 -337px;
}
.following-own-modal .modal-content {
padding: 0;
}
.following-own-modal .following-list > li {
width: 320px;
height: 160px;
margin: 2px;
padding: 2px;
float: left;
border: solid 1px rgba(69, 71, 77, .1);
background: #FFF;
text-align: center;
}
.following-own-modal .following-list > li > div {
position: relative;
}
.following-own-modal .following-list > li:hover {
border-bottom: solid 1px #B4C669;
}
.following-own-modal .following-list .mini-profile-photo {
width: 64px;
height: 64px;
margin-top: 12px;
margin-bottom: 2px;
}
.following-own-modal .following-list .mini-profile-name {
padding: 4px;
}
.following-own-modal .following-list .mini-screen-name {
display: none;
}
.following-own-modal .following-list .following-config {
width: 100%;
text-align: center;
margin: 4px;
}
.following-own-modal .following-list .following-config button {
display: inline-block;
}
.following-own-modal .following-list .mini-profile-actions {
display: none;
position: absolute;
top: 0;
right: 8px;
}
.following-own-modal .following-list > li:hover .mini-profile-actions {
display: block;
}
.following-own-modal .following-list .mini-profile-actions span {
cursor: pointer;
display: inline-block;
position: relative;
z-index: 10;
background: #B4C669;
}
.following-own-modal .following-list .mini-profile-actions span:hover {
background: #AAA;
}
.following-own-modal .following-list .mini-profile-actions ul {
height: 0;
overflow: hidden;
position: absolute;
z-index: 20;
right: 0;
padding: 0;
background: #FFF;
transition: height .2s linear;
}
.following-own-modal .following-list .mini-profile-actions:hover ul {
height: 56px;
box-shadow: 8px 10px 10px 0px rgba(0, 0, 0, .2);
}
.following-own-modal .following-list .mini-profile-actions ul > li {
text-align: left;
white-space: nowrap;
color: rgba(0, 0, 0, .7);
font-size: 12px;
margin: 0;
padding: 4px 16px 4px 8px;
border-bottom: solid 1px rgba(0, 0, 0, 0);
background: #FFF;
}
.following-own-modal .following-list .mini-profile-actions ul > li:hover {
border-bottom: solid 1px #B4C669;
}
.following-own-modal .following-list .swarm-status {
font-size: 11px;
display: block;
}
/********** AUTOCOMPLETING *********/ /********** AUTOCOMPLETING *********/

4
theme_nin/js/theme_option.js

@ -7,8 +7,8 @@ $(function(){
$('img[src$="img/tornado_avatar.png"]').attr("src","theme_nin/img/tornado_avatar.png"); $('img[src$="img/tornado_avatar.png"]').attr("src","theme_nin/img/tornado_avatar.png");
$('.mini-profile-actions span').html(''); $('.mini-profile-actions span').html('');
$.globalEval(postToElem.toString().replace(/postContext.append\(_templatePostRtBy/, $.globalEval(postToElem.toString().replace(/postContext.append\(twister\.tmpl\.postRtBy/,
'postContext.prependTo(postContext.parent()).append(_templatePostRtBy')); 'postContext.prependTo(postContext.parent()).append(twister.tmpl.postRtBy'));
$( '.userMenu-home.current a' ).on( 'click', function() { $( '.userMenu-home.current a' ).on( 'click', function() {

239
theme_nin/sass/_following.sass

@ -1,239 +0,0 @@
.following
width: 100%!important
.following-list li
text-align: center
@extend .clear-fix
float: left
width: 30%
padding: 13px
+box-sizing(border-box)
float: left
margin: 0 2% 2% 0
.following .mini-profile
margin-bottom: 10px
.following .mini-profile-info
position: relative
.following .mini-profile-photo
margin: 0 auto 10px auto
display: block
width: 64px
height: 64px
overflow: hidden
background: $main-background-color
.following .mini-profile-view
display: inline
color: rgba(0, 0, 0, 0.5)
font-size: 12px
position: absolute
top: 32px
left: 65px
z-index: 1
.following .mini-profile-name
font-weight: 900
font-size: 1em
line-height: 1em
padding: 0
text-decoration: none
display: block
color: inherit
display: inline
.following .mini-screen-name
color: inherit
display: block
margin-bottom: 10px
.following button
display: inline-block
margin: 5px 0
&.unfollow
background-color: $main-color-light
&.public-following
background-color: $main-color-color
.mini-profile-actions
position: absolute
width: auto
top: 0
right: -16px
display: inline-block
span
cursor: pointer!important
@extend button
border-top-right-radius: 0!important
border-bottom-right-radius: 0!important
@extend .extend-icon
@extend .icon-plus
&:before
margin: 0
padding: 0
line-height: 1em
font-size: 10px
ul
$action-padding-height: 8px
height: 0
overflow: hidden
position: absolute
top: 2em
right: -2em
transition: height .4s linear
transition: padding-top .1s linear
background: $main-color-dark
z-index: 3
&:hover
ul
$action-li-height : 12px
$action-padding-height: 8px
padding: $action-padding-height
height: $action-li-height*4 + $action-padding-height*2*4
ul li
text-align: left
margin: 0
background: $main-color-dark
$action-li-height : 12px
$action-padding-height: 8px
white-space: nowrap
color: $main-color-light
font-size: $action-li-height
line-height: $action-li-height
cursor: pointer
display: block
float: none
width: auto
padding: $action-padding-height
&:hover ul li:hover
color: $main-color-color
.following .who-follow
height: auto
background-color: rgba(69, 71, 77, 0.1)
overflow: hidden
font-size: 12px
.following .show-more-followers
color: #f11
font-weight: bold
cursor: pointer
float: right
.following .mini-follower-link
display: inline-block
margin-right: 10px
&:before
content: " \2027"
.following a.open-profile-modal
display: inline
text-align: center
color: $dark-grey
&:hover
color: $main-color-light
.following .post-area-new
padding-bottom: 4px
textarea
resize: none
width: 445px
display: block
transition: all .3s linear
-webkit-transition: height 0.3s linear
-moz-transition: height 0.3s linear
-o-transition: height 0.3s linear
-ms-transition: height 0.3s linear
height: 28px
border-radius: 3px
border: solid 1px rgba(0, 0, 0, 0.3)
margin-left: 55px
margin-bottom: 10px
padding: 4px
font-size: 13px
.following .mini-profile .post-area-new
padding: 9px
textarea
margin-left: 0
width: 100%
.following .post-area-new.open textarea
height: 80px
border: solid 1px rgba(227, 79, 66, 0.5)
box-shadow: 0 0 10px rgba(0, 0, 0, 0.3)
.following textarea.splited-post
box-shadow: none!important
height: 28px
.following .splited-post-counter
color: rgba(0, 0, 0, 0.3)
font-weight: bold
&:before
content: '\2026'
.following .post-area-extras
overflow: hidden
height: 0
text-align: right
.following .post-submit
background: #45474d
color: rgba(255, 255, 255, 0.8)
border: none
padding: 5px 10px
cursor: pointer
display: inline-block
margin-top: 4px
.following .post-area-new.open > .post-area-extras
height: 35px
transition: all .6s linear
.following .post-area-remaining
font-size: 13px
&.warn
color: #ff0000
.following .post .show-more
font-size: 13px
font-weight: bold
margin-left: 60px
color: rgba(0, 0, 0, 0.5)
&:before
content: '💭'
.swarm-status
display: none!important
.mini-following-info
width: 45px
height: 45px
text-align: center
background: $bloc-background-color
margin: 1%
float: left
&:after
@extend .clear-fix
.mini-screen-name, .mini-following-name
display: none
.mini-profile-photo
height: 45px
width: 45px
border-radius: 0

62
tmobile.html

@ -467,37 +467,7 @@
<h1 class="rtitle">Following</h1> <h1 class="rtitle">Following</h1>
</div> </div>
<div class="content" data-role="content"> <div class="content" data-role="content"></div>
<ul class="following-list" data-role="listview">
<li id="following-user-template" style="display: none;">
<div class="mini-profile-info" data-screen-name="">
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-profile-name">Fulano da Silva</span>
<span>&nbsp;</span>
<span class="mini-screen-name">@
<b class="following-screen-name"></b>
</span>
</a>
<div>
<a data-role="button" data-mini="true" class="unfollow">Unfollow</a>
<a data-role="button" data-mini="true" class="direct-messages-with-user" href="#dmchat">Direct Message</a>
<!-- <a data-role="button" data-mini="true" class="public-following">Public</button> -->
</div>
<div>
<span class="swarm-status" style="display: none;"></span>
</div>
</div>
</li>
</ul>
<div class="not-following-any" style="display:none;">
<h3>
<div> Not following any users! </div>
<div> Use "Search" button to find and follow some.</div>
</h3>
</div>
</div>
<div class="footer" data-role="footer" data-position="fixed" data-tap-toggle="false"> <div class="footer" data-role="footer" data-position="fixed" data-tap-toggle="false">
<a href="#home" data-role="button">Home</a> <a href="#home" data-role="button">Home</a>
@ -809,7 +779,7 @@
</div> <!-- post-data --> </div> <!-- post-data -->
</li> <!-- post-template --> </li> <!-- post-template -->
<div id="post-rt-reference-template"> <div id="template-post-rt-reference">
<div class="post-rt-reference"> <div class="post-rt-reference">
<div class="post-photo"><img class="avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo" /></div> <div class="post-photo"><img class="avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo" /></div>
<div class="post-info"> <div class="post-info">
@ -821,7 +791,7 @@
</div> </div>
</div> </div>
<div id="post-rt-by-template"> <div id="template-post-rt-by">
<div class="post-rt-sign"> <div class="post-rt-sign">
<span class="prep">twisted again by</span><a class="open-profile-modal"></a> <span class="prep">twisted again by</span><a class="open-profile-modal"></a>
</div> </div>
@ -865,6 +835,32 @@
<p class="post-text no-ellipsis"></p> <p class="post-text no-ellipsis"></p>
</li> </li>
<div id="template-following-list">
<ul class="following-list" data-role="listview"></ul>
</div>
<div id="template-following-user">
<li>
<div class="mini-profile-info">
<a href="#" class="open-profile-modal">
<img class="mini-profile-photo avatar" src="img/grayed_avatar_placeholder_24.png" alt="user-photo"/>
<span class="mini-profile-name">Fulano da Silva</span>
<span>&nbsp;</span>
<span class="mini-screen-name">@
<b class="following-screen-name"></b>
</span>
</a>
<div>
<a data-role="button" data-mini="true" class="unfollow">Unfollow</a>
<a data-role="button" data-mini="true" class="direct-messages-with-user" href="#dmchat">Direct Message</a>
<!-- <a data-role="button" data-mini="true" class="public-following">Public</button> -->
</div>
<div>
<span class="swarm-status" style="display: none;"></span>
</div>
</div>
</li>
</div>
</div> <!-- templates --> </div> <!-- templates -->

Loading…
Cancel
Save