diff --git a/app/assets/javascripts/request_history.js b/app/assets/javascripts/request_history.js index 75d52d6..4fdf3e5 100644 --- a/app/assets/javascripts/request_history.js +++ b/app/assets/javascripts/request_history.js @@ -1,17 +1,13 @@ $(document).ready(function() { - $(".request_history table .comment").click(function() { - //alert($(this).parent().next().prop("class")); - $(this).parent().next().toggleClass('hide'); - }); - + $(document).on("click", ".request_history table .comment", function() { + $(this).parent().next().toggleClass('hide'); + }); $(document).on('keyup', '[id^="note-textarea_"]', function () { checkCount($(this)); }); - - $('#history_popup').on('shown.bs.modal', function (e) { var data_url = $("#request_history_log").data("url"); diff --git a/app/views/requests/_history_log_modal.html.erb b/app/views/requests/_history_log_modal.html.erb index df8e572..05055e2 100644 --- a/app/views/requests/_history_log_modal.html.erb +++ b/app/views/requests/_history_log_modal.html.erb @@ -1,4 +1,4 @@ -<% if can?(:add_note, @request) %> +
diff --git a/db/schema.rb b/db/schema.rb index 239bf12..39814e1 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -185,5 +185,4 @@ t.datetime "updated_at" end - end