feat(ruby): filename in editor page title

This commit is contained in:
sshakndr
2024-10-08 13:42:48 +07:00
parent 728c74b1aa
commit b138385196
2 changed files with 5 additions and 3 deletions

View File

@ -43,8 +43,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

View File

@ -20,13 +20,15 @@
-->
<%
favicon = "favicon.ico"
title = "ONLYOFFICE"
if (@file)
favicon = @file.document_type + ".ico"
title = @file.file_name + " - ONLYOFFICE"
end
%>
<%= favicon_link_tag favicon %>
<title>ONLYOFFICE</title>
<title><%= title %></title>
<link rel="stylesheet" type="text/css" href="https://fonts.googleapis.com/css?family=Open+Sans:900,800,700,600,500,400,300&subset=latin,cyrillic-ext,cyrillic,latin-ext" />
<%= stylesheet_link_tag "stylesheet" %>
<%= stylesheet_link_tag "jquery-ui" %>