Fixes: U4-7799 ModelsBuilder button in Content Type Editor should save the current content type
This commit is contained in:
@@ -118,6 +118,7 @@
|
||||
//Models builder mode:
|
||||
vm.page.defaultButton = {
|
||||
hotKey: "ctrl+s",
|
||||
hotKeyWhenHidden: true,
|
||||
labelKey: "buttons_save",
|
||||
letter: "S",
|
||||
type: "submit",
|
||||
@@ -125,21 +126,38 @@
|
||||
};
|
||||
vm.page.subButtons = [{
|
||||
hotKey: "ctrl+g",
|
||||
labelKey: "buttons_generateModels",
|
||||
hotKeyWhenHidden: true,
|
||||
labelKey: "buttons_saveAndGenerateModels",
|
||||
letter: "G",
|
||||
handler: function () {
|
||||
|
||||
vm.page.saveButtonState = "busy";
|
||||
notificationsService.info("Building models", "this can take abit of time, don't worry");
|
||||
|
||||
contentTypeHelper.generateModels().then(function (result) {
|
||||
vm.page.saveButtonState = "init";
|
||||
//clear and add success
|
||||
notificationsService.success("Models Generated");
|
||||
}, function () {
|
||||
notificationsService.error("Models could not be generated");
|
||||
vm.page.saveButtonState = "error";
|
||||
vm.save().then(function (result) {
|
||||
|
||||
vm.page.saveButtonState = "busy";
|
||||
|
||||
localizationService.localize("modelsBuilder_buildingModels").then(function (headerValue) {
|
||||
localizationService.localize("modelsBuilder_waitingMessage").then(function(msgValue) {
|
||||
notificationsService.info(headerValue, msgValue);
|
||||
});
|
||||
});
|
||||
|
||||
contentTypeHelper.generateModels().then(function (result) {
|
||||
vm.page.saveButtonState = "init";
|
||||
//clear and add success
|
||||
localizationService.localize("modelsBuilder_modelsGenerated").then(function(value) {
|
||||
notificationsService.success(value);
|
||||
});
|
||||
}, function () {
|
||||
localizationService.localize("modelsBuilder_modelsGeneratedError").then(function(value) {
|
||||
notificationsService.error(value);
|
||||
});
|
||||
vm.page.saveButtonState = "error";
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -264,7 +282,7 @@
|
||||
}
|
||||
|
||||
function init(contentType) {
|
||||
|
||||
|
||||
// set all tab to inactive
|
||||
if (contentType.groups.length !== 0) {
|
||||
angular.forEach(contentType.groups, function (group) {
|
||||
|
||||
@@ -103,6 +103,7 @@
|
||||
//Models builder mode:
|
||||
vm.page.defaultButton = {
|
||||
hotKey: "ctrl+s",
|
||||
hotKeyWhenHidden: true,
|
||||
labelKey: "buttons_save",
|
||||
letter: "S",
|
||||
type: "submit",
|
||||
@@ -110,21 +111,38 @@
|
||||
};
|
||||
vm.page.subButtons = [{
|
||||
hotKey: "ctrl+g",
|
||||
labelKey: "buttons_generateModels",
|
||||
hotKeyWhenHidden: true,
|
||||
labelKey: "buttons_saveAndGenerateModels",
|
||||
letter: "G",
|
||||
handler: function () {
|
||||
|
||||
vm.page.saveButtonState = "busy";
|
||||
notificationsService.info("Building models", "this can take abit of time, don't worry");
|
||||
|
||||
contentTypeHelper.generateModels().then(function(result) {
|
||||
vm.page.saveButtonState = "init";
|
||||
//clear and add success
|
||||
notificationsService.success("Models Generated");
|
||||
}, function() {
|
||||
notificationsService.error("Models could not be generated");
|
||||
vm.page.saveButtonState = "error";
|
||||
vm.save().then(function (result) {
|
||||
|
||||
vm.page.saveButtonState = "busy";
|
||||
|
||||
localizationService.localize("modelsBuilder_buildingModels").then(function (headerValue) {
|
||||
localizationService.localize("modelsBuilder_waitingMessage").then(function(msgValue) {
|
||||
notificationsService.info(headerValue, msgValue);
|
||||
});
|
||||
});
|
||||
|
||||
contentTypeHelper.generateModels().then(function (result) {
|
||||
vm.page.saveButtonState = "init";
|
||||
//clear and add success
|
||||
localizationService.localize("modelsBuilder_modelsGenerated").then(function(value) {
|
||||
notificationsService.success(value);
|
||||
});
|
||||
}, function () {
|
||||
localizationService.localize("modelsBuilder_modelsGeneratedError").then(function(value) {
|
||||
notificationsService.error(value);
|
||||
});
|
||||
vm.page.saveButtonState = "error";
|
||||
});
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
@@ -243,7 +261,7 @@
|
||||
}
|
||||
|
||||
function init(contentType) {
|
||||
|
||||
|
||||
// set all tab to inactive
|
||||
if (contentType.groups.length !== 0) {
|
||||
angular.forEach(contentType.groups, function (group) {
|
||||
|
||||
@@ -60,6 +60,7 @@
|
||||
//Models builder mode:
|
||||
vm.page.defaultButton = {
|
||||
hotKey: "ctrl+s",
|
||||
hotKeyWhenHidden: true,
|
||||
labelKey: "buttons_save",
|
||||
letter: "S",
|
||||
type: "submit",
|
||||
@@ -67,21 +68,39 @@
|
||||
};
|
||||
vm.page.subButtons = [{
|
||||
hotKey: "ctrl+g",
|
||||
labelKey: "buttons_generateModels",
|
||||
hotKeyWhenHidden: true,
|
||||
labelKey: "buttons_saveAndGenerateModels",
|
||||
letter: "G",
|
||||
handler: function () {
|
||||
|
||||
vm.page.saveButtonState = "busy";
|
||||
notificationsService.info("Building models", "this can take abit of time, don't worry");
|
||||
|
||||
contentTypeHelper.generateModels().then(function (result) {
|
||||
vm.page.saveButtonState = "init";
|
||||
//clear and add success
|
||||
notificationsService.success("Models Generated");
|
||||
}, function () {
|
||||
notificationsService.error("Models could not be generated");
|
||||
vm.page.saveButtonState = "error";
|
||||
vm.save().then(function (result) {
|
||||
|
||||
vm.page.saveButtonState = "busy";
|
||||
|
||||
localizationService.localize("modelsBuilder_buildingModels").then(function (headerValue) {
|
||||
localizationService.localize("modelsBuilder_waitingMessage").then(function(msgValue) {
|
||||
notificationsService.info(headerValue, msgValue);
|
||||
});
|
||||
});
|
||||
|
||||
contentTypeHelper.generateModels().then(function (result) {
|
||||
vm.page.saveButtonState = "init";
|
||||
//clear and add success
|
||||
localizationService.localize("modelsBuilder_modelsGenerated").then(function(value) {
|
||||
notificationsService.success(value);
|
||||
});
|
||||
}, function () {
|
||||
localizationService.localize("modelsBuilder_modelsGeneratedError").then(function(value) {
|
||||
notificationsService.error(value);
|
||||
});
|
||||
vm.page.saveButtonState = "error";
|
||||
});
|
||||
|
||||
|
||||
});
|
||||
|
||||
}
|
||||
}];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user