|
|
@@ -219,7 +219,10 @@
|
|
|
$rootScope.currentTheme = 'light';
|
|
|
|
|
|
$rootScope.searchContext = {
|
|
|
- text: ''
|
|
|
+ text: '',
|
|
|
+ setSearchBoxFocused: function () {
|
|
|
+ angular.element('#search-box').focus();
|
|
|
+ }
|
|
|
};
|
|
|
|
|
|
$rootScope.taskContext = {
|
|
|
@@ -432,7 +435,17 @@
|
|
|
return task && task.status === 'error' && task.errorDescription && !task.bittorrent;
|
|
|
};
|
|
|
|
|
|
- $rootScope.keydownActions = {};
|
|
|
+ $rootScope.keydownActions = {
|
|
|
+ find: function (event) {
|
|
|
+ if (event.preventDefault) {
|
|
|
+ event.preventDefault();
|
|
|
+ }
|
|
|
+
|
|
|
+ $rootScope.searchContext.setSearchBoxFocused();
|
|
|
+
|
|
|
+ return false;
|
|
|
+ }
|
|
|
+ };
|
|
|
|
|
|
$rootScope.swipeActions = {
|
|
|
leftSwipe: function () {
|
|
|
@@ -501,6 +514,10 @@
|
|
|
if (angular.isFunction($rootScope.keydownActions.selectAll)) {
|
|
|
return $rootScope.keydownActions.selectAll(event);
|
|
|
}
|
|
|
+ } else if (ariaNgKeyboardService.isCtrlFPressed(event)) {
|
|
|
+ if (angular.isFunction($rootScope.keydownActions.find)) {
|
|
|
+ return $rootScope.keydownActions.find(event);
|
|
|
+ }
|
|
|
} else if (ariaNgKeyboardService.isDeletePressed(event) && !isTextboxOrTextareaFocus) {
|
|
|
if (angular.isFunction($rootScope.keydownActions.delete)) {
|
|
|
return $rootScope.keydownActions.delete(event);
|