更新书签详情页面图像溢出问题

This commit is contained in:
luchenqun 2017-03-10 17:01:43 +08:00
parent 3cd8f5c253
commit 014ce50dc2
6 changed files with 50 additions and 6 deletions

2
app.js
View File

@ -75,7 +75,7 @@ app.use(function(err, req, res, next) {
error: {}
});
});
// api.checkSnapFaviconState();
api.checkSnapFaviconState();
api.getSnapByTimer();
api.getFaviconByTimer();

View File

@ -88,3 +88,8 @@ img.operator {
width: 16px;
height: 16px
}
.js-bookmark-info .content img {
max-width:100%;
max-height:100%;
padding-right: 20px;
}

View File

@ -57,3 +57,34 @@ app.config(function($stateProvider, $urlRouterProvider, $httpProvider) {
controller: 'homeCtr'
});
});
console.log([
" _ooOoo_",
" o8888888o",
" 88\" . \"88",
" (| -_- |)",
" O\\ = /O",
" ____/`---'\\____",
" .' \\\\| |// `.",
" / \\\\||| : |||// \\",
" / _||||| -:- |||||- \\",
" | | \\\\\\ - /// | |",
" | \\_| ''\\---/'' | |",
" \\ .-\\__ `-` ___/-. /",
" ___`. .' /--.--\\ `. . __",
" .\"\" '< `.___\\_<|>_/___.' >'\"\".",
" | | : `- \\`.;`\\ _ /`;.`/ - ` : | |",
" \\ \\ `-. \\_ __\\ /__ _/ .-` / /",
"======`-.____`-.___\\_____/___.-`____.-'======",
" `=---='",
"^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^",
" 佛祖保佑 永无BUG",
" 写字楼里写字间,写字间里程序员;",
" 程序人员写程序,又拿程序换酒钱。",
" 酒醒只在网上坐,酒醉还来网下眠;",
" 酒醉酒醒日复日,网上网下年复年。",
" 但愿老死电脑间,不愿鞠躬老板前;",
" 奔驰宝马贵者趣,公交自行程序员。",
" 别人笑我忒疯癫,我笑自己命太贱;",
" 不见满街漂亮妹,哪个归得程序员?",
].join('\n'));

View File

@ -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',

View File

@ -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);

View File

@ -1,4 +1,4 @@
<div class="ui long modal js-bookmark-info" ng-controller="bookmarkInfoCtr">
<div class="ui long modal js-bookmark-info" ng-controller="bookmarkInfoCtr" ng-keydown="close()">
<i class="close icon"></i>
<div class="header">
{{bookmark.title}}