根据是否公开书签存入数据库
This commit is contained in:
parent
6157296461
commit
16688c4ec1
|
|
@ -83,7 +83,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
|
||||||
id: $scope.id,
|
id: $scope.id,
|
||||||
url: $scope.url,
|
url: $scope.url,
|
||||||
title: $scope.title,
|
title: $scope.title,
|
||||||
public: '1',
|
public: $('.ui.checkbox.js-public').checkbox('is checked') ? '1' : '0',
|
||||||
tags: selectedTags,
|
tags: selectedTags,
|
||||||
description: $scope.description
|
description: $scope.description
|
||||||
}
|
}
|
||||||
|
|
@ -111,6 +111,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
|
||||||
}).modal('show');
|
}).modal('show');
|
||||||
$('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('clear');
|
$('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('clear');
|
||||||
$('.ui.modal.js-add-bookmark .ui.dropdown').addClass('loading');
|
$('.ui.modal.js-add-bookmark .ui.dropdown').addClass('loading');
|
||||||
|
$('.ui.checkbox.js-public').checkbox('set checked');
|
||||||
init();
|
init();
|
||||||
getTags({});
|
getTags({});
|
||||||
});
|
});
|
||||||
|
|
@ -134,6 +135,8 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
|
||||||
$scope.description = (bookmark && bookmark.description) || '';
|
$scope.description = (bookmark && bookmark.description) || '';
|
||||||
$scope.tags = data.tags;
|
$scope.tags = data.tags;
|
||||||
$scope.public = (bookmark && bookmark.id) || '1';
|
$scope.public = (bookmark && bookmark.id) || '1';
|
||||||
|
$('.ui.checkbox.js-public').checkbox((bookmark && bookmark.public && bookmark.public == '1') ? 'set checked' : 'set unchecked')
|
||||||
|
|
||||||
|
|
||||||
$timeout(function() {
|
$timeout(function() {
|
||||||
data.bookmarkTags.forEach((tagId) => {
|
data.bookmarkTags.forEach((tagId) => {
|
||||||
|
|
|
||||||
|
|
@ -35,7 +35,7 @@
|
||||||
<textarea rows="2" placeholder="可以是网站的说明,也可以备忘一下账号密码什么的,就算公开你的链接,这个也只有自己能在详情里面看到" ng-model="description"></textarea>
|
<textarea rows="2" placeholder="可以是网站的说明,也可以备忘一下账号密码什么的,就算公开你的链接,这个也只有自己能在详情里面看到" ng-model="description"></textarea>
|
||||||
</div>
|
</div>
|
||||||
<div class="field">
|
<div class="field">
|
||||||
<div class="ui checkbox checked">
|
<div class="ui checkbox checked js-public">
|
||||||
<input type="checkbox" name="example" checked="">
|
<input type="checkbox" name="example" checked="">
|
||||||
<label>我要公开此收藏的链接供别人搜索</label>
|
<label>我要公开此收藏的链接供别人搜索</label>
|
||||||
</div>
|
</div>
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
<div class="js-menu" ng-controller="menuCtr">
|
<div class="js-menu" ng-controller="menuCtr">
|
||||||
<div class="ui huge menu js-login-in" ng-if="login">
|
<div class="ui huge menu js-login-in" ng-if="login">
|
||||||
<a class="item" ng-class="{selected:$index===selectLoginIndex}" ui-sref="{{ menu.uiSref }}" ui-sref-opts="{reload: true}" ng-repeat="menu in loginMenus">
|
<a class="item" ng-class="{selected:$index===selectLoginIndex}" ui-sref="{{ menu.uiSref }}" ui-sref-opts="{reload: true}" ng-repeat="menu in loginMenus" jsMenuInit>
|
||||||
<div>{{ menu.title }}</div>
|
<div>{{ menu.title }}</div>
|
||||||
<div class="ui floating simple dropdown icon js-bookmark-dropdown" ng-if="$index==0" ng-click="$event.stopPropagation();">
|
<div class="ui floating simple dropdown icon js-bookmark-dropdown" ng-if="$index==0" ng-click="$event.stopPropagation();">
|
||||||
<i class="dropdown icon"></i>
|
<i class="dropdown icon"></i>
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue