make extension point cover share menu for files

pull/1/head
ansuz 7 years ago committed by Caleb James DeLisle
parent 13b704d9f6
commit c31b5aa6c0

@ -8,8 +8,7 @@ define([
'/common/common-feedback.js', '/common/common-feedback.js',
'/customize/messages.js', '/customize/messages.js',
'/common/clipboard.js', '/common/clipboard.js',
'/common/hyperscript.js', ], function ($, Config, ApiConfig, UIElements, UI, Hash, Feedback, Messages, Clipboard) {
], function ($, Config, ApiConfig, UIElements, UI, Hash, Feedback, Messages, Clipboard, h) {
var Common; var Common;
var Bar = { var Bar = {
@ -498,7 +497,9 @@ define([
}); });
} }
if (typeof(Config.customizeShareOptions) === 'function') { if (typeof(Config.customizeShareOptions) === 'function') {
Config.customizeShareOptions(hashes, options); Config.customizeShareOptions(hashes, options, {
type: 'DEFAULT',
});
} }
var dropdownConfigShare = { var dropdownConfigShare = {
text: $('<div>').append($shareIcon).html(), text: $('<div>').append($shareIcon).html(),
@ -586,6 +587,13 @@ define([
attributes: {title: Messages.fileEmbedTitle, 'class': 'cp-toolbar-share-file-embed'}, attributes: {title: Messages.fileEmbedTitle, 'class': 'cp-toolbar-share-file-embed'},
content: '<span class="fa fa-file"></span> ' + Messages.getEmbedCode content: '<span class="fa fa-file"></span> ' + Messages.getEmbedCode
}); });
if (typeof(Config.customizeShareOptions) === 'function') {
Config.customizeShareOptions(hashes, options, {
type: 'FILE'
});
}
var dropdownConfigShare = { var dropdownConfigShare = {
text: $('<div>').append($shareIcon).html(), text: $('<div>').append($shareIcon).html(),
options: options, options: options,

Loading…
Cancel
Save