V8: Make sure to mark the current form as dirty when altering content types (#6108)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
4e17463eb8
commit
8bdd694a12
@@ -532,6 +532,7 @@
|
||||
// push new init tab to the scope
|
||||
addInitGroup(scope.model.groups);
|
||||
|
||||
notifyChanged();
|
||||
},
|
||||
close: function() {
|
||||
if(_.isEqual(oldPropertyModel, propertyModel) === false) {
|
||||
@@ -588,8 +589,13 @@
|
||||
|
||||
}
|
||||
|
||||
notifyChanged();
|
||||
};
|
||||
|
||||
function notifyChanged() {
|
||||
eventsService.emit("editors.groupsBuilder.changed");
|
||||
}
|
||||
|
||||
function addInitProperty(group) {
|
||||
|
||||
var addInitPropertyBool = true;
|
||||
|
||||
@@ -506,6 +506,10 @@
|
||||
}
|
||||
}));
|
||||
|
||||
evts.push(eventsService.on("editors.groupsBuilder.changed", function(name, args) {
|
||||
angularHelper.getCurrentForm($scope).$setDirty();
|
||||
}));
|
||||
|
||||
//ensure to unregister from all events!
|
||||
$scope.$on('$destroy', function () {
|
||||
for (var e in evts) {
|
||||
|
||||
@@ -431,6 +431,10 @@
|
||||
loadMediaType();
|
||||
}));
|
||||
|
||||
evts.push(eventsService.on("editors.groupsBuilder.changed", function(name, args) {
|
||||
angularHelper.getCurrentForm($scope).$setDirty();
|
||||
}));
|
||||
|
||||
//ensure to unregister from all events!
|
||||
$scope.$on('$destroy', function () {
|
||||
for (var e in evts) {
|
||||
|
||||
@@ -9,8 +9,9 @@
|
||||
(function () {
|
||||
"use strict";
|
||||
|
||||
function MemberTypesEditController($scope, $rootScope, $routeParams, $log, $filter, memberTypeResource, dataTypeResource, editorState, iconHelper, formHelper, navigationService, contentEditingHelper, notificationsService, $q, localizationService, overlayHelper, contentTypeHelper) {
|
||||
function MemberTypesEditController($scope, $rootScope, $routeParams, $log, $filter, memberTypeResource, dataTypeResource, editorState, iconHelper, formHelper, navigationService, contentEditingHelper, notificationsService, $q, localizationService, overlayHelper, contentTypeHelper, angularHelper, eventsService) {
|
||||
|
||||
var evts = [];
|
||||
var vm = this;
|
||||
|
||||
vm.save = save;
|
||||
@@ -304,7 +305,16 @@
|
||||
|
||||
}
|
||||
|
||||
evts.push(eventsService.on("editors.groupsBuilder.changed", function(name, args) {
|
||||
angularHelper.getCurrentForm($scope).$setDirty();
|
||||
}));
|
||||
|
||||
//ensure to unregister from all events!
|
||||
$scope.$on('$destroy', function () {
|
||||
for (var e in evts) {
|
||||
eventsService.unsubscribe(evts[e]);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
angular.module("umbraco").controller("Umbraco.Editors.MemberTypes.EditController", MemberTypesEditController);
|
||||
|
||||
Reference in New Issue
Block a user