Commit a843f4819806010fde7d91652990c41d08050edb
1 parent
4330b59e
Exists in
theme-brasil-digital-from-staging
and in
9 other branches
fixed loading flower at firefox
Showing
1 changed file
with
11 additions
and
11 deletions
Show diff stats
plugins/comment_paragraph/public/comment_paragraph_macro.js
... | ... | @@ -37,8 +37,8 @@ jQuery(document).ready(function($) { |
37 | 37 | cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); |
38 | 38 | //Add marked text bubble |
39 | 39 | $("body").append('\ |
40 | - <a id="comment-bubble" style="width:120px;text-decoration: none">\ | |
41 | - <div align="center" class="triangle-right" >Comentar<br>+</div>\ | |
40 | + <a id="comment-bubble" style="width:90px;text-decoration: none">\ | |
41 | + <div align="center" class="triangle-right" >Comentar</div>\ | |
42 | 42 | </a>'); |
43 | 43 | |
44 | 44 | $('.side-comments-counter').click(function(){ |
... | ... | @@ -54,9 +54,9 @@ jQuery(document).ready(function($) { |
54 | 54 | dataType: "script", |
55 | 55 | url: url |
56 | 56 | }).done(function() { |
57 | - $('#fancybox-loading').hide(); | |
58 | 57 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
59 | 58 | button.click(); |
59 | + $('#fancybox-loading').hide(); | |
60 | 60 | alignSideComments(paragraphId); |
61 | 61 | }); |
62 | 62 | }); |
... | ... | @@ -73,9 +73,9 @@ jQuery(document).ready(function($) { |
73 | 73 | dataType: "script", |
74 | 74 | url: url |
75 | 75 | }).done(function() { |
76 | - $('#fancybox-loading').hide(); | |
77 | 76 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
78 | 77 | button.click(); |
78 | + $('#fancybox-loading').hide(); | |
79 | 79 | alignSideComments(paragraphId); |
80 | 80 | }); |
81 | 81 | }); |
... | ... | @@ -88,14 +88,14 @@ jQuery(document).ready(function($) { |
88 | 88 | $('.comments_list_toggle_paragraph_' + paragraphId).width('250px'); |
89 | 89 | $('.required-field').removeClass("required-field"); |
90 | 90 | } |
91 | - | |
91 | + | |
92 | 92 | function hideAllCommentsExcept(clickedParagraph){ |
93 | 93 | $(".side-comment").each(function(){ |
94 | 94 | paragraph = $(this).data('paragraph'); |
95 | 95 | if(paragraph != clickedParagraph){ |
96 | 96 | $(this).hide(); |
97 | 97 | $(this).find().hide(); |
98 | - } | |
98 | + } | |
99 | 99 | }); |
100 | 100 | } |
101 | 101 | |
... | ... | @@ -128,7 +128,7 @@ jQuery(document).ready(function($) { |
128 | 128 | var currentMousePos = { x: -1, y: -1 }; |
129 | 129 | currentMousePos.x = event.pageX; |
130 | 130 | currentMousePos.y = event.pageY; |
131 | - $("#comment-bubble").css({top: event.pageY-100, left: event.pageX-70, position:'absolute'}); | |
131 | + $("#comment-bubble").css({top: event.pageY-70, left: event.pageX-70, position:'absolute'}); | |
132 | 132 | //Relates a bubble to the mouse up paragraph |
133 | 133 | $("#comment-bubble").data("paragraphId", paragraphId) |
134 | 134 | //Prepare to open the div |
... | ... | @@ -136,7 +136,7 @@ jQuery(document).ready(function($) { |
136 | 136 | $("#comment-bubble").data("url", url) |
137 | 137 | $("#comment-bubble").show(); |
138 | 138 | var rootElement = $(this).get(0); |
139 | - //Stores the lastParagraph of paragraph for some reason | |
139 | + //Stores the HTML content of the lastParagraph | |
140 | 140 | lastParagraph[paragraphId] = rootElement.innerHTML; |
141 | 141 | //Maybe it is needed to handle exceptions here |
142 | 142 | try{ |
... | ... | @@ -147,7 +147,7 @@ jQuery(document).ready(function($) { |
147 | 147 | //Translate this mesage |
148 | 148 | deselectAll(); |
149 | 149 | rangy.init(); |
150 | - cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); | |
150 | + cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); | |
151 | 151 | return; |
152 | 152 | } |
153 | 153 | //Register the area the has been selected at input.selected_area |
... | ... | @@ -169,7 +169,7 @@ jQuery(document).ready(function($) { |
169 | 169 | function deselectAll(){ |
170 | 170 | $(".commented-area").contents().unwrap(); |
171 | 171 | } |
172 | - | |
172 | + | |
173 | 173 | function processAnchor(){ |
174 | 174 | var anchor = window.location.hash; |
175 | 175 | if(anchor.length==0) return; |
... | ... | @@ -211,7 +211,7 @@ jQuery(document).ready(function($) { |
211 | 211 | |
212 | 212 | $(document).on('mouseout', 'li.article-comment', function(){ |
213 | 213 | deselectAll(); |
214 | - var paragraph_id = $(this).find('input.paragraph_id').val(); | |
214 | + var paragraph_id = $(this).find('input.paragraph_id').val(); | |
215 | 215 | var rootElement = $('#comment_paragraph_'+ paragraph_id).get(0); |
216 | 216 | |
217 | 217 | if(lastSelectedArea[paragraph_id] != null && lastSelectedArea[paragraph_id] != 'undefined' ){ | ... | ... |