summaryrefslogtreecommitdiffstats
path: root/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy
diff options
context:
space:
mode:
authorSerenaFeng <feng.xiaowei@zte.com.cn>2017-05-12 01:49:57 +0800
committerSerenaFeng <feng.xiaowei@zte.com.cn>2017-05-12 10:11:57 +0800
commit55d74f86440a5a804d4551e04f7fd39518af0723 (patch)
treea509c00c4bbf0b274030178493407ee723756185 /testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy
parent6df5e1b763a1e8a022f6d3dad738c5b1df468a17 (diff)
add web portal framework for TestAPI
Change-Id: I62cea8b59ffe6a6cde98051c130f4502c07d3557 Signed-off-by: SerenaFeng <feng.xiaowei@zte.com.cn>
Diffstat (limited to 'testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy')
-rw-r--r--testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/.bower.json42
-rwxr-xr-xtestapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/LICENSE20
-rwxr-xr-xtestapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.css285
-rwxr-xr-xtestapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.html24
-rwxr-xr-xtestapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.js244
-rwxr-xr-xtestapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/bower.json32
6 files changed, 647 insertions, 0 deletions
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/.bower.json b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/.bower.json
new file mode 100644
index 0000000..7c9c3ad
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/.bower.json
@@ -0,0 +1,42 @@
+{
+ "name": "angular-busy",
+ "version": "4.1.3",
+ "main": [
+ "dist/angular-busy.js",
+ "dist/angular-busy.css"
+ ],
+ "dependencies": {
+ "angular": "~1.3",
+ "angular-animate": "~1.3"
+ },
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "components",
+ "test",
+ "temp",
+ "demo",
+ "lib",
+ "./angular-busy.css",
+ "./angular-busy.html",
+ "./angular-busy.js",
+ "Gruntfile.js",
+ "package.json",
+ "README.md"
+ ],
+ "devDependencies": {
+ "angular-mocks": "~1.3",
+ "jquery": "~2.1.0"
+ },
+ "homepage": "https://github.com/cgross/angular-busy",
+ "_release": "4.1.3",
+ "_resolution": {
+ "type": "version",
+ "tag": "v4.1.3",
+ "commit": "f2e3261a0982da1f023881a6e7e3239cb626c9a4"
+ },
+ "_source": "https://github.com/cgross/angular-busy.git",
+ "_target": "4.1.3",
+ "_originalSource": "angular-busy"
+} \ No newline at end of file
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/LICENSE b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/LICENSE
new file mode 100755
index 0000000..2fcddc3
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/LICENSE
@@ -0,0 +1,20 @@
+Copyright 2013 Chris Gross
+
+Permission is hereby granted, free of charge, to any person obtaining
+a copy of this software and associated documentation files (the
+"Software"), to deal in the Software without restriction, including
+without limitation the rights to use, copy, modify, merge, publish,
+distribute, sublicense, and/or sell copies of the Software, and to
+permit persons to whom the Software is furnished to do so, subject to
+the following conditions:
+
+The above copyright notice and this permission notice shall be
+included in all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.css b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.css
new file mode 100755
index 0000000..7999513
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.css
@@ -0,0 +1,285 @@
+.cg-busy{
+ position:absolute;
+ top:0px;
+ left:0px;
+ right:0px;
+ bottom:0px;
+ z-index:1001;
+}
+
+.cg-busy-animation.ng-hide-add,
+.cg-busy-animation.ng-hide-remove {
+ -webkit-transition:all .3s ease;
+ -moz-transition:all .3s ease;
+ -o-transition:all .3s ease;
+ transition:all .3s ease;
+ display:block !important;
+}
+.cg-busy-animation.ng-hide-remove {
+ opacity:0;
+ -webkit-transform:translate(0px,-40px);
+ -moz-transform:translate(0px,-40px);
+ -ms-transform:translate(0px,-40px);
+ -o-transform:translate(0px,-40px);
+ transform:translate(0px,-40px);
+}
+.cg-busy-animation.ng-hide-remove.ng-hide-remove-active {
+ opacity:1;
+ -webkit-transform:translate(0px,0px);
+ -moz-transform:translate(0px,0px);
+ -ms-transform:translate(0px,0px);
+ -o-transform:translate(0px,0px);
+ transform:translate(0px,0px);
+}
+.cg-busy-animation.ng-hide-add {
+ opacity:1;
+ -webkit-transform:translate(0px,0px);
+ -moz-transform:translate(0px,0px);
+ -ms-transform:translate(0px,0px);
+ -o-transform:translate(0px,0px);
+ transform:translate(0px,0px);
+}
+.cg-busy-animation.ng-hide-add.ng-hide-add-active {
+ opacity:0;
+ -webkit-transform:translate(0px,-40px);
+ -moz-transform:translate(0px,-40px);
+ -ms-transform:translate(0px,-40px);
+ -o-transform:translate(0px,-40px);
+ transform:translate(0px,-40px);
+}
+
+.cg-busy-backdrop {
+ background-color:white;
+ opacity:.7;
+}
+
+.cg-busy-backdrop-animation.ng-hide-add,
+.cg-busy-backdrop-animation.ng-hide-remove {
+ -webkit-transition:opacity .3s ease;
+ -moz-transition:opacity .3s ease;
+ -o-transition:opacity .3s ease;
+ transition:opacity .3s ease;
+ display:block !important;
+}
+
+.cg-busy-backdrop-animation.ng-hide {
+ opacity:0;
+}
+
+/* All styles below are for the default template. */
+
+.cg-busy-default-wrapper {
+ text-align:center;
+}
+
+.cg-busy-default-sign{
+ display: inline-block;
+ position:relative;
+ z-index:1002;
+ padding-bottom: 6px;
+ color:#333333;
+ text-shadow:0 1px 1px rgba(255, 255, 255, 0.75);
+ background-color:#e9eeee;
+ border:1px solid #dddddd;
+ border-top-width:0;
+ -webkit-border-radius:7px;
+ -moz-border-radius:7px;
+ border-radius:7px;
+ border-top-left-radius:0;
+ border-top-right-radius:0;
+ -webkit-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+ -moz-box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+ box-shadow:inset 0 1px 0 rgba(255,255,255,.2), 0 1px 2px rgba(0,0,0,.05);
+}
+.cg-busy-default-text{
+ margin:13px 12px 6px 49px;
+ font-size:16px;
+ color:#555;
+ text-align: left;
+ max-width: 400px;
+}
+.cg-busy-default-spinner{
+ position:absolute;
+ width:25px;
+ height:25px;
+ display:inline-block;
+ top:12px;
+ left:14px;
+}
+.cg-busy-default-spinner div{
+ width:12%;
+ height:26%;
+ background:#000;
+ position:absolute;
+ left:44.5%;
+ top:37%;
+ opacity:0;
+ -webkit-animation:cg-busy-spinner-anim 1s linear infinite;
+ -moz-animation:cg-busy-spinner-anim 1s linear infinite;
+ -ms-animation:cg-busy-spinner-anim 1s linear infinite;
+ -o-animation:cg-busy-spinner-anim 1s linear infinite;
+ animation:cg-busy-spinner-anim 1s linear infinite;
+ -webkit-border-radius:50px;
+ -moz-border-radius:50px;
+ border-radius:50px;
+ -webkit-box-shadow:0 0 3px rgba(0,0,0,0.2);
+ -moz-box-shadow:0 0 3px rgba(0,0,0,0.2);
+ box-shadow:0 0 3px rgba(0,0,0,0.2);
+}
+.cg-busy-default-spinner div.bar1{
+ -webkit-transform:rotate(0deg) translate(0, -142%);
+ -moz-transform:rotate(0deg) translate(0, -142%);
+ -ms-transform:rotate(0deg) translate(0, -142%);
+ -o-transform:rotate(0deg) translate(0, -142%);
+ transform:rotate(0deg) translate(0, -142%);
+ -webkit-animation-delay:0s;
+ -moz-animation-delay:0s;
+ -ms-animation-delay:0s;
+ -o-animation-delay:0s;
+ animation-delay:0s;
+}
+.cg-busy-default-spinner div.bar2{
+ -webkit-transform:rotate(30deg) translate(0, -142%);
+ -moz-transform:rotate(30deg) translate(0, -142%);
+ -ms-transform:rotate(30deg) translate(0, -142%);
+ -o-transform:rotate(30deg) translate(0, -142%);
+ transform:rotate(30deg) translate(0, -142%);
+ -webkit-animation-delay:-0.9167s;
+ -moz-animation-delay:-0.9167s;
+ -ms-animation-delay:-0.9167s;
+ -o-animation-delay:-0.9167s;
+ animation-delay:-0.9167s;
+}
+.cg-busy-default-spinner div.bar3{
+ -webkit-transform:rotate(60deg) translate(0, -142%);
+ -moz-transform:rotate(60deg) translate(0, -142%);
+ -ms-transform:rotate(60deg) translate(0, -142%);
+ -o-transform:rotate(60deg) translate(0, -142%);
+ transform:rotate(60deg) translate(0, -142%);
+ -webkit-animation-delay:-0.833s;
+ -moz-animation-delay:-0.833s;
+ -ms-animation-delay:-0.833s;
+ -o-animation-delay:-0.833s;
+ animation-delay:-0.833s;
+}
+.cg-busy-default-spinner div.bar4{
+ -webkit-transform:rotate(90deg) translate(0, -142%);
+ -moz-transform:rotate(90deg) translate(0, -142%);
+ -ms-transform:rotate(90deg) translate(0, -142%);
+ -o-transform:rotate(90deg) translate(0, -142%);
+ transform:rotate(90deg) translate(0, -142%);
+ -webkit-animation-delay:-0.75s;
+ -moz-animation-delay:-0.75s;
+ -ms-animation-delay:-0.75s;
+ -o-animation-delay:-0.75s;
+ animation-delay:-0.75s;
+}
+.cg-busy-default-spinner div.bar5{
+ -webkit-transform:rotate(120deg) translate(0, -142%);
+ -moz-transform:rotate(120deg) translate(0, -142%);
+ -ms-transform:rotate(120deg) translate(0, -142%);
+ -o-transform:rotate(120deg) translate(0, -142%);
+ transform:rotate(120deg) translate(0, -142%);
+ -webkit-animation-delay:-0.667s;
+ -moz-animation-delay:-0.667s;
+ -ms-animation-delay:-0.667s;
+ -o-animation-delay:-0.667s;
+ animation-delay:-0.667s;
+}
+.cg-busy-default-spinner div.bar6{
+ -webkit-transform:rotate(150deg) translate(0, -142%);
+ -moz-transform:rotate(150deg) translate(0, -142%);
+ -ms-transform:rotate(150deg) translate(0, -142%);
+ -o-transform:rotate(150deg) translate(0, -142%);
+ transform:rotate(150deg) translate(0, -142%);
+ -webkit-animation-delay:-0.5833s;
+ -moz-animation-delay:-0.5833s;
+ -ms-animation-delay:-0.5833s;
+ -o-animation-delay:-0.5833s;
+ animation-delay:-0.5833s;
+}
+.cg-busy-default-spinner div.bar7{
+ -webkit-transform:rotate(180deg) translate(0, -142%);
+ -moz-transform:rotate(180deg) translate(0, -142%);
+ -ms-transform:rotate(180deg) translate(0, -142%);
+ -o-transform:rotate(180deg) translate(0, -142%);
+ transform:rotate(180deg) translate(0, -142%);
+ -webkit-animation-delay:-0.5s;
+ -moz-animation-delay:-0.5s;
+ -ms-animation-delay:-0.5s;
+ -o-animation-delay:-0.5s;
+ animation-delay:-0.5s;
+}
+.cg-busy-default-spinner div.bar8{
+ -webkit-transform:rotate(210deg) translate(0, -142%);
+ -moz-transform:rotate(210deg) translate(0, -142%);
+ -ms-transform:rotate(210deg) translate(0, -142%);
+ -o-transform:rotate(210deg) translate(0, -142%);
+ transform:rotate(210deg) translate(0, -142%);
+ -webkit-animation-delay:-0.41667s;
+ -moz-animation-delay:-0.41667s;
+ -ms-animation-delay:-0.41667s;
+ -o-animation-delay:-0.41667s;
+ animation-delay:-0.41667s;
+}
+.cg-busy-default-spinner div.bar9{
+ -webkit-transform:rotate(240deg) translate(0, -142%);
+ -moz-transform:rotate(240deg) translate(0, -142%);
+ -ms-transform:rotate(240deg) translate(0, -142%);
+ -o-transform:rotate(240deg) translate(0, -142%);
+ transform:rotate(240deg) translate(0, -142%);
+ -webkit-animation-delay:-0.333s;
+ -moz-animation-delay:-0.333s;
+ -ms-animation-delay:-0.333s;
+ -o-animation-delay:-0.333s;
+ animation-delay:-0.333s;
+}
+.cg-busy-default-spinner div.bar10{
+ -webkit-transform:rotate(270deg) translate(0, -142%);
+ -moz-transform:rotate(270deg) translate(0, -142%);
+ -ms-transform:rotate(270deg) translate(0, -142%);
+ -o-transform:rotate(270deg) translate(0, -142%);
+ transform:rotate(270deg) translate(0, -142%);
+ -webkit-animation-delay:-0.25s;
+ -moz-animation-delay:-0.25s;
+ -ms-animation-delay:-0.25s;
+ -o-animation-delay:-0.25s;
+ animation-delay:-0.25s;
+}
+.cg-busy-default-spinner div.bar11{
+ -webkit-transform:rotate(300deg) translate(0, -142%);
+ -moz-transform:rotate(300deg) translate(0, -142%);
+ -ms-transform:rotate(300deg) translate(0, -142%);
+ -o-transform:rotate(300deg) translate(0, -142%);
+ transform:rotate(300deg) translate(0, -142%);
+ -webkit-animation-delay:-0.1667s;
+ -moz-animation-delay:-0.1667s;
+ -ms-animation-delay:-0.1667s;
+ -o-animation-delay:-0.1667s;
+ animation-delay:-0.1667s;
+}
+.cg-busy-default-spinner div.bar12{
+ -webkit-transform:rotate(330deg) translate(0, -142%);
+ -moz-transform:rotate(330deg) translate(0, -142%);
+ -ms-transform:rotate(330deg) translate(0, -142%);
+ -o-transform:rotate(330deg) translate(0, -142%);
+ transform:rotate(330deg) translate(0, -142%);
+ -webkit-animation-delay:-0.0833s;
+ -moz-animation-delay:-0.0833s;
+ -ms-animation-delay:-0.0833s;
+ -o-animation-delay:-0.0833s;
+ animation-delay:-0.0833s;
+}
+
+@-webkit-keyframes cg-busy-spinner-anim{
+ from {opacity: 1;}
+ to {opacity: 0.25;}
+}
+@-moz-keyframes cg-busy-spinner-anim{
+ from {opacity: 1;}
+ to {opacity: 0.25;}
+}
+@keyframes cg-busy-spinner-anim{
+ from {opacity: 1;}
+ to {opacity: 0.25;}
+}
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.html b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.html
new file mode 100755
index 0000000..f3f0756
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.html
@@ -0,0 +1,24 @@
+<div class="cg-busy-default-wrapper">
+
+ <div class="cg-busy-default-sign">
+
+ <div class="cg-busy-default-spinner">
+ <div class="bar1"></div>
+ <div class="bar2"></div>
+ <div class="bar3"></div>
+ <div class="bar4"></div>
+ <div class="bar5"></div>
+ <div class="bar6"></div>
+ <div class="bar7"></div>
+ <div class="bar8"></div>
+ <div class="bar9"></div>
+ <div class="bar10"></div>
+ <div class="bar11"></div>
+ <div class="bar12"></div>
+ </div>
+
+ <div class="cg-busy-default-text">{{$message}}</div>
+
+ </div>
+
+</div> \ No newline at end of file
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.js b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.js
new file mode 100755
index 0000000..557435c
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/angular-busy.js
@@ -0,0 +1,244 @@
+angular.module('cgBusy',[]);
+
+//loosely modeled after angular-promise-tracker
+angular.module('cgBusy').factory('_cgBusyTrackerFactory',['$timeout','$q',function($timeout,$q){
+
+ return function(){
+
+ var tracker = {};
+ tracker.promises = [];
+ tracker.delayPromise = null;
+ tracker.durationPromise = null;
+ tracker.delayJustFinished = false;
+
+ tracker.reset = function(options){
+ tracker.minDuration = options.minDuration;
+
+ tracker.promises = [];
+ angular.forEach(options.promises,function(p){
+ if (!p || p.$cgBusyFulfilled) {
+ return;
+ }
+ addPromiseLikeThing(p);
+ });
+
+ if (tracker.promises.length === 0) {
+ //if we have no promises then dont do the delay or duration stuff
+ return;
+ }
+
+ tracker.delayJustFinished = false;
+ if (options.delay) {
+ tracker.delayPromise = $timeout(function(){
+ tracker.delayPromise = null;
+ tracker.delayJustFinished = true;
+ },parseInt(options.delay,10));
+ }
+ if (options.minDuration) {
+ tracker.durationPromise = $timeout(function(){
+ tracker.durationPromise = null;
+ },parseInt(options.minDuration,10) + (options.delay ? parseInt(options.delay,10) : 0));
+ }
+ };
+
+ tracker.isPromise = function(promiseThing){
+ var then = promiseThing && (promiseThing.then || promiseThing.$then ||
+ (promiseThing.$promise && promiseThing.$promise.then));
+
+ return typeof then !== 'undefined';
+ };
+
+ tracker.callThen = function(promiseThing,success,error){
+ var promise;
+ if (promiseThing.then || promiseThing.$then){
+ promise = promiseThing;
+ } else if (promiseThing.$promise){
+ promise = promiseThing.$promise;
+ } else if (promiseThing.denodeify){
+ promise = $q.when(promiseThing);
+ }
+
+ var then = (promise.then || promise.$then);
+
+ then.call(promise,success,error);
+ };
+
+ var addPromiseLikeThing = function(promise){
+
+ if (!tracker.isPromise(promise)) {
+ throw new Error('cgBusy expects a promise (or something that has a .promise or .$promise');
+ }
+
+ if (tracker.promises.indexOf(promise) !== -1){
+ return;
+ }
+ tracker.promises.push(promise);
+
+ tracker.callThen(promise, function(){
+ promise.$cgBusyFulfilled = true;
+ if (tracker.promises.indexOf(promise) === -1) {
+ return;
+ }
+ tracker.promises.splice(tracker.promises.indexOf(promise),1);
+ },function(){
+ promise.$cgBusyFulfilled = true;
+ if (tracker.promises.indexOf(promise) === -1) {
+ return;
+ }
+ tracker.promises.splice(tracker.promises.indexOf(promise),1);
+ });
+ };
+
+ tracker.active = function(){
+ if (tracker.delayPromise){
+ return false;
+ }
+
+ if (!tracker.delayJustFinished){
+ if (tracker.durationPromise){
+ return true;
+ }
+ return tracker.promises.length > 0;
+ } else {
+ //if both delay and min duration are set,
+ //we don't want to initiate the min duration if the
+ //promise finished before the delay was complete
+ tracker.delayJustFinished = false;
+ if (tracker.promises.length === 0) {
+ tracker.durationPromise = null;
+ }
+ return tracker.promises.length > 0;
+ }
+ };
+
+ return tracker;
+
+ };
+}]);
+
+angular.module('cgBusy').value('cgBusyDefaults',{});
+
+angular.module('cgBusy').directive('cgBusy',['$compile','$templateCache','cgBusyDefaults','$http','_cgBusyTrackerFactory',
+ function($compile,$templateCache,cgBusyDefaults,$http,_cgBusyTrackerFactory){
+ return {
+ restrict: 'A',
+ link: function(scope, element, attrs, fn) {
+
+ //Apply position:relative to parent element if necessary
+ var position = element.css('position');
+ if (position === 'static' || position === '' || typeof position === 'undefined'){
+ element.css('position','relative');
+ }
+
+ var templateElement;
+ var backdropElement;
+ var currentTemplate;
+ var templateScope;
+ var backdrop;
+ var tracker = _cgBusyTrackerFactory();
+
+ var defaults = {
+ templateUrl: 'angular-busy.html',
+ delay:0,
+ minDuration:0,
+ backdrop: true,
+ message:'Please Wait...',
+ wrapperClass: 'cg-busy cg-busy-animation'
+ };
+
+ angular.extend(defaults,cgBusyDefaults);
+
+ scope.$watchCollection(attrs.cgBusy,function(options){
+
+ if (!options) {
+ options = {promise:null};
+ }
+
+ if (angular.isString(options)) {
+ throw new Error('Invalid value for cg-busy. cgBusy no longer accepts string ids to represent promises/trackers.');
+ }
+
+ //is it an array (of promises) or one promise
+ if (angular.isArray(options) || tracker.isPromise(options)) {
+ options = {promise:options};
+ }
+
+ options = angular.extend(angular.copy(defaults),options);
+
+ if (!options.templateUrl){
+ options.templateUrl = defaults.templateUrl;
+ }
+
+ if (!angular.isArray(options.promise)){
+ options.promise = [options.promise];
+ }
+
+ // options.promise = angular.isArray(options.promise) ? options.promise : [options.promise];
+ // options.message = options.message ? options.message : 'Please Wait...';
+ // options.template = options.template ? options.template : cgBusyTemplateName;
+ // options.minDuration = options.minDuration ? options.minDuration : 0;
+ // options.delay = options.delay ? options.delay : 0;
+
+ if (!templateScope) {
+ templateScope = scope.$new();
+ }
+
+ templateScope.$message = options.message;
+
+ if (!angular.equals(tracker.promises,options.promise)) {
+ tracker.reset({
+ promises:options.promise,
+ delay:options.delay,
+ minDuration: options.minDuration
+ });
+ }
+
+ templateScope.$cgBusyIsActive = function() {
+ return tracker.active();
+ };
+
+
+ if (!templateElement || currentTemplate !== options.templateUrl || backdrop !== options.backdrop) {
+
+ if (templateElement) {
+ templateElement.remove();
+ }
+ if (backdropElement){
+ backdropElement.remove();
+ }
+
+ currentTemplate = options.templateUrl;
+ backdrop = options.backdrop;
+
+ $http.get(currentTemplate,{cache: $templateCache}).success(function(indicatorTemplate){
+
+ options.backdrop = typeof options.backdrop === 'undefined' ? true : options.backdrop;
+
+ if (options.backdrop){
+ var backdrop = '<div class="cg-busy cg-busy-backdrop cg-busy-backdrop-animation ng-hide" ng-show="$cgBusyIsActive()"></div>';
+ backdropElement = $compile(backdrop)(templateScope);
+ element.append(backdropElement);
+ }
+
+ var template = '<div class="'+options.wrapperClass+' ng-hide" ng-show="$cgBusyIsActive()">' + indicatorTemplate + '</div>';
+ templateElement = $compile(template)(templateScope);
+
+ angular.element(templateElement.children()[0])
+ .css('position','absolute')
+ .css('top',0)
+ .css('left',0)
+ .css('right',0)
+ .css('bottom',0);
+ element.append(templateElement);
+
+ }).error(function(data){
+ throw new Error('Template specified for cgBusy ('+options.templateUrl+') could not be loaded. ' + data);
+ });
+ }
+
+ },true);
+ }
+ };
+ }
+]);
+
diff --git a/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/bower.json b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/bower.json
new file mode 100755
index 0000000..e670a48
--- /dev/null
+++ b/testapi/3rd_party/static/testapi-ui/assets/lib/angular-busy/bower.json
@@ -0,0 +1,32 @@
+{
+ "name": "angular-busy",
+ "version": "4.1.3",
+ "main": [
+ "dist/angular-busy.js",
+ "dist/angular-busy.css"
+ ],
+ "dependencies": {
+ "angular": "~1.3",
+ "angular-animate": "~1.3"
+ },
+ "ignore": [
+ "**/.*",
+ "node_modules",
+ "bower_components",
+ "components",
+ "test",
+ "temp",
+ "demo",
+ "lib",
+ "./angular-busy.css",
+ "./angular-busy.html",
+ "./angular-busy.js",
+ "Gruntfile.js",
+ "package.json",
+ "README.md"
+ ],
+ "devDependencies": {
+ "angular-mocks": "~1.3",
+ "jquery": "~2.1.0"
+ }
+}