fix bug
This commit is contained in:
parent
6e4fa07ee1
commit
c9ca92485c
|
|
@ -374,7 +374,8 @@ app.controller('noteCtr', ['$scope', '$state', '$stateParams', '$filter', '$wind
|
|||
if (tags.length > 0) {
|
||||
get('tags').then((_tags) => {
|
||||
if (JSON.stringify(tags) != JSON.stringify(_tags)) {
|
||||
localStorage.setItem("tags", JSON.stringify(tags));
|
||||
localStorage.setItem("tags", JSON.stringify(_tags));
|
||||
updateTags(_tags);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -72,16 +72,19 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara
|
|||
for (let tag of $scope.tags) {
|
||||
if (tag.id == $scope.currentTagId) {
|
||||
tag.bookmarkCount = reply.count;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
let id = setInterval(() => {
|
||||
if (document.querySelectorAll('.need_to_be_rendered').length > 0) {
|
||||
timeagoInstance.cancel();
|
||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
||||
clearInterval(id);
|
||||
}
|
||||
}, 10);
|
||||
if ($scope.showMode == 'table' && bookmarks.length > 0) {
|
||||
let id = setInterval(() => {
|
||||
if (document.querySelectorAll('.need_to_be_rendered').length > 0) {
|
||||
timeagoInstance.cancel();
|
||||
timeagoInstance.render(document.querySelectorAll('.need_to_be_rendered'), 'zh_CN');
|
||||
clearInterval(id);
|
||||
}
|
||||
}, 10);
|
||||
}
|
||||
|
||||
pubSubService.publish('Common.menuActive', {
|
||||
login: true,
|
||||
|
|
@ -153,14 +156,11 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara
|
|||
}
|
||||
|
||||
$scope.editBookmark = function (id) {
|
||||
console.log('publish bookmarksCtr.editBookmark', { id });
|
||||
pubSubService.publish('bookmarksCtr.editBookmark', { id });
|
||||
}
|
||||
|
||||
$scope.detailBookmark = async function (bookmark) {
|
||||
bookmark.own = true;
|
||||
pubSubService.publish('TagCtr.showBookmarkInfo', bookmark);
|
||||
await post("bookmarkClick", { id: bookmark.id });
|
||||
}
|
||||
|
||||
$scope.copy = function (url) {
|
||||
|
|
@ -404,8 +404,8 @@ app.controller('tagsCtr', ['$scope', '$filter', '$state', '$window', '$statePara
|
|||
if (tags.length > 0) {
|
||||
get('tags').then((_tags) => {
|
||||
if (JSON.stringify(tags) != JSON.stringify(_tags)) {
|
||||
localStorage.setItem("tags", JSON.stringify(tags));
|
||||
updateTags(tags);
|
||||
localStorage.setItem("tags", JSON.stringify(_tags));
|
||||
updateTags(_tags);
|
||||
}
|
||||
});
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -29,18 +29,12 @@
|
|||
<div class="column" ng-if="bookmark.clickCount">
|
||||
<i class="hand pointer icon"></i>点击次数:{{bookmark.clickCount}}
|
||||
</div>
|
||||
<div class="column" ng-if="bookmark.fav_count">
|
||||
<i class="heart icon"></i>收藏人数:{{bookmark.fav_count}}
|
||||
</div>
|
||||
<div class="column" ng-if="!bookmark.created_by">
|
||||
<div class="column" ng-if="bookmark.tagName">
|
||||
<i class="tags icon"></i>书签分类:
|
||||
<div class="ui label" ng-repeat="tag in bookmark.tags">
|
||||
{{ tag.name }}
|
||||
<div class="ui label">
|
||||
{{ bookmark.tagName }}
|
||||
</div>
|
||||
</div>
|
||||
<div class="column" ng-if="bookmark.created_by">
|
||||
<i class="info circle icon"></i>来源信息:{{bookmark.created_by}}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
</a>
|
||||
<div id="js-search" style="width: 1500px;">
|
||||
<div class="ui transparent fluid icon input" style="height: 100%;margin-left: 10px;">
|
||||
<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" />
|
||||
<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, 0):0" ng-focus="toggleReady(true)" ng-blur="toggleReady(false)" data-position="bottom left" data-variation="large" />
|
||||
<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="ui internally grid">
|
||||
<div class="row js-history-word" style="height: 20px;" ng-repeat="item in searchHistory">
|
||||
|
|
@ -23,10 +23,10 @@
|
|||
</div>
|
||||
<div style="margin-top: 13px;">
|
||||
<span style="display: none" class="searchIcon">
|
||||
<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="bimobject link icon" title="百度搜索" ng-click="search(searchWord, 4)" style="cursor:default;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 style="margin-left: -25px;"><i class="book link icon" title="书签搜索(输入关键字按回车键默认搜索引擎)" ng-click="search(searchWord, 0)" style="cursor:default;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="google link icon" title="谷歌搜索" ng-click="search(searchWord, 1)" style="cursor:default;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="github link icon" title="Github 搜索" ng-click="search(searchWord, 2)" 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-right: 8px;"></i></span>
|
||||
<span style="margin: 0px 5px">▏</span>
|
||||
|
|
|
|||
Loading…
Reference in New Issue