V8: Improve notifications save button style and interaction (#5097)
This commit is contained in:
committed by
Sebastiaan Janssen
parent
fdfcb75a71
commit
aba409600b
@@ -3,13 +3,12 @@
|
||||
$scope,
|
||||
contentResource,
|
||||
navigationService,
|
||||
angularHelper,
|
||||
localizationService) {
|
||||
var vm = this;
|
||||
var currentForm;
|
||||
vm.notifyOptions = [];
|
||||
vm.save = save;
|
||||
vm.cancel = cancel;
|
||||
vm.notificationChanged = notificationChanged;
|
||||
vm.message = {
|
||||
name: $scope.currentNode.name
|
||||
};
|
||||
@@ -17,7 +16,6 @@
|
||||
function onInit() {
|
||||
vm.loading = true;
|
||||
contentResource.getNotifySettingsById($scope.currentNode.id).then(function (options) {
|
||||
currentForm = angularHelper.getCurrentForm($scope);
|
||||
vm.loading = false;
|
||||
vm.notifyOptions = options;
|
||||
});
|
||||
@@ -47,7 +45,10 @@
|
||||
vm.saveError = error;
|
||||
});
|
||||
}
|
||||
function notificationChanged(item) {
|
||||
vm.canSave = true;
|
||||
}
|
||||
onInit();
|
||||
}
|
||||
angular.module("umbraco").controller("Umbraco.Editors.Content.CreateNotifyController", CreateNotifyController);
|
||||
}());
|
||||
}());
|
||||
|
||||
@@ -21,7 +21,7 @@
|
||||
<div class="block-form" ng-show="!vm.loading">
|
||||
<span ng-bind-html="vm.labels.headline"></span>
|
||||
<umb-control-group>
|
||||
<umb-toggle-group items="vm.notifyOptions"></umb-toggle-group>
|
||||
<umb-toggle-group items="vm.notifyOptions" on-click="vm.notificationChanged(item)"></umb-toggle-group>
|
||||
</umb-control-group>
|
||||
</div>
|
||||
</div>
|
||||
@@ -38,7 +38,8 @@
|
||||
type="button"
|
||||
action="vm.save(vm.notifyOptions)"
|
||||
state="vm.saveState"
|
||||
button-style="action">
|
||||
button-style="success"
|
||||
disabled="!vm.canSave">
|
||||
</umb-button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Reference in New Issue
Block a user