Skip to content

Commit

Permalink
check whether version can be deleted
Browse files Browse the repository at this point in the history
  • Loading branch information
chriskapp committed Jan 27, 2016
1 parent 39e053b commit 62d1f24
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions public/app/routes/routes.js
Original file line number Diff line number Diff line change
Expand Up @@ -178,6 +178,10 @@ angular.module('fusioApp.routes', ['ngRoute', 'ui.bootstrap'])
};

$scope.removeVersion = function(version){
if (version.status != 4 || $scope.route.config.length == 1) {
return;
}

var versions = [];
for (var i = 0; i < $scope.route.config.length; i++) {
if ($scope.route.config[i].name != version.name) {
Expand Down Expand Up @@ -292,6 +296,10 @@ angular.module('fusioApp.routes', ['ngRoute', 'ui.bootstrap'])
};

$scope.removeVersion = function(version){
if (version.status != 4 || $scope.route.config.length == 1) {
return;
}

var versions = [];
for (var i = 0; i < $scope.route.config.length; i++) {
if ($scope.route.config[i].name != version.name) {
Expand Down

0 comments on commit 62d1f24

Please sign in to comment.