diff options
Diffstat (limited to 'src/main/resources/webapp/apps/app.js')
-rwxr-xr-x | src/main/resources/webapp/apps/app.js | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/main/resources/webapp/apps/app.js b/src/main/resources/webapp/apps/app.js index f74206c..8896d33 100755 --- a/src/main/resources/webapp/apps/app.js +++ b/src/main/resources/webapp/apps/app.js @@ -107,3 +107,31 @@ directives.directive('dogtagxl', function () { templateUrl: '/apps/dogtagBig.html' } }); + +directives.directive('spinner', function () { + return function($scope, element, attr) { + var opts = { + lines: 13, // The number of lines to draw + length: 7, // The length of each line + width: 4, // The line thickness + radius: 10, // The radius of the inner circle + corners: 1, // Corner roundness (0..1) + rotate: 0, // The rotation offset + color: '#000', // #rgb or #rrggbb + speed: 1, // Rounds per second + trail: 60, // Afterglow percentage + shadow: false, // Whether to render a shadow + hwaccel: false, // Whether to use hardware acceleration + className: attr.spinnerClass || 'spinner', // The CSS class to assign to the spinner + zIndex: 2e9, // The z-index (defaults to 2000000000) + top: attr.spinnerTop || 'auto', // Top position relative to parent in px + left: attr.spinnerLeft || 'auto' // Left position relative to parent in px + }; + + console.log("attr.spinnerTop =", attr.spinnerTop, "attr.spinnerLeft =", attr.spinnerLeft); + + var target = element[0]; + new Spinner(opts).spin(target); + return target; + } +}); |