Browse Source

Merge branch 'master' of git://github.com/iHedgehog/twister-calm

master
Denis Ryabov 11 years ago
parent
commit
de5b4eb6fb
  1. 16
      css/profile.css
  2. 9
      css/style.css
  3. 1
      following.html
  4. 30
      jquery-emotions/jquery.emotions.js
  5. 36
      js/calm.js
  6. 13
      js/interface_common.js
  7. 20
      js/interface_localization.js
  8. 1
      js/twister_actions.js
  9. 4
      js/twister_user.js

16
css/profile.css

@ -66,7 +66,8 @@ @@ -66,7 +66,8 @@
}
.profile-card .direct-messages,
.profile-card .direct-messages-with-user,
.profile-card .follow
.profile-card .follow,
.profile-card .profileUnfollow
{
display: block;
position: absolute;
@ -81,13 +82,15 @@ @@ -81,13 +82,15 @@
border: none;
transition: all .2s linear;
}
.profile-card .follow
.profile-card .follow,
.profile-card .profileUnfollow
{
right: 128px;
}
.profile-card .direct-messages:hover,
.profile-card .direct-messages-with-user:hover,
.profile-card .follow:hover
.profile-card .follow:hover,
.profile-card .profileUnfollow:hover
{
background: rgba( 0, 0, 0, .3 );
}
@ -251,6 +254,10 @@ button.follow:hover { @@ -251,6 +254,10 @@ button.follow:hover {
background: #b2d67b;
color: #fff;
}
.profile-card .profileUnfollow:hover {
background: #e18882;
color: #fff;
}
.profile-modal button.direct-messages-with-user:hover {
background: #b2d67b;
color: #fff;
@ -305,7 +312,8 @@ button.follow:hover { @@ -305,7 +312,8 @@ button.follow:hover {
*/
.profile-modal .direct-messages,
.profile-modal .direct-messages-with-user,
.profile-modal .follow
.profile-modal .follow,
.profile-card .profileUnfollow
{
bottom: 10px;
}

9
css/style.css

@ -344,7 +344,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder { @@ -344,7 +344,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
.userMenu li.userMenu-dhtindicator a {
display: inline-block;
font: 12px/25px "Open Sans", sans-serif;
padding: 0 0 0 45px;
padding: 0 5px 0 41px;
width: 60px;
height: 25px;
opacity: .9;
@ -353,7 +353,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder { @@ -353,7 +353,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
content: 'DHT:';
display: inline-block;
position: absolute;
left: 10px;
left: 8px;
width: 70px;
height: 25px;
}
@ -1038,7 +1038,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder { @@ -1038,7 +1038,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
{
float: right;
font-size: 12px;
margin: 5px 10px;
margin-right: 5px;
opacity: .5;
text-decoration: none;
}
@ -1150,7 +1150,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder { @@ -1150,7 +1150,7 @@ input.userMenu-search-field:focus::-ms-input-placeholder {
}
.post-interactions
{
margin: 2px 10px 10px 60px;
margin: -5px 10px 5px 60px;
text-align: right;
height: 25px;
}
@ -1984,6 +1984,7 @@ ul.dropdown-menu > li > a { @@ -1984,6 +1984,7 @@ ul.dropdown-menu > li > a {
clear: both;
font: 13px/20px "Open Sans", sans-serif;
white-space: nowrap;
cursor: pointer;
-webkit-transition: all 200ms;
-moz-transition: all 200ms;
-ms-transition: all 200ms;

1
following.html

@ -22,6 +22,7 @@ @@ -22,6 +22,7 @@
<script src="js/twister_directmsg.js"></script>
<script src="js/twister_actions.js"></script>
<script src="js/interface_common.js"></script>
<script src="jquery-emotions/jquery.emotions.js"></script>
<script>
$(document).ready(function()

30
jquery-emotions/jquery.emotions.js

@ -33,28 +33,34 @@ @@ -33,28 +33,34 @@
"0:-)": "angel",
"o.O": "confused",
"o_O": "confused",
":'(": "cry",
"3:)": "devil",
":(": "frown",
"=(": "frown",
":-(": "frown",
"8)": "glasses",
":D": "grin",
":-D": "grin",
">:(": "grumpy",
"<3": "heart",
":*": "kiss",
":-)": "smile",
":]": "smile",
":)": "smile",
"=)": "smile",
"(:": "smile",
"(-:": "smile",
"[:": "smile",
"(=": "smile",
"8|": "sunglasses",
":p": "tongue",
":P": "tongue",
":/": "unsure",
":\\": "unsure",
";)": "wink",
";-)": "wink",
":'(": "cry",
">:(": "grumpy",
":(": "frown",
"=(": "frown",
":-(": "frown",
"8)": "glasses",
":p": "tongue",
":P": "tongue",
":)": "smile",
"=)": "smile",
":D": "grin",
":-D": "grin"
"(;": "wink",
"(-;": "wink"
}
},
shortcode: function(eId){

36
js/calm.js

@ -6,29 +6,29 @@ $(function(){ @@ -6,29 +6,29 @@ $(function(){
$('.post-text').on('click', 'a', function(e){
e.stopPropagation();
});
$('#showqr').on('click', function(){
if($('#qrcode img')[0]) return;
var skey = document.getElementById('skey').innerText;
new QRCode(document.getElementById("qrcode"), skey);
});
if($('#qrcode img')[0]) return;
var skey = document.getElementById('skey').innerText;
new QRCode(document.getElementById("qrcode"), skey);
});
})
function dhtIndicatorBg(){
var bgcolor = '';
if(twisterDhtNodes <= 10){bgcolor = '#770900'
}else if(twisterDhtNodes <= 20){bgcolor = '#773400'
}else if(twisterDhtNodes <= 30){bgcolor = '#774c00'
}else if(twisterDhtNodes <= 40){bgcolor = '#776400'
}else if(twisterDhtNodes <= 50){bgcolor = '#707500'
}else if(twisterDhtNodes <= 60){bgcolor = '#3f6900'
}else if(twisterDhtNodes <= 70){bgcolor = '#005f15'
}else if(twisterDhtNodes >= 71){bgcolor = '#009922'
if(twisterDhtNodes <= 20){bgcolor = '#770900'
}else if(twisterDhtNodes <= 60){bgcolor = '#773400'
}else if(twisterDhtNodes <= 90){bgcolor = '#774c00'
}else if(twisterDhtNodes <= 120){bgcolor = '#776400'
}else if(twisterDhtNodes <= 150){bgcolor = '#707500'
}else if(twisterDhtNodes <= 180){bgcolor = '#3f6900'
}else if(twisterDhtNodes <= 210){bgcolor = '#005f15'
}else if(twisterDhtNodes >= 250){bgcolor = '#009922'
}
$('.userMenu-dhtindicator').animate({'background-color': bgcolor });
};
setTimeout(dhtIndicatorBg, 300);
setTimeout(function() {setInterval(dhtIndicatorBg, 2000)}, 400);
})
function modalDMIntr() {
$(".cancel").on('click', function(event){
@ -127,11 +127,11 @@ function keysSend() { @@ -127,11 +127,11 @@ function keysSend() {
}
function mensAutocomplete() {
var storFollArr = JSON.parse(localStorage[localStorage.defaultScreenName]), suggests = [];
var suggests = [];
for(var i = 0; i < storFollArr.followingUsers.length; i++){
if(storFollArr.followingUsers[i] == localStorage.defaultScreenName) continue;
suggests.push(storFollArr.followingUsers[i]);
for(var i = 0; i < followingUsers.length; i++){
if(followingUsers[i] == localStorage.defaultScreenName) continue;
suggests.push(followingUsers[i]);
}
suggests.reverse();
$('textarea').textcomplete([

13
js/interface_common.js

@ -93,7 +93,6 @@ function newProfileModal(username) { @@ -93,7 +93,6 @@ function newProfileModal(username) {
var profileModalContent = $( "#profile-modal-template" ).children().clone(true);
updateProfileData(profileModalContent, username);
return profileModalContent;
}
@ -113,6 +112,13 @@ function openProfileModal(e) @@ -113,6 +112,13 @@ function openProfileModal(e)
//título do modal
$( "."+profileModalClass + " h3" ).text( polyglot.t("users_profile", { username: username }) );
//hed//add dinamic follow button in profile modal window
if(followingUsers.indexOf(username) != -1){
$('.profile-card button').first().removeClass('follow').addClass('profileUnfollow').text(polyglot.t('Unfollow')).on('click', function(){
unfollow(username);
});
};
}
function newHashtagModal(hashtag) {
@ -402,7 +408,6 @@ function replyTextKeypress(e) { @@ -402,7 +408,6 @@ function replyTextKeypress(e) {
}
}
}
}
}
@ -459,7 +464,7 @@ function initInterfaceCommon() { @@ -459,7 +464,7 @@ function initInterfaceCommon() {
$( ".userMenu-config-dropdown" ).bind( "click", dropDownMenu );
$( ".config-menu" ).clickoutside( closeThis );
$( ".module.post" ).bind( "click", function(e) {
postExpandFunction(e,$(this)); });
if(window.getSelection() == 0)postExpandFunction(e,$(this)); });
$( ".post-area-new" ).bind( "click", function(e) {
composeNewPost(e,$(this));} );
$( ".post-area-new" ).clickoutside( unfocusThis );
@ -467,7 +472,7 @@ function initInterfaceCommon() { @@ -467,7 +472,7 @@ function initInterfaceCommon() {
$( ".modal-propagate").click( retweetSubmit );
var $replyText = $( ".post-area-new textarea" );
$replyText.on("keydown", replyTextKeypress );
$replyText.on("keyup", replyTextKeypress );
$( ".open-profile-modal").bind( "click", openProfileModal );
$( ".open-hashtag-modal").bind( "click", openHashtagModal );

20
js/interface_localization.js

@ -797,7 +797,7 @@ if(preferredLanguage == "ru"){ @@ -797,7 +797,7 @@ if(preferredLanguage == "ru"){
"followed_by": "%{username} подписан",
"Followers": "Читателей",
"Following": "Читаемых",
"Following users": "Подписанные пользователи",
"Following users": "Читаемые пользователи",
"Force connection to peer:": "Принудительно подключиться к пиру:",
"General information": "Основное",
"Generate blocks (send promoted messages)": "Генерация блоков (отправка рекламных сообщений)",
@ -859,7 +859,7 @@ if(preferredLanguage == "ru"){ @@ -859,7 +859,7 @@ if(preferredLanguage == "ru"){
"time_ago": "%{time} назад", // 5 minutes ago
"Time of the last block:": "Время последнего блока: ",
"Top Trends": "Тенденции",
"Type message here": "Введите ваше сообщение тут",
"Type message here": "Введите здесь ваше сообщение",
"Unfollow": "Отписаться",
"Update": "Обновить",
"Updating status...": "Обновление информации...", // status of block chain
@ -874,20 +874,20 @@ if(preferredLanguage == "ru"){ @@ -874,20 +874,20 @@ if(preferredLanguage == "ru"){
"twister'a).\n\n" +
"Хозяйке на заметку: Сейчас вы можете выбрать аватар!",
"users_mentions": "Ответ от @%{username}",
"users_profile": "%{username}'s профиль",
"users_profile": "Профиль пользователя %{username}",
"username_undefined": "Имя пользователя не определено, требуется войти.",
"View": "Просмотреть",
"View All": "Просмотреть Всё",
"View All": "Просмотреть всё",
"Who to Follow": "Кого почитать",
"Your message was sent!": "Ваше сообщение было отправлено!",
"Your message was sent!": "Ваше сообщение отправлено!",
"twister login": "Вход в twister",
"Existing local users": "Уже зарегистрированные",
"Existing local users": "Предыдущие аккаунты",
"Or...": "Или...",
"Create a new user": "Зарегистрировать нового пользователя",
"Create a new user": "Создать новый аккаунт",
"Login": "Войти",
"Check availability": "Проверить на доступность",
"Create this nickname": "Зарегистировать этот ник",
"Type nickname here": "Введите ваш ник тут",
"Check availability": "Проверить, занят ли ник",
"Create this nickname": "Создать аккаунт",
"Type nickname here": "Введите ник",
"Import secret key": "Импортировать секретный ключ",
"52-characters secret": "52-значный ключ",
"With nickname": "С логином",

1
js/twister_actions.js

@ -191,6 +191,7 @@ function clearHashtagProcessed() { @@ -191,6 +191,7 @@ function clearHashtagProcessed() {
}
function requestHashtag(postboard,hashtag,resource) {
if(/[a-z]/i.test(hashtag))hashtag = hashtag.toLowerCase(); //hed//fix english hashtag case dependency bug
dhtget( hashtag, resource, "m",
function(args, data) {
processHashtag(args.postboard, args.hashtag, data);

4
js/twister_user.js

@ -171,7 +171,7 @@ function sendNewUserTransaction(username, cbFunc) { @@ -171,7 +171,7 @@ function sendNewUserTransaction(username, cbFunc) {
function importSecretKeypress() {
var secretKey = $(".secret-key-import").val();
var username = $(".username-import").val();
var username = $(".username-import").val().toLowerCase();
var $importButton = $(".import-secret-key");
if( secretKey.length == 52 && username.length ) {
@ -183,7 +183,7 @@ function importSecretKeypress() { @@ -183,7 +183,7 @@ function importSecretKeypress() {
function importSecretKeyClick() {
var secretKey = $(".secret-key-import").val();
var username = $(".username-import").val();
var username = $(".username-import").val().toLowerCase();
twisterRpc("importprivkey", [secretKey,username],
function(args, ret) {

Loading…
Cancel
Save