diff --git a/public/scripts/controllers/bookmarks-controller.js b/public/scripts/controllers/bookmarks-controller.js index 78c826f..fe1faea 100644 --- a/public/scripts/controllers/bookmarks-controller.js +++ b/public/scripts/controllers/bookmarks-controller.js @@ -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(); diff --git a/public/scripts/controllers/menus-controller.js b/public/scripts/controllers/menus-controller.js index c7fd477..9ca37b6 100644 --- a/public/scripts/controllers/menus-controller.js +++ b/public/scripts/controllers/menus-controller.js @@ -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, }, { diff --git a/public/scripts/services/data-service.js b/public/scripts/services/data-service.js index 3b4a759..ece5440 100644 --- a/public/scripts/services/data-service.js +++ b/public/scripts/services/data-service.js @@ -61,6 +61,7 @@ app.factory('dataService', [function() { return t; }, historyTypes: ['书签', '谷歌', 'Github', '栈溢出', '百度', '备忘录'], + showStyles: ['navigate', 'costomTag', 'card', 'table'], }; return service; diff --git a/public/views/menus.html b/public/views/menus.html index 10ca4e6..fe8e560 100644 --- a/public/views/menus.html +++ b/public/views/menus.html @@ -42,7 +42,7 @@