{"size": 1450, "ext": "js", "max_stars_repo_path": "resources/assets/js/controllers/projectTask/projectTaskEdit.js", "max_stars_repo_name": "FabioPereiraBraga/codeProjeto", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "resources/assets/js/controllers/projectTask/projectTaskEdit.js", "max_issues_repo_name": "FabioPereiraBraga/codeProjeto", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "resources/assets/js/controllers/projectTask/projectTaskEdit.js", "max_forks_repo_name": "FabioPereiraBraga/codeProjeto", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 24.5762711864, "max_line_length": 90, "alphanum_fraction": 0.4289655172}
angular.module('app.controllers')
    .controller('ProjectTaskEditController',
                ['$scope','$location','$routeParams','ProjectTask' ,'appConfig',
        function ($scope, $location, $routeParams, ProjectTask,appConfig) {


            $scope.status = appConfig.projectTask.status;

            $scope.due_date = {
                status:{
                    opened:false
                }
            }

            $scope.start_date = {
                status:{
                    opened:false
                }
            }


            $scope.open = function() {

                $scope.due_date.status.opened = true;
            };

            $scope.openStartDate = function() {

                $scope.start_date.status.opened = true;
            };


            $scope.projectTask = ProjectTask.find({
                id:$routeParams.id,
                idTask:$routeParams.idTask
            });

            $scope.save = function() {
                alert('ddddf');
                if( $scope.form.$valid ) {

                    alert('ddf');
                    ProjectTask.update({
                        id:$scope.projectTask.project_id ,
                        idTask: $scope.projectTask.id
                    },$scope.projectTask,function () {
                        $location.path('/project/'+$scope.projectTask.project_id+'/task');
                    })



                }
            }




        }]);
