fix app aliases client side

This commit is contained in:
Mads Rasmussen
2018-09-14 10:46:22 +02:00
parent cdf9260f02
commit fe60cdda5c
3 changed files with 6 additions and 6 deletions

View File

@@ -147,7 +147,7 @@
// only create the save/publish/preview buttons if the
// content app is "Conent"
if(app && app.alias !== "content") {
if(app && app.alias !== "umbContent" && app.alias !== "umbInfo") {
$scope.defaultButton = null;
$scope.subButtons = null;
$scope.page.showPreviewButton = false;

View File

@@ -40,7 +40,7 @@
// disable the name field if the active content app is not "Content"
vm.nameDisabled = false;
angular.forEach(vm.editor.content.apps, function(app){
if(app.active && app.alias !== "content") {
if(app.active && app.alias !== "umbContent" && app.alias !== "umbInfo") {
vm.nameDisabled = true;
}
});
@@ -78,9 +78,9 @@
* @param {any} item
*/
function selectApp(item) {
// disable the name field if the active content app is not "Content"
// disable the name field if the active content app is not "Content" or "Info"
vm.nameDisabled = false;
if(item && item.alias !== "content") {
if(item && item.alias !== "umbContent" && item.alias !== "umbInfo") {
vm.nameDisabled = true;
}
// call the callback if any is registered

View File

@@ -191,7 +191,7 @@
//then assign the variant to a view model to the content app
var contentApp = _.find(variant.apps, function (a) {
return a.alias === "content";
return a.alias === "umbContent";
});
contentApp.viewModel = variant;
@@ -221,7 +221,7 @@
var editor = vm.editors[e];
for (var i = 0; i < editor.content.apps.length; i++) {
var app = editor.content.apps[i];
if (app.alias === "content") {
if (app.alias === "umbContent") {
app.active = true;
}
else {