Skip to content

Commit

Permalink
Merge pull request #3012 from ONLYOFFICE/fix/bugfix
Browse files Browse the repository at this point in the history
Fix/bugfix
  • Loading branch information
JuliaRadzhabova authored May 27, 2024
2 parents 54b1f0d + 8c7b94a commit 3796f50
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 4 deletions.
1 change: 1 addition & 0 deletions apps/documenteditor/embed/js/ApplicationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,7 @@ DE.ApplicationController = new(function(){
ttOffset[1] = 40;
}

config.mode = 'view'; // always view for embedded
config.canCloseEditor = false;
var _canback = false;
if (typeof config.customization === 'object') {
Expand Down
1 change: 1 addition & 0 deletions apps/presentationeditor/embed/js/ApplicationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ PE.ApplicationController = new(function(){
$('#box-preview').addClass('top');
}

config.mode = 'view'; // always view for embedded
config.canCloseEditor = false;
var _canback = false;
if (typeof config.customization === 'object') {
Expand Down
21 changes: 17 additions & 4 deletions apps/presentationeditor/main/app/controller/DocumentHolder.js
Original file line number Diff line number Diff line change
Expand Up @@ -174,8 +174,7 @@ define([
var me = this;
Common.NotificationCenter.on({
'window:show': function(e){
me.screenTip.toolTip.hide();
me.screenTip.isVisible = false;
me.hideScreenTip();
/** coauthoring begin **/
me.userTipHide();
/** coauthoring end **/
Expand All @@ -186,8 +185,7 @@ define([
me.hideTips();
},
'layout:changed': function(e){
me.screenTip.toolTip.hide();
me.screenTip.isVisible = false;
me.hideScreenTip();
/** coauthoring begin **/
me.userTipHide();
/** coauthoring end **/
Expand Down Expand Up @@ -779,6 +777,11 @@ define([
}
},

hideScreenTip: function() {
this.screenTip.toolTip.hide();
this.screenTip.isVisible = false;
},

getUserName: function(id){
var usersStore = PE.getCollection('Common.Collections.Users');
if (usersStore){
Expand Down Expand Up @@ -1642,12 +1645,20 @@ define([
},

onInsertImage: function(placeholder, obj, x, y) {
if (placeholder) {
this.hideScreenTip();
this.onHidePlaceholderActions();
}
if (this.api)
(placeholder) ? this.api.asc_addImage(obj) : this.api.ChangeImageFromFile();
this.editComplete();
},

onInsertImageUrl: function(placeholder, obj, x, y) {
if (placeholder) {
this.hideScreenTip();
this.onHidePlaceholderActions();
}
var me = this;
(new Common.Views.ImageFromUrlDialog({
handler: function(result, value) {
Expand Down Expand Up @@ -1897,6 +1908,8 @@ define([

onClickPlaceholder: function(type, obj, x, y) {
if (!this.api) return;
this.hideScreenTip();
this.onHidePlaceholderActions();
if (type == AscCommon.PlaceholderButtonType.Video) {
this.api.asc_AddVideo(obj);
} else if (type == AscCommon.PlaceholderButtonType.Audio) {
Expand Down
1 change: 1 addition & 0 deletions apps/spreadsheeteditor/embed/js/ApplicationController.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ SSE.ApplicationController = new(function(){
$('.viewer').addClass('top');
}

config.mode = 'view'; // always view for embedded
config.canCloseEditor = false;
var _canback = false;
if (typeof config.customization === 'object') {
Expand Down

0 comments on commit 3796f50

Please sign in to comment.