Commit 72e4fd5c authored by Erase's avatar Erase
Browse files

Change link when RSS feed is generated & re-generated

parent 381b52ca
$(document).ready(function(){
$('#submit').click(function(){
var $this = $(this),
$rsslk = $('#rss-lk');
var isn = ($('#n').length ? true : false);
$rsslk = $('#rss-lk'),
$n = $('#n');
var isn = ($n.length ? true : false);
if( $('#flux').val() != ''){
$this.attr('disabled', 'disabled');
......@@ -22,9 +23,15 @@ $(document).ready(function(){
}else{
$rsslk.html("<br /><br /><a class='btn btn-primary' id='n' href='"+data['data'].file+"' target='_blank'>"+data.message+"</a>");
if(isn){
$('#n').html(
$('#n').text().replace('le lien RSS', 'le NOUVEAU lien RSS')
)
$n = $('#n');
$n.html(
$n.text().replace('le lien RSS', 'le NOUVEAU lien RSS')
);
if($n.hasClass('btn-primary')){
$n.removeClass('btn-primary').addClass('btn-info');
}else{
$n.removeClass('btn-info').addClass('btn-primary');
}
}
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment