Commit 4aebcbf8235659a96a50468249d7d4213f6032f4
1 parent
a5e0b197
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
comment_paragraph: improve layout and usability
Showing
3 changed files
with
136 additions
and
91 deletions
Show diff stats
plugins/comment_paragraph/public/comment_paragraph_macro.js
| @@ -29,7 +29,7 @@ jQuery(document).ready(function($) { | @@ -29,7 +29,7 @@ jQuery(document).ready(function($) { | ||
| 29 | // on press ESC key... | 29 | // on press ESC key... |
| 30 | if (e.which == 27) { | 30 | if (e.which == 27) { |
| 31 | // closing side comment box | 31 | // closing side comment box |
| 32 | - $("div.side-comment").hide(); | 32 | + hideCommentBox(); |
| 33 | } | 33 | } |
| 34 | }); | 34 | }); |
| 35 | 35 | ||
| @@ -51,9 +51,16 @@ jQuery(document).ready(function($) { | @@ -51,9 +51,16 @@ jQuery(document).ready(function($) { | ||
| 51 | 51 | ||
| 52 | $('#cancel-comment').die(); | 52 | $('#cancel-comment').die(); |
| 53 | $(document.body).on("click", '#cancel-comment', function(){ | 53 | $(document.body).on("click", '#cancel-comment', function(){ |
| 54 | - $("div.side-comment").hide(); | 54 | + hideCommentBox(); |
| 55 | + return false; | ||
| 55 | }); | 56 | }); |
| 56 | 57 | ||
| 58 | + function hideCommentBox() { | ||
| 59 | + $("div.side-comment").hide(); | ||
| 60 | + $('.article-body').removeClass('comment-paragraph-slide-left'); | ||
| 61 | + $('.comments').removeClass('selected'); | ||
| 62 | + } | ||
| 63 | + | ||
| 57 | function showBox(div){ | 64 | function showBox(div){ |
| 58 | if(div.hasClass('closed')) { | 65 | if(div.hasClass('closed')) { |
| 59 | div.removeClass('closed'); | 66 | div.removeClass('closed'); |
| @@ -65,31 +72,19 @@ jQuery(document).ready(function($) { | @@ -65,31 +72,19 @@ jQuery(document).ready(function($) { | ||
| 65 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); | 72 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); |
| 66 | //Add marked text bubble | 73 | //Add marked text bubble |
| 67 | $("body").append('\ | 74 | $("body").append('\ |
| 68 | - <a id="comment-bubble" style="width:90px;text-decoration: none">\ | 75 | + <a id="comment-bubble">\ |
| 69 | <div align="center" class="triangle-right" >Comentar</div>\ | 76 | <div align="center" class="triangle-right" >Comentar</div>\ |
| 70 | </a>'); | 77 | </a>'); |
| 71 | 78 | ||
| 72 | - function resizeArticle(paragraphId){ | ||
| 73 | - var commentHeigh = $('#side_comment_' + paragraphId).height(); | ||
| 74 | - if(commentHeigh > 0){ | ||
| 75 | - $('.article-body').height(originalArticleHeight + commentHeigh + 50); | ||
| 76 | - }else{ | ||
| 77 | - $('.article-body').height(originalArticleHeight); | ||
| 78 | - } | ||
| 79 | - } | ||
| 80 | - | ||
| 81 | $('.side-comments-counter').click(function(){ | 79 | $('.side-comments-counter').click(function(){ |
| 82 | var paragraphId = $(this).data('paragraph'); | 80 | var paragraphId = $(this).data('paragraph'); |
| 83 | hideAllCommentsExcept(paragraphId); | 81 | hideAllCommentsExcept(paragraphId); |
| 84 | hideAllSelectedAreasExcept(paragraphId); | 82 | hideAllSelectedAreasExcept(paragraphId); |
| 85 | - if($('.comment-paragraph-slide-left').size()==0){ | ||
| 86 | - $('.article-body').addClass('comment-paragraph-slide-left'); | ||
| 87 | - $('#side_comment_' + paragraphId).show(); | ||
| 88 | - }else{ | ||
| 89 | - $('.article-body').removeClass('comment-paragraph-slide-left'); | ||
| 90 | - $('.side-comment').hide(); | ||
| 91 | - } | ||
| 92 | - $('#comment-bubble').hide(); | 83 | + hideCommentBox(); |
| 84 | + $(this).closest('.comments').addClass('selected'); | ||
| 85 | + $('.article-body').addClass('comment-paragraph-slide-left'); | ||
| 86 | + $('#side_comment_' + paragraphId).show(); | ||
| 87 | + $('#comment-bubble').removeClass('visible'); | ||
| 93 | //Loads the comments | 88 | //Loads the comments |
| 94 | var url = $('#link_to_ajax_comments_' + paragraphId).data('url'); | 89 | var url = $('#link_to_ajax_comments_' + paragraphId).data('url'); |
| 95 | $.ajax({ | 90 | $.ajax({ |
| @@ -98,7 +93,6 @@ jQuery(document).ready(function($) { | @@ -98,7 +93,6 @@ jQuery(document).ready(function($) { | ||
| 98 | }).done(function() { | 93 | }).done(function() { |
| 99 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); | 94 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
| 100 | button.click(); | 95 | button.click(); |
| 101 | - resizeArticle(paragraphId); | ||
| 102 | }); | 96 | }); |
| 103 | }); | 97 | }); |
| 104 | 98 | ||
| @@ -108,7 +102,6 @@ jQuery(document).ready(function($) { | @@ -108,7 +102,6 @@ jQuery(document).ready(function($) { | ||
| 108 | if($('.comment-paragraph-slide-left').size()==0){ | 102 | if($('.comment-paragraph-slide-left').size()==0){ |
| 109 | $('.article-body').addClass('comment-paragraph-slide-left'); | 103 | $('.article-body').addClass('comment-paragraph-slide-left'); |
| 110 | } | 104 | } |
| 111 | - $("#comment-bubble").css({top: 0, left: 0, position:'absolute'}); | ||
| 112 | var url = $("#comment-bubble").data('url'); | 105 | var url = $("#comment-bubble").data('url'); |
| 113 | var paragraphId = $("#comment-bubble").data("paragraphId"); | 106 | var paragraphId = $("#comment-bubble").data("paragraphId"); |
| 114 | hideAllCommentsExcept(paragraphId); | 107 | hideAllCommentsExcept(paragraphId); |
| @@ -119,7 +112,6 @@ jQuery(document).ready(function($) { | @@ -119,7 +112,6 @@ jQuery(document).ready(function($) { | ||
| 119 | }).done(function() { | 112 | }).done(function() { |
| 120 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); | 113 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
| 121 | button.click(); | 114 | button.click(); |
| 122 | - resizeArticle(paragraphId); | ||
| 123 | }); | 115 | }); |
| 124 | }); | 116 | }); |
| 125 | 117 | ||
| @@ -142,8 +134,6 @@ jQuery(document).ready(function($) { | @@ -142,8 +134,6 @@ jQuery(document).ready(function($) { | ||
| 142 | }); | 134 | }); |
| 143 | } | 135 | } |
| 144 | 136 | ||
| 145 | - $("#comment-bubble").hide(); | ||
| 146 | - | ||
| 147 | function getSelectionText() { | 137 | function getSelectionText() { |
| 148 | var text = ""; | 138 | var text = ""; |
| 149 | if (window.getSelection) { | 139 | if (window.getSelection) { |
| @@ -157,19 +147,15 @@ jQuery(document).ready(function($) { | @@ -157,19 +147,15 @@ jQuery(document).ready(function($) { | ||
| 157 | function setCommentBubblePosition(posX, posY) { | 147 | function setCommentBubblePosition(posX, posY) { |
| 158 | $("#comment-bubble").css({ | 148 | $("#comment-bubble").css({ |
| 159 | top: (posY - 80), | 149 | top: (posY - 80), |
| 160 | - left: (posX - 70), | ||
| 161 | - position:'absolute' | 150 | + left: (posX - 70) |
| 162 | }); | 151 | }); |
| 163 | } | 152 | } |
| 164 | 153 | ||
| 165 | //highlight area from the paragraph | 154 | //highlight area from the paragraph |
| 166 | $('.comment_paragraph').mouseup(function(event) { | 155 | $('.comment_paragraph').mouseup(function(event) { |
| 167 | 156 | ||
| 168 | - $('#comment-bubble').hide(); | ||
| 169 | if($('.comment-paragraph-slide-left').size() > 0){ | 157 | if($('.comment-paragraph-slide-left').size() > 0){ |
| 170 | - $('.article-body').removeClass('comment-paragraph-slide-left'); | ||
| 171 | - $('.side-comment').hide(); | ||
| 172 | - //$('.side-comment').find().hide(); | 158 | + hideCommentBox(); |
| 173 | } | 159 | } |
| 174 | 160 | ||
| 175 | //Don't do anything if there is no selected text | 161 | //Don't do anything if there is no selected text |
| @@ -185,7 +171,7 @@ jQuery(document).ready(function($) { | @@ -185,7 +171,7 @@ jQuery(document).ready(function($) { | ||
| 185 | var url = $('#link_to_ajax_comments_' + paragraphId).data('url'); | 171 | var url = $('#link_to_ajax_comments_' + paragraphId).data('url'); |
| 186 | $("#comment-bubble").data("url", url); | 172 | $("#comment-bubble").data("url", url); |
| 187 | $("#comment-bubble").data("paragraphId", paragraphId); | 173 | $("#comment-bubble").data("paragraphId", paragraphId); |
| 188 | - $("#comment-bubble").show(); | 174 | + $("#comment-bubble").addClass('visible'); |
| 189 | 175 | ||
| 190 | var rootElement = $(this).get(0); | 176 | var rootElement = $(this).get(0); |
| 191 | 177 |
plugins/comment_paragraph/public/style.css
| 1 | +#comment-bubble.visible { | ||
| 2 | + visibility: visible; | ||
| 3 | +} | ||
| 4 | +#comment-bubble { | ||
| 5 | + transition: top 0.15s ease-in-out; | ||
| 6 | + top: 0; | ||
| 7 | + left: 0; | ||
| 8 | + position: absolute; | ||
| 9 | + width: 90px; | ||
| 10 | + text-decoration: none; | ||
| 11 | + visibility: hidden; | ||
| 12 | +} | ||
| 13 | + | ||
| 1 | div.article-comments-list-more{ | 14 | div.article-comments-list-more{ |
| 2 | width: 100%; | 15 | width: 100%; |
| 3 | - height: 30px; | ||
| 4 | text-align: center; | 16 | text-align: center; |
| 5 | font-size: 20px; | 17 | font-size: 20px; |
| 6 | margin-bottom: 5px; | 18 | margin-bottom: 5px; |
| 7 | } | 19 | } |
| 8 | 20 | ||
| 9 | .popBox_comment_paragraph { | 21 | .popBox_comment_paragraph { |
| 10 | -/* position: absolute;*/ | ||
| 11 | z-index: 2; | 22 | z-index: 2; |
| 12 | background: #cccccc; | 23 | background: #cccccc; |
| 13 | width: 60px; | 24 | width: 60px; |
| @@ -33,9 +44,8 @@ div.article-comments-list-more{ | @@ -33,9 +44,8 @@ div.article-comments-list-more{ | ||
| 33 | } | 44 | } |
| 34 | 45 | ||
| 35 | .comment_paragraph{ | 46 | .comment_paragraph{ |
| 36 | - padding: 0px; | ||
| 37 | - font-weight: bold; | ||
| 38 | - text-align: justify; | 47 | + display: table-cell; |
| 48 | + width: 97%; | ||
| 39 | } | 49 | } |
| 40 | 50 | ||
| 41 | .triangle-right { | 51 | .triangle-right { |
| @@ -45,13 +55,14 @@ div.article-comments-list-more{ | @@ -45,13 +55,14 @@ div.article-comments-list-more{ | ||
| 45 | color:#fff; | 55 | color:#fff; |
| 46 | background:#075698; /* default background for browsers without gradient support */ | 56 | background:#075698; /* default background for browsers without gradient support */ |
| 47 | /* css3 */ | 57 | /* css3 */ |
| 48 | - background:-webkit-gradient(linear, 0 0, 0 100%, from(#2e88c4), to(#075698)); | ||
| 49 | - background:-moz-linear-gradient(#2e88c4, #075698); | ||
| 50 | - background:-o-linear-gradient(#2e88c4, #075698); | ||
| 51 | - background:linear-gradient(#2e88c4, #075698); | 58 | + background:-webkit-gradient(linear, 0 0, 0 100%, from(#ababab), to(#424242)); |
| 59 | + background:-moz-linear-gradient(#ABABAB, #424242); | ||
| 60 | + background:-o-linear-gradient(#ABABAB, #424242); | ||
| 61 | + background: linear-gradient(#ABABAB, #424242); | ||
| 52 | -webkit-border-radius:10px; | 62 | -webkit-border-radius:10px; |
| 53 | -moz-border-radius:10px; | 63 | -moz-border-radius:10px; |
| 54 | border-radius:10px; | 64 | border-radius:10px; |
| 65 | + font-weight: bold; | ||
| 55 | } | 66 | } |
| 56 | 67 | ||
| 57 | .triangle-right:after { | 68 | .triangle-right:after { |
| @@ -61,7 +72,7 @@ div.article-comments-list-more{ | @@ -61,7 +72,7 @@ div.article-comments-list-more{ | ||
| 61 | left: 50px; | 72 | left: 50px; |
| 62 | border-width: 20px 0 0 20px; | 73 | border-width: 20px 0 0 20px; |
| 63 | border-style: solid; | 74 | border-style: solid; |
| 64 | - border-color: #075698 transparent; | 75 | + border-color: #424242 transparent; |
| 65 | display: block; | 76 | display: block; |
| 66 | width: 0; | 77 | width: 0; |
| 67 | } | 78 | } |
| @@ -83,6 +94,8 @@ div.article-comments-list-more{ | @@ -83,6 +94,8 @@ div.article-comments-list-more{ | ||
| 83 | width: 150px; | 94 | width: 150px; |
| 84 | right: 0; | 95 | right: 0; |
| 85 | top: 0; | 96 | top: 0; |
| 97 | + zoom: 0.8; | ||
| 98 | + -moz-transform: scale(0.8); | ||
| 86 | } | 99 | } |
| 87 | 100 | ||
| 88 | .side-comment .comment-created-at{display: none;} | 101 | .side-comment .comment-created-at{display: none;} |
| @@ -93,10 +106,10 @@ div.article-comments-list-more{ | @@ -93,10 +106,10 @@ div.article-comments-list-more{ | ||
| 93 | div[class^='comments_list_toggle_paragraph_'] { | 106 | div[class^='comments_list_toggle_paragraph_'] { |
| 94 | border-style: solid; | 107 | border-style: solid; |
| 95 | border-width: 1px; | 108 | border-width: 1px; |
| 96 | - border-color: #ccc; | 109 | + border-color: #e7e7e7; |
| 97 | padding: 5px; | 110 | padding: 5px; |
| 98 | background-color: whitesmoke; | 111 | background-color: whitesmoke; |
| 99 | - width: 300px; | 112 | + width: 280px; |
| 100 | } | 113 | } |
| 101 | 114 | ||
| 102 | div[class^='comment-paragraph-loading-'] { | 115 | div[class^='comment-paragraph-loading-'] { |
| @@ -109,6 +122,13 @@ div[class^='comment-paragraph-loading-'] { | @@ -109,6 +122,13 @@ div[class^='comment-paragraph-loading-'] { | ||
| 109 | 122 | ||
| 110 | .side-comment{ | 123 | .side-comment{ |
| 111 | z-index: 199; | 124 | z-index: 199; |
| 125 | + box-shadow: 0px 0px 20px #b8b8b8; | ||
| 126 | +} | ||
| 127 | + | ||
| 128 | +.side-comments-counter-container { | ||
| 129 | + display: table-cell; | ||
| 130 | + vertical-align: middle; | ||
| 131 | + padding-left: 10px; | ||
| 112 | } | 132 | } |
| 113 | 133 | ||
| 114 | .side-comments-counter { | 134 | .side-comments-counter { |
| @@ -116,26 +136,43 @@ div[class^='comment-paragraph-loading-'] { | @@ -116,26 +136,43 @@ div[class^='comment-paragraph-loading-'] { | ||
| 116 | width: 20px; | 136 | width: 20px; |
| 117 | height: 19px; | 137 | height: 19px; |
| 118 | padding: 0px; | 138 | padding: 0px; |
| 119 | - background: #b3b2d4; | ||
| 120 | - -webkit-border-radius: 5px; | ||
| 121 | - -moz-border-radius: 5px; | ||
| 122 | - border-radius: 5px; | 139 | + background: #b5b5b5; |
| 140 | + -webkit-border-radius: 2px; | ||
| 141 | + -moz-border-radius: 2px; | ||
| 142 | + border-radius: 2px; | ||
| 123 | cursor: pointer; | 143 | cursor: pointer; |
| 124 | z-index: 1; | 144 | z-index: 1; |
| 145 | + display: inline-block; | ||
| 146 | + font-weight: bold; | ||
| 147 | + color: white; | ||
| 148 | + text-align: center; | ||
| 149 | + opacity: 0.7; | ||
| 125 | } | 150 | } |
| 126 | 151 | ||
| 127 | -.side-comments-counter:hover{ | ||
| 128 | - color: white; | 152 | +.comment-paragraph-plugin .loading { |
| 153 | + height: 40px; | ||
| 154 | + background-position: center 0; | ||
| 155 | +} | ||
| 156 | + | ||
| 157 | +.side-comments-counter:hover { | ||
| 158 | + background-color: rgb(117, 192, 117); | ||
| 159 | +} | ||
| 160 | +.side-comments-counter:hover:after { | ||
| 161 | + border-color: rgb(117, 192, 117) transparent; | ||
| 162 | +} | ||
| 163 | + | ||
| 164 | +.comments.selected .side-comments-counter, .comments.selected .side-comments-counter:after { | ||
| 165 | + opacity: 1; | ||
| 129 | } | 166 | } |
| 130 | 167 | ||
| 131 | .side-comments-counter:after { | 168 | .side-comments-counter:after { |
| 132 | content: ""; | 169 | content: ""; |
| 133 | position: absolute; | 170 | position: absolute; |
| 134 | bottom: -9px; | 171 | bottom: -9px; |
| 135 | - left: 8px; | 172 | + left: 5px; |
| 136 | border-style: solid; | 173 | border-style: solid; |
| 137 | - border-width: 12px 5px 0; | ||
| 138 | - border-color: #b3b2d4 transparent; | 174 | + border-width: 10px 5px 0; |
| 175 | + border-color: #bdbdbd transparent; | ||
| 139 | display: block; | 176 | display: block; |
| 140 | width: 0; | 177 | width: 0; |
| 141 | } | 178 | } |
| @@ -145,7 +182,7 @@ div[class^='comment-paragraph-loading-'] { | @@ -145,7 +182,7 @@ div[class^='comment-paragraph-loading-'] { | ||
| 145 | top: 3px; | 182 | top: 3px; |
| 146 | } | 183 | } |
| 147 | 184 | ||
| 148 | -.article-comment-inner {border-bottom: 1px solid #ddd;} | 185 | +.article-comment-inner {border-bottom: 1px solid #ececec;} |
| 149 | 186 | ||
| 150 | #article .side-comment .comment-replies .article-comment{background: white; border: 0px; border-top: 1px solid #ddd;} | 187 | #article .side-comment .comment-replies .article-comment{background: white; border: 0px; border-top: 1px solid #ddd;} |
| 151 | 188 | ||
| @@ -157,6 +194,10 @@ div[class^='comment-paragraph-loading-'] { | @@ -157,6 +194,10 @@ div[class^='comment-paragraph-loading-'] { | ||
| 157 | 194 | ||
| 158 | #article .side-comment .article-comments-list { | 195 | #article .side-comment .article-comments-list { |
| 159 | margin: 0; | 196 | margin: 0; |
| 197 | + overflow-y: auto; | ||
| 198 | + overflow-x: hidden; | ||
| 199 | + max-height: 400px; | ||
| 200 | + border-bottom: 1px solid rgb(240, 240, 240); | ||
| 160 | } | 201 | } |
| 161 | #article .side-comment .article-comments-list .article-comment { | 202 | #article .side-comment .article-comments-list .article-comment { |
| 162 | margin: 0; | 203 | margin: 0; |
| @@ -170,6 +211,7 @@ div[class^='comment-paragraph-loading-'] { | @@ -170,6 +211,7 @@ div[class^='comment-paragraph-loading-'] { | ||
| 170 | width: 98%; | 211 | width: 98%; |
| 171 | text-align: justify; | 212 | text-align: justify; |
| 172 | overflow: visible; | 213 | overflow: visible; |
| 214 | + color: rgb(107, 107, 107); | ||
| 173 | } | 215 | } |
| 174 | .side-comment .comment-text p { | 216 | .side-comment .comment-text p { |
| 175 | margin: 0; | 217 | margin: 0; |
| @@ -183,6 +225,8 @@ div[class^='comment-paragraph-loading-'] { | @@ -183,6 +225,8 @@ div[class^='comment-paragraph-loading-'] { | ||
| 183 | left: 36px; | 225 | left: 36px; |
| 184 | line-height: 0; | 226 | line-height: 0; |
| 185 | font-weight: bold; | 227 | font-weight: bold; |
| 228 | + font-size: 12px; | ||
| 229 | + color: rgb(80, 80, 80); | ||
| 186 | } | 230 | } |
| 187 | .side-comment .comment-wrapper-1 { | 231 | .side-comment .comment-wrapper-1 { |
| 188 | margin-left: 36px; | 232 | margin-left: 36px; |
| @@ -193,6 +237,8 @@ div[class^='comment-paragraph-loading-'] { | @@ -193,6 +237,8 @@ div[class^='comment-paragraph-loading-'] { | ||
| 193 | #article .side-comment .comment-picture { | 237 | #article .side-comment .comment-picture { |
| 194 | width: 100%; | 238 | width: 100%; |
| 195 | height: auto; | 239 | height: auto; |
| 240 | + margin-top: 8px; | ||
| 241 | + max-width: none; | ||
| 196 | } | 242 | } |
| 197 | #article .side-comment .article-comment .comment-details > h4 { | 243 | #article .side-comment .article-comment .comment-details > h4 { |
| 198 | display: none; | 244 | display: none; |
| @@ -215,21 +261,9 @@ div[class^='comment-paragraph-loading-'] { | @@ -215,21 +261,9 @@ div[class^='comment-paragraph-loading-'] { | ||
| 215 | bg-color: #b3b2d4; | 261 | bg-color: #b3b2d4; |
| 216 | } | 262 | } |
| 217 | 263 | ||
| 218 | -/* | ||
| 219 | -.comment-paragraph-rowset{ | ||
| 220 | - padding: 0; | ||
| 221 | - margin: 0; | ||
| 222 | - list-style: none; | ||
| 223 | - | ||
| 224 | - display: -webkit-box; | ||
| 225 | - display: -moz-box; | ||
| 226 | - display: -ms-flexbox; | ||
| 227 | - display: -webkit-flex; | ||
| 228 | - display: flex; | ||
| 229 | - | ||
| 230 | - -webkit-flex-flow: row wrap; | ||
| 231 | - justify-content: space-around; | ||
| 232 | -}*/ | 264 | +.side-comment textarea { |
| 265 | + height: 50px; | ||
| 266 | +} | ||
| 233 | 267 | ||
| 234 | .comment-paragraph-comments{ | 268 | .comment-paragraph-comments{ |
| 235 | background: lightblue; | 269 | background: lightblue; |
| @@ -246,14 +280,43 @@ div[class^='comment-paragraph-loading-'] { | @@ -246,14 +280,43 @@ div[class^='comment-paragraph-loading-'] { | ||
| 246 | border-width: 2px; | 280 | border-width: 2px; |
| 247 | } | 281 | } |
| 248 | 282 | ||
| 283 | +.comment-paragraph-slide-left .comments { | ||
| 284 | + position: relative; | ||
| 285 | + display: table; | ||
| 286 | +} | ||
| 287 | + | ||
| 288 | +.comments .comment_paragraph:hover, .comments.selected .comment_paragraph { | ||
| 289 | + background-color: rgb(236, 236, 236); | ||
| 290 | +} | ||
| 291 | + | ||
| 249 | .comment-paragraph-group-comments{ | 292 | .comment-paragraph-group-comments{ |
| 250 | position: absolute; | 293 | position: absolute; |
| 294 | + right: -296px; | ||
| 295 | + top: 0px; | ||
| 251 | background-color: white; | 296 | background-color: white; |
| 252 | - z-index: 9999; | 297 | + z-index: 199; |
| 253 | } | 298 | } |
| 254 | 299 | ||
| 255 | -.comment-paragraph-slide-left{ | 300 | +.article-body.comment-paragraph-slide-left { |
| 256 | position: relative; | 301 | position: relative; |
| 257 | width: 80%; | 302 | width: 80%; |
| 258 | - transition: 0.6s; | 303 | +} |
| 304 | +.article-body { | ||
| 305 | + width: 100%; | ||
| 306 | + transition: width 0.3s ease-in-out; | ||
| 307 | +} | ||
| 308 | + | ||
| 309 | +.comment-paragraph-plugin .post_comment_box { | ||
| 310 | + text-align: center; | ||
| 311 | + padding: 5px 5px 0 5px; | ||
| 312 | +} | ||
| 313 | +.comment-paragraph-plugin .comment-details .menu-submenu { | ||
| 314 | + right: 21px; | ||
| 315 | + top: -1px; | ||
| 316 | +} | ||
| 317 | + | ||
| 318 | +.comment-paragraph-plugin .comment_reply.post_comment_box form { | ||
| 319 | + padding-left: 0; | ||
| 320 | + padding-right: 10px; | ||
| 321 | + margin-left: -36px; | ||
| 259 | } | 322 | } |
plugins/comment_paragraph/views/comment_paragraph_plugin_profile/_comment_paragraph.html.erb
| 1 | -<table class="comments"> | ||
| 2 | - <tr> | ||
| 3 | - <td> | ||
| 4 | - <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_uuid %>" data-paragraph="<%= paragraph_uuid %>"> | ||
| 5 | - <%= inner_html %> | ||
| 6 | - </div> | ||
| 7 | - </td> | ||
| 8 | - <td> | ||
| 9 | - <div align="center" class="side-comments-counter" id="side_comments_counter_<%= paragraph_uuid %>" data-paragraph="<%= paragraph_uuid %>" style="vertical-align: middle; padding-left: 3px; padding-right: 5px;"> | ||
| 10 | - <span id="comment-count-<%= paragraph_uuid %>" class='comment-count'> | ||
| 11 | - <%= count %> | ||
| 12 | - </span> | ||
| 13 | - </div> | ||
| 14 | - </td> | ||
| 15 | - <td> | 1 | +<div class="comment-paragraph-plugin comments"> |
| 2 | + <div class="comment_paragraph" id="comment_paragraph_<%= paragraph_uuid %>" data-paragraph="<%= paragraph_uuid %>"> | ||
| 3 | + <%= inner_html %> | ||
| 4 | + </div> | ||
| 5 | + <div class="side-comments-counter-container"> | ||
| 6 | + <div class="side-comments-counter" id="side_comments_counter_<%= paragraph_uuid %>" data-paragraph="<%= paragraph_uuid %>"> | ||
| 7 | + <span id="comment-count-<%= paragraph_uuid %>" class='comment-count'> | ||
| 8 | + <%= count %> | ||
| 9 | + </span> | ||
| 10 | + </div> | ||
| 11 | + </div> | ||
| 16 | <div class="comment-paragraph-group-comments"> | 12 | <div class="comment-paragraph-group-comments"> |
| 17 | <%= | 13 | <%= |
| 18 | url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_uuid => paragraph_uuid, :article_id => article_id} | 14 | url = { :profile => profile_identifier, :controller => 'comment_paragraph_plugin_profile', :action => 'view_comments', :paragraph_uuid => paragraph_uuid, :article_id => article_id} |
| @@ -33,7 +29,9 @@ | @@ -33,7 +29,9 @@ | ||
| 33 | <div class="side-comment" id="side_comment_<%= paragraph_uuid %>" data-paragraph="<%= paragraph_uuid %>" style="display:none"> | 29 | <div class="side-comment" id="side_comment_<%= paragraph_uuid %>" data-paragraph="<%= paragraph_uuid %>" style="display:none"> |
| 34 | <div class="comment-paragraph-loading-<%= paragraph_uuid %>"> | 30 | <div class="comment-paragraph-loading-<%= paragraph_uuid %>"> |
| 35 | <div class="comments_list_toggle_paragraph_<%= paragraph_uuid %>" > | 31 | <div class="comments_list_toggle_paragraph_<%= paragraph_uuid %>" > |
| 36 | - <div class="article-comments-list" id="comments_list_paragraph_<%= paragraph_uuid %>"></div> | 32 | + <div class="article-comments-list" id="comments_list_paragraph_<%= paragraph_uuid %>"> |
| 33 | + <div class="loading"></div> | ||
| 34 | + </div> | ||
| 37 | <div class ="article-comments-list-more" id="comments_list_paragraph_<%= paragraph_uuid %>_more"></div> | 35 | <div class ="article-comments-list-more" id="comments_list_paragraph_<%= paragraph_uuid %>_more"></div> |
| 38 | <div id="page-comment-form-<%= paragraph_uuid %>" class='post_comment_box closed'> | 36 | <div id="page-comment-form-<%= paragraph_uuid %>" class='post_comment_box closed'> |
| 39 | <%= render :partial => 'comment/comment_form', :locals => {:comment => Comment.new, :display_link => true, :cancel_triggers_hide => true, :paragraph_uuid => paragraph_uuid}%> | 37 | <%= render :partial => 'comment/comment_form', :locals => {:comment => Comment.new, :display_link => true, :cancel_triggers_hide => true, :paragraph_uuid => paragraph_uuid}%> |
| @@ -42,9 +40,7 @@ | @@ -42,9 +40,7 @@ | ||
| 42 | </div> | 40 | </div> |
| 43 | </div> | 41 | </div> |
| 44 | </div> | 42 | </div> |
| 45 | - </td> | ||
| 46 | - </tr> | ||
| 47 | -</table> | 43 | +</div> |
| 48 | 44 | ||
| 49 | 45 | ||
| 50 | 46 |