Skip to content

Commit

Permalink
Merge pull request #490 from carlos-r-mendoza/editfeaturefix
Browse files Browse the repository at this point in the history
edit feature working
  • Loading branch information
rbronz committed Jul 9, 2015
2 parents d4a5e32 + 6afd28a commit 7335308
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 3 deletions.
4 changes: 3 additions & 1 deletion browser/js/board/board.html
Expand Up @@ -69,7 +69,9 @@ <h2 class="noMargin">{{column.name}}
<div class="card-content">
<span ng-controller="EditFeatureController">
<a ng-click="removeFeature(feature, sprintBoard)"><i class="mdi-action-highlight-remove right red-text" popover-placement='left' popover='Delete Feature' popover-trigger="mouseenter"></i></a>
<!-- <a ng-click="editFeature(sprintBoard, feature)"><i class="small mdi-editor-mode-edit right top" popover-placement='left' popover='Edit Feature' popover-trigger="mouseenter"></i></a> -->
<div class="ef">
<a ng-click="editFeature(sprintBoard, feature)"><i class="small mdi-editor-mode-edit right top" popover-placement='left' popover='Edit Feature' popover-trigger="mouseenter"></i></a>
</div>
</span>
<h2 class="card-title black-text">{{feature.title}}</h2>
<div style='font-weight: normal'>
Expand Down
5 changes: 4 additions & 1 deletion browser/js/features/EditFeatureController.js
Expand Up @@ -27,12 +27,14 @@ app.controller('EditFeatureController', function($scope, $modal, BoardService, B
};

$scope.ok = function(editedFeature) {
console.log("inside ok");
$scope.editedFeature.title = "Feature - " + $scope.editedFeature.title;
RepoFactory.updateRepoMilestone($stateParams, $scope.editedFeature);
if (currentFeature.name !== $scope.editedFeature.title.split(" - ")[1]) {
RepoFactory.deleteRepoLabel($stateParams, {
name: "Feature - " + currentFeature.name
});
console.log("before create label");
RepoFactory.createRepoLabel($stateParams, $scope.editedFeature);
} else {
RepoFactory.editRepoLabel($stateParams, $scope.editedFeature);
Expand All @@ -59,8 +61,9 @@ app.controller('EditFeatureController', function($scope, $modal, BoardService, B

});
var currentLabelNames = _.pluck(card.labels, 'name');
console.log("labelnames",currentLabelNames)
console.log("labelnames",currentLabelNames);
//setTimeout(function(){
console.log("before edit issue",currentLabelNames);
RepoFactory.editRepoIssue($stateParams, card.number,{labelNames:currentLabelNames});
//},2000);

Expand Down
6 changes: 5 additions & 1 deletion browser/scss/board/main.scss
Expand Up @@ -239,7 +239,11 @@ progressbar{
color: white;
}


.ef{
position:relative;
left: 30px;
bottom: 15px
}

// .as-sortable-placeholder {
// border: 1px dashed darkgrey;
Expand Down

0 comments on commit 7335308

Please sign in to comment.