增加导航栏目
This commit is contained in:
parent
48cc896e71
commit
8fea4e8167
|
|
@ -4,406 +4,4 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
||||||
$window.location = "http://m.mybookmark.cn/#/tags";
|
$window.location = "http://m.mybookmark.cn/#/tags";
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
$scope.bookmarks = []; // 书签数据
|
|
||||||
$scope.showSearch = false; // 搜索对话框
|
|
||||||
$scope.bookmarkNormalHover = false;
|
|
||||||
$scope.bookmarkEditHover = false;
|
|
||||||
$scope.hoverBookmark = null;
|
|
||||||
var menusScope = $('div[ng-controller="menuCtr"]').scope();
|
|
||||||
$scope.showStyle = ($stateParams && $stateParams.showStyle) || (menusScope && menusScope.showStyle); // 显示风格'navigate', 'costomTag', 'card', 'table'
|
|
||||||
const perPageItems = 20;
|
|
||||||
var dialog = null;
|
|
||||||
$scope.totalPages = 0;
|
|
||||||
$scope.currentPage = 1;
|
|
||||||
$scope.inputPage = '';
|
|
||||||
$scope.loadBusy = false;
|
|
||||||
$scope.waitDelBookmark = {};
|
|
||||||
$scope.order = [false, false, false];
|
|
||||||
$scope.order[($stateParams && $stateParams.orderIndex) || 0] = true;
|
|
||||||
$scope.bookmarkData = {};
|
|
||||||
$scope.costomTags = [{
|
|
||||||
index: 0,
|
|
||||||
clicked: true,
|
|
||||||
name: '最近使用'
|
|
||||||
}, {
|
|
||||||
index: 1,
|
|
||||||
clicked: false,
|
|
||||||
name: '最近添加'
|
|
||||||
}, {
|
|
||||||
index: 2,
|
|
||||||
clicked: false,
|
|
||||||
name: '最多使用'
|
|
||||||
}]
|
|
||||||
var timeagoInstance = timeago();
|
|
||||||
|
|
||||||
updateShowStyle();
|
|
||||||
getBookmarks();
|
|
||||||
|
|
||||||
$scope.changeCurrentPage = function (currentPage) {
|
|
||||||
currentPage = parseInt(currentPage) || 0;
|
|
||||||
console.log('currentPage = ', currentPage);
|
|
||||||
if (currentPage <= $scope.totalPages && currentPage >= 1) {
|
|
||||||
$scope.currentPage = currentPage;
|
|
||||||
$scope.inputPage = '';
|
|
||||||
getBookmarks();
|
|
||||||
} else {
|
|
||||||
$scope.currentPage = $scope.totalPages
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.jumpToUrl = async function (url, id) {
|
|
||||||
$window.open(url, '_blank');
|
|
||||||
await post("clickBookmark", { id });
|
|
||||||
|
|
||||||
|
|
||||||
if ($scope.showStyle != 'navigate') {
|
|
||||||
var bookmarks = $scope.showStyle == 'table' ? $scope.bookmarkData.bookmarks : $scope.bookmarkData;
|
|
||||||
bookmarks.forEach(function (bookmark) {
|
|
||||||
if (bookmark.id == id) {
|
|
||||||
bookmark.click_count += 1;
|
|
||||||
bookmark.last_click = $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
$timeout(function () {
|
|
||||||
timeagoInstance.cancel();
|
|
||||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.delBookmark = function (bookmark) {
|
|
||||||
console.log('delBookmark..........')
|
|
||||||
$scope.waitDelBookmark = $.extend(true, {}, bookmark); // 利用jQuery执行深度拷贝
|
|
||||||
dialog = ngDialog.open({
|
|
||||||
template: './views/dialog-del-bookmark.html',
|
|
||||||
className: 'ngdialog-theme-default',
|
|
||||||
scope: $scope
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.confirmDelBookmark = function (bookmarkId) {
|
|
||||||
var params = {
|
|
||||||
id: bookmarkId
|
|
||||||
}
|
|
||||||
ngDialog.close(dialog);
|
|
||||||
bookmarkService.delBookmark(params)
|
|
||||||
.then((data) => {
|
|
||||||
$("#" + bookmarkId).transition({
|
|
||||||
animation: dataService.animation(),
|
|
||||||
duration: 500,
|
|
||||||
onComplete: function () {
|
|
||||||
$("#" + bookmarkId).remove();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
toastr.success($scope.waitDelBookmark.title + ' 书签删除成功!', "提示");
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
toastr.error($scope.waitDelBookmark.title + ' 书签删除失败!错误提示:' + JSON.stringify(err), "提示");
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.editBookmark = function (id) {
|
|
||||||
pubSubService.publish('bookmarksCtr.editBookmark', { id });
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.detailBookmark = async function (b) {
|
|
||||||
var bookmark = $.extend(true, {}, b); // 利用jQuery执行深度拷贝
|
|
||||||
bookmark.own = true;
|
|
||||||
if ($scope.showStyle == 'navigate') {
|
|
||||||
bookmark.tags = [{
|
|
||||||
id: bookmark.tag_id,
|
|
||||||
name: bookmark.tag_name
|
|
||||||
}];
|
|
||||||
}
|
|
||||||
pubSubService.publish('TagCtr.showBookmarkInfo', bookmark);
|
|
||||||
await post("clickBookmark", { id: bookmark.id });
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.copy = function (url) {
|
|
||||||
dataService.clipboard(url);
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.jumpToTags = function (tagId) {
|
|
||||||
$state.go('tags', {
|
|
||||||
tagId: tagId,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.addBookmarkbyFile = function () {
|
|
||||||
console.log("addBookmarkbyFile");
|
|
||||||
$state.go('settings', {
|
|
||||||
formIndex: 2,
|
|
||||||
});
|
|
||||||
pubSubService.publish('Common.menuActive', {
|
|
||||||
login: true,
|
|
||||||
index: dataService.LoginIndexSettings
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.closeMsg = function () {
|
|
||||||
$('.js-msg').transition({
|
|
||||||
animation: dataService.animation(),
|
|
||||||
duration: '500ms',
|
|
||||||
onComplete: function () {
|
|
||||||
$(".js-msg").remove();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.loadCardData = function () {
|
|
||||||
console.log('loadCardData.........')
|
|
||||||
if (!$scope.loadBusy) {
|
|
||||||
$scope.changeCurrentPage($scope.currentPage += 1)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.changeOrder = function (index) {
|
|
||||||
if (index < 0 || index >= $scope.order.length) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
$scope.order = $scope.order.map(() => false);
|
|
||||||
$scope.order[index] = true;
|
|
||||||
$scope.bookmarks = [];
|
|
||||||
if ($scope.order[0]) {
|
|
||||||
$scope.bookmarkData.bookmarks.sort(clickCmp)
|
|
||||||
$scope.bookmarkData.bookmarks.forEach((bookmark) => {
|
|
||||||
if (bookmark.type == 1) {
|
|
||||||
$scope.bookmarks.push(bookmark);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else if ($scope.order[1]) {
|
|
||||||
$scope.bookmarkData.bookmarks.sort((a, b) => a.created_at >= b.created_at ? -1 : 1);
|
|
||||||
$scope.bookmarkData.bookmarks.forEach((bookmark) => {
|
|
||||||
if (bookmark.type == 2) {
|
|
||||||
$scope.bookmarks.push(bookmark);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$scope.bookmarkData.bookmarks.sort((a, b) => a.last_click >= b.last_click ? -1 : 1);
|
|
||||||
$scope.bookmarkData.bookmarks.forEach((bookmark) => {
|
|
||||||
if (bookmark.type == 3) {
|
|
||||||
$scope.bookmarks.push(bookmark);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
}
|
|
||||||
$timeout(function () {
|
|
||||||
timeagoInstance.cancel();
|
|
||||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
|
|
||||||
$scope.updateCostomTagBookmarks = function (index) {
|
|
||||||
console.log('updateCostomTagBookmarks index = ' + index);
|
|
||||||
$scope.costomTags.forEach((tag, i) => {
|
|
||||||
$scope.costomTags[i].clicked = false;
|
|
||||||
})
|
|
||||||
$scope.costomTags[index].clicked = true;
|
|
||||||
|
|
||||||
if (index == 0) {
|
|
||||||
$scope.bookmarkData.sort((a, b) => a.last_click >= b.last_click ? -1 : 1);
|
|
||||||
} else if (index == 1) {
|
|
||||||
$scope.bookmarkData.sort((a, b) => a.created_at >= b.created_at ? -1 : 1);
|
|
||||||
} else {
|
|
||||||
$scope.bookmarkData.sort(clickCmp)
|
|
||||||
}
|
|
||||||
$scope.bookmarks = $scope.bookmarkData.slice(0, 79);
|
|
||||||
}
|
|
||||||
|
|
||||||
pubSubService.subscribe('EditCtr.inserBookmarsSuccess', $scope, function (event, data) {
|
|
||||||
console.log('subscribe EditCtr.inserBookmarsSuccess', JSON.stringify(data));
|
|
||||||
|
|
||||||
var menusScope = $('div[ng-controller="menuCtr"]').scope();
|
|
||||||
if (menusScope.login && menusScope.selectLoginIndex == 0) {
|
|
||||||
$scope.forbidTransition = true;
|
|
||||||
if ($scope.showStyle == 'card') {
|
|
||||||
var find = false;
|
|
||||||
$scope.bookmarks.forEach((bookmark) => {
|
|
||||||
if (bookmark.id == data.id) {
|
|
||||||
bookmark.title = data.title;
|
|
||||||
bookmark.url = data.url;
|
|
||||||
bookmark.tags = data.tags;
|
|
||||||
bookmark.description = data.description;
|
|
||||||
find = true;
|
|
||||||
}
|
|
||||||
})
|
|
||||||
if (!find) {
|
|
||||||
$scope.bookmarks.unshift(data);
|
|
||||||
$timeout(function () {
|
|
||||||
timeagoInstance.cancel();
|
|
||||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
|
||||||
}, 100)
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$scope.forbidTransition = true;
|
|
||||||
getBookmarks();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
$scope.setHoverBookmark = function (bookmark) {
|
|
||||||
$scope.hoverBookmark = bookmark;
|
|
||||||
}
|
|
||||||
|
|
||||||
// 在输入文字的时候也会触发,所以不要用Ctrl,Shift之类的按键
|
|
||||||
$document.bind("keydown", function (event) {
|
|
||||||
$scope.$apply(function () {
|
|
||||||
var key = event.key.toUpperCase();
|
|
||||||
console.log(key);
|
|
||||||
if ($scope.hoverBookmark && dataService.keyShortcuts()) {
|
|
||||||
if (key == 'E') {
|
|
||||||
$scope.editBookmark($scope.hoverBookmark.id)
|
|
||||||
} else if (key == 'I') {
|
|
||||||
$scope.detailBookmark($scope.hoverBookmark)
|
|
||||||
} else if (key == 'D') {
|
|
||||||
$scope.delBookmark($scope.hoverBookmark)
|
|
||||||
} else if (key == 'C') {
|
|
||||||
$scope.copy($scope.hoverBookmark.url)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
})
|
|
||||||
});
|
|
||||||
|
|
||||||
async function getBookmarks() {
|
|
||||||
var params = {}
|
|
||||||
params.showStyle = $scope.showStyle
|
|
||||||
params.currentPage = $scope.currentPage;
|
|
||||||
params.perPageItems = perPageItems;
|
|
||||||
|
|
||||||
if (!params.showStyle) {
|
|
||||||
bookmarkService.userInfo({})
|
|
||||||
.then((user) => {
|
|
||||||
$scope.showStyle = (user && user.show_style) || 'navigate';
|
|
||||||
updateShowStyle();
|
|
||||||
getBookmarks(); // 拿到默认显示风格了,继续取获取书签
|
|
||||||
})
|
|
||||||
.catch((err) => dataService.netErrorHandle(err, $state));
|
|
||||||
} else {
|
|
||||||
$scope.loadBusy = true;
|
|
||||||
if (params.showStyle == 'table' && (!$scope.forbidTransition)) {
|
|
||||||
$('.js-table-bookmarks').transition('hide');
|
|
||||||
}
|
|
||||||
bookmarkService.getBookmarks(params)
|
|
||||||
.then((data) => {
|
|
||||||
if (params.showStyle != 'navigate') {
|
|
||||||
$scope.bookmarkData = data;
|
|
||||||
$scope.totalPages = Math.ceil(data.totalItems / perPageItems);
|
|
||||||
if (data.totalItems == 0) {
|
|
||||||
toastr.info('您还没有书签,请点击菜单栏的添加按钮进行添加', "提示");
|
|
||||||
}
|
|
||||||
if (params.showStyle == 'card') {
|
|
||||||
$scope.bookmarkData.bookmarks.sort((a, b) => a.created_at >= b.created_at ? -1 : 1);
|
|
||||||
$scope.bookmarkData.bookmarks.forEach(bookmark => {
|
|
||||||
if (bookmark.type == 2) {
|
|
||||||
bookmark.edit = false;
|
|
||||||
$scope.bookmarks.push(bookmark);
|
|
||||||
}
|
|
||||||
})
|
|
||||||
$timeout(function () {
|
|
||||||
timeagoInstance.cancel();
|
|
||||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
|
||||||
}, 100)
|
|
||||||
} else if (params.showStyle == 'costomTag') {
|
|
||||||
$scope.costomTags.forEach((tag) => {
|
|
||||||
if (tag.clicked) {
|
|
||||||
$scope.updateCostomTagBookmarks(tag.index)
|
|
||||||
}
|
|
||||||
})
|
|
||||||
} else {
|
|
||||||
$scope.changeOrder($scope.order.indexOf(true));
|
|
||||||
}
|
|
||||||
} else {
|
|
||||||
$scope.bookmarks = data;
|
|
||||||
if ($scope.bookmarks.length <= 2) {
|
|
||||||
$(".js-msg").removeClass("hidden");
|
|
||||||
}
|
|
||||||
if ($scope.bookmarks.length == 0) {
|
|
||||||
toastr.info('您还没有书签,请点击菜单栏的添加按钮进行添加', "提示");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
pubSubService.publish('Common.menuActive', {
|
|
||||||
login: true,
|
|
||||||
index: dataService.LoginIndexBookmarks
|
|
||||||
});
|
|
||||||
if (!$scope.forbidTransition) {
|
|
||||||
transition();
|
|
||||||
}
|
|
||||||
$scope.forbidTransition = false;
|
|
||||||
$scope.loadBusy = false;
|
|
||||||
})
|
|
||||||
.catch((err) => {
|
|
||||||
dataService.netErrorHandle(err, $state);
|
|
||||||
$scope.loadBusy = false;
|
|
||||||
});
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function updateShowStyle() {
|
|
||||||
$timeout(function () {
|
|
||||||
if ($scope.showStyle) {
|
|
||||||
$('.js-bookmark-dropdown' + ' .radio.checkbox').checkbox('set unchecked');
|
|
||||||
$('.js-radio-' + $scope.showStyle).checkbox('set checked');
|
|
||||||
$('.js-bookmark-dropdown' + ' .field.item').removeClass('active selected');
|
|
||||||
$('.js-field-' + $scope.showStyle).addClass('active selected');
|
|
||||||
}
|
|
||||||
}, 1000)
|
|
||||||
}
|
|
||||||
|
|
||||||
function transition() {
|
|
||||||
if ($scope.showStyle == 'card' && $scope.currentPage > 1) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
var className = 'js-segment-navigate';
|
|
||||||
if ($scope.showStyle == 'card') {
|
|
||||||
className = 'js-segment-card'
|
|
||||||
} else if ($scope.showStyle == 'table') {
|
|
||||||
className = 'js-table-bookmarks'
|
|
||||||
} else if ($scope.showStyle == 'costomTag') {
|
|
||||||
className = 'js-segment-costomTag'
|
|
||||||
}
|
|
||||||
$('.' + className).transition('hide');
|
|
||||||
$('.' + className).transition({
|
|
||||||
animation: dataService.animation(),
|
|
||||||
duration: 500,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO: 我要将编辑按钮固定在容器的右上角
|
|
||||||
$(window).resize(updateEditPos);
|
|
||||||
updateEditPos();
|
|
||||||
|
|
||||||
function updateEditPos() {
|
|
||||||
if ($scope.showStyle == 'navigate') {
|
|
||||||
for (var i = 1; i <= 100; i += 10) {
|
|
||||||
setTimeout(function () {
|
|
||||||
var offset = $('.js-segment-navigate').offset();
|
|
||||||
if (offset) {
|
|
||||||
var t = offset.top;
|
|
||||||
var l = offset.left;
|
|
||||||
var w = $('.js-segment-navigate').width();
|
|
||||||
$('.js-bookmark-edit').offset({
|
|
||||||
top: t + 10,
|
|
||||||
left: l + w - 10,
|
|
||||||
})
|
|
||||||
}
|
|
||||||
}, 100 * i)
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
function clickCmp(a, b) {
|
|
||||||
var click1 = parseInt(a.click_count);
|
|
||||||
var click2 = parseInt(b.click_count);
|
|
||||||
if (click1 > click2) {
|
|
||||||
return -1;
|
|
||||||
} else if (click1 == click2) {
|
|
||||||
return a.created_at >= b.created_at ? -1 : 1;
|
|
||||||
} else {
|
|
||||||
return 1;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}]);
|
}]);
|
||||||
|
|
|
||||||
|
|
@ -1,165 +1,165 @@
|
||||||
app.factory('dataService', [function () {
|
app.factory('dataService', [function () {
|
||||||
const service = {
|
const service = {
|
||||||
// 登陆索引
|
// 登陆索引
|
||||||
LoginIndexBookmarks: 0,
|
LoginIndexBookmarks: 0,
|
||||||
LoginIndexTags: 1,
|
LoginIndexTags: 1,
|
||||||
LoginIndexNote: 2,
|
LoginIndexNote: 2,
|
||||||
LoginIndexHot: 3,
|
LoginIndexHot: 3,
|
||||||
LoginIndexSettings: 4,
|
LoginIndexSettings: 4,
|
||||||
LoginIndexAdvice: 5,
|
LoginIndexAdvice: 5,
|
||||||
LoginIndexPraise: 6,
|
LoginIndexPraise: 6,
|
||||||
|
|
||||||
// 非登陆索引
|
// 非登陆索引
|
||||||
NotLoginIndexHome: 0,
|
NotLoginIndexHome: 0,
|
||||||
NotLoginIndexLogin: 1,
|
NotLoginIndexLogin: 1,
|
||||||
NotLoginIndexHot: 2,
|
NotLoginIndexHot: 2,
|
||||||
NotLoginIndexPraise: 3,
|
NotLoginIndexPraise: 3,
|
||||||
|
|
||||||
loginMenus: [{
|
loginMenus: [{
|
||||||
uiSref: 'bookmarks',
|
uiSref: 'bookmarks',
|
||||||
title: '书签'
|
title: '导航'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'tags',
|
uiSref: 'tags',
|
||||||
title: '分类'
|
title: '分类'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'note',
|
uiSref: 'note',
|
||||||
title: '备忘'
|
title: '备忘'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'weixin-article',
|
uiSref: 'weixin-article',
|
||||||
title: '热门'
|
title: '热门'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'settings',
|
uiSref: 'settings',
|
||||||
title: '设置'
|
title: '设置'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'advice',
|
uiSref: 'advice',
|
||||||
title: '留言'
|
title: '留言'
|
||||||
}],
|
}],
|
||||||
notLoginMenus: [{
|
notLoginMenus: [{
|
||||||
uiSref: '/',
|
uiSref: '/',
|
||||||
title: '首页'
|
title: '首页'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'login',
|
uiSref: 'login',
|
||||||
title: '登录'
|
title: '登录'
|
||||||
}, {
|
}, {
|
||||||
uiSref: 'weixin-article',
|
uiSref: 'weixin-article',
|
||||||
title: '热门'
|
title: '热门'
|
||||||
}],
|
}],
|
||||||
animationIndex: 0,
|
animationIndex: 0,
|
||||||
animation: function () {
|
animation: function () {
|
||||||
var data = ['scale', 'fade', 'fade up', 'fade down', 'fade left', 'fade right', 'horizontal flip',
|
var data = ['scale', 'fade', 'fade up', 'fade down', 'fade left', 'fade right', 'horizontal flip',
|
||||||
'vertical flip', 'drop', 'fly left', 'fly right', 'fly up', 'fly down', 'swing left', 'swing right', 'swing up', 'swing down',
|
'vertical flip', 'drop', 'fly left', 'fly right', 'fly up', 'fly down', 'swing left', 'swing right', 'swing up', 'swing down',
|
||||||
'browse', 'browse right', 'slide down', 'slide up', 'slide left', 'slide right', 'jiggle', 'shake', 'pulse', 'tada', 'bounce'
|
'browse', 'browse right', 'slide down', 'slide up', 'slide left', 'slide right', 'jiggle', 'shake', 'pulse', 'tada', 'bounce'
|
||||||
];
|
];
|
||||||
|
|
||||||
var t = data[parseInt(Math.random() * 1000) % data.length];
|
var t = data[parseInt(Math.random() * 1000) % data.length];
|
||||||
return 'fade' || t; // 去掉一些有攻击性的动画
|
return 'fade' || t; // 去掉一些有攻击性的动画
|
||||||
},
|
},
|
||||||
transition: function (selector, params) {
|
transition: function (selector, params) {
|
||||||
var data = {};
|
var data = {};
|
||||||
data.animation = (params && params.animation) ? params.animation : service.animation();
|
data.animation = (params && params.animation) ? params.animation : service.animation();
|
||||||
data.duration = (params && params.duration) ? params.duration : 500;
|
data.duration = (params && params.duration) ? params.duration : 500;
|
||||||
data.onComplete = function () {
|
data.onComplete = function () {
|
||||||
if (params) {
|
if (params) {
|
||||||
if (params.state == 'hide') {
|
if (params.state == 'hide') {
|
||||||
$(selector).hide();
|
$(selector).hide();
|
||||||
} else if (params.state == 'show') {
|
} else if (params.state == 'show') {
|
||||||
$(selector).show();
|
$(selector).show();
|
||||||
} else if (params.state == 'remove') {
|
} else if (params.state == 'remove') {
|
||||||
$(selector).remove();
|
$(selector).remove();
|
||||||
} else {
|
} else {
|
||||||
$(selector).show();
|
$(selector).show();
|
||||||
}
|
}
|
||||||
params.cb && params.cb(); // 完成之后回调!
|
params.cb && params.cb(); // 完成之后回调!
|
||||||
} else {
|
} else {
|
||||||
$(selector).show();
|
$(selector).show();
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
$(selector).transition('hide'); // 不管怎样,先隐藏
|
$(selector).transition('hide'); // 不管怎样,先隐藏
|
||||||
$(selector).transition(data); //这个执行完之后一定是show
|
$(selector).transition(data); //这个执行完之后一定是show
|
||||||
|
|
||||||
return $(selector).length >= 1;
|
return $(selector).length >= 1;
|
||||||
},
|
},
|
||||||
historyTypes: ['书签', '谷歌', 'Github', '栈溢出', '百度', '备忘录'],
|
historyTypes: ['书签', '谷歌', 'Github', '栈溢出', '百度', '备忘录'],
|
||||||
showStyles: ['navigate', 'costomTag', 'card', 'table'],
|
showStyles: ['navigate', 'costomTag', 'card', 'table'],
|
||||||
forbidQuickKey: {
|
forbidQuickKey: {
|
||||||
'A': '在任意界面,已用做新增备忘录',
|
'A': '在任意界面,已用做新增备忘录',
|
||||||
'C': '在有关书签页面,用作复制书签链接',
|
'C': '在有关书签页面,用作复制书签链接',
|
||||||
'E': '在有关书签页面,用作编辑书签',
|
'E': '在有关书签页面,用作编辑书签',
|
||||||
'D': '在有关书签页面,用作删除书签',
|
'D': '在有关书签页面,用作删除书签',
|
||||||
'I': '在有关书签页面,用作查看书签详情',
|
'I': '在有关书签页面,用作查看书签详情',
|
||||||
'R': '在热门收藏界面,已用作随机查看热门收藏',
|
'R': '在热门收藏界面,已用作随机查看热门收藏',
|
||||||
'S': '在任意界面,已用做快速进入搜索页面',
|
'S': '在任意界面,已用做快速进入搜索页面',
|
||||||
'INSERT': '全局页面,已用做添加书签',
|
'INSERT': '全局页面,已用做添加书签',
|
||||||
'ESC': '全局页面,已用做退出弹窗',
|
'ESC': '全局页面,已用做退出弹窗',
|
||||||
',': '跳转到分类定制点击次数',
|
',': '跳转到分类定制点击次数',
|
||||||
'.': '跳转到分类定制添加日期',
|
'.': '跳转到分类定制添加日期',
|
||||||
'/': '跳转到分类定制最后点击',
|
'/': '跳转到分类定制最后点击',
|
||||||
},
|
},
|
||||||
keyShortcuts: function () { // 判断快捷方式是否生效
|
keyShortcuts: function () { // 判断快捷方式是否生效
|
||||||
var ret = true;
|
var ret = true;
|
||||||
var menusScope = $('div[ng-controller="menuCtr"]').scope();
|
var menusScope = $('div[ng-controller="menuCtr"]').scope();
|
||||||
var login = (menusScope && menusScope.login);
|
var login = (menusScope && menusScope.login);
|
||||||
var longPress = (menusScope && menusScope.longPress);
|
var longPress = (menusScope && menusScope.longPress);
|
||||||
|
|
||||||
if (login && (!longPress)) {
|
if (login && (!longPress)) {
|
||||||
do {
|
do {
|
||||||
// 如果有对话框(删除,备忘录详情等)
|
// 如果有对话框(删除,备忘录详情等)
|
||||||
ret = $(".ngdialog").length == 0;
|
ret = $(".ngdialog").length == 0;
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
|
|
||||||
// 如果有对话框(新增书签,更新书签,书签详情)
|
// 如果有对话框(新增书签,更新书签,书签详情)
|
||||||
ret = $(".ui.modals.visible").length == 0;
|
ret = $(".ui.modals.visible").length == 0;
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
|
|
||||||
// 输入框是否聚焦
|
// 输入框是否聚焦
|
||||||
ret = !($('input').is(':focus'));
|
ret = !($('input').is(':focus'));
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
|
|
||||||
// textarea 是否聚焦
|
// textarea 是否聚焦
|
||||||
ret = !($('textarea').is(':focus'));
|
ret = !($('textarea').is(':focus'));
|
||||||
if (!ret) break;
|
if (!ret) break;
|
||||||
|
|
||||||
} while (false);
|
} while (false);
|
||||||
} else {
|
} else {
|
||||||
ret = false;
|
ret = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
return ret;
|
return ret;
|
||||||
},
|
},
|
||||||
clipboard: function (text) {
|
clipboard: function (text) {
|
||||||
$("#clipboard").attr("data-clipboard-text", text);
|
$("#clipboard").attr("data-clipboard-text", text);
|
||||||
document.getElementById("clipboard").click();
|
document.getElementById("clipboard").click();
|
||||||
},
|
},
|
||||||
smallDevice: function () {
|
smallDevice: function () {
|
||||||
var u = navigator.userAgent;
|
var u = navigator.userAgent;
|
||||||
var app = navigator.appVersion;
|
var app = navigator.appVersion;
|
||||||
var device = { //移动终端浏览器版本信息
|
var device = { //移动终端浏览器版本信息
|
||||||
trident: u.indexOf('Trident') > -1, //IE内核
|
trident: u.indexOf('Trident') > -1, //IE内核
|
||||||
presto: u.indexOf('Presto') > -1, //opera内核
|
presto: u.indexOf('Presto') > -1, //opera内核
|
||||||
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
|
webKit: u.indexOf('AppleWebKit') > -1, //苹果、谷歌内核
|
||||||
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
|
gecko: u.indexOf('Gecko') > -1 && u.indexOf('KHTML') == -1, //火狐内核
|
||||||
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
|
mobile: !!u.match(/AppleWebKit.*Mobile.*/), //是否为移动终端
|
||||||
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
|
ios: !!u.match(/\(i[^;]+;( U;)? CPU.+Mac OS X/), //ios终端
|
||||||
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
|
android: u.indexOf('Android') > -1 || u.indexOf('Linux') > -1, //android终端或uc浏览器
|
||||||
iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
|
iPhone: u.indexOf('iPhone') > -1, //是否为iPhone或者QQHD浏览器
|
||||||
iPad: u.indexOf('iPad') > -1, //是否iPad
|
iPad: u.indexOf('iPad') > -1, //是否iPad
|
||||||
webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
|
webApp: u.indexOf('Safari') == -1 //是否web应该程序,没有头部与底部
|
||||||
};
|
};
|
||||||
|
|
||||||
if ((device.mobile && !device.iPad) || (screen && screen.availWidth < 768)) {
|
if ((device.mobile && !device.iPad) || (screen && screen.availWidth < 768)) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
},
|
},
|
||||||
netErrorHandle(err, $state) {
|
netErrorHandle(err, $state) {
|
||||||
if (err == "Unauthorized") {
|
if (err == "Unauthorized") {
|
||||||
$state.go("login");
|
$state.go("login");
|
||||||
toastr.error('您好像没有登陆,或者登陆session过期了,请重新登陆!', "提示");
|
toastr.error('您好像没有登陆,或者登陆session过期了,请重新登陆!', "提示");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
}]);
|
}]);
|
||||||
|
|
|
||||||
|
|
@ -1,135 +1,3 @@
|
||||||
<div class="ui hidden info message js-msg" ng-if="showStyle === 'navigate' && bookmarks.length <= 2">
|
<div class="ui massive active text centered inline loader" ng-class="{active:loadBusy, disabled:!loadBusy}">
|
||||||
<i class="close icon" ng-click="closeMsg()"></i>
|
正在开发中...
|
||||||
<div class="content">
|
|
||||||
<div class="header">系统检测到您好像还没添加过书签哦!</div>
|
|
||||||
<ul class="list">
|
|
||||||
<li>您可以将您的IE浏览器或者谷歌浏览器上面的书签导入系统!<a style="cursor:pointer;" ng-click="addBookmarkbyFile()">现在就去</a></li>
|
|
||||||
<li>您也可以点击菜单栏上面的<i class="add square icon"></i>图标进行添加。也可以使用快捷键:Insert键打开添加页面,再次按Insert键保存书签,Esc取消添加。</li>
|
|
||||||
</ul>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui segment js-segment-navigate" ng-if="showStyle === 'navigate'" ng-show="!loadBusy">
|
|
||||||
<div class="ui container" ng-repeat="tag in bookmarks" ng-init="tagIndex=$index">
|
|
||||||
<div class="ui grid">
|
|
||||||
<div class="row">
|
|
||||||
<div class="wrap" style="width:88px;color:#0aa770;text-align:left;margin-left:20px;">
|
|
||||||
<span title="{{ tag.name }} - 点击查看该分类所有书签" ng-click="jumpToTags(tag.id)" style="cursor:pointer;">{{ tag.name }}</span>
|
|
||||||
</div>
|
|
||||||
<div class="fourteen wide column" ng-if="tag.bookmarks.length">
|
|
||||||
<div class="ui grid container">
|
|
||||||
<div class="four wide column js-navigate-bookmark" ng-class="{bookmarkNormalHover:bookmarkNormalHover, bookmarkEditHover:bookmarkEditHover, bookmark:(!bookmarkNormalHover && !bookmarkEditHover)}" ng-mouseover="bookmarkNormalHover=true; setHoverBookmark(bookmark)" ng-mouseleave="bookmarkNormalHover=false; setHoverBookmark(null)" ng-repeat="bookmark in tag.bookmarks" ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{ bookmark.title }}" id="{{bookmark.id}}">
|
|
||||||
<img class="ui ui middle aligned tiny image bookmarkInfo" ng-src="http://favicon.luchenqun.com/?url={{bookmark.url}}" err-src="./images/default.ico" style="width:16px;height:16px;" ng-click="detailBookmark(bookmark);$event.stopPropagation()" />
|
|
||||||
<span>{{ bookmark.title}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui segment js-segment-costomTag" ng-if="showStyle === 'costomTag'" ng-show="!loadBusy">
|
|
||||||
<div class="ui container">
|
|
||||||
<div class="ui grid">
|
|
||||||
<div class="two wide column js-costomTag-label" ng-repeat="tag in costomTags">
|
|
||||||
<div class="ui small label" ng-class="{green:tag.clicked}" ng-click="updateCostomTagBookmarks(tag.index)">
|
|
||||||
{{ tag.name }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui divider"></div>
|
|
||||||
<div class="ui five column grid">
|
|
||||||
<div class="column js-costomTag-item" ng-class="{bookmarkNormalHover:bookmarkNormalHover, bookmark:(!bookmarkNormalHover)}" ng-mouseover="bookmarkNormalHover=true; setHoverBookmark(bookmark)" ng-mouseleave="bookmarkNormalHover=false; setHoverBookmark(null)" ng-repeat="bookmark in bookmarks" ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{ bookmark.title }}" id="{{bookmark.id}}">
|
|
||||||
<img class="ui ui middle aligned tiny image bookmarkInfo" ng-src="http://favicon.luchenqun.com/?url={{bookmark.url}}" err-src="./images/default.ico" style="width:16px;height:16px;" ng-click="detailBookmark(bookmark);$event.stopPropagation()" />
|
|
||||||
<span>{{ bookmark.title}}</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<table class="ui selectable sortable celled table js-table-bookmarks" ng-if="showStyle === 'table'" ng-show="!loadBusy">
|
|
||||||
<thead>
|
|
||||||
<tr>
|
|
||||||
<th class="forbid_sorted">标题</th>
|
|
||||||
<th class="forbid_sorted">链接</th>
|
|
||||||
<th style="width:90px;" ng-class="{descending: order[0], sorted:order[0]}" ng-click="changeOrder(0)" title="点击可对表格进行排序">点击次数</th>
|
|
||||||
<th style="width:100px;" ng-class="{descending: order[1], sorted:order[1]}" ng-click="changeOrder(1)" title="点击可对表格进行排序">创建日期</th>
|
|
||||||
<th style="width:100px;" ng-class="{descending: order[2], sorted:order[2]}" ng-click="changeOrder(2)" title="点击可对表格进行排序">最后点击</th>
|
|
||||||
<th style="width:150px;" class="forbid_sorted">分类</th>
|
|
||||||
<th style="width:88px;" class="forbid_sorted">操作</th>
|
|
||||||
</tr>
|
|
||||||
</thead>
|
|
||||||
<tbody>
|
|
||||||
<tr ng-repeat="bookmark in bookmarks" id="{{ bookmark.id }}" ng-mouseover="setHoverBookmark(bookmark)" ng-mouseleave="setHoverBookmark(null)">
|
|
||||||
<td>
|
|
||||||
<img class="ui ui middle aligned tiny image" ng-src="http://favicon.luchenqun.com/?url={{bookmark.url}}" err-src="./images/default.ico" style="width:16px;height:16px;cursor:pointer;" ng-click="jumpToUrl(bookmark.url, bookmark.id)" />
|
|
||||||
<span ng-click="jumpToUrl(bookmark.url, bookmark.id)" title="{{bookmark.title}}" style="cursor:pointer;">
|
|
||||||
{{ bookmark.title }}
|
|
||||||
</span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span title="{{bookmark.url}} 点击复制链接" ng-click="copy(bookmark.url)" style="cursor:default;">{{ bookmark.url }}</span>
|
|
||||||
</td>
|
|
||||||
<td>{{ bookmark.click_count }}</td>
|
|
||||||
<td>
|
|
||||||
<span title="{{bookmark.created_at}}" class="need_to_be_rendered" data-timeago="{{bookmark.created_at}}"></span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<span id="time{{bookmark.id}}" title="{{bookmark.last_click}}" class="need_to_be_rendered" data-timeago="{{bookmark.last_click}}"></span>
|
|
||||||
</td>
|
|
||||||
<td>
|
|
||||||
<div class="ui label" ng-repeat="tag in bookmark.tags" tag-id="{{ tag.id }}" ng-click="jumpToTags(tag.id)">
|
|
||||||
{{ tag.name }}
|
|
||||||
</div>
|
|
||||||
</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="删除书签" />
|
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签" />
|
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 1px" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情" />
|
|
||||||
</td>
|
|
||||||
</tr>
|
|
||||||
</tbody>
|
|
||||||
<tfoot>
|
|
||||||
<tr>
|
|
||||||
<th colspan="7">
|
|
||||||
<pagination></pagination>
|
|
||||||
</th>
|
|
||||||
</tr>
|
|
||||||
</tfoot>
|
|
||||||
</table>
|
|
||||||
<div class="ui segment js-segment-card" ng-if="showStyle === 'card'" ng-show="!loadBusy || currentPage>1">
|
|
||||||
<div class="ui five stackable cards" infinite-scroll="loadCardData()" infinite-scroll-immediate-check="false">
|
|
||||||
<div class="card" ng-repeat="bookmark in bookmarks" id="{{bookmark.id}}" ng-mouseover="setHoverBookmark(bookmark)" ng-mouseleave="setHoverBookmark(null)">
|
|
||||||
<div class="content" ng-click="jumpToUrl(bookmark.url, bookmark.id)" style="max-height:70px;cursor:pointer">
|
|
||||||
<div class="description bookmarkTitle">
|
|
||||||
{{bookmark.title}}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="image" href="{{ bookmark.url }}" ng-click="jumpToUrl(bookmark.url, bookmark.id)" style="cursor:pointer">
|
|
||||||
<img ng-src="./images/snap/{{bookmark.id}}.png" err-src="./images/default.jpg" />
|
|
||||||
</div>
|
|
||||||
<div class="extra content tags" style="height:50px;">
|
|
||||||
<div class="ui label" ng-repeat="tag in bookmark.tags" tag-id="{{ tag.id }}" ng-click="jumpToTags(tag.id)">
|
|
||||||
{{ tag.name }}
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="extra content" ng-show="!bookmark.edit" style="height:50px;padding-right:2px;padding-left:8px;">
|
|
||||||
<span class="left floated like" style="margin-top:6px;">
|
|
||||||
<img class="ui ui middle aligned tiny image" ng-src="http://favicon.luchenqun.com/?url={{bookmark.url}}" err-src="./images/default.ico" style="width:16px;height:16px;cursor:pointer;" ng-click="jumpToUrl(bookmark.url, bookmark.id)" />
|
|
||||||
创建于:
|
|
||||||
<span title="{{bookmark.created_at}}" class="need_to_be_rendered" data-timeago="{{bookmark.created_at}}"></span>
|
|
||||||
<!-- {{ bookmark.created_at }} -->
|
|
||||||
</span>
|
|
||||||
<i class="ellipsis horizontal icon right floated" style="margin-top:8px;" ng-mouseover="bookmark.edit=true;"></i>
|
|
||||||
</div>
|
|
||||||
<div class="extra content" ng-show="bookmark.edit" ng-mouseleave="bookmark.edit=false;" style="height:50px;">
|
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 8px;margin-top:8px;" ng-src="./images/delete.png" ng-click="delBookmark(bookmark)" title="删除书签" />
|
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 8px;margin-top:8px;" ng-src="./images/edit-bookmark.png" ng-click="editBookmark(bookmark.id)" title="编辑书签" />
|
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 8px;margin-top:8px;" ng-src="./images/copy.png" ng-click="copy(bookmark.url)" title="复制链接" />
|
|
||||||
<img class="ui mini spaced image" style="width:16px;height:16px;margin:0 8px;margin-top:8px;" ng-src="./images/detail.png" ng-click="detailBookmark(bookmark)" title="书签详情" />
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="ui massive text centered inline loader" ng-class="{active:loadBusy, disabled:!loadBusy}">
|
|
||||||
正在加载中...
|
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,78 +1,59 @@
|
||||||
<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();">
|
</a>
|
||||||
<i class="dropdown icon"></i>
|
<div id="js-search" style="width: 1500px;">
|
||||||
<div class="menu js-menu-option">
|
<div class="ui transparent fluid icon input" style="height: 100%;margin-left: 10px;">
|
||||||
<div class="header">显示方式</div>
|
<input id="sInput" style="padding-left: 0px;" class="prompt search-item js-search-input" type="text" ng-model="searchWord" placeholder="search..." ng-keypress="($event.which === 13)?search(searchWord, 1):0" ng-focus="toggleReady(true)" ng-blur="toggleReady(false)" data-position="bottom left" data-variation="large" />
|
||||||
<div class="divider"></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;">
|
||||||
<div class="field item js-field-navigate" ng-click="updateShowStyle('navigate')">
|
<div class="ui internally grid">
|
||||||
<div class="ui radio checkbox js-radio-navigate">
|
<div class="row js-history-word" style="height: 20px;" ng-repeat="item in searchHistory">
|
||||||
<input type="radio" name="show-style" checked="" />
|
<div class="sixteen wide column js-search-again" style="margin: -10px 0px 0px -8px;cursor:default;" ng-click="searchByHistory(item.t, item.d)">
|
||||||
<label>导航</label>
|
<i class="{{ item.icon }}" style="cursor:default;"></i>
|
||||||
</div>
|
<span style="color: #7B77C5">{{ item.d}}</span>
|
||||||
</div>
|
</div>
|
||||||
<div class="field item js-field-table" ng-click="updateShowStyle('table')">
|
<!-- <div class="center aligned two wide column" style="margin: -10px 0px 0px 0px;padding:0px;">
|
||||||
<div class="ui radio checkbox js-radio-table">
|
<div style="cursor:default;float: right;" ng-click="delHistory(item.t, item.d)">删除</div>
|
||||||
<input type="radio" name="show-style" />
|
</div> -->
|
||||||
<label>表格</label>
|
</div>
|
||||||
</div>
|
<div class="row" style="height: 20px;background: #f2f2f2" ng-click="delHistory()">
|
||||||
</div>
|
<div class="center aligned sixteen wide column" style="margin: -10px 0px 0px 0px;padding:0px;">
|
||||||
</div>
|
<div style="cursor:pointer;float: right;">清空全部</div>
|
||||||
</div>
|
</div>
|
||||||
</a>
|
</div>
|
||||||
<div id="js-search" style="width: 1500px;">
|
</div>
|
||||||
<div class="ui transparent fluid icon input" style="height: 100%;margin-left: 10px;">
|
</div>
|
||||||
<input id="sInput" style="padding-left: 0px;" class="prompt search-item js-search-input" type="text" ng-model="searchWord" placeholder="search..." ng-keypress="($event.which === 13)?search(searchWord, 1):0" ng-focus="toggleReady(true)" ng-blur="toggleReady(false)" data-position="bottom left" data-variation="large" />
|
<div style="margin-top: 13px;">
|
||||||
<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;">
|
<span style="display: none" class="searchIcon">
|
||||||
<div class="ui internally grid">
|
<span style="margin-left: -25px;"><i class="google link icon" title="谷歌搜索(输入关键字按回车键默认搜索引擎)" ng-click="search(searchWord, 1)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<div class="row js-history-word" style="height: 20px;" ng-repeat="item in searchHistory">
|
<span><i class="bimobject link icon" title="百度搜索" ng-click="search(searchWord, 4)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<div class="sixteen wide column js-search-again" style="margin: -10px 0px 0px -8px;cursor:default;" ng-click="searchByHistory(item.t, item.d)">
|
<span><i class="book link icon" title="书签搜索" ng-click="search(searchWord, 0)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<i class="{{ item.icon }}" style="cursor:default;"></i>
|
<span><i class="file alternate link icon" title="备忘录搜索" ng-click="search(searchWord, 5)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<span style="color: #7B77C5">{{ item.d}}</span>
|
<span><i class="github link icon" title="Github 搜索" ng-click="search(searchWord, 2)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
</div>
|
<span><i class="stack overflow link icon" title="栈溢出搜索" ng-click="search(searchWord, 3)" style="cursor:default;margin-right: 8px;"></i></span>
|
||||||
<!-- <div class="center aligned two wide column" style="margin: -10px 0px 0px 0px;padding:0px;">
|
<span style="margin: 0px 5px">▏</span>
|
||||||
<div style="cursor:default;float: right;" ng-click="delHistory(item.t, item.d)">删除</div>
|
</span>
|
||||||
</div> -->
|
<span data-tooltip="添加书签,可按Insert快速打开添加页面" ng-click="showAddBookmarkMoadl()">
|
||||||
</div>
|
<i class="add square link icon" style="cursor:default;margin-right: 8px;margin-left: 1px;"></i>
|
||||||
<div class="row" style="height: 20px;background: #f2f2f2" ng-click="delHistory()">
|
</span>
|
||||||
<div class="center aligned sixteen wide column" style="margin: -10px 0px 0px 0px;padding:0px;">
|
<span data-tooltip="如果你觉得我的系统对你有帮助,请点击跳转到 Github 为我 Star" ng-click="star()" ng-show="user.username !== 'lcq'">
|
||||||
<div style="cursor:pointer;float: right;">清空全部</div>
|
<i class="star link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
</div>
|
</span>
|
||||||
</div>
|
<span class="suggest" ng-click="showUpdate()" ng-show="user.username !== 'lcq'">
|
||||||
</div>
|
<i class="info circle link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
</div>
|
</span>
|
||||||
<div style="margin-top: 13px;">
|
<span data-tooltip="请我喝杯咖啡" ng-click="coffee()" ng-show="user.username !== 'lcq'">
|
||||||
<span style="display: none" class="searchIcon">
|
<i class="coffee link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
<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>
|
||||||
<span><i class="bimobject link icon" title="百度搜索" ng-click="search(searchWord, 4)" style="cursor:default;margin-right: 8px;"></i></span>
|
<span data-tooltip="退出登陆" ng-click="logout()">
|
||||||
<span><i class="book link icon" title="书签搜索" ng-click="search(searchWord, 0)" style="cursor:default;margin-right: 8px;"></i></span>
|
<i class="sign out link icon" style="cursor:default;margin-right: 8px;"></i>
|
||||||
<span><i class="file alternate link icon" title="备忘录搜索" ng-click="search(searchWord, 5)" style="cursor:default;margin-right: 8px;"></i></span>
|
</span>
|
||||||
<span><i class="github link icon" title="Github 搜索" ng-click="search(searchWord, 2)" style="cursor:default;margin-right: 8px;"></i></span>
|
</div>
|
||||||
<span><i class="stack overflow link icon" title="栈溢出搜索" ng-click="search(searchWord, 3)" style="cursor:default;margin-right: 8px;"></i></span>
|
</div>
|
||||||
<span style="margin: 0px 5px">▏</span>
|
</div>
|
||||||
</span>
|
</div>
|
||||||
<span data-tooltip="添加书签,可按Insert快速打开添加页面" ng-click="showAddBookmarkMoadl()">
|
<div class="ui huge menu js-not-login-in" ng-if="!login">
|
||||||
<i class="add square link icon" style="cursor:default;margin-right: 8px;margin-left: 1px;"></i>
|
<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>
|
||||||
</span>
|
</div>
|
||||||
<span data-tooltip="如果你觉得我的系统对你有帮助,请点击跳转到 Github 为我 Star" ng-click="star()" ng-show="user.username !== 'lcq'">
|
</div>
|
||||||
<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 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>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue