Fix bug for desktop
This commit is contained in:
parent
614109a26f
commit
3cc0e9b5bd
|
@ -1600,7 +1600,7 @@ define([
|
|||
if (this._state.isDocModified !== isModified || force) {
|
||||
var title = this.defaultTitleText;
|
||||
|
||||
if (!_.isEmpty(appHeader.getDocumentCaption()))
|
||||
if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
|
||||
title = appHeader.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (isModified) {
|
||||
|
|
|
@ -1311,7 +1311,7 @@ define([
|
|||
if (this._state.isDocModified !== isModified || force) {
|
||||
var title = this.defaultTitleText;
|
||||
|
||||
if (!_.isEmpty(appHeader.getDocumentCaption()))
|
||||
if (appHeader && !_.isEmpty(appHeader.getDocumentCaption()))
|
||||
title = appHeader.getDocumentCaption() + ' - ' + title;
|
||||
|
||||
if (isModified) {
|
||||
|
|
|
@ -393,7 +393,7 @@ define([
|
|||
docInfo.put_Token(data.doc.token);
|
||||
docInfo.put_Permissions(_permissions);
|
||||
|
||||
this.headerView.setDocumentCaption(data.doc.title);
|
||||
this.headerView && this.headerView.setDocumentCaption(data.doc.title);
|
||||
}
|
||||
|
||||
this.api.asc_registerCallback('asc_onGetEditorPermissions', _.bind(this.onEditorPermissions, this));
|
||||
|
@ -1494,6 +1494,7 @@ define([
|
|||
|
||||
updateWindowTitle: function(change, force) {
|
||||
if (this._state.isDocModified !== change || force) {
|
||||
if (this.headerView) {
|
||||
var title = this.defaultTitleText;
|
||||
|
||||
if (!_.isEmpty(this.headerView.getDocumentCaption()))
|
||||
|
@ -1514,9 +1515,9 @@ define([
|
|||
} else
|
||||
this.headerView.setDocumentCaption(this.headerView.getDocumentCaption(), false);
|
||||
}
|
||||
|
||||
if (window.document.title != title)
|
||||
window.document.title = title;
|
||||
}
|
||||
|
||||
Common.Gateway.setDocumentModified(change);
|
||||
|
||||
|
|
Loading…
Reference in a new issue