From 362338926c9aad9e961a73dfa83b0cc35934a632 Mon Sep 17 00:00:00 2001 From: rembo10 Date: Thu, 26 Jul 2012 01:41:52 +0530 Subject: [PATCH] Make sure we can still add new newznab providers after a config save without refreshing the page. Moved the add function from the document ready function to the main functions --- data/interfaces/default/config.html | 26 ++++++++++++++------------ 1 file changed, 14 insertions(+), 12 deletions(-) diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index 5f29847b..120ec49a 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -817,6 +817,20 @@ m<%inherit file="base.html"/> $(".remove").click(function() { $(this).parent().parent().remove(); }); + + $("#add_newznab").click(function() { + var intIdPrev = $("#newznab_providers > div").size(); + var intId = intIdPrev + 1; + var formfields = $("
"); + var removeButton = $("
"); + removeButton.click(function() { + $(this).parent().remove(); + }); + formfields.append(removeButton); + formfields.append("
"); + $("#newznab" + intIdPrev).after(formfields); + }); + $(function() { $( "#tabs" ).tabs(); }); @@ -831,18 +845,6 @@ m<%inherit file="base.html"/> } $(document).ready(function() { initThisPage(); - $("#add_newznab").click(function() { - var intIdPrev = $("#newznab_providers > div").size(); - var intId = intIdPrev + 1; - var formfields = $("
"); - var removeButton = $("
"); - removeButton.click(function() { - $(this).parent().remove(); - }); - formfields.append(removeButton); - formfields.append("
"); - $("#newznab" + intIdPrev).after(formfields); - }); });