Ensure primary button style for save-button in content template create view

This commit is contained in:
Bjarne Fyrstenborg
2020-06-08 22:28:10 +02:00
committed by Sebastiaan Janssen
parent fbbfb4f943
commit b67d56804c
2 changed files with 8 additions and 3 deletions

View File

@@ -270,9 +270,15 @@
* @param {any} app the active content app
*/
function createButtons(content) {
var isBlueprint = content.isBlueprint;
if ($scope.page.isNew && $location.path().search(/contentBlueprints/i) !== -1) {
isBlueprint = true;
}
// for trashed and element type items, the save button is the primary action - otherwise it's a secondary action
$scope.page.saveButtonStyle = content.trashed || content.isElement || content.isBlueprint ? "primary" : "info";
$scope.page.saveButtonStyle = content.trashed || content.isElement || isBlueprint ? "primary" : "info";
// only create the save/publish/preview buttons if the
// content app is "Conent"
if ($scope.activeApp && $scope.activeApp.alias !== "umbContent" && $scope.activeApp.alias !== "umbInfo" && $scope.activeApp.alias !== "umbListView") {

View File

@@ -14,8 +14,7 @@
on-select-app="appChanged(app)"
on-select-app-anchor="appAnchorChanged(app, anchor)"
on-back="onBack()"
show-back="!(infiniteModel && infiniteModel.infiniteMode)"
>
show-back="!(infiniteModel && infiniteModel.infiniteMode)">
</umb-variant-content-editors>
<umb-editor-footer>