From bfd4678c9b2335cc908862bc90fa78fe2317b72c Mon Sep 17 00:00:00 2001 From: luchenqun Date: Wed, 1 Mar 2017 21:22:23 +0800 Subject: [PATCH] =?UTF-8?q?=E7=BB=99=E8=AF=A6=E6=83=85=E5=BC=B9=E7=AA=97?= =?UTF-8?q?=E7=95=8C=E9=9D=A2=E8=B7=9F=E4=B9=A6=E7=AD=BE=E5=A2=9E=E5=8A=A0?= =?UTF-8?q?=E9=A1=B5=E9=9D=A2=E5=81=9A=E4=BA=86=E4=B8=80=E4=B8=AA=E9=AB=98?= =?UTF-8?q?=E5=A4=A7=E4=B8=8A=E7=9A=84=E5=8A=A8=E7=94=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controllers/bookmark-info-controller.js | 10 +++++++++- public/scripts/controllers/edit-controller.js | 14 +++++++++++--- 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/public/scripts/controllers/bookmark-info-controller.js b/public/scripts/controllers/bookmark-info-controller.js index f6eb00a..d79459f 100644 --- a/public/scripts/controllers/bookmark-info-controller.js +++ b/public/scripts/controllers/bookmark-info-controller.js @@ -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]; + } }]); diff --git a/public/scripts/controllers/edit-controller.js b/public/scripts/controllers/edit-controller.js index b013e58..1b8c58c 100644 --- a/public/scripts/controllers/edit-controller.js +++ b/public/scripts/controllers/edit-controller.js @@ -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;