parent
3adbf3f505
commit
d6e636f853
@ -1,45 +0,0 @@ |
|||||||
// -- copyright
|
|
||||||
// OpenProject is a project management system.
|
|
||||||
// Copyright (C) 2012-2015 the OpenProject Foundation (OPF)
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License version 3.
|
|
||||||
//
|
|
||||||
// OpenProject is a fork of ChiliProject, which is a fork of Redmine. The copyright follows:
|
|
||||||
// Copyright (C) 2006-2013 Jean-Philippe Lang
|
|
||||||
// Copyright (C) 2010-2013 the ChiliProject Team
|
|
||||||
//
|
|
||||||
// This program is free software; you can redistribute it and/or
|
|
||||||
// modify it under the terms of the GNU General Public License
|
|
||||||
// as published by the Free Software Foundation; either version 2
|
|
||||||
// of the License, or (at your option) any later version.
|
|
||||||
//
|
|
||||||
// This program is distributed in the hope that it will be useful,
|
|
||||||
// but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
||||||
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
||||||
// GNU General Public License for more details.
|
|
||||||
//
|
|
||||||
// You should have received a copy of the GNU General Public License
|
|
||||||
// along with this program; if not, write to the Free Software
|
|
||||||
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
|
|
||||||
//
|
|
||||||
// See doc/COPYRIGHT.rdoc for more details.
|
|
||||||
// ++
|
|
||||||
|
|
||||||
angular |
|
||||||
.module('openproject.workPackages') |
|
||||||
.controller('WorkPackageListNewStateController', WorkPackageListNewStateController); |
|
||||||
|
|
||||||
function WorkPackageListNewStateController($rootScope, $scope, $state) { |
|
||||||
var vm = this; |
|
||||||
|
|
||||||
vm.goBack = function() { |
|
||||||
var args = ['^']; |
|
||||||
|
|
||||||
if ($rootScope.previousState && $rootScope.previousState.name) { |
|
||||||
args = [$rootScope.previousState.name, $rootScope.previousState.params]; |
|
||||||
} |
|
||||||
|
|
||||||
vm.loaderPromise = $state.go.apply($state, args); |
|
||||||
}; |
|
||||||
} |
|
@ -1,5 +1,4 @@ |
|||||||
<div class="work-packages--details-content -create-mode"> |
<div class="work-packages--details-content -create-mode"> |
||||||
<wp-create-form on-cancel="vm.goBack()" |
<wp-create-form work-package="workPackage" |
||||||
work-package="workPackage" |
|
||||||
success-state="work-packages.list.details.overview"></wp-create-form> |
success-state="work-packages.list.details.overview"></wp-create-form> |
||||||
</div> |
</div> |
||||||
|
Loading…
Reference in new issue