diff --git a/src/app/pages/ui/animatedPanel/AnimatedPanelPageCtrl.js b/src/app/pages/ui/animatedPanel/AnimatedPanelPageCtrl.js new file mode 100644 index 0000000..4b6c035 --- /dev/null +++ b/src/app/pages/ui/animatedPanel/AnimatedPanelPageCtrl.js @@ -0,0 +1,93 @@ +/** + * @author harisali + * created on 14.03.2017 + */ +(function () { + 'use strict'; + + angular.module('BlurAdmin.pages.ui.animatedPanel') + .controller('AnimatedPanelPageCtrl', AnimatedPanelPageCtrl); + + /** @ngInject */ + function AnimatedPanelPageCtrl($scope) { + $scope.showDetails=function(user){ + $scope.data=user; + $scope.$broadcast("showDetails",user); + }; + $scope.users = [ + { + id: 1, + firstName: 'Mark', + lastName: 'Otto', + username: '@mdo', + email: 'mdo@gmail.com', + age: '28' + }, + { + id: 2, + firstName: 'Jacob', + lastName: 'Thornton', + username: '@fat', + email: 'fat@yandex.ru', + age: '45' + }, + { + id: 3, + firstName: 'Larry', + lastName: 'Bird', + username: '@twitter', + email: 'twitter@outlook.com', + age: '18' + }, + { + id: 4, + firstName: 'John', + lastName: 'Snow', + username: '@snow', + email: 'snow@gmail.com', + age: '20' + }, + { + id: 5, + firstName: 'Jack', + lastName: 'Sparrow', + username: '@jack', + email: 'jack@yandex.ru', + age: '30' + }, + { + id: 6, + firstName: 'Ann', + lastName: 'Smith', + username: '@ann', + email: 'ann@gmail.com', + age: '21' + }, + { + id: 7, + firstName: 'Barbara', + lastName: 'Black', + username: '@barbara', + email: 'barbara@yandex.ru', + age: '43' + }, + { + id: 8, + firstName: 'Sevan', + lastName: 'Bagrat', + username: '@sevan', + email: 'sevan@outlook.com', + age: '13' + }, + { + id: 9, + firstName: 'Ruben', + lastName: 'Vardan', + username: '@ruben', + email: 'ruben@gmail.com', + age: '22' + } + ]; + } + +})(); diff --git a/src/app/pages/ui/animatedPanel/animatedPanel.directive.js b/src/app/pages/ui/animatedPanel/animatedPanel.directive.js new file mode 100644 index 0000000..cf51195 --- /dev/null +++ b/src/app/pages/ui/animatedPanel/animatedPanel.directive.js @@ -0,0 +1,36 @@ +/** + * @author harisali + * created on 14.03.2015 + */ +(function () { + 'use strict'; + + angular.module('BlurAdmin.pages.ui.animatedPanel') + .directive('animatedPanelDir', animatedPanel); + + /** @ngInject */ + function animatedPanel() { + return { + controller: animatedPanelCtrl, + }; + } + + function animatedPanelCtrl($scope,$element,$animate){ + $element.hide(); + var child=$element.children(":eq(0)").children(":eq(0)"); + $scope.$on("showDetails",function(event){ + //animation to show element + $("html, body").animate({ + scrollTop: 0 + }); + $element.slideDown(); + $animate.setClass(child,"zoomIn","zoomOut"); + }); + $scope.hide=function(){ + //animation to hide element + child.removeClass("zoomIn"); + child.addClass("zoomOut"); + $element.slideUp(); + } + } +})(); \ No newline at end of file diff --git a/src/app/pages/ui/animatedPanel/animatedPanel.html b/src/app/pages/ui/animatedPanel/animatedPanel.html new file mode 100644 index 0000000..865e581 --- /dev/null +++ b/src/app/pages/ui/animatedPanel/animatedPanel.html @@ -0,0 +1,67 @@ +
First Name | +Last Name | +Username | ++ |
---|---|---|---|
{{user.firstName}} | +{{user.lastName}} | +{{user.username}} | ++ |