<commit_before>function SaveAction(parentView){
    _.superClass(SaveAction, this, parentView);
}

_.inherit(SaveAction, BaseAction);


_.extend(SaveAction.prototype,
    BaseFallibleActionMixin,
    {
        execute: function(callback){
            var parentView = this.parentView,
                dataSource = this.getProperty('dataSource'),
                canClose = this.getProperty('canClose'),
                that = this;

            var onSuccessSave = function(context, args){
                    if(canClose !== false){
                        parentView.setDialogResult(DialogResult.accepted);
                        parentView.close();
                    }

                    that.onExecutedHandler(args);
                    that.onSuccessHandler(args);

                    if(_.isFunction(callback)){
                        callback(context, args);
                    }
                },
                onErrorSave = function(context, args){
                    that.onExecutedHandler(args);
                    that.onErrorHandler(args);

                    if (_.isFunction(callback)) {
                        callback(context, args);
                    }
                };

            var selectedItem = dataSource.getSelectedItem();
            dataSource.saveItem(selectedItem, onSuccessSave, onErrorSave);
        }
    }
);

window.InfinniUI.SaveAction = SaveAction;
<commit_msg>UI-2621 SaveAction с параметром CanClose: false не обновляет DestinationValue #resolved<commit_after>function SaveAction( parentView ) {
	_.superClass( SaveAction, this, parentView );
}

_.inherit( SaveAction, BaseAction );

_.extend( SaveAction.prototype,
	BaseFallibleActionMixin,
	{
		execute: function( callback ) {
			var parentView = this.parentView;
			var dataSource = this.getProperty( 'dataSource' );
			var canClose = this.getProperty( 'canClose' );
			var that = this;

			var onSuccessSave = function( context, args ) {
				parentView.setDialogResult( DialogResult.accepted );
				if( canClose !== false ) {
					parentView.close();
				}

				that.onExecutedHandler( args );
				that.onSuccessHandler( args );

				if( _.isFunction( callback ) ) {
					callback( context, args );
				}
			};
			var onErrorSave = function( context, args ) {
				that.onExecutedHandler( args );
				that.onErrorHandler( args );

				if( _.isFunction( callback ) ) {
					callback( context, args );
				}
			};

			var selectedItem = dataSource.getSelectedItem();
			dataSource.saveItem( selectedItem, onSuccessSave, onErrorSave );
		}
	}
);

window.InfinniUI.SaveAction = SaveAction;

{'fraction_non_alphanumeric': 0.10431100846805234, 'fraction_numerical': 0.001539645881447267, 'mean_word_length': 2.135102533172497, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6628750', 'n_tokens_mistral': 778, 'n_tokens_neox': 683, 'n_words': 134}