Panel: fixed duplicate panel, broken after yesterdays panel menu model refactoring

This commit is contained in:
Torkel Ödegaard 2014-11-09 09:44:16 +01:00
parent ef92272bee
commit 3aa619b617
2 changed files with 4 additions and 4 deletions

View File

@ -94,10 +94,6 @@ function (angular, app, _) {
});
};
$scope.duplicatePanel = function(panel, row) {
$scope.dashboard.duplicatePanel(panel, row || $scope.row);
};
$scope.reset_panel = function(type) {
var defaultSpan = 12;
var _as = 12 - $scope.dashboard.rowSpan($scope.row);

View File

@ -33,6 +33,10 @@ function (angular, _) {
$scope.appEvent('show-json-editor', { object: $scope.panel, updateHandler: $scope.replacePanel });
};
$scope.duplicatePanel = function() {
$scope.dashboard.duplicatePanel($scope.panel, $scope.row);
};
$scope.updateColumnSpan = function(span) {
$scope.panel.span = Math.min(Math.max($scope.panel.span + span, 1), 12);