Skip to content

Updated for angular 1.4.5 #78

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ results

npm-debug.log

bower_components
node_modules
.DS_Store

Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ Only the values you'd like overriden need to be specified.


## Release History
* v4.1.4 - Updated for Angular 1.4.5
* v4.1.3 - Fix for issue #45 and issue #49.
* v4.1.2 - Small bugs fixed, wrapperClass option added.
* v4.1.1 - Compatibility with Angular 1.3.
Expand Down
6 changes: 3 additions & 3 deletions angular-busy.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
currentTemplate = options.templateUrl;
backdrop = options.backdrop;

$http.get(currentTemplate,{cache: $templateCache}).success(function(indicatorTemplate){
$http.get(currentTemplate,{cache: $templateCache}).then(function(res){

options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop;

Expand All @@ -220,7 +220,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
element.append(backdropElement);
}

var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate + '</div>';
var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + res.data + '</div>';
templateElement = $compile(template)(templateScope);

angular.element(templateElement.children()[0])
Expand All @@ -231,7 +231,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
.css('bottom',0);
element.append(templateElement);

}).error(function(data){
}).catch(function(data){
throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
});
}
Expand Down
8 changes: 4 additions & 4 deletions bower.json
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
{
"name": "angular-busy",
"version": "4.1.3",
"version": "4.1.4",
"main": [
"dist/angular-busy.js",
"dist/angular-busy.css"
],
"dependencies": {
"angular": "~1.3",
"angular-animate": "~1.3"
"angular": "~1.4",
"angular-animate": "~1.4"
},
"ignore": [
"**/.*",
Expand All @@ -26,7 +26,7 @@
"README.md"
],
"devDependencies": {
"angular-mocks": "~1.3",
"angular-mocks": "~1.4",
"jquery": "~2.1.0"
}
}
65 changes: 44 additions & 21 deletions dist/angular-busy.js
Original file line number Diff line number Diff line change
Expand Up @@ -210,7 +210,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
currentTemplate = options.templateUrl;
backdrop = options.backdrop;

$http.get(currentTemplate,{cache: $templateCache}).success(function(indicatorTemplate){
$http.get(currentTemplate,{cache: $templateCache}).then(function(res){

options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop;

Expand All @@ -220,7 +220,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
element.append(backdropElement);
}

var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate + '</div>';
var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + res.data + '</div>';
templateElement = $compile(template)(templateScope);

angular.element(templateElement.children()[0])
Expand All @@ -231,7 +231,7 @@ angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusy
.css('bottom',0);
element.append(templateElement);

}).error(function(data){
}).catch(function(data){
throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
});
}
Expand All @@ -247,28 +247,51 @@ angular.module('cgBusy').run(['$templateCache', function($templateCache) {
'use strict';

$templateCache.put('angular-busy.html',
"<div class=\"cg-busy-default-wrapper\">\n" +
"<div class=\"cg-busy-default-wrapper\">\r" +
"\n" +
" <div class=\"cg-busy-default-sign\">\n" +
"\r" +
"\n" +
" <div class=\"cg-busy-default-spinner\">\n" +
" <div class=\"bar1\"></div>\n" +
" <div class=\"bar2\"></div>\n" +
" <div class=\"bar3\"></div>\n" +
" <div class=\"bar4\"></div>\n" +
" <div class=\"bar5\"></div>\n" +
" <div class=\"bar6\"></div>\n" +
" <div class=\"bar7\"></div>\n" +
" <div class=\"bar8\"></div>\n" +
" <div class=\"bar9\"></div>\n" +
" <div class=\"bar10\"></div>\n" +
" <div class=\"bar11\"></div>\n" +
" <div class=\"bar12\"></div>\n" +
" </div>\n" +
" <div class=\"cg-busy-default-sign\">\r" +
"\n" +
" <div class=\"cg-busy-default-text\">{{$message}}</div>\n" +
"\r" +
"\n" +
" </div>\n" +
" <div class=\"cg-busy-default-spinner\">\r" +
"\n" +
" <div class=\"bar1\"></div>\r" +
"\n" +
" <div class=\"bar2\"></div>\r" +
"\n" +
" <div class=\"bar3\"></div>\r" +
"\n" +
" <div class=\"bar4\"></div>\r" +
"\n" +
" <div class=\"bar5\"></div>\r" +
"\n" +
" <div class=\"bar6\"></div>\r" +
"\n" +
" <div class=\"bar7\"></div>\r" +
"\n" +
" <div class=\"bar8\"></div>\r" +
"\n" +
" <div class=\"bar9\"></div>\r" +
"\n" +
" <div class=\"bar10\"></div>\r" +
"\n" +
" <div class=\"bar11\"></div>\r" +
"\n" +
" <div class=\"bar12\"></div>\r" +
"\n" +
" </div>\r" +
"\n" +
"\r" +
"\n" +
" <div class=\"cg-busy-default-text\">{{$message}}</div>\r" +
"\n" +
"\r" +
"\n" +
" </div>\r" +
"\n" +
"\r" +
"\n" +
"</div>"
);
Expand Down
2 changes: 1 addition & 1 deletion dist/angular-busy.min.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "angular-busy",
"main": "angular-busy.js",
"version": "4.1.3",
"version": "4.1.4",
"description": "",
"repository": {
"type": "git",
Expand Down