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,7 +12,6 @@ function makeCommentable() { | ||
12 | jQuery('#article_body_ifr').contents().find('body').children().each(function( index ) { | 12 | jQuery('#article_body_ifr').contents().find('body').children().each(function( index ) { |
13 | //Check if there are other texts not selected | 13 | //Check if there are other texts not selected |
14 | var element=jQuery(this).prop('outerHTML'); | 14 | var element=jQuery(this).prop('outerHTML'); |
15 | - console.log(element); | ||
16 | if(element.startsWith('<div')){ | 15 | if(element.startsWith('<div')){ |
17 | selectedTextCount++; | 16 | selectedTextCount++; |
18 | }else{ | 17 | }else{ |
public/comment_paragraph_macro.js
@@ -54,6 +54,7 @@ jQuery(document).ready(function($) { | @@ -54,6 +54,7 @@ jQuery(document).ready(function($) { | ||
54 | dataType: "script", | 54 | dataType: "script", |
55 | url: url | 55 | url: url |
56 | }).done(function() { | 56 | }).done(function() { |
57 | + $('#fancybox-loading').hide(); | ||
57 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); | 58 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
58 | button.click(); | 59 | button.click(); |
59 | alignSideComments(paragraphId); | 60 | alignSideComments(paragraphId); |
@@ -72,6 +73,7 @@ jQuery(document).ready(function($) { | @@ -72,6 +73,7 @@ jQuery(document).ready(function($) { | ||
72 | dataType: "script", | 73 | dataType: "script", |
73 | url: url | 74 | url: url |
74 | }).done(function() { | 75 | }).done(function() { |
76 | + $('#fancybox-loading').hide(); | ||
75 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); | 77 | var button = $('#page-comment-form-' + paragraphId + ' a').get(0); |
76 | button.click(); | 78 | button.click(); |
77 | alignSideComments(paragraphId); | 79 | alignSideComments(paragraphId); |
@@ -86,11 +88,6 @@ jQuery(document).ready(function($) { | @@ -86,11 +88,6 @@ jQuery(document).ready(function($) { | ||
86 | $('.comments_list_toggle_paragraph_' + paragraphId).width('250px'); | 88 | $('.comments_list_toggle_paragraph_' + paragraphId).width('250px'); |
87 | $('.required-field').removeClass("required-field"); | 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 | function hideAllCommentsExcept(clickedParagraph){ | 92 | function hideAllCommentsExcept(clickedParagraph){ |
96 | $(".side-comment").each(function(){ | 93 | $(".side-comment").each(function(){ |
@@ -106,7 +103,6 @@ jQuery(document).ready(function($) { | @@ -106,7 +103,6 @@ jQuery(document).ready(function($) { | ||
106 | $(".comment_paragraph").each(function(){ | 103 | $(".comment_paragraph").each(function(){ |
107 | paragraph = $(this).data('paragraph'); | 104 | paragraph = $(this).data('paragraph'); |
108 | if(paragraph != clickedParagraph){ | 105 | if(paragraph != clickedParagraph){ |
109 | -// $(".commented-area").contents().unwrap(); | ||
110 | $(this).find(".commented-area").contents().unwrap(); | 106 | $(this).find(".commented-area").contents().unwrap(); |
111 | } | 107 | } |
112 | }); | 108 | }); |
@@ -149,7 +145,9 @@ jQuery(document).ready(function($) { | @@ -149,7 +145,9 @@ jQuery(document).ready(function($) { | ||
149 | cssApplier.toggleSelection(); | 145 | cssApplier.toggleSelection(); |
150 | }catch(e){ | 146 | }catch(e){ |
151 | //Translate this mesage | 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 | return; | 151 | return; |
154 | } | 152 | } |
155 | //Register the area the has been selected at input.selected_area | 153 | //Register the area the has been selected at input.selected_area |