From c085dc7a88332673d769327e2dc5c24e37c2c446 Mon Sep 17 00:00:00 2001 From: MaysWind Date: Sun, 31 Jul 2016 22:33:37 +0800 Subject: [PATCH] support pressing "ctrl+enter" shortcuts to start download in "new task" page --- src/scripts/controllers/new.js | 6 ++++++ src/views/new.html | 3 ++- 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/scripts/controllers/new.js b/src/scripts/controllers/new.js index 6101ab6..ed150ae 100644 --- a/src/scripts/controllers/new.js +++ b/src/scripts/controllers/new.js @@ -131,6 +131,12 @@ optionStatus.setReady(); }; + $scope.urlTextboxKeyDown = function (event) { + if (event.keyCode == 13 && event.ctrlKey && $scope.newTaskForm.$valid) { + $scope.startDownload(); + } + }; + $rootScope.loadPromise = $timeout(function () { ;//Do Nothing }, 100); diff --git a/src/views/new.html b/src/views/new.html index fa1f341..d1c4d24 100644 --- a/src/views/new.html +++ b/src/views/new.html @@ -43,7 +43,8 @@

Download Links:

-