引导用户去导入浏览器书签
This commit is contained in:
parent
51aa8c10d3
commit
f327610ae6
|
|
@ -11,6 +11,7 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
|||
$scope.totalPages = 0;
|
||||
$scope.currentPage = 1;
|
||||
$scope.inputPage = '';
|
||||
|
||||
$scope.changeCurrentPage = function(currentPage) {
|
||||
currentPage = parseInt(currentPage) || 0;
|
||||
console.log(currentPage);
|
||||
|
|
@ -77,6 +78,21 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
|||
})
|
||||
}
|
||||
|
||||
$scope.addBookmarkbyFile = function() {
|
||||
console.log("addBookmarkbyFile");
|
||||
pubSubService.publish('Common.menuActive', {
|
||||
login: true,
|
||||
index: 3
|
||||
});
|
||||
$state.go('settings', {
|
||||
|
||||
})
|
||||
}
|
||||
|
||||
$scope.closeMsg = function() {
|
||||
$(".js-msg").remove();
|
||||
}
|
||||
|
||||
pubSubService.subscribe('EditCtr.inserBookmarsSuccess', $scope, function(event, params) {
|
||||
params.showStyle = $scope.showStyle;
|
||||
console.log('subscribe EditCtr.inserBookmarsSuccess', params);
|
||||
|
|
@ -115,7 +131,7 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
|||
setTimeout(updateEditPos, 100);
|
||||
|
||||
function updateEditPos() {
|
||||
if($scope.showStyl == 'navigate'){
|
||||
if ($scope.showStyl == 'navigate') {
|
||||
var top = $('.js-segment-navigate').offset().top;
|
||||
var left = $('.js-segment-navigate').offset().left;
|
||||
var width = $('.js-segment-navigate').width();
|
||||
|
|
@ -123,7 +139,7 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
|
|||
$('.js-edit').offset({
|
||||
top: top + 10,
|
||||
left: left + width - 10,
|
||||
})
|
||||
})
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
|
|
@ -51,6 +51,7 @@ app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$
|
|||
fileName: "bookmark",
|
||||
acceptFiles: "text/html",
|
||||
maxFileSize: 10 * 1024 * 1024, // 最大10M
|
||||
dragdropWidth: "100%",
|
||||
onSuccess: function(files, response, xhr, pd) {
|
||||
toastr.success('文件上传成功,3秒钟自动跳转到书签页面', "提示");
|
||||
setTimeout(function() {
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
File diff suppressed because one or more lines are too long
|
|
@ -1,3 +1,15 @@
|
|||
<div class="ui info message js-msg" ng-if="showStyle === 'navigate' && bookmarks.length <= 2">
|
||||
<i class="close icon" ng-click="closeMsg()"></i>
|
||||
<div class="content">
|
||||
<div class="header">系统检测到您好像还没添加过书签哦!
|
||||
</div>
|
||||
<ul class="list">
|
||||
<li>您可以将您的IE浏览器或者谷歌浏览器上面的书签导入!<a style="cursor:pointer;" ng-click="addBookmarkbyFile()">现在就去</a>
|
||||
</li>
|
||||
<li>您也可以点击菜单栏上面的<i class="add square icon"></i>图标进行添加</li>
|
||||
</ul>
|
||||
</div>
|
||||
</div>
|
||||
<div class="ui segment js-segment-navigate" ng-if="showStyle === 'navigate'">
|
||||
<div class="ui container" ng-repeat="tag in bookmarks" ng-init="tagIndex=$index">
|
||||
<div class="ui grid">
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@
|
|||
<input type="text" placeholder="" ng-model="title">
|
||||
</div>
|
||||
<div class="required field">
|
||||
<label>书签分类</label>
|
||||
<label>已有书签分类</label>
|
||||
<div class="fields">
|
||||
<div class="eight wide field" ng-class="{error:tagsError }">
|
||||
<select class="ui fluid search dropdown js-tags" multiple="">
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@
|
|||
<div class="field">
|
||||
<div class="ui submit button" ng-click="login()">登陆</div>
|
||||
<span>
|
||||
<div style="margin-top:20px;float:right;">没有账号?<a herf="#" ng-click="showRegister()">注册一个!</a>
|
||||
<div style="margin-top:20px;float:right;">没有账号?<a style="cursor:pointer;" ng-click="showRegister()">注册一个!</a>
|
||||
</div>
|
||||
</span>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -27,11 +27,19 @@
|
|||
<button class="ui button" type="submit" ng-click="resetPassword()">重置密码</button>
|
||||
</form>
|
||||
<form class="ui form" ng-show="form[1]">
|
||||
书签显示设置
|
||||
书签显示设置(正在开发中...)
|
||||
</form>
|
||||
<form class="ui form" ng-show="form[2]">
|
||||
<div id="fileuploader">点我上传</div>
|
||||
</form>
|
||||
</div>
|
||||
<div id="fileuploader" style="min-width:100px">点我上传</div>
|
||||
<h2 class="ui dividing header">注意事项</h2>
|
||||
<p>1、目前只支持谷歌浏览器跟IE浏览器的书签导入,其他浏览器暂时没测试。如果要导入其他浏览器的书签,可以先将他导入谷歌浏览器再导出。</p>
|
||||
<p>2、谷歌浏览器书签导出方法:<a href="http://jingyan.baidu.com/article/0bc808fc2d3b841bd485b9fb.html" target="_blank">chrome浏览器书签导出</a>
|
||||
</p>
|
||||
<p>2、IE浏览器书签导出方法(里面含有导入的方法,请无视):<a href="http://jingyan.baidu.com/article/0bc808fc6a5bc31bd485b91b.html" target="_blank">IE浏览器收藏夹的导入</a>
|
||||
</p>
|
||||
<p>3、导入的文件不能超过10M</p>
|
||||
</p>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
Loading…
Reference in New Issue