Merge pull request #67 from medialab-prado/65-remove-hightligthing
Remove highligthing and fix links
This commit is contained in:
@@ -75,22 +75,23 @@ App.LegislationAnnotatable =
|
||||
$('#new_legislation_annotation #legislation_annotation_ranges').val(JSON.stringify(@annotation.ranges))
|
||||
$('#comments-box').css({top: position.top - $('.calc-comments').offset().top})
|
||||
|
||||
App.LegislationAnnotatable.highlight('#7fff9a')
|
||||
$('#comments-box textarea').focus()
|
||||
unless $('[data-legislation-open-phase]').data('legislation-open-phase') == false
|
||||
App.LegislationAnnotatable.highlight('#7fff9a')
|
||||
$('#comments-box textarea').focus()
|
||||
|
||||
$("#new_legislation_annotation").on("ajax:complete", (e, data, status, xhr) ->
|
||||
if data.status == 200
|
||||
App.LegislationAnnotatable.remove_highlight()
|
||||
$("#comments-box").html("").hide()
|
||||
$.ajax
|
||||
method: "GET"
|
||||
url: annotation_url + "/annotations/" + data.responseJSON.id + "/comments"
|
||||
dataType: 'script'
|
||||
else
|
||||
$(e.target).find('label').addClass('error')
|
||||
$('<small class="error">' + data.responseJSON[0] + '</small>').insertAfter($(e.target).find('textarea'))
|
||||
return true
|
||||
)
|
||||
$("#new_legislation_annotation").on("ajax:complete", (e, data, status, xhr) ->
|
||||
if data.status == 200
|
||||
App.LegislationAnnotatable.remove_highlight()
|
||||
$("#comments-box").html("").hide()
|
||||
$.ajax
|
||||
method: "GET"
|
||||
url: annotation_url + "/annotations/" + data.responseJSON.id + "/comments"
|
||||
dataType: 'script'
|
||||
else
|
||||
$(e.target).find('label').addClass('error')
|
||||
$('<small class="error">' + data.responseJSON[0] + '</small>').insertAfter($(e.target).find('textarea'))
|
||||
return true
|
||||
)
|
||||
return
|
||||
).bind(this)
|
||||
|
||||
|
||||
@@ -1,9 +1,6 @@
|
||||
<div class="comment-header">
|
||||
<span class="icon-comment" aria-hidden="true"></span>
|
||||
<div class="comment-number"><%= t('legislation.annotations.comments.comments_count', count: 0) %></div>
|
||||
<%= link_to '#' do %>
|
||||
<span class="icon-expand" aria-hidden="true"></span>
|
||||
<% end %>
|
||||
</div>
|
||||
|
||||
<div class="comments-wrapper">
|
||||
|
||||
@@ -11,6 +11,6 @@
|
||||
<span><%= t('legislation.draft_versions.show.updated_at', date: format_date(@draft_version.updated_at)) %></span>
|
||||
</div>
|
||||
<div class="small-12 medium-3 column">
|
||||
<%= link_to t('.see_text'), legislation_process_draft_version_annotations_path(process, draft_version), title: t('.see_text'), class: "button strong" %>
|
||||
<%= link_to t('.see_text'), legislation_process_draft_version_path(process, draft_version), title: t('.see_text'), class: "button strong" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user