Commit f817a8ca by Torkel Ödegaard

Merge remote-tracking branch 'origin/master' into develop

Conflicts:
	src/app/directives/grafanaPanel.js
	src/app/features/dashboard/dashboardCtrl.js
parents 30294740 97e5a046
......@@ -75,6 +75,11 @@ function (angular, app, _, $) {
$button.focus();
});
$scope.$on('$destroy', function() {
$button.unbind();
typeahead.destroy();
});
$compile(elem.contents())($scope);
}
};
......
......@@ -31,13 +31,6 @@ function (angular, $, config) {
$scope.setupDashboard(dashboard);
};
$scope.registerWindowResizeEvent = function() {
angular.element(window).bind('resize', function() {
$timeout.cancel(resizeEventTimeout);
resizeEventTimeout = $timeout(function() { $scope.$broadcast('render'); }, 200);
});
};
$scope.setupDashboard = function(dashboard) {
$rootScope.performance.dashboardLoadStart = new Date().getTime();
$rootScope.performance.panelsInitialized = 0;
......@@ -123,5 +116,15 @@ function (angular, $, config) {
$rootScope.$broadcast('render');
};
$scope.registerWindowResizeEvent = function() {
angular.element(window).bind('resize', function() {
$timeout.cancel(resizeEventTimeout);
resizeEventTimeout = $timeout(function() { $scope.$broadcast('render'); }, 200);
});
$scope.$on('$destroy', function() {
angular.element(window).unbind('resize');
});
};
});
});
......@@ -1956,7 +1956,7 @@
return items ? this.process(items) : this
}
, process: function (items) {
, process: function (items) {
var that = this
items = $.grep(items, function (item) {
......@@ -2050,6 +2050,11 @@
.on('click', $.proxy(this.click, this))
.on('mouseenter', 'li', $.proxy(this.mouseenter, this))
.on('mouseleave', 'li', $.proxy(this.mouseleave, this))
},
destroy: function () {
this.$element.off().removeData('typeahead');
this.$menu.off();
}
, eventSupported: function(eventName) {
......
......@@ -22,7 +22,7 @@
<!-- build:js app/app.js -->
<script src="[[.AppSubUrl]]/public/vendor/require/require.js"></script>
<script src="[[.AppSubUrl]]/public/app/components/require.backend.js"></script>
<script src="[[.AppSubUrl]]/public/app/components/require.config.js"></script>
<!-- endbuild -->
</head>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment