mirror of
https://github.com/BookStackApp/BookStack.git
synced 2025-05-30 12:38:12 +08:00
Finished migrated from icon-font to SVG
This commit is contained in:
@ -293,7 +293,7 @@ function drawIoPlugin() {
|
||||
|
||||
editor.addButton('drawio', {
|
||||
tooltip: 'Drawing',
|
||||
image: window.baseUrl('/system_images/drawing.svg'),
|
||||
image: window.baseUrl('/icon/drawing.svg?color=000000'),
|
||||
cmd: 'drawio'
|
||||
});
|
||||
|
||||
@ -351,7 +351,6 @@ module.exports = {
|
||||
selector: '#html-editor',
|
||||
content_css: [
|
||||
window.baseUrl('/css/styles.css'),
|
||||
window.baseUrl('/libs/material-design-iconic-font/css/material-design-iconic-font.min.css')
|
||||
],
|
||||
branding: false,
|
||||
body_class: 'page-content',
|
||||
|
@ -16,28 +16,31 @@ let setupPageShow = window.setupPageShow = function (pageId) {
|
||||
let pointerSectionId = '';
|
||||
|
||||
// Select all contents on input click
|
||||
$pointer.on('click', 'input', function (e) {
|
||||
$pointer.on('click', 'input', event => {
|
||||
$(this).select();
|
||||
e.stopPropagation();
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
$pointer.on('click focus', event => {
|
||||
event.stopPropagation();
|
||||
});
|
||||
|
||||
// Pointer mode toggle
|
||||
$pointer.on('click', 'span.icon', event => {
|
||||
event.stopPropagation();
|
||||
let $icon = $(event.currentTarget);
|
||||
pointerModeLink = !pointerModeLink;
|
||||
$icon.html(pointerModeLink ? '<i class="zmdi zmdi-link"></i>' : '<i class="zmdi zmdi-square-down"></i>');
|
||||
$icon.find('[data-icon="include"]').toggle(!pointerModeLink);
|
||||
$icon.find('[data-icon="link"]').toggle(pointerModeLink);
|
||||
updatePointerContent();
|
||||
});
|
||||
|
||||
// Set up clipboard
|
||||
let clipboard = new Clipboard('#pointer button');
|
||||
let clipboard = new Clipboard($pointer[0].querySelector('button'));
|
||||
|
||||
// Hide pointer when clicking away
|
||||
$(document.body).find('*').on('click focus', event => {
|
||||
if (!pointerShowing || isSelection) return;
|
||||
let target = $(event.target);
|
||||
if (target.is('.zmdi') || $(event.target).closest('#pointer').length === 1) return;
|
||||
|
||||
$pointer.detach();
|
||||
pointerShowing = false;
|
||||
});
|
||||
|
Reference in New Issue
Block a user