[all] fix bug 44742

This commit is contained in:
Maxim Kadushkin 2020-04-25 00:58:40 +03:00
parent 6e4bb3e57c
commit 9abf2c60db
2 changed files with 16 additions and 5 deletions

View file

@ -109,14 +109,15 @@ define([
var templateTitleBox = '<section id="box-document-title">' +
'<div class="extra"></div>' +
'<div class="hedset">' +
'<div class="hedset" id="header-tools">' +
'<div class="btn-slot" id="slot-btn-dt-save"></div>' +
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
'<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
'<div class="btn-slot" id="slot-btn-dt-redo"></div>' +
'</div>' +
'<div class="lr-separator"></div>' +
'<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false" style="pointer-events: none;" disabled="disabled">' +
'<div class="lr-separator">' +
'<input type="text" id="title-doc-name" spellcheck="false" data-can-copy="false" style="pointer-events: none;" disabled="disabled">' +
'</div>' +
'<label id="title-user-name" style="pointer-events: none;"></label>' +
'</section>';
@ -202,7 +203,17 @@ define([
}
}
function onAppShowed(config) {}
function onAppShowed(config) {
if ( this.labelDocName ) {
var $tools = this.btnSave.$el.parent('#header-tools');
var _left_width = $tools.prev().outerWidth() + $tools.outerWidth();
var _right_width = this.labelUserName.outerWidth();
if ( _left_width < _right_width )
this.labelDocName.css('padding-left', _right_width - _left_width);
else this.labelDocName.css('padding-right', _left_width - _right_width);
}
}
function onAppReady(mode) {
appConfig = mode;

View file

@ -392,7 +392,7 @@
overflow: hidden;
text-align: right;
font-size: 11px;
max-width: 50%;
width: 200px;
height: 100%;
padding: 0 12px;
line-height: @height-title;