Browse Source

The Fastest In Town Orchestra. Mess-O-Rama Music Vol. 1: Living Through This

master
Simon Grim 10 years ago
parent
commit
c95e3d14bd
  1. 32
      css/profile.css
  2. 352
      css/style.css
  3. 41
      following.html
  4. 48
      home.html
  5. 1657
      js/interface_common.js
  6. 63
      js/interface_home.js
  7. 1
      js/interface_localization.js
  8. 24
      js/interface_login.js
  9. 21
      js/jQueryPlugins.js
  10. 2
      js/options.js
  11. 19
      js/twister_actions.js
  12. 83
      js/twister_directmsg.js
  13. 172
      js/twister_following.js
  14. 63
      js/twister_formatpost.js
  15. 27
      login.html
  16. 33
      theme_calm/css/profile.css
  17. 525
      theme_calm/css/style.css
  18. 249
      theme_nin/css/style.css
  19. 14
      theme_nin/js/theme_option.js
  20. 136
      theme_nin/sass/style.sass

32
css/profile.css

@ -168,23 +168,18 @@ @@ -168,23 +168,18 @@
************ PROFILE MODAL ***********
**************************************/
.profile-modal .modal-wrapper
{
.modal-wrapper.profile-modal {
width: 580px;
border-radius: 5px;
overflow: hidden;
position: absolute;
top:5%;
height: 90%;
margin-left: -290px;
height: 760px;
margin: -380px 0 0 -290px;
}
.profile-modal .modal-content
{
padding: 3px;
height: 100%;
.profile-modal .modal-content {
height: 730px;
overflow-y: hidden;
padding: 3px;
}
#msngrswr {
display: none;
margin-top: 20px;
@ -255,18 +250,17 @@ @@ -255,18 +250,17 @@
.profile-modal .profile-bitmessage {
background: #e3e5ea url(../img/bm.png) center no-repeat;
}
.profile-modal .profile-data
{
.profile-modal .profile-data {
display: inline-block;
margin-left: -4px;
border-bottom: 0;
}
.profile-modal .postboard
{
.profile-modal .postboard {
margin-left: 0;
padding: 5px 0 5px 0;
height: 73%;
}
.profile-modal .postboard h2
{
width: auto;

352
css/style.css

@ -896,11 +896,7 @@ ol.toptrends-list { @@ -896,11 +896,7 @@ ol.toptrends-list {
background: #e34f42;
width: 100%;
}
.postboard h2.fixed
{
z-index: 2;
border-top: solid 4px #fbf9f6;
}
.postboard-posts
{
position: relative;
@ -1388,55 +1384,49 @@ ol.toptrends-list { @@ -1388,55 +1384,49 @@ ol.toptrends-list {
************* POPUP MODAL ************
**************************************/
.modal-blackout
{
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba( 0, 0, 0, .6 );
display: none;
.modal-wrapper {
background: #fff;
z-index: 3;
}
.modal-blackout.reply .post
{
background: #ececed;
padding: 10px 15px;
}
.modal-wrapper
{
position: fixed;
top: 50%;
left: 50%;
width: 580px;
border-radius: 5px;
height: 720px;
overflow: hidden;
position: absolute;
top:10%;
left: 50%;
height: 80%;
margin-left: -290px;
margin: -360px 0 0 -290px;
border-radius: 5px;
box-shadow: 10px 12px 18px 0px rgba(0,0,0, .3);
background: rgba( 255, 255,255, 1.0 );
z-index: 3;
}
.modal-content{
height: 100%;
overflow-y: auto;
}
.modal-header
{
.modal-header {
background: #e34f42;
position: relative;
height: 30px;
}
.modal-header h3
{
.modal-header h3 {
color: #fff;
padding: 5px 10px;
font-weight: bold;
background: #e34f42;
color: #fff;
}
.modal-close
{
.modal-wrapper .modal-content {
background: #fff;
height: 690px;
overflow-y: auto;
}
.modal-wrapper .modal-blackout {
background: rgba(0,0,0, .6);
z-index: -1;
position: fixed;
left: 0;
top: 0;
width: 100%;
height: 100%;
}
.modal-close {
position: absolute;
right: 0;
top: 0;
@ -1447,11 +1437,12 @@ ol.toptrends-list { @@ -1447,11 +1437,12 @@ ol.toptrends-list {
border-left: solid 1px rgba( 255, 255, 255, .3 );
transition: all .1s linear;
}
.modal-close:hover
{
.modal-close:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.modal-back,
.mark-all-as-read {
position: absolute;
@ -1465,43 +1456,28 @@ ol.toptrends-list { @@ -1465,43 +1456,28 @@ ol.toptrends-list {
transition: all .1s linear;
display: none;
}
.modal-back:hover,
.mark-all-as-read:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.modal-buttons
{
padding: 10px;
text-align: right;
}
.modal-buttons button:last-child
{
padding: 5px 20px;
.modal-wrapper.reply .post {
background: #ececed;
padding: 10px 15px;
}
/*************************************
****************** DIRECT MESSAGES MODAL
******** DIRECT MESSAGES MODAL *******
**************************************/
.directMessages .modal-wrapper
{
overflow-y: auto;
}
.directMessages .modal-content
{
height: auto;
}
.directMessages .modal-buttons
{
display: none;
}
.direct-messages-list .post
{
.direct-messages-list .post {
padding: 10px 30px 10px 15px;
cursor: pointer;
}
.direct-messages-list .post:after
{
.direct-messages-list .post:after {
content: "►";
position: absolute;
right: 10px;
@ -1509,48 +1485,48 @@ ol.toptrends-list { @@ -1509,48 +1485,48 @@ ol.toptrends-list {
margin: -6px 0 0 0;
color: rgba( 0, 0, 0, .4 );
}
.direct-messages-thread
{
.direct-messages-thread {
padding: 10px;
}
.direct-messages-thread .post
{
.direct-messages-thread .post {
min-height: 82px;
margin-left: 65px;
}
.direct-messages-thread .post:after,
.direct-messages-thread .post:nth-child(2n):after
{
.direct-messages-thread .post:nth-child(2n):after {
content: "";
width: 1px;
background: transparent;
position: absolute;
top: 25px;
}
.direct-messages-thread .post:after
{
.direct-messages-thread .post:after {
border-top: solid 10px transparent;
border-bottom: solid 10px transparent;
border-right: solid 10px #ececed;
left: -10px;
}
.direct-messages-thread .post-text
{
.direct-messages-thread .post-text {
margin: 2px 10px 4px 4px;
word-wrap: break-word;
}
.direct-messages-thread .post-photo
{
.direct-messages-thread .post-photo {
position: absolute;
left: -65px;
}
.direct-messages-thread .post.sent
{
.direct-messages-thread .post.sent {
margin-right: 60px;
margin-left: 0;
}
.direct-messages-thread .post.sent:after
{
.direct-messages-thread .post.sent:after {
border-top: solid 10px transparent;
border-bottom: solid 10px transparent;
border-right: none;
@ -1558,186 +1534,174 @@ ol.toptrends-list { @@ -1558,186 +1534,174 @@ ol.toptrends-list {
right: -10px;
left: auto;
}
.direct-messages-thread .post.sent .post-text
{
.direct-messages-thread .post.sent .post-text {
margin: 2px 10px 4px 4px;
}
.direct-messages-thread .post.sent .post-photo
{
.direct-messages-thread .post.sent .post-photo {
position: absolute;
right: -65px;
left: auto;
}
.mark-all-as-read {
right: 60px;
}
.mark-all-as-read:before {
content: '\2714';
}
/*************************************
****************** NEW USER MODAL
*********** NEW USER MODAL ***********
**************************************/
.new-user .modal-wrapper
{
top: 50%;
.new-user.modal-wrapper {
width: 720px;
height: 400px;
margin: -200px 0 0 -360px;
overflow-x: hidden;
overflow-y: hidden;
height: 580px;
margin: -290px 0 0 -360px;
}
.new-user .modal-content
{
margin: 10px 10px 10px 10px;
.new-user .modal-content {
height: 550px;
padding: 25px;
}
.new-user .modal-buttons,
.new-user .modal-close
{
.new-user .modal-close {
display: none;
}
.new-user .text
{
.new-user .text {
margin: 0 0 15px 0;
}
.new-user .emphasis
{
.new-user .emphasis {
font-size: 18px;
text-align: center;
}
.new-user .secret-key
{
color: rgba( .5, 0, 0, 1.0 );
.new-user .secret-key {
color: rgba(.5,0,0, 1.0);
font-weight: bold;
}
/*************************************
****************** HASHTAG MODAL
*************************************/
************ HASHTAG MODAL ***********
**************************************/
.hashtag-modal .modal-buttons
{
display: none;
}
.hashtag-modal .postboard
{
.hashtag-modal .postboard {
margin-left: 0;
}
/*************************************
****************** CONVERSATION MODAL
*************************************/
********* CONVERSATION MODAL *********
**************************************/
.conversation-modal .modal-buttons
{
display: none;
}
.conversation-modal .postboard
{
.conversation-modal .postboard {
margin-left: 0;
}
/*************************************
****************** FOLLOWING MODAL
************************************/
********** FOLLOWING MODAL ***********
**************************************/
.following-modal .modal-buttons
{
display: none;
}
.following-modal ol
{
.following-modal ol {
margin: 5px;
}
.following-modal .open-profile-modal:hover
{
.following-modal .open-profile-modal:hover {
text-decoration: none;
}
.following-modal .open-profile-modal img
{
.following-modal .open-profile-modal img {
float: none;
}
.following-modal .open-profile-modal span
{
.following-modal .open-profile-modal span {
vertical-align: middle;
}
.following-modal .open-profile-modal span:hover
{
.following-modal .open-profile-modal span:hover {
text-decoration: underline;
}
/*************************************
******************* WHO TO FOLLOW MODAL
*************************************/
.who-to-follow-modal .modal-buttons
{
display: none;
}
.who-to-follow-modal ol
{
********* WHO TO FOLLOW MODAL ********
**************************************/
.who-to-follow-modal ol {
margin: 5px;
}
.who-to-follow-modal .open-profile-modal:hover
{
.who-to-follow-modal .open-profile-modal:hover {
text-decoration: none;
}
.who-to-follow-modal .open-profile-modal span
{
.who-to-follow-modal .open-profile-modal span {
vertical-align: middle;
}
.who-to-follow-modal .open-profile-modal span:hover
{
.who-to-follow-modal .open-profile-modal span:hover {
text-decoration: underline;
}
.who-to-follow-modal .follow
{
.who-to-follow-modal .follow {
float: right;
margin: -30px 10px 0 10px;
}
.who-to-follow-modal .twister-user-info span
{
.who-to-follow-modal .twister-user-info span {
vertical-align: bottom;
}
.who-to-follow-modal .bio
{
.who-to-follow-modal .bio {
font-size: 12px;
color: rgba( 0, 0, 0, .6 );
}
/*************************************
****************** POPUP PROMPT ******
************ POPUP PROMPT ************
**************************************/
.prompt-wrapper
{
.prompt-wrapper {
background: #fff;
z-index: 5;
position: fixed;
top: 50%;
left: 50%;
background: #fff;
box-shadow: 10px 12px 18px 0px rgba(0,0,0, .3);
z-index: 5;
width: 600px;
margin-left:-300px;
margin-left: -300px;
box-shadow: 10px 12px 18px 0px rgba(0,0,0, .3);
}
.prompt-wrapper .modal-buttons {
padding: 10px;
text-align: right;
}
.prompt-wrapper .modal-header h3{
background: #E34F42;
.prompt-wrapper .modal-buttons button:last-child {
padding: 5px 20px;
}
/*************************************
****** FOLLOWING-CONFIG PROMPT *******
**************************************/
.following-config-modal
{
.following-config-modal.prompt-wrapper {
margin-top: -80px;
}
.following-config-modal .modal-content
{
.following-config-modal .modal-content {
padding: 10px;
text-align: center;
}
.following-config-modal .modal-buttons
{
.following-config-modal .modal-buttons {
display: none;
}
.following-config-method-buttons
{
.following-config-method-buttons {
padding: 10px;
}
@ -1745,15 +1709,15 @@ ol.toptrends-list { @@ -1745,15 +1709,15 @@ ol.toptrends-list {
******** RETWIST POSTS PROMPT ********
**************************************/
.reTwist
{
.reTwist.prompt-wrapper {
margin-top: -100px;
}
.reTwist .post-expand,
.reTwist .post-interactions
{
.reTwist .post-interactions {
display: none;
}
.reTwist .post {
margin: 5px;
padding: 5px;
@ -1761,34 +1725,32 @@ ol.toptrends-list { @@ -1761,34 +1725,32 @@ ol.toptrends-list {
}
/*************************************
****************** REPLY POSTS PROMPT
********* REPLY POSTS PROMPT *********
**************************************/
.reply
{
.reply.prompt-wrapper {
margin-top: -140px;
}
.reply .modal-buttons
{
.reply .modal-buttons {
display: none;
}
.reply .post-expand,
.reply .post-interactions
{
.reply .post-interactions {
display: none;
}
.reply .textcomplete-wrapper{
.reply .textcomplete-wrapper {
padding-top: 10px;
}
.reply .textcomplete-wrapper textarea{
.reply .textcomplete-wrapper textarea {
margin: 10px;
width: 580px;
}
.reply .post-area-extras
{
.reply .post-area-extras {
margin-right: 10px;
}

41
following.html

@ -37,9 +37,7 @@ @@ -37,9 +37,7 @@
<link rel="icon" type="image/png" href="img/twister_mini.png" />
</head>
<body>
<!-- MENU SUPERIOR INIT -->
<nav class="userMenu">
<ul>
@ -78,7 +76,6 @@ @@ -78,7 +76,6 @@
<!-- 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>
@ -98,25 +95,17 @@ @@ -98,25 +95,17 @@
</li>
</ul>
</div>
</li>
</ul>
</nav>
<!-- MENU SUPERIOR END -->
<div class="wrapper">
<!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="dashboard left">
<!-- PROFILE MODULE INIT -->
<div class="module mini-profile selectable_theme theme_nin">
<div class="mini-profile-info">
<!-- THEME NIN added user menu (mentions, messages and edit profile) -->
<ul class="mini-profile-indicators selectable_theme theme_nin">
<li class="userMenu-connections">
@ -129,8 +118,6 @@ @@ -129,8 +118,6 @@
<a href="profile-edit.html" title="Edit profile"><span>Edit profile</span></a>
</li>
</ul>
<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>
@ -140,12 +127,10 @@ @@ -140,12 +127,10 @@
<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>
@ -196,13 +181,10 @@ @@ -196,13 +181,10 @@
</div>
</div>
<!-- LADO ESQUERDO DE MÓDULOS END -->
</div>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<!-- TEMPLATE DE WHO-TO-FOLLOW SUGGESTION -->
<li id="follow-suggestion-template" class="twister-user">
<div class="">
@ -288,33 +270,25 @@ @@ -288,33 +270,25 @@
<!-- 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>
<!-- TEMPLATE INVÓLUCRO DO POST EXPANDIDO END -->
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
<div class="modal-blackout cancel">
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span>
<span class="modal-back">&lt;</span>
<span class="modal-back" onClick="history.back();">&lt;</span>
<span class="mark-all-as-read"></span>
</div>
<div class="modal-content"></div>
<div class="modal-buttons">
<button class="modal-cancel cancel">Cancel</button>
<button class="modal-propagate">Retransmit</button>
</div>
</div>
<div class="modal-blackout cancel"></div>
</div>
<!-- TEMPLATE DO MODAL GENÉRICO END -->
@ -371,7 +345,6 @@ @@ -371,7 +345,6 @@
<p class="post-text"></p>
</li>
<div class="messages-thread-template">
<ol class="direct-messages-thread">
<!-- use "dm-chat-template" here -->
@ -397,7 +370,6 @@ @@ -397,7 +370,6 @@
</div>
<!-- MODAL DE DIRECT MESSAGES INIT -->
<!-- MODAL DE PROFILE -->
<div id="profile-modal-template">
<!-- ÁREA DE PROFILE PHOTO INIT -->
@ -457,10 +429,8 @@ @@ -457,10 +429,8 @@
</div>
<!-- MODAL DE PROFILE END -->
<!-- MODAL DE HASHTAGS -->
<div id="hashtag-modal-template">
<!-- ÁREA DE POSTS INIT -->
<div class="postboard">
<h2>
@ -468,10 +438,8 @@ @@ -468,10 +438,8 @@
<!-- 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>
@ -497,28 +465,23 @@ @@ -497,28 +465,23 @@
</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 -->

48
home.html

@ -35,9 +35,7 @@ @@ -35,9 +35,7 @@
<link rel="icon" type="image/png" href="img/twister_mini.png" />
</head>
<body>
<!-- MENU SUPERIOR INIT -->
<nav class="userMenu">
<ul>
@ -80,7 +78,6 @@ @@ -80,7 +78,6 @@
<!-- 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>
@ -100,20 +97,14 @@ @@ -100,20 +97,14 @@
</li>
</ul>
</div>
</li>
</ul>
</nav>
<!-- MENU SUPERIOR END -->
<div class="wrapper">
<!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="dashboard left">
<!-- PROFILE MODULE -->
<div class="module mini-profile">
<div class="mini-profile-info">
@ -153,14 +144,13 @@ @@ -153,14 +144,13 @@
</div>
<!-- WHO TO FOLLOW MODULE -->
<div class="module who-to-follow"></div>
<div class="module who-to-follow" style="display: none;"></div>
<!-- TOP TRENDS MODULE -->
<div class="module toptrends"></div>
<div class="module toptrends" style="display: none;"></div>
<!-- TWISTDAY REMINDER MODULE -->
<div class="module twistday-reminder"></div>
<div class="module twistday-reminder" style="display: none;"></div>
</div>
<!-- LADO ESQUERDO DE MÓDULOS END -->
@ -193,24 +183,20 @@ @@ -193,24 +183,20 @@
</div>
<!-- END postboard-top -->
<ol id="posts" class="postboard-posts">
<!-- use "post-template" here -->
</ol>
<div class="postboard-loading" style="display: none;">
<div></div>
</div>
</div>
<!-- ÁREA DE POSTS END -->
<div class="dashboard right"></div>
</div>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<!-- TEMPLATE DE WHO-TO-FOLLOW MODULE -->
<div id="who-to-follow-template">
<div>
@ -223,7 +209,7 @@ @@ -223,7 +209,7 @@
<!-- use "follow-suggestion-template" here -->
</ol>
</div>
<div class="loading-roller" style="display: none;">
<div class="loading-roller">
<div></div>
</div>
</div>
@ -236,7 +222,7 @@ @@ -236,7 +222,7 @@
<a class="refresh-toptrends">Refresh</a>
<ol class="toptrends-list"></ol>
</div>
<div class="loading-roller" style="display: none;">
<div class="loading-roller">
<div></div>
</div>
</div>
@ -260,7 +246,7 @@ @@ -260,7 +246,7 @@
</ol>
</div>
</div>
<div class="loading-roller" style="display: none;">
<div class="loading-roller">
<div></div>
</div>
</div>
@ -372,8 +358,6 @@ @@ -372,8 +358,6 @@
<!-- 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"/>
@ -385,7 +369,6 @@ @@ -385,7 +369,6 @@
<!-- TEMPLATE INVÓLUCRO DO POST EXPANDIDO END -->
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
<div class="modal-blackout cancel">
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
@ -394,11 +377,7 @@ @@ -394,11 +377,7 @@
<span class="mark-all-as-read"></span>
</div>
<div class="modal-content"></div>
<div class="modal-buttons">
<button class="modal-cancel cancel">Cancel</button>
<button class="modal-propagate">Retransmit</button>
</div>
</div>
<div class="modal-blackout cancel"></div>
</div>
<!-- TEMPLATE DO MODAL GENÉRICO END -->
@ -455,7 +434,6 @@ @@ -455,7 +434,6 @@
<p class="post-text"></p>
</li>
<div class="messages-thread-template">
<ol class="direct-messages-thread">
<!-- use "dm-chat-template" here -->
@ -481,7 +459,6 @@ @@ -481,7 +459,6 @@
</div>
<!-- MODAL DE DIRECT MESSAGES INIT -->
<!-- MODAL DE PROFILE -->
<div id="profile-modal-template">
<!-- ÁREA DE PROFILE PHOTO INIT -->
@ -532,19 +509,15 @@ @@ -532,19 +509,15 @@
<!-- 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>
@ -552,10 +525,8 @@ @@ -552,10 +525,8 @@
<!-- 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 class="postboard-loading" style="display: none;">
<div></div>
</div>
@ -584,28 +555,23 @@ @@ -584,28 +555,23 @@
</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 -->

1657
js/interface_common.js

File diff suppressed because it is too large Load Diff

63
js/interface_home.js

@ -46,8 +46,7 @@ var InterfaceFunctions = function() { @@ -46,8 +46,7 @@ var InterfaceFunctions = function() {
//$("span.screen-name").text('@' + user);
var $miniProfile = $(".mini-profile");
if(!defaultScreenName)
{
if (!defaultScreenName) {
$(".userMenu-profile > a").text(polyglot.t("Login"));
$(".userMenu-profile > a").attr("href","login.html");
$(".post-area-new > textarea").attr("placeholder",polyglot.t("You have to log in to post messages."));
@ -64,9 +63,7 @@ var InterfaceFunctions = function() { @@ -64,9 +63,7 @@ var InterfaceFunctions = function() {
$(".dropdown-menu-following").attr("href","#");
$(".dropdown-menu-following").bind("click", function()
{ alert(polyglot.t("You are not following anyone because you are not logged in."))} );
}
else
{
} 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);
@ -103,7 +100,7 @@ var InterfaceFunctions = function() { @@ -103,7 +100,7 @@ var InterfaceFunctions = function() {
$(window)
.on("eventFollow", function(e, user) {
$(".following-count").text(followingUsers.length-1);
setTimeout('requestTimelineUpdate("latest",postsPerRefresh,["'+user+'"],promotedPostsOnly)', 1000);
setTimeout(requestTimelineUpdate, 1000, 'latest', postsPerRefresh, [user], promotedPostsOnly);
})
.on("eventUnfollow", function(e, user) {
$(".following-count").text(followingUsers.length-1);
@ -113,21 +110,27 @@ var InterfaceFunctions = function() { @@ -113,21 +110,27 @@ var InterfaceFunctions = function() {
$( this ).remove();
});
});
}
if ($.Options.TopTrends.val === 'enable')
initTopTrends();
if ($.Options.WhoToFollow.val === 'enable')
initWhoToFollow();
else
killInterfaceModule('toptrends');
killInterfaceModule('who-to-follow');
if ($.Options.TwistdayReminder.val === 'enable')
initTwistdayReminder();
else
killInterfaceModule('twistday-reminder');
}
if ($.Options.TopTrends.val === 'enable')
initTopTrends();
else
killInterfaceModule('toptrends');
}
}
function initTopTrends() {
var $tt = initInterfaceModule('toptrends');
if ($tt.length) {
var $ttRefresh = $tt.find('.refresh-toptrends');
$ttRefresh.on('click', updateTrendingHashtags);
@ -138,6 +141,7 @@ function initTopTrends() { @@ -138,6 +141,7 @@ function initTopTrends() {
function updateTrendingHashtags() {
var $module = $('.module.toptrends');
var $list = $module.find('.toptrends-list');
if ($list.length) {
$list.empty().hide();
$module.find('.refresh-toptrends').hide();
@ -183,8 +187,35 @@ function updateTrendingHashtags() { @@ -183,8 +187,35 @@ function updateTrendingHashtags() {
}
}
function initWhoToFollow() {
var wtf = initInterfaceModule('who-to-follow');
if (wtf.length) {
var wtfRefresh = wtf.find('.refresh-users');
wtfRefresh.on('click', refreshWhoToFollow);
setTimeout(function() {wtfRefresh.click();}, 100);
//wtf.find('.view-all-users').on('click', function() {window.location.hash = '#whotofollow';});
}
}
function refreshWhoToFollow() {
var module = $('.module.who-to-follow');
var list = module.find('.follow-suggestions');
if (list.length) {
list.empty().hide();
module.find('.refresh-users').hide();
module.find('.loading-roller').show();
getRandomFollowSuggestion();
getRandomFollowSuggestion();
getRandomFollowSuggestion();
}
}
function initTwistdayReminder() {
var $module = initInterfaceModule('twistday-reminder');
if ($module.length) {
var $moduleRefresh = $module.find('.refresh');
$moduleRefresh.on('click', refreshTwistdayReminder);
@ -197,6 +228,7 @@ function initTwistdayReminder() { @@ -197,6 +228,7 @@ function initTwistdayReminder() {
function refreshTwistdayReminder() {
var $module = $('.module.twistday-reminder');
var $list = $module.find('.list');
if ($list.length) {
$module.find('.refresh').hide();
$module.find('.loading-roller').show();
@ -291,14 +323,3 @@ function refreshTwistdayReminder() { @@ -291,14 +323,3 @@ function refreshTwistdayReminder() {
//***********************************************
var interfaceFunctions = new InterfaceFunctions;
$( document ).ready( interfaceFunctions.init );
//função no window que fixa o header das postagens
function fixDiv()
{
var $cache = $('.postboard h2');
if ($(window).scrollTop() > 26)
$cache.addClass( "fixed" );
else
$cache.removeClass( "fixed" );
}
$(window).scroll(fixDiv);

1
js/interface_localization.js

@ -51,6 +51,7 @@ if(preferredLanguage == "en"){ @@ -51,6 +51,7 @@ if(preferredLanguage == "en"){
"Detailed information": "Detailed information",
"DHT network down.": "DHT network down.",
"Direct Messages": "Direct Messages",
"direct_messages_with": "Direct messages with %{username}",
"Disable": "Disable",
"Display mentions to @": "Display mentions to @",
"Display retransmissions": "Display retransmissions",

24
js/interface_login.js

@ -1,27 +1,19 @@ @@ -1,27 +1,19 @@
// interface_login.js
// 2013 Miguel Freitas
function processCreateUser(username, secretKey) {
defaultScreenName = username;
if(defaultScreenName) {
if (defaultScreenName)
saveScreenName();
}
var newUserClass = "new-user";
openModal( newUserClass );
//título do modal
$( "." + newUserClass + " h3" ).text( polyglot.t("propagating_nickname", { username: username }) );
var modalContent = $("." + newUserClass + " .modal-content");
var templateContent = $( "#new-user-modal-template" ).children().clone(true);
templateContent.appendTo(modalContent);
$( "." + newUserClass + " .secret-key" ).text(secretKey);
openModal({
classAdd: 'new-user',
content: $('#new-user-modal-template').children().clone(true),
title: polyglot.t('propagating_nickname', {username: username})
})
.content.find('.secret-key').text(secretKey);
sendNewUserTransaction( username, processSendnewusertransaction );
sendNewUserTransaction(username, processSendnewusertransaction);
}
function processSendnewusertransaction() {

21
js/jQueryPlugins.js

@ -1,3 +1,23 @@ @@ -1,3 +1,23 @@
// following replacement of the native setTimeout() and setInterval()
// enables the passage of the 'this' object through the JavaScript timers
// and enables the HTML5 standard passage of arbitrary arguments to the
// callback functions of timers in IE9 and other old browsers (like some of mobile ones).
// see https://developer.mozilla.org/en-US/docs/Web/API/WindowTimers/setTimeout#A_possible_solution
var __nativeST__ = window.setTimeout, __nativeSI__ = window.setInterval;
window.setTimeout = function (vCallback, nDelay) { // additional arguments will be passed
var oThis = this, aArgs = Array.prototype.slice.call(arguments, 2);
return __nativeST__(vCallback instanceof Function ?
function () {vCallback.apply(oThis, aArgs);} : vCallback, nDelay);
};
window.setInterval = function (vCallback, nDelay) { // additional arguments will be passed
var oThis = this, aArgs = Array.prototype.slice.call(arguments, 2);
return __nativeSI__(vCallback instanceof Function ?
function () {vCallback.apply(oThis, aArgs);} : vCallback, nDelay);
};
// bind callback function for event of clicking outside of element
(function(jQuery) {
jQuery.fn.clickoutside = function(callback) {
var outside = 1, self = $(this);
@ -13,6 +33,7 @@ @@ -13,6 +33,7 @@
}
})(jQuery);
// get caret position
(function($) {
$.fn.caret = function(pos) {
var target = this[0];

2
js/options.js

@ -350,4 +350,4 @@ function checkForNumeric(elem) { @@ -350,4 +350,4 @@ function checkForNumeric(elem) {
$(elem).next('span').text(polyglot.t('only positive numbers!'));
return false;
}
};
}

19
js/twister_actions.js

@ -159,7 +159,7 @@ function requestPost(containerToAppend,username,resource,cbFunc,cbArgs){ @@ -159,7 +159,7 @@ function requestPost(containerToAppend,username,resource,cbFunc,cbArgs){
function(args, postFromJson) {
if( postFromJson ) {
console.log(postFromJson);
//console.log(postFromJson);
appendPostToContainer(postFromJson,args.containerToAppend);
@ -318,23 +318,18 @@ function updateProfilePosts(postsView, username, useGetposts) { @@ -318,23 +318,18 @@ function updateProfilePosts(postsView, username, useGetposts) {
});
}
function updateFollowingData(followingModalContent, username) {
followingModalContent.find(".following-screen-name b").text(username);
loadFollowingIntoList( username, $(followingModalContent[1]) );
}
function clearHashtagProcessed() {
_hashtagProcessedMap = {};
_hashtagPendingPosts = [];
}
function requestHashtag(postboard,hashtag,resource, timeoutArgs) {
function requestHashtag(postboard, hashtag, resource, timeoutArgs) {
postboard.closest("div").find(".postboard-loading").show();
dhtget( hashtag, resource, "m",
function(args, data) {
processHashtag(args.postboard, args.hashtag, data);
}, {postboard:postboard,hashtag:hashtag},
timeoutArgs);
dhtget(hashtag, resource, "m",
function(args, data) {processHashtag(args.postboard, args.hashtag, data);},
{postboard:postboard,hashtag:hashtag},
timeoutArgs
);
}
function processHashtag(postboard, hashtag, data) {

83
js/twister_directmsg.js

@ -45,21 +45,8 @@ function processDMsnippet(dmUsers, dmThreadList) { @@ -45,21 +45,8 @@ function processDMsnippet(dmUsers, dmThreadList) {
$.MAL.dmThreadListLoaded();
}
function openDmConversation(dm_screenname, dmTitleName, dmConversation) {
if( dm_screenname.length && dm_screenname[0] === '*' )
getGroupChatName( dm_screenname, dmTitleName );
else
getFullname( dm_screenname, dmTitleName );
dmConversation.attr("data-dm-screen-name", dm_screenname);
var dmConvo = dmConversation.find(".direct-messages-thread");
dmConvo.empty();
requestDmConversationModal(dmConvo,dm_screenname);
}
function requestDmConversationModal(dmConvo,dm_screenname) {
if( dmConvo.parents(".modal-blackout").css("display") == 'none' )
if( dmConvo.parents(".modal-wrapper").css("display") == 'none' )
return;
requestDmConversation(dmConvo,dm_screenname);
@ -146,59 +133,57 @@ function newDirectMsg(msg, dm_screenname) { @@ -146,59 +133,57 @@ function newDirectMsg(msg, dm_screenname) {
}
}
//dispara o modal de direct messages
function directMessagesPopup()
{
if(!defaultScreenName)
{
alert(polyglot.t("You have to log in to use direct messages."));
// dispara o modal de direct messages
function directMessagesPopup() {
if (!defaultScreenName) {
alert(polyglot.t('You have to log in to use direct messages.'));
return;
}
var directMessagesClass = "directMessages";
openModal( directMessagesClass );
var directMessagesContent = $( ".direct-messages-template" ).html();
$( directMessagesContent ).clone().appendTo( ".directMessages .modal-content" );
//título do modal
$( ".directMessages h3" ).text( polyglot.t("Direct Messages") );
modal = openModal({
classAdd: 'directMessages',
content: $('.direct-messages-template').children().clone(),
title: polyglot.t('Direct Messages')
});
requestDMsnippetList($(".directMessages").find(".direct-messages-list"));
$('.mark-all-as-read').css('display', 'inline');
$('.mark-all-as-read').attr('title', polyglot.t("Mark all as read"));
requestDMsnippetList(modal.content.find('.direct-messages-list'));
$('.mark-all-as-read').on('click', function() {
modal.self.find('.mark-all-as-read')
.css('display', 'inline')
.attr('title', polyglot.t('Mark all as read'))
.on('click', function() {
for (var k in _newDMsPerUser) {
_newDMsPerUser[k] = 0;
}
saveDMsToStorage();
$.MAL.updateNewDMsUI(getNewDMsCount());
});
})
;
}
function openDmWithUserModal(dm_screenname)
{
if(!defaultScreenName){
alert(polyglot.t("You have to log in to use direct messages."));
function openDmWithUserModal(dm_screenname) {
if (!defaultScreenName) {
alert(polyglot.t('You have to log in to use direct messages.'));
return;
}
var directMessagesClass = "directMessages";
openModal( directMessagesClass );
modal = openModal({
classAdd: 'directMessages',
content: $('.messages-thread-template').children().clone(),
title: polyglot.t('direct_messages_with', {username: '<span>' + dm_screenname + '</span>'})
});
modal.self.attr('data-dm-screen-name', dm_screenname);
//para poder exibir a thread selecionada...
var retweetContent = $( ".messages-thread-template" ).html();
$( retweetContent ).clone().appendTo( ".directMessages .modal-content" ).hide().fadeIn( "fast" );
if (dm_screenname.length && dm_screenname[0] === '*')
getGroupChatName(dm_screenname, modal.self.find('.modal-header h3 span'));
else
getFullname(dm_screenname, modal.self.find('.modal-header h3 span'));
var dmTitle = $( ".directMessages h3" );
dmTitle.html(polyglot.t("Direct messages with") + " <span></span>");
dmTitle = dmTitle.find("span");
var dmConversation = $(".directMessages");
openDmConversation(dm_screenname, dmTitle, dmConversation);
requestDmConversationModal(modal.self.find('.direct-messages-thread').empty(), dm_screenname);
var $dmForm = $( ".dm-form-template" ).children().clone(true);
$dmForm.addClass("open");
$dmForm.appendTo( ".directMessages .modal-wrapper" ).hide().fadeIn( "fast" );
$('.dm-form-template').children().clone()
.addClass('open').appendTo(modal.content).fadeIn('fast');
}

172
js/twister_following.js

@ -421,51 +421,39 @@ function isPublicFollowing(user) { @@ -421,51 +421,39 @@ function isPublicFollowing(user) {
// check if following list is empty
function followingEmptyOrMyself() {
if( followingUsers.length == 0 ||
followingUsers.length == 1 && followingUsers[0] == defaultScreenName )
return true;
else
return false;
return (!followingUsers.length || (followingUsers.length === 1 && followingUsers[0] === defaultScreenName))
}
// randomly choose a user we follow, get "following1" from him and them
// choose a suggestion from their list. this function could be way better, but
// that's about the simplest we may get to start with.
function getRandomFollowSuggestion(cbFunc, cbArg) {
if( followingEmptyOrMyself() ) {
cbFunc(cbArg, null, null);
function getRandomFollowSuggestion() {
if (followingEmptyOrMyself())
return;
}
var i = parseInt( Math.random() * followingUsers.length );
if ( (i < followingUsers.length && followingUsers[i] == defaultScreenName) ||
typeof(twisterFollowingO) === 'undefined' ||
typeof(twisterFollowingO.followingsFollowings[followingUsers[i]]) === 'undefined') {
var i = Math.floor(Math.random() * followingUsers.length); // Math.floor(Math.random() * (max - min + 1)) + min for getting inclusive random from min to max; our min and max are 0 and followingUsers.length - 1
while (followingUsers[i] === defaultScreenName)
i = Math.floor(Math.random() * followingUsers.length);
setTimeout(function() {getRandomFollowSuggestion(cbFunc, cbArg);}, 500);
if (typeof twisterFollowingO === 'undefined' ||
typeof twisterFollowingO.followingsFollowings[followingUsers[i]] === 'undefined') {
setTimeout(getRandomFollowSuggestion, 500);
return;
}
if( i < followingUsers.length ) {
var suggested = false;
var j = parseInt( Math.random() * twisterFollowingO.followingsFollowings[followingUsers[i]]["following"].length );
for( ; j < twisterFollowingO.followingsFollowings[followingUsers[i]]["following"].length; j++ ) {
if( followingUsers.indexOf(twisterFollowingO.followingsFollowings[followingUsers[i]]["following"][j]) < 0 &&
_followSuggestions.indexOf(twisterFollowingO.followingsFollowings[followingUsers[i]]["following"][j]) < 0 ) {
cbFunc(cbArg, twisterFollowingO.followingsFollowings[followingUsers[i]]["following"][j], followingUsers[i]);
_followSuggestions.push(twisterFollowingO.followingsFollowings[followingUsers[i]]["following"][j]);
var j = Math.floor(Math.random() * twisterFollowingO.followingsFollowings[followingUsers[i]].following.length);
for( ; j < twisterFollowingO.followingsFollowings[followingUsers[i]].following.length; j++ ) {
if( followingUsers.indexOf(twisterFollowingO.followingsFollowings[followingUsers[i]].following[j]) < 0 &&
_followSuggestions.indexOf(twisterFollowingO.followingsFollowings[followingUsers[i]].following[j]) < 0) {
processWhoToFollowSuggestion(twisterFollowingO.followingsFollowings[followingUsers[i]].following[j], followingUsers[i]);
_followSuggestions.push(twisterFollowingO.followingsFollowings[followingUsers[i]].following[j]);
suggested = true;
break;
}
}
if( !suggested ) {
cbFunc(cbArg, null, null);
}
} else {
cbFunc(cbArg, null, null);
}
if (!suggested)
setTimeout(getRandomFollowSuggestion, 500);
}
function whoFollows(username) {
@ -562,39 +550,31 @@ function showFollowingUsers(){ @@ -562,39 +550,31 @@ function showFollowingUsers(){
$.MAL.followingListLoaded();
}
function processSuggestion(arg, suggestion, followedBy) {
if( suggestion ) {
var $module = $('.module.who-to-follow');
var $list = $module.find('.follow-suggestions');
var item = $("#follow-suggestion-template").clone(true);
item.removeAttr("id");
item.find(".twister-user-info").attr("data-screen-name", suggestion);
function processWhoToFollowSuggestion(suggestion, followedBy) {
if (suggestion) {
var module = $('.module.who-to-follow');
var list = module.find('.follow-suggestions');
var item = $('#follow-suggestion-template').clone(true)
.removeAttr('id');
item.find(".twister-user-name").attr("href", $.MAL.userUrl(suggestion));
item.find(".twister-by-user-name").attr("href", $.MAL.userUrl(followedBy));
item.find(".twister-user-tag").text("@" + suggestion);
item.find('.twister-user-info').attr('data-screen-name', suggestion);
item.find('.twister-user-name').attr('href', $.MAL.userUrl(suggestion));
item.find('.twister-by-user-name').attr('href', $.MAL.userUrl(followedBy));
item.find('.twister-user-tag').text('@' + suggestion);
getAvatar(suggestion,item.find(".twister-user-photo"));
getAvatar(suggestion, item.find('.twister-user-photo'));
getFullname(followedBy, item.find('.followed-by').text(followedBy));
//getFullname(suggestion,item.find(".twister-user"));
var $spanFollowedBy = item.find(".followed-by");
$spanFollowedBy.text(followedBy);
getFullname(followedBy,$spanFollowedBy);
item.find('.twister-user-remove').bind("click", function() {
item.find('.twister-user-remove').on('click', function() {
item.remove();
getRandomFollowSuggestion(processSuggestion);
getRandomFollowSuggestion();
});
$list.append(item).show();
$module.find('.refresh-users').show();
$module.find('.loading-roller').hide();
} else {
setTimeout(function(){
getRandomFollowSuggestion(processSuggestion);
}, 100);
}
list.append(item).show();
module.find('.refresh-users').show();
module.find('.loading-roller').hide();
} else
console.warn('nothing to proceed: no twisters to follow was suggested');
}
function closeSearchDialog()
@ -694,37 +674,28 @@ function processDropdownUserResults(partialName, results){ @@ -694,37 +674,28 @@ function processDropdownUserResults(partialName, results){
_searchingPartialUsers = "";
}
function newFollowingConfigModal(username) {
var FollowingConfigContent = $("#following-config-modal-template").children().clone(true);
FollowingConfigContent.closest(".following-config-modal-content").attr("data-screen-name", username)
FollowingConfigContent.find(".following-config-method-message").text(polyglot.t("Which way do you want to follow"))
FollowingConfigContent.find(".following-screen-name b").text(username);
return FollowingConfigContent;
}
function userClickFollow(e) {
e.stopPropagation();
e.preventDefault();
var $userInfo = $(e.target).closest("[data-screen-name]");
var username = $userInfo.attr("data-screen-name");
if(!defaultScreenName)
{
alert(polyglot.t("You have to log in to follow users."));
if (!defaultScreenName) {
alert(polyglot.t('You have to log in to follow users.'));
return;
}
var FollowingConfigClass = "following-config-modal";
openPrompt( FollowingConfigClass );
var username = $(e.target).closest('[data-screen-name]').attr('data-screen-name');
var content = $('#following-config-modal-template').children().clone(true);
var FollowingConfigContent = newFollowingConfigModal(username);
FollowingConfigContent.appendTo("." +FollowingConfigClass +" .modal-content");
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);
//título do modal
$("." +FollowingConfigClass +" h3").text(polyglot.t("Following config"));
openModal({
classBase: '.prompt-wrapper',
classAdd: 'following-config-modal',
content: content,
title: polyglot.t('Following config')
});
}
function initUserSearch() {
@ -733,14 +704,15 @@ function initUserSearch() { @@ -733,14 +704,15 @@ function initUserSearch() {
$userSearchField.bind( "click", userSearchKeypress );
$(".userMenu-search").clickoutside( closeSearchDialog );
$("button.follow").bind( "click", userClickFollow );
$(".following-config-method-buttons .public-following").bind( "click", setFollowingMethod );
$(".following-config-method-buttons .public-following").click( function() {
closePrompt();
// delay reload so dhtput may do it's job
window.setTimeout("loadModalFromHash();",500);
});
// 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);
closeModalHandler('.prompt-wrapper');
window.setTimeout(loadModalFromHash, 500); // delay reload so dhtput may do it's job
})
;
}
function followingListPublicCheckbox(e) {
@ -761,22 +733,16 @@ function followingListPublicCheckbox(e) { @@ -761,22 +733,16 @@ function followingListPublicCheckbox(e) {
follow(username, publicFollow);
}
function setFollowingMethod(e) {
e.stopPropagation();
var $this = $(this);
var username = $this.closest(".following-config-modal-content").attr("data-screen-name");
var publicFollow = false;
function setFollowingMethod(event) {
var button = $(event.target);
var username = button.closest('.following-config-modal-content').attr('data-screen-name');
if( !$this.hasClass("private") ) {
publicFollow = true;
}
//console.log("start following @" +username +" by method "+publicFollow);
follow(username, publicFollow,
(function() {
toggleFollowButton(this, true);
}).bind(username)
follow(username,
(button.hasClass('private')) ? false : true, // is folowing public
toggleFollowButton, username, true // last two are args for toggleFollowButton()
);
event.stopPropagation();
}
@ -899,5 +865,7 @@ var InterfaceFunctions = function() @@ -899,5 +865,7 @@ var InterfaceFunctions = function()
//***********************************************
//******************* INIT **************
//***********************************************
var interfaceFunctions = new InterfaceFunctions;
$( document ).ready( interfaceFunctions.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);
}

63
js/twister_formatpost.js

@ -93,14 +93,13 @@ function postToElem( post, kind, promoted ) { @@ -93,14 +93,13 @@ function postToElem( post, kind, promoted ) {
elem.find('.post-text').html(htmlFormatMsg(msg, mentions));
postData.attr('data-text-mentions', mentions);
var replyTo = [];
var replyTo = '';
if( n !== defaultScreenName )
replyTo.push(['@', n, ' '].join(''));
replyTo += '@' + n + ' ';
for (var i = 0; i < mentions.length; i++) {
if (mentions[i] !== n && mentions[i] !== defaultScreenName)
replyTo.push(['@', mentions[i], ' '].join(''));
replyTo += '@' + mentions[i] + ' ';
}
replyTo = replyTo.join('');
var postTextArea = elem.find('.post-area-new textarea');
postTextArea.attr('data-reply-to', replyTo);
@ -183,8 +182,8 @@ function dmDataToConversationItem(dmData, localUser, remoteUser) { @@ -183,8 +182,8 @@ function dmDataToConversationItem(dmData, localUser, remoteUser) {
// convert message text to html, featuring @users and links formating.
function htmlFormatMsg(msg, mentions) {
function htmlMention(str, pre) {
str = str.replace(new RegExp(['^', pre, '@'].join('')), '').toLowerCase();
function htmlMention(str) {
str = str.slice(1, str.length).toLowerCase();
mentions.push(str); // FIXME feel the pain of the scope chain
@ -193,63 +192,61 @@ function htmlFormatMsg(msg, mentions) { @@ -193,63 +192,61 @@ function htmlFormatMsg(msg, mentions) {
html.push($('#msg-user-link-template')[0].outerHTML
.replace(/\bid\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('id')
//.replace(/\bhref\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('href')
.replace(/<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-profile-modal\b))/ig, ['<a href="', $.MAL.userUrl(str), '" '].join('')) // $().closest('a.open-profile-modal').attr('href', $.MAL.userUrl(username))
.replace(/(<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-profile-modal\b))[^]*?>)[^]*?(<\/a>)/ig, [pre, '$1@', str, '$2'].join('')) // $().closest('a.open-profile-modal').text('@'+username)
.replace(/<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-profile-modal\b))/ig, '<a href="' + $.MAL.userUrl(str) + '" ') // $().closest('a.open-profile-modal').attr('href', $.MAL.userUrl(username))
.replace(/(<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-profile-modal\b))[^]*?>)[^]*?(<\/a>)/ig, '$1@' + str + '$2') // $().closest('a.open-profile-modal').text('@'+username)
);
return ['>', html.length - 1, '<'].join('');
return '>' + (html.length - 1).toString() + '<';
}
function htmlHashtag(str, pre) {
str = str.replace(new RegExp(['^', pre, '#'].join('')), '');
function htmlHashtag(str) {
str = str.slice(1, str.length);
html.push($('#hashtag-link-template')[0].outerHTML
.replace(/\bid\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('id')
//.replace(/\bhref\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('href')
.replace(/<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-hashtag-modal\b))/ig, ['<a href="', $.MAL.hashtagUrl(str.toLowerCase()), '" '].join('')) // $().closest('a.open-profile-modal').attr('href', $.MAL.hashtagUrl(hashtag))
.replace(/(<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-hashtag-modal\b))[^]*?>)[^]*?(<\/a>)/ig, [pre, '$1#', str, '$2'].join('')) // $().closest('a.open-profile-modal').text('#'+hashtag)
.replace(/<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-hashtag-modal\b))/ig, '<a href="' + $.MAL.hashtagUrl(str.toLowerCase()) + '" ') // $().closest('a.open-profile-modal').attr('href', $.MAL.hashtagUrl(hashtag))
.replace(/(<a\s+(?=[^>]*?\bclass\s*=\s*"(?=[^"]*?\bopen-hashtag-modal\b))[^]*?>)[^]*?(<\/a>)/ig, '$1#' + str + '$2') // $().closest('a.open-profile-modal').text('#'+hashtag)
);
return ['>', html.length - 1, '<'].join('');
return '>' + (html.length - 1).toString() + '<';
}
function htmlHttp(str) {
html.push($('#external-page-link-template')[0].outerHTML
.replace(/\bid\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('id')
//.replace(/\bhref\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('href')
.replace(/<a\s+/ig, ['<a href="', proxyURL(str), '" '].join('')) // $().closest('a').attr('href', proxyURL(url))
.replace(/(<a\s+[^]*?>)[^]*?(<\/a>)/ig, ['$1', str, '$2'].join('')) // $().closest('a').text(url)
.replace(/<a\s+/ig, '<a href="' + proxyURL(str) + '" ') // $().closest('a').attr('href', proxyURL(url))
.replace(/(<a\s+[^]*?>)[^]*?(<\/a>)/ig, '$1' + str + '$2') // $().closest('a').text(url)
);
return ['>', html.length - 1, '<'].join('');
return '>' + (html.length - 1).toString() + '<';
}
function htmlEmail(str, pre) {
str = str.replace(new RegExp(['^', pre].join('')), '');
function htmlEmail(str) {
html.push($('#external-page-link-template')[0].outerHTML
.replace(/\bid\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('id')
//.replace(/\bhref\s*=\s*"[^]*?"+/ig, '') // $().removeAttr('href')
.replace(/<a\s+/ig, ['<a href="mailto:', str.toLowerCase(), '" '].join('')) // $().closest('a').attr('href', 'mailto:'+url)
.replace(/(<a\s+[^]*?>)[^]*?(<\/a>)/ig, [pre, '$1', str, '$2'].join('')) // $().closest('a').text(url)
.replace(/<a\s+/ig, '<a href="mailto:' + str.toLowerCase() + '" ') // $().closest('a').attr('href', 'mailto:'+url)
.replace(/(<a\s+[^]*?>)[^]*?(<\/a>)/ig, '$1' + str + '$2') // $().closest('a').text(url)
);
return ['>', html.length - 1, '<'].join('');
return '>' + (html.length - 1).toString() + '<';
}
function htmlSplitCounter(str) {
html.push(['<span class="splited-post-counter">', str, '</span>'].join(''));
html.push('<span class="splited-post-counter">' + str + '</span>');
return ['>', html.length - 1, '<'].join('');
return '>' + (html.length - 1).toString() + '<';
}
var html = [];
return _formatText(escapeHtmlEntities(msg)
.replace(/(^|[^\/]\B(?!\S*:\/\/\S*@))@\w+\b/g, htmlMention)
.replace(/(^|[^<\/]\B(?!\S*:\/\/\S*#))#[^#\\\/\.,:;\?\!\*\[\]\(\)\{\}\^\|%'"\u201C\u201D\u2026\u2014\u4E00\u3002\uFF0C\uFF1A\uFF1F\uFF01\u3010\u3011>\s]+/g, htmlHashtag) // unicode escaped stuff is '“”…—一。,:?!【】' for our chinese friends
.replace(/\bhttps?:\/\/\S[^>\s]+/ig, htmlHttp)
.replace(/([^<\/])\b(?!\S*:\/\/\S*@)\S+@\S+\.\S[^>\s]+/g, htmlEmail)
.replace(/\bhttps?:\/\/[^>\s]+/ig, htmlHttp)
.replace(/[^<\s]+@\S+\.[^>\s]+/g, htmlEmail) // should be pretty slow monstrous RegExp here to handle it in accordance with RFC but twisters just gonna avoid text_without_spaces@text_with_._but_without spaces to not get it like email address
.replace(/@\w+\b/g, htmlMention)
.replace(/#[^#\\\/\.,:;\?\!\*\[\]\(\)\{\}\^\|%'"\u201C\u201D\u2026\u2014\u4E00\u3002\uFF0C\uFF1A\uFF1F\uFF01\u3010\u3011>\s]+/g, htmlHashtag) // unicode escaped stuff is '“”…—一。,:?!【】' for our chinese friends
.replace(/\(\d{1,2}\/\d{1,2}\)$/, htmlSplitCounter)
.replace(/>(\d+)</g, function(candy, core) {return html[core]})
);
@ -258,12 +255,12 @@ function htmlFormatMsg(msg, mentions) { @@ -258,12 +255,12 @@ function htmlFormatMsg(msg, mentions) {
function proxyURL(url) {
var proxyOpt = $.Options.useProxy.val;
if (proxyOpt !== 'disable' && !$.Options.useProxyForImgOnly.val) {
// proxy alternatives may be added to options page
// proxy alternatives may be added to options page FIXME currently not; and we need more fresh proxies
if (proxyOpt === 'ssl-proxy-my-addr') {
url = ['https://ssl-proxy.my-addr.org/myaddrproxy.php/',
url.substring(0, url.indexOf(':')), url.substr(url.indexOf('/') + 1)].join('');
url = 'https://ssl-proxy.my-addr.org/myaddrproxy.php/' +
url.substring(0, url.indexOf(':')) + url.substr(url.indexOf('/') + 1);
} else if (proxyOpt === 'anonymouse')
url = ['http://anonymouse.org/cgi-bin/anon-www.cgi/', url].join('');
url = 'http://anonymouse.org/cgi-bin/anon-www.cgi/' + url;
}
return url;

27
login.html

@ -31,9 +31,7 @@ @@ -31,9 +31,7 @@
<link rel="icon" type="image/png" href="img/twister_mini.png" />
</head>
<body>
<!-- MENU SUPERIOR INIT -->
<nav class="userMenu">
<ul>
@ -42,20 +40,14 @@ @@ -42,20 +40,14 @@
<li class="userMenu-profile current"><a class="label" href="login.html">Login</a></li>
<li class="userMenu-config">
</li>
</ul>
</nav>
<!-- MENU SUPERIOR END -->
<div class="wrapper">
<!-- LADO ESQUERDO DE MÓDULOS INIT -->
<div class="login">
<h2 class="header-bold"> twister login </h2>
<div class="module">
<p> <span>Existing local users</span> </p>
<div>
@ -64,9 +56,7 @@ @@ -64,9 +56,7 @@
<button class="login-local-username">Login</button>
</div>
</div>
<!-- <span> Or... </span> -->
<div class="module">
<p> <span>Create a new user</span> </p>
<div>
@ -78,9 +68,7 @@ @@ -78,9 +68,7 @@
<button class="create-user disabled" disable="true">Create this nickname</button>
</div>
</div>
<!-- <span> Or... </span> -->
<div class="module">
<div>
<p> <span>Import secret key</span> </p>
@ -94,29 +82,19 @@ @@ -94,29 +82,19 @@
<button class="import-secret-key disabled" disable="true">Import key</button>
</div>
</div>
</div>
<!-- LADO ESQUERDO DE MÓDULOS END -->
</div>
<!-- TEMPLATES INIT -->
<div id="templates" style="display:none;">
<!-- TEMPLATE DO MODAL GENÉRICO INIT -->
<div class="modal-blackout">
<div class="modal-wrapper">
<div class="modal-header">
<h3></h3>
<span id="closeModal" class="modal-close cancel">&times;</span>
</div>
<div class="modal-content"></div>
<div class="modal-buttons">
<button class="modal-cancel cancel">Cancel</button>
<button class="modal-propagate">Retransmit</button>
</div>
</div>
<div class="modal-blackout"></div>
</div>
<!-- TEMPLATE DO MODAL GENÉRICO END -->
@ -150,10 +128,7 @@ @@ -150,10 +128,7 @@
</div>
</div>
</div>
</div>
<!-- TEMPLATES END -->
</body>
</html>

33
theme_calm/css/profile.css

@ -223,25 +223,21 @@ @@ -223,25 +223,21 @@
************ PROFILE MODAL ***********
**************************************/
.profile-modal .modal-wrapper
{
.modal-wrapper.profile-modal {
width: 580px;
border-radius: 5px;
overflow: hidden;
position: absolute;
top:5%;
height: 90%;
margin-left: -290px;
height: 760px;
margin: -380px 0 0 -290px;
}
.profile-modal .modal-content {
height: 730px;
overflow-y: hidden;
padding: 3px;
}
.profile-modal .modal-header, .profile-modal .profile-card {
z-index: 1;
}
.profile-modal .modal-content
{
padding: 3px;
height: 100%;
}
.profile-modal h1.profile-name {
color: #43464d;
}
@ -325,18 +321,17 @@ @@ -325,18 +321,17 @@
.profile-modal .profile-bitmessage {
background: #e3e5ea url(../img/bm.png) center no-repeat;
}
.profile-modal .profile-data
{
.profile-modal .profile-data {
display: inline-block;
margin-left: -4px;
border-bottom: 0;
}
.profile-modal .postboard
{
.profile-modal .postboard {
margin-left: 0;
padding: 5px 0 5px 0;
height: 73%;
}
.profile-modal .postboard h2 {
width: auto;
}

525
theme_calm/css/style.css

@ -1077,11 +1077,7 @@ textarea.splited-post { @@ -1077,11 +1077,7 @@ textarea.splited-post {
background: #7691ce;
border-radius: 2px;
}
.postboard h2.fixed
{
z-index: 2;
border-top: solid 4px #fbf9f6;
}
.postboard a.promoted-posts-only {
display: inline-block;
padding: 0 15px;
@ -1745,67 +1741,52 @@ textarea.splited-post { @@ -1745,67 +1741,52 @@ textarea.splited-post {
}
/*************************************
****************** POPUP PROMPT ******
************* POPUP MODAL ************
**************************************/
.prompt-wrapper
{
.modal-wrapper {
background: #fff;
z-index: 3;
position: fixed;
top: 50%;
left: 50%;
background: rgba( 255, 255,255, 1.0 );
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 );
z-index: 5;
width: 600px;
margin-left:-300px;
width: 580px;
height: 720px;
overflow: hidden;
margin: -360px 0 0 -290px;
border-radius: 0 0 4px 4px;
box-shadow: 0 0 30px rgba(0,0,0, .6);
}
.prompt-wrapper .modal-header h3{
background: #7691CE;
.modal-header {
background: #7691ce;
position: relative;
height: 30px;
}
/*************************************
**************************** POPUP MODAL
**************************************/
.modal-blackout
{
.modal-header h3 {
color: #fff;
padding: 5px 10px;
font-weight: bold;
}
.modal-wrapper .modal-content {
background: #fff;
height: 690px;
overflow-y: auto;
}
.modal-wrapper .modal-blackout {
background: rgba(0,0,0, .6);
z-index: -1;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba( 0, 0, 0, .6 );
display: none;
z-index: 3;
}
.modal-blackout.reply .post
{
background: #ececed;
padding: 10px 15px;
}
.modal-wrapper
{
position: absolute;
top: 50%;
left: 50%;
background: rgba( 255, 255, 255, 1.0 );
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 );
border-radius: 0 0 4px 4px;
width: 100%;
height: 100%;
}
.modal-header
{
position: relative;
}
.modal-header h3
{
padding: 5px;
font-weight: bold;
background: #7691CE;
color: #fff;
}
.modal-close
{
.modal-close {
position: absolute;
right: 0;
top: 0;
@ -1816,11 +1797,12 @@ textarea.splited-post { @@ -1816,11 +1797,12 @@ textarea.splited-post {
border-left: solid 1px rgba( 255, 255, 255, .3 );
transition: all .1s linear;
}
.modal-close:hover
{
.modal-close:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.modal-back,
.mark-all-as-read {
position: absolute;
@ -1834,126 +1816,28 @@ textarea.splited-post { @@ -1834,126 +1816,28 @@ textarea.splited-post {
transition: all .1s linear;
display: none;
}
.modal-back:hover,
.mark-all-as-read:hover {
color: #fff;
background: rgba( 0, 0, 0, .1 );
}
.modal-buttons
{
padding: 10px;
text-align: right;
}
.modal-buttons button:last-child
{
padding: 5px 20px;
}
/*************************************
****** FOLLOWING-CONFIG PROMPT *******
**************************************/
.following-config-modal
{
margin-top: -80px;
}
.following-config-modal .modal-content
{
padding: 10px;
text-align: center;
}
.following-config-modal .modal-buttons
{
display: none;
}
.following-config-method-buttons
{
padding: 10px;
}
/*************************************
******** RETWIST POSTS PROMPT ********
**************************************/
.reTwist
{
margin-top: -100px;
}
.reTwist .post-expand,
.reTwist .post-interactions
{
display: none;
}
.reTwist .post {
margin: 5px;
padding: 5px;
min-height: 68px;
}
/*************************************
****************** REPLY POSTS PROMPT
**************************************/
.reply
{
margin-top: -140px;
}
.reply .modal-buttons
{
display: none;
}
.reply .post-expand,
.reply .post-interactions
{
display: none;
}
.reply .textcomplete-wrapper{
padding-top: 10px;
}
.reply .textcomplete-wrapper textarea{
margin: 10px;
width: 580px;
}
.reply .post-area-extras
{
margin-right: 10px;
}
.reply .post {
margin: 10px;
padding: 5px;
min-height: 68px;
.modal-wrapper.reply .post {
background: #ececed;
padding: 10px 15px;
}
/*************************************
****************** DIRECT MESSAGES MODAL
******** DIRECT MESSAGES MODAL *******
**************************************/
.directMessages .modal-wrapper
{
width: 540px;
height: 470px;
margin: -200px 0 0 -280px;
overflow-x: hidden;
}
.directMessages .modal-content
{
overflow-y: auto;
}
.directMessages .modal-buttons
{
display: none;
}
.direct-messages-list .post
{
.direct-messages-list .post {
padding: 10px 30px 10px 15px;
cursor: pointer;
}
.direct-messages-list .post:after
{
.direct-messages-list .post:after {
content: "►";
position: absolute;
right: 10px;
@ -1961,48 +1845,48 @@ textarea.splited-post { @@ -1961,48 +1845,48 @@ textarea.splited-post {
margin: -6px 0 0 0;
color: rgba( 0, 0, 0, .4 );
}
.direct-messages-thread
{
.direct-messages-thread {
padding: 10px;
}
.direct-messages-thread .post
{
.direct-messages-thread .post {
min-height: 82px;
margin-left: 65px;
}
.direct-messages-thread .post:after,
.direct-messages-thread .post:nth-child(2n):after
{
.direct-messages-thread .post:nth-child(2n):after {
content: "";
width: 1px;
background: transparent;
position: absolute;
top: 25px;
}
.direct-messages-thread .post:after
{
.direct-messages-thread .post:after {
border-top: solid 10px transparent;
border-bottom: solid 10px transparent;
border-right: solid 10px #ececed;
left: -10px;
}
.direct-messages-thread .post-text
{
.direct-messages-thread .post-text {
margin: 2px 10px 4px 4px;
word-wrap: break-word;
}
.direct-messages-thread .post-photo
{
.direct-messages-thread .post-photo {
position: absolute;
left: -65px;
}
.direct-messages-thread .post.sent
{
.direct-messages-thread .post.sent {
margin-right: 60px;
margin-left: 0;
}
.direct-messages-thread .post.sent:after
{
.direct-messages-thread .post.sent:after {
border-top: solid 10px transparent;
border-bottom: solid 10px transparent;
border-right: none;
@ -2010,206 +1894,253 @@ textarea.splited-post { @@ -2010,206 +1894,253 @@ textarea.splited-post {
right: -10px;
left: auto;
}
.direct-messages-thread .post.sent .post-text
{
.direct-messages-thread .post.sent .post-text {
margin: 2px 10px 4px 4px;
}
.direct-messages-thread .post.sent .post-photo
{
.direct-messages-thread .post.sent .post-photo {
position: absolute;
right: -65px;
left: auto;
}
.direct-messages-thread li.message {
cursor: auto;
}
.direct-messages-thread li.message:hover {
background: none;
}
.mark-all-as-read {
right: 60px;
}
.mark-all-as-read:before {
content: '\2714';
}
/*************************************
****************** NEW USER MODAL
*********** NEW USER MODAL ***********
**************************************/
.new-user .modal-wrapper
{
top: 50%;
.new-user.modal-wrapper {
width: 720px;
height: 400px;
margin: -200px 0 0 -360px;
overflow-x: hidden;
overflow-y: hidden;
height: 580px;
margin: -290px 0 0 -360px;
}
.new-user .modal-content
{
margin: 10px 10px 10px 10px;
.new-user .modal-content {
height: 550px;
padding: 25px;
}
.new-user .modal-buttons,
.new-user .modal-close
{
.new-user .modal-close {
display: none;
}
.new-user .text
{
.new-user .text {
margin: 0 0 15px 0;
}
.new-user .emphasis
{
.new-user .emphasis {
font-size: 18px;
text-align: center;
}
.new-user .secret-key
{
color: rgba( .5, 0, 0, 1.0 );
.new-user .secret-key {
color: rgba(.5,0,0, 1.0);
font-weight: bold;
}
/*************************************
****************** HASHTAG MODAL
************ HASHTAG MODAL ***********
**************************************/
.hashtag-modal .modal-wrapper
{
width: 560px;
height: 470px;
margin: -200px 0 0 -280px;
overflow: hidden;
}
.hashtag-modal .modal-content
{
overflow-y: auto;
height: 440px;
}
.hashtag-modal .modal-buttons
{
display: none;
}
.hashtag-modal .postboard
{
.hashtag-modal .postboard {
margin-left: 0;
}
.hashtag-modal .postboard h2 {
width: 100%;
padding-left: 10px;
}
/*************************************
****************** CONVERSATION MODAL
********* CONVERSATION MODAL *********
**************************************/
.conversation-modal .modal-wrapper
{
position: absolute;
width: 560px;
height: 80%;
top: 10%;
margin: 0 0 0 -330px;
overflow: hidden;
}
.conversation-modal .modal-content
{
overflow-y: auto;
height: 90%;
}
.conversation-modal .modal-buttons
{
display: none;
}
.conversation-modal .postboard
{
.conversation-modal .postboard {
margin-left: 0;
}
/*************************************
****************** FOLLOWING MODAL
********** FOLLOWING MODAL ***********
**************************************/
.following-modal .modal-wrapper
{
width: 560px;
height: 470px;
margin: -200px 0 0 -280px;
overflow-x: hidden;
}
.following-modal .modal-content
{
.following-modal .modal-content {
padding: 15px;
height: 400px;
overflow-y: auto;
}
.following-modal .modal-buttons
{
display: none;
}
.following-modal ol
{
.following-modal ol {
margin: 5px;
}
.following-modal .open-profile-modal:hover
{
.following-modal .open-profile-modal:hover {
text-decoration: none;
}
.following-modal .open-profile-modal img
{
.following-modal .open-profile-modal img {
float: none;
}
.following-modal .open-profile-modal span
{
.following-modal .open-profile-modal span {
vertical-align: middle;
}
.following-modal .open-profile-modal span:hover
{
.following-modal .open-profile-modal span:hover {
text-decoration: underline;
}
/*************************************
******************* WHO TO FOLLOW MODAL
********* WHO TO FOLLOW MODAL ********
**************************************/
.who-to-follow-modal .modal-wrapper
{
width: 560px;
height: 470px;
margin: -200px 0 0 -280px;
overflow-x: hidden;
}
.who-to-follow-modal .modal-content
{
.who-to-follow-modal .modal-content {
padding: 15px;
height: 400px;
overflow-y: auto;
}
.who-to-follow-modal .modal-buttons
{
display: none;
}
.who-to-follow-modal ol
{
.who-to-follow-modal ol {
margin: 5px;
}
.who-to-follow-modal .open-profile-modal:hover
{
.who-to-follow-modal .open-profile-modal:hover {
text-decoration: none;
}
.who-to-follow-modal .open-profile-modal span
{
.who-to-follow-modal .open-profile-modal span {
vertical-align: middle;
}
.who-to-follow-modal .open-profile-modal span:hover
{
.who-to-follow-modal .open-profile-modal span:hover {
text-decoration: underline;
}
.who-to-follow-modal .follow
{
.who-to-follow-modal .follow {
float: right;
margin: -30px 10px 0 10px;
}
.who-to-follow-modal .twister-user-info span
{
.who-to-follow-modal .twister-user-info span {
vertical-align: bottom;
}
.who-to-follow-modal .bio
{
.who-to-follow-modal .bio {
font-size: 12px;
color: rgba( 0, 0, 0, .6 );
}
/*************************************
************ POPUP PROMPT ************
**************************************/
.prompt-wrapper {
background: rgba(255,255,255, 1.0);
z-index: 5;
position: fixed;
top: 50%;
left: 50%;
width: 600px;
margin-left: -300px;
box-shadow: 0 0 30px rgba(0,0,0, .6);
}
.prompt-wrapper .modal-buttons {
padding: 10px;
text-align: right;
}
.prompt-wrapper .modal-buttons button:last-child {
padding: 5px 20px;
}
/*************************************
****** FOLLOWING-CONFIG PROMPT *******
**************************************/
.following-config-modal.prompt-wrapper {
margin-top: -80px;
}
.following-config-modal .modal-content {
padding: 10px;
text-align: center;
}
.following-config-modal .modal-buttons {
display: none;
}
.following-config-method-buttons {
padding: 10px;
}
/*************************************
******** RETWIST POSTS PROMPT ********
**************************************/
.reTwist.prompt-wrapper {
margin-top: -100px;
}
.reTwist .post-expand,
.reTwist .post-interactions {
display: none;
}
.reTwist .post {
margin: 5px;
padding: 5px;
min-height: 68px;
}
/*************************************
********* REPLY POSTS PROMPT *********
**************************************/
.reply.prompt-wrapper {
margin-top: -140px;
}
.reply .modal-buttons {
display: none;
}
.reply .post-expand,
.reply .post-interactions {
display: none;
}
.reply .textcomplete-wrapper {
padding-top: 10px;
}
.reply .textcomplete-wrapper textarea {
margin: 10px;
width: 580px;
}
.reply .post-area-extras {
margin-right: 10px;
}
.reply .post {
margin: 10px;
padding: 5px;
min-height: 68px;
}
/*************************************
**************** LOADER **************
**************************************/

249
theme_nin/css/style.css

@ -390,22 +390,22 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -390,22 +390,22 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
}
/*************************************
******************* PROFILE MODAL
************************************** */
************ PROFILE MODAL ***********
**************************************/
/* line 17, ../sass/_profile.sass */
.profile-modal .modal-wrapper {
.modal-wrapper.profile-modal {
top: 50%;
width: 980px;
max-width: 98%;
position: absolute;
top: 50%;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
height: 550px;
margin: -275px 0 0 -490px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
}
/* line 25, ../sass/_profile.sass */
.profile-modal .modal-wrapper h3 {
.modal-wrapper.profile-modal h3 {
display: none;
}
/* line 28, ../sass/_profile.sass */
@ -644,12 +644,6 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -644,12 +644,6 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
color: #B4C669;
}
/* line 217, ../sass/_profile.sass */
.profile-modal .modal-buttons {
display: none;
/* EDITION PROFILE */
}
/* line 222, ../sass/_profile.sass */
.forEdition.profile-card {
-moz-box-sizing: border-box;
@ -1411,7 +1405,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu, @@ -1411,7 +1405,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
}
/* line 227, ../sass/_following.sass */
.following-modal .modal-wrapper {
.modal-wrapper.following-modal {
width: 200px;
}
/* line 229, ../sass/_following.sass */
@ -2580,49 +2574,41 @@ ol.toptrends-list a:hover { @@ -2580,49 +2574,41 @@ ol.toptrends-list a:hover {
cursor: pointer;
}
/*********** POPUP PROMPT ************ */
/* line 558, ../sass/style.sass */
.prompt-wrapper {
/************ POPUP MODAL ************/
/* line 580, ../sass/style.sass */
.modal-wrapper {
background: white;
clear: both;
z-index: 3;
position: fixed;
top: 50%;
left: 50%;
background: white;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
z-index: 5;
width: 600px;
margin-left: -300px;
overflow: hidden;
}
/*********** POPUP MODAL ************* */
/* line 570, ../sass/style.sass */
.modal-blackout {
background: rgba(170,170,170, 0.8);
z-index: -1;
position: fixed;
width: 100%;
height: 100%;
left: 0;
top: 0;
background: rgba(170, 170, 170, 0.8);
display: none;
z-index: 3;
width: 100%;
height: 100%;
}
/* line 580, ../sass/style.sass */
.modal-wrapper {
position: absolute;
top: 50%;
left: 50%;
overflow: hidden;
/* line 588, ../sass/style.sass */
.modal-content {
background: #f3f2f1;
padding: 20px;
}
/* line 585, ../sass/style.sass */
.modal-wrapper .post-area-new {
padding: 10px;
}
/* line 588, ../sass/style.sass */
.modal-content {
background: #f3f2f1;
padding: 20px;
}
/* line 592, ../sass/style.sass */
.modal-content .postboard h2 {
position: fixed;
@ -2725,80 +2711,79 @@ ol.toptrends-list a:hover { @@ -2725,80 +2711,79 @@ ol.toptrends-list a:hover {
display: none;
}
/* line 677, ../sass/style.sass */
.modal-buttons {
/*********** POPUP PROMPT ************/
/* line 558, ../sass/style.sass */
.prompt-wrapper {
position: fixed;
top: 50%;
left: 50%;
background: white;
box-shadow: 0 0 30px rgba(0, 0, 0, 0.6);
z-index: 5;
width: 600px;
margin-left: -300px;
}
.prompt-wrapper .modal-buttons {
padding: 10px;
text-align: right;
}
/************ FOLLOWING-CONFIG MODAL ********* */
/* line 685, ../sass/style.sass */
.following-config-modal h2 {
text-transform: none;
.prompt-wrapper .modal-buttons button:last-child {
padding: 5px 20px;
}
/* line 687, ../sass/style.sass */
.following-config-modal .modal-wrapper {
top: 43%;
left: 25%;
width: 50%;
/****** FOLLOWING-CONFIG PROMPT ******/
.following-config-modal.prompt-wrapper {
margin-top: -100px;
}
/* line 691, ../sass/style.sass */
.following-config-modal .modal-content {
padding: 10px;
text-align: center;
background-color: white;
}
/* line 695, ../sass/style.sass */
.following-config-modal .modal-buttons {
display: none;
}
/* line 697, ../sass/style.sass */
.following-config-method-buttons {
padding: 10px;
.following-config-modal h2 {
text-transform: none;
}
/****** FOLLOWING-CONFIG PROMPT ***** */
/* line 699, ../sass/style.sass */
.following-config-modal
{
margin-top: -100px;
}
.following-config-modal .modal-content
{
.following-config-method-buttons {
padding: 10px;
text-align: center;
}
.following-config-modal .modal-buttons
{
display: none;
}
.following-config-method-buttons .public-following {
background-color: #B4C669;
margin: 0px 2px;
padding: 6px 16px;
}
/********** RETWIST POSTS PROMPT ********* */
/********** RETWIST POSTS PROMPT **********/
/* line 705, ../sass/style.sass */
.reTwist.prompt-wrapper {
margin-top: -110px;
}
.reTwist .modal-content
{
.reTwist .modal-content {
padding: 20px 15px;
}
.reTwist button.modal-propagate
{
.reTwist button.modal-propagate {
background-color: #B4C669;
}
/* line 709, ../sass/style.sass */
.reTwist .post-expand, .reTwist .post-interactions {
display: none;
}
/********* REPLY POSTS MODAL************** */
/********* REPLY POSTS PROMPT ***************/
/* line 715, ../sass/style.sass */
.reply.prompt-wrapper {
margin-top: -110px;
@ -2813,37 +2798,36 @@ ol.toptrends-list a:hover { @@ -2813,37 +2798,36 @@ ol.toptrends-list a:hover {
}
/****** DIRECT MESSAGES MODAL********* */
/* line 727, ../sass/style.sass */
.directMessages .post-area-new {
display: none;
padding: 20px;
z-index: 5;
background: #E2E1DE;
}
/* line 734, ../sass/style.sass */
.directMessages .post-area-new .modal-header h3 span {
display: inline !important;
}
/* line 736, ../sass/style.sass */
.directMessages .modal-wrapper {
width: 520px;
height: 490px;
.modal-wrapper.directMessages {
top: 10%;
margin: 0 0 0 -260px;
width: 520px;
height: 600px;
overflow-x: hidden;
margin: 0 0 0 -260px;
}
/* line 743, ../sass/style.sass */
.directMessages .modal-content {
width: 520px;
height: 560px;
overflow-y: auto;
height: 300px;
box-sizing: border-box;
-moz-box-sizing: border-box;
-webkit-box-sizing: border-box;
box-sizing: border-box;
width: 520px;
}
/* line 750, ../sass/style.sass */
.directMessages .modal-buttons {
/* line 727, ../sass/style.sass */
.directMessages .post-area-new {
display: none;
margin: 0 -20px;
padding: 20px;
z-index: 5;
background: #E2E1DE;
}
/* line 734, ../sass/style.sass */
.directMessages .post-area-new .modal-header h3 span {
display: inline !important;
}
/* line 752, ../sass/style.sass */
.directMessages .post-photo {
@ -2970,21 +2954,19 @@ ol.toptrends-list a:hover { @@ -2970,21 +2954,19 @@ ol.toptrends-list a:hover {
}
/********* NEW USER MODAL************* */
/* line 861, ../sass/style.sass */
.new-user .modal-wrapper {
width: 640px;
height: 600px;
top: 10%;
margin: 0 0 0 -320px;
overflow-x: hidden;
overflow-y: hidden;
.new-user.modal-wrapper {
width: 720px;
height: 580px;
margin: -290px 0 0 -360px;
}
/* line 868, ../sass/style.sass */
.new-user .modal-content {
margin: 10px 10px 10px 10px;
padding: 25px;
}
/* line 870, ../sass/style.sass */
.new-user .modal-buttons, .new-user .modal-close {
.new-user .modal-close {
display: none;
}
/* line 872, ../sass/style.sass */
@ -3006,22 +2988,19 @@ ol.toptrends-list a:hover { @@ -3006,22 +2988,19 @@ ol.toptrends-list a:hover {
/******** HASHTAG MODAL********** */
/* line 884, ../sass/style.sass */
.hashtag-modal .modal-wrapper {
.modal-wrapper.hashtag-modal {
top: 10%;
width: 520px;
height: 600px;
top: 10%;
margin: 0 0 0 -260px;
overflow: hidden;
margin: 0 0 0 -260px;
}
/* line 890, ../sass/style.sass */
.hashtag-modal .modal-content {
overflow-y: auto;
height: 500px;
}
/* line 893, ../sass/style.sass */
.hashtag-modal .modal-buttons {
display: none;
}
/* line 895, ../sass/style.sass */
.hashtag-modal .postboard {
padding: 0;
@ -3029,24 +3008,20 @@ ol.toptrends-list a:hover { @@ -3029,24 +3008,20 @@ ol.toptrends-list a:hover {
/****** CONVERSATION MODAL********** */
/* line 901, ../sass/style.sass */
.conversation-modal .modal-wrapper {
position: absolute;
.modal-wrapper.conversation-modal {
background: white;
top: 10%;
width: 520px;
height: 575px;
top: 10%;
margin: 0 0 0 -260px;
overflow: hidden;
background: white;
margin: 0 0 0 -260px;
}
/* line 909, ../sass/style.sass */
.conversation-modal .modal-content {
overflow-y: auto;
height: 90%;
}
/* line 912, ../sass/style.sass */
.conversation-modal .modal-buttons {
display: none;
}
/* line 914, ../sass/style.sass */
.conversation-modal .postboard {
padding: 0;
@ -3054,12 +3029,12 @@ ol.toptrends-list a:hover { @@ -3054,12 +3029,12 @@ ol.toptrends-list a:hover {
/****** FOLLOWING MODAL****** */
/* line 920, ../sass/style.sass */
.following-modal .modal-wrapper {
width: 520px;
.modal-wrapper.following-modal {
top: 10%;
width: 520px;
height: 400px;
margin: 0 0 0 -260px;
overflow-x: hidden;
margin: 0 0 0 -260px;
}
/* line 926, ../sass/style.sass */
.following-modal .modal-content {
@ -3067,10 +3042,7 @@ ol.toptrends-list a:hover { @@ -3067,10 +3042,7 @@ ol.toptrends-list a:hover {
overflow-y: auto;
padding: 0;
}
/* line 930, ../sass/style.sass */
.following-modal .modal-buttons {
display: none;
}
/* line 932, ../sass/style.sass */
.following-modal ol {
margin: 5px;
@ -3082,12 +3054,12 @@ ol.toptrends-list a:hover { @@ -3082,12 +3054,12 @@ ol.toptrends-list a:hover {
/******* WHO TO FOLLOW MODAL****** */
/* line 943, ../sass/style.sass */
.who-to-follow-modal .modal-wrapper {
width: 520px;
.modal-wrapper.who-to-follow-modal {
top: 50%;
width: 520px;
height: 555px;
margin: -275px 0 0 -260px;
overflow-x: hidden;
margin: -275px 0 0 -260px;
}
/* line 949, ../sass/style.sass */
.who-to-follow-modal .modal-content {
@ -3095,10 +3067,7 @@ ol.toptrends-list a:hover { @@ -3095,10 +3067,7 @@ ol.toptrends-list a:hover {
height: 480px;
overflow-y: auto;
}
/* line 953, ../sass/style.sass */
.who-to-follow-modal .modal-buttons {
display: none;
}
/* line 955, ../sass/style.sass */
.who-to-follow-modal ol {
margin: 5px;
@ -3313,9 +3282,9 @@ ul.dropdown-menu .active, ul.dropdown-menu .active a { @@ -3313,9 +3282,9 @@ ul.dropdown-menu .active, ul.dropdown-menu .active a {
}
@media (max-width: 900px) {
/* line 21, ../sass/_responsive.sass */
.profile-modal .modal-wrapper {
margin-left: 0;
.modal-wrapper.profile-modal {
left: 1%;
margin-left: 0;
}
}
@media (max-width: 600px) {

14
theme_nin/js/theme_option.js

@ -30,13 +30,13 @@ $(function(){ @@ -30,13 +30,13 @@ $(function(){
$('#postboard-top').addClass(promotedPostsOnly ? "hide" : "show");
});
$(window).scroll(function(){
posScroll = $(document).scrollTop();
if(posScroll >= 250)
$('.left .post-area-new').slideDown(300);
else
$('.left .post-area-new').slideUp(150);
});
$(window).scroll((function(){
if ($(document).scrollTop() >= 250) {
if (this.css('display') === 'none')
this.slideDown(300);
} else if (this.css('display') === 'block')
this.slideUp(150);
}).bind($('.left .post-area-new')));
$(".userMenu-search-profiles .follow")
.on("eventToggleFollow", function() {

136
theme_nin/sass/style.sass

@ -609,37 +609,27 @@ ol.toptrends-list @@ -609,37 +609,27 @@ ol.toptrends-list
&.hover
cursor: pointer
/*********** POPUP PROMPT *************/
.prompt-wrapper
position: fixed
top: 50%
left: 50%
background: rgba( 255, 255,255, 1.0 )
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 )
z-index: 5
width: 600px
margin-left: -300px
/*********** POPUP MODAL **************/
.modal-blackout
position: fixed
width: 100%
height: 100%
left: 0
top: 0
background: rgba($main-color-light, 0.8)
display: none
z-index: 3
.modal-wrapper
position: absolute
background: white
z-index: 3
position: fixed
top: 50%
left: 50%
overflow: hidden
.post-area-new
padding: 10px
.modal-blackout
background: rgba($main-color-light, 0.8)
z-index: -1
position: fixed
left: 0
top: 0
width: 100%
height: 100%
.modal-content
@extend .clear-fix
background: $background-light
@ -729,27 +719,34 @@ ol.toptrends-list @@ -729,27 +719,34 @@ ol.toptrends-list
b
display: none
.modal-buttons
/*********** POPUP PROMPT *************/
.prompt-wrapper
background: rgba( 255, 255,255, 1.0 )
z-index: 5
position: fixed
top: 50%
left: 50%
width: 600px
margin-left: -300px
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 )
.modal-buttons
padding: 10px
text-align: right
button:last-child
padding: 5px 20px;
/************ FOLLOWING-CONFIG MODAL **********/
.following-config-modal
.prompt-wrapper.following-config-modal
margin-top: -100px
h2
text-transform: none
.modal-wrapper
top: 43%
left: 25%
width: 50%
.modal-content
padding: 10px
text-align: center
background-color: white
.modal-buttons
display: none
h2
text-transform: none
.following-config-method-buttons
.public-following
background-color: $color-green
@ -758,7 +755,7 @@ ol.toptrends-list @@ -758,7 +755,7 @@ ol.toptrends-list
/************ RETWIST POSTS MODAL **********/
.reTwist
.prompt-wrapper.reTwist
&.prompt-wrapper
margin-top: -110px
.modal-content
@ -771,7 +768,7 @@ ol.toptrends-list @@ -771,7 +768,7 @@ ol.toptrends-list
/********* REPLY POSTS MODAL***************/
.reply
.prompt-wrapper.reply
&.prompt-wrapper
margin-top: -110px
.modal-buttons, .post-expand, .post-interactions
@ -781,9 +778,15 @@ ol.toptrends-list @@ -781,9 +778,15 @@ ol.toptrends-list
/****** DIRECT MESSAGES MODAL**********/
.directMessages
.modal-wrapper.directMessages
top: 10%
width: $postboard-modal-width
height: 490px
overflow-x: hidden
margin: 0 0 0 0-($postboard-modal-width/2)
.post-area-new
display: none
margin: 0 -20px
padding: 20px
z-index: 5
background: $main-background-color
@ -791,12 +794,6 @@ ol.toptrends-list @@ -791,12 +794,6 @@ ol.toptrends-list
.modal-header
h3 span
display: inline!important
.modal-wrapper
width: $postboard-modal-width
height: 490px
top: 10%
margin: 0 0 0 0-($postboard-modal-width/2)
overflow-x: hidden
.modal-content
overflow-y: auto
@ -805,8 +802,6 @@ ol.toptrends-list @@ -805,8 +802,6 @@ ol.toptrends-list
+box-sizing(border-box)
width: $postboard-modal-width
.modal-buttons
display: none
.post-photo
height: 48px
width: 48px
@ -915,17 +910,13 @@ ol.toptrends-list @@ -915,17 +910,13 @@ ol.toptrends-list
/********* NEW USER MODAL**************/
.new-user
.modal-wrapper
width: 640px
height: 600px
top: 10%
margin: 0 0 0 -320px
overflow-x: hidden
overflow-y: hidden
.modal-wrapper.new-user
width: 720px
height: 580px
margin: -290px 0 0 -360px
.modal-content
margin: 10px 10px 10px 10px
.modal-buttons, .modal-close
padding: 25px
.modal-close
display: none
.text
margin: 0 0 15px 0
@ -940,55 +931,45 @@ ol.toptrends-list @@ -940,55 +931,45 @@ ol.toptrends-list
/******** HASHTAG MODAL***********/
.hashtag-modal
.modal-wrapper
.modal-wrapper.hashtag-modal
top: 10%
width: $postboard-modal-width
height: 600px
top: 10%
margin: 0 0 0 0-($postboard-modal-width/2)
overflow: hidden
margin: 0 0 0 0-($postboard-modal-width/2)
.modal-content
overflow-y: auto
height: 500px
.modal-buttons
display: none
.postboard
padding: 0
/****** CONVERSATION MODAL***********/
.conversation-modal
.modal-wrapper
position: absolute
.modal-wrapper.conversation-modal
background: white
top: 10%
width: $postboard-modal-width
height: 575px
top: 10%
margin: 0 0 0 0-($postboard-modal-width/2)
overflow: hidden
background: white
margin: 0 0 0 0-($postboard-modal-width/2)
.modal-content
overflow-y: auto
height: 90%
.modal-buttons
display: none
.postboard
padding: 0
/****** FOLLOWING MODAL*******/
.following-modal
.modal-wrapper
width: $postboard-modal-width
.modal-wrapper.following-modal
top: 10%
width: $postboard-modal-width
height: 400px
margin: 0 0 0 0-($postboard-modal-width/2)
overflow-x: hidden
margin: 0 0 0 0-($postboard-modal-width/2)
.modal-content
height: 300px
overflow-y: auto
padding: 0
.modal-buttons
display: none
ol
margin: 5px
.open-profile-modal
@ -999,19 +980,16 @@ ol.toptrends-list @@ -999,19 +980,16 @@ ol.toptrends-list
/******* WHO TO FOLLOW MODAL*******/
.who-to-follow-modal
.modal-wrapper
width: $postboard-modal-width
.modal-wrapper.who-to-follow-modal
top: 50%
width: $postboard-modal-width
height: 555px
margin: -275px 0 0 0-($postboard-modal-width/2)
overflow-x: hidden
margin: -275px 0 0 0-($postboard-modal-width/2)
.modal-content
padding: 15px
height: 480px
overflow-y: auto
.modal-buttons
display: none
ol
margin: 5px
.open-profile-modal

Loading…
Cancel
Save