优化一下界面

This commit is contained in:
luchenqun 2017-02-10 21:54:34 +08:00
parent 4b85423c8a
commit 7f68b749c7
7 changed files with 22 additions and 19 deletions

View File

@ -5,7 +5,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta name="description" content="bookmark"> <meta name="description" content="bookmark">
<meta name="author" content="luchenqun"> <meta name="author" content="luchenqun">
<title>我的书签-随时随地查看你的网络书签</title> <title>在线书签管理工具-我的书签</title>
<link href="/css/externe/semantic.min.css " rel="stylesheet"/> <link href="/css/externe/semantic.min.css " rel="stylesheet"/>
<link href="/css/externe/calendar.min.css" rel="stylesheet"/> <link href="/css/externe/calendar.min.css" rel="stylesheet"/>
<link href="/css/externe/toastr.min.css" rel="stylesheet"/> <link href="/css/externe/toastr.min.css" rel="stylesheet"/>

View File

@ -38,6 +38,9 @@ app.config(function($stateProvider, $urlRouterProvider, $httpProvider) {
.state('settings', { .state('settings', {
url: '/settings', url: '/settings',
templateUrl: '/views/settings.html', templateUrl: '/views/settings.html',
params: {
formIndex: null,
},
controller: 'settingsCtr' controller: 'settingsCtr'
}) })
.state('login', { .state('login', {

View File

@ -80,13 +80,13 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
$scope.addBookmarkbyFile = function() { $scope.addBookmarkbyFile = function() {
console.log("addBookmarkbyFile"); console.log("addBookmarkbyFile");
$state.go('settings', {
formIndex: 2,
});
pubSubService.publish('Common.menuActive', { pubSubService.publish('Common.menuActive', {
login: true, login: true,
index: 3 index: 3
}); });
$state.go('settings', {
})
} }
$scope.closeMsg = function() { $scope.closeMsg = function() {
@ -114,6 +114,9 @@ app.controller('bookmarksCtr', ['$scope', '$state', '$stateParams', '$filter', '
} }
} else { } else {
$scope.bookmarks = data; $scope.bookmarks = data;
if ($scope.bookmarks.length <= 2) {
$(".js-msg").removeClass("hidden");
}
if ($scope.bookmarks.length == 0) { if ($scope.bookmarks.length == 0) {
toastr.info('您还没有书签,请点击菜单栏的添加按钮进行添加', "提示"); toastr.info('您还没有书签,请点击菜单栏的添加按钮进行添加', "提示");
} }

View File

@ -75,16 +75,12 @@ app.controller('menuCtr', ['$scope', '$stateParams', '$state', 'pubSubService',
.then((data) => { .then((data) => {
console.log('logout..........', data) console.log('logout..........', data)
$scope.login = false; $scope.login = false;
$state.go('login', { $state.go('login', {})
foo: 'i love you',
bar: 'hello world'
})
}) })
.catch((err) => console.log('logout err', err)); .catch((err) => console.log('logout err', err));
} }
function updateMenuActive(index) { function updateMenuActive(index) {
console.log('index = ' + index)
$('.ui.menu a.item').removeClass('selected'); $('.ui.menu a.item').removeClass('selected');
$('.ui.menu a.item:eq(' + index + ')').addClass('selected'); $('.ui.menu a.item:eq(' + index + ')').addClass('selected');
} }

View File

@ -1,10 +1,12 @@
app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', 'bookmarkService', 'pubSubService', function($scope, $stateParams, $filter, $state, $window, bookmarkService, pubSubService) { app.controller('settingsCtr', ['$scope', '$stateParams', '$filter', '$state', '$window', 'bookmarkService', 'pubSubService', function($scope, $stateParams, $filter, $state, $window, bookmarkService, pubSubService) {
console.log('Hello settingsCtr......'); console.log('Hello settingsCtr......', $stateParams);
$scope.form = [true, false, false]; $scope.form = [false, false, false];
$scope.passwordOrgin = ""; $scope.passwordOrgin = "";
$scope.passwordNew1 = ""; $scope.passwordNew1 = "";
$scope.passwordNew2 = ""; $scope.passwordNew2 = "";
$scope.form[($stateParams && $stateParams.formIndex) || 0] = true;
$scope.changeForm = function(index) { $scope.changeForm = function(index) {
$scope.form = $scope.form.map(() => false); $scope.form = $scope.form.map(() => false);
$scope.form[index] = true; $scope.form[index] = true;

View File

@ -1,10 +1,10 @@
<div class="ui info message js-msg" ng-if="showStyle === 'navigate' && bookmarks.length <= 2"> <div class="ui hidden info message js-msg" ng-if="showStyle === 'navigate'">
<i class="close icon" ng-click="closeMsg()"></i> <i class="close icon" ng-click="closeMsg()"></i>
<div class="content"> <div class="content">
<div class="header">系统检测到您好像还没添加过书签哦! <div class="header">系统检测到您好像还没添加过书签哦!
</div> </div>
<ul class="list"> <ul class="list">
<li>您可以将您的IE浏览器或者谷歌浏览器上面的书签导入<a style="cursor:pointer;" ng-click="addBookmarkbyFile()">现在就去</a> <li>您可以将您的IE浏览器或者谷歌浏览器上面的书签导入系统<a style="cursor:pointer;" ng-click="addBookmarkbyFile()">现在就去</a>
</li> </li>
<li>您也可以点击菜单栏上面的<i class="add square icon"></i>图标进行添加</li> <li>您也可以点击菜单栏上面的<i class="add square icon"></i>图标进行添加</li>
</ul> </ul>

View File

@ -7,22 +7,21 @@
<p>3、搜索不方便只能搜索关键字无法按照特定条件比如搜索特定的加入时间特定的类型搜索。</p> <p>3、搜索不方便只能搜索关键字无法按照特定条件比如搜索特定的加入时间特定的类型搜索。</p>
<p>4、查阅不方便。一旦一个分类目录你收藏的过多尼玛你在那个目录下面找起来想死的心都有。</p> <p>4、查阅不方便。一旦一个分类目录你收藏的过多尼玛你在那个目录下面找起来想死的心都有。</p>
<p>5、无法查看别人收藏的书签。</p> <p>5、无法查看别人收藏的书签。</p>
<p>6、在别人的电脑上无法查看我收藏的书签。</p>
<p>PS注册在登录界面的右下角。</p> <p>PS注册在登录界面的右下角。</p>
<h2 class="ui dividing header">主要功能(有好的功能,可以在留言里面进行留言)</h2>
<h2 class="ui dividing header">主要功能</h2>
<p>1、需要注册账号用户。(初步完成)</p> <p>1、需要注册账号用户。(初步完成)</p>
<p>2、网站展示有三种展示方式导航列表网格。其中导航以分类展示提取分类的前31个书签。列表以表格展示显示书签详细类容。书签显示顺序以点击次数优先。(已完成导航跟列表,网格未完成)</p> <p>2、网站展示有三种展示方式导航列表网格。其中导航以分类展示提取分类的前31个书签。列表以表格展示显示书签详细类容。书签显示顺序以点击次数优先。(已完成导航跟列表,网格未完成)</p>
<p>3、可以按照指定添加时间段指定分类目录指定网址关键字等进行查询。(完成)</p> <p>3、可以按照指定添加时间段指定分类目录指定网址关键字等进行查询。(完成)</p>
<p>4、添加书签的时候会自动获取title供用户编辑。(完成)</p> <p>4、添加书签的时候会自动获取title供用户编辑。(完成)</p>
<p>5、可以导入Chrome的书签导出文件。(未完成)</p> <p>5、可以导入Chrome的书签导出文件,暂时做在设置里面。(已完成)</p>
<p>6、书签可以作为公有或者私有公有可供所有人搜索。(未完成)</p> <p>6、书签可以作为公有或者私有公有可供所有人搜索。(暂时可以通过用户名进行搜索,待优化)</p>
<p>7、可以收藏别人的书签。(未完成)</p> <p>7、可以收藏别人的书签。(未完成)</p>
<h2 class="ui dividing header">联系方式</h2> <h2 class="ui dividing header">联系方式</h2>
<p>微信跟扣扣530485521记得备注加书签。</p> <p>微信跟扣扣530485521记得备注加书签。</p>
<h2 class="ui dividing header">开发备忘(非开发人员请无视)</h2> <h2 class="ui dividing header">开发备忘(非开发人员请无视)</h2>
<p>1、该代码我托管在Github上:<code>git@github.com:luchenqun/my-bookmark.git</code>我不做Web开发这玩意儿主要是我自己用Chrome浏览器收藏网址不好用而写的。如果你需要源码你尽可随意使用此项目无需通知我。</p> <p>1、该代码我托管在Github上:<code>git@github.com:luchenqun/my-bookmark.git</code>我不做Web开发这玩意儿主要是我自己用Chrome浏览器收藏网址不好用而写的。如果你需要源码你尽可随意使用此项目无需通知我。</p>
<p>2、使用到的东西有NodeJS(做后台) + Express(做Web框架) + AngularJS(有了这个就不要用jQuery了) + Semantic UI(有了这个,界面不会太丑) + MySql(做后台数据库) + MongoDb(做session)。对了用到的sql表在schema.sql里面。</p> <p>2、使用到的东西有NodeJS(做后台) + Express(做Web框架) + AngularJS(有了这个就不要用jQuery了) + Semantic UI(有了这个,界面不会太丑) + MySql(做后台数据库) + MongoDb(做session)。对了用到的sql表在schema.sql里面。</p>
<p>PS暂时还没有README.md文件等整理完公司的一个项目会添加</p>
</div> </div>
</div> </div>