spec/dummy/tmp/cache/assets/test/sprockets/7a1cd07c78bfddbc8f10ecae97a85311 in commenteux-1.1.5 vs spec/dummy/tmp/cache/assets/test/sprockets/7a1cd07c78bfddbc8f10ecae97a85311 in commenteux-1.1.6
- old
+ new
@@ -1,15 +1,15 @@
{I"
class:ETI"ProcessedAsset; FI"logical_path; TI"commenteux/application.js; FI"
pathname; TI"v/Users/nickdemers/Documents/Projects/workspace/commenteux/app/assets/javascripts/commenteux/application.js.coffee; FI"content_type; TI"application/javascript; TI"
-mtime; Tl+¬q VI"length; TiÛI"digest; TI"%bc042f3f6266ec2484388b8da7692983; FI"source; TI"Û(function() {
+mtime; Tl+-õVI"length; TiI"digest; TI"%75af8746e663670b36aafc2cfc9bbff1; FI"source; TI"(function() {
$(document).on('click', '#new_notes_link', function(e) {
var display_list_notes, id, parent, resource, roles;
e.stopPropagation();
e.preventDefault();
- parent = $(this).data('parent');
resource = $(this).data('resource');
id = $(this).data('id');
+ parent = $(this).data('parent');
roles = $(this).data('roles');
display_list_notes = $(this).data('display-list-notes');
$.ajax({
url: "/commenteux/" + resource + "/" + id + "/new",
type: "get",
@@ -46,21 +46,34 @@
$('body').html(xhr.responseText);
}
return this;
});
+ $(document).on('ajax:success', '#edit_comments', function(e, data, status, xhr) {
+ var parent;
+ e.stopPropagation();
+ e.preventDefault();
+ parent = $('#edit_comments').attr('data-parent');
+ if (parent && parent !== 'null') {
+ $("#" + parent).html(xhr.responseText);
+ } else {
+ $('body').html(xhr.responseText);
+ }
+ return this;
+ });
+
$(document).on('click', '#new_notes_cancelled', function(e) {
var display_list_notes, id, parent, resource, roles;
e.stopPropagation();
e.preventDefault();
- parent = $(this).data('parent');
resource = $(this).data('resource');
id = $(this).data('id');
+ parent = $(this).data('parent');
roles = $(this).data('roles');
display_list_notes = $(this).data('display-list-notes');
$.ajax({
- url: "/commenteux/" + resource + "/" + id + "?parent_div=" + parent,
+ url: "/commenteux/" + resource + "/" + id,
type: "get",
dataType: "html",
data: {
"parent_div": parent,
"roles": roles,
@@ -80,8 +93,66 @@
}
});
return this;
});
+ $(document).on('click', '.remove_comment', function(e) {
+ var comment_role, id, resource, resource_id;
+ e.stopPropagation();
+ e.preventDefault();
+ resource = $(this).data('resource');
+ resource_id = $(this).data('resource-id');
+ id = $(this).data('id');
+ comment_role = $(this).data('comment-role');
+ $.ajax({
+ url: "/commenteux/" + resource + "/" + resource_id + "?id=" + id + "&comment_role=" + comment_role,
+ type: "delete",
+ dataType: "html",
+ success: $(".comment[data-id='" + id + "']").remove(),
+ error: function(e) {
+ alert(e);
+ return this;
+ }
+ });
+ return this;
+ });
+
+ $(document).on('click', '.edit_comment', function(e) {
+ var comment_role, display_list_notes, id, parent, resource, resource_id, roles;
+ e.stopPropagation();
+ e.preventDefault();
+ resource = $(this).data('resource');
+ resource_id = $(this).data('resource-id');
+ id = $(this).data('id');
+ comment_role = $(this).data('comment-role');
+ parent = $(this).data('parent');
+ roles = $(this).data('roles');
+ display_list_notes = $(this).data('display-list-notes');
+ $.ajax({
+ url: "/commenteux/" + resource + "/" + resource_id + "/" + id + "/edit",
+ type: "get",
+ dataType: "html",
+ data: {
+ "comment_role": comment_role,
+ "parent_div": parent,
+ "roles": roles,
+ "display_list_notes": display_list_notes
+ },
+ success: function(returnData) {
+ if (parent && parent !== 'null') {
+ $("#" + parent).html(returnData);
+ } else {
+ $('body').html(returnData);
+ }
+ return this;
+ },
+ error: function(e) {
+ alert(e);
+ return this;
+ }
+ });
+ return this;
+ });
+
}).call(this);
-; TI"dependency_digest; TI"%c9e8dacad2aba5bc4c01b20ae54297e8; FI"required_paths; T[I"v/Users/nickdemers/Documents/Projects/workspace/commenteux/app/assets/javascripts/commenteux/application.js.coffee; FI"dependency_paths; T[{I" path; TI"v/Users/nickdemers/Documents/Projects/workspace/commenteux/app/assets/javascripts/commenteux/application.js.coffee; FI"
-mtime; TI"2015-09-28T12:58:20-04:00; TI"digest; TI"%03074b703aaad6d9dd9ea121899cc901; FI"
_version; TI"%cb2eec82c19168d2b32a76fa7e3957f4; F
+; TI"dependency_digest; TI"%cc4fc9a96a7a5df84a2b538a1e93b07e; FI"required_paths; T[I"v/Users/nickdemers/Documents/Projects/workspace/commenteux/app/assets/javascripts/commenteux/application.js.coffee; FI"dependency_paths; T[{I" path; TI"v/Users/nickdemers/Documents/Projects/workspace/commenteux/app/assets/javascripts/commenteux/application.js.coffee; FI"
+mtime; TI"2015-10-13T08:12:29-04:00; TI"digest; TI"%65df806348bf7778db2a49fb980bf030; FI"
_version; TI"%cb2eec82c19168d2b32a76fa7e3957f4; F
\ No newline at end of file