Implement simplified commercials workflow

It's now possible to simply enter the url of the third party provider to enter a commercial.
This commit is contained in:
chrisbr 2015-04-22 21:30:32 +02:00
parent e6bb168c5e
commit 58974d6914
26 changed files with 194 additions and 188 deletions

View file

@ -37,6 +37,7 @@
//= require bootstrap-switch
//= require osem-switch
//= require osem-bootstrap
//= require osem-commercials
$(document).ready(function() {
$('a[disabled=disabled]').click(function(event){

View file

@ -0,0 +1,17 @@
$(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);
});
});
});
});