Added spinner to all buttons
This commit is contained in:
parent
bea2d6cf78
commit
872cfaba68
8 changed files with 52 additions and 18 deletions
|
|
@ -58,5 +58,22 @@ angular.module('copay.directives')
|
|||
}
|
||||
};
|
||||
}])
|
||||
.directive('loading', function () {
|
||||
return {
|
||||
restrict: 'A',
|
||||
link: function (scope, element, attr) {
|
||||
var a = element.html();
|
||||
var text = attr.loading;
|
||||
scope.$watch('loading', function (val) {
|
||||
if (val) {
|
||||
element.html('<img src="img/loading.gif"> ' + text + '...' );
|
||||
}
|
||||
else {
|
||||
element.html(a);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
})
|
||||
;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue