From feb90b3a33cb5d386292ec08c767b0587621d08d Mon Sep 17 00:00:00 2001 From: Ian Bishop Date: Sat, 9 Jun 2018 12:59:29 +0200 Subject: [PATCH] Add reset button --- static/files/js/omni-controller.js | 5 +++++ static/files/template/omni.html | 7 +++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/static/files/js/omni-controller.js b/static/files/js/omni-controller.js index 02b5bfe69..76916b794 100644 --- a/static/files/js/omni-controller.js +++ b/static/files/js/omni-controller.js @@ -134,6 +134,11 @@ app.controller("OmniController", function( } }; + $scope.resetOmni = function() { + $scope.inputs.omni = ''; + $scope.parse(); + }; + $scope.submitTorrent = function() { if ($scope.mode.torrent) { api.url($scope.inputs.omni); diff --git a/static/files/template/omni.html b/static/files/template/omni.html index c10de56b5..13327ef25 100644 --- a/static/files/template/omni.html +++ b/static/files/template/omni.html @@ -42,8 +42,9 @@

Magnet URI Editor

@@ -56,6 +57,7 @@

Magnet URI Editor

No results! Search +
Reset
@@ -94,7 +96,8 @@

Magnet URI Editor

Load Magnet
-
Edit
+
Edit
+
Reset