From 4f8e5877a7e4642984f556338c5cbfd3b11ed5cb Mon Sep 17 00:00:00 2001 From: rembo10 Date: Wed, 25 Jul 2012 20:18:43 +0530 Subject: [PATCH] Added jquery to allow adding/removing newznab providers --- data/interfaces/default/config.html | 41 ++++++++++++++++++++--------- 1 file changed, 28 insertions(+), 13 deletions(-) diff --git a/data/interfaces/default/config.html b/data/interfaces/default/config.html index b5d62ecc..3a0ac8a8 100644 --- a/data/interfaces/default/config.html +++ b/data/interfaces/default/config.html @@ -199,19 +199,22 @@ m<%inherit file="base.html"/>
-
-
- - - e.g. http://nzb.su -
-
- - -
-
- +
+
+
+ + + e.g. http://nzb.su +
+
+ + +
+
+ +
+
@@ -792,7 +795,19 @@ m<%inherit file="base.html"/> initConfigCheckbox("#useapi"); } $(document).ready(function() { - initThisPage(); + 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).append(formfields); + }); });