diff --git a/index.html b/index.html
index 07257a2..fea5adc 100644
--- a/index.html
+++ b/index.html
@@ -1,11 +1,11 @@
-
-
-
@@ -29,5 +29,5 @@
-
-
+
+
diff --git a/js/interface_common.js b/js/interface_common.js
index 7966766..4c875a5 100644
--- a/js/interface_common.js
+++ b/js/interface_common.js
@@ -66,7 +66,8 @@ function closeModalHandler(classBase) {
}
function confirmPopup(event, req) {
- event.stopPropagation();
+ if (event && event.stopPropagation)
+ event.stopPropagation();
var modal = openModal({
classBase: '.prompt-wrapper',
@@ -79,38 +80,66 @@ function confirmPopup(event, req) {
modal.content.find('.message').text(req.messageTxt);
var btn = modal.content.find('.confirm');
- if (req.confirmTxt)
- btn.text(req.confirmTxt);
- else
- btn.text(polyglot.t('Confirm'));
- if (req.confirmFunc) {
- btn.on('click', function () {
- closePrompt();
- req.confirmFunc(req.confirmFuncArgs);
- });
- } else
- btn.on('click', closePrompt);
-
+ if (req.removeConfirm)
+ btn.remove();
+ else {
+ if (req.confirmTxt)
+ btn.text(req.confirmTxt);
+ else
+ btn.text(polyglot.t('Confirm'));
+ if (req.confirmFunc) {
+ btn.on('click', function () {
+ closePrompt();
+ req.confirmFunc(req.confirmFuncArgs);
+ });
+ } else
+ btn.on('click', closePrompt);
+ }
var btn = modal.content.find('.cancel');
- if (req.cancelTxt)
- btn.text(req.cancelTxt);
- else
- btn.text(polyglot.t('Cancel'));
- if (req.cancelFunc) {
- btn.on('click', function () {
- closePrompt();
- req.cancelFunc(req.cancelFuncArgs);
- });
- } else
- btn.on('click', closePrompt);
+ if (req.removeCancel)
+ btn.remove();
+ else {
+ if (req.cancelTxt)
+ btn.text(req.cancelTxt);
+ else
+ btn.text(polyglot.t('Cancel'));
+ if (req.cancelFunc) {
+ btn.on('click', function () {
+ closePrompt();
+ req.cancelFunc(req.cancelFuncArgs);
+ });
+ } else
+ btn.on('click', closePrompt);
+ }
+ var btn = modal.self.find('.prompt-close');
+ if (req.removeClose)
+ btn.remove();
+ else {
+ if (req.closeFunc) {
+ if (typeof req.closeFunc === 'string') {
+ if (req.closeFunc === 'confirmFunc') {
+ req.closeFunc = req.confirmFunc;
+ req.closeFuncArgs = req.confirmFuncArgs;
+ } else if (req.closeFunc === 'cancelFunc') {
+ req.closeFunc = req.cancelFunc;
+ req.closeFuncArgs = req.cancelFuncArgs;
+ }
+ }
+ btn.on('click', function () {
+ closePrompt();
+ req.closeFunc(req.closeFuncArgs);
+ });
+ }
+ }
}
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) {
networkUpdate(function(args) {
if (!twisterdConnectedAndUptodate) {
- var redirect = window.confirm(polyglot.t('switch_to_network'));
- if (redirect)
- $.MAL.goNetwork();
+ confirmPopup(null, {
+ messageTxt: polyglot.t('switch_to_network'),
+ confirmFunc: $.MAL.goNetwork
+ });
} else {
if (args.cbFunc)
args.cbFunc(args.cbArg);
@@ -172,7 +201,7 @@ function openGroupProfileModalWithNameHandler(groupAlias) {
getAvatar(ret.members[i], item.find('.twister-user-photo'));
getFullname(ret.members[i], item.find('.twister-user-full'));
- getBio(ret.members[i], item.find('.bio'));
+ getBioToElem(ret.members[i], item.find('.bio'));
}
elemFitNextIntoParentHeight(req.modal.content.find('.profile-card'));
@@ -314,7 +343,7 @@ function fillWhoToFollowModal(list, hlist, start) {
getAvatar(utf, item.find('.twister-user-photo'));
getFullname(utf, item.find('.twister-user-full'));
- getBio(utf, item.find('.bio'));
+ getBioToElem(utf, item.find('.bio'));
getFullname(followingUsers[i], item.find('.followed-by').text(followingUsers[i]));
item.find('.twister-user-remove').remove();
diff --git a/js/interface_home.js b/js/interface_home.js
index 2d980e6..49d1915 100644
--- a/js/interface_home.js
+++ b/js/interface_home.js
@@ -106,9 +106,10 @@ var InterfaceFunctions = function() {
$('.mini-profile .following-count').text(followingUsers.length - 1);
$('.wrapper .postboard .post').each( function() {
var elem = $(this);
- if ((elem.find('[data-screen-name="' + user + '"]').length && !elem.find(".post-retransmited-by").text())
- || elem.find(".post-retransmited-by").text() === '@'+user)
- elem.remove();
+ if ((elem.find('[data-screen-name="' + user + '"]').length
+ && !elem.find(".post-rt-by .open-profile-modal").text())
+ || elem.find(".post-rt-by .open-profile-modal").text() === '@' + user)
+ elem.remove();
});
});
diff --git a/js/interface_localization.js b/js/interface_localization.js
index 7eb855f..670bfad 100644
--- a/js/interface_localization.js
+++ b/js/interface_localization.js
@@ -43,6 +43,7 @@ if(preferredLanguage == "en"){
"Block generation": "Block generation ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Cancel",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -203,6 +204,8 @@ if(preferredLanguage == "en"){
"Terminate Daemon:": "Terminate Daemon:",
"Exit": "Exit",
"Save Changes": "Save Changes",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Secret key:",
"You have to log in to post messages.": "You have to log in to post messages.",
"You have to log in to post replies.": "You have to log in to post replies.",
@@ -308,7 +311,8 @@ if(preferredLanguage == "en"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -360,6 +364,7 @@ if(preferredLanguage == "es"){
"Block generation": "Generación de bloques ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Cancelar",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -520,6 +525,8 @@ if(preferredLanguage == "es"){
"Terminate Daemon:": "Terminar Demonio:",
"Exit": "Salir",
"Save Changes": "Guardar cambios",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Clave secreta:",
"You have to log in to post messages.": "Debes estar logueado para escribir mensajes.",
"You have to log in to post replies.": "Debes estar logueado para escribir respuestas.",
@@ -625,7 +632,8 @@ if(preferredLanguage == "es"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "deshacer",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -661,6 +669,7 @@ if(preferredLanguage == "uk"){
"Block generation": "Генерація блоку ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Відміна",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -818,6 +827,8 @@ if(preferredLanguage == "uk"){
"Terminate Daemon:": "Зупинити Twister:",
"Exit": "Вихід",
"Save Changes": "Зберегти зміни",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Секретний ключ:",
"You have to log in to post messages.": "Ви повинні увійти для публікації повідомлень.",
"You have to log in to post replies.": "Ви повинні увійти для публікації відповідей.",
@@ -923,7 +934,8 @@ if(preferredLanguage == "uk"){
"Who's celebrating Twistday": "Річницю святкує",
"Today's luckies:": "Сьогоднішні щасливчики:",
"Upcoming ones:": "Найближчим часом:",
- "twisted again by": "ретвіст від",
+ "post_rt_sign_prep": "ретвіст від",
+ "post_rt_time_prep": "at",
"undo": "відмінити",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Ви впевнені, що бажаєте завершити роботу? \n\nКлієнт Twister буде зупинено допоки ви не запустите його знову.",
"Daemon exited...": "Twister заверив роботу...",
@@ -961,6 +973,7 @@ if(preferredLanguage == "zh-CN"){
"Block generation": "区块生成器",
"busted_oh": "噢,阻挡!",
"busted_avowal": "系统检测到此用户试图在这里注入恶意代码",
+ "btn_ok": "Okay",
"Cancel": "取消",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -1120,6 +1133,8 @@ if(preferredLanguage == "zh-CN"){
"Terminate Daemon:": "终止后台进程:",
"Exit": "退出",
"Save Changes": "保存更改",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "私钥:",
"You have to log in to post messages.": "你必须登录才能发送信息。",
"You have to log in to post replies.": "你必须登录才能发送回复。",
@@ -1225,7 +1240,8 @@ if(preferredLanguage == "zh-CN"){
"Who's celebrating Twistday": "谁在庆祝自己的Twistday周年纪念日",
"Today's luckies:": "今天的幸运用户:",
"Upcoming ones:": "即将到来的幸运用户:",
- "twisted again by": "转推由",
+ "post_rt_sign_prep": "转推由",
+ "post_rt_time_prep": "at",
"undo": "撤销",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "你确定要退出后台进程?\nTwister 客户端将停止工作。",
"Daemon exited...": "后台进程已退出...",
@@ -1278,6 +1294,7 @@ if(preferredLanguage == "nl"){
"Block generation": "Block productie",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Annuleren",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -1438,6 +1455,8 @@ if(preferredLanguage == "nl"){
"Terminate Daemon:": "Daemon beëindigen",
"Exit": "Beëindigen",
"Save Changes": "Opslaan",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Geheime sleutel:",
"You have to log in to post messages.": "You have to log in to post messages.",
"You have to log in to post replies.": "You have to log in to post replies.",
@@ -1543,7 +1562,8 @@ if(preferredLanguage == "nl"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -1579,6 +1599,7 @@ if(preferredLanguage == "it"){
"Block generation": "Generatore di blocchi:",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Cancella",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -1736,6 +1757,8 @@ if(preferredLanguage == "it"){
"Terminate Daemon:": "Terminate Daemon:",
"Exit": "Exit",
"Save Changes": "Save Changes",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Secret key:",
"You have to log in to post messages.": "You have to log in to post messages.",
"You have to log in to post replies.": "You have to log in to post replies.",
@@ -1841,7 +1864,8 @@ if(preferredLanguage == "it"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -1877,6 +1901,7 @@ if(preferredLanguage == "fr"){
"Block generation": "Production de blocs",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Annuler",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -2037,6 +2062,8 @@ if(preferredLanguage == "fr"){
"Terminate Daemon:": "Tuer le démon:",
"Exit": "Quitter",
"Save Changes": "Sauvegarder les changements",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Clef secrète:",
"You have to log in to post messages.": "You have to log in to post messages.",
"You have to log in to post replies.": "You have to log in to post replies.",
@@ -2142,7 +2169,8 @@ if(preferredLanguage == "fr"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -2180,6 +2208,7 @@ if(preferredLanguage == "ru"){
"Block generation": "Майнинг блоков ",
"busted_oh": "о нет!",
"busted_avowal": "я пойман на попытке вставить этот подозрительный код здесь",
+ "btn_ok": "Лады́",
"Cancel": "Отмена",
"Confirm": "Несомненно",
"сonfirm_group_leaving_header": "Подтверждение ухода из группы",
@@ -2340,6 +2369,8 @@ if(preferredLanguage == "ru"){
"Terminate Daemon:": "Остановить twister:",
"Exit": "Выход",
"Save Changes": "Сохранить изменения",
+ "profile_saved": "Данные профайла сохранены в DHT.",
+ "profile_not_saved": "Данные профайла не сохранены.",
"Secret key:": "Секретный ключ:",
"You have to log in to post messages.": "Войдите, чтобы отправлять сообщения.",
"You have to log in to post replies.": "Войдите, чтобы отвечать на сообщения.",
@@ -2445,7 +2476,8 @@ if(preferredLanguage == "ru"){
"Who's celebrating Twistday": "Кто празднует Твистодень",
"Today's luckies:": "Сегодняшные счастливчики", // няшные, ок?
"Upcoming ones:": "Намечающиеся вскоре",
- "twisted again by": "Перепостил",
+ "post_rt_sign_prep": "ретвистит",
+ "post_rt_time_prep": "в",
"undo": "отменить",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Вы уверены, что хотите "+
"выключить демон?\nTwister клиент перестанет работать.",
@@ -2486,6 +2518,7 @@ if(preferredLanguage == "de"){
"Block generation": "Block-Generierung ",
"busted_oh": "Oh nein!",
"busted_avowal": "Ich bin ertappt, habe versucht, hier Schadcode einzugeben!",
+ "btn_ok": "Okay",
"Cancel": "Abbrechen",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -2637,7 +2670,7 @@ if(preferredLanguage == "de"){
"Create this nickname": "Nichnamen erstellen",
"Type nickname here": "Nicknamen hier eingeben",
"Import secret key": "Privaten Schlüssel hier importieren",
- "52-characters secret": "52 Zeichen Geheimniss",
+ "52-characters secret": "52 Zeichen Geheimnis",
"With nickname": "Mit Nicknamen",
"Import key": "Schlüssel importieren",
"Client Version:": "Client Version:",
@@ -2647,6 +2680,8 @@ if(preferredLanguage == "de"){
"Terminate Daemon:": "Daemon beenden:",
"Exit": "Beenden",
"Save Changes": "Änderungen speichern",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Privater Schlüssel:",
"You have to log in to post messages.": "You have to log in to post messages.",
"You have to log in to post replies.": "You have to log in to post replies.",
@@ -2753,7 +2788,8 @@ if(preferredLanguage == "de"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Die Glücklichen von heute:",
"Upcoming ones:": "Demnächst:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -2789,6 +2825,7 @@ if(preferredLanguage == "ja"){
"Block generation": "ブロック生成",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "キャンセル",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -2946,6 +2983,8 @@ if(preferredLanguage == "ja"){
"Terminate Daemon:": "デーモンを終了する:",
"Exit": "終了",
"Save Changes": "変更を保存",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "シークレットキー:",
"You have to log in to post messages.": "You have to log in to post messages.",
"You have to log in to post replies.": "You have to log in to post replies.",
@@ -3051,7 +3090,8 @@ if(preferredLanguage == "ja"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -3088,6 +3128,7 @@ if(preferredLanguage == "pt-BR"){
"Block generation": "Geração de blocos ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Cancelar",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -3249,6 +3290,8 @@ if(preferredLanguage == "pt-BR"){
"Terminate Daemon:": "Encerrar a execução do Cliente do Twister",
"Exit": "Sair",
"Save Changes": "Salvar Alterações",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret Key": "Chave Secreta", // não existia
"Secret key:": "Chave secreta:",
"You have to log in to post messages.": "You have to log in to post messages.",
@@ -3355,7 +3398,8 @@ if(preferredLanguage == "pt-BR"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "twisted again by",
+ "post_rt_sign_prep": "twisted again by",
+ "post_rt_time_prep": "at",
"undo": "undo",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Are you sure you want to exit the daemon?\nThe Twister client will stop working.",
"Daemon exited...": "Daemon exited...",
@@ -3391,6 +3435,7 @@ if(preferredLanguage == "tr"){
"Block generation": "Blok üretimi ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "İptal",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -3550,6 +3595,8 @@ if(preferredLanguage == "tr"){
"Terminate Daemon:": "Servisi Durdur:",
"Exit": "Çıkış",
"Save Changes": "Değişiklikleri Kaydet",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Gizli anahtar:",
"Options": "Ayarlar",
"Switch to Promoted posts": "Destekli Mesajlara Geç",
@@ -3655,7 +3702,8 @@ if(preferredLanguage == "tr"){
"Who's celebrating Twistday": "Twistgünü'nü kutlayanlar",
"Today's luckies:": "Günün talihlileri:",
"Upcoming ones:": "Yakında:",
- "twisted again by": "yeniden ileten",
+ "post_rt_sign_prep": "yeniden ileten",
+ "post_rt_time_prep": "at",
"undo": "geri al",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Hizmeti sonlandırmak istiyor musun?\nTwister istemcisi çalışmayacak.",
"Daemon exited...": "Hizmet sonlandırıldı...",
@@ -3691,6 +3739,7 @@ if(preferredLanguage == "cs"){
"Block generation": "Generování bloků ",
"busted_oh": "oh noes!",
"busted_avowal": "I\'m busted trying inject this suspicious stuff here",
+ "btn_ok": "Okay",
"Cancel": "Zrušit",
"Confirm": "Confirm",
"сonfirm_group_leaving_header": "Confirm group leaving",
@@ -3849,6 +3898,8 @@ if(preferredLanguage == "cs"){
"Terminate Daemon:": "Ukončit server:",
"Exit": "Konec",
"Save Changes": "Uložit změny",
+ "profile_saved": "Profile data has been saved to DHT.",
+ "profile_not_saved": "Profile data has been not saved.",
"Secret key:": "Tajný klíč:",
"You have to log in to post messages.": "Pro vkládání příspěvků je třeba se přihlásit.",
"You have to log in to post replies.": "Pro vkládání odpovědí je třeba se přihlásit.",
@@ -3954,7 +4005,8 @@ if(preferredLanguage == "cs"){
"Who's celebrating Twistday": "Who's celebrating Twistday",
"Today's luckies:": "Today's luckies:",
"Upcoming ones:": "Upcoming ones:",
- "twisted again by": "přeposlal(a)",
+ "post_rt_sign_prep": "přeposlal(a)",
+ "post_rt_time_prep": "at",
"undo": "zpět",
"Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Skutečně chcete ukončit server?\nTwister tím vypnete.",
"Daemon exited...": "Server ukončen...",
diff --git a/js/twister_actions.js b/js/twister_actions.js
index 4da3eec..dc456cb 100644
--- a/js/twister_actions.js
+++ b/js/twister_actions.js
@@ -329,7 +329,7 @@ function updateProfileData(profileModalContent, username) {
getFullname( username, profileModalContent.find(".profile-name") );
getLocation( username, profileModalContent.find(".profile-location") );
getWebpage( username, profileModalContent.find(".profile-url") );
- getBio( username, profileModalContent.find(".profile-bio") );
+ getBioToElem(username, profileModalContent.find('.profile-bio'));
getTox( username, profileModalContent.find(".profile-tox") );
getBitmessage( username, profileModalContent.find(".profile-bitmessage") );
getAvatar( username, profileModalContent.find(".profile-card-photo") );
diff --git a/js/twister_directmsg.js b/js/twister_directmsg.js
index 18fbb92..cb3bf67 100644
--- a/js/twister_directmsg.js
+++ b/js/twister_directmsg.js
@@ -28,6 +28,10 @@ function processDMsnippet(dmUsers, dmThreadList, forGroup) {
// convert snipped to html and add it to date-sorted list
var dmItem = dmDataToSnippetItem(dmUsers[u][0], u);
+ if (_newDMsPerUser[u] > 0) {
+ dmItem.addClass('new')
+ .find('.messages-qtd').text(_newDMsPerUser[u]).show();
+ }
var timeDmItem = parseInt(dmItem.attr('data-time'));
var existingItems = dmThreadList.children();
for (var j = 0; j < existingItems.length; j++) {
diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js
index 77e1e10..62a0cdd 100644
--- a/js/twister_formatpost.js
+++ b/js/twister_formatpost.js
@@ -3,8 +3,8 @@
//
// Format JSON posts and DMs to HTML.
-var _templatePostRtReference
-var _templatePostRtBy
+var _templatePostRtReference;
+var _templatePostRtBy;
var _htmlFormatMsgLinkTemplateExternal;
var _htmlFormatMsgLinkTemplateUser;
var _htmlFormatMsgLinkTemplateHashtag;
@@ -14,7 +14,7 @@ $(document).ready(function() {
_templatePostRtReference = $('#post-rt-reference-template').children().clone(true);
_templatePostRtReference.find('.post-text')
.on('click', {feeder: '.post-rt-reference'}, openConversationClick);
- _templatePostRtBy = $('#post-retransmited-by-template').children().clone(true);
+ _templatePostRtBy = $('#post-rt-by-template').children().clone(true);
_htmlFormatMsgLinkTemplateExternal = $('#external-page-link-template')
if (_htmlFormatMsgLinkTemplateExternal.length) {
_htmlFormatMsgLinkTemplateExternal = _htmlFormatMsgLinkTemplateExternal[0].cloneNode();
@@ -156,10 +156,13 @@ function postToElem(post, kind, promoted) {
if (userpost.msg) {
setPostReference(postContext, rt, userpost.sig_rt);
} else {
- postContext.append(_templatePostRtBy.clone(true))
- .find('.post-retransmited-by')
+ postContext.append(_templatePostRtBy.clone(true)).addClass('post-rt-by')
+ .find('.post-rt-sign .prep').text(polyglot.t('post_rt_sign_prep'))
+ .siblings('.open-profile-modal')
.attr('href', $.MAL.userUrl(retweeted_by)).text('@' + retweeted_by)
;
+ postContext.find('.post-rt-time .prep').text(polyglot.t('post_rt_time_prep'))
+ .siblings('.time').text(timeGmtToText(post.userpost.time));
// let's check original post and grab some possible RT
dhtget(username, 'post' + k, 's',
function(args, post) {
diff --git a/js/twister_io.js b/js/twister_io.js
index a5355bb..c4a0a4e 100644
--- a/js/twister_io.js
+++ b/js/twister_io.js
@@ -249,9 +249,13 @@ function getFullname( username, item ){
}
}
-// get bio and store it in item.text
-function getBio( username, item ){
- getProfileResource( username, "bio", item);
+// get bio, format it as post message and store result to elem
+function getBioToElem(peerAlias, elem) {
+ getProfileResource(peerAlias, 'bio', undefined,
+ function (req, ret) {
+ req.elem.html(htmlFormatMsg(ret).html);
+ }, {elem: elem}
+ );
}
// get tox address and store it in item.text
diff --git a/js/twister_timeline.js b/js/twister_timeline.js
index 6be8614..1eec2a6 100644
--- a/js/twister_timeline.js
+++ b/js/twister_timeline.js
@@ -192,9 +192,6 @@ function updateTimeline(req, posts) {
function attachPostsToStream(stream, posts, isPromoted) {
//console.log('attachPostsToStream:');
//console.log(posts);
- function byTimeInDescendingOrder(a, b) {
- return (a.time > b.time) ? -1 : 1;
- }
var streamItems = stream.children();
var streamPosts = [];
@@ -203,7 +200,6 @@ function attachPostsToStream(stream, posts, isPromoted) {
var streamItem = streamItems.eq(i);
streamPosts.push({item: streamItem, time: parseInt(streamItem.attr('data-time'))});
}
- //streamPosts.sort(byTimeInDescendingOrder); // currently here is no reason to sort it, it should be ok
for (var i = 0; i < posts.length; i++) {
//console.log(posts[i]);
@@ -222,8 +218,7 @@ function attachPostsToStream(stream, posts, isPromoted) {
} else if (intrantPost.time > streamPosts[j].time) {
// this post in stream is older, so post must be inserted above
intrantPost.item.insertBefore(streamPosts[j].item).show();
- streamPosts.push(intrantPost);
- streamPosts.sort(byTimeInDescendingOrder);
+ streamPosts.splice(j, 0, intrantPost);
isAttached = true;
break;
}
@@ -231,8 +226,7 @@ function attachPostsToStream(stream, posts, isPromoted) {
}
if (!isAttached) {
intrantPost.item.appendTo(stream).show();
- streamPosts.push(intrantPost);
- streamPosts.sort(byTimeInDescendingOrder);
+ streamPosts.unshift(intrantPost);
}
}
}
diff --git a/js/twister_user.js b/js/twister_user.js
index 002a51c..c154de9 100644
--- a/js/twister_user.js
+++ b/js/twister_user.js
@@ -261,24 +261,59 @@ function loadProfileForEdit() {
}, {} );
}
-function saveProfile(e)
-{
- var profile = {};
- profile["fullname"] = $(".input-name").val();
- profile["bio"] = $(".input-description").val();
- profile["location"] = $(".input-city").val();
- profile["url"] = $(".input-website").val();
- var tox = $(".input-tox").val();
- if( tox.length )
- profile["tox"] = tox;
- var bitmessage = $(".input-bitmessage").val();
- if( bitmessage.length )
- profile["bitmessage"] = bitmessage;
- dhtput( defaultScreenName, "profile", "s",
- profile, defaultScreenName, ++profileSeqNum );
- var avatarData = $(".profile-card-photo.forEdition").attr("src");
- dhtput( defaultScreenName, "avatar", "s",
- avatarData, defaultScreenName, ++avatarSeqNum );
- clearAvatarAndProfileCache(defaultScreenName);
+function saveProfile(e) {
+ function saveAvatar(req, isProfileDataSaved) {
+ dhtput(defaultScreenName, 'avatar', 's',
+ req.avatarImgSrc,
+ defaultScreenName, ++avatarSeqNum,
+ completeProfileSaving, {isProfileDataSaved: isProfileDataSaved}
+ );
+ }
+
+ function completeProfileSaving(req, isAvatarDataSaved) {
+ if (req.isProfileDataSaved && isAvatarDataSaved) {
+ clearAvatarAndProfileCache(defaultScreenName);
+ var titleTxt = '';
+ var messageTxt = polyglot.t('profile_saved');
+ } else {
+ var titleTxt = polyglot.t('error', {error: ''});
+ var messageTxt = polyglot.t('profile_not_saved');
+ }
+ confirmPopup(null, {
+ titleTxt: titleTxt,
+ messageTxt: messageTxt,
+ confirmTxt: polyglot.t('btn_ok'),
+ confirmFunc: $.MAL.enableButton,
+ confirmFuncArgs: $('.submit-changes'),
+ closeFunc: 'confirmFunc',
+ removeCancel: true
+ });
+ }
+
+ $.MAL.disableButton($('.submit-changes'));
+
+ dhtput(defaultScreenName, 'profile', 's',
+ setObjPropFromElemVal({}, {
+ fullname: '.input-name',
+ bio: '.input-description',
+ location: '.input-city',
+ url: '.input-website',
+ tox: '.input-tox',
+ bitmessage: '.input-bitmessage'
+ }),
+ defaultScreenName, ++profileSeqNum,
+ saveAvatar, {avatarImgSrc: $('.profile-card-photo.forEdition').attr('src')}
+ );
}
+function setObjPropFromElemVal(object, req) {
+ var props = Object.getOwnPropertyNames(req); // req's props names will be object's props names
+
+ for (var i = 0; i < props.length; i++) {
+ elem = $(req[props[i]]); // req's props values are elements selectors
+ if (elem.length && elem.val())
+ object[props[i]] = elem.val();
+ }
+
+ return object;
+}
diff --git a/login.html b/login.html
index 8aface6..eebcccb 100644
--- a/login.html
+++ b/login.html
@@ -21,7 +21,7 @@
-
+
@@ -90,6 +90,22 @@