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

@ -1,5 +1,6 @@
# Change Log
- filename in editor page title
- he-IL skin language
- ConvertService.ashx address replaced with converter
- coauthoring/CommandService.ashx address replaced with command

View File

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

@ -12,7 +12,7 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="<%= "app_themes/images/" + DocumentType + ".ico" %>" type="image/x-icon" />
<title>ONLYOFFICE</title>
<title><%= FileName + " - ONLYOFFICE" %></title>
<!--
*
* (c) Copyright Ascensio System SIA 2024
@ -80,8 +80,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

@ -22,7 +22,7 @@
* limitations under the License.
*
-->
<title>ONLYOFFICE</title>
<title>[[${model.getDocument().getTitle()}]] - ONLYOFFICE</title>
<link rel="icon" th:href="@{/css/img/{icon}.ico(icon=${model.getDocumentType()})}" type="image/x-icon"/>
<link rel="stylesheet" type="text/css" href="css/editor.css" />
@ -46,8 +46,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

@ -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

View File

@ -23,7 +23,7 @@
* limitations under the License.
*
-->
<title>ONLYOFFICE</title>
<title><%- file.name %> - ONLYOFFICE</title>
<link rel="icon"
href="images/<%- editor.documentType %>.ico"
type="image/x-icon" />
@ -53,8 +53,8 @@
};
var onDocumentStateChange = function (event) { // the document is modified
var title = document.title.replace(/\*$/g, "");
document.title = title + (event.data ? "*" : "");
var title = document.title.replace(/^\*/g, "");
document.title = (event.data ? "*" : "") + title;
};
var onRequestClose = function () { // close editor

View File

@ -266,6 +266,7 @@ class EditorController extends Controller
}
$editorConfig = [
'fileName' => $file['filename'],
'docType' => $file['format']->type,
'apiUrl' => $this->serverConfig->get('url.api'),
'dataInsertImage' => mb_strimwidth(

View File

@ -26,7 +26,7 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="/images/favicon.ico" type="image/x-icon" />
<title>ONLYOFFICE</title>
<title>{!! $fileName !!} - ONLYOFFICE</title>
<style>
html {
@ -78,8 +78,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

@ -269,6 +269,7 @@ final class DocEditorView extends View
}
}
$this->tagsValues = [
"fileName" => $filename,
"docType" => getDocumentType($filename),
"apiUrl" => $configManager->documentServerAPIURL()->string(),
"dataInsertImage" => mb_strimwidth(

View File

@ -7,7 +7,7 @@
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<link rel="icon" href="assets/images/{docType}.ico" type="image/x-icon" />
<title>ONLYOFFICE</title>
<title>{fileName} - ONLYOFFICE</title>
<style>
html {
@ -61,8 +61,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

@ -380,6 +380,7 @@ def edit(request):
context = { # the data that will be passed to the template
'cfg': json.dumps(edConfig), # the document config in json format
'fileName': filename,
'fileType': fileType, # the file type of the document (text, spreadsheet or presentation)
'apiUrl': config_manager.document_server_api_url().geturl(), # the absolute URL to the api
# the image which will be inserted into the document

View File

@ -26,7 +26,7 @@
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, minimum-scale=1, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="mobile-web-app-capable" content="yes" />
<title>ONLYOFFICE</title>
<title>{{ fileName }} - ONLYOFFICE</title>
<link rel="icon"
href="{% static 'images/'|add:fileType|add:'.ico' %}"
type="image/x-icon" />
@ -58,8 +58,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

@ -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" %>