快速打开配置
This commit is contained in:
parent
89a6585164
commit
af917870af
|
|
@ -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);
|
console.log('Hello settingsCtr......', $stateParams);
|
||||||
$scope.form = [false, false, false, false];
|
$scope.form = [false, false, false, false];
|
||||||
$scope.passwordOrgin = "";
|
$scope.passwordOrgin = "";
|
||||||
|
|
@ -9,6 +9,7 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$
|
||||||
$scope.bookmarkCnt = 0;
|
$scope.bookmarkCnt = 0;
|
||||||
$scope.loadShowStyle = false;
|
$scope.loadShowStyle = false;
|
||||||
$scope.form[($stateParams && $stateParams.formIndex) || 0] = true;
|
$scope.form[($stateParams && $stateParams.formIndex) || 0] = true;
|
||||||
|
$scope.key = '';
|
||||||
|
|
||||||
$scope.changeForm = function(index) {
|
$scope.changeForm = function(index) {
|
||||||
console.log("changeForm = ", 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) {
|
function updateShowStyle(showStyle) {
|
||||||
setTimeout(function() {
|
setTimeout(function() {
|
||||||
if (showStyle) {
|
if (showStyle) {
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,8 @@
|
||||||
</a>
|
</a>
|
||||||
<a class="item" ng-class="{active:form[3]}" ng-click="changeForm(3)">网站说明
|
<a class="item" ng-class="{active:form[3]}" ng-click="changeForm(3)">网站说明
|
||||||
</a>
|
</a>
|
||||||
|
<a class="item" ng-class="{active:form[4]}" ng-click="changeForm(4)">全局链接
|
||||||
|
</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="twelve wide stretched column">
|
<div class="twelve wide stretched column">
|
||||||
|
|
@ -154,6 +156,51 @@
|
||||||
<h3 class="ui dividing header">开发备忘(非开发人员请无视)</h3>
|
<h3 class="ui dividing header">开发备忘(非开发人员请无视)</h3>
|
||||||
<p>1、该代码我托管在Github上<a href="https://github.com/luchenqun/my-bookmark" target="_blank">my-bookmark</a>。该地址有文件夹详细说明以及部署步骤。git地址:git@github.com:luchenqun/my-bookmark.git。如果你需要源码,你尽可随意使用此项目无需通知我。</p>
|
<p>1、该代码我托管在Github上<a href="https://github.com/luchenqun/my-bookmark" target="_blank">my-bookmark</a>。该地址有文件夹详细说明以及部署步骤。git地址:git@github.com:luchenqun/my-bookmark.git。如果你需要源码,你尽可随意使用此项目无需通知我。</p>
|
||||||
</div>
|
</div>
|
||||||
|
<div class="ui container js-p-info" ng-show="form[4]">
|
||||||
|
<p>功能说明:可在该页面,设置全局快速打开的链接。快捷键只能是数字1 ~ 9或者字母a ~ z,字母不区分大小写。</br>注意:在该设置界面,不触发全局的链接打开,否则没法设置了。</p>
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
<table class="ui selectable sortable celled table js-quick-url-table">
|
||||||
|
<thead>
|
||||||
|
<tr>
|
||||||
|
<th style="width:80px;">快捷键</th>
|
||||||
|
<th>链接</th>
|
||||||
|
<th style="width:45px;">操作</th>
|
||||||
|
</tr>
|
||||||
|
</thead>
|
||||||
|
<tbody>
|
||||||
|
<tr>
|
||||||
|
<td>A</td>
|
||||||
|
<td>http://mybookmark.cn/#/settings</td>
|
||||||
|
<td>
|
||||||
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
<tr>
|
||||||
|
<td>B</td>
|
||||||
|
<td>https://www.google.com.hk/</td>
|
||||||
|
<td>
|
||||||
|
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签">
|
||||||
|
</td>
|
||||||
|
</tr>
|
||||||
|
</tbody>
|
||||||
|
</table>
|
||||||
|
<div class="ui divider"></div>
|
||||||
|
<div class="ui form">
|
||||||
|
<div class="inline fields">
|
||||||
|
<div class="six wide field">
|
||||||
|
<label style="min-width:55px;">快捷键:</label>
|
||||||
|
<input type="text" placeholder="请用鼠标点击然后按相应的快捷键" ng-model="key" ng-keypress="quickKey($event.key)">
|
||||||
|
</div>
|
||||||
|
<div class="eight wide field">
|
||||||
|
<label style="min-width:66px;">网站地址:</label>
|
||||||
|
<input type="text" placeholder="请输入你需要快捷打开的网站地址">
|
||||||
|
</div>
|
||||||
|
<div class="two wide field">
|
||||||
|
<div class="ui green button" ng-click="ok()">确定</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -9,6 +9,7 @@ CREATE TABLE `users` (
|
||||||
`last_login` datetime DEFAULT NULL, -- 最后一次登录时间
|
`last_login` datetime DEFAULT NULL, -- 最后一次登录时间
|
||||||
`show_style` char(16) NOT NULL DEFAULT 'navigate', -- 显示风格
|
`show_style` char(16) NOT NULL DEFAULT 'navigate', -- 显示风格
|
||||||
`search_history` varchar(512) DEFAULT NULL, -- 历史搜索记录
|
`search_history` varchar(512) DEFAULT NULL, -- 历史搜索记录
|
||||||
|
`quick_url` varchar(2048) DEFAULT NULL, -- 全局快捷地址
|
||||||
PRIMARY KEY (`id`),
|
PRIMARY KEY (`id`),
|
||||||
UNIQUE KEY `username` (`username`),
|
UNIQUE KEY `username` (`username`),
|
||||||
UNIQUE KEY `email` (`email`)
|
UNIQUE KEY `email` (`email`)
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue