对获取的书签标题进行处理

This commit is contained in:
HelloWorld 2019-09-20 11:16:02 +08:00
parent 7f9c2749d4
commit 57e79531b8
2 changed files with 377 additions and 369 deletions

View File

@ -1,316 +1,324 @@
app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) { app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'ngDialog', 'bookmarkService', 'pubSubService', 'dataService', function($scope, $state, $timeout, $document, ngDialog, bookmarkService, pubSubService, dataService) {
console.log("Hello editCtr"); console.log("Hello editCtr");
var maxSelections = 3; var maxSelections = 3;
var dialog = null; var dialog = null;
var cancelDefault = false; var cancelDefault = false;
init(); init();
$scope.$watch('url', function(newUrl, oldUrl, scope) { $scope.$watch('url', function(newUrl, oldUrl, scope) {
$timeout(function() { $timeout(function() {
$scope.urlError = $scope.url == '' && $('.ui.modal.js-add-bookmark').modal('is active'); $scope.urlError = $scope.url == '' && $('.ui.modal.js-add-bookmark').modal('is active');
}); });
if ($scope.autoGettitle) { if ($scope.autoGettitle) {
$scope.title = ""; $scope.title = "";
if (/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(newUrl)) { if (/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test(newUrl)) {
var params = { var params = {
url: newUrl, url: newUrl,
requestId: 0, requestId: 0,
} }
$scope.loadTitle = true; $scope.loadTitle = true;
bookmarkService.getArticle(params) bookmarkService.getArticle(params)
.then((data) => { .then((data) => {
$scope.loadTitle = false; $scope.loadTitle = false;
$scope.title = data.title; $scope.originTitle = data.title;
if (!$scope.title) { $scope.title = data.title;
toastr.error('获取书签标题失败,请手动填入', "提示");
} if (!$scope.title) {
}) toastr.error('获取书签标题失败,请手动填入', "提示");
.catch((err) => { } else {
console.log('getTitle err', err); $scope.title = data.title.split('-')[0].trim();
toastr.error('获取书签标题失败:' + JSON.stringify(err) + ',请手动填入', "提示"); }
$scope.loadTitle = false; })
}) .catch((err) => {
} console.log('getTitle err', err);
} toastr.error('获取书签标题失败:' + JSON.stringify(err) + ',请手动填入', "提示");
}); $scope.loadTitle = false;
})
$scope.$watch('description', function(newDescription, oldDescription, scope) { }
setTimeout(function() { }
$('.ui.modal.js-add-bookmark').modal("refresh"); });
}, 500);
}); $scope.$watch('description', function(newDescription, oldDescription, scope) {
setTimeout(function() {
$scope.$watch('title', function(newValue, oldValue, scope) { $('.ui.modal.js-add-bookmark').modal("refresh");
$timeout(function() { }, 500);
$scope.titleError = $scope.title == '' && $('.ui.modal.js-add-bookmark').modal('is active'); });
});
}); $scope.$watch('title', function(newValue, oldValue, scope) {
$timeout(function() {
$scope.cancel = function() { $scope.titleError = $scope.title == '' && $('.ui.modal.js-add-bookmark').modal('is active');
$('.ui.modal.js-add-bookmark').modal('hide'); });
});
init();
} $scope.restoreTitle = function() {
$scope.ok = function() { $scope.title = $scope.originTitle;
var selectedTags = []; }
$scope.tags.forEach((tag) => {
if (tag.clicked) { $scope.cancel = function() {
selectedTags.push(tag.id); $('.ui.modal.js-add-bookmark').modal('hide');
}
}); init();
// console.log('Hello ok clicked', $scope.url, $scope.title, $scope.description, $scope.public, selectedTags, $scope.tags); }
$scope.urlError = $scope.url == ''; $scope.ok = function() {
$scope.titleError = $scope.title == ''; var selectedTags = [];
$scope.tagsError = (selectedTags.length == 0 || selectedTags.length > maxSelections); $scope.tags.forEach((tag) => {
var params = { if (tag.clicked) {
id: $scope.id, selectedTags.push(tag.id);
url: $scope.url, }
title: $scope.title, });
public: $('.ui.checkbox.js-public').checkbox('is checked') ? '1' : '0', // console.log('Hello ok clicked', $scope.url, $scope.title, $scope.description, $scope.public, selectedTags, $scope.tags);
tags: selectedTags, $scope.urlError = $scope.url == '';
description: $scope.description $scope.titleError = $scope.title == '';
} $scope.tagsError = (selectedTags.length == 0 || selectedTags.length > maxSelections);
if (!/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test($scope.url)) { var params = {
toastr.error('检撤到您的书签链接非法是否忘记加http或者https了建议直接从打开浏览器地址栏复制出来直接粘贴到输入框。', "错误"); id: $scope.id,
return; url: $scope.url,
} title: $scope.title,
if (selectedTags.length < 1 || $scope.tagsError) { public: $('.ui.checkbox.js-public').checkbox('is checked') ? '1' : '0',
toastr.error('您至少要选择一个分类!最多选择三个分类!如果暂时没想到放到哪个分类,可以先选择未分类', "错误"); tags: selectedTags,
return; description: $scope.description
} }
if ($scope.titleError) { if (!/http(s)?:\/\/([\w-]+\.)+[\w-]+(\/[\w- .\/?%&=]*)?/.test($scope.url)) {
toastr.error('书签标题不能为空!', "错误"); toastr.error('检撤到您的书签链接非法是否忘记加http或者https了建议直接从打开浏览器地址栏复制出来直接粘贴到输入框。', "错误");
return; return;
} }
console.log("add bookmark", params); if (selectedTags.length < 1 || $scope.tagsError) {
if ($scope.add) { toastr.error('您至少要选择一个分类!最多选择三个分类!如果暂时没想到放到哪个分类,可以先选择未分类', "错误");
bookmarkService.addBookmark(params) return;
.then((data) => { }
$('.ui.modal.js-add-bookmark').modal('hide'); if ($scope.titleError) {
pubSubService.publish('EditCtr.inserBookmarsSuccess', data); toastr.error('书签标题不能为空!', "错误");
if (data.title) { return;
toastr.success('[ ' + data.title + ' ] 添加成功,将自动重新更新书签!</br>' + (data.update ? '系统检测到该书签之前添加过,只更新链接,描述,标题,分类。创建日期与最后点击日期不更新!' : ''), "提示"); }
} else { console.log("add bookmark", params);
toastr.error('[ ' + params.title + ' ] 添加失败', "提示"); if ($scope.add) {
} bookmarkService.addBookmark(params)
}) .then((data) => {
.catch((err) => { $('.ui.modal.js-add-bookmark').modal('hide');
console.log('addBookmark err', err); pubSubService.publish('EditCtr.inserBookmarsSuccess', data);
toastr.error('[ ' + params.title + ' ] 添加失败' + JSON.stringify(err), "提示"); if (data.title) {
}); toastr.success('[ ' + data.title + ' ] 添加成功,将自动重新更新书签!</br>' + (data.update ? '系统检测到该书签之前添加过,只更新链接,描述,标题,分类。创建日期与最后点击日期不更新!' : ''), "提示");
} else { } else {
bookmarkService.updateBookmark(params) toastr.error('[ ' + params.title + ' ] 添加失败', "提示");
.then((data) => { }
$('.ui.modal.js-add-bookmark').modal('hide'); })
pubSubService.publish('EditCtr.inserBookmarsSuccess', data); .catch((err) => {
toastr.success('[ ' + params.title + ' ] 更新成功,将自动重新更新书签!', "提示"); console.log('addBookmark err', err);
}) toastr.error('[ ' + params.title + ' ] 添加失败' + JSON.stringify(err), "提示");
.catch((err) => { });
console.log('updateBookmark err', err); } else {
toastr.error('[ ' + params.title + ' ] 更新失败' + JSON.stringify(err), "提示"); bookmarkService.updateBookmark(params)
}); .then((data) => {
} $('.ui.modal.js-add-bookmark').modal('hide');
} pubSubService.publish('EditCtr.inserBookmarsSuccess', data);
toastr.success('[ ' + params.title + ' ] 更新成功,将自动重新更新书签!', "提示");
$scope.showAddTag = function() { })
if ($scope.tags.length < 30) { .catch((err) => {
console.log('showAddTag..........') console.log('updateBookmark err', err);
$scope.newTag = ""; toastr.error('[ ' + params.title + ' ] 更新失败' + JSON.stringify(err), "提示");
dialog = ngDialog.open({ });
template: './views/dialog-add-tag.html', }
className: 'ngdialog-theme-default', }
scope: $scope
}); $scope.showAddTag = function() {
} else { if ($scope.tags.length < 30) {
toastr.error('标签个数总数不能超过30个不允许再添加新分类如有需求请联系管理员。', "提示"); console.log('showAddTag..........')
} $scope.newTag = "";
} dialog = ngDialog.open({
template: './views/dialog-add-tag.html',
$scope.addTag = function(tag) { className: 'ngdialog-theme-default',
console.log(tag); scope: $scope
if ($scope.tags.length >= 30) { });
toastr.error('标签个数总数不能超过30个不允许再添加新分类如有需求请联系管理员。', "提示"); } else {
return; toastr.error('标签个数总数不能超过30个不允许再添加新分类如有需求请联系管理员。', "提示");
} }
}
tag = tag.replace(/(^\s*)|(\s*$)/g, '').replace(/\s+/g, ' '); // 去除前后空格,多个空格转为一个空格;
$scope.addTag = function(tag) {
var exist = $scope.tags.some((item) => { console.log(tag);
return item.name == tag; if ($scope.tags.length >= 30) {
}) toastr.error('标签个数总数不能超过30个不允许再添加新分类如有需求请联系管理员。', "提示");
if (exist) { return;
toastr.error('该分类【' + tag + '】已存在!', "提示"); }
return;
} tag = tag.replace(/(^\s*)|(\s*$)/g, '').replace(/\s+/g, ' '); // 去除前后空格,多个空格转为一个空格;
if (tag) { var exist = $scope.tags.some((item) => {
ngDialog.close(dialog); return item.name == tag;
})
var tags = []; if (exist) {
tags.push(tag); toastr.error('该分类【' + tag + '】已存在!', "提示");
bookmarkService.addTags(tags) return;
.then((data) => { }
// 获取已经选择的个数 if (tag) {
var clickedCount = $scope.tags.filter((item) => { ngDialog.close(dialog);
return item.clicked;
}).length var tags = [];
tags.push(tag);
// 获取新增的tag(由于这里只增加一个,所以弹出数组最后一个即可) bookmarkService.addTags(tags)
var newTag = data.filter((item) => { .then((data) => {
return item.name == tag;
}).pop(); // 获取已经选择的个数
var clickedCount = $scope.tags.filter((item) => {
if (newTag) { return item.clicked;
newTag.clicked = clickedCount <= 2; }).length
$scope.tags.push(newTag);
} // 获取新增的tag(由于这里只增加一个,所以弹出数组最后一个即可)
var newTag = data.filter((item) => {
toastr.success('[ ' + tag + ' ]插入分类成功!', "提示"); return item.name == tag;
}) }).pop();
.catch((err) => {
toastr.warning('[ ' + tag + ' ]插入分类失败:' + JSON.stringify(err), "提示"); if (newTag) {
}); newTag.clicked = clickedCount <= 2;
} else { $scope.tags.push(newTag);
toastr.warning('您可能没有输入分类或者输入的分类有误', "提示"); }
}
} toastr.success('[ ' + tag + ' ]插入分类成功!', "提示");
})
$scope.clickTag = function(id, clicked) { .catch((err) => {
$scope.tags.forEach((tag) => { toastr.warning('[ ' + tag + ' ]插入分类失败:' + JSON.stringify(err), "提示");
tag.clicked = tag.id == id });
}) } else {
} toastr.warning('您可能没有输入分类或者输入的分类有误', "提示");
}
pubSubService.subscribe('MenuCtr.showAddBookmarkMoadl', $scope, function(event, params) { }
console.log('subscribe MenuCtr.showAddBookmarkMoadl', params);
$('.ui.modal.js-add-bookmark').modal({ $scope.clickTag = function(id, clicked) {
closable: false, $scope.tags.forEach((tag) => {
}).modal('setting', 'transition', dataService.animation()).modal('show'); tag.clicked = tag.id == id
$('.ui.checkbox.js-public').checkbox('set checked'); })
cancelDefault = true; }
init();
getTags({}); pubSubService.subscribe('MenuCtr.showAddBookmarkMoadl', $scope, function(event, params) {
}); console.log('subscribe MenuCtr.showAddBookmarkMoadl', params);
$('.ui.modal.js-add-bookmark').modal({
pubSubService.subscribe('bookmarksCtr.editBookmark', $scope, function(event, params) { closable: false,
console.log('subscribe bookmarksCtr.editBookmark', params); }).modal('setting', 'transition', dataService.animation()).modal('show');
$('.ui.modal.js-add-bookmark').modal({ $('.ui.checkbox.js-public').checkbox('set checked');
closable: false, cancelDefault = true;
}).modal('setting', 'transition', dataService.animation()).modal('show'); init();
setTimeout(function() { getTags({});
$('.ui.modal.js-add-bookmark').modal("refresh"); });
}, 500);
$scope.add = false; pubSubService.subscribe('bookmarksCtr.editBookmark', $scope, function(event, params) {
$scope.loadTags = true; console.log('subscribe bookmarksCtr.editBookmark', params);
cancelDefault = false; $('.ui.modal.js-add-bookmark').modal({
bookmarkService.getBookmark(params) closable: false,
.then((data) => { }).modal('setting', 'transition', dataService.animation()).modal('show');
console.log('getBookmark ', data); setTimeout(function() {
$('.ui.modal.js-add-bookmark').modal("refresh");
var bookmark = data.bookmark; }, 500);
$scope.autoGettitle = false; $scope.add = false;
$scope.id = (bookmark && bookmark.id) || ''; $scope.loadTags = true;
$scope.url = (bookmark && bookmark.url) || ''; cancelDefault = false;
$scope.title = (bookmark && bookmark.title) || ''; bookmarkService.getBookmark(params)
$scope.description = (bookmark && bookmark.description) || ''; .then((data) => {
$scope.tags = data.tags.map((tag) => { console.log('getBookmark ', data);
tag.clicked = false;
return tag; var bookmark = data.bookmark;
}); $scope.autoGettitle = false;
$scope.public = (bookmark && bookmark.id) || '1'; $scope.id = (bookmark && bookmark.id) || '';
$('.ui.checkbox.js-public').checkbox((bookmark && bookmark.public && bookmark.public == '1') ? 'set checked' : 'set unchecked') $scope.url = (bookmark && bookmark.url) || '';
$scope.title = (bookmark && bookmark.title) || '';
$timeout(function() { $scope.description = (bookmark && bookmark.description) || '';
data.bookmarkTags.forEach((tagId) => { $scope.tags = data.tags.map((tag) => {
$scope.tags.forEach((tag) => { tag.clicked = false;
if (tag.id == tagId) { return tag;
tag.clicked = true; });
} $scope.public = (bookmark && bookmark.id) || '1';
}) $('.ui.checkbox.js-public').checkbox((bookmark && bookmark.public && bookmark.public == '1') ? 'set checked' : 'set unchecked')
});
}); $timeout(function() {
$scope.loadTags = false; data.bookmarkTags.forEach((tagId) => {
}) $scope.tags.forEach((tag) => {
.catch((err) => console.log('updateBookmark err', err)); if (tag.id == tagId) {
}); tag.clicked = true;
}
pubSubService.subscribe('TagCtr.storeBookmark', $scope, function(event, bookmark) { })
console.log('TagCtr.storeBookmark', bookmark); });
$('.ui.modal.js-add-bookmark').modal({ });
closable: false, $scope.loadTags = false;
}).modal('setting', 'transition', dataService.animation()).modal('show'); })
$('.ui.checkbox.js-public').checkbox('set checked'); .catch((err) => console.log('updateBookmark err', err));
cancelDefault = true; });
init();
getTags({}); pubSubService.subscribe('TagCtr.storeBookmark', $scope, function(event, bookmark) {
$scope.autoGettitle = false; console.log('TagCtr.storeBookmark', bookmark);
$scope.url = bookmark.url; $('.ui.modal.js-add-bookmark').modal({
$scope.title = bookmark.title; closable: false,
}); }).modal('setting', 'transition', dataService.animation()).modal('show');
$('.ui.checkbox.js-public').checkbox('set checked');
// 在输入文字的时候也会触发所以不要用Ctrl,Shift之类的按键 cancelDefault = true;
$document.bind("keydown", function(event) { init();
$scope.$apply(function() { getTags({});
var menusScope = $('div[ng-controller="menuCtr"]').scope(); $scope.autoGettitle = false;
var key = event.key.toUpperCase(); $scope.url = bookmark.url;
// console.log(key); $scope.title = bookmark.title;
if (key == 'INSERT' && menusScope.login) { });
if ($('.ui.modal.js-add-bookmark').modal('is active')) {
$scope.ok(); // 在输入文字的时候也会触发所以不要用Ctrl,Shift之类的按键
} else { $document.bind("keydown", function(event) {
$('.ui.modal.js-add-bookmark').modal({ $scope.$apply(function() {
closable: false, var menusScope = $('div[ng-controller="menuCtr"]').scope();
}).modal('setting', 'transition', dataService.animation()).modal('show'); var key = event.key.toUpperCase();
$('.ui.checkbox.js-public').checkbox('set checked'); // console.log(key);
cancelDefault = true; if (key == 'INSERT' && menusScope.login) {
init(); if ($('.ui.modal.js-add-bookmark').modal('is active')) {
getTags({}); $scope.ok();
} } else {
} $('.ui.modal.js-add-bookmark').modal({
closable: false,
// Esc按键退出 }).modal('setting', 'transition', dataService.animation()).modal('show');
if (key == 'ESCAPE' && menusScope.login) { $('.ui.checkbox.js-public').checkbox('set checked');
$scope.cancel(); cancelDefault = true;
} init();
}) getTags({});
}); }
}
function getTags(params) {
bookmarkService.getTags(params) // Esc按键退出
.then((data) => { if (key == 'ESCAPE' && menusScope.login) {
data.sort((a, b) => { $scope.cancel();
if (a.last_use > b.last_use) return -1; }
return 1; })
}) });
data.forEach((tag) => {
tag.clicked = false; function getTags(params) {
}) bookmarkService.getTags(params)
// 只有在新增的时候,才默认最近使用书签分类(编辑,转存不默认) .then((data) => {
if ($scope.add && data.length >= 1 && $scope.url == '' && $scope.title == '') { data.sort((a, b) => {
data[0].clicked = true; if (a.last_use > b.last_use) return -1;
} return 1;
$scope.tags = data; })
$scope.loadTags = false; data.forEach((tag) => {
}) tag.clicked = false;
.catch((err) => console.log('getTags err', err)); })
} // 只有在新增的时候,才默认最近使用书签分类(编辑,转存不默认)
if ($scope.add && data.length >= 1 && $scope.url == '' && $scope.title == '') {
function init() { data[0].clicked = true;
$scope.add = true; }
$scope.loadTags = true; $scope.tags = data;
$scope.autoGettitle = true; $scope.loadTags = false;
$scope.loadTitle = false; })
$scope.id = ''; .catch((err) => console.log('getTags err', err));
$scope.url = ''; }
$scope.title = '';
$scope.description = ''; function init() {
$scope.tags = []; // tag = {id:xxx, name:'yyy'} $scope.add = true;
$scope.loadTags = true;
$scope.urlError = false; $scope.autoGettitle = true;
$scope.titleError = false; $scope.loadTitle = false;
$scope.tagsError = false; $scope.id = '';
$scope.url = '';
$scope.public = '1'; $scope.title = '';
} $scope.description = '';
}]); $scope.tags = []; // tag = {id:xxx, name:'yyy'}
$scope.urlError = false;
$scope.titleError = false;
$scope.tagsError = false;
$scope.public = '1';
}
}]);

View File

@ -1,53 +1,53 @@
<div class="ui long modal js-add-bookmark" ng-controller="editCtr"> <div class="ui long modal js-add-bookmark" ng-controller="editCtr">
<!-- <i class="close icon"></i> --> <!-- <i class="close icon"></i> -->
<div class="header"> <div class="header">
{{ add ? '添加书签' : '编辑书签'}} {{ add ? '添加书签' : '编辑书签'}}
</div> </div>
<div class="content"> <div class="content">
<div class="ui form"> <div class="ui form">
<div class="required field"> <div class="required field">
<div class="fields"> <div class="fields">
<div class="required eight wide field" ng-class="{error:urlError}"> <div class="required eight wide field" ng-class="{error:urlError}">
<label>书签链接</label> <label>书签链接</label>
<input type="text" placeholder="输粘贴网页地址http://mybookmark.cn/" ng-model="url"> <input type="text" placeholder="输粘贴网页地址http://mybookmark.cn/" ng-model="url">
</div> </div>
<div class="required eight wide field" ng-class="{error:titleError}"> <div class="required eight wide field" ng-class="{error:titleError}">
<label>书签标题</label> <label ng-click="restoreTitle()">书签标题</label>
<div class="ui icon input" ng-class="{loading:loadTitle}"> <div class="ui icon input" ng-class="{loading:loadTitle}">
<input type="text" ng-attr-placeholder="{{loadTitle ? '正在获取书签标题。。。' : '在书签链接处粘贴正确的网站会自动获取'}}" ng-model="title"> <input type="text" ng-attr-placeholder="{{loadTitle ? '正在获取书签标题。。。' : '在书签链接处粘贴正确的网站会自动获取'}}" ng-model="title">
<i class="search icon" ng-show="loadTitle && title.length==0"></i> <i class="search icon" ng-show="loadTitle && title.length==0"></i>
</div> </div>
</div> </div>
</div> </div>
</div> </div>
<div class="required field"> <div class="required field">
<label>已有书签分类选择 <label>已有书签分类选择
<span title="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;友情提示:&#10;1、添加新书签根据使用经验默认会选择最后一次使用分类。&#10;2、如果不是的直接去选择其他的就好系统会自动取消。&#10;3、如果你想同时选默认与其他的分类你选了其他分类之后再来选中取消的默认分类即可。&#10;4、若想对当前分类进行编辑请前往分类页面"> <span title="&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;友情提示:&#10;1、添加新书签根据使用经验默认会选择最后一次使用分类。&#10;2、如果不是的直接去选择其他的就好系统会自动取消。&#10;3、如果你想同时选默认与其他的分类你选了其他分类之后再来选中取消的默认分类即可。&#10;4、若想对当前分类进行编辑请前往分类页面">
<i class="info circle icon"></i> <i class="info circle icon"></i>
</span> </span>
</label> </label>
<div class="ui active inverted dimmer" ng-class="{active:loadTags, disabled: !loadTags}"> <div class="ui active inverted dimmer" ng-class="{active:loadTags, disabled: !loadTags}">
<div class="ui text loader">正在获取分类...</div> <div class="ui text loader">正在获取分类...</div>
</div> </div>
<div class="ui label" style="margin:3px 10px 8px 0px;cursor:default;" ng-class="{green:tag.clicked}" ng-repeat="tag in tags" ng-click="clickTag(tag.id, !tag.clicked)" ng-show="!loadTags">{{ tag.name }}</div> <div class="ui label" style="margin:3px 10px 8px 0px;cursor:default;" ng-class="{green:tag.clicked}" ng-repeat="tag in tags" ng-click="clickTag(tag.id, !tag.clicked)" ng-show="!loadTags">{{ tag.name }}</div>
<div class="ui label" style="margin:3px 10px 8px 0px;cursor:default;" title="添加新分类" ng-click="showAddTag()" ng-show="!loadTags"> <div class="ui label" style="margin:3px 10px 8px 0px;cursor:default;" title="添加新分类" ng-click="showAddTag()" ng-show="!loadTags">
<i style="margin-left:10px;" class="plus icon"></i> <i style="margin-left:10px;" class="plus icon"></i>
</div> </div>
</div> </div>
<div class="field"> <div class="field">
<label>内容</label> <label>内容</label>
<textarea name="text" rows="6" placeholder="可以是网站的说明,也可以备忘一下账号或者摘抄内容,就算公开你的链接,这个也只有自己能在详情里面看到" ng-model="description"></textarea> <textarea name="text" rows="6" placeholder="可以是网站的说明,也可以备忘一下账号或者摘抄内容,就算公开你的链接,这个也只有自己能在详情里面看到" ng-model="description"></textarea>
</div> </div>
<div class="field"> <div class="field">
<div class="ui checkbox checked js-public"> <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>
</div> </div>
</div> </div>
</div> </div>
<div class="actions"> <div class="actions">
<div class="ui cancel button" ng-click="cancel()" style="cursor:default;">取消</div> <div class="ui cancel button" ng-click="cancel()" style="cursor:default;">取消</div>
<div class="ui green button" ng-click="ok()" style="cursor:default;">发送</div> <div class="ui green button" ng-click="ok()" style="cursor:default;">发送</div>
</div> </div>
</div> </div>