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:
parent
e6bb168c5e
commit
58974d6914
26 changed files with 194 additions and 188 deletions
|
|
@ -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){
|
||||
|
|
|
|||
17
app/assets/javascripts/osem-commercials.js
Normal file
17
app/assets/javascripts/osem-commercials.js
Normal 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);
|
||||
});
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue