Merge pull request 'feature/filename-title' from feature/filename-title into develop

Reviewed-on: https://git.onlyoffice.com/ONLYOFFICE/document-server-integration/pulls/6
This commit is contained in:
Sergey Linnik
2024-10-08 15:15:05 +00:00
14 changed files with 32 additions and 26 deletions

View File

@ -27,7 +27,7 @@
* limitations under the License.
*
-->
<title>ONLYOFFICE</title>
<title><%= Model.getDocument().getTitle() %> - ONLYOFFICE</title>
<link rel="icon" href="css/img/<%= Model.getDocumentType() %>.ico" type="image/x-icon" />
<link rel="stylesheet" type="text/css" href="css/editor.css" />
@ -52,8 +52,8 @@
// the document is modified
var onDocumentStateChange = function (event) {
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
var title = document.title.replace(/^\*/g, "");
document.title = (event.data ? "*" : "") + title;
};
// the user is trying to switch the document from the viewing into the editing mode