From 9e83658d865e42ca9f5941a2295d66ba4beadab6 Mon Sep 17 00:00:00 2001 From: H4R0 Date: Wed, 19 Sep 2018 19:08:09 +0200 Subject: [PATCH 1/2] prevents scroll to top on button click (delete / stop download) --- static/js/control.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/static/js/control.js b/static/js/control.js index f61a597..0a1f741 100755 --- a/static/js/control.js +++ b/static/js/control.js @@ -435,3 +435,8 @@ function check_empty() { else hide_no_downloads(); } + +// prevents scroll to top on button click (delete / stop download) +$(document).on('click', 'a[href="#"]', function(e) { + e.preventDefault(); +}); From 55c0c2add2a0904c9c6416369bfca5510a2f5ecb Mon Sep 17 00:00:00 2001 From: H4R0 Date: Wed, 19 Sep 2018 19:28:00 +0200 Subject: [PATCH 2/2] removed js fix applied style using css --- static/js/control.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/static/js/control.js b/static/js/control.js index 0a1f741..cfd87a2 100755 --- a/static/js/control.js +++ b/static/js/control.js @@ -170,7 +170,7 @@ function update_task(task) { '
' + (task.progress != 100 ? "Speed: " + task.speed + "Size: " + task.dlsize + " ETA: " + task.eta : '') + '
' + '' + '' + - '
Delete' + (task.cloud_status == "finished" ? (!task.file_id ? ' Browse' : "") + (task.file_id ? ' Browse' : "") : "") + (task.local_status == "downloading" ? ' Stop DL' : "") + '
' + + '
Delete' + (task.cloud_status == "finished" ? (!task.file_id ? ' Browse' : "") + (task.file_id ? ' Browse' : "") : "") + (task.local_status == "downloading" ? ' Stop DL' : "") + '
' + '
' + '' + '' + @@ -435,8 +435,3 @@ function check_empty() { else hide_no_downloads(); } - -// prevents scroll to top on button click (delete / stop download) -$(document).on('click', 'a[href="#"]', function(e) { - e.preventDefault(); -});