Sha256: 4c90449088407a1c246e20f29992aa55ec3cc13bf428152b6dff4d4c2d8ec4f8
Contents?: true
Size: 774 Bytes
Versions: 5
Compression:
Stored size: 774 Bytes
Contents
$(function() { var source = $('td:contains("---")'); source.contents().wrap("<div class='origin'></div>"); source.prepend("<a href='#' onclick='show_diff(this)' >View Diff</a>"); $('.origin').hide(); }); function show_diff(item){ var patch = $(item).parent('td').find('.origin').text(); $('#diff-modal').modal({show: true}); $("#diff-modal-editor") .css("position","relative") .css("padding-top","0") .height('380') .width('680'); var editor = ace.edit("diff-modal-editor"); editor.setTheme("ace/theme/clouds"); editor.setReadOnly(true); editor.getSession().setMode("ace/mode/diff"); editor.getSession().setValue(patch); editor.setShowPrintMargin(false); editor.renderer.setShowGutter(false); return false; }
Version data entries
5 entries across 5 versions & 1 rubygems