Skip to content

Commit 60a3257

Browse files
committed
Tests refactoring. Ability to set loader reference id with directive name attribute.
1 parent 05a8898 commit 60a3257

File tree

4 files changed

+84
-158
lines changed

4 files changed

+84
-158
lines changed

dist/angular-loading-overlay.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,8 +7,8 @@
77
function link(scope, $element, $attributes) {
88
function activate() {
99
var globalConfig = bsLoadingOverlayService.getGlobalConfig();
10-
referenceId = $attributes.bsLoadingOverlayReferenceId, delay = +$attributes.bsLoadingOverlayDelay || globalConfig.delay,
11-
activeClass = $attributes.bsLoadingOverlayActiveClass || globalConfig.activeClass;
10+
referenceId = $attributes.bsLoadingOverlayReferenceId || $attributes.bsLoadingOverlay,
11+
delay = +$attributes.bsLoadingOverlayDelay || globalConfig.delay, activeClass = $attributes.bsLoadingOverlayActiveClass || globalConfig.activeClass;
1212
var templateUrl = $attributes.bsLoadingOverlayTemplateUrl || globalConfig.templateUrl;
1313
templatePromise = templateUrl ? $templateRequest(templateUrl) : $q.when(!1), templatePromise.then(function(loadedTemplate) {
1414
overlayElement = $compile(loadedTemplate)(scope), overlayElement.isAttached = !1,

package.json

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -7,13 +7,13 @@
77
"url": "https://github.com/bsalex/angular-loading-overlay.git"
88
},
99
"scripts": {
10-
"test-watch": "node_modules/karma/bin/karma start",
11-
"test": "node_modules/karma/bin/karma start --single-run",
12-
"prepush": "npm test && npm build && git add -u",
13-
"watch": "node_modules/grunt-cli/bin/grunt watch",
14-
"build": "node_modules/grunt-cli/bin/grunt build",
15-
"build-dev": "node_modules/grunt-cli/bin/grunt build-dev",
16-
"check": "node_modules/grunt-cli/bin/grunt check"
10+
"test-watch": "karma start",
11+
"test": "karma start --single-run",
12+
"prepush": "npm test && npm run build && git add -u",
13+
"watch": "grunt watch",
14+
"build": "grunt build",
15+
"build-dev": "grunt build-dev",
16+
"check": "grunt check"
1717
},
1818
"author": "Oleksandr Beshchuk <[email protected]>",
1919
"license": "Apache-2.0",

source/loading-overlay.directive.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727

2828
function activate() {
2929
var globalConfig = bsLoadingOverlayService.getGlobalConfig();
30-
referenceId = $attributes.bsLoadingOverlayReferenceId;
30+
referenceId = $attributes.bsLoadingOverlayReferenceId || $attributes.bsLoadingOverlay;
3131
delay = +$attributes.bsLoadingOverlayDelay || globalConfig.delay;
3232
activeClass = $attributes.bsLoadingOverlayActiveClass || globalConfig.activeClass;
3333
var templateUrl = $attributes.bsLoadingOverlayTemplateUrl || globalConfig.templateUrl;

0 commit comments

Comments
 (0)