更新搜索页面
This commit is contained in:
parent
94be84c33d
commit
e9a3252443
|
|
@ -1,179 +1,183 @@
|
||||||
body {
|
body {
|
||||||
background-image: url('../images/bg.png');
|
background-image: url('../images/bg.png');
|
||||||
background-repeat: repeat;
|
background-repeat: repeat;
|
||||||
background-position: top left;
|
background-position: top left;
|
||||||
background-attachment: scroll;
|
background-attachment: scroll;
|
||||||
padding: 50px;
|
padding: 50px;
|
||||||
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
|
font: 14px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||||
}
|
}
|
||||||
|
|
||||||
code {
|
code {
|
||||||
background-color: rgba(0, 0, 0, 0.08);
|
background-color: rgba(0, 0, 0, 0.08);
|
||||||
border-radius: 3px;
|
border-radius: 3px;
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
|
font-family: "Monaco", "Menlo", "Ubuntu Mono", "Consolas", "source-code-pro", monospace;
|
||||||
font-size: 0.875em;
|
font-size: 0.875em;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
padding: 1px 6px;
|
padding: 1px 6px;
|
||||||
vertical-align: baseline;
|
vertical-align: baseline;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmark {
|
.bookmark {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
-o-text-overflow: ellipsis;
|
-o-text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmarkTitle {
|
.bookmarkTitle {
|
||||||
color: #333;
|
color: #333;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
line-height: 24px;
|
line-height: 24px;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
display: -webkit-box;
|
display: -webkit-box;
|
||||||
-webkit-line-clamp: 2;
|
-webkit-line-clamp: 2;
|
||||||
-webkit-box-orient: vertical;
|
-webkit-box-orient: vertical;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmarkNormalHover {
|
.bookmarkNormalHover {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
-o-text-overflow: ellipsis;
|
-o-text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
background: #F5F5F5;
|
background: #F5F5F5;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
border: 1px solid transparent;
|
border: 1px solid transparent;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmarkOperaterHover {
|
.bookmarkOperaterHover {
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tags {
|
.tags {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmarkEditHover {
|
.bookmarkEditHover {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
-o-text-overflow: ellipsis;
|
-o-text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
color: #212121;
|
color: #212121;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
border: 1px dashed #3388FF;
|
border: 1px dashed #3388FF;
|
||||||
}
|
}
|
||||||
|
|
||||||
.bookmarkInfo {
|
.bookmarkInfo {
|
||||||
cursor: url('../images/detail.ico'), auto;
|
cursor: url('../images/detail.ico'), auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
.img-fixed-size {
|
.img-fixed-size {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px;
|
height: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
td {
|
td {
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
table {
|
table {
|
||||||
table-layout: fixed;
|
table-layout: fixed;
|
||||||
}
|
}
|
||||||
|
|
||||||
.wrap {
|
.wrap {
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
-o-text-overflow: ellipsis;
|
-o-text-overflow: ellipsis;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.js-navigate-bookmark a {
|
.js-navigate-bookmark a {
|
||||||
color: #212121;
|
color: #212121;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.menu .selected.item {
|
.ui.menu .selected.item {
|
||||||
background: rgba(1, 1, 1, 0.05);
|
background: rgba(1, 1, 1, 0.05);
|
||||||
}
|
}
|
||||||
|
|
||||||
img.operator {
|
img.operator {
|
||||||
width: 16px;
|
width: 16px;
|
||||||
height: 16px
|
height: 16px
|
||||||
}
|
}
|
||||||
|
|
||||||
.js-bookmark-info .content img {
|
.js-bookmark-info .content img {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 100%;
|
max-height: 100%;
|
||||||
padding-right: 20px;
|
padding-right: 20px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.hot-image {
|
.hot-image {
|
||||||
max-width: 100%;
|
max-width: 100%;
|
||||||
max-height: 160px;
|
max-height: 160px;
|
||||||
min-height: 160px;
|
min-height: 160px;
|
||||||
background-color: yellow;
|
background-color: yellow;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
}
|
}
|
||||||
|
|
||||||
.sourceName {
|
.sourceName {
|
||||||
display: inline-block;
|
display: inline-block;
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 4px;
|
top: 4px;
|
||||||
max-width: 55px;
|
max-width: 55px;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
white-space: nowrap;
|
white-space: nowrap;
|
||||||
text-overflow: ellipsis;
|
text-overflow: ellipsis;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #333;
|
color: #333;
|
||||||
}
|
}
|
||||||
|
|
||||||
.favCount {
|
.favCount {
|
||||||
position: relative;
|
position: relative;
|
||||||
top: 1px;
|
top: 1px;
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
color: #BFC0C6;
|
color: #BFC0C6;
|
||||||
}
|
}
|
||||||
|
|
||||||
.urlSpan {
|
.urlSpan {
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
word-break: break-all;
|
word-break: break-all;
|
||||||
cursor: default;
|
cursor: default;
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.sortable.table thead th.forbid_sorted:hover {
|
.ui.sortable.table thead th.forbid_sorted:hover {
|
||||||
cursor: default;
|
cursor: default;
|
||||||
background: #F9FAFB
|
background: #F9FAFB
|
||||||
}
|
}
|
||||||
|
|
||||||
.ui.selection.list .list>.item, .ui.selection.list>.item {
|
.ui.selection.list .list>.item, .ui.selection.list>.item {
|
||||||
border-radius: 0;
|
border-radius: 0;
|
||||||
}
|
}
|
||||||
|
|
||||||
.js-p-info p {
|
.js-p-info p {
|
||||||
margin-bottom: 5px;
|
margin-bottom: 5px;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.note-content {
|
.note-content {
|
||||||
font: 15px "Lucida Grande", Helvetica, Arial, sans-serif;
|
font: 15px "Lucida Grande", Helvetica, Arial, sans-serif;
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
white-space: -moz-pre-wrap;
|
white-space: -moz-pre-wrap;
|
||||||
white-space: -pre-wrap;
|
white-space: -pre-wrap;
|
||||||
white-space: -o-pre-wrap;
|
white-space: -o-pre-wrap;
|
||||||
word-wrap: break-word;
|
word-wrap: break-word;
|
||||||
}
|
}
|
||||||
|
|
||||||
.fontgreen {
|
.fontgreen {
|
||||||
color: RGB(33, 186, 69);
|
color: RGB(33, 186, 69);
|
||||||
}
|
}
|
||||||
|
|
||||||
.fontred {
|
.fontred {
|
||||||
color: #F00;
|
color: #F00;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.js-history-word:hover {
|
||||||
|
background: #f0f0f0;
|
||||||
|
}
|
||||||
|
|
@ -1,103 +1,103 @@
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html lang="en">
|
<html lang="en">
|
||||||
<!-- 百度统计 -->
|
<!-- 百度统计 -->
|
||||||
<script>
|
<script>
|
||||||
var _hmt = _hmt || [];
|
var _hmt = _hmt || [];
|
||||||
(function () {
|
(function () {
|
||||||
var hm = document.createElement("script");
|
var hm = document.createElement("script");
|
||||||
hm.src = "https://hm.baidu.com/hm.js?01351b0343ccf42968923cff21a4a851";
|
hm.src = "https://hm.baidu.com/hm.js?01351b0343ccf42968923cff21a4a851";
|
||||||
var s = document.getElementsByTagName("script")[0];
|
var s = document.getElementsByTagName("script")[0];
|
||||||
s.parentNode.insertBefore(hm, s);
|
s.parentNode.insertBefore(hm, s);
|
||||||
})();
|
})();
|
||||||
</script>
|
</script>
|
||||||
<head>
|
<head>
|
||||||
<meta charset="utf-8">
|
<meta charset="utf-8">
|
||||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||||
<meta name="description" content="bookmark">
|
<meta name="description" content="bookmark">
|
||||||
<meta name="author" content="luchenqun">
|
<meta name="author" content="luchenqun">
|
||||||
<title>在线书签管理工具-我的书签</title>
|
<title>在线书签管理工具-我的书签</title>
|
||||||
<link href="/css/externe/semantic.min.css " rel="stylesheet"/>
|
<link href="/css/externe/semantic.min.css " rel="stylesheet"/>
|
||||||
<link href="/css/externe/calendar.min.css" rel="stylesheet"/>
|
<link href="/css/externe/calendar.min.css" rel="stylesheet"/>
|
||||||
<link href="/css/externe/toastr.min.css" rel="stylesheet"/>
|
<link href="/css/externe/toastr.min.css" rel="stylesheet"/>
|
||||||
<link href="/css/style.css " rel="stylesheet"/>
|
<link href="/css/style.css " rel="stylesheet"/>
|
||||||
<link href="/css/externe/uploadfile.css" rel="stylesheet">
|
<link href="/css/externe/uploadfile.css" rel="stylesheet">
|
||||||
<link href="/css/externe/ngDialog.css" rel="stylesheet">
|
<link href="/css/externe/ngDialog.css" rel="stylesheet">
|
||||||
<link href="/css/externe/ngDialog-theme-default.css" rel="stylesheet">
|
<link href="/css/externe/ngDialog-theme-default.css" rel="stylesheet">
|
||||||
<link href="/css/externe/ngDialog-theme-plain.css" rel="stylesheet">
|
<link href="/css/externe/ngDialog-theme-plain.css" rel="stylesheet">
|
||||||
<base href="/">
|
<base href="/">
|
||||||
<script type="text/javascript">
|
<script type="text/javascript">
|
||||||
window.onload = function() {
|
window.onload = function() {
|
||||||
var clipboard = new ClipboardJS(document.getElementById('clipboard'));
|
var clipboard = new ClipboardJS(document.getElementById('clipboard'));
|
||||||
clipboard.on('success', function(e) {
|
clipboard.on('success', function(e) {
|
||||||
var text = e.text.length >= 180 ? e.text.substr(0, 180) + '...' : e.text;
|
var text = e.text.length >= 180 ? e.text.substr(0, 180) + '...' : e.text;
|
||||||
toastr.success(text + '<br/>已复制到您的剪切板', "提示");
|
toastr.success(text + '<br/>已复制到您的剪切板', "提示");
|
||||||
e.clearSelection();
|
e.clearSelection();
|
||||||
});
|
});
|
||||||
clipboard.on('error', function(e) {
|
clipboard.on('error', function(e) {
|
||||||
var text = e.text.length >= 180 ? e.text.substr(0, 180) + '...' : e.text;
|
var text = e.text.length >= 180 ? e.text.substr(0, 180) + '...' : e.text;
|
||||||
toastr.error(text + '<br/>复制失败', "提示");
|
toastr.error(text + '<br/>复制失败', "提示");
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
</script>
|
</script>
|
||||||
</head>
|
</head>
|
||||||
<body ng-app="bookmarkApp">
|
<body ng-app="bookmarkApp">
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<!-- directive:菜单 -->
|
<!-- directive:菜单 -->
|
||||||
<menus></menus>
|
<menus></menus>
|
||||||
<div class="ui container" style="width:100%;height:10px"></div>
|
<div class="ui container" style="width:100%;height:2px"></div>
|
||||||
<div class="ui container">
|
<div class="ui container">
|
||||||
<div ui-view></div>
|
<div ui-view></div>
|
||||||
</div>
|
</div>
|
||||||
<div class="ui container" style="width:100%;height:10px"></div>
|
<div class="ui container" style="width:100%;height:10px"></div>
|
||||||
<div class="foot" style="margin-bottom:10px;">
|
<div class="foot" style="margin-bottom:10px;">
|
||||||
<div class="ui segment container">
|
<div class="ui segment container">
|
||||||
我爱佳佳与这个世界 | Copyleft ©All Rights Reserved LCQ | <a href="http://m.mybookmark.cn/">移动设备访问</a> | 联系我(QQ:530485521) | <a href="https://github.com/luchenqun/my-bookmark" target="_blank">网站源码</a> | V1.5.0 | <span>加载失败,请按F5!(●'◡'●)</span><br/>
|
我爱佳佳与这个世界 | Copyleft ©All Rights Reserved LCQ | <a href="http://m.mybookmark.cn/">移动设备访问</a> | 联系我(QQ:530485521) | <a href="https://github.com/luchenqun/my-bookmark" target="_blank">网站源码</a> | V1.5.0 | <span>加载失败,请按F5!(●'◡'●)</span><br/>
|
||||||
</div>
|
</div>
|
||||||
<!-- 主要用来配合clipboard.min.js复制文本的 -->
|
<!-- 主要用来配合clipboard.min.js复制文本的 -->
|
||||||
<div id="clipboard" data-clipboard-text="i love this world and jiajia!" style="opacity:0;cursor:default">
|
<div id="clipboard" data-clipboard-text="i love this world and jiajia!" style="opacity:0;cursor:default">
|
||||||
<span>Copy</span>
|
<span>Copy</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- directive:书签编辑 -->
|
<!-- directive:书签编辑 -->
|
||||||
<edit></edit>
|
<edit></edit>
|
||||||
<!-- directive:书签信息 -->
|
<!-- directive:书签信息 -->
|
||||||
<bookmarkinfo></bookmarkinfo>
|
<bookmarkinfo></bookmarkinfo>
|
||||||
</div>
|
</div>
|
||||||
<script src="/scripts/externe/jquery-3.1.1.min.js"></script>
|
<script src="/scripts/externe/jquery-3.1.1.min.js"></script>
|
||||||
<script src="/scripts/externe/jquery.form.js"></script>
|
<script src="/scripts/externe/jquery.form.js"></script>
|
||||||
<script src="/scripts/externe/toastr.min.js"></script>
|
<script src="/scripts/externe/toastr.min.js"></script>
|
||||||
<script src="/scripts/externe/angular.min.js"></script>
|
<script src="/scripts/externe/angular.min.js"></script>
|
||||||
<script src="/scripts/externe/angular-ui-router.min.js"></script>
|
<script src="/scripts/externe/angular-ui-router.min.js"></script>
|
||||||
<script src="/scripts/externe/angular-cookies.min.js"></script>
|
<script src="/scripts/externe/angular-cookies.min.js"></script>
|
||||||
<script src="/scripts/app-angular.js"></script>
|
<script src="/scripts/app-angular.js"></script>
|
||||||
<script src="/scripts/services/bookmark-service.js"></script>
|
<script src="/scripts/services/bookmark-service.js"></script>
|
||||||
<script src="/scripts/services/data-service.js"></script>
|
<script src="/scripts/services/data-service.js"></script>
|
||||||
<script src="/scripts/services/pub-sub-service.js"></script>
|
<script src="/scripts/services/pub-sub-service.js"></script>
|
||||||
<script src="/scripts/directives/module-directive.js"></script>
|
<script src="/scripts/directives/module-directive.js"></script>
|
||||||
<script src="/scripts/directives/js-init-directive.js"></script>
|
<script src="/scripts/directives/js-init-directive.js"></script>
|
||||||
<script src="/scripts/controllers/bookmarks-controller.js"></script>
|
<script src="/scripts/controllers/bookmarks-controller.js"></script>
|
||||||
<script src="/scripts/controllers/home-controller.js"></script>
|
<script src="/scripts/controllers/home-controller.js"></script>
|
||||||
<script src="/scripts/controllers/settings-controller.js"></script>
|
<script src="/scripts/controllers/settings-controller.js"></script>
|
||||||
<script src="/scripts/controllers/login-controller.js"></script>
|
<script src="/scripts/controllers/login-controller.js"></script>
|
||||||
<script src="/scripts/controllers/tags-controller.js"></script>
|
<script src="/scripts/controllers/tags-controller.js"></script>
|
||||||
<script src="/scripts/controllers/advice-controller.js"></script>
|
<script src="/scripts/controllers/advice-controller.js"></script>
|
||||||
<script src="/scripts/controllers/menus-controller.js"></script>
|
<script src="/scripts/controllers/menus-controller.js"></script>
|
||||||
<script src="/scripts/controllers/edit-controller.js"></script>
|
<script src="/scripts/controllers/edit-controller.js"></script>
|
||||||
<script src="/scripts/controllers/bookmark-info-controller.js"></script>
|
<script src="/scripts/controllers/bookmark-info-controller.js"></script>
|
||||||
<script src="/scripts/controllers/search-controller.js"></script>
|
<script src="/scripts/controllers/search-controller.js"></script>
|
||||||
<script src="/scripts/controllers/hot-controller.js"></script>
|
<script src="/scripts/controllers/hot-controller.js"></script>
|
||||||
<script src="/scripts/controllers/praise-controller.js"></script>
|
<script src="/scripts/controllers/praise-controller.js"></script>
|
||||||
<script src="/scripts/controllers/note-controller.js"></script>
|
<script src="/scripts/controllers/note-controller.js"></script>
|
||||||
<script src="/scripts/externe/semantic.min.js"></script>
|
<script src="/scripts/externe/semantic.min.js"></script>
|
||||||
<script src="/scripts/externe/calendar.min.js"></script>
|
<script src="/scripts/externe/calendar.min.js"></script>
|
||||||
<script src="/scripts/externe/jquery.uploadfile.min.js"></script>
|
<script src="/scripts/externe/jquery.uploadfile.min.js"></script>
|
||||||
<script src="/scripts/externe/ng-infinite-scroll.min.js"></script>
|
<script src="/scripts/externe/ng-infinite-scroll.min.js"></script>
|
||||||
<script src="/scripts/externe/angular-sortable-view.min.js"></script>
|
<script src="/scripts/externe/angular-sortable-view.min.js"></script>
|
||||||
<script src="/scripts/externe/ngDialog.min.js"></script>
|
<script src="/scripts/externe/ngDialog.min.js"></script>
|
||||||
<script src="/scripts/externe/clipboard.min.js"></script>
|
<script src="/scripts/externe/clipboard.min.js"></script>
|
||||||
<script src="/scripts/externe/timeago.min.js"></script>
|
<script src="/scripts/externe/timeago.min.js"></script>
|
||||||
<script src="/scripts/externe/md5.js"></script>
|
<script src="/scripts/externe/md5.js"></script>
|
||||||
<script src="/scripts/externe/pnglib.js"></script>
|
<script src="/scripts/externe/pnglib.js"></script>
|
||||||
<script src="/scripts/externe/identicon.js"></script>
|
<script src="/scripts/externe/identicon.js"></script>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,6 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
$scope.quickUrl = {};
|
$scope.quickUrl = {};
|
||||||
$scope.longPress = false;
|
$scope.longPress = false;
|
||||||
$scope.user = {};
|
$scope.user = {};
|
||||||
$scope.searching = true;
|
|
||||||
|
|
||||||
// 防止在登陆的情况下,在浏览器里面直接输入url,这时候要更新菜单选项
|
// 防止在登陆的情况下,在浏览器里面直接输入url,这时候要更新菜单选项
|
||||||
pubSubService.subscribe('Common.menuActive', $scope, function (event, params) {
|
pubSubService.subscribe('Common.menuActive', $scope, function (event, params) {
|
||||||
|
|
@ -32,19 +31,38 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
$scope.user = data;
|
$scope.user = data;
|
||||||
if(data.username === 'lcq') {
|
if(data.username === 'lcq') {
|
||||||
$scope.loginMenus[dataService.LoginIndexHot].show = false;
|
$scope.loginMenus[dataService.LoginIndexHot].show = false;
|
||||||
console.info($scope.loginMenus)
|
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
.catch((err) => {
|
.catch((err) => {
|
||||||
|
|
||||||
});
|
});
|
||||||
|
|
||||||
|
$scope.searchIcon = function(item) {
|
||||||
|
if(item.t === 0) {
|
||||||
|
item.icon = "book link icon";
|
||||||
|
} else if(item.t === 1) {
|
||||||
|
item.icon = "google link icon";
|
||||||
|
} else if(item.t === 2) {
|
||||||
|
item.icon = "github link icon";
|
||||||
|
} else if(item.t === 3) {
|
||||||
|
item.icon = "stack overflow link icon";
|
||||||
|
} else if(item.t === 4) {
|
||||||
|
item.icon = "bimobject link icon";
|
||||||
|
} else if(item.t === 5) {
|
||||||
|
item.icon = "file alternate link icon";
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @func
|
* @func
|
||||||
* @desc 点击搜索按钮搜索书签
|
* @desc 点击搜索按钮搜索书签
|
||||||
*/
|
*/
|
||||||
$scope.search = function (searchWord, searchOption) {
|
$scope.search = function (searchWord, searchOption) {
|
||||||
console.log('search......', searchWord);
|
console.log('search......', searchWord);
|
||||||
|
if (!searchWord) {
|
||||||
|
toastr.error('请输入搜索关键字', "错误");
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
$scope.login = true;
|
$scope.login = true;
|
||||||
// var searchOption = $('.js-search-option').dropdown('get value') || 0;
|
// var searchOption = $('.js-search-option').dropdown('get value') || 0;
|
||||||
|
|
@ -81,6 +99,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
t: searchOption,
|
t: searchOption,
|
||||||
d: searchWord,
|
d: searchWord,
|
||||||
}
|
}
|
||||||
|
$scope.searchIcon(newItem)
|
||||||
var delIndex = -1;
|
var delIndex = -1;
|
||||||
$scope.searchHistory.unshift(newItem);
|
$scope.searchHistory.unshift(newItem);
|
||||||
$scope.searchHistory.forEach((item, index) => {
|
$scope.searchHistory.forEach((item, index) => {
|
||||||
|
|
@ -98,17 +117,9 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.readySearch = function () {
|
$scope.searchByHistory = function (type, data, $event) {
|
||||||
$scope.searching = true;
|
console.log("searchByHistory", type, data);
|
||||||
}
|
$event && $event.stopPropagation();
|
||||||
|
|
||||||
$scope.exitSearch = function () {
|
|
||||||
$scope.searching = false;
|
|
||||||
$scope.searchWord = "";
|
|
||||||
$(".search-item").val("");
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.searchByHistory = function (type, data) {
|
|
||||||
$scope.searchWord = data;
|
$scope.searchWord = data;
|
||||||
$('.search-item').val($scope.searchWord);
|
$('.search-item').val($scope.searchWord);
|
||||||
|
|
||||||
|
|
@ -119,10 +130,12 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
$('.js-search-option .menu .item').removeClass('active');
|
$('.js-search-option .menu .item').removeClass('active');
|
||||||
$('.js-search-option .menu .item:eq(' + type + ')').addClass('active');
|
$('.js-search-option .menu .item:eq(' + type + ')').addClass('active');
|
||||||
$('.js-history-popup').removeClass('visible').addClass('hidden');
|
$('.js-history-popup').removeClass('visible').addClass('hidden');
|
||||||
$scope.search(data);
|
$scope.search(data, type);
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.delHistory = function (type, data) {
|
$scope.delHistory = function (type, data, $event) {
|
||||||
|
console.log("delHistory", type, data);
|
||||||
|
$event && $event.stopPropagation();
|
||||||
var delIndex = -1;
|
var delIndex = -1;
|
||||||
$scope.searchHistory.forEach((item, index) => {
|
$scope.searchHistory.forEach((item, index) => {
|
||||||
if (index >= 1 && item.t == type && item.d == data) {
|
if (index >= 1 && item.t == type && item.d == data) {
|
||||||
|
|
@ -132,9 +145,13 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
if (delIndex >= 0) {
|
if (delIndex >= 0) {
|
||||||
$scope.searchHistory.splice(delIndex, 1);
|
$scope.searchHistory.splice(delIndex, 1);
|
||||||
}
|
}
|
||||||
|
if(!type && !data) {
|
||||||
|
$scope.searchHistory = [];
|
||||||
|
}
|
||||||
saveHistory();
|
saveHistory();
|
||||||
|
toastr.info("历史搜索已全部清空", "提示");
|
||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
$('.js-history-popup').removeClass('hidden').addClass('visible');
|
type && data && $('.js-history-popup').removeClass('hidden').addClass('visible');
|
||||||
}, 500)
|
}, 500)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -221,11 +238,15 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
bookmarkService.userInfo({})
|
bookmarkService.userInfo({})
|
||||||
.then((user) => {
|
.then((user) => {
|
||||||
$scope.searchHistory = JSON.parse(user.search_history || '[]');
|
$scope.searchHistory = JSON.parse(user.search_history || '[]');
|
||||||
$scope.quickUrl = JSON.parse(user.quick_url || '{}');
|
$scope.quickUrl = JSON.parse(user.quick_url || '{}');
|
||||||
|
$scope.searchHistory.forEach((item, index) => {
|
||||||
|
$scope.searchIcon(item)
|
||||||
|
})
|
||||||
$timeout(function () {
|
$timeout(function () {
|
||||||
var showStyle = (user && user.show_style) || 'navigate';
|
var showStyle = (user && user.show_style) || 'navigate';
|
||||||
if (showStyle) {
|
if (showStyle) {
|
||||||
|
|
@ -275,7 +296,6 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
}
|
}
|
||||||
|
|
||||||
if (key == 'S') {
|
if (key == 'S') {
|
||||||
$scope.searching = true;
|
|
||||||
$(".search-item").focus();
|
$(".search-item").focus();
|
||||||
var count = 1;
|
var count = 1;
|
||||||
var sId = setInterval(function() {
|
var sId = setInterval(function() {
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
<div class="js-menu" ng-controller="menuCtr">
|
<div class="js-menu" ng-controller="menuCtr">
|
||||||
<div class="ui huge menu js-login-in" ng-if="login">
|
<div class="ui huge menu js-login-in" ng-if="login">
|
||||||
<a class="item js-single-menu" ng-class="{selected:$index===selectLoginIndex}" style="cursor:default;" ui-sref-opts="{reload: true}" ng-repeat="menu in loginMenus" ui-sref="{{ menu.uiSref }}({searchWord:null})" ng-show="menu.show !== false" js-menu-init>
|
<a class="item js-single-menu" ng-class="{selected:$index===selectLoginIndex}" style="cursor:default;" ui-sref-opts="{reload: true}" ng-repeat="menu in loginMenus"
|
||||||
|
ui-sref="{{ menu.uiSref }}({searchWord:null})" ng-show="menu.show !== false" js-menu-init>
|
||||||
<div>{{ menu.title }}</div>
|
<div>{{ menu.title }}</div>
|
||||||
<div class="ui floating simple dropdown icon js-bookmark-dropdown" ng-if="$index==0" ng-click="$event.stopPropagation();">
|
<div class="ui floating simple dropdown icon js-bookmark-dropdown" ng-if="$index==0" ng-click="$event.stopPropagation();">
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
|
@ -19,81 +20,61 @@
|
||||||
<label>表格</label>
|
<label>表格</label>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<!-- 卡片这个傻逼模式就没用过,干掉 -->
|
|
||||||
<!-- <div class="field item js-field-card" ng-click="updateShowStyle('card')">
|
|
||||||
<div class="ui radio checkbox js-radio-card">
|
|
||||||
<input type="radio" name="show-style">
|
|
||||||
<label>卡片</label>
|
|
||||||
</div>
|
|
||||||
</div> -->
|
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</a>
|
||||||
<div id="js-search" style="width: 1500px;">
|
<div id="js-search" style="width: 1500px;">
|
||||||
<div class="ui transparent fluid icon input" style="height: 100%;margin-left: 10px;">
|
<div class="ui transparent fluid icon input" style="height: 100%;margin-left: 10px;">
|
||||||
<label for="lcq">
|
<input style="padding-left: 0px;" class="prompt search-item js-search-input" type="text" ng-model="searchWord" placeholder="search..."
|
||||||
<div class="ui inline dropdown js-search-option" style="margin-top:3px;height: 100%;" js-search-option-init>
|
ng-keypress="($event.which === 13)?search(searchWord, 1):0" data-position="bottom left" data-variation="large">
|
||||||
<!-- <div class="text " style="color:#C9C9C9;font-weight:normal;">书签</div> -->
|
<div class="ui fluid popup top left transition hidden js-popup-search js-history-popup" ng-if="searchHistory.length > 0" style="margin-left: 2px; margin-top: -1px;">
|
||||||
<!-- <i class="angle down icon"></i> -->
|
<div class="ui internally grid">
|
||||||
<div class="menu">
|
<div class="row js-history-word" style="height: 20px;" ng-repeat="item in searchHistory">
|
||||||
<div class="item" data-value="{{$index}}" ng-class="{active:$index==0}" ng-repeat="historyType in historyTypes">{{historyType}}</div>
|
<div class="sixteen wide column js-search-again" style="margin: -10px 0px 0px -8px;cursor:default;"
|
||||||
</div>
|
ng-click="searchByHistory(item.t, item.d)">
|
||||||
</div>
|
<i class="{{ item.icon }}" style="cursor:default;"></i>
|
||||||
</label>
|
<span style="color: #7B77C5">{{ item.d}}</span>
|
||||||
<input style="padding-left: 0px;" class="prompt search-item js-search-input" type="text" ng-focus="readySearch()" ng-model="searchWord" placeholder="search..." ng-keypress="($event.which === 13)?search(searchWord, 0):0" data-position="bottom left" data-variation="large" id="lcq">
|
|
||||||
<div class="ui fluid popup top left transition hidden" style="padding-left: 0px; padding-right: -10px;">
|
|
||||||
<div class="ui selection list">
|
|
||||||
<div class="item" ng-repeat="item in searchHistory" ng-click="searchByHistory(item.t, item.d)" style="height:30px;">
|
|
||||||
<div class="right floated content">
|
|
||||||
<span style="margin-right:10px;">{{ historyTypes[item.t] }}</span>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="content">
|
<!-- <div class="center aligned two wide column" style="margin: -10px 0px 0px 0px;padding:0px;">
|
||||||
<span style="margin-left:10px;">{{ item.d}}</span>
|
<div style="cursor:default;float: right;" ng-click="delHistory(item.t, item.d)">删除</div>
|
||||||
|
</div> -->
|
||||||
|
</div>
|
||||||
|
<div class="row" style="height: 20px;background: #f2f2f2" ng-click="delHistory()">
|
||||||
|
<div class="center aligned sixteen wide column" style="margin: -10px 0px 0px 0px;padding:0px;">
|
||||||
|
<div style="cursor:pointer;float: right;">清空全部</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div ng-if="searching">
|
<div style="margin-top: 13px;">
|
||||||
<span style="margin-left: -25px;"><i class="bookmark outline link icon" title="书签搜索" ng-click="search(searchWord, 0)" style="cursor:default;margin-top:16px;margin-right: 8px;"></i></span>
|
<span style="margin-left: -25px;"><i class="google link icon" title="谷歌搜索(输入关键字按回车键默认搜索引擎)" ng-click="search(searchWord, 1)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span><i class="google link icon" title="谷歌搜索" ng-click="search(searchWord, 1)" style="cursor:default;margin-top:16px;margin-right: 8px;"></i></span>
|
<span><i class="bimobject link icon" title="百度搜索" ng-click="search(searchWord, 4)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span><i class="bimobject link icon" title="百度搜索" ng-click="search(searchWord, 4)" style="cursor:default;margin-top:16px;margin-right: 8px;"></i></span>
|
<span><i class="book link icon" title="书签搜索" ng-click="search(searchWord, 0)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span><i class="github link icon" title="Github 搜索" ng-click="search(searchWord, 2)" style="cursor:default;margin-top:16px;margin-right: 8px;"></i></span>
|
<span><i class="file alternate link icon" title="备忘录搜索" ng-click="search(searchWord, 5)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span><i class="stack overflow link icon" title="栈溢出搜索" ng-click="search(searchWord, 3)" style="cursor:default;margin-top:16px;margin-right: 8px;"></i></span>
|
<span><i class="github link icon" title="Github 搜索" ng-click="search(searchWord, 2)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span>|</span>
|
<span><i class="stack overflow link icon" title="栈溢出搜索" ng-click="search(searchWord, 3)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span><i class="add square link icon" title="添加书签" ng-click="showAddBookmarkMoadl()" style="cursor:default;margin-top:16px;margin-right: 8px;margin-left: 8px;"></i></span>
|
<span style="margin: 0px 5px">▏</span>
|
||||||
<span><i class="arrow right link icon" title="退出搜索" ng-click="exitSearch()" style="cursor:default;margin-top:16px;"></i></span>
|
<span data-tooltip="添加书签,可按Insert快速打开添加页面" ng-click="showAddBookmarkMoadl()">
|
||||||
|
<i class="add square link icon" style="cursor:default;margin-right: 8px;margin-left: 1px;"></i>
|
||||||
|
</span>
|
||||||
|
<span data-tooltip="如果你觉得我的系统对你有帮助,请点击跳转到 Github 为我 Star" ng-click="star()" ng-show="user.username !== 'lcq'">
|
||||||
|
<i class="star link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
|
</span>
|
||||||
|
<span class="suggest" ng-click="showUpdate()" ng-show="user.username !== 'lcq'">
|
||||||
|
<i class="info circle link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
|
</span>
|
||||||
|
<span data-tooltip="请我喝杯咖啡" ng-click="coffee()" ng-show="user.username !== 'lcq'">
|
||||||
|
<i class="coffee link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
|
</span>
|
||||||
|
<span data-tooltip="退出登陆" ng-click="logout()">
|
||||||
|
<i class="sign out link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
|
</span>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<div class="right menu" ng-if="!searching">
|
|
||||||
<div class="item" style="padding:0 8px 0 13px;" title="添加书签" ng-click="showAddBookmarkMoadl()">
|
|
||||||
<span data-tooltip="添加书签,可按Insert快速打开添加页面">
|
|
||||||
<i class="add square icon"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="item" style="padding:0 8px 0 13px;" ng-click="star()" ng-show="user.username !== 'lcq'">
|
|
||||||
<span data-tooltip="如果你觉得我的系统对你有帮助,请点击跳转到 Github 为我 Star">
|
|
||||||
<i class="star icon"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="item" style="padding:0 8px 0 13px;" ng-click="showUpdate()" ng-show="user.username !== 'lcq'">
|
|
||||||
<span class="suggest">
|
|
||||||
<i class="info circle icon"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="item" style="padding:0 8px 0 13px;" ng-click="coffee()" ng-show="user.username !== 'lcq'">
|
|
||||||
<span data-tooltip="请我喝杯咖啡">
|
|
||||||
<i class="coffee icon"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
<div class="item" style="padding:0 8px 0 13px;">
|
|
||||||
<span data-tooltip="退出登陆">
|
|
||||||
<i class="sign out icon" title="退出登陆" ng-click="logout()"></i>
|
|
||||||
</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
</div>
|
||||||
<div class="ui huge menu js-not-login-in" ng-if="!login">
|
<div class="ui huge menu js-not-login-in" ng-if="!login">
|
||||||
<a class="item" ng-class="{selected:$index==selectNotLoginIndex}" ui-sref="{{ menu.uiSref}}" ui-sref-opts="{reload: true}" ng-repeat="menu in notLoginMenus">{{ menu.title}}</a>
|
<a class="item" ng-class="{selected:$index==selectNotLoginIndex}" ui-sref="{{ menu.uiSref}}" ui-sref-opts="{reload: true}"
|
||||||
|
ng-repeat="menu in notLoginMenus">{{ menu.title}}</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
Loading…
Reference in New Issue