{I" class:ETI"BundledAsset;FI"logical_path;TI"commenteux/application.js;TI" pathname;TI"_/Users/seurdge/projects/commenteux/app/assets/javascripts/commenteux/application.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+ã='SI" length;Tij I" digest;TI"%bfa05e6a7636110b2c268536b2f58340;FI" source;TI"j (function() { $(function() { $(document).delegate('#new_notes_link', 'click', function(e) { var id, parent, resource; console.log('new_notes_link click'); event.stopPropagation(); event.preventDefault(); parent = $(this).data('parent'); resource = $(this).data('resource'); id = $(this).data('id'); console.log('parent_div = ' + parent); console.log('resource = ' + resource); console.log('resource_id = ' + id); $.ajax({ url: "/commenteux/" + resource + "/" + id + "/new", type: "get", dataType: "html", data: { "parent_div": parent }, success: function(returnData) { console.log('success'); console.log("#" + parent); console.log(returnData); if (parent) { $("#" + parent).html(returnData); } else { console.log('no parent'); $('body').html(returnData); } return this; }, error: function(e) { alert(e); return this; } }); return this; }); $(document).delegate('#new_comments', 'ajax:success', function(e, data, status, xhr) { var parent; console.log('new_comments ajax success'); parent = $('#new_comments').attr('data-parent'); if (parent) { return $('#' + parent).html(xhr.responseText); } else { return $('body').html(xhr.responseText); } }); return $(document).delegate('#new_notes_cancelled', 'click', function(e) { var id, parent, resource; console.log('new_notes_cancelled click'); event.stopPropagation(); event.preventDefault(); parent = $(this).data('parent'); resource = $(this).data('resource'); id = $(this).data('id'); console.log('parent_div = ' + parent); console.log('resource = ' + resource); console.log('resource_id = ' + id); $.ajax({ url: "/commenteux/" + resource + "/" + id + "?parent_div=" + parent, type: "get", dataType: "html", data: { "parent_div": parent }, success: function(returnData) { console.log('success'); console.log("#" + parent); console.log(returnData); if (parent) { $("#" + parent).html(returnData); } else { console.log('no parent'); $('body').html(returnData); } return this; }, error: function(e) { alert(e); return this; } }); return this; }); }); }).call(this); ;TI"required_assets_digest;TI"%ef59997ff3d3d583838c95037e151e28;FI" _version;TI"%cb2eec82c19168d2b32a76fa7e3957f4;F