Merge pull request #2021 from ONLYOFFICE/feature/for-bug-45489
Feature/for bug 45489
This commit is contained in:
commit
e6a459ac53
|
@ -93,8 +93,9 @@ define([
|
|||
}
|
||||
|
||||
if ( obj.singlewindow !== undefined ) {
|
||||
$('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show']();
|
||||
// $('#box-document-title .hedset')[obj.singlewindow ? 'hide' : 'show']();
|
||||
native.features.singlewindow = obj.singlewindow;
|
||||
titlebuttons.home && titlebuttons.home.btn.setVisible(obj.singlewindow);
|
||||
}
|
||||
} else
|
||||
if (/editor:config/.test(cmd)) {
|
||||
|
@ -245,6 +246,40 @@ define([
|
|||
titlebuttons = {};
|
||||
if ( mode.isEdit ) {
|
||||
var header = webapp.getController('Viewport').getView('Common.Views.Header');
|
||||
|
||||
{
|
||||
header.btnHome = (new Common.UI.Button({
|
||||
cls: 'btn-header',
|
||||
iconCls: 'toolbar__icon icon--inverse btn-home',
|
||||
visible: false,
|
||||
hint: 'Show Main window',
|
||||
dataHint:'0',
|
||||
dataHintDirection: 'right',
|
||||
dataHintOffset: '10, -18',
|
||||
dataHintTitle: 'K'
|
||||
})).render($('#box-document-title #slot-btn-dt-home'));
|
||||
titlebuttons['home'] = {btn: header.btnHome};
|
||||
|
||||
header.btnHome.on('click', event => {
|
||||
native.execCommand('title:button', JSON.stringify({click: "home"}));
|
||||
});
|
||||
|
||||
$('#id-box-doc-name').on({
|
||||
'dblclick': e => {
|
||||
native.execCommand('title:dblclick', JSON.stringify({x: e.originalEvent.screenX, y: e.originalEvent.screenY}))
|
||||
},
|
||||
'mousedown': e => {
|
||||
native.execCommand('title:mousedown', JSON.stringify({x: e.originalEvent.screenX, y: e.originalEvent.screenY}))
|
||||
},
|
||||
'mousemove': e => {
|
||||
native.execCommand('title:mousemove', JSON.stringify({x: e.originalEvent.screenX, y: e.originalEvent.screenY}))
|
||||
},
|
||||
'mouseup': e => {
|
||||
native.execCommand('title:mouseup', JSON.stringify({x: e.originalEvent.screenX, y: e.originalEvent.screenY}))
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
if (!!header.btnSave) {
|
||||
titlebuttons['save'] = {btn: header.btnSave};
|
||||
|
||||
|
@ -278,7 +313,8 @@ define([
|
|||
}
|
||||
|
||||
if ( native.features.singlewindow !== undefined ) {
|
||||
$('#box-document-title .hedset')[native.features.singlewindow ? 'hide' : 'show']();
|
||||
// $('#box-document-title .hedset')[native.features.singlewindow ? 'hide' : 'show']();
|
||||
!!titlebuttons.home && titlebuttons.home.btn.setVisible(native.features.singlewindow);
|
||||
}
|
||||
});
|
||||
|
||||
|
|
|
@ -121,7 +121,7 @@ Common.UI.HintManager = new(function() {
|
|||
_usedTitles = [],
|
||||
_appPrefix,
|
||||
_staticHints = { // for desktop buttons
|
||||
"btnhome": 'K'
|
||||
// "btnhome": 'K'
|
||||
};
|
||||
|
||||
var _api;
|
||||
|
|
|
@ -123,9 +123,10 @@ define([
|
|||
'<div id="header-logo"><i></i></div>' +
|
||||
'</section>';
|
||||
|
||||
var templateTitleBox = '<section id="box-document-title">' +
|
||||
var templateTitleBox = '<section id="box-document-title">' +
|
||||
'<div class="extra"></div>' +
|
||||
'<div class="hedset">' +
|
||||
'<div class="btn-slot" id="slot-btn-dt-home"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-dt-save" data-layout-name="header-save"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-dt-print"></div>' +
|
||||
'<div class="btn-slot" id="slot-btn-dt-undo"></div>' +
|
||||
|
|
BIN
apps/common/main/resources/img/toolbar/1.25x/btn-home.png
Normal file
BIN
apps/common/main/resources/img/toolbar/1.25x/btn-home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 653 B |
BIN
apps/common/main/resources/img/toolbar/1.5x/btn-home.png
Normal file
BIN
apps/common/main/resources/img/toolbar/1.5x/btn-home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 750 B |
BIN
apps/common/main/resources/img/toolbar/1.75x/btn-home.png
Normal file
BIN
apps/common/main/resources/img/toolbar/1.75x/btn-home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 1,012 B |
BIN
apps/common/main/resources/img/toolbar/1x/btn-home.png
Normal file
BIN
apps/common/main/resources/img/toolbar/1x/btn-home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 511 B |
BIN
apps/common/main/resources/img/toolbar/2x/btn-home.png
Normal file
BIN
apps/common/main/resources/img/toolbar/2x/btn-home.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 968 B |
Loading…
Reference in a new issue