public/javascripts/admin/snippets.js in locomotive_cms-0.0.3.3 vs public/javascripts/admin/snippets.js in locomotive_cms-0.0.4.beta1

- old
+ new

@@ -1,16 +1,22 @@ $(document).ready(function() { - - // automatic slug from snippet name - $('#snippet_name').keypress(function() { - var input = $(this); - var slug = $('#snippet_slug'); - - if (!slug.hasClass('filled')) { - setTimeout(function() { - slug.val(makeSlug(input.val())); - }, 50); - } - }); - - $('#snippet_slug').keypress(function() { $(this).addClass('filled'); }); -}); \ No newline at end of file + + // automatic slug from snippet name + $('#snippet_name').keypress(function() { + var input = $(this); + var slug = $('#snippet_slug'); + + if (!slug.hasClass('filled')) { + setTimeout(function() { + slug.val(makeSlug(input.val())); + }, 50); + } + }); + + $('#snippet_slug').keypress(function() { $(this).addClass('filled'); }); + + $('a#image-picker-link').imagepicker({ + insertFn: function(link) { + return "{{ theme_images." + link.attr('data-slug') + " }}"; + } + }); +});