Moved map js files, added exporting and saving of dashboard, added timer service to manage global timer cancelling, switched to font awesome

This commit is contained in:
Rashid Khan
2013-02-12 08:42:31 -07:00
parent 0d8f1fab9b
commit 0703dd8799
25 changed files with 1123 additions and 97 deletions
+24
View File
@@ -36,4 +36,28 @@ angular.module('kibana.services', [])
});
}
})
.service('timer', function($timeout) {
// This service really just tracks a list of $timeout promises to give us a
// method for cancelling them all when we need to
var timers = [];
this.register = function(promise) {
timers.push(promise);
return promise;
}
this.cancel = function(promise) {
timers = _.without(timers,promise)
$timeout.cancel(promise)
}
this.cancel_all = function() {
_.each(timers, function(t){
$timeout.cancel(t);
});
timers = new Array();
}
});