mirror of
https://github.com/BookStackApp/BookStack.git
synced 2024-08-29 21:52:35 +00:00
Removed external fonts from page forms and remove initial form flicker
This commit is contained in:
parent
5bf811a488
commit
e519236d94
@ -1,8 +1,7 @@
|
|||||||
module.exports = {
|
module.exports = {
|
||||||
selector: '#html-editor',
|
selector: '#html-editor',
|
||||||
content_css: [
|
content_css: [
|
||||||
'/css/styles.css',
|
'/css/styles.css'
|
||||||
'//fonts.googleapis.com/css?family=Roboto:400,400italic,500,500italic,700,700italic,300italic,100,300'
|
|
||||||
],
|
],
|
||||||
body_class: 'page-content',
|
body_class: 'page-content',
|
||||||
relative_urls: false,
|
relative_urls: false,
|
||||||
@ -133,7 +132,7 @@ module.exports = {
|
|||||||
formData.append('file', file, remoteFilename);
|
formData.append('file', file, remoteFilename);
|
||||||
formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content'));
|
formData.append('_token', document.querySelector('meta[name="token"]').getAttribute('content'));
|
||||||
|
|
||||||
xhr.open('POST', '/upload/image');
|
xhr.open('POST', '/images/gallery/upload');
|
||||||
xhr.onload = function () {
|
xhr.onload = function () {
|
||||||
if (xhr.status === 200 || xhr.status === 201) {
|
if (xhr.status === 200 || xhr.status === 201) {
|
||||||
var result = JSON.parse(xhr.responseText);
|
var result = JSON.parse(xhr.responseText);
|
||||||
@ -141,6 +140,7 @@ module.exports = {
|
|||||||
} else {
|
} else {
|
||||||
console.log('An error occured uploading the image');
|
console.log('An error occured uploading the image');
|
||||||
console.log(xhr.responseText);
|
console.log(xhr.responseText);
|
||||||
|
editor.dom.remove(id);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
xhr.send(formData);
|
xhr.send(formData);
|
||||||
|
@ -22,6 +22,10 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#html-editor {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
||||||
label {
|
label {
|
||||||
display: block;
|
display: block;
|
||||||
line-height: 1.4em;
|
line-height: 1.4em;
|
||||||
|
Loading…
Reference in New Issue
Block a user