给详情弹窗界面跟书签增加页面做了一个高大上的动画

This commit is contained in:
luchenqun 2017-03-01 21:22:23 +08:00
parent 7ea24707b9
commit bfd4678c9b
2 changed files with 20 additions and 4 deletions

View File

@ -8,7 +8,7 @@ app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$win
console.log('subscribe TagCtr.showBookmarkInfo', bookmark);
$('.ui.modal.js-bookmark-info').modal({
closable: false,
}).modal('show');
}).modal('setting', 'transition', transition()).modal('show');
$scope.bookmark = bookmark;
$scope.content = '';
var params = {
@ -40,4 +40,12 @@ app.controller('bookmarkInfoCtr', ['$scope', '$state', '$timeout', '$sce', '$win
$scope.bookmark.last_click = $filter("date")(new Date(), "yyyy-MM-dd");
}
}
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',
'swing down', 'browse', 'browse right', 'slide down', 'slide up', 'slide left', 'slide right'
];
return data[parseInt(Math.random() * 1000) % data.length];
}
}]);

View File

@ -128,7 +128,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
console.log('subscribe MenuCtr.showAddBookmarkMoadl', params);
$('.ui.modal.js-add-bookmark').modal({
closable: false,
}).modal('show');
}).modal('setting', 'transition', transition()).modal('show');
$('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('clear');
$('.ui.modal.js-add-bookmark .ui.dropdown').addClass('loading');
$('.ui.checkbox.js-public').checkbox('set checked');
@ -140,7 +140,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
console.log('subscribe bookmarksCtr.editBookmark', params);
$('.ui.modal.js-add-bookmark').modal({
closable: false,
}).modal('show');
}).modal('setting', 'transition', transition()).modal('show');
$('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('clear');
$('.ui.modal.js-add-bookmark .ui.dropdown').addClass('loading');
$scope.add = false;
@ -174,7 +174,7 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
console.log('TagCtr.storeBookmark', bookmark);
$('.ui.modal.js-add-bookmark').modal({
closable: false,
}).modal('show');
}).modal('setting', 'transition', transition()).modal('show');
$('.ui.modal.js-add-bookmark .ui.dropdown').dropdown('clear');
$('.ui.modal.js-add-bookmark .ui.dropdown').addClass('loading');
$('.ui.checkbox.js-public').checkbox('set checked');
@ -217,6 +217,14 @@ app.controller('editCtr', ['$scope', '$state', '$timeout', 'bookmarkService', 'p
}, 1000)
}
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',
'swing down', 'browse', 'browse right', 'slide down', 'slide up', 'slide left', 'slide right'
];
return data[parseInt(Math.random() * 1000) % data.length];
}
function init() {
$scope.add = true;
$scope.autoGettitle = true;