Skip to content

Commit

Permalink
Fix plugin's window
Browse files Browse the repository at this point in the history
  • Loading branch information
JuliaRadzhabova committed Dec 16, 2024
1 parent 60e616b commit b298f92
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 4 deletions.
5 changes: 4 additions & 1 deletion apps/pdfeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2405,7 +2405,10 @@ define([
},

onPluginToolbarMenu: function(data) {
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data));
var api = this.api;
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data, function(guid, value, pressed) {
api && api.onPluginToolbarMenuItemClick(guid, value, pressed);
}));
},

onPluginToolbarCustomMenuItems: function(action, data) {
Expand Down
5 changes: 4 additions & 1 deletion apps/presentationeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -2967,7 +2967,10 @@ define([
},

onPluginToolbarMenu: function(data) {
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data));
var api = this.api;
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data, function(guid, value, pressed) {
api && api.onPluginToolbarMenuItemClick(guid, value, pressed);
}));
},

onPluginToolbarCustomMenuItems: function(action, data) {
Expand Down
5 changes: 4 additions & 1 deletion apps/spreadsheeteditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -5218,7 +5218,10 @@ define([
},

onPluginToolbarMenu: function(data) {
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data));
var api = this.api;
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data, function(guid, value, pressed) {
api && api.onPluginToolbarMenuItemClick(guid, value, pressed);
}));
},

onPluginToolbarCustomMenuItems: function(action, data) {
Expand Down
5 changes: 4 additions & 1 deletion apps/visioeditor/main/app/controller/Toolbar.js
Original file line number Diff line number Diff line change
Expand Up @@ -346,7 +346,10 @@ define([
},

onPluginToolbarMenu: function(data) {
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data));
var api = this.api;
this.toolbar && Array.prototype.push.apply(this.toolbar.lockControls, Common.UI.LayoutManager.addCustomControls(this.toolbar, data, function(guid, value, pressed) {
api && api.onPluginToolbarMenuItemClick(guid, value, pressed);
}));
},

onPluginToolbarCustomMenuItems: function(action, data) {
Expand Down

0 comments on commit b298f92

Please sign in to comment.