mirror of
https://github.com/ONLYOFFICE/web-apps.git
synced 2026-07-25 19:44:01 +08:00
Refactoring
This commit is contained in:
@ -675,7 +675,6 @@ define([], function () {
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
var getMenu = function(items, guid, toMenu) {
|
||||
var hasIcons = false;
|
||||
if (toMenu)
|
||||
@ -775,14 +774,6 @@ define([], function () {
|
||||
}
|
||||
this._hasCustomItems = false;
|
||||
};
|
||||
|
||||
dh.parseIcons = function(icons) {
|
||||
var plugins = _editor.getController('Common.Controllers.Plugins').getView('Common.Views.Plugins');
|
||||
if (icons && icons.length && plugins && plugins.parseIcons) {
|
||||
icons = plugins.parseIcons(icons);
|
||||
return icons ? icons['normal'] : undefined;
|
||||
}
|
||||
};
|
||||
}
|
||||
|
||||
});
|
||||
|
||||
@ -3865,36 +3865,6 @@ define([
|
||||
},
|
||||
|
||||
onPluginToolbarCustomMenuItems: function(action, data) {
|
||||
data = [
|
||||
{
|
||||
guid: 'plugin-guid',
|
||||
items: [
|
||||
{
|
||||
id: 'item-id',
|
||||
text: 'caption',
|
||||
// icons: 'template string' or object
|
||||
separator: false,
|
||||
disabled: false,
|
||||
items: [
|
||||
{
|
||||
id: 'item-id-2',
|
||||
text: 'caption 2',
|
||||
separator: false,
|
||||
// icons: 'template string' or object,
|
||||
disabled: false
|
||||
},
|
||||
{
|
||||
id: 'item-id-3',
|
||||
text: 'caption 3',
|
||||
separator: true,
|
||||
// icons: 'template string' or object,
|
||||
disabled: true
|
||||
}
|
||||
],
|
||||
}
|
||||
]
|
||||
}
|
||||
];
|
||||
if (!this._isDocReady) {
|
||||
this._state.customPluginData = (this._state.customPluginData || []).concat([{action: action, data: data}]);
|
||||
return;
|
||||
|
||||
@ -2366,7 +2366,6 @@ define([
|
||||
}
|
||||
var api = this.api;
|
||||
this.toolbar && Common.UI.LayoutManager.addCustomMenuItems(action, data, function(guid, value) {
|
||||
console.log(guid + ', ' + value);
|
||||
api && api.onPluginContextMenuItemClick(guid, value);
|
||||
});
|
||||
},
|
||||
|
||||
@ -2965,7 +2965,6 @@ define([
|
||||
}
|
||||
var api = this.api;
|
||||
this.toolbar && Common.UI.LayoutManager.addCustomMenuItems(action, data, function(guid, value) {
|
||||
console.log(guid + ', ' + value);
|
||||
api && api.onPluginContextMenuItemClick(guid, value);
|
||||
});
|
||||
},
|
||||
|
||||
@ -5166,7 +5166,6 @@ define([
|
||||
}
|
||||
var api = this.api;
|
||||
this.toolbar && Common.UI.LayoutManager.addCustomMenuItems(action, data, function(guid, value) {
|
||||
console.log(guid + ', ' + value);
|
||||
api && api.onPluginContextMenuItemClick(guid, value);
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user