搜索历史记录问题
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");
|
||||
}
|
||||
})
|
||||
}
|
||||
} 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() {
|
||||
timeagoInstance.cancel();
|
||||
|
|
|
|||
|
|
@ -10,7 +10,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
|||
|
||||
// 防止在登陆的情况下,在浏览器里面直接输入url,这时候要更新菜单选项
|
||||
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;
|
||||
var index = $scope.login ? ($scope.selectLoginIndex = (params && params.index) || 0) : ($scope.selectNotLoginIndex = (params && params.index) || 0);
|
||||
updateMenuActive(index);
|
||||
|
|
@ -24,6 +24,8 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
|||
* @desc 点击搜索按钮搜索书签
|
||||
*/
|
||||
$scope.search = function(searchWord) {
|
||||
console.log('search......', searchWord);
|
||||
|
||||
$scope.login = true;
|
||||
var searchOption = $('.js-search-option').dropdown('get value') || 0;
|
||||
if (searchOption == 0) {
|
||||
|
|
@ -42,6 +44,7 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', '$window', '$time
|
|||
} else if (searchOption == 4) {
|
||||
$window.open('http://www.baidu.com/s?tn=mybookmark.cn&ch=3&ie=utf-8&wd=' + encodeURIComponent(searchWord), '_blank');
|
||||
} else if (searchOption == 5) {
|
||||
console.log('search note, word = ', searchWord);
|
||||
$state.go('note', {
|
||||
searchWord: searchWord,
|
||||
}, {
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@ app.factory('dataService', [function() {
|
|||
return t;
|
||||
},
|
||||
historyTypes: ['书签', '谷歌', 'Github', '栈溢出', '百度', '备忘录'],
|
||||
showStyles: ['navigate', 'costomTag', 'card', 'table'],
|
||||
};
|
||||
|
||||
return service;
|
||||
|
|
|
|||
|
|
@ -42,7 +42,7 @@
|
|||
<div class="text " style="color:#C9C9C9;font-weight:normal;">书签</div>
|
||||
<i class="angle down icon"></i>
|
||||
<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>
|
||||
</label>
|
||||
|
|
|
|||
|
|
@ -45,7 +45,7 @@
|
|||
<div class="ui divider"></div>
|
||||
<div class="ui grid">
|
||||
<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 class="eight wide column">
|
||||
<pagination></pagination>
|
||||
|
|
|
|||
Loading…
Reference in New Issue