更新一下书签分类编辑按钮

This commit is contained in:
luchenqun 2017-02-27 19:44:36 +08:00
parent 26ee7d6ee4
commit f5e21d4840
2 changed files with 14 additions and 5 deletions

View File

@ -5,6 +5,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
const perPageItems = 20;
var dialog = null;
$scope.loadBookmarks = false;
$scope.loadTags = false;
$scope.tags = []; // 书签数据
$scope.tagsIndex = []; // 书签索引
$scope.bookmarkClicked = false;
@ -283,6 +284,7 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
}
function getTags(params) {
$scope.loadTags = true;
bookmarkService.getTags(params)
.then((data) => {
$scope.tags = []
@ -306,8 +308,12 @@ app.controller('tagsCtr', ['$scope', '$filter', '$window', '$stateParams', '$tim
} else {
toastr.info('您还没有书签分类,请点击菜单栏的添加按钮进行添加', "提示");
}
$scope.loadTags = false;
})
.catch((err) => console.log('getTags err', err));
.catch((err) => {
console.log('getTags err', err);
$scope.loadTags = false;
});
pubSubService.publish('Common.menuActive', {
login: true,

View File

@ -41,10 +41,13 @@
</div>
</div>
</div>
<div style="width:22px;height:22px;" class="js-edit" ng-click="toggleMode()" title="{{edit ? '退出编辑模式' : '点我进入编辑模式'}}"><img class="ui ui middle aligned tiny image" ng-src="./images/{{ edit ? 'back' : 'edit'}}.png"></div>
<div style="width:22px;height:22px;" class="js-edit" ng-click="toggleMode()" title="{{edit ? '退出编辑模式' : '点我进入编辑模式'}}">
<img class="ui ui middle aligned tiny image" ng-src="./images/{{ edit ? 'back' : 'edit'}}.png" ng-show="!loadTags">
</div>
</div>
<div class="ui huge text centered inline loader" ng-class="{active:loadBookmarks, disabled: !loadBookmarks}">
正在加载中...</div>
正在加载中...
</div>
<table class="ui celled table" ng-if="bookmarkCount > 0" style="margin-top:-14px;" ng-show="!loadBookmarks && !edit">
<thead>
<tr>