#214: update "Current branch/tag" on removing of branch

This commit is contained in:
Vokhmin Alexey V 2013-07-19 14:16:36 +04:00
parent fd1f81c466
commit 9ea47a1159
1 changed files with 5 additions and 0 deletions

View File

@ -55,7 +55,12 @@ RosaABF.controller('ProjectRefsController', ['$scope', '$http', 'ApiProject', fu
function() { // on success
var i = $scope.branches.indexOf(branch);
if(i != -1) { $scope.branches.splice(i, 1); }
$scope.updateBranchesCount();
// Remove branch from "Current branch/tag:" select box
$('#branch_selector option').filter(function() {
return this.value.match('.*\/branches\/' + branch.ref + '.*');
}).remove();
}, function () { // on error
$scope.getRefs();
}