From 9271c4e5f0c3ed1c769850623bb45fd6f0260ff6 Mon Sep 17 00:00:00 2001 From: Hannes Mannerheim Date: Sat, 27 Feb 2016 03:12:06 +0100 Subject: [PATCH] keep stream-item container for notices in reply and delete popups --- css/qvitter.css | 31 +++++++++---------------------- js/dom-functions.js | 4 ++-- js/qvitter.js | 23 ++++++++++------------- 3 files changed, 21 insertions(+), 37 deletions(-) diff --git a/css/qvitter.css b/css/qvitter.css index 6b61f1d..a274d70 100644 --- a/css/qvitter.css +++ b/css/qvitter.css @@ -2646,21 +2646,6 @@ body.rtl .view-more-container-bottom { direction:rtl; } right:12px; left:auto; } -.modal-container .modal-body .stream-item-header .avatar { - left:10px; - } -.modal-container .modal-footer .stream-item-header .avatar, -.modal-container .modal-footer .stream-item-header .name:before { - left:0px; - } -.modal-container .modal-footer .queet > .context { - margin-bottom: 0; - margin-top: -10px; - padding-left: 59px; - } -.modal-container .modal-footer .queet > .context .with-icn .badge-requeeted { - left: 32px; - } .stream-item-header .name { color: #333333; @@ -4632,6 +4617,7 @@ background:rgba(0,0,0,0.2); border-radius: 6px; box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4), 0 1px 0 rgba(255, 255, 255, 0.5) inset; position: relative; + overflow: hidden; } .modal-close { margin: 0; @@ -4704,18 +4690,19 @@ background:rgba(0,0,0,0.2); content: " "; clear: both; } -.modal-footer .queet { - border-bottom:0 none; +.modal-container[id*="popup-reply-"] .modal-footer { + padding:0; + } +.modal-container[id*="popup-reply-"] .modal-footer {} +.modal-footer .queet, +.modal-footer .stream-item { + border:0 none; cursor:auto; - min-height:53px; } .modal-footer .queet:hover { background-color:#fff; } -.modal-footer .queet-content { - padding:0; - cursor:auto; - } +.modal-footer .queet-content, .modal-footer .queet-text { cursor:auto; } diff --git a/js/dom-functions.js b/js/dom-functions.js index 6e30a0f..f370e7f 100644 --- a/js/dom-functions.js +++ b/js/dom-functions.js @@ -1119,8 +1119,8 @@ function expand_queet(q,doScrolling) { return; } - // don't expand if this is a remote profile popup - if(q.closest('#popup-external-profile, #popup-local-profile').length>0) { + // don't expand if this is a popup + if(q.closest('.modal-container').length>0) { return; } diff --git a/js/qvitter.js b/js/qvitter.js index 95ff545..8ce87a4 100644 --- a/js/qvitter.js +++ b/js/qvitter.js @@ -2282,10 +2282,11 @@ function deleteQueet(arg) { } var this_qid = this_stream_item.attr('data-quitter-id'); - var $queetHtml = $('
').append(this_stream_item.html()); - var $stuffToRemove = $queetHtml.find('.stream-item-footer, .expanded-content, .inline-reply-queetbox, .stream-item.conversation, .view-more-container-top, .view-more-container-bottom'); - $stuffToRemove.remove(); - var queetHtmlWithoutFooterAndConversation = $queetHtml.html(); + + var $queetHtml = $(this_stream_item.outerHTML()); + $queetHtml.children('.stream-item.conversation').remove(); + $queetHtml.find('.context,.stream-item-footer,.inline-reply-queetbox,.expanded-content').remove(); + var queetHtmlWithoutFooterAndConversation = $queetHtml.outerHTML(); popUpAction('popup-delete-' + this_qid, window.sL.deleteConfirmation,queetHtmlWithoutFooterAndConversation,'
'); @@ -2501,14 +2502,10 @@ $('body').on('click','.action-reply-container',function(){ this_stream_item.addClass('replying-to'); // grabbing the queet and view it in the popup, stripped of footer, reply box and other sruff - var $queetHtml = $('
').append(this_stream_item.children('.queet').outerHTML()); - var $queetHtmlFooter = $queetHtml.find('.stream-item-footer'); - $queetHtmlFooter.remove(); - var $queetHtmlQueetBox = $queetHtml.find('.inline-reply-queetbox'); - $queetHtmlQueetBox.remove(); - var $queetHtmlExpandedContent = $queetHtml.find('.expanded-content'); - $queetHtmlExpandedContent.remove(); - var queetHtmlWithoutFooter = $queetHtml.html(); + var $queetHtml = $(this_stream_item.outerHTML()); + $queetHtml.children('.stream-item.conversation').remove(); + $queetHtml.find('.context,.stream-item-footer,.inline-reply-queetbox,.expanded-content').remove(); + var queetHtmlWithoutFooter = $queetHtml.outerHTML(); popUpAction('popup-reply-' + this_stream_item_id, window.sL.replyTo + ' ' + this_stream_item.children('.queet').find('.screen-name').html(),replyFormHtml(this_stream_item,this_stream_item_id),queetHtmlWithoutFooter); $('#popup-reply-' + this_stream_item_id).find('.modal-body').find('.queet-box').trigger('click'); // expand @@ -2805,7 +2802,7 @@ function reloadCurrentStream() { · · · · · · · · · · · · · */ function reloadCurrentStreamAndClearCache() { - + $('#feed-body').empty(); rememberStreamStateInLocalStorage();