搜索历史记录问题
This commit is contained in:
parent
9e4971151c
commit
fd35b420c2
|
|
@ -62,19 +62,9 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
||||||
bookmark.last_click = $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
|
bookmark.last_click = $filter("date")(new Date(), "yyyy-MM-dd HH:mm:ss");
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
}
|
} else {
|
||||||
|
|
||||||
// if ($scope.showStyle == 'table') {
|
}
|
||||||
// $scope.changeOrder($scope.order.indexOf(true));
|
|
||||||
// }
|
|
||||||
//
|
|
||||||
// if ($scope.showStyle == 'costomTag') {
|
|
||||||
// $scope.costomTags.forEach((tag) => {
|
|
||||||
// if (tag.clicked) {
|
|
||||||
// $scope.updateCostomTagBookmarks(tag.index)
|
|
||||||
// }
|
|
||||||
// })
|
|
||||||
// }
|
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
timeagoInstance.cancel();
|
timeagoInstance.cancel();
|
||||||
|
|
|
||||||
|
|
@ -10,7 +10,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
|
|
||||||
// 防止在登陆的情况下,在浏览器里面直接输入url,这时候要更新菜单选项
|
// 防止在登陆的情况下,在浏览器里面直接输入url,这时候要更新菜单选项
|
||||||
pubSubService.subscribe('Common.menuActive', $scope, function(event, params) {
|
pubSubService.subscribe('Common.menuActive', $scope, function(event, params) {
|
||||||
console.log("subscribe Common.menuActive", params)
|
console.log("subscribe Common.menuActive, login = " + params.login + ", index = " + params.index);
|
||||||
$scope.login = (params && params.login) || false;
|
$scope.login = (params && params.login) || false;
|
||||||
var index = $scope.login ? ($scope.selectLoginIndex = (params && params.index) || 0) : ($scope.selectNotLoginIndex = (params && params.index) || 0);
|
var index = $scope.login ? ($scope.selectLoginIndex = (params && params.index) || 0) : ($scope.selectNotLoginIndex = (params && params.index) || 0);
|
||||||
updateMenuActive(index);
|
updateMenuActive(index);
|
||||||
|
|
@ -24,6 +24,8 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
* @desc 点击搜索按钮搜索书签
|
* @desc 点击搜索按钮搜索书签
|
||||||
*/
|
*/
|
||||||
$scope.search = function(searchWord) {
|
$scope.search = function(searchWord) {
|
||||||
|
console.log('search......', searchWord);
|
||||||
|
|
||||||
$scope.login = true;
|
$scope.login = true;
|
||||||
var searchOption = $('.js-search-option').dropdown('get value') || 0;
|
var searchOption = $('.js-search-option').dropdown('get value') || 0;
|
||||||
if (searchOption == 0) {
|
if (searchOption == 0) {
|
||||||
|
|
@ -42,6 +44,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
||||||
} else if (searchOption == 4) {
|
} else if (searchOption == 4) {
|
||||||
$window.open('http://www.baidu.com/s?tn=mybookmark.cn&ch=3&ie=utf-8&wd=' + encodeURIComponent(searchWord), '_blank');
|
$window.open('http://www.baidu.com/s?tn=mybookmark.cn&ch=3&ie=utf-8&wd=' + encodeURIComponent(searchWord), '_blank');
|
||||||
} else if (searchOption == 5) {
|
} else if (searchOption == 5) {
|
||||||
|
console.log('search note, word = ', searchWord);
|
||||||
$state.go('note', {
|
$state.go('note', {
|
||||||
searchWord: searchWord,
|
searchWord: searchWord,
|
||||||
}, {
|
}, {
|
||||||
|
|
|
||||||
|
|
@ -61,6 +61,7 @@ app.factory('dataService', [function() {
|
||||||
return t;
|
return t;
|
||||||
},
|
},
|
||||||
historyTypes: ['书签', '谷歌', 'Github', '栈溢出', '百度', '备忘录'],
|
historyTypes: ['书签', '谷歌', 'Github', '栈溢出', '百度', '备忘录'],
|
||||||
|
showStyles: ['navigate', 'costomTag', 'card', 'table'],
|
||||||
};
|
};
|
||||||
|
|
||||||
return service;
|
return service;
|
||||||
|
|
|
||||||
|
|
@ -42,7 +42,7 @@
|
||||||
<div class="text " style="color:#C9C9C9;font-weight:normal;">书签</div>
|
<div class="text " style="color:#C9C9C9;font-weight:normal;">书签</div>
|
||||||
<i class="angle down icon"></i>
|
<i class="angle down icon"></i>
|
||||||
<div class="menu">
|
<div class="menu">
|
||||||
<div class="item" data-value="$index" ng-class="{active:$index==0}" ng-repeat="historyType in historyTypes">{{historyType}}</div>
|
<div class="item" data-value="{{$index}}" ng-class="{active:$index==0}" ng-repeat="historyType in historyTypes">{{historyType}}</div>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
</label>
|
</label>
|
||||||
|
|
|
||||||
|
|
@ -45,7 +45,7 @@
|
||||||
<div class="ui divider"></div>
|
<div class="ui divider"></div>
|
||||||
<div class="ui grid">
|
<div class="ui grid">
|
||||||
<div class="eight wide column" style="margin-top:10px;" ng-show="totalItems>0">
|
<div class="eight wide column" style="margin-top:10px;" ng-show="totalItems>0">
|
||||||
<span ng-show="searchWord">通过搜索关键字"{{searchWord}}",</span>共找到备忘一共约{{totalItems}}个
|
<span ng-show="searchWord">通过搜索关键字"{{searchWord}}"(点击菜单"备忘录"重新查看所有),</span>共找到备忘一共约{{totalItems}}个
|
||||||
</div>
|
</div>
|
||||||
<div class="eight wide column">
|
<div class="eight wide column">
|
||||||
<pagination></pagination>
|
<pagination></pagination>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue