From d45f8e9376b0be0542bf451ddb95fec1d10ef13e Mon Sep 17 00:00:00 2001 From: Simon Grim Date: Tue, 21 Apr 2015 23:28:48 +0500 Subject: [PATCH] twistday reminder strings fix and reply popup --- css/style.css | 6 +++- home.html | 8 ++--- js/interface_common.js | 9 +++-- js/interface_home.js | 23 +++++++------ js/interface_localization.js | 65 ++++++++++++++++++++++++++++++++++++ options.html | 2 +- theme_calm/css/style.css | 6 +++- theme_nin/css/style.css | 4 +++ theme_nin/sass/style.sass | 2 ++ 9 files changed, 102 insertions(+), 23 deletions(-) diff --git a/css/style.css b/css/style.css index be7de9b..1d1c22a 100644 --- a/css/style.css +++ b/css/style.css @@ -858,7 +858,11 @@ ol.toptrends-list { .twistday-reminder .twisterday { font-size: 80%; - margin: 0 11%; + margin-left: 11%; +} + +.twistday-reminder .twisterday:hover { + cursor: pointer; } /*********************************** diff --git a/home.html b/home.html index 84c088e..3b5dfa2 100644 --- a/home.html +++ b/home.html @@ -244,17 +244,17 @@
-

Twistday Reminder

+

Who's celebrating Twistday

. - Refresh + Refresh
-

Today's luckies:

+

Today's luckies:

-

Upcoming ones:

+

Upcoming ones:

diff --git a/js/interface_common.js b/js/interface_common.js index 756675b..1368a8e 100644 --- a/js/interface_common.js +++ b/js/interface_common.js @@ -525,16 +525,15 @@ var replyInitPopup = function(e, post) openPrompt( replyClass ); //título do modal - var fullname = post.find(".post-info-name").text(); - $( ".reply h3" ).text( polyglot.t("reply_to", { fullname: fullname }) ); + $('.reply h3').html(polyglot.t('reply_to', { 'fullname': ''+post.userpost.n+'' })); + getFullname(post.userpost.n, $('.reply h3 .fullname')); //para poder exibir a thread selecionada... var replyModalContent = $(".reply .modal-content").hide(); var retweetContent = $( "#reply-modal-template" ).children().clone(true); retweetContent.appendTo(replyModalContent); - var postdata = post.find(".post-data").attr("data-userpost"); - var postElem = postToElem($.evalJSON(postdata),""); + var postElem = postToElem(post,""); postElem.appendTo(replyModalContent); var replyArea = $(".reply .post-area .post-area-new"); @@ -693,7 +692,7 @@ var postReplyClick = function( e ) } var post = $(this).closest(".post"); if( !post.hasClass( "original" ) ) { - replyInitPopup(e, post); + replyInitPopup(e, $.evalJSON(post.find(".post-data").attr("data-userpost"))); } else { var postLiOpen = post.parents(".post.open"); if( !postLiOpen.length ) { diff --git a/js/interface_home.js b/js/interface_home.js index 733ba01..83a75cd 100644 --- a/js/interface_home.js +++ b/js/interface_home.js @@ -210,23 +210,24 @@ function refreshTwistdayReminder() { for (var i = 0; i < suggests.length; i++) { suggests[i] = {'username': suggests[i], 'max_id': 0}; } - twisterRpc("getposts", [suggests.length + 1,suggests], + twisterRpc('getposts', [suggests.length + 1,suggests], function(arg, posts) { function addLuckyToList(list, post, time) { var lucky = post.userpost.n; if (list.find('[data-screen-name='+lucky+']').length < 1) { - var item = $("#twistday-reminder-suggestion-template").clone(true); - item.removeAttr("id"); - item.find(".twister-user-info").attr("data-screen-name", lucky); - item.find(".twister-user-name").attr("href", $.MAL.userUrl(lucky)); - item.find(".twister-user-tag").text("@" +lucky); + var item = $('#twistday-reminder-suggestion-template').clone(true); + item.removeAttr('id'); + item.find('.twister-user-info').attr('data-screen-name', lucky); + item.find('.twister-user-name').attr('href', $.MAL.userUrl(lucky)); + item.find('.twister-user-tag').text('@' +lucky); if (typeof(time) !== 'undefined') - item.find(".twisterday").text(timeGmtToText(time)); + item.find('.twisterday').text(timeGmtToText(time)); else - item.find(".twisterday").text(timeGmtToText(post.userpost.time)); + item.find('.twisterday').text(timeGmtToText(post.userpost.time)); + item.find('.twisterday').bind('click', (function(e) { replyInitPopup(e, post); }).bind(post)); - getAvatar(lucky, item.find(".twister-user-photo")); - getFullname(lucky, item.find(".twister-user-full")); + getAvatar(lucky, item.find('.twister-user-photo')); + getFullname(lucky, item.find('.twister-user-full')); list.append(item); } @@ -281,7 +282,7 @@ function refreshTwistdayReminder() { $module.find('.refresh').show(); $module.find('.loading-roller').hide(); }, null, - function(arg, ret) { console.log("ajax error:" + ret); }, null); + function(arg, ret) { console.log('ajax error:' + ret); }, null); } } if ($.Options.getTwistdayReminderAutoUpdateOpt() === 'enable' && $.Options.getTwistdayReminderAutoUpdateTimerOpt() > 0) diff --git a/js/interface_localization.js b/js/interface_localization.js index 5fa58c2..5d6fe6e 100644 --- a/js/interface_localization.js +++ b/js/interface_localization.js @@ -276,6 +276,11 @@ if(preferredLanguage == "en"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -559,6 +564,11 @@ if(preferredLanguage == "es"){ "Messages": "Mensajes", "Edit profile": "Editar perfil", "Top Trends": "Tendencias principales", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -826,6 +836,11 @@ if(preferredLanguage == "uk"){ "Messages": "Повідомлення", "Edit profile": "Редагувати профіль", "Top Trends": "Тренди", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "undo": "відмінити", "Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Ви впевнені, що бажаєте зупинити системний демон? \nУ такому разі, клієнт Twister буде зупинено допоки ви не запустите його знову.", @@ -1092,6 +1107,11 @@ if(preferredLanguage == "zh-CN"){ "Messages": "消息", "Edit profile": "编辑个人简介", "Top Trends": "热门趋势", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "转推由", "undo": "撤销", "Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "你确定要退出后台进程?\nTwister 客户端将停止工作。", @@ -1376,6 +1396,11 @@ if(preferredLanguage == "nl"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -1640,6 +1665,11 @@ if(preferredLanguage == "it"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -1908,6 +1938,11 @@ if(preferredLanguage == "fr"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -2177,6 +2212,11 @@ if(preferredLanguage == "ru"){ "Messages": "Сообщения", "Edit profile": "Изменить профиль", "Top Trends": "Топ Трендов", + "Twistday Reminder": "Твистоденный Календарь", + "Show upcoming in near future": "Показывать намечающиеся юбиляров", + "Who's celebrating Twistday": "Кто празднует Твистодень", + "Today's luckies:": "Сегодняшные счастливчики", // няшные, ок? + "Upcoming ones:": "Намечающиеся вскоре", "twisted again by": "Перепостил", "undo": "отменить", "Are you sure you want to exit the daemon?\nThe Twister client will stop working.": "Вы уверены, что хотите "+ @@ -2450,6 +2490,11 @@ if(preferredLanguage == "de"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -2714,6 +2759,11 @@ if(preferredLanguage == "ja"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -2984,6 +3034,11 @@ if(preferredLanguage == "pt-BR"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -3250,6 +3305,11 @@ if(preferredLanguage == "tr"){ "Messages": "Messages", "Edit profile": "Edit profile", "Top Trends": "Top Trends", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "twisted again by", "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.", @@ -3515,6 +3575,11 @@ if(preferredLanguage == "cs"){ "Messages": "Zprávy", "Edit profile": "Upravit profil", "Top Trends": "Hlavní trendy", + "Twistday Reminder": "Twistday Reminder", + "Show upcoming in near future": "Show upcoming in near future", + "Who's celebrating Twistday": "Who's celebrating Twistday", + "Today's luckies:": "Today's luckies:", + "Upcoming ones:": "Upcoming ones:", "twisted again by": "přeposlal(a)", "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.", diff --git a/options.html b/options.html index 8c77ffc..72ed3a2 100644 --- a/options.html +++ b/options.html @@ -354,7 +354,7 @@
second(s)
-

Show upcoming in next hours

+

Show upcoming in near future