diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-13 10:58:05 +0100 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-01-13 10:58:05 +0100 |
commit | 694e8b03515f25e36cef855eddb835355eff4c51 (patch) | |
tree | e16af178da1aa9148cd5f5e63d861d4871a2c9ba /src/main/resources/webapp/apps/app.js | |
parent | 27d74ce4423d2ec48a9289169c97958526fed77b (diff) | |
download | esper-testing-694e8b03515f25e36cef855eddb835355eff4c51.tar.gz esper-testing-694e8b03515f25e36cef855eddb835355eff4c51.tar.bz2 esper-testing-694e8b03515f25e36cef855eddb835355eff4c51.tar.xz esper-testing-694e8b03515f25e36cef855eddb835355eff4c51.zip |
PagingTableService:
o Adding support for showing a spinner if the query takes more than 500ms.
o Adding a spinner when searching for people.
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; + } +}); |