{I" class:ETI"BundledAsset;FI"logical_path;TI"notes/application.js;TI" pathname;TI"U/Users/seurdge/projects/notes/app/assets/javascripts/notes/application.js.coffee;FI"content_type;TI"application/javascript;TI" mtime;Tl+D'SI" length;Ti` I" digest;TI"%40e3555e1e10acc3c578fb64a8b2c6dc;FI" source;TI"` (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: "/notes/" + 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: "/notes/" + 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"%916ea5b3e6625e545a69d138a5904b04;FI" _version;TI"%a56df69ef97ba4d9f1a23bf9b0add58a;F