diff --git a/css/style.css b/css/style.css
index e291583..3c39426 100644
--- a/css/style.css
+++ b/css/style.css
@@ -1091,13 +1091,13 @@ ol.toptrends-list {
text-align: right;
height: 23px;
}
-.post-interactions span,
-.post-expand
-{
+
+.post-interactions span, .post-expand, .prompt-wrapper .switch-mode {
color: #e34f42;
cursor: pointer;
- font-size: 12px;
+ font-size: 11px;
}
+
.post-expand
{
position: absolute;
@@ -1702,12 +1702,14 @@ ol.toptrends-list {
}
.prompt-wrapper .modal-buttons {
- padding: 10px;
+ margin: 4px 16px;
text-align: right;
}
-.prompt-wrapper .modal-buttons button:last-child {
- padding: 5px 20px;
+.prompt-wrapper .switch-mode {
+ display: inline-block;
+ float: left;
+ margin: 4px;
}
/*************************************
@@ -1723,10 +1725,6 @@ ol.toptrends-list {
text-align: center;
}
-.following-config-modal .modal-buttons {
- display: none;
-}
-
.following-config-method-buttons {
padding: 10px;
}
@@ -1745,13 +1743,13 @@ ol.toptrends-list {
}
.reTwist .post {
- margin: 5px;
- padding: 5px;
+ margin: 8px;
+ padding: 4px;
min-height: 68px;
}
.reTwist .post-area-extras {
- margin-right: 10px;
+ margin: 4px 16px;
}
/*************************************
@@ -1762,10 +1760,6 @@ ol.toptrends-list {
margin-top: -140px;
}
-.reply .modal-buttons {
- display: none;
-}
-
.reply .post-expand,
.reply .post-interactions {
display: none;
@@ -1781,12 +1775,12 @@ ol.toptrends-list {
}
.reply .post-area-extras {
- margin-right: 10px;
+ margin: 4px 16px;
}
.reply .post {
- margin: 10px;
- padding: 5px;
+ margin: 8px;
+ padding: 4px;
min-height: 68px;
}
diff --git a/following.html b/following.html
index 12f5462..30ee04a 100644
--- a/following.html
+++ b/following.html
@@ -219,7 +219,7 @@
-
-
-
-
-
-
-
-
-
+
-
-
@@ -460,8 +461,7 @@
-
- 10min
+
diff --git a/js/interface_common.js b/js/interface_common.js
index 5e26403..a3d1e93 100644
--- a/js/interface_common.js
+++ b/js/interface_common.js
@@ -8,13 +8,13 @@
var window_scrollY = 0;
function openModal(modal) {
- window_scrollY = window.pageYOffset;
-
- $('body').css('overflow', 'hidden');
-
- if (!modal.classBase)
+ if (!modal.classBase) {
modal.classBase = '.modal-wrapper';
+ window_scrollY = window.pageYOffset;
+ $('body').css('overflow', 'hidden');
+ }
+
$(modal.classBase + ':not(#templates *)').remove();
modal.self = $('#templates ' + modal.classBase).clone(true)
@@ -46,18 +46,19 @@ function openModal(modal) {
function closeModal() {
closeModalHandler('.modal-wrapper');
+
window.location.hash = '#';
window.scroll(window.pageXOffset, window_scrollY);
+ $('body').css({
+ 'overflow': 'auto',
+ 'margin-right': '0'
+ });
}
function closeModalHandler(classBase) {
var modalWindows = $(classBase+':not(#templates *)');
modalWindows.fadeOut('fast', function() {modalWindows.remove();});
- $('body').css({
- 'overflow': 'auto',
- 'margin-right': '0'
- });
}
function checkNetworkStatusAndAskRedirect(cbFunc, cbArg) {
@@ -372,13 +373,17 @@ function initHashWatching() {
setTimeout(watchHashChange, 1000);
}
-function reTwistPopup(e) {
- e.stopPropagation();
+function reTwistPopup(event, post, textArea) {
+ event.stopPropagation();
+
if (!defaultScreenName) {
alert(polyglot.t('You have to log in to retransmit messages.'));
return;
}
+ if (typeof post === 'undefined')
+ post = $.evalJSON($(event.target).parents('.post-data').attr('data-userpost'));
+
var modal = openModal({
classBase: '.prompt-wrapper',
classAdd: 'reTwist',
@@ -386,22 +391,35 @@ function reTwistPopup(e) {
});
modal.content
- .append(postToElem($.evalJSON($(this).parents('.post-data').attr('data-userpost')), ''))
- .append($('#reply-modal-template').children().clone(true)) // FIXME retwist-reply-modal-template
+ .append(postToElem(post, ''))
+ .append($('#reTwist-modal-template').children().clone(true))
;
- var replyArea = modal.content.find('.post-area .post-area-new');
- var textArea = replyArea.find('textarea');
- var textAreaPostInline = modal.content.find('.post .post-area-new textarea');
- $.each(['placeholder', 'data-reply-to'], function(i, attribute) {
- textArea.attr(attribute, textAreaPostInline.attr(attribute));
- });
+ modal.content.find('.switch-mode')
+ .text(polyglot.t('Switch to Reply'))
+ .on('click', (function(event) {replyInitPopup(event, post,
+ $(event.target).parents('form').find('textarea').detach());}).bind(post))
+ ;
+ var replyArea = modal.content.find('.post-area .post-area-new');
+ if (typeof textArea === 'undefined') {
+ textArea = replyArea.find('textarea');
+ var textAreaPostInline = modal.content.find('.post .post-area-new textarea');
+ $.each(['placeholder', 'data-reply-to'], function(i, attribute) {
+ textArea.attr(attribute, textAreaPostInline.attr(attribute));
+ });
+ } else {
+ replyArea.find('textarea').replaceWith(textArea);
+ if (textArea.val()) {
+ textArea.focus();
+ replyArea.addClass('open');
+ }
+ }
replyArea.find('.post-submit').addClass('with-reference');
}
// Expande Área do Novo post
-function replyInitPopup(e, post) {
+function replyInitPopup(e, post, textArea) {
var modal = openModal({
classBase: '.prompt-wrapper',
classAdd: 'reply',
@@ -415,14 +433,22 @@ function replyInitPopup(e, post) {
.append($('#reply-modal-template').children().clone(true))
;
- // FIXME passing data through attributes may result in a mess like following
- var replyArea = modal.content.find('.post-area .post-area-new').addClass('open');
- var textArea = replyArea.find('textarea');
- var textAreaPostInline = modal.content.find('.post .post-area-new textarea');
- $.each(['placeholder', 'data-reply-to'], function(i, attribute) {
- textArea.attr(attribute, textAreaPostInline.attr(attribute));
- });
+ modal.content.find('.switch-mode')
+ .text(polyglot.t('Switch to Retransmit'))
+ .on('click', (function(event) {reTwistPopup(event, post,
+ $(event.target).parents('form').find('textarea').detach())}).bind(post))
+ ;
+ var replyArea = modal.content.find('.post-area .post-area-new').addClass('open');
+ if (typeof textArea === 'undefined') {
+ textArea = replyArea.find('textarea');
+ var textAreaPostInline = modal.content.find('.post .post-area-new textarea');
+ $.each(['placeholder', 'data-reply-to'], function(i, attribute) {
+ textArea.attr(attribute, textAreaPostInline.attr(attribute));
+ });
+ } else {
+ replyArea.find('textarea').replaceWith(textArea);
+ }
composeNewPost(e, replyArea);
}
@@ -601,13 +627,14 @@ function posPostPreview(event) {
if (textArea[0].value.length)
postPreview.html(htmlFormatMsg(textArea[0].value).html).show();
else
- postPreview.hide();
+ postPreview.slideUp('fast');
textArea.before(postPreview);
}
// Reduz Área do Novo post
function unfocusThis() {
- $(this).removeClass('open');
+ $(this).removeClass('open')
+ .find('#post-preview').slideUp('fast');
}
function checkPostForMentions(post, mentions, max) {
@@ -712,7 +739,7 @@ function replyTextInput(event) {
if (textArea[0].value.length)
textAreaForm.find('#post-preview').html(htmlFormatMsg(textArea[0].value).html).show();
else
- textAreaForm.find('#post-preview').html('').hide();
+ textAreaForm.find('#post-preview').html('').slideUp('fast');
}
}
@@ -1232,7 +1259,7 @@ function postSubmit(e, oldLastPostId) {
var textArea = btnPostSubmit.closest('.post-area-new').find('textarea');
- textArea.siblings('#post-preview').hide();
+ textArea.siblings('#post-preview').slideUp('fast');
var postData = btnPostSubmit.closest('.post-data');
if (!postData.length) {
diff --git a/js/interface_localization.js b/js/interface_localization.js
index 06ad1a6..9b08e75 100644
--- a/js/interface_localization.js
+++ b/js/interface_localization.js
@@ -130,6 +130,8 @@ if(preferredLanguage == "en"){
"Retransmit": "Retransmit",
"Retransmits": "Retransmits",
"Retransmitted by": "Retransmitted by",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "search",
"seconds": "%{smart_count} second |||| %{smart_count} seconds",
"send": "send",
@@ -428,6 +430,8 @@ if(preferredLanguage == "es"){
"Retransmit": "Retransmicion",
"Retransmits": "Retransmiciones",
"Retransmitted by": "Retransmitido por",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "search",
"seconds": "%{smart_count} segundo |||| %{smart_count} segundos",
"send": "send",
@@ -711,6 +715,8 @@ if(preferredLanguage == "uk"){
"Retransmit": "Переслати",
"Retransmits": "Пересилання",
"Retransmitted by": "Переслано ",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "пошук",
"seconds": "%{smart_count} секунда |||| %{smart_count} секунд",
"send": "відіслати",
@@ -991,6 +997,8 @@ if(preferredLanguage == "zh-CN"){
"Retransmit": "转发",
"Retransmits": "转发",
"Retransmitted by": "转发于",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "搜索",
"seconds": "%{smart_count} 秒",
"send": "发送",
@@ -1289,6 +1297,8 @@ if(preferredLanguage == "nl"){
"Retransmit": "Retransmit",
"Retransmits": "Retransmits",
"Retransmitted by": "Retransmitted door",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "Zoeken",
"seconds": "%{smart_count} seconde |||| %{smart_count} seconden",
"send": "Verstuur",
@@ -1571,6 +1581,8 @@ if(preferredLanguage == "it"){
"Retransmit": "Ripubblica",
"Retransmits": "Ripubblicati",
"Retransmitted by": "Ripubblicato da",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "Cerca",
"seconds": "%{smart_count} secondo |||| %{smart_count} secondi",
"send": "Invia",
@@ -1850,6 +1862,8 @@ if(preferredLanguage == "fr"){
"Retransmit": "Retransmission",
"Retransmits": "Retransmissions",
"Retransmitted by": "Retransmis par",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "recherche",
"seconds": "%{smart_count} seconde |||| %{smart_count} secondes",
"send": "envoyer",
@@ -2134,6 +2148,8 @@ if(preferredLanguage == "ru"){
"Retransmit": "Перепостить",
"Retransmits": "Репосты",
"Retransmitted by": "Перепощено ",
+ "Switch to Reply": "Переключиться на ответ",
+ "Switch to Retransmit": "Переключиться на ретвист",
"search": "найти",
"seconds": "%{smart_count} секунда |||| %{smart_count} секунд",
"send": "отправить",
@@ -2422,6 +2438,8 @@ if(preferredLanguage == "de"){
"Retransmit": "Weiterleiten",
"Retransmits": "Weiterleitungen",
"Retransmitted by": "Weitergeleitet von",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "suchen",
"seconds": "%{smart_count} Sekunde |||| %{smart_count} Sekunden",
"send": "senden",
@@ -2705,6 +2723,8 @@ if(preferredLanguage == "ja"){
"Retransmit": "リトランスミット",
"Retransmits": "リトランスミット",
"Retransmitted by": "リトランスミットしたユーザー",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "検索",
"seconds": "%{smart_count} 秒 |||| %{smart_count} 秒",
"send": "送信",
@@ -2986,6 +3006,8 @@ if(preferredLanguage == "pt-BR"){
"Retransmit": "Retransmitir",
"Retransmits": "Retransmissões",
"Retransmitted by": "Retransmitido por",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "procurar",
"seconds": "%{smart_count} segundo |||| %{smart_count} segundos",
"send": "enviar",
@@ -3269,6 +3291,8 @@ if(preferredLanguage == "tr"){
"Retransmit": "Tekar ilet",
"Retransmits": "Tekrar iletenler",
"Retransmitted by": "Tekrar ileten",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "ara",
"seconds": "%{smart_count} saniye |||| %{smart_count} saniye",
"send": "gönder",
@@ -3551,6 +3575,8 @@ if(preferredLanguage == "cs"){
"Retransmit": "Přeposlat",
"Retransmits": "Přeposlání",
"Retransmitted by": "Přeposlal(a)",
+ "Switch to Reply": "Switch to Reply",
+ "Switch to Retransmit": "Switch to Retransmit",
"search": "hledat",
"seconds": "%{smart_count} vteřinou |||| %{smart_count} vteřinami |||| %{smart_count} vteřinami",
"send": "odeslat",
diff --git a/js/twister_formatpost.js b/js/twister_formatpost.js
index d908a39..3aa20a9 100644
--- a/js/twister_formatpost.js
+++ b/js/twister_formatpost.js
@@ -44,7 +44,11 @@ function postToElem(post, kind, promoted) {
//elem.find('.post-info-tag').text("@" + username); // FIXME
getAvatar(username, elem.find('.avatar'));
- elem.find('.post-info-time').text(timeGmtToText(time)).attr('title', timeSincePost(time));
+ elem.find('.post-info-time')
+ .attr('title', timeSincePost(time))
+ .find('span:last')
+ .text(timeGmtToText(time))
+ ;
}
/*
@@ -253,7 +257,11 @@ function dmDataToSnippetItem(dmData, remoteUser) {
else
getFullname( remoteUser, dmItem.find("a.post-info-name") );
dmItem.find(".post-text").html(htmlFormatMsg(dmData.text).html);
- dmItem.find(".post-info-time").text(timeGmtToText(dmData.time)).attr("title",timeSincePost(dmData.time));
+ dmItem.find('.post-info-time')
+ .attr('title', timeSincePost(dmData.time))
+ .find('span:last')
+ .text(timeGmtToText(dmData.time))
+ ;
return dmItem;
}
@@ -268,7 +276,11 @@ function dmDataToConversationItem(dmData, localUser, remoteUser) {
dmItem.removeAttr('id');
dmItem.addClass(classDm);
getAvatar(from, dmItem.find(".post-photo").find("img") );
- dmItem.find(".post-info-time").text(timeGmtToText(dmData.time)).attr("title",timeSincePost(dmData.time));
+ dmItem.find('.post-info-time')
+ .attr('title', timeSincePost(dmData.time))
+ .find('span:last')
+ .text(timeGmtToText(dmData.time))
+ ;
setPostInfoSent(from,dmData.k,dmItem.find('.post-info-sent'));
dmItem.find('.post-text').html(htmlFormatMsg(dmData.text).html);
diff --git a/theme_calm/css/style.css b/theme_calm/css/style.css
index f08a212..5cc723b 100644
--- a/theme_calm/css/style.css
+++ b/theme_calm/css/style.css
@@ -861,9 +861,7 @@ textarea.splited-post {
.mini-profile .post-submit {
margin-right: 0;
}
-.reply .post-submit {
- margin-right: 35px;
-}
+
.post-submit.disabled {
opacity: .6;
-webkit-transition: all 200ms;
@@ -1453,9 +1451,8 @@ textarea.splited-post {
text-align: right;
height: 25px;
}
-.post-interactions span,
-.post-expand
-{
+
+.post-interactions span, .post-expand, .prompt-wrapper .switch-mode {
color: #b2b2b2;
cursor: pointer;
font-size: 12px;
@@ -1465,6 +1462,7 @@ textarea.splited-post {
-o-transition: all 200ms;
transition: all 200ms;
}
+
.post-expand
{
position: absolute;
@@ -2094,12 +2092,14 @@ textarea.splited-post {
}
.prompt-wrapper .modal-buttons {
- padding: 10px;
+ margin: 4px 16px;
text-align: right;
}
-.prompt-wrapper .modal-buttons button:last-child {
- padding: 5px 20px;
+.prompt-wrapper .switch-mode {
+ display: inline-block;
+ float: left;
+ margin: 4px;
}
/*************************************
@@ -2115,10 +2115,6 @@ textarea.splited-post {
text-align: center;
}
-.following-config-modal .modal-buttons {
- display: none;
-}
-
.following-config-method-buttons {
padding: 10px;
}
@@ -2137,13 +2133,13 @@ textarea.splited-post {
}
.reTwist .post {
- margin: 5px;
- padding: 5px;
+ margin: 8px;
+ padding: 4px;
min-height: 68px;
}
.reTwist .post-area-extras {
- margin-right: 10px;
+ margin: 4px 16px;
}
/*************************************
@@ -2154,10 +2150,6 @@ textarea.splited-post {
margin-top: -140px;
}
-.reply .modal-buttons {
- display: none;
-}
-
.reply .post-expand,
.reply .post-interactions {
display: none;
@@ -2173,12 +2165,12 @@ textarea.splited-post {
}
.reply .post-area-extras {
- margin-right: 10px;
+ margin: 4px 16px;
}
.reply .post {
- margin: 10px;
- padding: 5px;
+ margin: 8px;
+ padding: 4px;
min-height: 68px;
}
@@ -2518,11 +2510,6 @@ p.post-text img {
height: 20px;
}
-.reply textarea{
- margin-top: 20px;
-}
-
-
.post-rt-reference {
background-color: #FAFAFA;
border: 1px solid #ccc;
diff --git a/theme_nin/css/style.css b/theme_nin/css/style.css
index 1edc3a3..45e5478 100644
--- a/theme_nin/css/style.css
+++ b/theme_nin/css/style.css
@@ -925,7 +925,7 @@ article, aside, details, figcaption, figure, footer, header, hgroup, main, menu,
line-height: 12px;
}
/* line 171, ../sass/_postboard.sass */
-.post-interactions span {
+.post-interactions span, .prompt-wrapper .switch-mode {
color: #b3b5b7;
cursor: pointer;
font-size: 12px;
@@ -2747,12 +2747,14 @@ ol.toptrends-list a:hover {
}
.prompt-wrapper .modal-buttons {
- padding: 10px;
+ margin: 4px 0;
text-align: right;
}
-.prompt-wrapper .modal-buttons button:last-child {
- padding: 5px 20px;
+.prompt-wrapper .switch-mode {
+ display: inline-block;
+ float: left;
+ margin: 4px;
}
/****** FOLLOWING-CONFIG PROMPT ******/
@@ -2766,10 +2768,6 @@ ol.toptrends-list a:hover {
text-align: center;
}
-.following-config-modal .modal-buttons {
- display: none;
-}
-
.following-config-modal h2 {
text-transform: none;
}
@@ -2810,7 +2808,7 @@ ol.toptrends-list a:hover {
margin-top: -110px;
}
/* line 719, ../sass/style.sass */
-.reply .modal-buttons, .reply .post-expand, .reply .post-interactions {
+.reply .post-expand, .reply .post-interactions {
display: none;
}
/* line 721, ../sass/style.sass */
diff --git a/theme_nin/sass/_postboard.sass b/theme_nin/sass/_postboard.sass
index ddb9dc7..761c8d8 100755
--- a/theme_nin/sass/_postboard.sass
+++ b/theme_nin/sass/_postboard.sass
@@ -171,7 +171,7 @@
text-align: right
height: 12px
line-height: 12px
- span
+ span, .prompt-wrapper .switch-mode
color: lighten($dark-grey,30%)
cursor: pointer
font-size: 12px
diff --git a/theme_nin/sass/style.sass b/theme_nin/sass/style.sass
index cad9732..5c97f8c 100755
--- a/theme_nin/sass/style.sass
+++ b/theme_nin/sass/style.sass
@@ -753,10 +753,12 @@ ol.toptrends-list
margin-left: -300px
box-shadow: 0 0 30px rgba( 0, 0, 0, .6 )
.modal-buttons
- padding: 10px
+ margin: 4px 0
text-align: right
- button:last-child
- padding: 5px 20px;
+ .switch-mode
+ display: inline-block
+ float: left
+ margin: 4px
/************ FOLLOWING-CONFIG MODAL **********/
@@ -765,8 +767,6 @@ ol.toptrends-list
.modal-content
padding: 10px
text-align: center
- .modal-buttons
- display: none
h2
text-transform: none
.following-config-method-buttons
@@ -793,7 +793,7 @@ ol.toptrends-list
.prompt-wrapper.reply
&.prompt-wrapper
margin-top: -110px
- .modal-buttons, .post-expand, .post-interactions
+ .post-expand, .post-interactions
display: none
.post-area
padding-bottom: 6px
diff --git a/tmobile.html b/tmobile.html
index 45f9e7f..24e3058 100644
--- a/tmobile.html
+++ b/tmobile.html
@@ -76,6 +76,12 @@
.content {padding:15px 20px 20px 20px;}
.footer {position:fixed;z-index:10;bottom:0;width:100%}
+.post-info-time {
+ font-weight: lighter;
+ font-size: 12px;
+ color: #555 !important;
+}
+
.post-rt-reference {
background-color: #FAFAFA;
border: 1px solid #ccc;
@@ -110,8 +116,6 @@
.post-rt-reference .post-info-time {
font-size: 9px;
- font-weight: lighter;
- color: #000 !important;
float: right;
}
@@ -744,7 +748,7 @@
-
+
@@ -763,7 +767,7 @@
-
+
@@ -796,8 +800,7 @@
@@ -828,7 +831,7 @@