Commit 33740ba038bff3c8d4f25c28e468388cc1a6636d
1 parent
975ebfff
Exists in
master
Removed debug information
Showing
2 changed files
with
5 additions
and
8 deletions
Show diff stats
public/comment_paragraph.js
... | ... | @@ -12,7 +12,6 @@ function makeCommentable() { |
12 | 12 | jQuery('#article_body_ifr').contents().find('body').children().each(function( index ) { |
13 | 13 | //Check if there are other texts not selected |
14 | 14 | var element=jQuery(this).prop('outerHTML'); |
15 | - console.log(element); | |
16 | 15 | if(element.startsWith('<div')){ |
17 | 16 | selectedTextCount++; |
18 | 17 | }else{ | ... | ... |
public/comment_paragraph_macro.js
... | ... | @@ -54,6 +54,7 @@ jQuery(document).ready(function($) { |
54 | 54 | dataType: "script", |
55 | 55 | url: url |
56 | 56 | }).done(function() { |
57 | + $('#fancybox-loading').hide(); | |
57 | 58 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
58 | 59 | button.click(); |
59 | 60 | alignSideComments(paragraphId); |
... | ... | @@ -72,6 +73,7 @@ jQuery(document).ready(function($) { |
72 | 73 | dataType: "script", |
73 | 74 | url: url |
74 | 75 | }).done(function() { |
76 | + $('#fancybox-loading').hide(); | |
75 | 77 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
76 | 78 | button.click(); |
77 | 79 | alignSideComments(paragraphId); |
... | ... | @@ -86,11 +88,6 @@ jQuery(document).ready(function($) { |
86 | 88 | $('.comments_list_toggle_paragraph_' + paragraphId).width('250px'); |
87 | 89 | $('.required-field').removeClass("required-field"); |
88 | 90 | } |
89 | - | |
90 | -// function hideAllComments(){ | |
91 | -// $(".side-comment").hide(); | |
92 | -// $(".side-comment").find().hide(); | |
93 | -// } | |
94 | 91 | |
95 | 92 | function hideAllCommentsExcept(clickedParagraph){ |
96 | 93 | $(".side-comment").each(function(){ |
... | ... | @@ -106,7 +103,6 @@ jQuery(document).ready(function($) { |
106 | 103 | $(".comment_paragraph").each(function(){ |
107 | 104 | paragraph = $(this).data('paragraph'); |
108 | 105 | if(paragraph != clickedParagraph){ |
109 | -// $(".commented-area").contents().unwrap(); | |
110 | 106 | $(this).find(".commented-area").contents().unwrap(); |
111 | 107 | } |
112 | 108 | }); |
... | ... | @@ -149,7 +145,9 @@ jQuery(document).ready(function($) { |
149 | 145 | cssApplier.toggleSelection(); |
150 | 146 | }catch(e){ |
151 | 147 | //Translate this mesage |
152 | - display_notice("Região não permitida para seleção"); | |
148 | + deselectAll(); | |
149 | + rangy.init(); | |
150 | + cssApplier = rangy.createCssClassApplier("commented-area", {normalize: false}); | |
153 | 151 | return; |
154 | 152 | } |
155 | 153 | //Register the area the has been selected at input.selected_area | ... | ... |