Skip to content

Commit edb0990

Browse files
author
Null McNull
committed
removed block-ui-animation attribute
1 parent cf5b28e commit edb0990

File tree

2 files changed

+1
-40
lines changed

2 files changed

+1
-40
lines changed

src/angular-block-ui/block-ui-directive.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,16 @@ blkUI.directive('blockUi', function(blockUiCompileFn) {
99

1010
return function($element, $attrs) {
1111
$element.append('<div block-ui-container></div>');
12+
1213
return blockUiLinkFn;
1314
};
1415

1516
}).factory('blockUiLinkFn', function(blockUI, blockUIUtils, blockUIConfig) {
1617

17-
function addAnimationClass($element, animation) {
18-
if(animation && animation !== 'none') {
19-
$element.addClass('block-ui-' + animation);
20-
}
21-
}
22-
2318
return function($scope, $element, $attrs) {
2419

2520
$element.addClass('block-ui');
2621

27-
addAnimationClass($element, $attrs.blockUiAnimation || blockUIConfig.animation);
28-
2922
// Create the blockUI instance
3023
// Prefix underscore to prevent integers:
3124
// https://github.com/McNull/angular-block-ui/pull/8

src/angular-block-ui/block-ui-directive.test.js

Lines changed: 0 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -64,38 +64,6 @@ describe('block-ui-directive', function() {
6464

6565
});
6666

67-
describe('animation', function() {
68-
69-
it('should set the configured animation class on the element', function() {
70-
config.animation = 'my-animation';
71-
72-
var className = 'block-ui-' + config.animation;
73-
74-
var $element = $('<div></div>');
75-
76-
linkFn($scope, $element, $attrs);
77-
78-
var result = $element.hasClass(className);
79-
80-
expect(result).toBe(true);
81-
});
82-
83-
it('should set the animation class on the element provided by attribute value', function() {
84-
85-
$attrs.blockUiAnimation = 'the-animation';
86-
var className = 'block-ui-' + $attrs.blockUiAnimation;
87-
88-
var $element = $('<div></div>');
89-
90-
linkFn($scope, $element, $attrs);
91-
92-
var result = $element.hasClass(className);
93-
94-
expect(result).toBe(true);
95-
});
96-
97-
});
98-
9967
describe('block-ui service instance', function() {
10068

10169
it('should create set the service instance as data on the element', function() {

0 commit comments

Comments
 (0)