diff --git a/public/scripts/controllers/settings-controller.js b/public/scripts/controllers/settings-controller.js index 8fafbb1..d17351a 100644 --- a/public/scripts/controllers/settings-controller.js +++ b/public/scripts/controllers/settings-controller.js @@ -1,4 +1,4 @@ -app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $stateParams, $filter, $state, $window, bookmarkService, pubSubService, dataService) { +app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', '$timeout', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $stateParams, $filter, $state, $window, $timeout, bookmarkService, pubSubService, dataService) { console.log('Hello settingsCtr......', $stateParams); $scope.form = [false, false, false, false]; $scope.passwordOrgin = ""; @@ -9,6 +9,7 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$ $scope.bookmarkCnt = 0; $scope.loadShowStyle = false; $scope.form[($stateParams && $stateParams.formIndex) || 0] = true; + $scope.key = ''; $scope.changeForm = function(index) { console.log("changeForm = ", index); @@ -105,6 +106,18 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$ }); } + + $scope.quickKey = function(key) { + key = key.toUpperCase(); + console.log('key = ', key); + if (!((key >= 'A' && key <= 'Z') || (key >= '1' && key <= '9'))) { + key = ''; + } + $timeout(function() { + $scope.key = key; + }); + } + function updateShowStyle(showStyle) { setTimeout(function() { if (showStyle) { diff --git a/public/views/settings.html b/public/views/settings.html index 01ac003..d427e43 100644 --- a/public/views/settings.html +++ b/public/views/settings.html @@ -10,6 +10,8 @@ 网站说明 + 全局链接 +
1、该代码我托管在Github上my-bookmark。该地址有文件夹详细说明以及部署步骤。git地址:git@github.com:luchenqun/my-bookmark.git。如果你需要源码,你尽可随意使用此项目无需通知我。
功能说明:可在该页面,设置全局快速打开的链接。快捷键只能是数字1 ~ 9或者字母a ~ z,字母不区分大小写。注意:在该设置界面,不触发全局的链接打开,否则没法设置了。
+ +| 快捷键 | +链接 | +操作 | +
|---|---|---|
| A | +http://mybookmark.cn/#/settings | +
+ |
+
| B | +https://www.google.com.hk/ | +
+ |
+