Skip to content

Commit

Permalink
Merge pull request #2987 from ONLYOFFICE/fix/bugfix
Browse files Browse the repository at this point in the history
Fix/bugfix
  • Loading branch information
JuliaRadzhabova authored May 15, 2024
2 parents 3ee272e + 21097be commit 161b1a5
Show file tree
Hide file tree
Showing 7 changed files with 118 additions and 101 deletions.
1 change: 1 addition & 0 deletions apps/common/main/lib/view/Header.js
Original file line number Diff line number Diff line change
Expand Up @@ -343,6 +343,7 @@ define([

if ( caller && caller == 'header' )
Common.NotificationCenter.trigger('quickaccess:changed', props);
updateDocNamePosition();
}

function onAppReady(mode) {
Expand Down
54 changes: 29 additions & 25 deletions apps/documenteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -495,32 +495,36 @@ define([
!this.panels['printpreview'] && (this.panels['printpreview'] = printPanel.render(this.$el.find('#panel-print')));
}

if ( Common.Controllers.Desktop.isActive() ) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-local-open', this.$el),
action : 'file:open',
caption : this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
if ( Common.Controllers.Desktop.isActive()) {
if (this.$el.find('#fm-btn-local-open').length<1) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-local-open', this.$el),
action : 'file:open',
caption : this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}

$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-exit', this.$el),
action : 'file:exit',
caption : this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
} else if (this.mode.canCloseEditor) {
if (this.$el.find('#fm-btn-exit').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el: $('#fm-btn-exit', this.$el),
action: 'file:exit',
caption: this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}
} else if (this.mode.canCloseEditor && this.$el.find('#fm-btn-close').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-close" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
Expand Down
4 changes: 2 additions & 2 deletions apps/documenteditor/main/app/view/HeaderFooterSettings.js
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ define([
}

value = prop.get_NumFormat();
if ( this._state.NumFormat!==value ) {
if ( this._state.NumFormat!==value || this.cmbFormat.getValue()===-2) {
this.fillFormatCombo(value);
this._state.NumFormat = value;
}
Expand Down Expand Up @@ -418,7 +418,7 @@ define([
var store = [].concat(this._arrNumbers),
me = this;
this.recentNumTypes.forEach(function(item) {
if (item) {
if (item!==null && item!==undefined) {
item = parseInt(item);
store.push({ displayValue: AscCommon.IntToNumberFormat(1, item, me.mode.lang) + ', ' + AscCommon.IntToNumberFormat(2, item, me.mode.lang) + ', ' + AscCommon.IntToNumberFormat(3, item, me.mode.lang) + ',...', value: item });
}
Expand Down
4 changes: 2 additions & 2 deletions apps/documenteditor/main/app/view/ListSettingsDialog.js
Original file line number Diff line number Diff line change
Expand Up @@ -970,7 +970,7 @@ define([
}
var store = [this._itemNoneBullet].concat(this._arrNumbers);
this.recentNumTypes.forEach(function(item) {
if (item) {
if (item!==null && item!==undefined) {
item = parseInt(item);
store.push({ displayValue: AscCommon.IntToNumberFormat(1, item, me.lang) + ', ' + AscCommon.IntToNumberFormat(2, item, me.lang) + ', ' + AscCommon.IntToNumberFormat(3, item, me.lang) + ',...', value: item });
}
Expand All @@ -990,7 +990,7 @@ define([
var store = (this.type===2) ? [this._itemNoneBullet].concat(this._arrNumbers) : [];
if (this.type===2) {
this.recentNumTypes.forEach(function(item) {
if (item) {
if (item!==null && item!==undefined) {
item = parseInt(item);
store.push({ displayValue: AscCommon.IntToNumberFormat(1, item, me.lang) + ', ' + AscCommon.IntToNumberFormat(2, item, me.lang) + ', ' + AscCommon.IntToNumberFormat(3, item, me.lang) + ',...', value: item });
}
Expand Down
52 changes: 28 additions & 24 deletions apps/pdfeditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -473,31 +473,35 @@ define([
}

if ( Common.Controllers.Desktop.isActive() ) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-local-open', this.$el),
action : 'file:open',
caption : this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
if (this.$el.find('#fm-btn-local-open').length<1) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-local-open', this.$el),
action : 'file:open',
caption : this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}

$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-exit', this.$el),
action : 'file:exit',
caption : this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
} else if (this.mode.canCloseEditor) {
if (this.$el.find('#fm-btn-exit').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el: $('#fm-btn-exit', this.$el),
action: 'file:exit',
caption: this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}
} else if (this.mode.canCloseEditor && this.$el.find('#fm-btn-close').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-close" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
Expand Down
52 changes: 28 additions & 24 deletions apps/presentationeditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -489,31 +489,35 @@ define([
}

if ( Common.Controllers.Desktop.isActive() ) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-local-open', this.$el),
action : 'file:open',
caption : this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
if (this.$el.find('#fm-btn-local-open').length<1) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el: $('#fm-btn-local-open', this.$el),
action: 'file:open',
caption: this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}

$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-exit', this.$el),
action : 'file:exit',
caption : this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
} else if (this.mode.canCloseEditor) {
if (this.$el.find('#fm-btn-exit').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el: $('#fm-btn-exit', this.$el),
action: 'file:exit',
caption: this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}
} else if (this.mode.canCloseEditor && this.$el.find('#fm-btn-close').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-close" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
Expand Down
52 changes: 28 additions & 24 deletions apps/spreadsheeteditor/main/app/view/FileMenu.js
Original file line number Diff line number Diff line change
Expand Up @@ -477,31 +477,35 @@ define([
}

if ( Common.Controllers.Desktop.isActive() ) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-local-open', this.$el),
action : 'file:open',
caption : this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
if (this.$el.find('#fm-btn-local-open').length<1) {
$('<li id="fm-btn-local-open" class="fm-btn"/>').insertAfter($('#fm-btn-recent', this.$el));
this.items.push(
new Common.UI.MenuItem({
el: $('#fm-btn-local-open', this.$el),
action: 'file:open',
caption: this.btnFileOpenCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}

$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el : $('#fm-btn-exit', this.$el),
action : 'file:exit',
caption : this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
} else if (this.mode.canCloseEditor) {
if (this.$el.find('#fm-btn-exit').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-exit" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
new Common.UI.MenuItem({
el: $('#fm-btn-exit', this.$el),
action: 'file:exit',
caption: this.btnExitCaption,
canFocused: false,
dataHint: 1,
dataHintDirection: 'left-top',
dataHintOffset: [2, 14]
}));
}
} else if (this.mode.canCloseEditor && this.$el.find('#fm-btn-close').length<1) {
$('<li class="devider" />' +
'<li id="fm-btn-close" class="fm-btn"/>').insertAfter($('#fm-btn-back', this.$el));
this.items.push(
Expand Down

0 comments on commit 161b1a5

Please sign in to comment.