@ -65,9 +65,8 @@ module.exports = function(
// Propagate submission to all active fields
// Propagate submission to all active fields
// not contained in the workPackage.form (e.g., comment)
// not contained in the workPackage.form (e.g., comment)
this . submit = function ( notify ) {
this . submit = function ( ) {
WorkPackageFieldService . submitWorkPackageChanges (
WorkPackageFieldService . submitWorkPackageChanges (
notify ,
function ( ) {
function ( ) {
// Clears the location hash, as we're now
// Clears the location hash, as we're now
// scrolling to somewhere else
// scrolling to somewhere else
@ -79,7 +78,7 @@ module.exports = function(
) ;
) ;
} ;
} ;
this . submitField = function ( notify ) {
this . submitField = function ( ) {
var submit = $q . defer ( ) ;
var submit = $q . defer ( ) ;
var fieldController = $scope . fieldController ;
var fieldController = $scope . fieldController ;
var pendingFormChanges = getPendingFormChanges ( ) ;
var pendingFormChanges = getPendingFormChanges ( ) ;
@ -112,10 +111,7 @@ module.exports = function(
function ( form ) {
function ( form ) {
EditableFieldsState . workPackage . form = form ;
EditableFieldsState . workPackage . form = form ;
if ( _ . isEmpty ( form . embedded . validationErrors . props ) ) {
if ( _ . isEmpty ( form . embedded . validationErrors . props ) ) {
var result = WorkPackageService . updateWorkPackage (
var result = WorkPackageService . updateWorkPackage ( EditableFieldsState . workPackage ) ;
EditableFieldsState . workPackage ,
notify
) ;
result . then ( angular . bind ( this , function ( updatedWorkPackage ) {
result . then ( angular . bind ( this , function ( updatedWorkPackage ) {
submit . resolve ( ) ;
submit . resolve ( ) ;
$scope . $emit ( 'workPackageUpdatedInEditor' , updatedWorkPackage ) ;
$scope . $emit ( 'workPackageUpdatedInEditor' , updatedWorkPackage ) ;