diff --git a/src/editor/extensions/ext-imagelib/ext-imagelib.js b/src/editor/extensions/ext-imagelib/ext-imagelib.js
index 87c38b46..0d438cd6 100644
--- a/src/editor/extensions/ext-imagelib/ext-imagelib.js
+++ b/src/editor/extensions/ext-imagelib/ext-imagelib.js
@@ -372,7 +372,7 @@ export default {
let browser = $('#imgbrowse');
if (!browser.length) {
$('
').insertAfter('#svg_docprops');
+ '').insertAfter('#svg_editor');
browser = $('#imgbrowse');
const allLibs = imagelibStrings.select_lib;
@@ -386,8 +386,8 @@ export default {
left: 0,
width: '100%'
});
-
- const cancel = $('')
+ // eslint-disable-next-line max-len
+ const cancel = $('')
.appendTo(browser)
.on('click touchend', function () {
$('#imgbrowse_holder').hide();
@@ -398,8 +398,8 @@ export default {
});
const leftBlock = $('').css({position: 'absolute', top: 5, left: 10}).appendTo(browser);
-
- const back = $('')
+ // eslint-disable-next-line max-len
+ const back = $('')
.appendTo(leftBlock)
.on('click touchend', function () {
frame.attr('src', 'about:blank').hide();
@@ -430,9 +430,6 @@ export default {
'margin-top': 10
});
- cancel.prepend($.getSvgIcon('cancel', true));
- back.prepend($.getSvgIcon('tool_imagelib', true));
-
imagelibStrings.imgLibs.forEach(function ({name, url, description}) {
$('')
.appendTo(libOpts)
@@ -452,21 +449,16 @@ export default {
}
}
- const buttons = [{
+ const events = {
id: 'tool_imagelib',
- type: 'app_menu',
- icon: 'imagelib.png',
- position: 4,
- events: {
- mouseup: showBrowser
+ click () {
+ showBrowser();
}
- }];
+ };
return {
svgicons: 'ext-imagelib.xml',
- buttons: imagelibStrings.buttons.map((button, i) => {
- return Object.assign(buttons[i], button);
- }),
+ events,
callback () {
$('