mirror of
https://github.com/elastic/kibana.git
synced 2025-04-24 17:59:23 -04:00
remove decorators
This commit is contained in:
parent
b50b1a1702
commit
9839f5d9d4
1 changed files with 0 additions and 36 deletions
|
@ -5,42 +5,6 @@ define(function (require) {
|
|||
require('components/setup/setup');
|
||||
require('services/promises');
|
||||
|
||||
require('modules').get('kibana')
|
||||
.config(function ($provide) {
|
||||
// decorate the $route object to include a change and changeUrl method
|
||||
$provide.decorator('$route', function ($delegate, $location, $rootScope) {
|
||||
var reloading;
|
||||
var doneReloading = function () { reloading = false; };
|
||||
$rootScope.$on('$routeUpdate', doneReloading);
|
||||
$rootScope.$on('$routeChangeStart', doneReloading);
|
||||
|
||||
var reload = function () {
|
||||
if (!reloading) $delegate.reload();
|
||||
reloading = true;
|
||||
};
|
||||
|
||||
$delegate.change = function (path) {
|
||||
if (path !== $location.path()) {
|
||||
$location.path(path);
|
||||
reload();
|
||||
}
|
||||
};
|
||||
$delegate.changeUrl = function (url) {
|
||||
if (url !== $location.url()) {
|
||||
$location.url(url);
|
||||
reload();
|
||||
}
|
||||
};
|
||||
$delegate.matches = function (url) {
|
||||
var route = $delegate.current.$$route;
|
||||
if (!route || !route.regexp) return null;
|
||||
return route.regexp.test(url);
|
||||
};
|
||||
|
||||
return $delegate;
|
||||
});
|
||||
});
|
||||
|
||||
function RouteManager() {
|
||||
var when = [];
|
||||
var additions = [];
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue