From 014ce50dc2a387227d559339ac2b74f113e98749 Mon Sep 17 00:00:00 2001 From: luchenqun Date: Fri, 10 Mar 2017 17:01:43 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=B9=A6=E7=AD=BE=E8=AF=A6?= =?UTF-8?q?=E6=83=85=E9=A1=B5=E9=9D=A2=E5=9B=BE=E5=83=8F=E6=BA=A2=E5=87=BA?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app.js | 2 +- public/css/style.css | 5 +++ public/scripts/app-angular.js | 31 +++++++++++++++++++ .../controllers/bookmark-info-controller.js | 11 ++++++- public/scripts/controllers/edit-controller.js | 3 +- public/views/bookmark-info.html | 4 +-- 6 files changed, 50 insertions(+), 6 deletions(-) diff --git a/app.js b/app.js index e251e50..75ee8c6 100644 --- a/app.js +++ b/app.js @@ -75,7 +75,7 @@ app.use(function(err, req, res, next) { error: {} }); }); -// api.checkSnapFaviconState(); +api.checkSnapFaviconState(); api.getSnapByTimer(); api.getFaviconByTimer(); diff --git a/public/css/style.css b/public/css/style.css index 5304190..bb603de 100644 --- a/public/css/style.css +++ b/public/css/style.css @@ -88,3 +88,8 @@ img.operator { width: 16px; height: 16px } +.js-bookmark-info .content img { + max-width:100%; + max-height:100%; + padding-right: 20px; +} diff --git a/public/scripts/app-angular.js b/public/scripts/app-angular.js index 65d33a4..5d32343 100644 --- a/public/scripts/app-angular.js +++ b/public/scripts/app-angular.js @@ -57,3 +57,34 @@ app.config(function($stateProvider, $urlRouterProvider, $httpProvider) { controller: 'homeCtr' }); }); + +console.log([ + " _ooOoo_", + " o8888888o", + " 88\" . \"88", + " (| -_- |)", + " O\\ = /O", + " ____/`---'\\____", + " .' \\\\| |// `.", + " / \\\\||| : |||// \\", + " / _||||| -:- |||||- \\", + " | | \\\\\\ - /// | |", + " | \\_| ''\\---/'' | |", + " \\ .-\\__ `-` ___/-. /", + " ___`. .' /--.--\\ `. . __", + " .\"\" '< `.___\\_<|>_/___.' >'\"\".", + " | | : `- \\`.;`\\ _ /`;.`/ - ` : | |", + " \\ \\ `-. \\_ __\\ /__ _/ .-` / /", + "======`-.____`-.___\\_____/___.-`____.-'======", + " `=---='", + "^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^", + " 佛祖保佑 永无BUG", + " 写字楼里写字间,写字间里程序员;", + " 程序人员写程序,又拿程序换酒钱。", + " 酒醒只在网上坐,酒醉还来网下眠;", + " 酒醉酒醒日复日,网上网下年复年。", + " 但愿老死电脑间,不愿鞠躬老板前;", + " 奔驰宝马贵者趣,公交自行程序员。", + " 别人笑我忒疯癫,我笑自己命太贱;", + " 不见满街漂亮妹,哪个归得程序员?", +].join('\n')); diff --git a/public/scripts/controllers/bookmark-info-controller.js b/public/scripts/controllers/bookmark-info-controller.js index 6b859b2..0af33b3 100644 --- a/public/scripts/controllers/bookmark-info-controller.js +++ b/public/scripts/controllers/bookmark-info-controller.js @@ -1,4 +1,4 @@ -app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$window', '$filter', 'bookmarkService', 'pubSubService', function($scope, $state, $timeout, $sce, $window, $filter, bookmarkService, pubSubService) { +app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$window', '$filter', '$document', 'bookmarkService', 'pubSubService', function($scope, $state, $timeout, $sce, $window, $filter, $document, bookmarkService, pubSubService) { console.log("Hello bookmarkInfoCtr"); $scope.bookmark = {} $scope.content = ''; @@ -63,6 +63,15 @@ app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$win }); } + $document.bind("keydown", function(event) { + $scope.$apply(function() { + // Esc按键,退出 + if (event.keyCode == 27) { + $('.ui.modal.js-bookmark-info').modal("hide"); + } + }) + }); + function transition() { var data = ['scale', 'fade', 'fade up', 'fade down', 'fade left', 'fade right', 'horizontal flip', 'vertical flip', 'drop', 'fly left', 'fly right', 'fly up', 'fly down', 'swing left', 'swing right', 'swing up', diff --git a/public/scripts/controllers/edit-controller.js b/public/scripts/controllers/edit-controller.js index 4153d8b..e53ba60 100644 --- a/public/scripts/controllers/edit-controller.js +++ b/public/scripts/controllers/edit-controller.js @@ -76,7 +76,6 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'bookmar .catch((err) => console.log('addTags err', err)); } $scope.cancel = function() { - console.log('Hello , you have click cancel btn......'); $('.ui.modal.js-add-bookmark').modal('hide'); $('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('clear'); @@ -198,7 +197,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', '$document', 'bookmar $scope.newTags = bookmark.tags.map((item) => item.name).toString(); }); - // 在输入文字的时候也会触发,暂删掉 + // 在输入文字的时候也会触发,所以不要用Ctrl,Shift之类的按键 $document.bind("keydown", function(event) { $scope.$apply(function() { // console.log(event.keyCode); diff --git a/public/views/bookmark-info.html b/public/views/bookmark-info.html index dfa710c..625a873 100644 --- a/public/views/bookmark-info.html +++ b/public/views/bookmark-info.html @@ -1,4 +1,4 @@ -