#4068 - Changed save event triggered when save dialog is opened. save is still broadcasted on the actual save.

Changed the grid event listener to only execute on `save` events
This commit is contained in:
Bjarke Berg
2019-02-01 08:37:06 +01:00
parent 4a480ab391
commit 045020e739
3 changed files with 5 additions and 5 deletions

View File

@@ -617,7 +617,7 @@
// TODO: Add "..." to save button label if there are more than one variant to publish - currently it just adds the elipses if there's more than 1 variant
if (isContentCultureVariant()) {
//before we launch the dialog we want to execute all client side validations first
if (formHelper.submitForm({ scope: $scope, action: "save" })) {
if (formHelper.submitForm({ scope: $scope, action: "openSaveDialog" })) {
var dialog = {
parentScope: $scope,

View File

@@ -26,7 +26,7 @@
//dealing with requests:
'request': function(config) {
if(config.method === "POST"){
config.transformRequest.push(transform);
transform(config.data);
}
return config;

View File

@@ -909,9 +909,9 @@ angular.module("umbraco")
// needs to be merged in at runtime to ensure that the real config values are used
// if they are ever updated.
var unsubscribe = $scope.$on("formSubmitting", function () {
if ($scope.model.value && $scope.model.value.sections) {
var unsubscribe = $scope.$on("formSubmitting", function (e, args) {
if (args.action === "save" && $scope.model.value && $scope.model.value.sections) {
_.each($scope.model.value.sections, function(section) {
if (section.rows) {
_.each(section.rows, function (row) {