case 3987
This commit is contained in:
@@ -364,13 +364,17 @@ export default {
|
||||
const t = this.appBar.title.split(":");
|
||||
return t[1] + " " + this.$ay.t(t[0]);
|
||||
}
|
||||
if (this.appBar.isMain) {
|
||||
//if ismain then it's a translation key
|
||||
return this.$ay.t(this.appBar.title);
|
||||
} else {
|
||||
//if not ismain then it's a record name
|
||||
return this.appBar.title;
|
||||
}
|
||||
// if (this.appBar.isMain) {
|
||||
// //if ismain then it's a translation key
|
||||
// //return this.$ay.t(this.appBar.title);
|
||||
// //update, no it's not, gzmenu now translatest it ahead of time so this has changed (build alpha 132)
|
||||
// return this.appBar.title;
|
||||
// } else {
|
||||
// //if not ismain then it's a record name
|
||||
// return this.appBar.title;
|
||||
// }
|
||||
//due to changes at gzmenu in build alpha 132 the remaining possiblities are all to just show the title as is no translation
|
||||
return this.appBar.title;
|
||||
}
|
||||
},
|
||||
props: {
|
||||
|
||||
@@ -55,21 +55,26 @@ export default {
|
||||
//ctx.title if set is a Translation key
|
||||
//ctx.formData.recordName is the object name or serial number or whatever identifies it uniquely
|
||||
let recordName = "";
|
||||
if (ctx && ctx.formData && ctx.formData.recordName) {
|
||||
if (
|
||||
ctx &&
|
||||
ctx.formData &&
|
||||
ctx.formData.recordName &&
|
||||
ctx.formData.recordName != "null" //some forms (part) present "null" as the record name due to attempts to format a name so if that's the case just turn it into null here to bypass
|
||||
) {
|
||||
recordName = ctx.formData.recordName;
|
||||
}
|
||||
const hasRecordName = recordName != "";
|
||||
const hasRecordName = !window.$gz.util.stringIsNullOrEmpty(recordName);
|
||||
if (ctx.title) {
|
||||
//it has a title translation key
|
||||
const translatedTitle = vm.$ay.t(ctx.title);
|
||||
if (hasRecordName) {
|
||||
//recordname takes all precedence in AppBar in order to conserve space (narrow view etc)
|
||||
//also it just looks cleaner, the icon is already there to indicate where the user is at
|
||||
//vm.appBar.title = `${ctx.title}:${recordName}`;
|
||||
vm.appBar.title = recordName;
|
||||
document.title = `${recordName} - ${vm.$ay.t(ctx.title)} AyaNova `;
|
||||
document.title = `${recordName} - ${translatedTitle} AyaNova `;
|
||||
} else {
|
||||
vm.appBar.title = ctx.title;
|
||||
document.title = `${vm.$ay.t(ctx.title)} ${recordName}`;
|
||||
vm.appBar.title = translatedTitle;
|
||||
document.title = `${translatedTitle} ${recordName}`;
|
||||
}
|
||||
} else {
|
||||
if (hasRecordName) {
|
||||
|
||||
Reference in New Issue
Block a user