Browse Source

Change link when RSS feed is generated & re-generated

merge-requests/1/head
Erase 4 years ago
parent
commit
72e4fd5c8b
1 changed files with 12 additions and 5 deletions
  1. +12
    -5
      js/custom.js

+ 12
- 5
js/custom.js View File

@ -1,8 +1,9 @@
$(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');
}
}
}


Loading…
Cancel
Save