Merge pull request #2610 from ONLYOFFICE/fix/bugfix

Fix/bugfix
This commit is contained in:
Julia Radzhabova
2023-09-28 23:29:48 +03:00
committed by GitHub
5 changed files with 150 additions and 3 deletions

View File

@ -1031,6 +1031,9 @@
if (config.editorConfig && config.editorConfig.customization && config.editorConfig.customization.uiTheme )
params += "&uitheme=" + config.editorConfig.customization.uiTheme;
if (config.document.fileType)
params += "&fileType=" + config.document.fileType;
return params;
}

View File

@ -948,7 +948,13 @@ DE.ApplicationController = new(function(){
});
window["flat_desine"] = true;
api = new Asc.asc_docs_api({
var result = /[\?\&]fileType=\b(pdf|djvu|xps|oxps)\b&?/i.exec(window.location.search),
isPDF = (!!result && result.length && typeof result[1] === 'string');
api = isPDF ? new Asc.PDFEditorApi({
'id-view' : 'editor_sdk',
'embedded' : true
}) : new Asc.asc_docs_api({
'id-view' : 'editor_sdk',
'embedded' : true
});

View File

@ -341,7 +341,14 @@ class MainController extends Component {
delete _translate[item];
});
this.api = new Asc.asc_docs_api({
var result = /[\?\&]fileType=\b(pdf|djvu|xps|oxps)\b&?/i.exec(window.location.search),
isPDF = (!!result && result.length && typeof result[1] === 'string');
this.api = isPDF ? new Asc.PDFEditorApi({
'id-view' : 'editor_sdk',
'mobile' : true,
'translate': _translate
}) : new Asc.asc_docs_api({
'id-view' : 'editor_sdk',
'mobile' : true,
'translate': _translate

View File

@ -558,7 +558,8 @@ define([
SetDisabled: function() {
if (this.printSettings.isVisible()) {
var disable = !this.mode.isEdit || this._state.lock_doc;
// var disable = !this.mode.isEdit || this._state.lock_doc;
var disable = true;
this.printSettings.cmbPaperSize.setDisabled(disable);
this.printSettings.cmbPaperMargins.setDisabled(disable);
this.printSettings.cmbPaperOrientation.setDisabled(disable);

View File

@ -665,4 +665,134 @@
padding-left: 12px;
padding-right: 12px;
}
}
#file-menu-panel {
#panel-print {
padding: 0;
.main-header {
.font-size-very-huge();
margin: 18px 0 20px 0;
}
.comment-text{
white-space: normal;
}
#id-print-settings {
position: absolute;
width:280px;
top: 0;
bottom: 0;
}
.print-settings {
width: 100%;
height: 100%;
overflow: hidden;
display: flex;
flex-direction: column;
border-right: @scaled-one-px-value-ie solid @border-toolbar-ie;
border-right: @scaled-one-px-value solid @border-toolbar;
.rtl & {
border-right: none;
border-left: @scaled-one-px-value-ie solid @border-toolbar-ie;
border-left: @scaled-one-px-value solid @border-toolbar;
}
.settings-container {
width: 100%;
height: 100%;
overflow: hidden;
padding: 12px 16px;
.padding-small {
padding-bottom: 8px;
}
.padding-large {
padding-bottom: 16px;
}
#print-apply-all {
margin-top: 5px;
}
.link {
margin-top: 9px;
}
.footer {
margin-top: 24px;
}
#print-combo-sides {
.dropdown-menu li > a {
.padding-x(20px, 5px);
}
}
}
}
#print-navigation {
height: 50px;
.padding-left-20();
padding-top: 10px;
display: flex;
#print-prev-page {
display: inline-block;
margin-right: 4px;
}
#print-next-page {
display: inline-block;
}
.btn-prev-page, .btn-next-page {
background-color: transparent;
padding: 0;
height: 20px;
width: 20px;
i.arrow {
display: inline-block;
width: 10px;
height: 10px;
border: solid @scaled-one-px-value-ie @icon-normal-ie;
border: solid @scaled-one-px-value @icon-normal;
border-bottom: none;
border-right: none;
}
&.disabled {
opacity: @component-disabled-opacity;
}
&:hover:not(:disabled):not(.disabled) {
background-color: @highlight-button-hover-ie;
background-color: @highlight-button-hover;
}
}
.btn-prev-page {
i {
transform: rotate(-45deg) translate(-1px, 3px);
}
}
.btn-next-page {
i {
transform: rotate(135deg) translate(4px, 0px);
}
}
.page-number {
display: flex;
align-items: center;
height: 20px;
label {
.font-weight-bold();
}
}
}
#print-preview {
height: calc(100% - 50px);
}
#print-preview-box {
position: absolute;
left: 280px;
top: 0;
right: 0;
bottom: 0;
.rtl & {
right: 280px;
left: 0;
}
}
}
}