osem-fcy/app/assets/javascripts/osem-commercials.js
chrisbr 58974d6914 Implement simplified commercials workflow
It's now possible to simply enter the url of the third party provider to enter a commercial.
2015-04-22 21:30:32 +02:00

17 lines
473 B
JavaScript

$(function () {
$(document).ready(function() {
$('#commercial_url').focusout(function(){
var url = $('#new_commercial').attr('action');
url = url + '/get_html'
$.ajax({
method: 'GET',
url: url,
data: { url: $(this).val() }
})
.done(function( msg ) {
$('#resource-content').html(msg);
});
});
});
});